/**
 * Pawn Shop Management System — Authentication UI
 * Colors: Primary #1E3A8A | Secondary #4F46E5 | Accent #F59E0B
 */

:root {
    --auth-primary: #1E3A8A;
    --auth-primary-dark: #172554;
    --auth-secondary: #4F46E5;
    --auth-accent: #F59E0B;
    --auth-gold-deep: #78350F;
    --auth-gold-dark: #92400E;
    --auth-gold-mid: #B45309;
    --auth-gold: #D97706;
    --auth-gold-bright: #F59E0B;
    --auth-gold-light: #FBBF24;
    --auth-gold-pale: #FEF3C7;
    --auth-gold-cream: #FFFBEB;
    --auth-bg: #FFFBEB;
    --auth-text: #0F172A;
    --auth-text-muted: #64748B;
    --auth-card-bg: #ffffff;
    --auth-border: #E2E8F0;
    --auth-input-bg: #ffffff;
    --auth-glass: rgba(255, 255, 255, 0.12);
    --auth-glass-border: rgba(255, 255, 255, 0.25);
    --auth-shadow: 0 25px 50px -12px rgba(120, 53, 15, 0.15);
    --auth-radius: 1rem;
    --auth-radius-lg: 1.5rem;
    --auth-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --auth-backdrop-image: url('../images/auth-backdrop.png');
}

[data-theme="dark"] {
    --auth-bg: #1C1410;
    --auth-text: #FEF3C7;
    --auth-text-muted: #D6B88A;
    --auth-card-bg: #292018;
    --auth-border: #4A3728;
    --auth-input-bg: #1C1410;
    --auth-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Page load animation */
.auth-page {
    position: relative;
    min-height: 100vh;
    background: #1a1208;
    color: var(--auth-text);
    opacity: 0;
    transition: opacity 0.5s ease;
    overflow: hidden;
}

.auth-page.auth-loaded {
    opacity: 1;
}

/* ─── Page backdrop — pawn shop photo ─── */
.auth-page__backdrop {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.auth-page__photo {
    position: absolute;
    inset: 0;
    background: var(--auth-backdrop-image) center center / cover no-repeat;
    transform: scale(1.03);
    animation: authPhotoKenBurns 24s ease-in-out infinite alternate;
}

@keyframes authPhotoKenBurns {
    0%   { transform: scale(1.03) translate(0, 0); }
    100% { transform: scale(1.08) translate(-1%, -0.5%); }
}

.auth-page__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(160deg,
            rgba(66, 32, 6, 0.72) 0%,
            rgba(28, 20, 8, 0.55) 40%,
            rgba(120, 53, 15, 0.65) 100%);
}

[data-theme="dark"] .auth-page__overlay {
    background:
        linear-gradient(160deg,
            rgba(0, 0, 0, 0.78) 0%,
            rgba(66, 32, 6, 0.62) 45%,
            rgba(0, 0, 0, 0.72) 100%);
}

.auth-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding: 1rem;
}

@media (min-width: 768px) {
    .auth-shell { padding: 1.5rem; }
}

@media (min-width: 992px) {
    .auth-shell { padding: 2rem; }
}

/* ─── 3D scene wrapper: gives the card perspective ─── */
.auth-scene {
    perspective: 1600px;
    perspective-origin: 50% 40%;
}

/* Main card */
.auth-card {
    position: relative;
    background: rgba(255, 255, 255, 0.97);
    border-radius: var(--auth-radius-lg);
    box-shadow:
        0 32px 64px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.15);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.25);
    max-width: 1140px;
    margin: 0 auto;
    animation: authCardEnter3d 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform-style: preserve-3d;
    will-change: transform;
}

/* JS-driven pointer tilt (variables set in auth.js) */
.auth-card.auth-card--tilt {
    animation: none;
    transform:
        rotateX(var(--tilt-x, 0deg))
        rotateY(var(--tilt-y, 0deg))
        translateZ(0);
    transition: transform 0.18s ease-out;
}

/* Moving light reflection that follows the pointer */
.auth-card__glare {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(
        520px circle at var(--glare-x, 50%) var(--glare-y, 50%),
        rgba(255, 255, 255, 0.22) 0%,
        rgba(255, 214, 130, 0.08) 35%,
        transparent 65%
    );
    transition: opacity 0.35s ease;
}

.auth-card--tilt .auth-card__glare {
    opacity: 1;
}

