/* ================================================================
   assets/css/login.css
   Estilos para la pantalla de autenticación
   ================================================================ */

/* ── Variables corporativas ─────────────────────────────────── */
:root {
    --blue-900:  #0F172A;
    --blue-800:  #1E3A5F;
    --blue-700:  #1D4ED8;
    --blue-600:  #2563EB;
    --blue-500:  #3B82F6;
    --blue-400:  #60A5FA;
    --blue-100:  #DBEAFE;
    --gray-900:  #111827;
    --gray-800:  #1F2937;
    --gray-700:  #374151;
    --gray-500:  #6B7280;
    --gray-400:  #9CA3AF;
    --gray-200:  #E5E7EB;
    --gray-100:  #F3F4F6;
    --white:     #FFFFFF;
    --error:     #EF4444;
    --error-bg:  #FEF2F2;
    --error-border: #FECACA;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md: 0 4px 24px rgba(0,0,0,.10), 0 2px 8px rgba(0,0,0,.06);
    --shadow-lg: 0 20px 60px rgba(0,0,0,.15);
    --transition: 200ms cubic-bezier(.4,0,.2,1);
}

/* ── Reset & base ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'DM Sans', -apple-system, sans-serif;
    font-size: 15px;
    color: var(--gray-900);
    background: var(--white);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ── Layout principal ────────────────────────────────────────── */
.login-backdrop {
    display: flex;
    min-height: 100vh;
}

/* ── Panel izquierdo (branding) ─────────────────────────────── */
.login-left {
    flex: 0 0 45%;
    background: linear-gradient(145deg, var(--blue-900) 0%, var(--blue-800) 60%, var(--blue-700) 100%);
    display: flex;
    flex-direction: column;
    padding: 40px 48px;
    position: relative;
    overflow: hidden;
}

.brand-area {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2;
}

.brand-icon {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,.12);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.brand-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--white);
    letter-spacing: -0.3px;
}

.left-content {
    margin-top: auto;
    margin-bottom: auto;
    z-index: 2;
}

.left-content h1 {
    font-size: clamp(28px, 3vw, 40px);
    font-weight: 300;
    color: var(--white);
    line-height: 1.25;
    letter-spacing: -0.5px;
    margin-bottom: 20px;
}

.left-content h1 em {
    font-style: normal;
    font-weight: 600;
    color: var(--blue-400);
}

.left-content > p {
    color: rgba(255,255,255,.65);
    font-size: 15px;
    line-height: 1.7;
    max-width: 320px;
    margin-bottom: 36px;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,.80);
    font-size: 14px;
    font-weight: 400;
}

.feature-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--blue-400);
    flex-shrink: 0;
}

/* ── Círculos decorativos ────────────────────────────────────── */
.left-decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.decor-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.06);
}

.c1 { width: 400px; height: 400px; right: -120px; top: -100px; }
.c2 { width: 280px; height: 280px; right: -60px;  bottom: 80px; background: rgba(255,255,255,.03); }
.c3 { width: 160px; height: 160px; left: 20px;    bottom: -40px; }

/* ── Panel derecho (formulario) ─────────────────────────────── */
.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: var(--gray-100);
}

.login-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 48px 44px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
}

.login-header {
    margin-bottom: 32px;
}

.login-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--gray-900);
    letter-spacing: -0.4px;
    margin-bottom: 6px;
}

.login-header p {
    color: var(--gray-500);
    font-size: 14px;
}

/* ── Alertas ─────────────────────────────────────────────────── */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 20px;
}

.alert-error {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid var(--error-border);
}

/* ── Formulario ──────────────────────────────────────────────── */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
    letter-spacing: 0.1px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--gray-400);
    pointer-events: none;
    flex-shrink: 0;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    color: var(--gray-900);
    background: var(--white);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
    appearance: none;
}

.input-wrapper input::placeholder { color: var(--gray-400); }

.input-wrapper input:focus {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    transition: color var(--transition);
}
.toggle-password:hover { color: var(--gray-700); }

/* ── Botón de login ──────────────────────────────────────────── */
.btn-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    background: var(--blue-600);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    margin-top: 4px;
    letter-spacing: 0.1px;
}

.btn-login:hover {
    background: var(--blue-700);
    box-shadow: 0 4px 12px rgba(37,99,235,.30);
    transform: translateY(-1px);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: none;
}

/* ── Hint de demo ────────────────────────────────────────────── */
.demo-hint {
    margin-top: 28px;
    padding: 14px 16px;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    border: 1px dashed var(--gray-200);
}

.demo-hint p {
    font-size: 12px;
    color: var(--gray-500);
    line-height: 1.8;
}

.demo-hint code {
    font-family: 'DM Mono', monospace;
    font-size: 11.5px;
    background: var(--white);
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px solid var(--gray-200);
    color: var(--blue-600);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .login-left   { display: none; }
    .login-right  { background: var(--white); }
    .login-card   { box-shadow: none; border: none; padding: 32px 20px; }
}
