﻿/* ====================================================
   MESA DE PARTES VIRTUAL — LOGIN v2.1
   Panel izquierdo: gov-tech brand
   Panel derecho:   diseño referencia exacto
   ==================================================== */

:root {
    --ink-900:      #0f1e30;
    --ink-800:      #1a2f47;
    --ink-700:      #1f3b5b;
    --ink-600:      #2f5f8f;
    --ink-400:      #4a84b8;
    --ink-200:      #a8c8e8;
    --ink-100:      #daeaf8;
    --ink-50:       #f0f6ff;
    --green-bg:     #f0faf4;
    --green-border: #a3d9b1;
    --green-text:   #1e6e3a;
    --surface:      #f2f6fb;
    --white:        #ffffff;
    --border:       #d4dfe9;
    --border-hover: #9db8d4;
    --text-1:       #1a2f47;
    --text-2:       #4a6481;
    --text-3:       #8da5be;
    --shadow-sm:    0 1px 3px rgba(15,30,48,.08), 0 1px 2px rgba(15,30,48,.04);
    --shadow-md:    0 4px 16px rgba(15,30,48,.10), 0 2px 6px rgba(15,30,48,.06);
    --shadow-lg:    0 12px 40px rgba(15,30,48,.14), 0 4px 12px rgba(15,30,48,.08);
    --shadow-glow:  0 0 0 3px rgba(47,95,143,.16);
    --shadow-btn:   0 4px 14px rgba(31,59,91,.28), 0 2px 4px rgba(31,59,91,.16);
    --r-sm:  10px;
    --r-md:  14px;
    --r-lg:  20px;
    --t:     all 0.22s cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    height: 100vh;
    overflow: hidden;
    background: var(--ink-900);
    -webkit-font-smoothing: antialiased;
}

/* ══════════════════════════════════════════
   LAYOUT
══════════════════════════════════════════ */
.full-layout {
    display: flex;
    width: 100%;
    height: 100vh;
}

/* ══════════════════════════════════════════
   PANEL IZQUIERDO — SIN CAMBIOS
══════════════════════════════════════════ */
.brand-side {
    flex: 1.1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 48px 56px;
    text-align: center;
    overflow: hidden;
    
    /* 1. Definimos las capas de fondo separadas por coma */
    background-image: 
        linear-gradient(160deg, rgba(10,20,34,.82) 0%, rgba(20,45,80,.65) 45%, rgba(10,18,30,.88) 100%),
        url('../../img/fach_pog_loguser.png');
    
    /* 2. Propiedades de ajuste para la imagen */
    background-position: center 28%;
    background-size: cover;
    background-repeat: no-repeat;
}

.brand-side::before {
    content: '';
    position: absolute;
    width: 480px; height: 480px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(47,95,143,.18) 0%, transparent 70%);
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    pointer-events: none;
}

.brand-side::after {
    content: '';
    position: absolute;
    right: 0; top: 12%; bottom: 12%;
    width: 1px;
    background: linear-gradient(to bottom,
        transparent,
        rgba(255,255,255,.10) 30%,
        rgba(255,255,255,.10) 70%,
        transparent
    );
}

.brand-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    margin-bottom: 5vh;
    animation: brandIn .7s cubic-bezier(.4,0,.2,1) both;
}

@keyframes brandIn {
    from { opacity:0; transform:translateY(16px); }
    to   { opacity:1; transform:translateY(0); }
}

.inst-logo {
    width: 110px;
    margin-bottom: 24px;
    filter:
        drop-shadow(0 0 20px rgba(168,200,232,.22))
        drop-shadow(0 4px 10px rgba(0,0,0,.35));
    transition: filter .35s ease, transform .35s ease;
}
.inst-logo:hover {
    filter:
        drop-shadow(0 0 30px rgba(168,200,232,.38))
        drop-shadow(0 4px 12px rgba(0,0,0,.40));
    transform: scale(1.04);
}

.brand-eyebrow {
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink-200);
    margin-bottom: 10px;
    opacity: .85;
}

.brand-side h1 {
    font-size: 1.70rem;
    font-weight: 800;
    letter-spacing: -.025em;
    line-height: 1.18;
    color: #eaf3ff;
    margin-bottom: 12px;
}

.brand-subtitle {
    font-size: .875rem;
    color: #95b8d8;
    max-width: 330px;
    line-height: 1.70;
    font-weight: 400;
    margin-bottom: 28px;
}

.brand-pills { display:flex; gap:8px; justify-content:center; flex-wrap:wrap; }

.pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: .685rem;
    font-weight: 500;
    letter-spacing: .02em;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.06);
    color: #a0c0dc;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.pill-dot {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 6px rgba(74,222,128,.65);
    flex-shrink: 0;
}

