/* ============================================================================
   ลอตเตอรี่พลัส888 (LotteryPlus888) - Signature Red Theme
   Inspired by modern Thai digital lottery platforms
   ============================================================================ */
:root {
    --lp-red: #d90429;
    --lp-red-bright: #ef233c;
    --lp-red-dark: #9e001c;
    --lp-red-soft: #fff1f2;
    --lp-gold: #f59e0b;
    --lp-gold-dark: #b45309;
    --lp-bg: #f6f7fb;
    --lp-surface: #ffffff;
    --lp-text: #111827;
    --lp-muted: #6b7280;
    --lp-border: #e5e7eb;
    --lp-success: #15803d;
    --lp-warning: #b45309;
    --lp-danger: #b91c1c;
    --lp-radius: 16px;
    --lp-shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
    --lp-shadow-red: 0 12px 28px rgba(217, 4, 41, 0.22);
}

*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    overflow-x: clip;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body {
    margin: 0;
    font-family: 'Prompt', system-ui, -apple-system, sans-serif;
    background: var(--lp-bg);
    color: var(--lp-text);
    line-height: 1.55;
    padding-bottom: 76px;
    overflow-x: clip;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* Hide browser scrollbars cleanly while preserving native scrolling */
html::-webkit-scrollbar,
body::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar,
.dialog-body::-webkit-scrollbar,
.member-tabs::-webkit-scrollbar,
.filter-pills::-webkit-scrollbar,
.search-tabs::-webkit-scrollbar,
.bank-picker-grid::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.table-wrap,
.dialog-body,
.member-tabs,
.filter-pills,
.search-tabs,
.bank-picker-grid {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* Lightweight GPU-composited Cross-Document View Transitions & page entrance */
@media (prefers-reduced-motion: no-preference) {
    @view-transition {
        navigation: auto;
    }
    ::view-transition-old(root) {
        animation: 0.18s ease-out both lp-view-out;
    }
    ::view-transition-new(root) {
        animation: 0.24s cubic-bezier(0.22, 1, 0.36, 1) both lp-view-in;
    }
    main, .auth-shell {
        animation: 0.26s cubic-bezier(0.22, 1, 0.36, 1) lp-fade-enter;
    }
}

@keyframes lp-view-out {
    to { opacity: 0; transform: translateY(-4px); }
}
@keyframes lp-view-in {
    from { opacity: 0; transform: translateY(8px); }
}
@keyframes lp-fade-enter {
    from { opacity: 0.01; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Ultra-lightweight GPU top navigation progress bar */
.nav-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #fde047, #ffffff, #ef233c);
    transform: scaleX(0);
    transform-origin: left center;
    opacity: 0;
    z-index: 9999;
    pointer-events: none;
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
}
.nav-progress.active {
    opacity: 1;
    transform: scaleX(0.78);
}
.nav-progress.done {
    opacity: 0;
    transform: scaleX(1);
}

@media (min-width: 900px) {
    body { padding-bottom: 0; }
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; }

.container {
    width: 100%;
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ---- Announcement Bar ---- */
.announce-bar {
    background: #880018;
    color: #fff;
    font-size: 13px;
    padding: 8px 0;
}
.announce-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}
.announce-pill {
    flex-shrink: 0;
    background: var(--lp-gold);
    color: #111827;
    font-weight: 700;
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 999px;
}
.announce-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- Sticky Red Header ---- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, #c80024 0%, #e50914 55%, #b8001f 100%);
    color: #fff;
    box-shadow: 0 4px 18px rgba(184, 0, 31, 0.28);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 70px;
}
.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}
.brand-badge {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: #fff;
    color: var(--lp-red);
    display: grid;
    place-items: center;
    font-size: 21px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.16);
}
.brand-name {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.1;
}
.brand-sub {
    font-size: 11px;
    opacity: 0.9;
}

.main-nav {
    display: none;
    align-items: center;
    gap: 6px;
}
@media (min-width: 900px) {
    .main-nav { display: flex; }
}
.main-nav a {
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: background 0.15s;
}
.main-nav a:hover, .main-nav a.active {
    background: rgba(255, 255, 255, 0.18);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.wallet-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.24);
    padding: 7px 13px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}
