/* Quiz XP — Auth experience */

:root {
    --auth-yellow: #ffc107;
    --auth-yellow-deep: #f5a623;
    --auth-yellow-shadow: #e09400;
    --auth-ink: #0a0a0a;
    --auth-ink-soft: #1a1a1a;
    --auth-panel: #f7f7f5;
    --auth-surface: #ffffff;
    --auth-border: #d9d9d4;
    --auth-muted: #5c5c5c;
}

.admin-auth-body {
    margin: 0;
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--auth-ink);
    background: var(--auth-panel);
}

.admin-auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
}

.admin-auth-hero {
    position: relative;
    overflow: hidden;
    background: var(--auth-yellow);
    display: flex;
    align-items: flex-end;
    padding: clamp(2rem, 5vw, 4.5rem);
}

.admin-auth-geometry {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.admin-auth-geometry__beam {
    position: absolute;
    display: block;
}

.admin-auth-geometry__beam--light {
    width: 85%;
    height: 130%;
    top: -18%;
    left: -18%;
    background: linear-gradient(
        118deg,
        rgba(255, 255, 255, 0.98) 0%,
        rgba(255, 255, 255, 0.72) 28%,
        rgba(255, 255, 255, 0.08) 52%,
        transparent 58%
    );
    clip-path: polygon(0 0, 62% 0, 34% 100%, 0 100%);
    transform: rotate(-7deg);
    animation: authBeamIn 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.admin-auth-geometry__beam--shade {
    width: 70%;
    height: 120%;
    right: -12%;
    bottom: -25%;
    background: linear-gradient(
        145deg,
        transparent 35%,
        rgba(224, 148, 0, 0.35) 55%,
        rgba(224, 148, 0, 0.65) 100%
    );
    clip-path: polygon(35% 0, 100% 0, 100% 100%, 0 100%);
    animation: authShadeIn 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

.admin-auth-geometry__grain {
    position: absolute;
    inset: 0;
    opacity: 0.08;
    background-image: radial-gradient(circle at 20% 20%, #000 0.6px, transparent 0.6px);
    background-size: 4px 4px;
}

.admin-auth-hero__content {
    position: relative;
    z-index: 1;
    max-width: 34rem;
    animation: authHeroIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.admin-auth-logo {
    display: block;
    width: min(220px, 58vw);
    height: auto;
    margin-bottom: 2rem;
}

.admin-auth-headline {
    margin: 0;
    font-family: 'Syne', 'Inter', sans-serif;
    font-size: clamp(2.5rem, 5.5vw, 4.25rem);
    font-weight: 800;
    line-height: 0.88;
    letter-spacing: -0.045em;
    color: var(--auth-ink);
    text-transform: uppercase;
}

.admin-auth-headline span {
    display: block;
}

.admin-auth-tagline {
    margin: 1.5rem 0 0;
    max-width: 22rem;
    font-size: clamp(1rem, 2vw, 1.125rem);
    font-weight: 500;
    line-height: 1.55;
    color: rgba(10, 10, 10, 0.78);
}

.admin-auth-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem 1.5rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(10, 10, 10, 0.12);
}

.admin-auth-stat {
    min-width: 0;
}

.admin-auth-stat strong {
    display: block;
    font-family: 'Syne', 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
}

.admin-auth-stat span {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(10, 10, 10, 0.62);
}

.admin-auth-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 4vw, 3rem);
    background:
        radial-gradient(circle at top right, rgba(255, 193, 7, 0.08), transparent 28%),
        var(--auth-panel);
}

.admin-auth-form-wrap {
    width: 100%;
    max-width: 26rem;
    animation: authPanelIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.admin-auth-form-header {
    margin-bottom: 2rem;
}

.admin-auth-eyebrow {
    display: inline-block;
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--auth-muted);
}

.admin-auth-form-title {
    margin: 0;
    font-family: 'Syne', 'Inter', sans-serif;
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.04em;
    color: var(--auth-ink);
}

.admin-auth-form-subtitle {
    margin: 0.75rem 0 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--auth-muted);
}

.admin-auth-alert {
    margin-bottom: 1.25rem;
    padding: 0.875rem 1rem;
    border-left: 4px solid #dc2626;
    background: #fef2f2;
    color: #991b1b;
    font-size: 0.875rem;
    font-weight: 500;
}

.admin-auth-field {
    margin-bottom: 1.25rem;
}

.admin-auth-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--auth-ink-soft);
}

.admin-auth-input {
    width: 100%;
    padding: 0.95rem 1rem;
    border: 2px solid var(--auth-border);
    border-radius: 0;
    background: var(--auth-surface);
    color: var(--auth-ink);
    font-size: 1rem;
    font-weight: 500;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.admin-auth-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.admin-auth-input:focus {
    outline: none;
    border-color: var(--auth-ink);
    box-shadow: 4px 4px 0 rgba(10, 10, 10, 0.12);
    transform: translate(-1px, -1px);
}

.admin-auth-input.is-invalid {
    border-color: #dc2626;
}

.admin-auth-invalid {
    margin-top: 0.45rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #dc2626;
}

.admin-auth-submit {
    width: 100%;
    margin-top: 0.5rem;
    padding: 1rem 1.25rem;
    border: 2px solid var(--auth-ink);
    background: var(--auth-ink);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.admin-auth-submit:hover {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(10, 10, 10, 0.18);
}

.admin-auth-submit:active {
    transform: translateY(0);
    box-shadow: none;
}

.admin-auth-links {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.admin-auth-link {
    color: var(--auth-ink);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(10, 10, 10, 0.25);
    transition: border-color 0.18s ease;
}

.admin-auth-link:hover {
    border-bottom-color: var(--auth-ink);
}

.admin-auth-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--auth-muted);
}

.admin-password-input-wrap {
    position: relative;
}

.admin-password-input-wrap .admin-password-input {
    padding-right: 2.85rem;
}

.admin-password-toggle {
    position: absolute;
    top: 50%;
    right: 0.55rem;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: none;
    background: transparent;
    color: rgba(10, 10, 10, 0.45);
    cursor: pointer;
    border-radius: 6px;
    transition: color 0.15s ease, background 0.15s ease;
}

.admin-password-toggle:hover {
    color: var(--auth-ink);
    background: rgba(10, 10, 10, 0.06);
}

.admin-password-toggle:focus-visible {
    outline: 2px solid var(--auth-ink);
    outline-offset: 2px;
}

@keyframes authBeamIn {
    from {
        opacity: 0;
        transform: translateX(-6%) rotate(-7deg);
    }

    to {
        opacity: 1;
        transform: translateX(0) rotate(-7deg);
    }
}

@keyframes authShadeIn {
    from {
        opacity: 0;
        transform: translateX(6%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes authHeroIn {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes authPanelIn {
    from {
        opacity: 0;
        transform: translateX(18px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 991.98px) {
    .admin-auth-page {
        grid-template-columns: 1fr;
    }

    .admin-auth-hero {
        min-height: 42vh;
        align-items: flex-end;
        padding: 2rem 1.5rem;
    }

    .admin-auth-headline {
        font-size: clamp(2.25rem, 10vw, 3.25rem);
    }

    .admin-auth-stats {
        display: none;
    }

    .admin-auth-panel {
        padding: 2rem 1.5rem 2.5rem;
    }
}

@media (max-width: 575.98px) {
    .admin-auth-hero {
        min-height: 36vh;
    }

    .admin-auth-logo {
        width: min(180px, 52vw);
        margin-bottom: 1.5rem;
    }
}
