/* ============================
   ESTILOS PANTALLA DE LOGIN
   ============================ */

:root {
    --color-primary: #0284c7;
    /* Azul médico moderno */
    --color-primary-hover: #0369a1;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;

    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-xl: 24px;
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

#login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    /* Fondo claro más limpio */
    padding: 1rem;
}

body.dark-mode #login-screen {
    background: #0f172a;
    --bg-card: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: #334155;
}

.login-container {
    display: flex;
    width: 100%;
    max-width: 1050px;
    min-height: 600px;
    background: var(--bg-card);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

/* PANEL IZQUIERDO */
.login-panel-left {
    flex: 1;
    padding: 3.5rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--bg-card);
}

.login-logo-area {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.login-logo-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
    border: 1px solid #e0f2fe;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.12);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-logo-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.2);
}

.login-logo-icon img,
.login-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scale(1.35);
    display: block;
}

body.dark-mode .login-logo-icon {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.hospital-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.hospital-location {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.login-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
}

.login-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

/* FORMULARIO Y INPUTS (Diseño Moderno) */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    color: var(--text-primary);
    background-color: transparent;
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius-md);
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.1);
}

.form-input.error {
    border-color: #ef4444;
}

.form-error-msg {
    display: block;
    font-size: 0.8rem;
    color: #ef4444;
    margin-top: 0.4rem;
}

/* OPCIONES: Checkbox y Forgot Password */
.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.custom-checkbox {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.checkbox-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.login-forgot {
    font-size: 0.875rem;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.login-forgot:hover {
    color: var(--color-primary-hover);
}

/* BOTÓN MODERNO */
.login-button {
    width: 100%;
    padding: 0.875rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background-color: var(--color-primary);
    border: none;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(2, 132, 199, 0.2);
}

.login-button:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px -2px rgba(2, 132, 199, 0.3);
}

/* PANEL DERECHO (Imagen) */
.login-panel-right {
    flex: 1.2;
    /* Ligeramente más ancho que el form para mejor balance */
    position: relative;
    overflow: hidden;
    padding: 0;
}

.login-right-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Degradado sutil para oscurecer un poco la imagen y darle un tono azulado */
    background: linear-gradient(180deg, rgba(2, 132, 199, 0.1) 0%, rgba(15, 23, 42, 0.4) 100%);
    z-index: 1;
}

.login-right-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 6s cubic-bezier(0.25, 1, 0.5, 1);
}

.login-panel-right:hover .login-right-image {
    transform: scale(1.08);
    /* Zoom lento muy elegante */
}

/* Etiqueta flotante estilo Glassmorphism (opcional, le da un toque muy moderno) */
.glass-badge {
    position: absolute;
    bottom: 2.5rem;
    left: 2.5rem;
    z-index: 2;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.75rem 1.25rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* RESPONSIVIDAD */
@media (max-width: 1024px) {
    .login-container {
        flex-direction: column;
        max-width: 500px;
    }

    .login-panel-left {
        padding: 3rem 2.5rem;
    }

    .login-panel-right {
        height: 250px;
        flex: none;
    }

    .glass-badge {
        bottom: 1rem;
        left: 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 640px) {
    .login-container {
        border-radius: var(--border-radius-md);
    }

    .login-panel-left {
        padding: 2rem 1.5rem;
    }

    .login-panel-right {
        display: none;
        /* Ocultamos la imagen en móviles pequeños para priorizar el login */
    }
}