/* ==========================================================================
   Jay Games - Modern Mobile Matka Game App Styling & Theme
   Optimized for native-feel mobile gameplay, high-roller dark theme,
   vibrant gold accents, non-overlapping bottom sheets, and responsive touch.
   ========================================================================== */

:root {
    --jg-bg: #f4f5f9;
    --jg-surface: #ffffff;
    --jg-surface-2: #edf0f5;
    --jg-line: rgba(23, 24, 27, 0.08);
    --jg-accent: #f59e0b;
    --jg-accent-2: #d97706;
    --jg-accent-ink: #b45309;
    --jg-gold: #f59e0b;
    --jg-gold-2: #d97706;
    --jg-text: #191b22;
    --jg-muted: #64748b;
    --jg-header: rgba(255, 255, 255, 0.95);
    --jg-footer: rgba(255, 255, 255, 0.97);
    --jg-shadow: rgba(23, 24, 27, 0.08);
    --jg-scroll: #f4f5f9;
    --jg-scroll-thumb: #cbd5e1;
    --jg-placeholder: #94a3b8;
    --jg-table-line: rgba(23, 24, 27, 0.06);
    --jg-stripe: rgba(23, 24, 27, 0.025);
    --jg-card-grad: linear-gradient(160deg, #ffffff, #f7f8fb);
    --jg-panel-grad: linear-gradient(160deg, #fffbeb, #fef3c7);
    --jg-ank-grad: linear-gradient(135deg, #fef3c7, #fde68a);
    --jg-toast-bg: #1e293b;
    --jg-gold-grad: linear-gradient(135deg, #f59e0b, #d97706);
    --jg-accent-rgb: 245, 158, 11;
    --jg-success: #10b981;
    --jg-danger: #ef4444;
    --jg-win: #f59e0b;
    --jg-danger-text: #b91c1c;
    --jg-info-text: #1d4ed8;
    --jg-gold-bg: rgba(245, 158, 11, 0.14);
    --jg-gold-text: #b45309;
    --jg-gold-border: rgba(245, 158, 11, 0.35);
    --jg-safe-top: 0px;
    --jg-safe-bottom: 0px;
    color-scheme: light;
}

html.theme-dark {
    --jg-bg: #0d0e12;
    --jg-surface: #171821;
    --jg-surface-2: #20222d;
    --jg-line: rgba(255, 255, 255, 0.08);
    --jg-accent: #f59e0b;
    --jg-accent-2: #fbbf24;
    --jg-accent-ink: #fbbf24;
    --jg-gold: #f59e0b;
    --jg-gold-2: #fbbf24;
    --jg-text: #f1f5f9;
    --jg-muted: #94a3b8;
    --jg-header: rgba(15, 16, 21, 0.95);
    --jg-footer: rgba(15, 16, 21, 0.97);
    --jg-shadow: rgba(0, 0, 0, 0.55);
    --jg-scroll: #0d0e12;
    --jg-scroll-thumb: #334155;
    --jg-placeholder: #64748b;
    --jg-table-line: rgba(255, 255, 255, 0.06);
    --jg-stripe: rgba(255, 255, 255, 0.02);
    --jg-card-grad: linear-gradient(160deg, #1d1e29, #14151e);
    --jg-panel-grad: linear-gradient(160deg, #24221b, #191822);
    --jg-ank-grad: linear-gradient(135deg, #2f2a1b, #1e1b15);
    --jg-toast-bg: #1e2029;
    --jg-gold-grad: linear-gradient(135deg, #f59e0b, #d97706);
    --jg-accent-rgb: 245, 158, 11;
    --jg-success: #10b981;
    --jg-danger: #f87171;
    --jg-win: #fbbf24;
    --jg-danger-text: #fca5a5;
    --jg-info-text: #93c5fd;
    --jg-gold-bg: rgba(245, 158, 11, 0.16);
    --jg-gold-text: #fbbf24;
    --jg-gold-border: rgba(245, 158, 11, 0.35);
    color-scheme: dark;
}

/* Mobile & Fullscreen PWA/WebView Safe Clearance (30px top & 30px bottom) */
@media (max-width: 767.98px), (display-mode: fullscreen), (display-mode: standalone), (hover: none) and (pointer: coarse) {
    :root {
        --jg-safe-top: max(30px, env(safe-area-inset-top, 0px));
        --jg-safe-bottom: max(30px, env(safe-area-inset-bottom, 0px));
    }
}

/* Global Reset & Body */
[hidden] {
    display: none !important;
}
html {
    background: var(--jg-bg) !important;
    max-width: 100%;
    overflow-x: visible;
    overflow-x: clip;
    overscroll-behavior-y: contain;
    -webkit-tap-highlight-color: transparent;
}
html.jg-sheet-open {
    overflow: hidden !important;
}
body {
    background: var(--jg-bg) !important;
    color: var(--jg-text) !important;
    font-family: "Poppins", "Roboto", sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    max-width: 100%;
    overflow-x: visible;
    overflow-y: visible;
    height: auto;
    -webkit-tap-highlight-color: transparent;
}
body.jg-app {
    font-size: 14px;
    line-height: 1.45 !important;
}
body.jg-app .row { margin-bottom: 0; }
body.jg-app .gap-1 { gap: 4px !important; }
body.jg-app .gap-2 { gap: 8px !important; }
body.jg-app .gap-3 { gap: 12px !important; }
body.jg-app .flex-1 { flex: 1 1 0% !important; min-width: 0; }
html.theme-dark body {
    background:
        radial-gradient(900px 450px at 50% -180px, rgba(245, 158, 11, 0.12), transparent 60%),
        radial-gradient(760px 420px at 100% 8%, rgba(239, 68, 68, 0.08), transparent 62%),
        radial-gradient(620px 360px at 0% 24%, rgba(16, 185, 129, 0.06), transparent 60%),
        var(--jg-bg) !important;
}
html.theme-light body {
    background:
        radial-gradient(900px 450px at 50% -180px, rgba(245, 158, 11, 0.09), transparent 60%),
        var(--jg-bg) !important;
}

p, small, .text-muted { color: var(--jg-muted) !important; }
a { color: var(--jg-gold-2); }
h1, h2, h3, h4, h5, h6 { color: var(--jg-text) !important; }
.theme-dark .color-theme { color: var(--jg-text) !important; }

/* Base App Shell Layout */
body.jg-app #page {
    position: relative;
    overflow-x: visible !important;
    overflow-x: clip !important;
    overflow-y: visible !important;
    min-height: 0 !important;
    height: auto !important;
}
body.jg-app .page-content {
    max-width: 560px;
    margin: 0 auto;
    padding-top: calc(64px + var(--jg-safe-top)) !important;
    padding-bottom: calc(88px + var(--jg-safe-bottom)) !important;
    min-height: 100vh;
    min-height: 100dvh;
    height: auto !important;
    position: relative;
    overflow-x: visible !important;
    overflow-x: clip !important;
    overflow-y: visible !important;
    transition: none !important;
    touch-action: pan-y;
}
#preloader.preloader-hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
body.jg-app .header-card { display: none !important; }

/* Fixed Top App Bar */
.jg-appbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 900;
    max-width: 560px;
    margin: 0 auto;
    padding: calc(8px + var(--jg-safe-top)) 12px 8px;
    background: var(--jg-header);
    border-bottom: 1px solid var(--jg-line);
    box-shadow: 0 6px 22px var(--jg-shadow);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-sizing: border-box;
}
.jg-appbar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
}
.jg-appbar-row + .jg-appbar-row {
    margin-top: 6px;
}
.jg-appbar-btn {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 12px;
    background: var(--jg-surface-2);
    border: 1px solid var(--jg-line);
    color: var(--jg-gold-2) !important;
    font-size: 15px;
    text-decoration: none !important;
    cursor: pointer;
    transition: transform .12s ease;
}
.jg-appbar-btn:active { transform: scale(.95); }
.jg-appbar-title {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.2;
}
.jg-appbar-title strong {
    display: block;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: .02em;
    color: var(--jg-text) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.jg-appbar-title span {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--jg-muted) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.jg-balance-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    padding: 0 14px;
    border-radius: 12px;
    background: var(--jg-gold-grad);
    border: 0;
    font-size: 15px;
    font-weight: 800;
    color: #fff !important;
    text-decoration: none !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, .35);
    transition: transform .12s ease;
}
.jg-balance-pill:active { transform: scale(.96); }
.jg-balance-pill i { font-size: 13px; }
.jg-appbar-tools {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}
.jg-tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 36px;
    padding: 0 10px;
    border-radius: 11px;
    border: 1px solid var(--jg-line);
    background: var(--jg-surface-2);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none !important;
}
.jg-tool-btn i { font-size: 14px; }
.jg-tool-btn.wa {
    color: #10b981 !important;
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.30);
}
.jg-tool-btn.call {
    color: #3b82f6 !important;
    background: rgba(59, 130, 246, 0.10);
    border-color: rgba(59, 130, 246, 0.25);
}
.jg-lang-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    min-width: 38px;
    padding: 0 8px;
    border-radius: 11px;
    background: var(--jg-surface-2);
    border: 1px solid var(--jg-line);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    color: var(--jg-gold-2) !important;
    text-decoration: none !important;
}

/* Fixed Bottom Tab Bar */
.jg-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 950;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    max-width: 560px;
    margin: 0 auto;
    padding: 6px 4px calc(6px + var(--jg-safe-bottom));
    background: var(--jg-footer);
    border-top: 1px solid var(--jg-line);
    box-shadow: 0 -10px 30px var(--jg-shadow);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: transform .22s cubic-bezier(0.16, 1, 0.3, 1);
}
.jg-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 48px;
    padding: 3px 2px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .02em;
    color: var(--jg-muted) !important;
    text-decoration: none !important;
    transition: transform .12s ease;
}
.jg-tab i { font-size: 17px; line-height: 1; }
.jg-tab.is-active {
    color: var(--jg-gold-2) !important;
    background: rgba(245, 158, 11, 0.12);
}
.jg-tab:active { transform: scale(.95); }

/* Prevent Tabbar Overlap When Bottom Sheets / Modals Are Active */
body.modal-open .jg-tabbar,
body.has-menu-active .jg-tabbar,
.menu-hider.menu-active ~ .jg-tabbar,
.jg-tabbar.footer-menu-hidden {
    transform: translateY(120%) !important;
    pointer-events: none !important;
}

/* Page Containers */
.jg-page-body,
.jg-play-wrap {
    padding: 8px 12px 24px !important;
    margin: 0 auto !important;
    max-width: 560px !important;
    box-sizing: border-box;
    touch-action: pan-y;
}

/* Quick Money Action Buttons (Add / Withdraw) */
.jg-money-actions {
    display: flex;
    gap: 10px;
    margin: 0 0 14px;
}
.jg-money-btn {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 52px;
    border-radius: 14px;
    border: 1px solid var(--jg-line);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    text-decoration: none !important;
    transition: transform .12s ease;
}
.jg-money-btn:active { transform: scale(.98); }
.jg-money-btn i { font-size: 16px; }
.jg-money-btn.add {
    background: var(--jg-gold-grad);
    color: #fff !important;
    border: none;
    box-shadow: 0 8px 22px rgba(245, 158, 11, .35);
}
.jg-money-btn.out {
    background: var(--jg-surface);
    color: var(--jg-text) !important;
    box-shadow: 0 4px 14px var(--jg-shadow);
}

/* Prominent Play / Khelo Hero Button */
.jg-khelo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 54px;
    height: auto;
    padding: 12px 16px;
    margin: 2px 0 16px;
    border-radius: 18px;
    background: var(--jg-gold-grad);
    color: #fff !important;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: .04em;
    line-height: 1.25;
    text-align: center;
    text-transform: uppercase;
    text-decoration: none !important;
    box-shadow: 0 10px 28px rgba(245, 158, 11, .40);
    transition: transform .12s ease;
}
.jg-khelo:active { transform: scale(.98); }

/* Section Title */
.jg-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0 12px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--jg-muted) !important;
}
.jg-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, .2);
}

/* ==========================================================================
   Matka Market Cards & Result Board
   ========================================================================== */
.jg-market-list {
    display: flex;
    flex-direction: column;
    touch-action: pan-y;
}
.jg-market {
    border-radius: 18px;
    padding: 14px 16px;
    background: var(--jg-surface);
    border: 1px solid var(--jg-line);
    box-shadow: 0 8px 24px var(--jg-shadow);
    margin-bottom: 12px;
    transition: transform .12s ease;
}
.jg-market.is-open {
    border-color: rgba(245, 158, 11, .45);
    background: var(--jg-card-grad);
}
.jg-market-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 2px;
}
.jg-market-name h4 {
    margin: 0 0 2px;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--jg-text) !important;
    line-height: 1.2;
}
.jg-market-time {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    color: var(--jg-muted) !important;
}
.jg-market-time i { color: var(--jg-gold); }

.jg-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.jg-pill-open {
    background: rgba(16, 185, 129, .15);
    color: #10b981 !important;
    border: 1px solid rgba(16, 185, 129, .3);
}
.jg-dot-pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 rgba(16, 185, 129, .7);
    animation: jgPulse 1.8s infinite;
}
.jg-pill-off {
    background: rgba(255, 255, 255, .06);
    color: var(--jg-muted) !important;
    border: 1px solid var(--jg-line);
}

/* Genuine Matka Result Strip: [Open Patti] - [Jodi] - [Close Patti] */
.jg-matka-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 10px 0 12px;
    padding: 10px 14px;
    border-radius: 14px;
    background: var(--jg-surface-2);
    border: 1px solid var(--jg-line);
    text-align: center;
}
.jg-strip-panna {
    font-size: 16px;
    font-weight: 700;
    color: var(--jg-text);
    letter-spacing: 2px;
    font-family: monospace, "Roboto", sans-serif;
}
.jg-strip-dash {
    font-size: 16px;
    color: var(--jg-muted);
    font-weight: 800;
}
.jg-strip-jodi {
    font-size: 24px;
    font-weight: 900;
    color: var(--jg-gold-2) !important;
    letter-spacing: 3px;
    padding: 0 6px;
    font-family: monospace, "Roboto", sans-serif;
    text-shadow: 0 0 14px rgba(245, 158, 11, 0.4);
}

/* Market Play Button */
.jg-play-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    border-radius: 14px;
    background: var(--jg-gold-grad);
    color: #fff !important;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    text-decoration: none !important;
    box-shadow: 0 8px 22px rgba(245, 158, 11, .35);
    transition: transform .12s ease;
}
.jg-play-btn:active { transform: scale(.98); }
.jg-play-btn i { font-size: 14px; }
.jg-play-btn.is-off {
    height: 44px;
    background: var(--jg-surface-2);
    color: var(--jg-muted) !important;
    box-shadow: none;
    font-size: 12px;
    letter-spacing: .06em;
}

.jg-collapse {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    margin: 12px 0;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--jg-surface-2);
    border: 1px solid var(--jg-line);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--jg-muted) !important;
}
.jg-collapse i { color: var(--jg-gold); transition: transform .2s ease; }
.jg-collapse.is-open i { transform: rotate(180deg); }
.jg-empty { padding: 18px 0; text-align: center; font-size: 14px; color: var(--jg-muted) !important; }

/* ==========================================================================
   Native Bottom Sheets (Docked, Non-detached, Fluid Overlays)
   ========================================================================== */