@keyframes authCardEnter3d {
    0% {
        opacity: 0;
        transform: rotateX(28deg) rotateY(-10deg) translateY(72px) translateZ(-180px) scale(0.92);
    }
    55% {
        opacity: 1;
    }
    75% {
        transform: rotateX(-4deg) rotateY(2deg) translateY(-6px) translateZ(12px) scale(1.005);
    }
    100% {
        opacity: 1;
        transform: rotateX(0) rotateY(0) translateY(0) translateZ(0) scale(1);
    }
}

/* Content layers rise with a slight depth stagger after the card lands */
.auth-card .auth-form-header,
.auth-card .auth-form,
.auth-card .auth-divider,
.auth-card .auth-btn-outline,
.auth-card .auth-customer-note,
.auth-card .auth-ticket-result {
    opacity: 0;
    animation: authContentRise3d 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.auth-card .auth-form-header    { animation-delay: 0.28s; }
.auth-card .auth-form           { animation-delay: 0.4s; }
.auth-card .auth-ticket-result  { animation-delay: 0.46s; }
.auth-card .auth-divider        { animation-delay: 0.52s; }
.auth-card .auth-btn-outline    { animation-delay: 0.6s; }
.auth-card .auth-customer-note  { animation-delay: 0.68s; }

@keyframes authContentRise3d {
    from {
        opacity: 0;
        transform: translateY(18px) translateZ(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0) translateZ(0);
    }
}

/* ─── Floating 3D props in the backdrop ─── */
.auth-3d-field {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    will-change: transform;
    transition: transform 0.25s ease-out;
}

.auth-3d-field--far  { filter: blur(2px); opacity: 0.5; }
.auth-3d-field--near { opacity: 0.75; }

.auth-3d-shape {
    position: absolute;
    left: var(--x, 50%);
    top: var(--y, 50%);
    width: var(--size, 80px);
    height: var(--size, 80px);
    animation: auth3dDrift var(--dur, 16s) ease-in-out var(--delay, 0s) infinite alternate;
    transform-style: preserve-3d;
}

/* Gold ring */
.auth-3d-shape--ring {
    border-radius: 50%;
    border: 6px solid rgba(245, 158, 11, 0.55);
    box-shadow:
        inset 0 0 22px rgba(255, 200, 90, 0.35),
        0 0 34px rgba(245, 158, 11, 0.25);
}

/* Gem: rotated square with facet gradient */
.auth-3d-shape--gem {
    border-radius: 18%;
    background: linear-gradient(135deg,
        rgba(255, 214, 130, 0.85) 0%,
        rgba(245, 158, 11, 0.55) 45%,
        rgba(146, 64, 14, 0.65) 100%);
    box-shadow: 0 0 38px rgba(245, 158, 11, 0.3);
    transform: rotate(45deg);
}

/* Coin */
.auth-3d-shape--coin {
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%,
        rgba(255, 226, 150, 0.95) 0%,
        rgba(245, 158, 11, 0.8) 55%,
        rgba(146, 64, 14, 0.85) 100%);
    box-shadow:
        inset 0 0 0 6px rgba(255, 255, 255, 0.18),
        0 0 30px rgba(245, 158, 11, 0.35);
}

.auth-3d-shape--spin {
    animation:
        auth3dDrift var(--dur, 16s) ease-in-out var(--delay, 0s) infinite alternate,
        auth3dSpin 6s linear infinite;
}

@keyframes auth3dDrift {
    0%   { transform: translate3d(0, 0, 0) rotateX(0deg) rotateY(0deg); }
    50%  { transform: translate3d(14px, -26px, 40px) rotateX(24deg) rotateY(38deg); }
    100% { transform: translate3d(-12px, 18px, -30px) rotateX(-18deg) rotateY(-30deg); }
}

@keyframes auth3dSpin {
    from { rotate: y 0deg; }
    to   { rotate: y 360deg; }
}

[data-theme="dark"] .auth-card {
    background: rgba(28, 20, 16, 0.92);
    border-color: rgba(245, 158, 11, 0.15);
    box-shadow:
        0 32px 64px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(245, 158, 11, 0.08);
}

@keyframes authSlideUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── Brand panel (left) — photo + glass ─── */
.auth-brand {
    position: relative;
    color: #fff;
    overflow: hidden;
    min-height: 280px;
    isolation: isolate;
}

