/* ════════════════════════════════════════════════════════════════
 * login_only — static styles
 * (PHP-driven :root block อยู่ใน panel/header.php — เพราะ inject
 *  CSS vars จาก $theme_guest_t1[...] 11 ตัว)
 * ════════════════════════════════════════════════════════════════ */


/* ── Base ── */
* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: 'Kanit', sans-serif;
}

body {
    position: relative;
    min-height: 100vh;
    color: #fff;
    overflow-x: hidden;
    background:
        radial-gradient(1200px 600px at 15% -10%, rgba(99, 102, 241, .35), transparent 60%),
        radial-gradient(900px 500px at 110% 110%, rgba(236, 72, 153, .25), transparent 60%),
        linear-gradient(135deg, var(--tg-bg-start) 0%, var(--tg-bg-mid) 45%, var(--tg-bg-end) 100%);
    background-attachment: fixed;
}

body.is-orbs-off .bg-orb { display: none; }

/* subtle pattern overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: url('https://www.transparenttextures.com/patterns/dark-matter.png');
    opacity: .35;
    z-index: 0;
}


/* ── Decorative glow orbs ── */
.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(70px);
    pointer-events: none;
    z-index: 0;
    opacity: .55;
    animation: orbFloat 14s ease-in-out infinite;
}

.bg-orb.o1 {
    width: 380px;
    height: 380px;
    top: -80px;
    left: -80px;
    background: radial-gradient(circle, var(--tg-orb1) 0%, transparent 70%);
}

.bg-orb.o2 {
    width: 420px;
    height: 420px;
    bottom: -120px;
    right: -100px;
    background: radial-gradient(circle, var(--tg-orb2) 0%, transparent 70%);
    animation-delay: -5s;
    opacity: .4;
}

.bg-orb.o3 {
    width: 260px;
    height: 260px;
    top: 40%;
    left: 55%;
    background: radial-gradient(circle, var(--tg-orb3) 0%, transparent 70%);
    animation-delay: -9s;
    opacity: .3;
}

@keyframes orbFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(20px, -20px) scale(1.08);
    }
}


/* ── Auth Page Layout ── */
.auth-wrap {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* padding: 24px 12px; */
}

.auth-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .03));
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    padding: 30px 24px;
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    box-shadow:
        0 30px 60px rgba(0, 0, 0, .45),
        0 0 0 1px rgba(255, 255, 255, .04) inset,
        0 0 calc(80px * (var(--tg-card-glow) / 12)) rgba(99, 102, 241, calc(var(--tg-card-glow) / 100));
}

/* gold gradient accent on top edge */
.auth-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 18%;
    right: 18%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--tg-accent), transparent);
    border-radius: 2px;
}

.auth-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.auth-logo img {
    height: 72px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 6px 18px rgba(255, 193, 7, .35));
}

.auth-title {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #fff;
}

.auth-subtitle {
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 16px;
}


/* ── Marquee (ข้อความวิ่งในการ์ด) ── */
.auth-marquee {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 38px;
    padding: 0 12px;
    margin-bottom: 18px;
    background: linear-gradient(90deg, rgba(255, 193, 7, .12), rgba(255, 152, 0, .08));
    border: 1px solid rgba(255, 193, 7, .35);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 16px rgba(255, 193, 7, .15) inset;
}

.auth-marquee>.fa-solid {
    flex: 0 0 auto;
    color: var(--tg-accent);
    font-size: 14px;
    text-shadow: 0 0 8px rgba(255, 193, 7, .5);
}

.auth-marquee-track {
    flex: 1 1 auto;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.auth-marquee-item {
    display: inline-block;
    padding-left: 100%;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 6px rgba(0, 0, 0, .4);
    animation: authMarqueeMove 18s linear infinite;
}

.auth-marquee:hover .auth-marquee-item {
    animation-play-state: paused;
}

@keyframes authMarqueeMove {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

@media (max-width: 480px) {
    .auth-marquee-item {
        animation-duration: 8s;
    }
}


/* ── Form Fields ── */
.auth-field {
    margin-bottom: 14px;
}

.auth-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 6px;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap>.fa-solid {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: var(--tg-accent);
    font-size: 15px;
    pointer-events: none;
    text-shadow: 0 0 10px rgba(255, 193, 7, .35);
}

.auth-input {
    width: 100%;
    height: 48px;
    padding: 0 44px 0 40px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
}

.auth-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.auth-input:focus {
    border-color: var(--tg-accent);
    background: rgba(0, 0, 0, 0.35);
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.18);
}

.auth-toggle-pass {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.65);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.auth-toggle-pass:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}


/* ── Buttons ── */
.auth-btn {
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform .1s, box-shadow .15s, opacity .15s;
    text-decoration: none;
}

.auth-btn:active {
    transform: translateY(1px);
}

.auth-btn-primary {
    background: var(--tg-btn-bg);
    color: var(--tg-btn-text);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
}

.auth-btn-primary:hover {
    opacity: .92;
}

.auth-btn-outline {
    background: transparent;
    color: var(--tg-btn-outline);
    border: 1px solid var(--tg-btn-outline);
}

.auth-btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--tg-btn-outline);
}

.auth-btn[disabled] {
    opacity: .65;
    cursor: not-allowed;
}

.auth-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}


/* ── Divider / Forgot ── */
.auth-forgot {
    text-align: right;
    margin: -4px 0 10px;
}

.auth-forgot a {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
}

.auth-forgot a:hover {
    color: var(--tg-accent);
    text-decoration: underline;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

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


/* ── Responsive ── */
@media (max-width: 480px) {
    .auth-card {
        padding: 22px 16px;
        border-radius: 14px;
    }

    .auth-logo img {
        height: 56px;
    }

    .auth-title {
        font-size: 18px;
    }

    .auth-input {
        height: 46px;
        font-size: 14px;
    }

    .auth-btn {
        height: 46px;
        font-size: 14px;
    }
}

@media (min-width: 992px) {
    .auth-card {
        max-width: 440px;
        padding: 34px 30px;
    }
}


/* ════════════════════════════════════════════════
 * SWEETALERT2 timer progress bar (จาก panel/footer.php)
 * ════════════════════════════════════════════════ */
.swal2-popup.swal2-toast .swal2-timer-progress-bar-container { height: 4px; }
.swal2-popup.swal2-toast .swal2-timer-progress-bar { height: 4px; opacity: 1 !important; }
.swal2-popup:not(.swal2-toast) .swal2-timer-progress-bar-container { visibility: visible !important; opacity: 1 !important; }
.swal2-popup:not(.swal2-toast) .swal2-timer-progress-bar { opacity: 1 !important; }
.swal2-popup.swal2-icon-success .swal2-timer-progress-bar { background: #22c55e !important; }
.swal2-popup.swal2-icon-error   .swal2-timer-progress-bar { background: #ef4444 !important; }
.swal2-popup.swal2-icon-warning .swal2-timer-progress-bar { background: #f59e0b !important; }
.swal2-popup.swal2-icon-info    .swal2-timer-progress-bar { background: #3b82f6 !important; }