.menu-hider { z-index: 998 !important; }
.menu:not(.menu-active),
.jg-sheet:not(.menu-active) {
    visibility: hidden !important;
    pointer-events: none !important;
    transition: transform 280ms ease, opacity 280ms ease, visibility 0s linear 280ms !important;
}
.menu.menu-active,
.menu-box-bottom.menu-active,
.menu-box-right.menu-active,
.jg-sheet.menu-active {
    z-index: 1001 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transition: transform 280ms ease, opacity 280ms ease, visibility 0s linear 0s !important;
}
.jg-sheet {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 auto !important;
    max-width: 560px !important;
    width: 100% !important;
    height: 88vh !important;
    height: 88dvh !important;
    max-height: calc(100vh - var(--jg-safe-top) - 8px) !important;
    max-height: calc(100dvh - var(--jg-safe-top) - 8px) !important;
    border-radius: 22px 22px 0 0 !important;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.6) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    background: var(--jg-surface) !important;
    border: 1px solid var(--jg-line) !important;
    border-bottom: 0 !important;
}
#jgSuccess.jg-sheet {
    height: auto !important;
    max-height: min(85dvh, calc(100dvh - var(--jg-safe-top) - 12px)) !important;
    overflow-y: auto !important;
}
#jgLangSheet.jg-sheet,
#jgShareSheet.jg-sheet {
    height: auto !important;
    max-height: min(82dvh, calc(100dvh - var(--jg-safe-top) - 12px)) !important;
}
.jg-success-wrap {
    padding-bottom: calc(20px + var(--jg-safe-bottom)) !important;
}
.jg-success-bal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
}
.jg-sheet-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px 10px;
    flex: 0 0 auto;
    border-bottom: 1px solid var(--jg-line);
}
.jg-sheet-x {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--jg-surface-2);
    border: 1px solid var(--jg-line);
    color: var(--jg-gold) !important;
    font-size: 15px;
    text-decoration: none !important;
}

/* 3-Step Wizard Bar */
.jg-stepbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px 12px;
    flex: 0 0 auto;
}
.jg-step-pill {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 32px;
    border-radius: 10px;
    background: var(--jg-surface-2);
    border: 1px solid var(--jg-line);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--jg-muted) !important;
    white-space: nowrap;
    overflow: hidden;
}
.jg-step-pill b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--jg-surface);
    font-size: 10px;
    color: var(--jg-muted) !important;
}
.jg-step-pill.is-active {
    background: var(--jg-gold-grad);
    border-color: var(--jg-gold-2);
    color: #fff !important;
}
.jg-step-pill.is-active b {
    background: rgba(255, 255, 255, .25);
    color: #fff !important;
}

/* Game Type Picker List */
.jg-game-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px 14px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.jg-game-tile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    background: var(--jg-surface-2);
    border: 1px solid var(--jg-line);
    text-decoration: none !important;
    color: var(--jg-text) !important;
    transition: transform .1s ease, border-color .15s ease;
}
.jg-game-tile:active {
    transform: scale(.98);
    border-color: var(--jg-gold);
}
.jg-game-icon {
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--jg-ank-grad);
    border: 1px solid var(--jg-line);
    overflow: hidden;
}
.jg-game-icon img { width: 54px; height: 54px; object-fit: contain; }
.jg-game-icon i { font-size: 24px; color: var(--jg-gold-2); }
.jg-game-info { flex: 1 1 auto; min-width: 0; }
.jg-game-info strong {
    display: block;
    font-size: 16px;
    font-weight: 800;
    color: var(--jg-text) !important;
    line-height: 1.25;
}
.jg-game-info small {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    line-height: 1.35;
    color: var(--jg-muted) !important;
}
.jg-game-win { flex: 0 0 auto; text-align: right; }
.jg-game-win b {
    display: block;
    font-size: 16px;
    font-weight: 900;
    color: var(--jg-gold-2) !important;
    line-height: 1.2;
}
.jg-game-win small {
    display: block;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--jg-muted) !important;
}

/* ==========================================================================
   Betting Form & Number Grid
   ========================================================================== */
.bid-form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; width: 100%; }
.bid-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px 8px; flex: 0 0 auto; }
.bid-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--jg-surface-2);
    border: 1px solid var(--jg-line);
    color: var(--jg-gold) !important;
    font-size: 15px;
    text-decoration: none !important;
}
.bid-title { flex: 1 1 auto; min-width: 0; text-align: center; }
.bid-title h4 {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--jg-text) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bid-title span {
    display: block;
    margin-top: 2px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--jg-muted) !important;
}

/* Open / Close Session Segment */
.bid-seg {
    display: flex;
    gap: 4px;
    margin: 0 16px 10px;
    padding: 4px;
    border-radius: 14px;
    flex: 0 0 auto;
    background: var(--jg-surface-2);
    border: 1px solid var(--jg-line);
}
.bid-seg label { flex: 1 1 0; position: relative; margin: 0 !important; cursor: pointer; }
.bid-seg input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.bid-seg span {
    display: block;
    padding: 8px 0;
    border-radius: 10px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--jg-muted) !important;
    transition: background .15s ease, color .15s ease;
}
.bid-seg input:checked + span {
    background: var(--jg-gold-grad);
    color: #fff !important;
}

/* Number Search */
.bid-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 16px 10px;
    padding: 0 12px;
    flex: 0 0 auto;
    border-radius: 12px;
    background: var(--jg-surface-2);
    border: 1px solid var(--jg-line);
}
.bid-search i { font-size: 13px; color: var(--jg-muted); }
.bid-search input {
    flex: 1 1 auto;
    width: 100%;
    height: 40px;
    border: 0;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: var(--jg-text);
}

.bid-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 16px 12px;
}
.jg-tap-hint {
    margin: 0 0 10px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--jg-muted) !important;
}

/* Number Grid & Chips */
.bid-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.bid-grid.ten {
    grid-template-columns: repeat(5, 1fr);
}
.bid-chip {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 0;
    min-height: 52px;
    border-radius: 13px;
    font-weight: 800;
    background: var(--jg-surface-2);
    border: 1px solid var(--jg-line);
    color: var(--jg-text);
    transition: transform .1s ease, background .15s ease, border-color .15s ease;
}
.bid-chip:active { transform: scale(.95); }
.bid-chip.active {
    background: var(--jg-gold-grad) !important;
    border-color: var(--jg-gold-2) !important;
    color: #fff !important;
    box-shadow: 0 6px 18px rgba(245, 158, 11, .4) !important;
}
.jg-chip-num { font-size: 16px; font-weight: 800; letter-spacing: .02em; line-height: 1.1; }
.jg-chip-ank { font-size: 10px; font-weight: 700; color: var(--jg-muted); line-height: 1; margin-top: 2px; }
.bid-chip.active .jg-chip-ank { color: rgba(255, 255, 255, .8) !important; }

/* Sticky Slip Bottom Bar */
.bid-foot {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
    padding: 12px 16px calc(14px + var(--jg-safe-bottom));
    border-top: 1px solid var(--jg-line);
    background: var(--jg-surface);
}
.bid-total { flex: 1 1 auto; min-width: 0; line-height: 1.2; }
.bid-total-label { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--jg-muted); }
.bid-total strong { display: block; font-size: 22px; color: var(--jg-gold-2); font-weight: 900; }
.bid-total small { display: block; font-size: 11px; color: var(--jg-muted); }

.jg-step-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.bid-submit {
    flex: 1 1 auto;
    min-width: 140px;
    height: 50px;
    border: 0 !important;
    border-radius: 14px !important;
    background: var(--jg-gold-grad) !important;
    color: #fff !important;
    font-weight: 800 !important;
    font-size: 15px;
    letter-spacing: .04em;
    text-transform: uppercase;
    box-shadow: 0 10px 24px rgba(245, 158, 11, .35) !important;
}
.bid-submit:active { transform: scale(.98); }

/* Amount Cards & Steppers */
.jg-bet-card {
    position: relative;
    padding: 11px 14px;
    margin-bottom: 8px;
    border-radius: 16px;
    background: var(--jg-surface-2);
    border: 1px solid var(--jg-line);
}
.jg-bet-top { display: flex; align-items: center; gap: 10px; }
.jg-bet-num {
    min-width: 48px;
    height: 36px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--jg-gold-grad);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
}
.jg-bet-meta { flex: 1 1 auto; min-width: 0; font-size: 12px; font-weight: 700; color: var(--jg-muted) !important; }
.jg-bet-bottom { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.jg-bet-stepper { display: inline-flex; align-items: center; gap: 4px; }
.jg-step {
    width: 34px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--jg-line);
    background: var(--jg-surface);
    color: var(--jg-gold-2);
    font-size: 18px;
    font-weight: 800;
}
.jg-amt-input {
    width: 72px;
    height: 36px;
    padding: 0 8px;
    border-radius: 10px;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: var(--jg-text);
    background: var(--jg-surface);
    border: 1px solid var(--jg-line);
    outline: none;
}
.jg-quick-wrap { display: inline-flex; gap: 4px; }
.jg-quick {
    height: 32px;
    padding: 0 8px;
    border-radius: 9px;
    border: 1px solid var(--jg-line);
    background: transparent;
    color: var(--jg-gold-2);
    font-size: 11px;
    font-weight: 800;
}
.jg-quick:active { background: var(--jg-gold-grad); color: #fff; }
.jg-bet-win { margin-left: auto; font-size: 11px; font-weight: 800; color: var(--jg-gold-2) !important; white-space: nowrap; }

/* Selected Chips in Slip */
.jg-selected-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 2px 10px; }
.jg-selected-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 10px;
    border-radius: 9px;
    background: var(--jg-gold-grad);
    border: 1px solid var(--jg-gold-2);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

/* Confirmation Sheet */
.jg-confirm-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 16px 8px; }
.jg-confirm-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--jg-line);
    font-size: 13px;
}
.jg-confirm-row span { color: var(--jg-muted) !important; }
.jg-confirm-row strong { font-size: 15px; font-weight: 800; color: var(--jg-text) !important; }
.jg-confirm-total strong { font-size: 26px; color: var(--jg-gold-2) !important; }
.jg-confirm-note { margin: 8px 0 0; font-size: 11px; color: var(--jg-muted) !important; }
.jg-error-line {
    display: none;
    margin: 10px 0 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(239, 68, 68, 0.35);
    font-size: 13px;
    font-weight: 600;
    color: var(--jg-danger-text) !important;
}
.jg-confirm-foot {
    display: flex;
    gap: 10px;
    flex: 0 0 auto;
    padding: 12px 16px calc(14px + var(--jg-safe-bottom));
    border-top: 1px solid var(--jg-line);
    background: var(--jg-surface);
}
.jg-btn {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    border: 0;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .04em;
    text-decoration: none !important;
}
.jg-btn-grey { background: var(--jg-surface-2); border: 1px solid var(--jg-line); color: var(--jg-text) !important; }
.jg-btn-gold {
    background: var(--jg-gold-grad);
    color: #fff !important;
    box-shadow: 0 8px 24px rgba(245, 158, 11, .35);
}

/* Success Sheet */
.jg-success-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 22px 20px 10px; text-align: center; }
.jg-tick {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin: 6px auto 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    font-size: 36px;
    box-shadow: 0 12px 28px rgba(16, 185, 129, .35);
}
.jg-success-balance {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 16px;
    background: var(--jg-panel-grad);
    border: 1px solid var(--jg-line);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--jg-muted) !important;
}
.jg-success-balance strong { font-size: 22px; color: var(--jg-gold-2) !important; }

/* ==========================================================================
   Universal Page Cards, Wallet & List Tiles
   ========================================================================== */
.jg-card {
    border-radius: 18px !important;
    padding: 16px;
    background: var(--jg-surface) !important;
    border: 1px solid var(--jg-line) !important;
    box-shadow: 0 8px 24px var(--jg-shadow) !important;
    margin-bottom: 12px;
}
.jg-card-title {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .02em;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--jg-text) !important;
}
.jg-card-title i { color: var(--jg-gold); }

/* Wallet Hero */
.jg-wallet-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-radius: 20px;
    background: var(--jg-card-grad);
    border: 1px solid var(--jg-line);
    box-shadow: 0 10px 28px var(--jg-shadow);
    margin-bottom: 14px;
}
.jg-wallet-hero .label { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--jg-muted); }
.jg-wallet-hero .amount { font-size: 32px; font-weight: 900; color: var(--jg-gold-2); line-height: 1.1; margin-top: 3px; }
.jg-wallet-hero .hint { font-size: 11px; color: var(--jg-muted); margin-top: 4px; }

/* Menu Navigation List Tiles */
.jg-menu-tile {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--jg-surface);
    border: 1px solid var(--jg-line);
    text-decoration: none !important;
    margin-bottom: 10px;
    box-shadow: 0 4px 16px var(--jg-shadow);
    transition: transform .12s ease;
}
.jg-menu-tile:active { transform: scale(.98); border-color: var(--jg-gold); }
.jg-menu-tile .tile-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    color: #fff;
}
.jg-menu-tile .tile-icon.add { background: linear-gradient(135deg, #10b981, #059669); }
.jg-menu-tile .tile-icon.withdraw { background: linear-gradient(135deg, #ef4444, #dc2626); }
.jg-menu-tile .tile-icon.history { background: linear-gradient(135deg, #f59e0b, #d97706); }
.jg-menu-tile .tile-icon.win { background: linear-gradient(135deg, #f59e0b, #b45309); }
.jg-menu-tile .tile-content { flex: 1 1 auto; min-width: 0; }
.jg-menu-tile .tile-title { font-size: 15px; font-weight: 800; color: var(--jg-text); line-height: 1.2; }
.jg-menu-tile .tile-desc { font-size: 11px; color: var(--jg-muted); margin-top: 2px; }
.jg-menu-tile .tile-arrow { color: var(--jg-muted); font-size: 13px; }

/* Support Banner */
.jg-support-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--jg-panel-grad);
    border: 1px solid var(--jg-line);
    text-decoration: none !important;
    margin-bottom: 14px;
}
.jg-support-banner .info { flex: 1 1 auto; min-width: 0; }
.jg-support-banner .info strong { display: block; font-size: 13px; font-weight: 800; color: var(--jg-text); }
.jg-support-banner .info span { display: block; font-size: 11px; color: var(--jg-muted); }
.jg-support-banner .wa-btn {
    flex: 0 0 auto;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 12px;
    background: #25d366;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none !important;
}

/* Rate Multipliers Items */
.jg-rate-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--jg-surface-2);
    border: 1px solid var(--jg-line);
    margin-bottom: 8px;
}
.jg-rate-item .name { font-size: 14px; font-weight: 800; color: var(--jg-text); }
.jg-rate-item .payout {
    font-size: 13px;
    font-weight: 800;
    color: var(--jg-gold-2);
    padding: 4px 10px;
    border-radius: 10px;
    background: rgba(245, 158, 11, 0.14);
}

/* How to Play Rules */
.jg-rule-card {
    display: flex;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--jg-surface-2);
    border: 1px solid var(--jg-line);
    margin-bottom: 8px;
    align-items: flex-start;
}
.jg-rule-num {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border-radius: 50%;
    background: var(--jg-gold-grad);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
}
.jg-rule-text { font-size: 13px; color: var(--jg-text); line-height: 1.45; flex: 1 1 auto; margin: 0; }

/* Preset Points Buttons */
.jg-preset-chips {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -4px 14px;
}
.jg-preset-chip {
    flex: 1 1 calc(33.333% - 8px);
    min-width: 80px;
    height: 40px;
    margin: 4px;
    border-radius: 12px;
    background: var(--jg-surface-2);
    border: 1px solid var(--jg-line);
    color: var(--jg-gold-2) !important;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform .12s ease;
}
.jg-preset-chip:active {
    transform: scale(.96);
    background: var(--jg-gold-grad);
    color: #fff !important;
}

/* ==========================================================================
   Point Requests Cards (Mobile & Responsive)
   ========================================================================== */
.jg-req-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.jg-req-card {
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--jg-surface-2);
    border: 1px solid var(--jg-line);
    transition: border-color .15s ease;
}
.jg-req-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}
.jg-req-amount {
    display: flex;
    align-items: center;
    gap: 8px;
}
.jg-req-pts {
    font-size: 17px;
    font-weight: 800;
    color: var(--jg-text);
    line-height: 1.2;
}
.jg-req-gateway {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    padding: 2px 7px;
    border-radius: 8px;
    background: var(--jg-surface);
    border: 1px solid var(--jg-line);
    color: var(--jg-muted);
}
.jg-req-status .badge {
    font-size: 11px !important;
    padding: 5px 10px !important;
}
.jg-req-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--jg-line);
    flex-wrap: wrap;
}
.jg-req-txn {
    font-size: 11px;
    color: var(--jg-muted);
    min-width: 0;
    flex: 1 1 auto;
    word-break: break-all;
    line-height: 1.35;
}
.jg-req-txn .label {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-right: 4px;
    color: var(--jg-muted);
}
.jg-req-txn .value {
    color: var(--jg-text);
    font-weight: 600;
    font-family: monospace, sans-serif;
}
.jg-req-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 32px;
    padding: 0 12px;
    border-radius: 10px;
    background: var(--jg-gold-grad);
    color: #fff !important;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .03em;
    text-decoration: none !important;
    border: 0;
    box-shadow: 0 4px 12px rgba(245, 158, 11, .28);
    flex: 0 0 auto;
    cursor: pointer;
    transition: transform .12s ease;
}
.jg-req-btn:active {
    transform: scale(.96);
}