/* Shop photo (left column crop) */
.auth-brand__photo {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: var(--auth-backdrop-image) center center / cover no-repeat;
    background-position: 30% center;
}

/* Gold glass overlay for text readability */
.auth-brand__base {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(155deg,
            rgba(66, 32, 6, 0.82) 0%,
            rgba(120, 53, 15, 0.65) 40%,
            rgba(28, 20, 8, 0.75) 100%);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* Warm gold mesh highlight */
.auth-brand__mesh {
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        radial-gradient(ellipse 80% 60% at 0% 100%, rgba(251, 191, 36, 0.35) 0%, transparent 55%),
        radial-gradient(ellipse 60% 50% at 100% 0%, rgba(254, 243, 199, 0.2) 0%, transparent 50%);
    mix-blend-mode: soft-light;
    opacity: 0.85;
    pointer-events: none;
}

/* Dot pattern */
.auth-brand__pattern {
    position: absolute;
    inset: 0;
    z-index: 3;
    opacity: 0.2;
    background-image: radial-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: linear-gradient(to bottom, black 0%, black 60%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black 60%, transparent 100%);
}

/* Diagonal shimmer sweep */
.auth-brand__shimmer {
    position: absolute;
    inset: -50%;
    z-index: 4;
    background: linear-gradient(
        105deg,
        transparent 40%,
        rgba(255, 255, 255, 0.06) 48%,
        rgba(255, 255, 255, 0.14) 50%,
        rgba(255, 255, 255, 0.06) 52%,
        transparent 60%
    );
    animation: authShimmer 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes authShimmer {
    0%, 100% { transform: translateX(-30%) rotate(0deg); opacity: 0.6; }
    50%       { transform: translateX(30%) rotate(0deg); opacity: 1; }
}

/* Edge vignette */
.auth-brand__vignette {
    position: absolute;
    inset: 0;
    z-index: 5;
    background:
        linear-gradient(to right, rgba(0,0,0,0.35) 0%, transparent 40%),
        linear-gradient(to top, rgba(0,0,0,0.45) 0%, transparent 50%);
    pointer-events: none;
}

.auth-brand__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    z-index: 6;
    animation: authOrbPulse 10s ease-in-out infinite;
    opacity: 0.5;
}

.auth-brand__orb--1 {
    width: 300px; height: 300px;
    top: -90px; right: -70px;
    background: rgba(251, 191, 36, 0.5);
    animation-delay: 0s;
}

.auth-brand__orb--2 {
    width: 220px; height: 220px;
    bottom: 18%; left: -50px;
    background: rgba(254, 243, 199, 0.4);
    animation-delay: -3s;
}

.auth-brand__orb--3 {
    width: 160px; height: 160px;
    top: 45%; right: 10%;
    background: rgba(245, 158, 11, 0.45);
    animation-delay: -6s;
}

@keyframes authOrbPulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50%       { transform: scale(1.12); opacity: 1; }
}

/* Floating icon watermarks — subtle over photo */
.auth-brand__floats {
    position: absolute;
    inset: 0;
    z-index: 7;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.45;
}

.auth-brand__float {
    position: absolute;
    font-size: clamp(3rem, 8vw, 5rem);
    color: rgba(255, 255, 255, 0.06);
    filter: blur(0.5px);
    animation: authFloatDrift 14s ease-in-out infinite;
}

.auth-brand__float--1 { top: 12%; right: 8%;  animation-delay: 0s;    font-size: 4.5rem; color: rgba(254,243,199,0.15); }
.auth-brand__float--2 { top: 55%; right: 18%; animation-delay: -4s;  font-size: 3.5rem; color: rgba(255,255,255,0.08); }
.auth-brand__float--3 { bottom: 28%; left: 5%; animation-delay: -8s;  font-size: 3rem; }
.auth-brand__float--4 { top: 30%; left: 12%;  animation-delay: -2s;  font-size: 2.75rem; color: rgba(254,243,199,0.12); }
.auth-brand__float--5 { bottom: 12%; right: 30%; animation-delay: -10s; font-size: 4rem; transform: rotate(-25deg); color: rgba(255,255,255,0.07); }

@keyframes authFloatDrift {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%       { transform: translateY(-14px) rotate(4deg); }
}

.auth-brand__content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 2rem;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

@media (min-width: 992px) {
    .auth-brand { min-height: 100%; }
    .auth-brand__content { padding: 2.5rem; min-height: 640px; }
}

