@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600&display=swap');

/* variables */
:root {
    --accent:        #1a56db;
    --accent2:       #1446c0;
    --accent-bg:     rgba(26, 86, 219, 0.07);
    --accent-light:  #e8effe;
    --success:       #0e9f6e;
    --success-bg:    #ecfdf5;
    --danger:        #e02424;
    --danger-bg:     #fef2f2;
    --text:          #111928;
    --text2:         #4b5563;
    --text3:         #9ca3af;
    --border:        #e4e8f0;
    --border2:       #d0d7e4;
    --bg:            #f8f9fc;
    --bg2:           #ffffff;
    --bg3:           #f1f4f9;
    --radius:        10px;
    --radius2:       6px;
    --shadow:        0 4px 32px rgba(0, 0, 0, 0.09);
    --font-head:     'Syne', sans-serif;
    --font-body:     'DM Sans', sans-serif;
}

/* reseteo */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* body */
body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    position: relative;
}
body::before {
    content: '';
    position: fixed;
    top: -200px; right: -200px;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(26, 86, 219, 0.06) 0%, transparent 70%);
    pointer-events: none; z-index: 0;
}
body::after {
    content: '';
    position: fixed;
    bottom: -150px; left: -150px;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(14, 159, 110, 0.04) 0%, transparent 70%);
    pointer-events: none; z-index: 0;
}

.login-wrapper {
    display: flex;
    width: 100%; max-width: 920px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden; min-height: 560px;
    position: relative; z-index: 1;
    animation: fadeUp .4s ease;
}