/* ==========================================================================
   UPI Native Checkout Page
   ========================================================================== */
.jg-checkout-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 22px 16px 18px;
    border-radius: 20px;
    background: var(--jg-surface);
    border: 1px solid var(--jg-line);
    margin-bottom: 14px;
    box-shadow: 0 8px 24px var(--jg-shadow);
}
.jg-checkout-label { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--jg-muted); }
.jg-checkout-amount { font-size: 36px; font-weight: 900; color: var(--jg-gold-2); line-height: 1.1; margin: 6px 0; letter-spacing: -.5px; }
.jg-checkout-meta { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--jg-muted); word-break: break-word; }
.jg-checkout-timer {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 20px;
    background: var(--jg-surface-2);
    border: 1px solid var(--jg-line);
    color: var(--jg-text);
}
.jg-checkout-timer i { color: var(--jg-gold); }

.jg-status-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 14px;
    background: var(--jg-surface-2);
    border: 1px solid var(--jg-line);
    font-size: 12px;
    font-weight: 700;
    color: var(--jg-text);
    margin-bottom: 14px;
}
.jg-status-banner.success { background: rgba(16, 185, 129, .12); border-color: rgba(16, 185, 129, .35); color: #10b981; }
.jg-status-banner.failed { background: rgba(239, 68, 68, .12); border-color: rgba(239, 68, 68, .35); color: #ef4444; }
.jg-pulse-dot {
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 rgba(16, 185, 129, .7);
    animation: jgPulse 1.8s infinite;
}
@keyframes jgPulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, .7); }
    70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.jg-checkout-card {
    border-radius: 18px;
    padding: 16px;
    background: var(--jg-surface);
    border: 1px solid var(--jg-line);
    margin-bottom: 14px;
    box-shadow: 0 6px 18px var(--jg-shadow);
}
.jg-checkout-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.jg-checkout-title { font-size: 14px; font-weight: 800; color: var(--jg-text); display: flex; align-items: center; gap: 8px; margin: 0; }
.jg-checkout-title i { color: var(--jg-gold); }
.jg-fast-tag {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 8px;
    background: rgba(16, 185, 129, .15);
    color: #10b981;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.jg-master-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 52px;
    border-radius: 14px;
    background: var(--jg-gold-grad);
    color: #fff !important;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none !important;
    border: 0;
    box-shadow: 0 6px 20px rgba(245, 158, 11, .35);
    margin-bottom: 12px;
    cursor: pointer;
    transition: transform .12s ease;
}
.jg-master-btn:active { transform: scale(.98); }

.jg-app-tile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--jg-surface-2);
    border: 1px solid var(--jg-line);
    text-decoration: none !important;
    margin-bottom: 10px;
    transition: transform .12s ease, border-color .12s ease;
    cursor: pointer;
}
.jg-app-tile:active { transform: scale(.98); border-color: var(--jg-gold); }
.jg-app-tile:last-child { margin-bottom: 0; }
.jg-app-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .15);
    overflow: hidden;
}
.jg-app-info { flex: 1 1 auto; min-width: 0; }
.jg-app-info strong { display: block; font-size: 14px; font-weight: 800; color: var(--jg-text); line-height: 1.2; }
.jg-app-info span { display: block; font-size: 11px; font-weight: 600; color: var(--jg-muted); margin-top: 2px; }
.jg-app-arrow { color: var(--jg-muted); font-size: 12px; flex: 0 0 auto; margin-left: auto; }

/* 2x2 Grid for Payment App Cards (Explicit 2 Rows x 2 Cards) */
.jg-app-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}
.jg-app-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10px;
    width: 100%;
}
.jg-app-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    width: 100%;
}
.jg-app-card {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 14px 8px;
    border-radius: 14px;
    background: var(--jg-surface-2);
    border: 1.5px solid var(--jg-line);
    text-decoration: none !important;
    box-sizing: border-box;
    transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
    cursor: pointer;
}
.jg-app-card:active {
    transform: scale(.96);
    border-color: var(--jg-gold);
}
.jg-app-card .jg-app-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 14px;
    margin-bottom: 8px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, .08);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.jg-app-card-title {
    display: block;
    font-size: 13.5px;
    font-weight: 800;
    color: var(--jg-text) !important;
    line-height: 1.25;
}
.jg-app-card-sub {
    display: block;
    font-size: 10.5px;
    font-weight: 600;
    color: var(--jg-muted) !important;
    margin-top: 2px;
}

.jg-qr-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 10px 0; }
.jg-qr-frame {
    width: 220px;
    height: 220px;
    padding: 8px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.jg-qr-frame img { width: 100%; height: 100%; display: block; border-radius: 8px; }
.jg-vpa-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 100%;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    background: var(--jg-surface-2);
    border: 1px solid var(--jg-line);
    font-size: 12px;
    color: var(--jg-text);
    margin-top: 4px;
    word-break: break-all;
}
.jg-vpa-copy-btn { background: none; border: 0; color: var(--jg-gold-2); padding: 0 0 0 4px; font-size: 13px; cursor: pointer; }
.jg-gateway-link {
    font-size: 12px;
    font-weight: 700;
    color: var(--jg-muted) !important;
    text-decoration: underline !important;
}
.pay-hint {
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--jg-muted) !important;
    margin-bottom: 12px;
}
.pay-panel { margin-bottom: 14px; }
.pay-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--jg-muted) !important;
}
.pay-vpa { gap: 8px; flex-wrap: wrap; }
.pay-vpa strong { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; color: var(--jg-text) !important; }

.jg-verify-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 48px;
    border-radius: 14px;
    background: var(--jg-surface-2);
    border: 1px solid var(--jg-line);
    color: var(--jg-text);
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 10px;
    cursor: pointer;
    transition: transform .12s ease;
}
.jg-verify-btn:active { transform: scale(.98); border-color: var(--jg-gold); }

/* ==========================================================================
   Forms, Buttons, Tables & Utility Overrides
   ========================================================================== */
.form-control {
    background: var(--jg-surface-2) !important;
    border: 1px solid var(--jg-line) !important;
    color: var(--jg-text) !important;
    border-radius: 14px !important;
    height: 48px !important;
    box-shadow: none !important;
}
.form-control:focus {
    border-color: var(--jg-gold) !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, .2) !important;
}
.form-control::placeholder { color: var(--jg-placeholder) !important; }

.btn {
    border-radius: 14px !important;
    font-weight: 700 !important;
    letter-spacing: .02em;
}
.btn-success {
    background: var(--jg-gold-grad) !important;
    border: 0 !important;
    color: #fff !important;
    box-shadow: 0 8px 20px rgba(245, 158, 11, .3) !important;
}
.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
    border: 0 !important;
}
.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    border: 0 !important;
}
.btn-outline-gold {
    background: transparent !important;
    border: 1px solid var(--jg-line) !important;
    color: var(--jg-gold-2) !important;
    border-radius: 12px !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
}

.table { color: var(--jg-text) !important; background: transparent !important; }
.table thead th {
    background: rgba(245, 158, 11, .1) !important;
    color: var(--jg-gold-2) !important;
    border-color: var(--jg-line) !important;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    white-space: nowrap;
}
.table td, .table th { border-color: var(--jg-table-line) !important; vertical-align: middle; }
body.jg-app .table td { background-color: transparent !important; color: var(--jg-text) !important; }
.table-striped tbody tr:nth-of-type(odd) { background: var(--jg-stripe) !important; }
body.jg-app .btn-outline-dark {
    color: var(--jg-text) !important;
    border: 1px solid var(--jg-line) !important;
    background: var(--jg-surface-2) !important;
}
body.jg-app input[type="date"].form-control {
    min-width: 0;
    padding: 0 10px !important;
    font-size: 13px;
}

.badge {
    border-radius: 999px !important;
    padding: 5px 10px !important;
    font-weight: 700 !important;
    font-size: 11px !important;
}
.alert {
    border-radius: 14px !important;
    border: 1px solid var(--jg-line) !important;
}
.alert-danger { background: rgba(239, 68, 68, 0.12) !important; color: var(--jg-danger-text) !important; }
.alert-success { background: rgba(16, 185, 129, 0.12) !important; color: #10b981 !important; }

.color-highlight { color: var(--jg-gold-2) !important; }
.bg-highlight { background: var(--jg-gold-grad) !important; color: #fff !important; }

.jg-toast {
    position: fixed;
    left: 50%;
    bottom: calc(90px + var(--jg-safe-bottom));
    transform: translateX(-50%);
    z-index: 99999;
    background: var(--jg-toast-bg);
    color: var(--jg-gold-2);
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 8px 24px var(--jg-shadow);
    transition: opacity .25s ease;
}
.jg-toast-out { opacity: 0; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--jg-scroll); }
::-webkit-scrollbar-thumb { background: var(--jg-scroll-thumb); border-radius: 3px; }

/* Language List */
.jg-lang-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 8px 16px calc(20px + var(--jg-safe-bottom));
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.jg-lang-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--jg-surface-2);
    border: 1px solid var(--jg-line);
    font-size: 15px;
    font-weight: 700;
    color: var(--jg-text) !important;
    text-decoration: none !important;
}
.jg-lang-row.is-active {
    border-color: var(--jg-gold);
    background: var(--jg-panel-grad);
}
.jg-lang-row i { color: #10b981; }

/* Theme Switch */
.theme-switch {
    background: var(--jg-surface);
    padding: 14px 16px 18px;
    border-top: 1px solid var(--jg-line);
}
.theme-switch-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--jg-muted) !important;
    margin-bottom: 10px;
}
.result-side-toggle { display: flex; gap: 8px; }
.result-side-btn {
    flex: 1;
    border: 1px solid var(--jg-line);
    background: transparent;
    color: inherit;
    border-radius: 12px;
    padding: 10px 0;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}
.result-side-btn.active {
    background: var(--jg-gold-grad);
    border-color: var(--jg-gold-2);
    color: #fff;
}

/* ==========================================================================
   Auth Pages (Login & Register) - Modern Matka Game Shell
   ========================================================================== */
.auth-topbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    max-width: 520px;
    margin: 0 auto;
    padding: calc(12px + var(--jg-safe-top)) 16px 0;
}
.auth-theme-pill {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--jg-surface-2);
    border: 1px solid var(--jg-line);
    color: var(--jg-gold-2) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 4px 12px var(--jg-shadow);
    transition: transform .12s ease;
}
.auth-theme-pill:active { transform: scale(.95); }

.auth-hero {
    text-align: center;
    padding: 16px 16px 14px;
    max-width: 520px;
    margin: 0 auto;
}
.auth-logo-frame {
    width: 88px;
    height: 88px;
    margin: 0 auto 12px;
    border-radius: 24px;
    padding: 4px;
    background: var(--jg-gold-grad);
    box-shadow: 0 10px 28px rgba(245, 158, 11, .4);
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-logo {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    object-fit: cover;
    background: var(--jg-surface);
    display: block;
    margin: 0 auto;
    box-shadow: 0 10px 24px var(--jg-shadow);
}
.auth-hero h1 {
    margin: 10px 0 2px;
    font-size: 26px;
    font-weight: 900;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--jg-text) !important;
    line-height: 1.2;
}
.auth-hero p {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--jg-gold-2) !important;
}

.auth-wrap {
    max-width: 520px;
    margin: 0 auto;
    padding: 0 14px calc(32px + var(--jg-safe-bottom));
}
.auth-card {
    border-radius: 22px !important;
    background: var(--jg-surface) !important;
    border: 1px solid var(--jg-line) !important;
    box-shadow: 0 12px 36px var(--jg-shadow) !important;
}
.auth-card .content {
    padding: 20px 18px 18px !important;
    margin: 0 !important;
}
.auth-label {
    display: block;
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--jg-muted) !important;
}
.auth-field {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 52px;
    padding: 0 14px;
    margin: 0 0 14px;
    border-radius: 14px;
    background: var(--jg-surface-2);
    border: 1px solid var(--jg-line);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.auth-field:focus-within {
    border-color: var(--jg-gold) !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, .2) !important;
}
.auth-field i {
    flex: 0 0 20px;
    width: 20px;
    text-align: center;
    font-size: 16px;
    color: var(--jg-gold);
}
.auth-field input {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    color: var(--jg-text) !important;
    font-size: 15px;
    font-weight: 600;
    box-shadow: none !important;
}
.auth-field input::placeholder {
    color: var(--jg-placeholder) !important;
    font-weight: 400;
}
.auth-eye {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}
.auth-eye i {
    color: var(--jg-muted) !important;
    font-size: 15px;
}
.auth-eye:active { background: var(--jg-line); }

.auth-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 52px;
    margin-top: 6px;
    border: 0 !important;
    border-radius: 14px !important;
    background: var(--jg-gold-grad) !important;
    color: #fff !important;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    box-shadow: 0 10px 24px rgba(245, 158, 11, .35) !important;
    cursor: pointer;
    transition: transform .12s ease;
}
.auth-primary:active { transform: scale(.98); }

.auth-secondary {
    display: block;
    margin-top: 14px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--jg-gold-2) !important;
    text-decoration: none !important;
}
.auth-secondary:hover { text-decoration: underline !important; }

.auth-support {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}
.auth-support a {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid var(--jg-line);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    transition: transform .12s ease;
}
.auth-support a:active { transform: scale(.98); }
.auth-support .wa {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.30);
    color: #10b981 !important;
}
.auth-support .call {
    background: rgba(59, 130, 246, 0.10);
    border-color: rgba(59, 130, 246, 0.25);
    color: #3b82f6 !important;
}
.auth-note {
    margin: 16px 0 0;
    text-align: center;
    font-size: 11px;
    line-height: 1.5;
    color: var(--jg-muted) !important;
}
.auth-note strong { color: var(--jg-gold-2) !important; }