/* Logo */
.auth-logo {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.auth-logo__icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--auth-accent) 0%, #D97706 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 8px 24px rgba(245, 158, 11, 0.4),
        0 0 0 4px rgba(245, 158, 11, 0.15);
    flex-shrink: 0;
    position: relative;
}

.auth-logo__icon::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px solid rgba(245, 158, 11, 0.3);
    animation: authLogoRing 3s ease-in-out infinite;
}

@keyframes authLogoRing {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50%       { transform: scale(1.08); opacity: 1; }
}

.auth-logo__icon i {
    font-size: 1.35rem;
    color: var(--auth-gold-deep);
}

.auth-logo__icon--brand {
    background: transparent;
    box-shadow: none;
    border-radius: 0.75rem;
    overflow: hidden;
}

.auth-logo__icon--brand::after {
    display: none;
}

.auth-logo__icon--brand img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.auth-logo__title {
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

.auth-logo__subtitle {
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    margin: 0.15rem 0 0;
}

/* Welcome copy */
.auth-brand__welcome {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 0;
}

.auth-brand__headline {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
}

.auth-brand__tagline {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.82);
    max-width: 22rem;
    margin: 0;
}

/* Asset showcase — glass over photo */
.auth-assets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.625rem;
    margin-top: auto;
}

@media (max-width: 991px) {
    .auth-brand__photo {
        background-position: center 30%;
    }

    .auth-assets {
        display: none;
    }
}

.auth-asset {
    background: linear-gradient(145deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.05) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 0.75rem;
    padding: 0.625rem 0.5rem;
    text-align: center;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: transform var(--auth-transition), background var(--auth-transition), box-shadow var(--auth-transition);
    animation: authAssetIn 0.6s ease backwards;
}

.auth-asset--1 { animation-delay: 0.1s; }
.auth-asset--2 { animation-delay: 0.15s; }
.auth-asset--3 { animation-delay: 0.2s; }
.auth-asset--4 { animation-delay: 0.25s; }
.auth-asset--5 { animation-delay: 0.3s; }
.auth-asset--6 { animation-delay: 0.35s; }

@keyframes authAssetIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.auth-asset:hover {
    transform: translateY(-4px) scale(1.02);
    background: linear-gradient(145deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.08) 100%);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.auth-asset i {
    font-size: 1.25rem;
    color: #FEF3C7;
    display: block;
    margin-bottom: 0.25rem;
    filter: drop-shadow(0 2px 6px rgba(66, 32, 6, 0.5));
}

.auth-asset span {
    font-size: 0.625rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.2;
}

/* Hero showcase strip */
.auth-assets__hero {
    grid-column: 1 / -1;
    position: relative;
    border-radius: 0.875rem;
    overflow: hidden;
    margin-top: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    height: 120px;
    background: linear-gradient(135deg,
        rgba(255,255,255,0.12) 0%,
        rgba(251,191,36,0.25) 35%,
        rgba(217,119,6,0.3) 70%,
        rgba(120,53,15,0.35) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
        0 12px 32px rgba(66, 32, 6, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.auth-assets__hero-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 80% at 50% 50%, rgba(251,191,36,0.4) 0%, transparent 65%);
    animation: authHeroGlow 4s ease-in-out infinite;
}

@keyframes authHeroGlow {
    0%, 100% { opacity: 0.6; }
    50%       { opacity: 1; }
}

.auth-assets__hero-icons {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    height: 100%;
    padding: 0 1rem;
}

.auth-assets__hero-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    animation: authHeroBob 3s ease-in-out infinite;
}

.auth-assets__hero-item i {
    font-size: 1.5rem;
    color: var(--auth-gold-pale);
    filter: drop-shadow(0 2px 8px rgba(66, 32, 6, 0.5));
}

.auth-assets__hero-item--1 { animation-delay: 0s; }
.auth-assets__hero-item--2 { animation-delay: -0.5s; width: 58px; height: 58px; }
.auth-assets__hero-item--2 i { font-size: 1.65rem; }
.auth-assets__hero-item--3 { animation-delay: -1s; }
.auth-assets__hero-item--4 { animation-delay: -1.5s; }

@keyframes authHeroBob {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-6px); }
}