/* izquierdo */
.login-left {
    width: 40%; background: var(--accent);
    padding: 48px 36px;
    display: flex; flex-direction: column; justify-content: space-between;
    position: relative; overflow: hidden; flex-shrink: 0;
}
.login-left::before {
    content: ''; position: absolute; top: -80px; right: -80px;
    width: 260px; height: 260px; background: rgba(255,255,255,.07); border-radius: 50%;
}
.login-left::after {
    content: ''; position: absolute; bottom: -60px; left: -60px;
    width: 200px; height: 200px; background: rgba(255,255,255,.04); border-radius: 50%;
}
.left-content { position: relative; z-index: 1; }
.left-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 32px; }
.left-logo-icon {
    width: 40px; height: 40px; background: rgba(255,255,255,.15);
    border-radius: 10px; display: flex; align-items: center; justify-content: center;
}
.left-logo-icon svg { width: 22px; height: 22px; color: #fff; }
.left-logo h1 { font-family: var(--font-head); font-size: 22px; font-weight: 800; color: #fff; letter-spacing: -0.3px; }
.left-tagline { font-size: 13.5px; color: rgba(255,255,255,.82); font-weight: 300; line-height: 1.65; margin-bottom: 32px; }
.left-features { display: flex; flex-direction: column; gap: 16px; }
.left-feature  { display: flex; align-items: flex-start; gap: 10px; }
.feat-icon {
    width: 28px; height: 28px; background: rgba(255,255,255,.12);
    border-radius: 6px; display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; margin-top: 1px;
}
.feat-icon svg   { width: 14px; height: 14px; color: #fff; }
.feat-text strong { display: block; color: #fff; font-weight: 500; font-size: 13px; margin-bottom: 1px; }
.feat-text span   { font-size: 12px; color: rgba(255,255,255,.6); }
.left-footer { position: relative; z-index: 1; font-size: 11px; color: rgba(255,255,255,.3); margin-top: 32px; }

/* derecho */
.login-right {
    flex: 1; padding: 44px;
    display: flex; flex-direction: column; justify-content: center; overflow-y: auto;
}
.form-heading { margin-bottom: 22px; }
.form-heading h2 { font-family: var(--font-head); font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: -0.3px; }
.form-heading p  { font-size: 13px; color: var(--text3); margin-top: 4px; }

.form-group { margin-bottom: 13px; }
.form-group label {
    display: flex; align-items: center; gap: 6px;
    font-size: 11.5px; font-weight: 600; color: var(--text2);
    text-transform: uppercase; letter-spacing: .06em; margin-bottom: 7px;
}
.form-group input {
    width: 100%; background: var(--bg3); border: 1px solid var(--border2);
    border-radius: var(--radius2); color: var(--text); font-family: var(--font-body);
    font-size: 13.5px; padding: 10px 13px; outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s; appearance: none;
}
.form-group input:focus { border-color: var(--accent); background: var(--bg2); box-shadow: 0 0 0 3px var(--accent-bg); }
.form-group input::placeholder { color: var(--text3); }

/* contraseña */
.pwd-wrapper { position: relative; }
.pwd-wrapper input { padding-right: 42px !important; }
.btn-eye {
    position: absolute; right: 11px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; color: var(--text3);
    padding: 3px; display: flex; align-items: center; transition: color .2s; line-height: 1;
}
.btn-eye:hover { color: var(--accent); }
.btn-eye svg   { width: 17px; height: 17px; display: block; }

/* fila recordar sesión + olvidaste contraseña */
.remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;   /* ← separa los dos elementos */
    margin: 10px 0 4px;
}
.remember-check {
    display: flex; align-items: center; gap: 7px;
    cursor: pointer; font-size: 12.5px; color: var(--text2); user-select: none;
}
.remember-check input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }

/* NUEVO: enlace ¿Olvidaste tu contraseña? */
.forgot-link {
    font-size: 12.5px;
    color: var(--accent);
    font-weight: 500;
    text-decoration: none;
    transition: color .2s;
    white-space: nowrap;
}
.forgot-link:hover { color: var(--accent2); text-decoration: underline; }

/* botón */
.btn-submit {
    width: 100%; background: var(--accent); color: #fff; border: none;
    border-radius: var(--radius2); font-family: var(--font-body);
    font-size: 14px; font-weight: 600; padding: 12px; cursor: pointer;
    transition: all .2s; margin-top: 8px; letter-spacing: .02em;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-submit:hover    { background: var(--accent2); box-shadow: 0 3px 14px rgba(26,86,219,.28); }
.btn-submit:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }

/* crear cuenta link */
.switch-link { margin-top: 20px; text-align: center; font-size: 13px; color: var(--text3); }
.switch-link a { color: var(--accent); font-weight: 600; text-decoration: none; transition: color .2s; }
.switch-link a:hover { color: var(--accent2); text-decoration: underline; }

/* alerta */
.alert {
    padding: 10px 14px; border-radius: var(--radius2); font-size: 12.5px;
    margin-bottom: 14px; border: 1px solid;
    display: flex; align-items: flex-start; gap: 8px; line-height: 1.5;
}
.alert svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; }
.alert-error   { background: var(--danger-bg);  border-color: #fca5a5; color: var(--danger); }
.alert-success { background: var(--success-bg); border-color: #6ee7b7; color: var(--success); }

.spinner {
    display: inline-block; width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
    border-radius: 50%; animation: spin .6s linear infinite;
}

/* animaciones */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes spin   { to { transform: rotate(360deg); } }

/* responsive */
@media (max-width: 740px) {
    .login-left    { display: none; }
    .login-right   { padding: 32px 24px; }
    .login-wrapper { max-width: 460px; min-height: auto; }
}
@media (max-width: 480px) {
    body           { padding: 12px; align-items: flex-start; padding-top: 20px; }
    .login-wrapper { border-radius: 12px; }
    .login-right   { padding: 28px 20px; }
    .forgot-link   { font-size: 12px; }
}
/* ── HINTS POR CAMPO ──────────────────────────────────────────── */
.field-hint {
    font-size: 12px;
    min-height: 0;
    max-height: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text2);
    transition: max-height .2s ease, margin-top .2s ease, opacity .2s ease;
    opacity: 0;
    margin-top: 0;
}
.field-hint.show {
    max-height: 40px;
    margin-top: 5px;
    opacity: 1;
}
.field-hint svg { width: 12px; height: 12px; flex-shrink: 0; }
.field-hint.hint-error   { color: var(--danger); }
.field-hint.hint-success { color: var(--success); }
.field-hint.hint-info    { color: var(--accent); }