.cart-btn {
    position: relative;
    background: #fff;
    color: var(--lp-red-dark);
    border: 0;
    border-radius: 12px;
    padding: 9px 14px;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
}
.cart-count {
    background: var(--lp-red);
    color: #fff;
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    display: inline-grid;
    place-items: center;
    padding: 0 6px;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.12s, filter 0.15s, background 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-red {
    background: linear-gradient(135deg, #ef233c, #c80024);
    color: #fff;
    box-shadow: 0 6px 16px rgba(217, 4, 41, 0.22);
}
.btn-red:hover { filter: brightness(1.06); }
.btn-gold {
    background: linear-gradient(135deg, #fbbf24, #d97706);
    color: #111827;
}
.btn-white {
    background: #fff;
    color: var(--lp-red-dark);
    border-color: rgba(255, 255, 255, 0.5);
}
.btn-outline-white {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.45);
}
.btn-outline-white:hover { background: rgba(255, 255, 255, 0.14); }
.btn-outline-red {
    background: #fff;
    color: var(--lp-red);
    border-color: var(--lp-red);
}
.btn-outline-red:hover { background: var(--lp-red-soft); }
.btn-ghost {
    background: #f3f4f6;
    color: #374151;
}
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn-lg { padding: 13px 24px; font-size: 15px; }
.btn-block { width: 100%; }

/* ---- Hero Section (LotteryPlus-inspired Red Banner + 6-Digit Search) ---- */
.hero-section {
    background: radial-gradient(circle at top right, #ff3b53 0%, #d90429 45%, #8f0019 100%);
    color: #fff;
    padding: 30px 0 46px;
    position: relative;
    overflow: hidden;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: center;
}
@media (min-width: 960px) {
    .hero-grid { grid-template-columns: 1.15fr 0.85fr; }
}
.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 14px;
}
.hero-title {
    margin: 0 0 10px;
    font-size: clamp(26px, 4vw, 40px);
    font-weight: 700;
    line-height: 1.18;
}
.hero-title span { color: #fde047; }
.hero-desc {
    margin: 0 0 20px;
    font-size: 15px;
    opacity: 0.94;
    max-width: 560px;
}
.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.hero-stat {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    padding: 10px 16px;
    min-width: 136px;
}
.hero-stat-label { font-size: 11px; opacity: 0.85; }
.hero-stat-value { font-size: 18px; font-weight: 700; color: #fde047; }

/* ---- Countdown Card ---- */
.countdown-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 20px;
    padding: 22px;
    text-align: center;
}
.countdown-title { font-size: 14px; font-weight: 500; opacity: 0.92; margin-bottom: 6px; }
.countdown-draw { font-size: 20px; font-weight: 700; color: #fde047; margin-bottom: 16px; }
.countdown-boxes {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.cd-box {
    background: #fff;
    color: var(--lp-red-dark);
    border-radius: 14px;
    padding: 12px 6px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
}
.cd-num { font-size: 26px; font-weight: 700; line-height: 1; }
.cd-lbl { font-size: 11px; color: var(--lp-muted); margin-top: 4px; }

/* ---- 6-Digit Search Panel (Overlapping Hero) ---- */
.search-panel {
    background: #fff;
    border-radius: 22px;
    padding: 24px;
    margin-top: -28px;
    position: relative;
    z-index: 10;
    box-shadow: 0 16px 38px rgba(17, 24, 39, 0.09);
    border: 1px solid rgba(217, 4, 41, 0.14);
}
.search-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}
.search-tab {
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--lp-border);
    background: #f9fafb;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    color: #374151;
}
.search-tab.active {
    background: var(--lp-red);
    color: #fff;
    border-color: var(--lp-red);
}
.digit-search-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    justify-content: space-between;
}
.digit-boxes {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
}
.digit-box {
    width: 48px;
    height: 58px;
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    color: var(--lp-red-dark);
    border: 2px solid #d1d5db;
    border-radius: 14px;
    background: #fff8f8;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}
@media (max-width: 480px) {
    .digit-box { width: 42px; height: 50px; font-size: 22px; }
}
.digit-box:focus {
    outline: none;
    border-color: var(--lp-red);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(217, 4, 41, 0.14);
    transform: translateY(-2px);
}
.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed var(--lp-border);
}
.filter-pill {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    background: #f3f4f6;
    color: #374151;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.filter-pill.active, .filter-pill:hover {
    background: var(--lp-red-soft);
    color: var(--lp-red-dark);
    border: 1px solid rgba(217, 4, 41, 0.3);
}

/* ---- Lottery Ticket Grid & Cards ---- */
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 28px 0 16px;
    flex-wrap: wrap;
}
.section-head h2 {
    margin: 0;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-head h2 i { color: var(--lp-red); }

.ticket-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
.ticket-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #eceef4;
    box-shadow: var(--lp-shadow);
    transition: transform 0.16s, box-shadow 0.16s, border-color 0.16s;
    display: flex;
    flex-direction: column;
}
.ticket-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(217, 4, 41, 0.12);
    border-color: rgba(217, 4, 41, 0.35);
}
.ticket-face {
    background: linear-gradient(135deg, #fff5f5 0%, #ffffff 55%, #fffbeb 100%);
    padding: 16px;
    border-bottom: 2px dashed #f3d0d5;
    position: relative;
}
.ticket-top-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--lp-muted);
    margin-bottom: 10px;
}
.ticket-set-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: var(--lp-red);
    color: #fff;
}
.ticket-set-badge.set-multi {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #111827;
}
.ticket-number-strip {
    background: #fff;
    border: 2px solid var(--lp-red);
    border-radius: 12px;
    padding: 10px 12px;
    text-align: center;
    letter-spacing: 0.22em;
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    box-shadow: inset 0 2px 6px rgba(217, 4, 41, 0.08);
}
.ticket-prize-hint {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--lp-red-dark);
    font-weight: 600;
}
.ticket-footer {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
}
.ticket-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--lp-red);
    line-height: 1.1;
}
.ticket-price small {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: var(--lp-muted);
}