@media (min-width: 992px) {
    .auth-assets__hero { height: 140px; }
    .auth-assets__hero-item { width: 58px; height: 58px; }
    .auth-assets__hero-item i { font-size: 1.65rem; }
    .auth-assets__hero-item--2 { width: 64px; height: 64px; }
    .auth-assets__hero-item--2 i { font-size: 1.85rem; }
}

/* ─── Form panel (right) ─── */
.auth-form-panel {
    padding: 1.75rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .auth-form-panel { padding: 2rem 2.5rem; }
}

@media (min-width: 992px) {
    .auth-form-panel { padding: 2.5rem 3rem; min-height: 640px; }
}

.auth-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.auth-toolbar__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--auth-text-muted);
    background: var(--auth-input-bg);
    border: 1px solid var(--auth-border);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all var(--auth-transition);
}

.auth-toolbar__btn:hover {
    border-color: var(--auth-secondary);
    color: var(--auth-secondary);
}

.auth-form-body {
    flex: 1;
    max-width: 420px;
    margin: 0 auto;
    width: 100%;
}

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

.auth-form-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--auth-text);
    margin: 0 0 0.375rem;
}

.auth-form-header p {
    font-size: 0.9375rem;
    color: var(--auth-text-muted);
    margin: 0;
}

/* Floating label inputs */
.auth-float-group {
    position: relative;
    margin-bottom: 1.25rem;
}

.auth-float-input {
    width: 100%;
    padding: 1.125rem 2.75rem 0.5rem 2.75rem;
    font-size: 0.9375rem;
    color: var(--auth-text);
    background: var(--auth-input-bg);
    border: 1.5px solid var(--auth-border);
    border-radius: var(--auth-radius);
    transition: border-color var(--auth-transition), box-shadow var(--auth-transition);
    outline: none;
}

.auth-float-input::placeholder {
    color: transparent;
}

.auth-float-input:focus {
    border-color: var(--auth-secondary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.auth-float-input.is-invalid {
    border-color: #EF4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.auth-float-label {
    position: absolute;
    left: 2.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9375rem;
    color: var(--auth-text-muted);
    pointer-events: none;
    transition: all var(--auth-transition);
    margin: 0;
}

.auth-float-input:focus ~ .auth-float-label,
.auth-float-input:not(:placeholder-shown) ~ .auth-float-label {
    top: 0.65rem;
    transform: translateY(0);
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--auth-secondary);
    letter-spacing: 0.02em;
}

.auth-float-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.125rem;
    color: var(--auth-text-muted);
    pointer-events: none;
    transition: color var(--auth-transition);
}

.auth-float-input:focus ~ .auth-float-icon {
    color: var(--auth-secondary);
}

.auth-float-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0.25rem;
    color: var(--auth-text-muted);
    cursor: pointer;
    border-radius: 0.375rem;
    transition: color var(--auth-transition);
}

.auth-float-toggle:hover {
    color: var(--auth-secondary);
}

.auth-field-error {
    font-size: 0.75rem;
    color: #EF4444;
    margin-top: 0.375rem;
    display: none;
}

.auth-field-error.visible {
    display: block;
}

/* Options row */
.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--auth-text-muted);
    margin: 0;
}

.auth-remember input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--auth-secondary);
}

.auth-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--auth-secondary);
    text-decoration: none;
    transition: color var(--auth-transition);
}

.auth-link:hover {
    color: var(--auth-primary);
}

.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--auth-text-muted);
    text-decoration: none;
    transition: color var(--auth-transition);
}

.auth-back-link:hover {
    color: var(--auth-secondary);
}

.auth-pill--staff {
    background: rgba(180, 83, 9, 0.12);
    border-color: rgba(180, 83, 9, 0.25);
    color: var(--auth-primary);
}

.auth-customer-note {
    margin: 1.5rem 0 0;
    font-size: 0.8125rem;
    color: var(--auth-text-muted);
    text-align: center;
    line-height: 1.5;
}

.auth-customer-note i {
    margin-right: 0.25rem;
    opacity: 0.85;
}

/* Primary button */
.auth-btn-submit {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(90deg, var(--auth-primary) 0%, var(--auth-secondary) 100%);
    border: none;
    border-radius: var(--auth-radius);
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.3);
    transition: transform var(--auth-transition), box-shadow var(--auth-transition), filter var(--auth-transition);
    position: relative;
    overflow: hidden;
}

.auth-btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(79, 70, 229, 0.4);
    filter: brightness(1.05);
}

.auth-btn-submit:active:not(:disabled) {
    transform: translateY(0);
}