/* ==========================================================================
   Modern Matka User Interface Overhaul (Screenshots 1, 2, 3, 4)
   ========================================================================== */

/* Top App Bar Modern Row */
.jg-top-bar-modern {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 !important;
    gap: 8px !important;
    min-height: 38px;
    width: 100%;
    box-sizing: border-box;
}
.jg-top-bar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}
.jg-top-bar-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}
.jg-icon-box {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 10px;
    background: #8a3f12;
    color: #ffffff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border: none;
    text-decoration: none !important;
    transition: transform .12s ease;
}
.jg-icon-box:active { transform: scale(.95); }
.jg-user-pill {
    background: #8a3f12;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 12.5px;
    padding: 6px 11px;
    height: 36px;
    max-width: 124px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    flex: 0 1 auto;
    min-width: 0;
}
.jg-user-pill .jg-user-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    color: #ffffff !important;
}
.jg-balance-pill-badge {
    background: #f7eee2;
    color: #1c1917 !important;
    font-weight: 800;
    font-size: 13px;
    height: 36px;
    padding: 0 11px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(138, 63, 18, 0.25);
    text-decoration: none !important;
    white-space: nowrap;
}
.theme-dark .jg-balance-pill-badge {
    background: #252836;
    color: #f59e0b !important;
    border-color: rgba(245, 158, 11, 0.3);
}