.pill-lock::before { content:'🔒'; font-size:.65rem; }

/* ══════════════════════════════════════════
   PANEL DERECHO
══════════════════════════════════════════ */
.form-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    padding: 32px 28px;
    overflow-y: auto;
}

/* ── Contenedor scrollable centrado ── */
.login-box-container {
    width: 100%;
    max-width: 440px;
    animation: cardIn .42s cubic-bezier(.4,0,.2,1) .08s both;
}

@keyframes cardIn {
    from { opacity:0; transform:translateY(12px); }
    to   { opacity:1; transform:translateY(0); }
}

/* ── Cabecera alineada a la izquierda ── */
.login-header {
    margin-bottom: 26px;
}

.login-header h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-1);
    letter-spacing: -.03em;
    line-height: 1.15;
    margin-bottom: 6px;
}

.login-header .login-sub {
    font-size: .875rem;
    color: var(--ink-600);
    font-weight: 400;
    line-height: 1.4;
}

/* ── Grupos de campo ── */
.input-group { margin-bottom: 14px; }

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.input-group label {
    font-size: .795rem;
    font-weight: 600;
    color: var(--text-1);
    letter-spacing: .005em;
}

.forgot-link {
    font-size: .775rem;
    color: var(--ink-600);
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: var(--t);
}
.forgot-link:hover { color: var(--ink-400); text-decoration: underline; }
.forgot-link i { font-size: .70rem; }

/* Wrapper input + íconos */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-left {
    position: absolute;
    left: 12px;
    color: var(--text-3);
    font-size: .875rem;
    pointer-events: none;
    transition: color .2s ease;
    z-index: 1;
}

.input-icon-right {
    position: absolute;
    right: 12px;
    color: var(--text-3);
    font-size: .875rem;
    cursor: pointer;
    transition: color .2s ease;
    z-index: 1;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
}
.input-icon-right:hover { color: var(--ink-600); }

.input-48 {
    width: 100%;
    height: 46px;
    border: 1.5px solid var(--border);
    border-radius: var(--r-sm);
    padding: 0 14px 0 38px;
    font-size: .895rem;
    font-family: inherit;
    background: var(--white);
    color: var(--text-1);
    transition: var(--t);
    outline: none;
}

.input-48.has-right { padding-right: 40px; }

.input-48::placeholder {
    color: var(--text-3);
    font-size: .865rem;
}

.input-48:hover { border-color: var(--border-hover); }

.input-48:focus {
    border-color: var(--ink-600);
    box-shadow: var(--shadow-glow);
}

.input-group:focus-within .input-icon-left { color: var(--ink-600); }

/* Checkbox "Recordar" */
.checkbox-row {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 18px;
    cursor: pointer;
}

.checkbox-row input[type="checkbox"] {
    width: 16px; height: 16px;
    border: 1.5px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    accent-color: var(--ink-700);
    flex-shrink: 0;
}

.checkbox-row span {
    font-size: .815rem;
    color: var(--text-2);
    font-weight: 400;
    user-select: none;
}

/* ── Botón principal ── */
.btn-primary {
    width: 100%;
    height: 46px;
    background: linear-gradient(135deg, var(--ink-700) 0%, var(--ink-600) 100%);
    color: var(--white);
    border: none;
    border-radius: var(--r-sm);
    font-size: .895rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    letter-spacing: .015em;
    transition: var(--t);
    box-shadow: var(--shadow-btn);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.10), transparent);
    transform: skewX(-15deg);
    transition: left .4s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--ink-600) 0%, var(--ink-400) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(31,59,91,.30), 0 3px 6px rgba(31,59,91,.16);
}
.btn-primary:hover::after { left: 140%; }
.btn-primary:active { transform:translateY(0); box-shadow:var(--shadow-sm); }

/* ── Banner SSL ── */
.ssl-banner {
    margin-top: 14px;
    padding: 11px 14px;
    background: var(--green-bg);
    border: 1px solid var(--green-border);
    border-radius: var(--r-sm);
    display: flex;
    align-items: flex-start;
    gap: 9px;
}

.ssl-banner i {
    color: #2a9d52;
    font-size: .875rem;
    margin-top: 1px;
    flex-shrink: 0;
}

.ssl-banner p {
    font-size: .775rem;
    color: var(--green-text);
    line-height: 1.50;
    font-weight: 400;
}

/* ── Bloque registro ── */
.info-card-register {
    margin-top: 16px;
    padding: 16px 18px;
    border: 1.5px solid var(--border);
    border-radius: var(--r-sm);
    background: var(--white);
    transition: var(--t);
}