.auth-btn-submit:disabled {
    opacity: 0.75;
    cursor: not-allowed;
}

.auth-btn-submit .spinner-border {
    width: 1.125rem;
    height: 1.125rem;
    border-width: 2px;
}

.auth-btn-submit .btn-text.hidden,
.auth-btn-submit .btn-spinner.hidden {
    display: none !important;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--auth-text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--auth-border);
}

/* Secondary button */
.auth-btn-outline {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8125rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--auth-text);
    background: var(--auth-input-bg);
    border: 1.5px solid var(--auth-border);
    border-radius: var(--auth-radius);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--auth-transition);
}

.auth-btn-outline:hover {
    border-color: var(--auth-secondary);
    color: var(--auth-secondary);
    background: rgba(79, 70, 229, 0.04);
}

.auth-btn-outline:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Alerts */
.auth-alert {
    border-radius: var(--auth-radius);
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
}

.auth-alert--success {
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    color: #065F46;
}

.auth-alert--error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #991B1B;
}

[data-theme="dark"] .auth-alert--success {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.3);
    color: #6EE7B7;
}

[data-theme="dark"] .auth-alert--error {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
    color: #FCA5A5;
}

/* Footer */
.auth-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    text-align: center;
}

.auth-footer__copy {
    font-size: 0.75rem;
    color: var(--auth-text-muted);
    margin: 0;
}

.auth-footer__version {
    font-size: 0.6875rem;
    color: var(--auth-text-muted);
    opacity: 0.7;
    margin-top: 0.25rem;
}

/* Mobile brand strip */
.auth-mobile-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--auth-border);
}

@media (min-width: 992px) {
    .auth-mobile-brand { display: none; }
}

/* Wider form area (ticket lookup) */
.auth-form-body--wide {
    max-width: 480px;
}

/* Customer self-service pill */
.auth-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.35rem 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--auth-gold-mid);
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 999px;
}

[data-theme="dark"] .auth-pill {
    color: var(--auth-gold-light);
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
}

.auth-field-hint {
    font-size: 0.6875rem;
    color: var(--auth-text-muted);
    margin: 0.375rem 0 0;
    padding-left: 0.25rem;
}

/* Ticket lookup result card */
.auth-ticket-result {
    margin-top: 1.75rem;
    padding: 1.25rem;
    border-radius: var(--auth-radius);
    background: linear-gradient(145deg, rgba(254, 243, 199, 0.35) 0%, rgba(255, 251, 235, 0.5) 100%);
    border: 1px solid rgba(217, 119, 6, 0.2);
    box-shadow: 0 8px 24px rgba(120, 53, 15, 0.08);
    animation: authSlideUp 0.5s ease forwards;
}

[data-theme="dark"] .auth-ticket-result {
    background: linear-gradient(145deg, rgba(66, 32, 6, 0.4) 0%, rgba(41, 32, 24, 0.6) 100%);
    border-color: rgba(245, 158, 11, 0.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.auth-ticket-result__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(217, 119, 6, 0.15);
}

.auth-ticket-result__label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--auth-text-muted);
    margin: 0 0 0.25rem;
}

.auth-ticket-result__number {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--auth-text);
    margin: 0;
    font-family: ui-monospace, monospace;
}

.auth-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
}