/* Golden Hero Banner Card */
.jg-hero-banner-card {
    background: linear-gradient(135deg, #facc15 0%, #ca8a04 100%);
    border-radius: 18px;
    padding: 14px 14px 16px;
    margin: 8px 12px 14px;
    box-shadow: 0 8px 24px rgba(202, 138, 4, 0.28);
    position: relative;
    overflow: visible;
    overflow: clip;
    box-sizing: border-box;
    touch-action: pan-y;
}
.jg-page-body > .jg-hero-banner-card {
    margin: 0 0 14px;
}
.theme-dark .jg-hero-banner-card {
    background: linear-gradient(135deg, #b45309 0%, #78350f 100%);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.jg-hero-marquee {
    background: rgba(0, 0, 0, 0.12);
    padding: 7px 12px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 12px;
    line-height: 1.35;
    color: #1c1917;
    text-align: center;
    margin-bottom: 12px;
    letter-spacing: 0.2px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
}
.theme-dark .jg-hero-marquee {
    background: rgba(0, 0, 0, 0.25);
    color: #fef08a;
}
.jg-hero-quick-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}
.jg-hero-quick-btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 40px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.92);
    color: #1c1917 !important;
    font-weight: 800;
    font-size: 12px;
    line-height: 1.25;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 8px 10px;
    border-radius: 24px;
    text-decoration: none !important;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: transform .12s ease;
}
.jg-hero-quick-btn:active { transform: scale(.98); }
.theme-dark .jg-hero-quick-btn {
    background: rgba(30, 41, 59, 0.92);
    color: #f8fafc !important;
    border-color: rgba(255, 255, 255, 0.1);
}
.jg-play-tri,
.jg-hero-quick-icon {
    font-size: 12px;
    color: #854d0e;
    flex-shrink: 0;
}
.theme-dark .jg-hero-quick-icon {
    color: #fbbf24;
}
.jg-hero-expert-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 14px;
    padding: 10px 14px;
    margin-bottom: 14px;
    text-decoration: none !important;
    color: #1c1917 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform .12s ease;
}
.jg-hero-expert-card:active { transform: scale(.99); }
.theme-dark .jg-hero-expert-card {
    background: #1e293b;
    color: #f8fafc !important;
}
.jg-expert-badge {
    background: #fef08a;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #854d0e;
    font-size: 15px;
    flex-shrink: 0;
}
.jg-expert-text {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.jg-expert-text strong {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.3px;
    line-height: 1.25;
}
.jg-expert-text small {
    font-size: 11px;
    color: #64748b;
    line-height: 1.3;
    margin-top: 1px;
}
.theme-dark .jg-expert-text small { color: #94a3b8; }
.jg-expert-arrow {
    color: #94a3b8;
    font-size: 13px;
    flex-shrink: 0;
}
.jg-hero-actions-row {
    display: flex;
    gap: 10px;
}
.jg-hero-btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 44px;
    height: auto;
    padding: 9px 10px;
    border-radius: 12px;
    color: #ffffff !important;
    font-weight: 800;
    font-size: 13px;
    line-height: 1.2;
    text-align: center;
    letter-spacing: 0.4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    text-decoration: none !important;
    transition: transform .12s ease;
}
.jg-hero-btn:active { transform: scale(.98); }
.jg-hero-btn.add {
    background: #16a34a;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.35);
}
.jg-hero-btn.withdraw {
    background: #dc2626;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}

/* Modern Market Card (Screenshot 1) */
.jg-market-card-v2 {
    background: var(--jg-surface);
    border-radius: 16px;
    padding: 14px 14px 12px;
    margin: 0 0 14px;
    border: 1px solid var(--jg-line);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    transition: transform .15s ease;
    touch-action: pan-y;
}
.jg-mc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}
.jg-mc-icon-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #ffffff;
    flex-shrink: 0;
}
.jg-mc-icon-badge.bg-open { background: #16a34a; }
.jg-mc-icon-badge.bg-lock { background: #dc2626; }
.jg-mc-icon-badge.bg-holiday { background: #f59e0b; color: #1c1917; }
.jg-mc-title-center {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    padding: 0 4px;
}
.jg-mc-title-center strong {
    display: block;
    font-size: 15.5px;
    font-weight: 800;
    letter-spacing: 0.4px;
    line-height: 1.25;
    color: var(--jg-text);
    text-transform: uppercase;
    word-break: break-word;
}
.jg-mc-status {
    flex: 0 0 auto;
}
.jg-mc-badge-status {
    display: inline-block;
    font-weight: 800;
    font-size: 10px;
    padding: 4px 9px;
    border-radius: 8px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    white-space: nowrap;
}
.jg-mc-badge-status.is-open {
    background: rgba(22, 163, 74, 0.14);
    color: #16a34a;
}
.jg-mc-badge-status.is-closed {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}
.jg-mc-badge-status.is-holiday {
    background: rgba(245, 158, 11, 0.14);
    color: #d97706;
}
.jg-mc-time-bar {
    background: #fef3c7;
    color: #92400e;
    padding: 6px 10px;
    border-radius: 14px;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
}
.theme-dark .jg-mc-time-bar {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}
.jg-mc-result-box {
    background: #f1f5f9;
    border-radius: 24px;
    padding: 10px 14px;
    text-align: center;
    margin-bottom: 12px;
    border: 1px solid rgba(0, 0, 0, 0.04);
}
.theme-dark .jg-mc-result-box {
    background: #14161f;
    border-color: rgba(255, 255, 255, 0.05);
}
.jg-mc-digits {
    font-size: 19px;
    font-weight: 900;
    letter-spacing: 3px;
    color: var(--jg-text);
}
.jg-mc-actions {
    display: flex;
    gap: 10px;
}
.jg-mc-btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 42px;
    height: auto;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    letter-spacing: 0.4px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    transition: transform .12s ease;
}
.jg-mc-btn:active { transform: scale(.98); }
.jg-mc-chart-btn {
    background: #f1f5f9;
    color: #475569 !important;
    border: 1px solid #cbd5e1;
}
.theme-dark .jg-mc-chart-btn {
    background: #262936;
    color: #cbd5e1 !important;
    border-color: #3f4458;
}
.jg-mc-play-btn {
    background: #16a34a;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.32);
}
.jg-mc-closed-btn {
    background: #991b1b;
    color: #ffffff !important;
    cursor: default;
}
.jg-mc-holiday-btn {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1c1917 !important;
    border: 1px solid rgba(217, 119, 6, 0.35);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
    cursor: default;
}
.jg-mc-holiday-btn i { color: #1c1917 !important; }

/* Bottom Tab Bar with Center Floating Sync Button */
.jg-tabbar-5 {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 64px;
    height: auto !important;
    padding: 6px 6px calc(6px + var(--jg-safe-bottom));
    gap: 2px;
}
.jg-tabbar-5 .jg-tab {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
}
.jg-tabbar-5 .jg-tab span {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 9.5px;
    line-height: 1.15;
}
.jg-tab-center {
    flex: 0 0 58px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
}
.jg-tab-center-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #facc15 0%, #ca8a04 100%);
    color: #1c1917;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-top: -24px;
    box-shadow: 0 6px 18px rgba(202, 138, 4, 0.45);
    border: 3px solid #ffffff;
    transition: transform .2s ease;
}
.theme-dark .jg-tab-center-btn {
    border-color: #1e2029;
}
.jg-tab-center:active .jg-tab-center-btn {
    transform: rotate(180deg) scale(0.92);
}

/* Game Type Selection Grid (Screenshot 2) */
.jg-gt-header-maroon {
    background: #7f1d1d !important;
    color: #ffffff !important;
    padding: 12px 14px !important;
    gap: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex: 0 0 auto !important;
    border-radius: 20px 20px 0 0 !important;
}
.jg-gt-header-maroon h4 {
    margin: 0;
    color: #ffffff !important;
    flex: 1 1 auto;
    min-width: 0;
    text-align: center;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: 0.4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.jg-gt-header-maroon a {
    color: #ffffff !important;
    font-size: 16px;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
}
.jg-gt-header-maroon .badge {
    flex: 0 0 auto;
    white-space: nowrap;
}
.jg-game-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px 14px calc(24px + var(--jg-safe-bottom));
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.jg-gt-card {
    background: var(--jg-surface);
    border-radius: 14px;
    border: 1px solid var(--jg-line);
    padding: 16px 10px 14px;
    text-align: center;
    text-decoration: none !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform .12s ease;
}
.jg-gt-card:active { transform: scale(.96); }
.jg-gt-icon {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #ffffff;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.jg-gt-card strong {
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: 0.4px;
    color: var(--jg-text);
    text-transform: uppercase;
    line-height: 1.3;
    word-break: break-word;
}
.jg-gt-card small {
    font-size: 11px;
    color: var(--jg-muted);
    font-weight: 600;
    margin-top: 3px;
}

/* Icon Gradients */
.jg-icon-yellow   { background: linear-gradient(135deg, #facc15 0%, #ca8a04 100%); }
.jg-icon-gold     { background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%); }
.jg-icon-purple   { background: linear-gradient(135deg, #a855f7 0%, #7e22ce 100%); }
.jg-icon-red      { background: linear-gradient(135deg, #f97316 0%, #ea580c 100%); }
.jg-icon-blue     { background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%); }
.jg-icon-pink     { background: linear-gradient(135deg, #ec4899 0%, #be185d 100%); }
.jg-icon-cyan     { background: linear-gradient(135deg, #06b6d4 0%, #0e7490 100%); }
.jg-icon-magenta  { background: linear-gradient(135deg, #d946ef 0%, #a21caf 100%); }
.jg-icon-amber    { background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%); }
.jg-icon-green    { background: linear-gradient(135deg, #10b981 0%, #047857 100%); }

/* Bidding Sheet Dual-Mode (Screenshots 3 & 4) */
.jg-mode-switcher {
    display: flex;
    gap: 8px;
    padding: 10px 14px 6px;
    background: var(--jg-surface);
    flex: 0 0 auto;
}
.jg-mode-tab {
    flex: 1 1 0;
    min-width: 0;
    min-height: 40px;
    height: auto;
    padding: 8px 8px;
    line-height: 1.2;
    text-align: center;
    border-radius: 20px;
    border: none;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 0.4px;
    cursor: pointer;
    background: #f1f5f9;
    color: #64748b;
    transition: all .2s ease;
}
.theme-dark .jg-mode-tab {
    background: #262936;
    color: #94a3b8;
}
.jg-mode-tab.is-active {
    background: #7f1d1d !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(127, 29, 29, 0.35);
}

.jg-date-session-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 14px 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--jg-text);
    flex: 0 0 auto;
}
.jg-session-select {
    padding: 4px 10px;
    min-height: 32px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 800;
    border: 1px solid var(--jg-line);
    background: var(--jg-surface);
    color: var(--jg-text);
}

#regularModeSection,
#easyModeSection {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.jg-quick-filter-row {
    display: flex;
    gap: 6px;
    padding: 4px 14px 10px;
    flex: 0 0 auto;
}
.jg-qf-btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 34px;
    height: auto;
    padding: 6px 4px;
    line-height: 1.2;
    text-align: center;
    border-radius: 17px;
    background: #7f1d1d;
    color: #ffffff;
    font-weight: 800;
    font-size: 11px;
    border: none;
    letter-spacing: 0.3px;
    transition: transform .12s ease;
}
.jg-qf-btn:active { transform: scale(.95); }
.jg-qf-btn.clear { background: #dc2626; }

/* Predefined Number Grid (Screenshot 3) */
.jg-pred-grid {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-content: start;
    gap: 10px;
    padding: 6px 14px 18px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.jg-pred-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 24px 12px;
    font-size: 13px;
    color: var(--jg-muted);
    margin: 0;
}
.jg-pred-row {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.jg-pred-num {
    min-width: 48px;
    width: auto;
    height: 44px;
    padding: 0 8px;
    border-radius: 10px;
    background: #334155;
    color: #ffffff;
    font-weight: 900;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    user-select: none;
}
.theme-dark .jg-pred-num { background: #1e293b; }
.jg-pred-input {
    flex: 1 1 0;
    min-width: 0;
    width: 100%;
    height: 44px;
    border-radius: 10px;
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    text-align: center;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    padding: 0 4px;
}
.theme-dark .jg-pred-input {
    background: #0f172a;
    color: #f8fafc;
    border-color: #334155;
}
.jg-pred-input:focus {
    border-color: #7f1d1d;
    outline: none;
}

/* Easy Mode Input Form (Screenshot 4) */
.jg-easy-form {
    flex: 1 1 auto;
    min-height: 0;
    padding: 12px 14px 18px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.jg-easy-label {
    display: block;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--jg-text);
    margin-bottom: 6px;
}
.jg-easy-num-input {
    width: 100%;
    height: 48px;
    border-radius: 12px;
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    padding: 0 16px;
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 12px;
}
.theme-dark .jg-easy-num-input {
    background: #0f172a;
    color: #f8fafc;
    border-color: #334155;
}
.jg-easy-pts-row {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}
.jg-easy-pts-input {
    flex: 1 1 0;
    min-width: 0;
    height: 48px;
    border-radius: 12px;
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    padding: 0 16px;
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
}
.theme-dark .jg-easy-pts-input {
    background: #0f172a;
    color: #f8fafc;
    border-color: #334155;
}
.jg-easy-add-btn {
    width: 52px;
    height: 48px;
    border-radius: 12px;
    background: #7f1d1d;
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform .12s ease;
}
.jg-easy-add-btn:active { transform: scale(.94); }

.jg-easy-bids-list {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.jg-easy-bid-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--jg-surface);
    border: 1px solid var(--jg-line);
    border-radius: 10px;
    padding: 8px 12px;
    gap: 8px;
}
.jg-ebi-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}
.jg-ebi-num {
    font-weight: 900;
    font-size: 16px;
    color: var(--jg-text);
}
.jg-ebi-session {
    font-size: 11px;
    font-weight: 800;
    background: rgba(127, 29, 29, 0.12);
    color: #7f1d1d;
    padding: 2px 8px;
    border-radius: 6px;
}
.theme-dark .jg-ebi-session {
    background: rgba(248, 113, 113, 0.16);
    color: #fca5a5;
}
.jg-ebi-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.jg-ebi-pts {
    font-weight: 800;
    font-size: 14px;
    color: #16a34a;
}
.jg-ebi-del {
    background: none;
    border: none;
    color: #dc2626;
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
}

/* Sticky Bidding Footer Bar */
.jg-bidding-footer {
    position: relative;
    flex: 0 0 auto;
    min-height: 64px;
    height: auto;
    background: var(--jg-surface);
    border-top: 1px solid var(--jg-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px calc(10px + var(--jg-safe-bottom));
    z-index: 10;
}
.jg-bf-info {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
}
.jg-bf-total {
    font-size: 14.5px;
    font-weight: 900;
    color: var(--jg-text);
    line-height: 1.25;
}
.jg-bf-wallet {
    font-size: 11px;
    font-weight: 700;
    color: #16a34a;
    line-height: 1.25;
}
.jg-bf-submit-btn {
    flex: 0 0 auto;
    white-space: nowrap;
    min-height: 44px;
    height: auto;
    padding: 10px 18px;
    border-radius: 12px;
    background: linear-gradient(135deg, #b91c1c 0%, #7f1d1d 100%);
    color: #ffffff;
    font-weight: 900;
    font-size: 13px;
    letter-spacing: 0.4px;
    border: none;
    box-shadow: 0 4px 14px rgba(185, 28, 28, 0.4);
    cursor: pointer;
    transition: transform .12s ease;
}
.jg-bf-submit-btn:active { transform: scale(.97); }

/* ==========================================================================
   Market Result Chart Page Styles
   ========================================================================== */
.jg-chart-hero {
    background: var(--jg-surface);
    border: 1px solid var(--jg-line);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.jg-chart-tabs {
    display: flex;
    background: var(--jg-surface-2);
    padding: 4px;
    border-radius: 12px;
    gap: 4px;
    border: 1px solid var(--jg-line);
}
.jg-chart-tab {
    flex: 1 1 0;
    min-width: 0;
    min-height: 38px;
    height: auto;
    padding: 8px 6px;
    line-height: 1.2;
    text-align: center;
    border-radius: 9px;
    background: transparent;
    color: var(--jg-muted);
    font-weight: 800;
    font-size: 12px;
    border: none;
    cursor: pointer;
    transition: all .15s ease;
}
.jg-chart-tab.is-active {
    background: linear-gradient(135deg, #b91c1c 0%, #7f1d1d 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(185, 28, 28, 0.35);
}

/* List View Items */
.jg-chart-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.jg-chart-item {
    background: var(--jg-surface);
    border: 1px solid var(--jg-line);
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.jg-ci-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--jg-line);
}
.jg-ci-date {
    font-size: 12px;
    font-weight: 700;
    color: var(--jg-text);
}
.jg-ci-day {
    font-size: 11px;
    font-weight: 800;
    color: #7f1d1d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.theme-dark .jg-ci-day { color: #f87171; }
.jg-ci-result-row {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 8px;
}
.jg-ci-panna {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--jg-surface-2);
    border-radius: 10px;
    padding: 6px 4px;
    border: 1px solid var(--jg-line);
}
.jg-ci-lbl {
    font-size: 9px;
    font-weight: 800;
    color: var(--jg-muted);
    letter-spacing: 0.5px;
}
.jg-ci-val {
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 1px;
    color: var(--jg-text);
}
.jg-ci-jodi {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.15) 0%, rgba(202, 138, 4, 0.25) 100%);
    border: 1.5px solid var(--jg-gold-2);
    border-radius: 12px;
    padding: 8px 6px;
}
.jg-ci-jodi-val {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--jg-gold-text);
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Matrix Table View */
.jg-matrix-card {
    background: var(--jg-surface);
    border: 1px solid var(--jg-line);
    border-radius: 14px;
    padding: 8px;
    overflow-x: auto;
}
.jg-matrix-table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    text-align: center;
}
.jg-matrix-table th {
    background: #7f1d1d;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    padding: 8px 4px;
    border: 1px solid #991b1b;
    letter-spacing: 0.5px;
}
.jg-matrix-cell {
    border: 1px solid var(--jg-line);
    padding: 6px 3px;
    vertical-align: middle;
}
.jg-matrix-cell.has-data {
    background: var(--jg-surface-2);
}
.jg-mc-panna {
    font-size: 11px;
    font-weight: 700;
    color: var(--jg-muted);
}
.jg-mc-jodi {
    font-size: 15px;
    font-weight: 900;
    color: #b91c1c;
}
.theme-dark .jg-mc-jodi { color: #f87171; }

/* Quick Points Chip Selector (Step 3) */
.jg-quick-chips-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px 8px;
    flex: 0 0 auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.jg-qcb-lbl {
    font-size: 11px;
    font-weight: 800;
    color: var(--jg-muted);
    flex-shrink: 0;
}
.jg-qcb-chip {
    flex: 0 0 auto;
    padding: 4px 12px;
    border-radius: 14px;
    background: var(--jg-surface-2);
    border: 1px solid var(--jg-line);
    color: var(--jg-text);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all .12s ease;
}
.jg-qcb-chip:active { transform: scale(.95); }
.jg-qcb-chip.is-active {
    background: #b91c1c;
    color: #ffffff;
    border-color: #991b1b;
    box-shadow: 0 2px 6px rgba(185, 28, 28, 0.3);
}

/* ==========================================================================
   Played History Market Groups & Cards (played-list.php)
   ========================================================================== */
.jg-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.jg-hist-market {
    background: var(--jg-surface);
    border: 1px solid var(--jg-line);
    border-radius: 16px;
    padding: 12px 12px 6px;
    box-shadow: 0 4px 14px var(--jg-shadow);
}
.jg-hist-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--jg-line);
}
.jg-hist-head strong {
    font-size: 14.5px;
    font-weight: 800;
    color: var(--jg-text) !important;
    min-width: 0;
    word-break: break-word;
}
.jg-hist-head span {
    font-size: 14px;
    font-weight: 900;
    color: var(--jg-gold-2) !important;
    white-space: nowrap;
    flex-shrink: 0;
}
.jg-bet-points {
    font-size: 15px;
    font-weight: 900;
    color: var(--jg-gold-2) !important;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ==========================================================================
   Side Drawer Menu (#menu-main) Mobile Flex Overhaul
   ========================================================================== */
#menu-main.menu {
    background: var(--jg-surface) !important;
    color: var(--jg-text) !important;
    top: 0 !important;
    bottom: 0 !important;
    padding-top: var(--jg-safe-top) !important;
    padding-bottom: calc(16px + var(--jg-safe-bottom)) !important;
}
#menu-main .menu-logo {
    padding: 16px 12px 10px !important;
    border-bottom: 1px solid var(--jg-line);
}
#menu-main .menu-items {
    margin-bottom: 14px !important;
    padding: 8px 6px 0;
}
#menu-main .menu-items h5 {
    padding-left: 10px !important;
    margin-bottom: 6px !important;
}
#menu-main .menu-items a {
    display: flex !important;
    align-items: center !important;
    gap: 12px;
    min-height: 44px;
    padding: 8px 10px !important;
    line-height: 1.3 !important;
    border-bottom: 1px solid var(--jg-line) !important;
    text-decoration: none !important;
    position: relative;
}
#menu-main .menu-items a i:first-child {
    position: static !important;
    width: 22px !important;
    height: auto !important;
    line-height: 1 !important;
    font-size: 15px !important;
    flex: 0 0 22px;
    text-align: center;
}
#menu-main .menu-items a span {
    padding-left: 0 !important;
    line-height: 1.3 !important;
    font-size: 13.5px !important;
    font-weight: 600;
    color: var(--jg-text) !important;
    flex: 1 1 auto;
    min-width: 0;
    white-space: normal;
    word-break: break-word;
}
#menu-main .menu-items a em {
    position: static !important;
    margin: 0 0 0 auto !important;
    flex: 0 0 auto;
    line-height: 1.2 !important;
}
#menu-main .menu-items a i:last-child:not(:first-child) {
    position: static !important;
    width: auto !important;
    line-height: 1 !important;
    font-size: 12px !important;
    opacity: 0.5 !important;
    flex: 0 0 auto;
    margin-left: auto;
    transform: none !important;
    color: var(--jg-muted) !important;
}
#menu-main .submenu a {
    padding-left: 24px !important;
    min-height: 40px;
}

/* ==========================================================================
   Dark Mode Span / Table Contrast Guards (Override style.css .theme-dark span)
   ========================================================================== */
html.theme-dark body.jg-app .jg-appbar-title span { color: var(--jg-muted) !important; }
html.theme-dark body.jg-app .jg-balance-pill-badge span { color: #fbbf24 !important; }
html.theme-dark body.jg-app .jg-tabbar .jg-tab span,
html.theme-dark body.jg-app .jg-tabbar .jg-tab i { color: var(--jg-muted) !important; }
html.theme-dark body.jg-app .jg-tabbar .jg-tab.is-active span,
html.theme-dark body.jg-app .jg-tabbar .jg-tab.is-active i { color: var(--jg-gold-2) !important; }
html.theme-dark body.jg-app .jg-step-pill span { color: var(--jg-muted) !important; }
html.theme-dark body.jg-app .jg-step-pill.is-active span { color: #ffffff !important; }
html.theme-dark body.jg-app .jg-mc-badge-status.is-open { color: #34d399 !important; }
html.theme-dark body.jg-app .jg-mc-badge-status.is-closed { color: #f87171 !important; }
html.theme-dark body.jg-app .jg-mc-badge-status.is-holiday { color: #fbbf24 !important; }
html.theme-dark body.jg-app .jg-mc-holiday-btn,
html.theme-dark body.jg-app .jg-mc-holiday-btn i { color: #1c1917 !important; }
html.theme-dark body.jg-app .jg-mc-closed-btn,
html.theme-dark body.jg-app .jg-mc-closed-btn i { color: #ffffff !important; }
html.theme-dark body.jg-app .jg-mc-time-bar span { color: #fbbf24 !important; }
html.theme-dark body.jg-app .jg-mc-digits { color: #f8fafc !important; }
html.theme-dark body.jg-app .jg-fast-tag { color: #34d399 !important; }
html.theme-dark body.jg-app .jg-ci-lbl { color: var(--jg-muted) !important; }
html.theme-dark body.jg-app .jg-ci-day { color: #f87171 !important; }
html.theme-dark body.jg-app .jg-ci-jodi-val { color: var(--jg-gold-text) !important; }
html.theme-dark body.jg-app .jg-matrix-table th {
    background-color: #7f1d1d !important;
    color: #ffffff !important;
    border-color: #991b1b !important;
}
html.theme-dark body.jg-app .jg-matrix-cell.has-data { background-color: var(--jg-surface-2) !important; }
html.theme-dark body.jg-app .jg-ebi-session { color: #fca5a5 !important; }
html.theme-dark body.jg-app .jg-ebi-pts { color: #34d399 !important; }
html.theme-dark body.jg-app .jg-qcb-lbl { color: var(--jg-muted) !important; }
html.theme-dark body.jg-app .jg-req-gateway { color: var(--jg-muted) !important; }
html.theme-dark body.jg-app .jg-req-txn .label { color: var(--jg-muted) !important; }
html.theme-dark body.jg-app .jg-bet-meta { color: var(--jg-muted) !important; }
html.theme-dark body.jg-app .jg-bet-win,
html.theme-dark body.jg-app .jg-bet-points,
html.theme-dark body.jg-app .jg-hist-head span,
html.theme-dark body.jg-app .jg-rate-item .payout { color: var(--jg-gold-2) !important; }
html.theme-dark body.jg-app .jg-checkout-label,
html.theme-dark body.jg-app .jg-checkout-meta span,
html.theme-dark body.jg-app .jg-vpa-pill span.text-muted,
html.theme-dark body.jg-app .jg-support-banner .info span,
html.theme-dark body.jg-app .theme-switch-label { color: var(--jg-muted) !important; }
html.theme-dark body.jg-app .jg-bf-total span { color: var(--jg-text) !important; }
html.theme-dark body.jg-app .jg-bf-wallet span { color: #34d399 !important; }

/* ==========================================================================
   Small Mobile Viewport Refinements (<= 390px / 320px-360px devices)
   ========================================================================== */
@media (max-width: 390px) {
    .jg-appbar {
        padding: calc(7px + var(--jg-safe-top)) 10px 7px;
    }
    .jg-top-bar-modern { gap: 6px !important; }
    .jg-top-bar-left { gap: 5px; }
    .jg-top-bar-right { gap: 4px; }
    .jg-icon-box {
        width: 32px;
        height: 32px;
        flex: 0 0 32px;
        font-size: 13px;
        border-radius: 9px;
    }
    .jg-lang-chip {
        height: 32px;
        min-width: 32px;
        padding: 0 6px;
        font-size: 10.5px;
        border-radius: 9px;
    }
    .jg-balance-pill-badge {
        height: 32px;
        padding: 0 8px;
        font-size: 12px;
        border-radius: 9px;
    }
    .jg-user-pill {
        height: 32px;
        padding: 4px 9px;
        font-size: 11.5px;
        max-width: 92px;
    }
    .jg-appbar-title strong { font-size: 14px; }
    .jg-appbar-title span { font-size: 10px; }

    body.jg-app .page-content {
        padding-top: calc(58px + var(--jg-safe-top)) !important;
    }
    .jg-hero-banner-card {
        margin: 8px 10px 12px;
        padding: 12px 12px 14px;
    }
    .jg-page-body,
    .jg-play-wrap {
        padding: 6px 10px 22px !important;
    }
    .jg-hero-quick-row,
    .jg-hero-actions-row,
    .jg-mc-actions {
        gap: 8px;
    }
    .jg-hero-quick-btn {
        font-size: 11px;
        padding: 7px 8px;
    }
    .jg-hero-btn {
        font-size: 12px;
        min-height: 42px;
    }
    .jg-mc-title-center strong { font-size: 14.5px; }
    .jg-mc-digits { font-size: 17px; letter-spacing: 2px; }
}

@media (max-width: 380px) {
    .jg-game-type-grid {
        gap: 10px;
        padding: 12px 10px calc(24px + var(--jg-safe-bottom));
    }
    .jg-gt-card { padding: 14px 8px 12px; }
    .jg-gt-icon { width: 50px; height: 50px; font-size: 20px; }
    .jg-pred-grid {
        gap: 8px;
        padding: 6px 10px 16px;
    }
    .jg-pred-num {
        min-width: 40px;
        height: 40px;
        font-size: 14px;
        padding: 0 6px;
    }
    .jg-pred-input {
        height: 40px;
        font-size: 14px;
    }
    .jg-quick-filter-row {
        gap: 5px;
        padding: 4px 10px 10px;
    }
    .jg-qf-btn { font-size: 10.5px; }
    .jg-bidding-footer {
        padding: 8px 12px calc(8px + var(--jg-safe-bottom));
    }
    .jg-bf-submit-btn {
        padding: 8px 14px;
        font-size: 12.5px;
    }
}

/* ==========================================================================
   Admin Panel Theme (Unified .jg-app Modern Dark/Light Gold Aesthetic)
   ========================================================================== */

body.jg-app.jg-admin .page-content,
body.jg-app.jg-admin .jg-page-body,
body.jg-app.jg-admin .jg-appbar,
body.jg-app.jg-admin .jg-tabbar,
body.jg-app.jg-admin .jg-sheet {
    max-width: 720px !important;
}

.jg-admin-pill {
    background: linear-gradient(135deg, #b45309 0%, #78350f 100%);
    border: 1px solid rgba(251, 191, 36, 0.35);
}
.jg-balance-pill-badge.jg-req-alert {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #ffffff !important;
    border-color: rgba(251, 191, 36, 0.5) !important;
    box-shadow: 0 3px 10px rgba(245, 158, 11, 0.35);
}
.jg-tab-center-btn.is-active {
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.28), 0 6px 18px rgba(202, 138, 4, 0.5);
}

/* Admin Compact Scrollable Bottom Sheets */
.jg-sheet.jg-sheet-compact {
    height: auto !important;
    max-height: min(86dvh, calc(100dvh - var(--jg-safe-top) - 12px)) !important;
}
.jg-sheet-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 14px 16px calc(20px + var(--jg-safe-bottom));
}
.jg-sheet-head strong {
    font-size: 15.5px;
    font-weight: 800;
    color: var(--jg-text) !important;
    display: block;
    line-height: 1.25;
}
.jg-sheet-head span {
    font-size: 11px;
    font-weight: 600;
    color: var(--jg-muted) !important;
    display: block;
}

/* Form Elements Inside Admin Theme */
body.jg-app textarea.form-control {
    height: auto !important;
    min-height: 92px;
    padding: 10px 14px !important;
    line-height: 1.45;
}
body.jg-app select.form-control[multiple] {
    height: auto !important;
    min-height: 120px;
    padding: 8px 10px !important;
}
body.jg-app select.form-control {
    padding: 0 12px !important;
}
.jg-field-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--jg-muted) !important;
    margin-bottom: 5px;
}
.jg-admin-form em.help-block,
.jg-admin-form label.error {
    color: var(--jg-danger-text) !important;
    font-size: 11.5px;
    font-weight: 600;
    font-style: normal;
    display: block;
    margin-top: 4px;
}

/* Admin Hero Card */
.jg-admin-hero {
    background: linear-gradient(135deg, #facc15 0%, #ca8a04 100%);
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 8px 24px rgba(202, 138, 4, 0.28);
    position: relative;
    overflow: hidden;
}
.theme-dark .jg-admin-hero {
    background: linear-gradient(135deg, #92400e 0%, #451a03 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.jg-admin-hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.jg-admin-hero-greet {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(28, 25, 23, 0.78) !important;
    margin-bottom: 2px;
}
.theme-dark .jg-admin-hero-greet { color: #fde68a !important; }
.jg-admin-hero-title {
    font-size: 20px;
    font-weight: 900;
    color: #1c1917 !important;
    margin: 0;
    line-height: 1.2;
}
.theme-dark .jg-admin-hero-title { color: #ffffff !important; }
.jg-admin-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.85);
    color: #78350f !important;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}
.theme-dark .jg-admin-hero-badge {
    background: rgba(15, 23, 42, 0.7);
    color: #fbbf24 !important;
    border: 1px solid rgba(251, 191, 36, 0.3);
}
.jg-admin-hero-pool {
    background: rgba(255, 255, 255, 0.88);
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}
.theme-dark .jg-admin-hero-pool {
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.jg-admin-hero-pool .lbl {
    display: block;
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--jg-muted) !important;
}
.jg-admin-hero-pool .val {
    display: block;
    font-size: 24px;
    font-weight: 900;
    color: #1c1917 !important;
    line-height: 1.15;
}
.theme-dark .jg-admin-hero-pool .val { color: #fbbf24 !important; }
.jg-admin-hero-cta {
    display: flex;
    gap: 8px;
}
.jg-admin-hero-btn {
    flex: 1 1 0;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none !important;
    transition: transform .12s ease;
}
.jg-admin-hero-btn:active { transform: scale(.97); }
.jg-admin-hero-btn.primary {
    background: #1c1917;
    color: #fde047 !important;
}
.theme-dark .jg-admin-hero-btn.primary {
    background: var(--jg-gold-grad);
    color: #ffffff !important;
}
.jg-admin-hero-btn.secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #1c1917 !important;
}
.theme-dark .jg-admin-hero-btn.secondary {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff !important;
}

/* Pending Requests Banner */
.jg-admin-pending-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(245, 158, 11, 0.14);
    border: 1px solid rgba(245, 158, 11, 0.4);
    margin-bottom: 14px;
    text-decoration: none !important;
    color: var(--jg-text) !important;
}
.jg-admin-pending-banner .left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.jg-admin-pending-banner .dot {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--jg-gold-grad);
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.jg-admin-pending-banner strong {
    display: block;
    font-size: 13.5px;
    font-weight: 800;
    color: var(--jg-text) !important;
}
.jg-admin-pending-banner span {
    display: block;
    font-size: 11px;
    color: var(--jg-muted) !important;
}

/* Dashboard Stat Grid */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
@media (min-width: 540px) {
    .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.stat-card {
    background: var(--jg-surface);
    border: 1px solid var(--jg-line);
    border-radius: 16px;
    padding: 12px 13px;
    box-shadow: 0 4px 14px var(--jg-shadow);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.stat-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}
.stat-icon {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #ffffff !important;
    flex-shrink: 0;
}
.stat-label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--jg-muted) !important;
    line-height: 1.25;
}
.stat-value {
    font-size: 18px;
    font-weight: 900;
    color: var(--jg-text) !important;
    line-height: 1.2;
    word-break: break-word;
}

/* Section Headers & Operation Tiles */
.jg-admin-sec-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 14px 2px 10px;
}
.jg-admin-sec-head h6 {
    margin: 0;
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--jg-muted) !important;
    display: flex;
    align-items: center;
    gap: 6px;
}
.jg-admin-sec-head h6 i { color: var(--jg-gold-2); }

.jg-admin-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 8px;
}
@media (min-width: 540px) {
    .jg-admin-actions-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.jg-admin-tile {
    background: var(--jg-surface);
    border: 1px solid var(--jg-line);
    border-radius: 15px;
    padding: 13px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none !important;
    box-shadow: 0 3px 12px var(--jg-shadow);
    transition: transform .12s ease, border-color .12s ease;
    min-width: 0;
}
.jg-admin-tile:active { transform: scale(.97); border-color: var(--jg-gold); }
.jg-admin-tile-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    font-size: 15px;
    flex-shrink: 0;
}
.jg-admin-tile-text { min-width: 0; flex: 1 1 auto; }
.jg-admin-tile-text strong {
    display: block;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--jg-text) !important;
    line-height: 1.25;
}
.jg-admin-tile-text span {
    display: block;
    font-size: 10.5px;
    color: var(--jg-muted) !important;
    line-height: 1.25;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Filter Bar & Item Cards */
.jg-admin-filter-card {
    background: var(--jg-surface);
    border: 1px solid var(--jg-line);
    border-radius: 18px;
    padding: 14px;
    margin-bottom: 14px;
    box-shadow: 0 4px 16px var(--jg-shadow);
}
.jg-filter-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
@media (min-width: 480px) {
    .jg-filter-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .jg-filter-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.jg-admin-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.jg-admin-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.jg-admin-item {
    background: var(--jg-surface);
    border: 1px solid var(--jg-line);
    border-radius: 16px;
    padding: 13px 14px;
    box-shadow: 0 4px 14px var(--jg-shadow);
}
.jg-item-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}
.jg-item-title {
    font-size: 14.5px;
    font-weight: 800;
    color: var(--jg-text) !important;
    line-height: 1.25;
    word-break: break-word;
}
.jg-item-sub {
    font-size: 11.5px;
    color: var(--jg-muted) !important;
    margin-top: 2px;
    word-break: break-word;
}
.jg-item-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: var(--jg-muted) !important;
    padding-top: 8px;
    border-top: 1px solid var(--jg-line);
}
.jg-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 8px;
    background: var(--jg-surface-2);
    border: 1px solid var(--jg-line);
    font-size: 11px;
    font-weight: 700;
    color: var(--jg-text) !important;
}
.jg-item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--jg-line);
}
.jg-act-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 7px 11px;
    border-radius: 10px;
    font-size: 11.5px;
    font-weight: 800;
    border: 1px solid var(--jg-line);
    background: var(--jg-surface-2);
    color: var(--jg-text) !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: transform .1s ease;
    flex: 1 1 auto;
}
.jg-act-btn:active { transform: scale(.96); }
.jg-act-btn.add,
.jg-act-btn.approve {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.35);
    color: #059669 !important;
}
.jg-act-btn.withdraw,
.jg-act-btn.block {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.35);
    color: #b45309 !important;
}
.jg-act-btn.edit {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.3);
    color: #1d4ed8 !important;
}
.jg-act-btn.del,
.jg-act-btn.reject {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.32);
    color: #b91c1c !important;
}
.jg-act-btn.wa {
    background: rgba(37, 211, 102, 0.14);
    border-color: rgba(22, 163, 74, 0.38);
    color: #15803d !important;
}
.jg-chip-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    border-radius: 8px;
    border: 1px solid var(--jg-gold-border);
    background: var(--jg-gold-bg);
    color: var(--jg-gold-text) !important;
    font-size: 10.5px;
    font-weight: 800;
    cursor: pointer;
    line-height: 1.25;
}
.jg-chip-copy:active { transform: scale(.95); }

/* Generic Admin Tables Inside Cards (Rate Chart, etc.) */
body.jg-app .jg-card .table {
    color: var(--jg-text) !important;
    border-color: var(--jg-line) !important;
}
body.jg-app .jg-card .table th,
body.jg-app .jg-card .table td {
    border-color: var(--jg-line) !important;
    color: var(--jg-text) !important;
    vertical-align: middle;
}
body.jg-app .jg-card .table thead th {
    background: var(--jg-surface-2) !important;
    color: var(--jg-gold-2) !important;
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.jg-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}
.jg-status-badge.is-active,
.jg-status-badge.is-approved,
.jg-status-badge.is-sent,
.jg-status-badge.is-credit,
.jg-status-badge.is-paid {
    background: rgba(16, 185, 129, 0.15);
    color: #059669 !important;
}
.jg-status-badge.is-pending,
.jg-status-badge.is-holiday {
    background: rgba(245, 158, 11, 0.16);
    color: #b45309 !important;
}
.jg-status-badge.is-blocked,
.jg-status-badge.is-rejected,
.jg-status-badge.is-failed,
.jg-status-badge.is-debit,
.jg-status-badge.is-unpaid {
    background: rgba(239, 68, 68, 0.15);
    color: #b91c1c !important;
}

/* Weekday Pill Checkboxes (Admin Market Weekly Off) */
.jg-weekday-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}
@media (min-width: 480px) {
    .jg-weekday-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.jg-weekday-pill {
    position: relative;
    margin: 0;
    cursor: pointer;
}
.jg-weekday-pill input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}
.jg-weekday-pill span {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7px 4px;
    border-radius: 10px;
    background: var(--jg-surface-2);
    border: 1px solid var(--jg-line);
    color: var(--jg-muted) !important;
    font-size: 11.5px;
    font-weight: 700;
    text-align: center;
    transition: all .14s ease;
}
.jg-weekday-pill input:checked + span {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.45);
    color: var(--jg-danger-text) !important;
    font-weight: 800;
}

