@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 (idénticas al login) ────────────────────────────────────── */
: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;
}

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

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,.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,.04) 0%, transparent 70%);
    pointer-events: none; z-index: 0;
}

/* ── Wrapper ────────────────────────────────────────────────────────────── */
.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: 520px;
    position: relative;
    z-index: 1;
    animation: fadeUp .4s ease;
}

/* ── Panel 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; }

/* ── Panel derecho ──────────────────────────────────────────────────────── */
.login-right {
    flex: 1;
    padding: 48px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
}

/* ── Encabezado ─────────────────────────────────────────────────────────── */
.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; }

/* ── Campo de formulario ────────────────────────────────────────────────── */
.form-group { margin-bottom: 14px; }
.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); }

/* ── Botón submit ───────────────────────────────────────────────────────── */
.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: 6px;
    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; }

/* ── Link volver ────────────────────────────────────────────────────────── */
.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;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.switch-link a:hover { color: var(--accent2); text-decoration: underline; }

/* ── Alertas ────────────────────────────────────────────────────────────── */
.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); }

/* ── Vista de éxito ─────────────────────────────────────────────────────── */
.success-icon {
    width: 56px; height: 56px;
    background: var(--accent-light);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 20px;
}
.success-icon svg { width: 26px; height: 26px; color: var(--accent); }

/* Caja informativa del mensaje de seguridad */
.info-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--accent-light);
    border: 1px solid #c5d8fb;
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 14px;
}
.info-box svg {
    width: 18px; height: 18px;
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 1px;
}
.info-box p {
    font-size: 13.5px;
    color: var(--text2);
    line-height: 1.6;
    margin: 0;
}

/* Texto secundario "puedes cerrar esta ventana..." */
.close-hint {
    font-size: 12.5px;
    color: var(--text3);
    line-height: 1.6;
    text-align: center;
}

/* ── Spinner ────────────────────────────────────────────────────────────── */
.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; }
}