/* ================== VARIABLES / TOKENS ================== */
:root{
    --navy-900:#0D1B2A;
    --navy-800:#12263A;
    --navy-700:#15304A;
    --ink-900:#0B0E12;

    --gold-500:#D4AF37;
    --gold-600:#C49B22;
    --gold-300:#E8D07A;

    --emerald-500:#00A86B;
    --emerald-400:#27C28A;

    --gray-100:#F7F7F8;
    --gray-300:#E5E7EB;
    --gray-500:#9CA3AF;
    --gray-700:#374151;

    --bg:#0E141B;
    --bg-2:#0F1A27;
    --surface:#121D2A;
    --surface-2:#162433;
    --text:#F5F7FA;
    --muted:#C9D2DC;

    --radius:16px;
    --shadow-lg:0 20px 40px rgba(0,0,0,.35);

    --fz-xs:.825rem;
    --fz-sm:.925rem;
    --fz-md:1rem;
    --fz-lg:1.125rem;
    --fz-3xl:2.25rem;

    --tt:.3s ease;
}

/* ================== RESET BASE ================== */
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
    font-family: 'Poppins', sans-serif;
    background:
    radial-gradient(1200px 600px at 15% 15%, rgba(212,175,55,.18), transparent 60%),
    radial-gradient(900px 500px at 85% 10%, rgba(0,168,107,.16), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
    color:var(--text);
    line-height:1.6;
    min-height:100svh;
    display:grid;
    place-items:center;
    padding:24px;
}
a{color:inherit;text-decoration:none}

/* ================== CONTENEDOR CENTRADO ================== */
.login-container{
    width:100%;
    max-width: 460px; /* caja compacta y legible */
    margin-inline:auto;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    min-height: calc(100svh - 48px); /* compensa padding body */
}

/* ================== LOGIN BOX ================== */
.login-box{
    width:100%;
    background:linear-gradient(180deg,var(--surface),var(--surface-2));
    border:1px solid rgba(255,255,255,.06);
    border-radius:var(--radius);
    padding:28px;
    box-shadow:var(--shadow-lg);
    position:relative;
    overflow:hidden;
}
.login-box::before{
    content:"";
    position:absolute;left:-60px;bottom:-60px;width:180px;height:180px;border-radius:50%;
    background:radial-gradient(100px 100px at 50% 50%, rgba(0,168,107,.25), transparent 70%);
    filter:blur(.4px);
}

/* ================== HEADER ================== */
.login-header{
    display:flex;flex-direction:column;gap:8px;margin-bottom:14px;
}
.logo{display:flex;align-items:center;gap:12px}
.logo-mark{
    width:56px;height:56px;border-radius:14px;
    background:radial-gradient(100% 100% at 30% 20%,var(--gold-500),#8a6a08);
    box-shadow:0 10px 28px rgba(212,175,55,.35), inset 0 1px 0 rgba(255,255,255,.2);
}
.logo-img{
    width:56px;height:56px;border-radius:14px;
    background:radial-gradient(100% 100% at 30% 20%,var(--gold-500),#8a6a08);
    box-shadow:0 10px 28px rgba(212,175,55,.35), inset 0 1px 0 rgba(255,255,255,.2);
}
.tag{color:var(--gold-500);font-weight:700;font-size:var(--fz-sm);letter-spacing:.5px}
.login-header h2{
    font-family:"Playfair Display", serif;font-size:var(--fz-3xl);line-height:1.1;
}
.login-header p{color:var(--muted)}

/* ================== MENSAJES ================== */
.message-display{
    display:none;
    margin:12px 0 14px;
    padding:12px 14px;
    border-radius:12px;
    font-size:var(--fz-sm);
    border:1px solid transparent;
}
.message-display.error{
    display:block;
    background:rgba(255,77,79,.1);
    border-color:rgba(255,77,79,.35);
    color:#FFB3B4;
}
.message-display.success{
    display:block;
    background:rgba(0,168,107,.12);
    border-color:rgba(0,168,107,.35);
    color:var(--emerald-400);
}

/* ================== FORM ================== */
.login-form{margin-top:4px}
.form-group{display:flex;flex-direction:column;gap:8px;margin:12px 0}
.form-group label{font-size:.92rem;color:var(--muted)}
.form-group input{
    background:rgba(255,255,255,.06);
    border:1px solid rgba(255,255,255,.14);
    color:#fff;border-radius:12px;padding:12px 14px;outline:none;
    transition:border-color var(--tt), box-shadow var(--tt);
    width:100%;
}
.form-group input::placeholder{color:#aeb6c2}
.form-group input:focus{
    border-color:rgba(212,175,55,.6);
    box-shadow:0 0 0 4px rgba(212,175,55,.12);
}

/* Password con icono */
.password-input-wrapper{position:relative;display:flex;align-items:center}
.password-input-wrapper input{padding-right:44px}
.toggle-password{
    position:absolute;right:10px;display:grid;place-items:center;
    width:36px;height:36px;border-radius:10px;cursor:pointer;
    color:var(--muted);transition:var(--tt);border:none;background:transparent;
}
.toggle-password:hover{color:#fff; background:rgba(255,255,255,.06)}

/* Opciones */
.form-options{
    margin:6px 0 12px;
    display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;
}
.remember-me{display:flex;align-items:center;gap:10px}
.remember-me input{
    appearance:none;width:18px;height:18px;border-radius:4px;
    border:1px solid rgba(255,255,255,.2);background:rgba(255,255,255,.06);
    display:grid;place-items:center;transition:var(--tt);
}
.remember-me input:checked{
    background:linear-gradient(135deg,var(--gold-500),var(--gold-600));
    border-color:rgba(212,175,55,.8);
}
.remember-me input:checked::after{
    content:"\f00c"; /* fa-check */
    font-family:"Font Awesome 6 Free";font-weight:900;font-size:.8rem;color:#1a1200;
}
.remember-me label{cursor:pointer;color:#e2e8f0;font-size:var(--fz-sm)}

.forgot-password{
    color:var(--gold-300);font-weight:600;font-size:var(--fz-sm);position:relative;
}
.forgot-password::after{
    content:"";position:absolute;left:0;bottom:-4px;height:2px;width:0;background:var(--gold-500);
    transition:var(--tt)
}
.forgot-password:hover::after{width:100%}

/* Botón */
.btn{
    display:inline-flex;align-items:center;gap:10px;
    padding:12px 20px;border-radius:9999px;
    font-weight:700;letter-spacing:.3px;border:2px solid transparent;
    cursor:pointer;transition:var(--tt);text-transform:uppercase;font-size:var(--fz-sm)
}
.btn-primary{
    background:linear-gradient(135deg,var(--gold-500),var(--gold-600));
    color:#1a1200; box-shadow:0 6px 20px rgba(212,175,55,.35)
}
.btn-primary:hover{transform:translateY(-2px);filter:saturate(1.05)}
.login-button{width:100%;justify-content:center;margin-top:6px}

/* Pie mini */
.mini-footer{text-align:center;color:var(--muted);font-size:var(--fz-xs);margin-top:14px}

/* Responsivo (la caja ya se adapta por max-width) */
@media (max-width: 380px){
    .login-box{padding:22px}
    .logo-mark{width:48px;height:48px}
    .logo-img{width:48px;height:48px}
}

h1,h2,h3 { font-family: 'Poppins', sans-serif; }