/* ---- Trust / Results Strip ---- */
.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin: 34px 0;
}
.trust-card {
    background: #fff;
    border-radius: 16px;
    padding: 18px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    border: 1px solid var(--lp-border);
}
.trust-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--lp-red-soft);
    color: var(--lp-red);
    display: grid;
    place-items: center;
    font-size: 20px;
    flex-shrink: 0;
}
.trust-card h3 { margin: 0 0 4px; font-size: 15px; }
.trust-card p { margin: 0; font-size: 13px; color: var(--lp-muted); }

/* ---- Generic Cards, Tables, Forms, Badges ---- */
.card {
    background: #fff;
    border-radius: var(--lp-radius);
    padding: 22px;
    box-shadow: var(--lp-shadow);
    border: 1px solid var(--lp-border);
    margin-bottom: 18px;
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--lp-border);
}
.card-header h2, .card-header h3 {
    margin: 0;
    font-size: 17px;
    display: flex;
    align-items: center;
    gap: 9px;
}
.card-header i { color: var(--lp-red); }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }

.form-group { margin-bottom: 14px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: #374151;
}
.form-control {
    width: 100%;
    padding: 11px 14px;
    border-radius: 11px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus {
    outline: none;
    border-color: var(--lp-red);
    box-shadow: 0 0 0 3px rgba(217, 4, 41, 0.13);
}
.form-control:user-invalid {
    border-color: var(--lp-danger);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-neutral { background: #f3f4f6; color: #374151; }

.alert {
    padding: 13px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

.table-wrap { overflow-x: auto; }
table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
table.data-table th, table.data-table td {
    padding: 11px 12px;
    text-align: left;
    border-bottom: 1px solid var(--lp-border);
    white-space: nowrap;
}
table.data-table th {
    background: #f9fafb;
    font-size: 12px;
    font-weight: 600;
    color: var(--lp-muted);
    text-transform: uppercase;
}

/* ---- Bank Account Card ---- */
.bank-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--lp-border);
    background: #fafafa;
    margin-bottom: 10px;
}
.bank-dot {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: #fff;
    font-weight: 700;
    font-size: 11px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.bank-logo-box {
    border-radius: 12px;
    padding: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}
.bank-logo-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* ---- Native <dialog> Modal (Modern Web Guidance compliant) ---- */
dialog.lp-dialog {
    padding: 0;
    border: 0;
    border-radius: 20px;
    max-width: 480px;
    width: calc(100% - 28px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
    background: #fff;
    color: var(--lp-text);
}
dialog.lp-dialog[open] {
    display: flex;
    flex-direction: column;
    max-height: 88dvh;
}
dialog.lp-dialog:modal {
    overscroll-behavior: contain;
}
dialog.lp-dialog::backdrop {
    background: rgba(17, 24, 39, 0.56);
    backdrop-filter: blur(3px);
    overflow: hidden;
    overscroll-behavior: contain;
}
.dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(90deg, #c80024, #ef233c);
    color: #fff;
}
.dialog-head h2 { margin: 0; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.dialog-close {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border: 0;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    cursor: pointer;
    display: grid;
    place-items: center;
}
.dialog-body {
    padding: 18px 20px;
    overflow-y: auto;
}
.dialog-foot {
    padding: 14px 20px;
    border-top: 1px solid var(--lp-border);
    background: #f9fafb;
}

/* ---- Toast ---- */
.toast-container {
    position: fixed;
    top: 84px;
    right: 16px;
    z-index: 90;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    background: #111827;
    color: #fff;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
    display: flex;
    align-items: center;
    gap: 9px;
    border-left: 4px solid var(--lp-red-bright);
}

/* ---- Mobile Sticky Bottom Navigation ---- */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 45;
    background: #fff;
    border-top: 1px solid var(--lp-border);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 6px 4px;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.06);
}
@media (min-width: 900px) {
    .mobile-nav { display: none; }
}
.mobile-nav a, .mobile-nav button {
    background: transparent;
    border: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: var(--lp-muted);
    padding: 4px;
    cursor: pointer;
}
.mobile-nav a.active, .mobile-nav button.active {
    color: var(--lp-red);
    font-weight: 600;
}
.mobile-nav i { font-size: 18px; }

/* ---- Footer ---- */
.site-footer {
    background: #18181b;
    color: #d4d4d8;
    margin-top: 48px;
    padding: 36px 0 24px;
    border-top: 4px solid var(--lp-red);
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}
.footer-grid h4 { color: #fff; margin: 0 0 10px; font-size: 15px; }
.footer-grid p, .footer-grid li { font-size: 13px; color: #a1a1aa; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 6px; }
.footer-bottom {
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

/* ---- Auth Pages ---- */
.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px 16px;
    background: linear-gradient(135deg, #fff1f2 0%, #f6f7fb 50%, #fee2e2 100%);
}
.auth-shell {
    width: 100%;
    max-width: 920px;
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr;
    box-shadow: 0 22px 54px rgba(158, 0, 28, 0.14);
}
@media (min-width: 780px) {
    .auth-shell { grid-template-columns: 0.95fr 1.05fr; }
}
.auth-banner {
    background: linear-gradient(155deg, #ef233c 0%, #c80024 55%, #7f0017 100%);
    color: #fff;
    padding: 36px 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.auth-form-pane {
    padding: 34px 28px;
}
.auth-features { list-style: none; padding: 0; margin: 22px 0 0; }
.auth-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 14px;
}
.auth-features i { color: #fde047; }

/* ---- Member Dashboard Tabs ---- */
.member-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.member-tab {
    padding: 10px 16px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--lp-border);
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.member-tab.active {
    background: var(--lp-red);
    color: #fff;
    border-color: var(--lp-red);
    box-shadow: var(--lp-shadow-red);
}

/* ---- Official Bank Picker (Register Page) ---- */
.bank-selected-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #fff5f5;
    border: 1px solid rgba(217, 4, 41, 0.25);
    margin-bottom: 10px;
}
.bank-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
    gap: 8px;
    max-height: 210px;
    overflow-y: auto;
    padding: 4px 2px;
}
.bank-pick-btn {
    background: #fff;
    border: 1.5px solid var(--lp-border);
    border-radius: 12px;
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: border-color 0.14s, background 0.14s, transform 0.12s;
}
.bank-pick-btn:hover {
    border-color: rgba(217, 4, 41, 0.5);
    background: #fff8f8;
}
.bank-pick-btn.selected {
    border-color: var(--lp-red);
    background: var(--lp-red-soft);
    box-shadow: 0 4px 12px rgba(217, 4, 41, 0.16);
}
@media (prefers-reduced-motion: no-preference) {
    .bank-pick-btn:active { transform: scale(0.96); }
}
.bank-pick-label {
    font-size: 11px;
    font-weight: 500;
    color: #374151;
    line-height: 1.15;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* ---- 6-Digit PIN Field ---- */
.pin-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.pin-field {
    letter-spacing: 0.36em;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    padding-right: 42px;
}
.pin-eye {
    position: absolute;
    right: 8px;
    background: transparent;
    border: 0;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    color: var(--lp-muted);
    cursor: pointer;
    display: grid;
    place-items: center;
}
.pin-eye:hover { color: var(--lp-red); }

/* ---- Full Responsive Safeguards (320px to 4K) ---- */
@media (max-width: 640px) {
    .header-inner { min-height: 60px; gap: 8px; }
    .brand-badge { width: 36px; height: 36px; font-size: 17px; border-radius: 10px; }
    .brand-name { font-size: 16px; }
    .brand-sub { display: none; }
    .header-actions { gap: 6px; }
    .wallet-chip { padding: 5px 9px; font-size: 12px; }
    .cart-btn { padding: 7px 10px; font-size: 13px; }
    .search-panel { padding: 16px 14px; border-radius: 18px; }
    .digit-boxes {
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        width: 100%;
        gap: 6px;
    }
    .digit-box { width: 100%; height: 48px; font-size: 20px; border-radius: 11px; }
    .digit-search-row { flex-direction: column; align-items: stretch; }
    .digit-search-row > div:last-child { display: grid; grid-template-columns: 1fr auto; }
    .countdown-boxes { gap: 6px; }
    .cd-num { font-size: 20px; }
    .auth-banner { padding: 22px 18px; }
    .auth-features { display: none; }
    .auth-form-pane { padding: 22px 16px; }
    .card { padding: 16px; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .ticket-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
}
@media (max-width: 360px) {
    .container { padding: 0 10px; }
    .bank-picker-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .btn-sm { padding: 6px 9px; font-size: 12px; }
}