/* Result Update Feedback & Ank Pill */
.result-toast {
    position: fixed;
    left: 50%;
    bottom: calc(90px + var(--jg-safe-bottom));
    transform: translateX(-50%);
    z-index: 99999;
    background: var(--jg-toast-bg);
    color: var(--jg-gold-2) !important;
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 8px 24px var(--jg-shadow);
}
.result-warning {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: var(--jg-gold-text) !important;
    font-size: 12.5px;
    font-weight: 700;
}
.result-error {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: var(--jg-danger-text) !important;
    font-size: 12.5px;
    font-weight: 700;
}
.jg-ank {
    color: var(--jg-gold-2) !important;
    font-weight: 900;
}
.jg-ank-preview {
    display: inline-flex;
    align-items: center;
    padding: 4px 11px;
    border-radius: 10px;
    background: var(--jg-gold-bg);
    border: 1px solid var(--jg-gold-border);
    color: var(--jg-gold-text) !important;
    font-size: 12px;
    font-weight: 800;
}

/* Pagination */
.jg-pagination .page-link {
    background: var(--jg-surface-2) !important;
    color: var(--jg-text) !important;
    border: 1px solid var(--jg-line) !important;
    border-radius: 10px !important;
    margin: 0 3px;
    min-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12.5px;
    font-weight: 700;
    padding: 0 10px;
}
.jg-pagination .page-item.active .page-link {
    background: var(--jg-gold-grad) !important;
    border-color: var(--jg-gold-2) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

/* Admin Report Wrappers & Backend Echoed Tables (ProfitLoss, GameWinners, GamesBidList) */
.jg-admin-report-wrap .table,
.jg-admin-report-wrap .table-dark {
    background: var(--jg-surface) !important;
    color: var(--jg-text) !important;
    border-color: var(--jg-line) !important;
    margin-bottom: 0;
}
.jg-admin-report-wrap .table-dark th,
.jg-admin-report-wrap .table-dark td,
.jg-admin-report-wrap .table thead th,
.jg-admin-report-wrap .thead-dark th {
    background: var(--jg-surface-2) !important;
    color: var(--jg-text) !important;
    border-color: var(--jg-line) !important;
    padding: 9px 8px !important;
    font-size: 12px;
    vertical-align: middle;
}
.jg-admin-report-wrap .thead-dark th,
.jg-admin-report-wrap tr:first-child th {
    color: var(--jg-gold-2) !important;
    font-weight: 800;
}
.jg-admin-report-wrap td p {
    margin: 0;
    color: inherit !important;
    font-size: 12px;
}
.jg-admin-report-wrap td[style*="color:green"],
.jg-admin-report-wrap td[style*="color: green"] {
    color: #10b981 !important;
    font-weight: 800;
}
.jg-admin-report-wrap td[style*="color:red"],
.jg-admin-report-wrap td[style*="color: red"] {
    color: #ef4444 !important;
    font-weight: 800;
}
.jg-admin-report-wrap table table td {
    border: 0 !important;
    padding: 2px 4px !important;
    background: transparent !important;
}

/* Game Bits Grid (Admin\Games::GamesBidList HTML + html2canvas Capture) */
.jg-admin-bits-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 4px;
    background: var(--jg-bg);
    border-radius: 12px;
}
@media (min-width: 520px) {
    .jg-admin-bits-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.jg-admin-bits-grid .column {
    background: var(--jg-surface);
    border: 1px solid var(--jg-line);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--jg-shadow);
    min-width: 0;
}
.jg-admin-bits-grid .table,
.jg-admin-bits-grid .table-dark {
    width: 100%;
    background: transparent !important;
    color: var(--jg-text) !important;
    margin: 0 !important;
    border-collapse: collapse;
}
.jg-admin-bits-grid .table-dark th,
.jg-admin-bits-grid .table-dark td {
    background: transparent !important;
    color: var(--jg-text) !important;
    border: 1px solid var(--jg-line) !important;
    padding: 6px 8px !important;
    font-size: 12px;
    text-align: center;
}
.jg-admin-bits-grid .table-dark > tbody > tr:first-child > th,
.jg-admin-bits-grid .table-dark > tr:first-child > th {
    background: var(--jg-surface-2) !important;
    color: var(--jg-gold-2) !important;
    font-weight: 800;
}
.jg-admin-bits-grid table table {
    background: var(--jg-surface-2) !important;
}

