/* ============================================================
   AUTH — Login screen (full page, split layout)
   Shown when there's no valid session; hides the rest of the panel.
   ============================================================ */

/* Body modifier: when login is showing we hide the rest. */
body.auth-active > header,
body.auth-active > main,
body.auth-active > .footer,
body.auth-active #app-loader,
body.auth-active > #appVersion { display: none !important; }

.auth-screen {
    position: fixed;
    inset: 0;
    background: var(--brand-cream-soft);
    z-index: 100;
    overflow: auto;
}
.auth-screen[hidden] { display: none; }

.auth-split {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

/* ----- Left side: brand circle ----- */
.auth-brand {
    background: var(--brand-cream-gold);
    clip-path: polygon(0 0, 100% 0, 78% 100%, 0% 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.auth-circle {
    position: relative;
    width: min(440px, 80%);
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Outer ring with rotating text */
.auth-circle::before {
    content: '';
    position: absolute;
    inset: 15px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    opacity: 0.3;
}
/* Inner decorative ring (no text) — pushed further in so text sits in the middle of the donut */
.auth-circle::after {
    content: '';
    position: absolute;
    inset: 58px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    opacity: 0.3;
}

.auth-circle-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    animation: auth-circle-spin 40s linear infinite;
}
@keyframes auth-circle-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.auth-circle-text {
    font-family: 'Outfit', sans-serif;
    font-size: 7.5px;
    font-weight: 500;
    letter-spacing: 0.5em;
    fill: var(--charcoal);
    text-transform: uppercase;
    opacity: 0.3;
}

.auth-logo {
    text-align: center;
    z-index: 1;
    padding: 0 16px;
}
.auth-logo-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 44px;
    font-weight: 400;
    letter-spacing: 0.14em;
    color: var(--charcoal);
    line-height: 1;
}
/* "EVENTOS" with decorative lines on each side */
.auth-logo-sub {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-family: 'Outfit', sans-serif;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.5em;
    color: var(--charcoal);
    opacity: 0.65;
    margin-top: 8px;
    padding-left: 0.5em; /* compensa el letter-spacing del lado derecho */
}
.auth-logo-sub::before,
.auth-logo-sub::after {
    content: '';
    width: 22px;
    height: 1px;
    background: var(--charcoal);
    opacity: 0.4;
}
.auth-logo-divider {
    width: 90px;
    height: 1px;
    background: var(--gold);
    margin: 16px auto;
    opacity: 0.5;
}
/* "PANEL DE ADMINISTRACIÓN" with decorative lines on each side */
.auth-logo-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.28em;
    color: var(--charcoal);
    opacity: 0.65;
    text-transform: uppercase;
    padding-left: 0.28em;
}
.auth-logo-tag::before,
.auth-logo-tag::after {
    content: '';
    width: 18px;
    height: 1px;
    background: var(--charcoal);
    opacity: 0.4;
}

/* ----- Right side: form card ----- */
.auth-form-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    gap: 24px;
}

.auth-card {
    background: var(--white);
    border-radius: 18px;
    padding: 40px 44px;
    width: min(420px, 100%);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.05);
}

.auth-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 30px;
    font-weight: 500;
    color: var(--charcoal);
    text-align: center;
    margin: 0 0 4px;
}
.auth-subtitle {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    font-weight: 300;
    margin: 0 0 28px;
}

.auth-field { margin-bottom: 18px; }
.auth-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.16em;
    color: var(--muted);
    text-transform: uppercase;
    margin-bottom: 8px;
}
.auth-input {
    width: 100%;
    border: none;
    border-bottom: 1.5px solid var(--border);
    background: transparent;
    padding: 8px 0 10px 28px;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    color: var(--charcoal);
    outline: none;
    transition: border-color 0.2s;
    background-repeat: no-repeat;
    background-position: 0 center;
    background-size: 18px;
}
.auth-input:focus { border-bottom-color: var(--gold); }
.auth-input::placeholder { color: var(--border); font-weight: 300; }

/* SVG icons inline so we don't need extra files. */
.auth-input.auth-input-email {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23B8960C' viewBox='0 0 24 24' stroke-width='1.5'><path stroke-linecap='round' stroke-linejoin='round' d='M21.75 6.75v10.5a2.25 2.25 0 0 1-2.25 2.25h-15a2.25 2.25 0 0 1-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25m19.5 0v.243a2.25 2.25 0 0 1-1.07 1.916l-7.5 4.615a2.25 2.25 0 0 1-2.36 0L3.32 8.91a2.25 2.25 0 0 1-1.07-1.916V6.75'/></svg>");
}
.auth-input.auth-input-password {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23B8960C' viewBox='0 0 24 24' stroke-width='1.5'><path stroke-linecap='round' stroke-linejoin='round' d='M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z'/></svg>");
}

.auth-password-wrap {
    position: relative;
}
.auth-password-toggle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted);
    font-size: 16px;
    padding: 4px;
    opacity: 0.55;
    transition: opacity 0.2s;
}
.auth-password-toggle:hover { opacity: 1; }

.auth-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin: 4px 0 18px;
}
.auth-forgot {
    font-size: 12px;
    color: var(--gold);
    text-decoration: none;
    font-weight: 500;
}
.auth-forgot:hover { text-decoration: underline; }

.auth-error {
    background: var(--red-bg);
    color: var(--red);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 14px;
    text-align: center;
}

.auth-submit {
    width: 100%;
    background: var(--gold);
    color: var(--white);
    border: none;
    border-radius: 10px;
    padding: 14px;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.2em;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.auth-submit:hover:not(:disabled) { background: #a78605; }
.auth-submit:active { transform: scale(0.99); }
.auth-submit:disabled { opacity: 0.55; cursor: not-allowed; }

.auth-footer {
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 300;
}

/* ----- Logout button in nav (right side of Administrador tab) ----- */
.nav-logout {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 14px;
    margin-left: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    white-space: nowrap;
    letter-spacing: 0.02em;
    transition: border-color 0.2s, color 0.2s;
}
.nav-logout:hover { border-color: var(--red); color: var(--red); }
.nav-logout svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ----- Responsive ----- */
@media (max-width: 880px) {
    .auth-split { grid-template-columns: 1fr; }
    .auth-brand {
        clip-path: none;
        min-height: 280px;
        padding: 30px 20px;
    }
    .auth-circle { width: 240px; }
    .auth-logo-name { font-size: 32px; }
    .auth-form-side { padding: 30px 20px; }
    .auth-card { padding: 30px 24px; }
}