.auth-status-badge--gray   { background: #F1F5F9; color: #475569; }
.auth-status-badge--green  { background: #ECFDF5; color: #047857; }
.auth-status-badge--red    { background: #FEF2F2; color: #B91C1C; }
.auth-status-badge--yellow { background: #FFFBEB; color: #B45309; }
.auth-status-badge--orange { background: #FFF7ED; color: #C2410C; }
.auth-status-badge--blue   { background: #EFF6FF; color: #1D4ED8; }
.auth-status-badge--purple { background: #F5F3FF; color: #6D28D9; }

[data-theme="dark"] .auth-status-badge--gray   { background: rgba(148,163,184,0.2); color: #CBD5E1; }
[data-theme="dark"] .auth-status-badge--green  { background: rgba(16,185,129,0.2); color: #6EE7B7; }
[data-theme="dark"] .auth-status-badge--red    { background: rgba(239,68,68,0.2); color: #FCA5A5; }
[data-theme="dark"] .auth-status-badge--yellow { background: rgba(245,158,11,0.2); color: #FCD34D; }
[data-theme="dark"] .auth-status-badge--orange { background: rgba(249,115,22,0.2); color: #FDBA74; }
[data-theme="dark"] .auth-status-badge--blue   { background: rgba(59,130,246,0.2); color: #93C5FD; }
[data-theme="dark"] .auth-status-badge--purple { background: rgba(139,92,246,0.2); color: #C4B5FD; }

.auth-ticket-result__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.875rem 1rem;
}

.auth-ticket-result__item--full {
    grid-column: 1 / -1;
}

.auth-ticket-result__item--highlight {
    grid-column: 1 / -1;
    padding: 0.75rem 1rem;
    border-radius: 0.625rem;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(217, 119, 6, 0.2);
}

[data-theme="dark"] .auth-ticket-result__item--highlight {
    background: rgba(0, 0, 0, 0.2);
}

.auth-ticket-result__key {
    display: block;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--auth-text-muted);
    margin-bottom: 0.2rem;
}

.auth-ticket-result__val {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--auth-text);
    line-height: 1.4;
}

.auth-ticket-result__val--due {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--auth-gold-mid);
}

[data-theme="dark"] .auth-ticket-result__val--due {
    color: var(--auth-gold-light);
}

.auth-ticket-result__payments {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(217, 119, 6, 0.15);
}

.auth-ticket-result__payment-list {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
    font-size: 0.8125rem;
    color: var(--auth-text-muted);
}

.auth-ticket-result__payment-list li {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.375rem 0;
    border-bottom: 1px dashed rgba(217, 119, 6, 0.12);
}

.auth-ticket-result__payment-list li:last-child {
    border-bottom: none;
}

.auth-ticket-result__payment-amt {
    font-weight: 600;
    color: var(--auth-text);
    white-space: nowrap;
}

.auth-ticket-result__footer {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 1rem 0 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(217, 119, 6, 0.15);
    font-size: 0.75rem;
    color: var(--auth-text-muted);
    line-height: 1.5;
}

.auth-ticket-result__footer i {
    flex-shrink: 0;
    margin-top: 0.1rem;
    color: var(--auth-gold);
}

/* Password reset code display */
.auth-reset-code {
    margin-bottom: 1.25rem;
    padding: 1.25rem;
    border-radius: var(--auth-radius);
    background: linear-gradient(145deg, rgba(254, 243, 199, 0.2) 0%, rgba(255, 255, 255, 0.04) 100%);
    border: 1px solid rgba(212, 175, 55, 0.35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .auth-reset-code {
    background: linear-gradient(145deg, rgba(66, 32, 6, 0.45) 0%, rgba(255, 255, 255, 0.03) 100%);
}

.auth-reset-code__label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--auth-gold-mid);
    margin: 0 0 0.75rem;
}

.auth-reset-code__box {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
}

.auth-reset-code__value {
    flex: 1;
    display: block;
    padding: 0.875rem 1rem;
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-align: center;
    color: var(--auth-text);
    background: rgba(255, 255, 255, 0.08);
    border: 1px dashed rgba(212, 175, 55, 0.45);
    border-radius: 0.625rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    user-select: all;
}

.auth-reset-code__copy {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    min-width: 4.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--auth-text);
    background: rgba(2, 132, 199, 0.15);
    border: 1px solid rgba(2, 132, 199, 0.35);
    border-radius: 0.625rem;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s;
}

.auth-reset-code__copy:hover {
    background: rgba(2, 132, 199, 0.25);
    border-color: rgba(2, 132, 199, 0.5);
}

.auth-reset-code__copy.is-copied {
    background: rgba(52, 211, 153, 0.15);
    border-color: rgba(52, 211, 153, 0.4);
    color: #6EE7B7;
}

.auth-reset-code__hint {
    margin: 0.75rem 0 0;
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--auth-text-muted);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .auth-page,
    .auth-card,
    .auth-asset,
    .auth-btn-submit,
    .auth-brand__orb,
    .auth-brand__shimmer,
    .auth-brand__float,
    .auth-assets__hero-glow,
    .auth-assets__hero-item,
    .auth-page__photo,
    .auth-3d-field,
    .auth-3d-shape,
    .auth-card .auth-form-header,
    .auth-card .auth-form,
    .auth-card .auth-divider,
    .auth-card .auth-btn-outline,
    .auth-card .auth-customer-note,
    .auth-card .auth-ticket-result {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .auth-card__glare {
        display: none !important;
    }
}