.info-card-register:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-sm);
}

.register-body {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-bottom: 12px;
}

.register-icon-wrap {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--ink-100);
    color: var(--ink-700);
    display: flex; align-items:center; justify-content:center;
    font-size: .85rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.register-text h4 {
    font-size: .825rem;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 3px;
}

.register-text p {
    font-size: .760rem;
    color: var(--text-2);
    line-height: 1.50;
}

.btn-secondary {
    width: 100%;
    height: 40px;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--text-1);
    font-size: .825rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    letter-spacing: .01em;
    transition: var(--t);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.btn-secondary:hover {
    border-color: var(--ink-600);
    color: var(--ink-600);
    background: var(--ink-50);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}
.btn-secondary:active { transform:translateY(0); }

.login-captcha {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 116px 42px;
    gap: 9px;
    align-items: center;
    margin: 10px 0 14px;
    padding: 9px;
    border: 1.5px dashed var(--border);
    border-radius: var(--r-sm);
    background: #f8fbff;
}

.login-captcha__question {
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 12px;
    border-radius: 10px;
    background: var(--white);
    color: var(--ink-700);
    font-size: .92rem;
}

.login-captcha__question i {
    color: var(--ink-600);
}

.login-captcha input {
    width: 100%;
    height: 40px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    text-align: center;
    font-weight: 800;
    color: var(--text-1);
}

.login-captcha button {
    width: 42px;
    height: 40px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: var(--white);
    color: var(--ink-700);
    cursor: pointer;
}

.recover-modal {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(7, 22, 40, .66);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: var(--t);
}

.recover-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.recover-panel {
    position: relative;
    width: min(440px, 100%);
    padding: 26px;
    border-radius: 22px;
    background: var(--white);
    border: 1px solid var(--border);
    box-shadow: 0 26px 80px rgba(15, 35, 60, .28);
}

.recover-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 10px;
    background: #eef4fb;
    color: var(--ink-700);
    cursor: pointer;
}

.recover-icon {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: var(--ink-100);
    color: var(--ink-700);
    font-size: 1.2rem;
    margin-bottom: 13px;
}

.recover-eyebrow {
    margin: 0 0 4px;
    color: var(--ink-600);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.recover-panel h3 {
    margin: 0 0 8px;
    color: var(--text-1);
    font-size: 1.28rem;
}

.recover-text,
.recover-choice span,
.recover-step small {
    color: var(--text-2);
    font-size: .82rem;
    line-height: 1.5;
}

.recover-form {
    display: grid;
    gap: 13px;
    margin-top: 16px;
}

.recover-step {
    display: grid;
    gap: 8px;
}

.recover-step label {
    color: var(--text-1);
    font-size: .82rem;
    font-weight: 700;
}

.recover-step input {
    height: 44px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 0 13px;
    color: var(--text-1);
}

.recover-choice {
    display: grid;
    gap: 6px;
    padding: 14px;
    border-radius: 14px;
    background: #effaf3;
    color: #14532d;
    border: 1px solid #bce9c9;
}

.recover-error {
    min-height: 18px;
    color: #b42331;
    font-size: .78rem;
}

.recover-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
}

.recover-actions .btn-primary,
.recover-actions .btn-secondary {
    width: auto;
    min-width: 130px;
    padding: 0 16px;
}

/* ── Footer ── */
.login-footer {
    margin-top: 16px;
    text-align: center;
    font-size: .685rem;
    color: var(--text-3);
}
.login-footer a {
    color: var(--ink-600);
    text-decoration: none;
    font-weight: 500;
}
.login-footer a:hover { text-decoration: underline; }

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 960px) {
    .brand-side { flex:1; padding:36px 36px; }
    .brand-side h1 { font-size:1.45rem; }
}

@media (max-width: 768px) {
    body { overflow-y:auto; height:auto; }
    .brand-side { display:none; }
    .form-side {
        padding: 36px 20px 48px;
        align-items: flex-start;
        min-height: 100vh;
    }
    .login-box-container { max-width:100%; }
}

@media (max-width: 400px) {
    .login-header h2 { font-size:1.45rem; }
    .input-48 { height:42px; }
    .btn-primary { height:42px; }
    .login-captcha { grid-template-columns: 1fr; }
    .login-captcha button { width: 100%; }
    .recover-actions { flex-direction: column; }
    .recover-actions .btn-primary,
    .recover-actions .btn-secondary { width: 100%; }
}

@media (prefers-reduced-motion:reduce) {
    *, *::before, *::after {
        animation-duration:.01ms !important;
        transition-duration:.01ms !important;
    }
}

:focus-visible {
    outline: 2px solid var(--ink-600);
    outline-offset: 2px;
}