/* DataTables & Select2 Dark/Light Mode Overrides */
body.jg-app .dataTables_wrapper {
    color: var(--jg-text) !important;
    font-size: 12.5px;
}
body.jg-app .dataTables_wrapper .dataTables_length,
body.jg-app .dataTables_wrapper .dataTables_filter,
body.jg-app .dataTables_wrapper .dataTables_info,
body.jg-app .dataTables_wrapper .dataTables_paginate {
    color: var(--jg-muted) !important;
    margin-bottom: 10px;
}
body.jg-app .dataTables_wrapper .dataTables_filter input,
body.jg-app .dataTables_wrapper .dataTables_length select {
    background: var(--jg-surface-2) !important;
    color: var(--jg-text) !important;
    border: 1px solid var(--jg-line) !important;
    border-radius: 10px;
    padding: 5px 10px;
    margin-left: 6px;
}
body.jg-app table.dataTable tbody tr {
    background-color: var(--jg-surface) !important;
    color: var(--jg-text) !important;
}
body.jg-app table.dataTable.stripe tbody tr.odd,
body.jg-app table.dataTable.display tbody tr.odd {
    background-color: var(--jg-surface-2) !important;
}
body.jg-app table.dataTable td,
body.jg-app table.dataTable th {
    color: var(--jg-text) !important;
    border-color: var(--jg-line) !important;
}
body.jg-app table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:before {
    background-color: var(--jg-gold-2) !important;
}
body.jg-app .select2-container--default .select2-selection--single {
    background-color: var(--jg-surface-2) !important;
    border: 1px solid var(--jg-line) !important;
    border-radius: 14px !important;
    height: 48px !important;
    display: flex;
    align-items: center;
}
body.jg-app .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--jg-text) !important;
    padding-left: 12px !important;
    line-height: 46px !important;
}
body.jg-app .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 46px !important;
    right: 8px !important;
}
.select2-dropdown {
    background-color: var(--jg-surface) !important;
    border: 1px solid var(--jg-line) !important;
    color: var(--jg-text) !important;
    border-radius: 12px !important;
    overflow: hidden;
    z-index: 1200 !important;
}
.select2-search--dropdown .select2-search__field {
    background-color: var(--jg-surface-2) !important;
    color: var(--jg-text) !important;
    border: 1px solid var(--jg-line) !important;
    border-radius: 8px;
}
.select2-results__option {
    color: var(--jg-text) !important;
    font-size: 13px;
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--jg-gold-2) !important;
    color: #ffffff !important;
}

/* Dark Mode Span / Contrast Guards for Admin */
html.theme-dark body.jg-app .stat-label,
html.theme-dark body.jg-app .jg-admin-tile-text span,
html.theme-dark body.jg-app .jg-sheet-head span,
html.theme-dark body.jg-app .jg-item-sub,
html.theme-dark body.jg-app .jg-item-meta,
html.theme-dark body.jg-app .jg-admin-pending-banner span {
    color: var(--jg-muted) !important;
}
html.theme-dark body.jg-app .stat-value { color: #f8fafc !important; }
html.theme-dark body.jg-app .jg-admin-hero-pool .val,
html.theme-dark body.jg-app .jg-ank,
html.theme-dark body.jg-app .jg-ank-preview,
html.theme-dark body.jg-app .jg-admin-hero-badge {
    color: #fbbf24 !important;
}
html.theme-dark body.jg-app .jg-status-badge.is-active,
html.theme-dark body.jg-app .jg-status-badge.is-approved,
html.theme-dark body.jg-app .jg-status-badge.is-sent,
html.theme-dark body.jg-app .jg-status-badge.is-credit,
html.theme-dark body.jg-app .jg-status-badge.is-paid,
html.theme-dark body.jg-app .jg-act-btn.add,
html.theme-dark body.jg-app .jg-act-btn.approve {
    color: #34d399 !important;
}
html.theme-dark body.jg-app .jg-status-badge.is-pending,
html.theme-dark body.jg-app .jg-status-badge.is-holiday,
html.theme-dark body.jg-app .jg-act-btn.withdraw,
html.theme-dark body.jg-app .jg-act-btn.block {
    color: #fbbf24 !important;
}
html.theme-dark body.jg-app .jg-status-badge.is-blocked,
html.theme-dark body.jg-app .jg-status-badge.is-rejected,
html.theme-dark body.jg-app .jg-status-badge.is-failed,
html.theme-dark body.jg-app .jg-status-badge.is-debit,
html.theme-dark body.jg-app .jg-status-badge.is-unpaid,
html.theme-dark body.jg-app .jg-act-btn.del,
html.theme-dark body.jg-app .jg-act-btn.reject {
    color: #fca5a5 !important;
}
html.theme-dark body.jg-app .jg-act-btn.edit { color: #93c5fd !important; }
html.theme-dark body.jg-app .jg-act-btn.wa {
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(34, 197, 94, 0.42);
    color: #4ade80 !important;
}
html.theme-dark body.jg-app .jg-weekday-pill span { color: var(--jg-muted) !important; }
html.theme-dark body.jg-app .jg-weekday-pill input:checked + span { color: #fca5a5 !important; }
html.theme-dark body.jg-app .jg-meta-chip { color: #e2e8f0 !important; }

/* Color Helpers */
.jg-text { color: var(--jg-text) !important; }
.jg-muted { color: var(--jg-muted) !important; }
.jg-gold { color: var(--jg-gold) !important; }
.jg-gold-2 { color: var(--jg-gold-2) !important; }

/* Filter / Category Pills */
.jg-activity-pills,
.jg-notif-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
.jg-activity-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: 999px;
    background: var(--jg-surface-2);
    border: 1px solid var(--jg-line);
    color: var(--jg-muted) !important;
    font-size: 11.5px;
    font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
    line-height: 1.2;
    transition: all .14s ease;
}
.jg-activity-pill .cnt {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--jg-surface);
    color: var(--jg-text);
    font-size: 10.5px;
    font-weight: 800;
}
.jg-activity-pill.is-active {
    background: var(--jg-gold-bg);
    border-color: var(--jg-gold-border);
    color: var(--jg-gold-text) !important;
}
.jg-activity-pill.is-active .cnt {
    background: var(--jg-gold-2);
    color: #ffffff;
}

/* KPI Summary Strip */
.jg-summary-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}
@media (max-width: 350px) {
    .jg-summary-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
.jg-sum-box {
    background: var(--jg-surface-2);
    border: 1px solid var(--jg-line);
    border-radius: 14px;
    padding: 10px 9px;
    text-align: center;
    min-width: 0;
}
.jg-sum-box .lbl {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--jg-muted);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.jg-sum-box .val {
    display: block;
    font-size: 13.5px;
    font-weight: 800;
    color: var(--jg-text);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Profit / Loss Banner & Ratio Progress Bar */
.jg-pl-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--jg-line);
    background: var(--jg-surface-2);
}
.jg-pl-banner.is-profit {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
}
.jg-pl-banner.is-loss {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
}
.jg-pl-banner .lbl {
    display: block;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--jg-muted);
}
.jg-pl-banner.is-profit .lbl,
.jg-pl-banner.is-profit .val {
    color: #059669;
}
.jg-pl-banner.is-loss .lbl,
.jg-pl-banner.is-loss .val {
    color: #dc2626;
}
.jg-pl-banner .val {
    font-size: 22px;
    font-weight: 900;
    line-height: 1.2;
    margin: 2px 0;
}
.jg-pl-banner .sub {
    font-size: 11.5px;
    color: var(--jg-muted);
}
.jg-pl-banner .icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.jg-pl-banner.is-profit .icon {
    background: rgba(16, 185, 129, 0.18);
    color: #059669;
}
.jg-pl-banner.is-loss .icon {
    background: rgba(239, 68, 68, 0.18);
    color: #dc2626;
}
.jg-pl-bar {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: var(--jg-surface-2);
    border: 1px solid var(--jg-line);
    overflow: hidden;
}
.jg-pl-bar > span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--jg-gold-grad);
    transition: width .25s ease;
}

/* Holiday Lock Box */
.jg-holiday-lock-box {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(239, 68, 68, 0.10);
    border: 1px solid rgba(239, 68, 68, 0.35);
}

/* Notification Quota Bar */
.jg-quota-bar {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: var(--jg-surface-2);
    border: 1px solid var(--jg-line);
    overflow: hidden;
}
.jg-quota-bar > span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: #10b981;
    transition: width .25s ease;
}

/* Toggle Switch Row (Notifications & Superadmin) */
.jg-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.jg-toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    flex-shrink: 0;
    cursor: pointer;
}
.jg-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.jg-toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--jg-surface-2);
    border: 1px solid var(--jg-line);
    border-radius: 999px;
    transition: all .2s ease;
}
.jg-toggle-slider::before {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    left: 2px;
    top: 2px;
    border-radius: 50%;
    background: var(--jg-muted);
    transition: transform .2s ease, background .2s ease;
}
.jg-toggle-switch input:checked + .jg-toggle-slider {
    background: rgba(16, 185, 129, 0.22);
    border-color: rgba(16, 185, 129, 0.55);
}
.jg-toggle-switch input:checked + .jg-toggle-slider::before {
    transform: translateX(22px);
    background: #10b981;
}

/* Dark-Mode Guards for New Components */
html.theme-dark body.jg-app .jg-sum-box .lbl { color: var(--jg-muted) !important; }
html.theme-dark body.jg-app .jg-sum-box .val { color: var(--jg-text) !important; }
html.theme-dark body.jg-app .jg-pl-banner.is-profit .lbl,
html.theme-dark body.jg-app .jg-pl-banner.is-profit .val,
html.theme-dark body.jg-app .jg-pl-banner.is-profit .icon { color: #34d399 !important; }
html.theme-dark body.jg-app .jg-pl-banner.is-loss .lbl,
html.theme-dark body.jg-app .jg-pl-banner.is-loss .val,
html.theme-dark body.jg-app .jg-pl-banner.is-loss .icon { color: #fca5a5 !important; }
html.theme-dark body.jg-app .jg-activity-pill.is-active { color: #fbbf24 !important; }

/* Mobile Fullscreen Layout & Edge-to-Edge Viewport Guards */
.offline-message,
.online-message {
    top: 0 !important;
    padding-top: var(--jg-safe-top) !important;
    box-sizing: border-box !important;
}

body:not(.jg-app) .page-content {
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: calc(32px + var(--jg-safe-bottom)) !important;
}

@media (max-width: 767.98px) {
    body.jg-app .page-content,
    .jg-appbar,
    .jg-tabbar,
    .jg-page-body,
    .jg-play-wrap,
    .jg-sheet,
    body.jg-app.jg-admin .page-content,
    body.jg-app.jg-admin .jg-page-body,
    body.jg-app.jg-admin .jg-appbar,
    body.jg-app.jg-admin .jg-tabbar,
    body.jg-app.jg-admin .jg-sheet,
    .auth-topbar,
    .auth-hero,
    .auth-wrap {
        max-width: 100% !important;
    }
}

/* ==========================================================================
   Share App Card & Bottom Sheet (WhatsApp + Telegram + Copy Link)
   ========================================================================== */
.jg-share-card {
    background: var(--jg-surface);
    border: 1px solid var(--jg-line);
    border-radius: 16px;
    padding: 14px;
    margin: 10px 0 14px;
    box-shadow: 0 4px 16px var(--jg-shadow);
    touch-action: pan-y;
}
.jg-share-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.jg-share-icon-badge {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 12px;
    background: var(--jg-gold-bg);
    border: 1px solid var(--jg-gold-border);
    color: var(--jg-gold-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}
.jg-share-info {
    flex: 1 1 auto;
    min-width: 0;
}
.jg-share-info strong {
    display: block;
    font-size: 14px;
    font-weight: 800;
    color: var(--jg-text) !important;
    line-height: 1.25;
}
.jg-share-info span {
    display: block;
    font-size: 11.5px;
    color: var(--jg-muted) !important;
    line-height: 1.35;
    margin-top: 2px;
}
.jg-share-btn-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}
@media (max-width: 340px) {
    .jg-share-btn-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .jg-share-btn-row .jg-share-pill.copy {
        grid-column: 1 / -1;
    }
}
.jg-share-pill {
    min-height: 40px;
    padding: 8px 10px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none !important;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .12s ease, opacity .12s ease;
    min-width: 0;
}
.jg-share-pill:active { transform: scale(.97); }
.jg-share-pill i { font-size: 15px; flex-shrink: 0; }
.jg-share-pill span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.jg-share-pill.wa {
    background: linear-gradient(135deg, #25d366 0%, #16a34a 100%);
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
}
.jg-share-pill.tg {
    background: linear-gradient(135deg, #2aabee 0%, #0088cc 100%);
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.25);
}
.jg-share-pill.copy {
    background: var(--jg-surface-2);
    border-color: var(--jg-line);
    color: var(--jg-text) !important;
}

.jg-share-sheet-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 12px 16px calc(22px + var(--jg-safe-bottom));
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.jg-share-preview {
    background: var(--jg-surface-2);
    border: 1px solid var(--jg-line);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 2px;
}
.jg-share-preview p {
    margin: 0 0 8px;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--jg-text) !important;
    font-weight: 600;
}
.jg-share-link-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--jg-gold-bg);
    border: 1px solid var(--jg-gold-border);
    color: var(--jg-gold-text) !important;
    font-size: 11px;
    font-weight: 700;
    word-break: break-all;
}
.jg-share-action {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 50px;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none !important;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .12s ease;
}
.jg-share-action:active { transform: scale(.98); }
.jg-share-action i:first-child {
    font-size: 20px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}
.jg-share-action.wa {
    background: linear-gradient(135deg, #25d366 0%, #16a34a 100%);
    color: #ffffff !important;
    box-shadow: 0 6px 16px rgba(22, 163, 74, 0.28);
}
.jg-share-action.tg {
    background: linear-gradient(135deg, #2aabee 0%, #0088cc 100%);
    color: #ffffff !important;
    box-shadow: 0 6px 16px rgba(0, 136, 204, 0.28);
}
.jg-share-action.copy {
    background: var(--jg-surface-2);
    border-color: var(--jg-line);
    color: var(--jg-text) !important;
}
html.theme-dark body.jg-app .jg-share-link-chip {
    color: #fbbf24 !important;
}
html.theme-dark body.jg-app .jg-share-pill.copy,
html.theme-dark body.jg-app .jg-share-action.copy {
    color: #f8fafc !important;
}

/* ==========================================================================
   Android WebView Hardening, Extra Game Icon Gradients, Motors & Confirm Sheet
   ========================================================================== */
html {
    overscroll-behavior-y: contain;
    -webkit-tap-highlight-color: transparent;
}
body {
    -webkit-tap-highlight-color: transparent;
}

.jg-webview body,
body.jg-webview {
    -webkit-touch-callout: none;
}

.jg-webview input,
.jg-webview textarea,
body.jg-webview input,
body.jg-webview textarea {
    -webkit-user-select: text;
    user-select: text;
}

@media (max-width: 767.98px) {
    body.jg-app input[type="text"],
    body.jg-app input[type="tel"],
    body.jg-app input[type="number"],
    body.jg-app input[type="password"],
    body.jg-app input[type="search"],
    body.jg-app select.form-control,
    body.jg-app textarea.form-control {
        font-size: 16px;
    }
}

/* Additional Preset Game Icon Gradients */
.jg-icon-orange    { background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%); }
.jg-icon-brown     { background: linear-gradient(135deg, #b45309 0%, #78350f 100%); }
.jg-icon-teal      { background: linear-gradient(135deg, #2dd4bf 0%, #0f766e 100%); }
.jg-icon-mint      { background: linear-gradient(135deg, #34d399 0%, #059669 100%); }
.jg-icon-highlight { background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%); }

/* Interactive SP/DP Motor Keypad & Combination Preview */
.jg-motor-keypad {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}
.jg-motor-digit {
    height: 44px;
    border-radius: 12px;
    border: 1.5px solid var(--jg-line);
    background: var(--jg-surface-2);
    color: var(--jg-text) !important;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform .1s ease, background .14s ease, border-color .14s ease, color .14s ease;
}
.jg-motor-digit:active {
    transform: scale(0.95);
}
.jg-motor-digit.is-selected {
    background: var(--jg-gold-grad) !important;
    border-color: var(--jg-gold-2) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.35);
}

.jg-gen-preview {
    background: var(--jg-surface-2);
    border: 1px solid var(--jg-line);
    border-radius: 14px;
    padding: 10px 12px;
}
.jg-gen-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 128px;
    overflow-y: auto;
    padding-top: 4px;
}
.jg-gen-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 9px;
    border-radius: 8px;
    background: var(--jg-gold-bg);
    border: 1px solid var(--jg-gold-border);
    color: var(--jg-gold-text) !important;
    font-size: 12px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
html.theme-dark body.jg-app .jg-gen-chip {
    color: #fbbf24 !important;
}

.jg-guessing-card {
    border-left: 3px solid var(--jg-gold-2);
}
.rounded-s {
    border-radius: 10px !important;
}

/* Branded Confirm Bottom Sheet (#jgConfirmSheet) - above all modals & sheets */
.jg-confirm-sheet {
    position: fixed;
    inset: 0;
    z-index: 10050;
    pointer-events: none;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.jg-confirm-sheet.is-open {
    pointer-events: auto;
}
.jg-confirm-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity .2s ease;
}
.jg-confirm-sheet.is-open .jg-confirm-backdrop {
    opacity: 1;
}
.jg-confirm-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 560px;
    background: var(--jg-surface);
    border: 1px solid var(--jg-line);
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -14px 40px rgba(0, 0, 0, 0.45);
    transform: translateY(105%);
    transition: transform .22s cubic-bezier(.22, .61, .36, 1);
    overflow: hidden;
}
.jg-confirm-sheet.is-open .jg-confirm-panel {
    transform: translateY(0);
}
.jg-confirm-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--jg-line);
}
.jg-confirm-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 11px;
    background: var(--jg-gold-bg);
    border: 1px solid var(--jg-gold-border);
    color: var(--jg-gold-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}
.jg-confirm-icon.danger {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.35);
    color: #ef4444;
}
.jg-confirm-title-wrap {
    flex: 1 1 auto;
    min-width: 0;
}
.jg-confirm-title-wrap strong {
    font-size: 15px;
    font-weight: 800;
    color: var(--jg-text) !important;
}
.jg-confirm-body {
    padding: 16px 16px calc(22px + var(--jg-safe-bottom));
}
.jg-confirm-msg {
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--jg-text) !important;
    margin: 0 0 16px;
    font-weight: 600;
    word-break: break-word;
}
.jg-confirm-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.jg-confirm-btn {
    min-height: 46px;
    border-radius: 13px;
    border: 1px solid transparent;
    font-size: 13.5px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .12s ease;
}
.jg-confirm-btn:active {
    transform: scale(0.97);
}
.jg-confirm-btn.cancel {
    background: var(--jg-surface-2);
    border-color: var(--jg-line);
    color: var(--jg-text) !important;
}
.jg-confirm-btn.ok {
    background: var(--jg-gold-grad);
    color: #ffffff !important;
    box-shadow: 0 6px 16px rgba(217, 119, 6, 0.3);
}
.jg-confirm-btn.ok.danger {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.3);
}

/* ==========================================================================
   Phase 3 Telemetry Dots, 360° Funnel, Passbook & Audit Diffs
   ========================================================================== */
.jg-online-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22);
    vertical-align: middle;
    margin-right: 4px;
    flex-shrink: 0;
}
.jg-meta-chip.is-online {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.35);
    color: #059669 !important;
}
.jg-meta-chip.is-warn {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
    color: #b91c1c !important;
}
.jg-meta-chip.is-apk {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.3);
    color: #1d4ed8 !important;
}
html.theme-dark body.jg-app .jg-meta-chip.is-online { color: #34d399 !important; }
html.theme-dark body.jg-app .jg-meta-chip.is-warn   { color: #fca5a5 !important; }
html.theme-dark body.jg-app .jg-meta-chip.is-apk    { color: #93c5fd !important; }

.jg-act-btn.info {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.3);
    color: #1d4ed8 !important;
}
html.theme-dark body.jg-app .jg-act-btn.info { color: #93c5fd !important; }

/* Player Lifecycle Funnel Strip */
.jg-funnel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
@media (min-width: 520px) {
    .jg-funnel-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.jg-funnel-step {
    padding: 9px 10px;
    border-radius: 12px;
    background: var(--jg-surface-2);
    border: 1px solid var(--jg-line);
    text-align: center;
    min-width: 0;
}
.jg-funnel-step.is-done {
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.08);
}
.jg-funnel-step .step-lbl {
    display: block;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--jg-muted);
    margin-bottom: 3px;
}
.jg-funnel-step .step-val {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--jg-text);
    word-break: break-word;
}
.jg-funnel-step.is-done .step-lbl { color: #059669; }
html.theme-dark body.jg-app .jg-funnel-step.is-done .step-lbl { color: #34d399 !important; }

/* Passbook Ledger List */
.jg-passbook-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.jg-passbook-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 12px;
    border-radius: 14px;
    background: var(--jg-surface-2);
    border: 1px solid var(--jg-line);
}
.jg-passbook-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}
.jg-passbook-icon.credit { background: rgba(16, 185, 129, 0.15); color: #059669; }
.jg-passbook-icon.debit  { background: rgba(239, 68, 68, 0.14); color: #dc2626; }
.jg-passbook-icon.win    { background: rgba(245, 158, 11, 0.18); color: #d97706; }
.jg-passbook-icon.bid    { background: rgba(139, 92, 246, 0.14); color: #7c3aed; }
html.theme-dark body.jg-app .jg-passbook-icon.credit { color: #34d399; }
html.theme-dark body.jg-app .jg-passbook-icon.debit  { color: #fca5a5; }
html.theme-dark body.jg-app .jg-passbook-icon.win    { color: #fbbf24; }
html.theme-dark body.jg-app .jg-passbook-icon.bid    { color: #c4b5fd; }

.jg-passbook-main {
    flex: 1 1 auto;
    min-width: 0;
}
.jg-passbook-main strong {
    display: block;
    font-size: 13px;
    font-weight: 800;
    color: var(--jg-text);
    line-height: 1.25;
}
.jg-passbook-main span {
    display: block;
    font-size: 11px;
    color: var(--jg-muted);
    margin-top: 2px;
    word-break: break-word;
}
.jg-passbook-amt {
    flex: 0 0 auto;
    text-align: right;
    font-size: 14px;
    font-weight: 900;
    white-space: nowrap;
}
.jg-passbook-amt.plus  { color: #059669; }
.jg-passbook-amt.minus { color: #dc2626; }
html.theme-dark body.jg-app .jg-passbook-amt.plus  { color: #34d399 !important; }
html.theme-dark body.jg-app .jg-passbook-amt.minus { color: #fca5a5 !important; }

/* Audit Log JSON Diff */
.jg-json-diff {
    margin: 6px 0 0;
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--jg-bg);
    border: 1px solid var(--jg-line);
    color: var(--jg-text);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 180px;
    overflow-y: auto;
}

/* ==========================================================================
   Center Bottom Navigation Button (<button class="jg-tab-center"> + label)
   ========================================================================== */
button.jg-tab-center {
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    font: inherit !important;
    color: inherit !important;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}
.jg-tab-center {
    flex: 0 0 66px !important;
    min-width: 60px;
}
.jg-tab-center-btn {
    width: 46px;
    height: 46px;
    margin-top: -22px;
    font-size: 18px;
}
.jg-tab-center-btn.is-refresh.is-active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.38);
}
.jg-tab-center-lbl {
    display: block;
    max-width: 68px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 9.5px;
    font-weight: 700;
    line-height: 1.15;
    margin-top: 2px;
    color: var(--jg-muted);
    text-align: center;
}
.jg-tab-center-lbl.is-active {
    color: var(--jg-gold-2);
}

/* ==========================================================================
   Dismissible Inline Message Boxes (.jg-alert-box)
   ========================================================================== */
.jg-alert-box {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 13px 14px;
    border-radius: 14px;
    border: 1px solid var(--jg-line);
    background: var(--jg-surface-2);
    color: var(--jg-text);
    box-shadow: 0 6px 18px var(--jg-shadow);
    transition: opacity .22s ease, transform .22s ease;
}
.jg-alert-box.is-dismissing {
    opacity: 0;
    transform: translateY(-6px);
}
.jg-alert-box.is-success {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.36);
    color: #065f46;
}
.jg-alert-box.is-error {
    background: rgba(239, 68, 68, 0.11);
    border-color: rgba(239, 68, 68, 0.36);
    color: #991b1b;
}
.jg-alert-box.is-warning {
    background: rgba(245, 158, 11, 0.13);
    border-color: rgba(245, 158, 11, 0.40);
    color: #92400e;
}
.jg-alert-box.is-info {
    background: rgba(59, 130, 246, 0.11);
    border-color: rgba(59, 130, 246, 0.34);
    color: #1e40af;
}
html.theme-dark .jg-alert-box.is-success { color: #a7f3d0; background: rgba(16, 185, 129, 0.16); }
html.theme-dark .jg-alert-box.is-error   { color: #fecaca; background: rgba(239, 68, 68, 0.16); }
html.theme-dark .jg-alert-box.is-warning { color: #fde68a; background: rgba(245, 158, 11, 0.16); }
html.theme-dark .jg-alert-box.is-info    { color: #bfdbfe; background: rgba(59, 130, 246, 0.16); }

.jg-alert-ico {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.55);
}
html.theme-dark .jg-alert-ico {
    background: rgba(0, 0, 0, 0.28);
}
.jg-alert-box.is-success .jg-alert-ico { color: #059669; }
.jg-alert-box.is-error .jg-alert-ico   { color: #dc2626; }
.jg-alert-box.is-warning .jg-alert-ico { color: #d97706; }
.jg-alert-box.is-info .jg-alert-ico    { color: #2563eb; }
html.theme-dark .jg-alert-box.is-success .jg-alert-ico { color: #34d399; }
html.theme-dark .jg-alert-box.is-error .jg-alert-ico   { color: #f87171; }
html.theme-dark .jg-alert-box.is-warning .jg-alert-ico { color: #fbbf24; }
html.theme-dark .jg-alert-box.is-info .jg-alert-ico    { color: #60a5fa; }

.jg-alert-body {
    flex: 1 1 auto;
    min-width: 0;
}
.jg-alert-title {
    display: block;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 2px;
    color: inherit;
}
.jg-alert-box .jg-alert-msg {
    margin: 0;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.45;
    color: inherit !important;
    word-break: break-word;
}
.jg-alert-box .jg-alert-msg ul {
    margin: 4px 0 0;
    padding-left: 18px;
}
.jg-alert-box .jg-alert-hint {
    margin: 5px 0 0;
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1.4;
    color: inherit !important;
    opacity: .88;
}
.jg-alert-close {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 0;
    background: transparent;
    color: inherit;
    opacity: .72;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: opacity .15s ease, background .15s ease;
}
.jg-alert-close:hover,
.jg-alert-close:active {
    opacity: 1;
    background: rgba(0, 0, 0, 0.08);
}
html.theme-dark .jg-alert-close:hover,
html.theme-dark .jg-alert-close:active {
    background: rgba(255, 255, 255, 0.10);
}

/* ==========================================================================
   Dismissible Stacked Toasts (#jgToastStack)
   ========================================================================== */
.jg-toast-stack {
    position: fixed;
    left: 50%;
    bottom: calc(84px + var(--jg-safe-bottom));
    transform: translateX(-50%);
    z-index: 99999;
    width: min(calc(100% - 28px), 420px);
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    align-items: stretch;
}
.jg-toast-stack .jg-toast {
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    z-index: auto;
    width: 100%;
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px 11px 14px;
    border-radius: 16px;
    background: #171923;
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.30);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    transition: opacity .22s ease, transform .22s ease;
}
.jg-toast-stack .jg-toast.is-success { border-color: rgba(16, 185, 129, 0.55); }
.jg-toast-stack .jg-toast.is-error   { border-color: rgba(239, 68, 68, 0.60); background: #261419; }
.jg-toast-stack .jg-toast.is-warning { border-color: rgba(245, 158, 11, 0.55); }
.jg-toast-stack .jg-toast.is-info    { border-color: rgba(245, 158, 11, 0.38); }
.jg-toast-ico {
    flex: 0 0 auto;
    font-size: 15px;
}
.jg-toast.is-success .jg-toast-ico { color: #34d399; }
.jg-toast.is-error .jg-toast-ico   { color: #f87171; }
.jg-toast.is-warning .jg-toast-ico { color: #fbbf24; }
.jg-toast.is-info .jg-toast-ico    { color: #fbbf24; }
.jg-toast-msg {
    flex: 1 1 auto;
    min-width: 0;
    word-break: break-word;
}
.jg-toast-close {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    border: 0;
    background: rgba(255, 255, 255, 0.10);
    color: #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    font-size: 12px;
}
.jg-toast-close:hover,
.jg-toast-close:active {
    background: rgba(255, 255, 255, 0.20);
}
.jg-toast-stack .jg-toast.jg-toast-out {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
}

/* ==========================================================================
   Maintenance Page Redesign (.jg-maint-*)
   ========================================================================== */
.jg-maint-wrap {
    min-height: calc(100dvh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 16px calc(32px + var(--jg-safe-bottom));
}
.jg-maint-card {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 480px;
    background: var(--jg-card-grad);
    border: 1px solid var(--jg-line);
    border-radius: 24px;
    padding: 32px 22px 26px;
    text-align: center;
    box-shadow: 0 18px 44px var(--jg-shadow);
}
.jg-maint-glow {
    position: absolute;
    top: -70px;
    left: 50%;
    transform: translateX(-50%);
    width: 240px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.26), transparent 70%);
    pointer-events: none;
}
.jg-maint-icon {
    position: relative;
    width: 74px;
    height: 74px;
    margin: 0 auto 14px;
    border-radius: 22px;
    background: var(--jg-gold-grad);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.34), 0 0 0 6px var(--jg-gold-bg);
}
.jg-maint-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--jg-gold-bg);
    border: 1px solid var(--jg-gold-border);
    color: var(--jg-gold-text);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.jg-maint-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}
.jg-maint-title {
    font-size: 22px;
    font-weight: 900;
    line-height: 1.25;
    color: var(--jg-text) !important;
    margin: 14px 0 6px;
}
.jg-maint-subtitle {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--jg-muted) !important;
    margin: 0 0 18px;
}
.jg-maint-msg-panel {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--jg-surface-2);
    border: 1px solid var(--jg-gold-border);
    margin-bottom: 20px;
}
.jg-maint-msg-panel i {
    color: var(--jg-gold-2);
    font-size: 16px;
    margin-top: 2px;
    flex: 0 0 auto;
}
.jg-maint-msg-panel p {
    margin: 0;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.55;
    color: var(--jg-text) !important;
    word-break: break-word;
}
.jg-maint-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
@media (min-width: 480px) {
    .jg-maint-card {
        padding: 36px 28px 30px;
    }
    .jg-maint-actions {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    .jg-maint-btn {
        flex: 1 1 160px;
    }
}
.jg-maint-btn {
    min-height: 48px;
    border-radius: 14px !important;
    font-weight: 800 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}
.jg-maint-foot {
    margin: 18px 0 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--jg-muted) !important;
}



