@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --premium-font: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --premium-bg: #080a0f;
    --premium-panel: #11141d;
    --premium-panel-hover: #181d2a;
    --premium-sidebar: #0b0d14;
    --premium-border: rgba(255, 255, 255, 0.07);
    --premium-border-focus: rgba(255, 183, 3, 0.4);
    --premium-accent: #ffb703;
    --premium-accent-hover: #ffa200;
    --premium-accent-rgb: 255, 183, 3;
    --premium-success: #00f5d4;
    --premium-success-bg: rgba(0, 245, 212, 0.1);
    --premium-danger: #ff5d73;
    --premium-danger-bg: rgba(255, 93, 115, 0.1);
    --premium-text-primary: #f8f9fa;
    --premium-text: #f8f9fa;
    --premium-text-secondary: #909bb0;
    --premium-text-muted: #647087;
    --premium-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    --premium-glass-bg: rgba(17, 20, 29, 0.85);
    --premium-radius-lg: 1rem;
    --premium-radius-md: 0.65rem;
    --premium-transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --premium-input-bg: rgba(255, 255, 255, 0.03);
}

/* Light Mode Variables Override */
body.light-theme {
    --premium-bg: #f3f4f6;
    --premium-panel: #ffffff;
    --premium-panel-hover: #f9fafb;
    --premium-sidebar: #ffffff;
    --premium-border: rgba(0, 0, 0, 0.08);
    --premium-border-focus: rgba(217, 119, 6, 0.4);
    --premium-accent: #d97706; /* Higher contrast amber for light background */
    --premium-accent-hover: #b45309;
    --premium-accent-rgb: 217, 119, 6;
    --premium-success: #059669;
    --premium-success-bg: rgba(5, 150, 105, 0.1);
    --premium-danger: #dc2626;
    --premium-danger-bg: rgba(220, 38, 38, 0.1);
    --premium-text-primary: #111827;
    --premium-text: #111827;
    --premium-text-secondary: #4b5563;
    --premium-text-muted: #6b7280;
    --premium-shadow: 0 10px 25px rgba(0, 0, 0, 0.04);
    --premium-glass-bg: rgba(255, 255, 255, 0.85);
    --premium-input-bg: #ffffff;
}

/* Global Reset & Base Styling under .premium-theme */
body.premium-theme {
    background-color: var(--premium-bg);
    color: var(--premium-text-primary);
    font-family: var(--premium-font);
    font-size: 15px;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    letter-spacing: -0.01em;
}

/* Scrollbar Styling */
body.premium-theme::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
body.premium-theme::-webkit-scrollbar-track {
    background: var(--premium-bg);
}
body.premium-theme::-webkit-scrollbar-thumb {
    background: var(--premium-border);
    border-radius: 4px;
}
body.premium-theme::-webkit-scrollbar-thumb:hover {
    background: var(--premium-text-muted);
}

/* Layout Wrapper */
.premium-layout {
    display: flex;
    min-height: 100vh;
}

/* 1. Sidebar Styles (Laptop / Desktop View) */
.premium-sidebar {
    width: 280px;
    background-color: var(--premium-sidebar);
    border-right: 1px solid var(--premium-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    transition: var(--premium-transition);
}

.premium-brand {
    padding: 1.75rem 1.5rem;
    border-bottom: 1px solid var(--premium-border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.premium-brand-logo {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--premium-accent), #ff6b6b);
    border-radius: var(--premium-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-weight: 800;
    font-size: 1.25rem;
    box-shadow: 0 0 15px rgba(255, 183, 3, 0.4);
}

.premium-brand-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--premium-text-primary);
    letter-spacing: 0.5px;
    background: linear-gradient(to right, #ffffff, #eaeaea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.light-theme .premium-brand-name {
    background: linear-gradient(to right, var(--premium-text-primary), #475569);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.premium-sidebar-nav {
    flex-grow: 1;
    padding: 1.5rem 1rem;
    overflow-y: auto;
}

.premium-nav-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--premium-text-muted);
    margin-bottom: 0.75rem;
    padding-left: 0.75rem;
}

.premium-nav-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.premium-nav-item {
    margin-bottom: 0.35rem;
}

.premium-nav-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    color: var(--premium-text-secondary);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--premium-radius-md);
    transition: var(--premium-transition);
    border: 1px solid transparent;
}

.premium-nav-link:hover, 
.premium-nav-item.active .premium-nav-link {
    color: var(--premium-text-primary);
    background-color: var(--premium-panel-hover);
    border-color: rgba(255, 255, 255, 0.05);
}

.premium-nav-item.active .premium-nav-link {
    background: linear-gradient(90deg, rgba(255, 183, 3, 0.1) 0%, rgba(255, 183, 3, 0.02) 100%);
    border-left: 3px solid var(--premium-accent);
    color: var(--premium-accent);
}

body.light-theme .premium-nav-item.active .premium-nav-link {
    background: linear-gradient(90deg, rgba(217, 119, 6, 0.08) 0%, rgba(217, 119, 6, 0.01) 100%);
}

.premium-nav-icon {
    font-size: 1.25rem;
    width: 24px;
    display: inline-flex;
    justify-content: center;
}

.premium-sidebar-footer {
    padding: 1.25rem;
    border-top: 1px solid var(--premium-border);
    background-color: rgba(0, 0, 0, 0.15);
}

body.light-theme .premium-sidebar-footer {
    background-color: #f9fafb;
}

.premium-user-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.premium-user-avatar {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--premium-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--premium-accent);
}

body.light-theme .premium-user-avatar {
    background: #f3f4f6;
}

.premium-user-info {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-grow: 1;
}

.premium-user-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--premium-text-primary);
    margin: 0;
}

.premium-user-role {
    font-size: 0.75rem;
    color: var(--premium-text-secondary);
    margin: 0;
}

.premium-sidebar-logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(255, 93, 115, 0.1);
    border: 1px solid rgba(255, 93, 115, 0.2);
    color: var(--premium-danger);
    padding: 0.6rem;
    border-radius: var(--premium-radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--premium-transition);
}

.premium-sidebar-logout-btn:hover {
    background: var(--premium-danger);
    color: #fff;
}

/* Theme Toggle Button Style */
.premium-theme-toggle-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--premium-border);
    color: var(--premium-text-primary);
    width: 38px;
    height: 38px;
    border-radius: var(--premium-radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--premium-transition);
}

.premium-theme-toggle-btn:hover {
    background: var(--premium-panel-hover);
    border-color: var(--premium-accent);
    color: var(--premium-accent);
}

body.light-theme .premium-theme-toggle-btn {
    background: #f3f4f6;
}

/* For sidebar toggle button (full width) */
aside .premium-theme-toggle-btn {
    height: 30px;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

/* 2. Main Content Area */
.premium-main {
    flex-grow: 1;
    min-width: 0; /* flex-grow child overflow fix */
    margin-left: 280px; /* Offset for left sidebar */
    transition: var(--premium-transition);
    display: flex;
    flex-direction: column;
}

/* 3. Topbar Styles */
.premium-topbar {
    height: 70px;
    background-color: var(--premium-glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--premium-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 999;
}

.premium-page-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--premium-text-primary);
}

.premium-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.premium-topbar-leading {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .7rem;
}

.premium-header-back {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(150, 74, 231, .4);
    border-radius: .65rem;
    color: #d8d3ea;
    text-decoration: none;
    font-size: 1.45rem;
    line-height: 1;
    background: linear-gradient(145deg, rgba(17, 26, 58, .9), rgba(13, 9, 35, .92));
    box-shadow: inset 0 0 15px rgba(91, 41, 180, .12), 0 0 12px rgba(89, 40, 170, .1);
}
.premium-header-back:hover { color: #fff; border-color: rgba(225, 75, 255, .72); }

/* Mobile drawer toggle */
.premium-mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--premium-text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
}

/* Dynamic Balance Badge */
.premium-balance-box {
    background: linear-gradient(135deg, rgba(0, 245, 212, 0.15) 0%, rgba(0, 245, 212, 0.03) 100%);
    border: 1px solid rgba(0, 245, 212, 0.25);
    color: var(--premium-success);
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    box-shadow: 0 0 10px rgba(0, 245, 212, 0.1);
}

body.light-theme .premium-balance-box {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.08) 0%, rgba(5, 150, 105, 0.01) 100%);
    border-color: rgba(5, 150, 105, 0.25);
}

.premium-balance-icon {
    font-size: 1.1rem;
}

/* 4. Page Content Wrapper */
.premium-content {
    padding: 2rem;
    flex-grow: 1;
    max-width: 1300px;
    width: 100%;
    margin: 0 auto;
}

/* 5. Mobile Bottom Navbar */
.premium-bottombar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background-color: var(--premium-glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--premium-border);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom);
}

.premium-bottom-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--premium-text-secondary);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    gap: 0.2rem;
    width: 20%;
    height: 100%;
    transition: var(--premium-transition);
}

.premium-bottom-item:hover,
.premium-bottom-item.active {
    color: var(--premium-accent);
}

.premium-bottom-icon {
    font-size: 1.4rem;
}

/* Premium Card Styles (Redesigning the entire site cards) */
.card, 
.market-card, 
.rate-card,
.session-box {
    background-color: var(--premium-panel) !important;
    border: 1px solid var(--premium-border) !important;
    border-radius: var(--premium-radius-lg) !important;
    box-shadow: var(--premium-shadow) !important;
    padding: 1.25rem;
    transition: var(--premium-transition);
    color: var(--premium-text-primary);
}

/* Hover effects for primary cards */
.market-card:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--premium-accent-rgb), 0.25) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 15px rgba(var(--premium-accent-rgb), 0.05) !important;
}

body.light-theme .market-card:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08), 0 0 10px rgba(var(--premium-accent-rgb), 0.05) !important;
}

/* Market card interior custom styling override */
.market-card {
    margin-bottom: 1.5rem;
}
.market-card h4 {
    color: var(--premium-text-primary) !important;
    font-weight: 700 !important;
    font-size: 1.25rem;
    text-align: left !important;
    margin-bottom: 0.5rem !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.market-result {
    text-align: left !important;
    color: var(--premium-accent) !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    letter-spacing: 1px !important;
    margin-bottom: 1rem !important;
    background: rgba(var(--premium-accent-rgb), 0.07);
    padding: 0.5rem 0.75rem;
    border-radius: var(--premium-radius-md);
    border-left: 3px solid var(--premium-accent);
}

.session-box {
    background: rgba(0, 0, 0, 0.15) !important;
    border-radius: var(--premium-radius-md) !important;
    padding: 0.85rem !important;
    height: 100%;
}

body.light-theme .session-box {
    background: rgba(0, 0, 0, 0.02) !important;
}

.session-box .session-title {
    text-align: left !important;
    font-weight: 700 !important;
    font-size: 0.85rem;
    color: var(--premium-text-secondary);
    background: none !important;
    border-radius: 0 !important;
    margin-bottom: 0.5rem !important;
    border-bottom: 1px solid var(--premium-border);
    padding-bottom: 0.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.session-box .row-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
    margin-bottom: 0.25rem;
}
.session-box .row-line .lbl {
    color: var(--premium-text-muted) !important;
    font-weight: 500 !important;
}

/* Play Now Button & closed states */
.play-btn {
    background: linear-gradient(135deg, var(--premium-accent) 0%, var(--premium-accent-hover) 100%) !important;
    border: none !important;
    border-radius: var(--premium-radius-md) !important;
    text-align: center;
    padding: 0.75rem 1.25rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    text-shadow: none;
    box-shadow: 0 4px 15px rgba(var(--premium-accent-rgb), 0.2);
    transition: var(--premium-transition);
}
body.light-theme .play-btn {
    color: #ffffff !important;
}
.play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--premium-accent-rgb), 0.35);
    background: linear-gradient(135deg, var(--premium-accent-hover) 0%, var(--premium-accent) 100%) !important;
}
.play-btn.text-muted {
    background: rgba(0, 0, 0, 0.1) !important;
    color: var(--premium-text-muted) !important;
    box-shadow: none !important;
    border: 1px solid var(--premium-border) !important;
}
body.light-theme .play-btn.text-muted {
    background: #e5e7eb !important;
}

/* Rates sidebar list card styling */
.rate-card {
    border-radius: var(--premium-radius-md) !important;
    padding: 0.75rem 1rem !important;
    margin-bottom: 0.65rem !important;
    background: rgba(255, 255, 255, 0.01) !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
}
body.light-theme .rate-card {
    background: rgba(0, 0, 0, 0.01) !important;
}
.rate-card .game {
    color: var(--premium-text-secondary) !important;
    font-weight: 600;
    flex: 1;                 /* name on the left, takes remaining space */
}
.rate-card .rate-mid {
    flex: 0 0 auto;
    text-align: center;
    color: var(--premium-text-muted);
    font-weight: 600;
    min-width: 2.5rem;
}
.rate-card .rate-val {
    flex: 0 0 auto;
    text-align: right;
    color: var(--premium-accent);
    font-weight: 700;
    min-width: 4rem;
}

/* Dynamic Game Category Cards in Play/Index */
.game-card {
    border: 1px solid var(--premium-border) !important;
    border-radius: var(--premium-radius-lg) !important;
    background-color: var(--premium-panel) !important;
    color: var(--premium-text-primary) !important;
    padding: 1.5rem 1rem !important;
    box-shadow: var(--premium-shadow) !important;
    transition: var(--premium-transition) !important;
}
.game-card:hover {
    transform: translateY(-5px) scale(1.02) !important;
    border-color: var(--premium-border-focus) !important;
    background-color: var(--premium-panel-hover) !important;
    color: var(--premium-accent) !important;
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4), 0 0 15px rgba(var(--premium-accent-rgb), 0.1) !important;
}
.game-card .icon {
    font-size: 2.25rem !important;
    margin-bottom: 0.5rem !important;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

/* Premium Form Elements */
.form-control, .form-select {
    background-color: var(--premium-input-bg) !important;
    border: 1px solid var(--premium-border) !important;
    color: var(--premium-text-primary) !important;
    border-radius: var(--premium-radius-md) !important;
    padding: 0.65rem 1rem !important;
    transition: var(--premium-transition) !important;
}
.form-control:focus, .form-select:focus {
    background-color: var(--premium-input-bg) !important;
    border-color: var(--premium-accent) !important;
    box-shadow: 0 0 0 3px rgba(var(--premium-accent-rgb), 0.15) !important;
}
.form-label {
    font-weight: 500;
    color: var(--premium-text-secondary);
    margin-bottom: 0.5rem;
}
.input-group-text {
    background-color: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid var(--premium-border) !important;
    color: var(--premium-text-secondary) !important;
    border-radius: var(--premium-radius-md) !important;
}
body.light-theme .input-group-text {
    background-color: #f3f4f6 !important;
}

/* Checkbox and radio customization */
.form-check-input {
    background-color: var(--premium-input-bg) !important;
    border: 1px solid var(--premium-border) !important;
    cursor: pointer;
}
.form-check-input:checked {
    background-color: var(--premium-accent) !important;
    border-color: var(--premium-accent) !important;
}
.form-check-label {
    color: var(--premium-text-primary);
    font-weight: 500;
    cursor: pointer;
}

/* Premium Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--premium-accent) 0%, var(--premium-accent-hover) 100%) !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    border-radius: var(--premium-radius-md) !important;
    padding: 0.65rem 1.25rem !important;
    box-shadow: 0 4px 15px rgba(var(--premium-accent-rgb), 0.15) !important;
    transition: var(--premium-transition) !important;
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--premium-accent-hover) 0%, var(--premium-accent) 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 20px rgba(var(--premium-accent-rgb), 0.25) !important;
}
.btn-success {
    background: linear-gradient(135deg, var(--premium-success) 0%, #00d2b4 100%) !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    border-radius: var(--premium-radius-md) !important;
    padding: 0.65rem 1.25rem !important;
    box-shadow: 0 4px 15px rgba(0, 245, 212, 0.15) !important;
    transition: var(--premium-transition) !important;
}
body.light-theme .btn-success {
    background: linear-gradient(135deg, var(--premium-success) 0%, #047857 100%) !important;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.15) !important;
}
.btn-success:hover {
    transform: translateY(-1px) !important;
}
.btn-danger {
    background: linear-gradient(135deg, var(--premium-danger) 0%, #dc2626 100%) !important;
    border: none !important;
    color: #fff !important;
    font-weight: 600 !important;
    border-radius: var(--premium-radius-md) !important;
    padding: 0.65rem 1.25rem !important;
    transition: var(--premium-transition) !important;
}
.btn-danger:hover {
    transform: translateY(-1px) !important;
}
.btn-outline-secondary {
    border-color: var(--premium-border) !important;
    color: var(--premium-text-secondary) !important;
    border-radius: var(--premium-radius-md) !important;
}
.btn-outline-secondary:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: var(--premium-text-primary) !important;
    border-color: var(--premium-text-secondary) !important;
}
body.light-theme .btn-outline-secondary:hover {
    background-color: #f3f4f6 !important;
}

/* Premium Tables - Highly Optimized to prevent text contrast/overlap issues */
body.premium-theme .table, 
body.premium-theme .table td, 
body.premium-theme .table th {
    color: var(--premium-text-primary) !important;
    border-color: var(--premium-border) !important;
}
.table th, .table td {
    padding: 1rem 0.75rem !important;
    border-bottom: 1px solid var(--premium-border) !important;
    word-break: break-word;
    vertical-align: middle;
}
body.premium-theme .table th {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    color: var(--premium-text-secondary) !important;
    background-color: rgba(0, 0, 0, 0.15) !important;
}
body.light-theme .table th {
    background-color: rgba(0, 0, 0, 0.03) !important;
}
.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.01) !important;
}
body.light-theme .table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.01) !important;
}
.table-striped tbody tr:nth-of-type(even) {
    background-color: transparent !important;
}
.table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02) !important;
}
body.light-theme .table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02) !important;
}

/* Badges styling */
.badge {
    padding: 0.4rem 0.65rem !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
}
.bg-success {
    background-color: var(--premium-success-bg) !important;
    color: var(--premium-success) !important;
    border: 1px solid rgba(var(--premium-success), 0.2);
}
.bg-danger {
    background-color: var(--premium-danger-bg) !important;
    color: var(--premium-danger) !important;
    border: 1px solid rgba(var(--premium-danger), 0.2);
}
.bg-secondary {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: var(--premium-text-secondary) !important;
    border: 1px solid var(--premium-border);
}
body.light-theme .bg-secondary {
    background-color: #f3f4f6 !important;
}
.bg-warning {
    background-color: rgba(var(--premium-accent-rgb), 0.12) !important;
    color: var(--premium-accent) !important;
    border: 1px solid rgba(var(--premium-accent-rgb), 0.25);
}

/* Alerts */
.alert {
    background-color: var(--premium-panel) !important;
    border: 1px solid var(--premium-border) !important;
    border-radius: var(--premium-radius-md) !important;
    color: var(--premium-text-primary) !important;
    padding: 1rem 1.25rem !important;
}
.alert-danger {
    background-color: var(--premium-danger-bg) !important;
    border-color: rgba(255, 93, 115, 0.2) !important;
    color: var(--premium-danger) !important;
}
body.light-theme .alert-danger {
    border-color: rgba(220, 38, 38, 0.2) !important;
}
.alert-success {
    background-color: var(--premium-success-bg) !important;
    border-color: rgba(0, 245, 212, 0.2) !important;
    color: var(--premium-success) !important;
}
body.light-theme .alert-success {
    border-color: rgba(5, 150, 105, 0.2) !important;
}

/* Custom Tree/Caret styles in Account List */
.caret {
    transition: var(--premium-transition);
    color: var(--premium-accent);
}

/* Mobile Sidebar Drawer Navigation */
.premium-drawer-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.65);
    z-index: 999; /* below the sidebar (1000) so the open drawer shows above it */
    backdrop-filter: blur(4px);
}

/* Chart badge links style */
.chart-links {
    font-size: 0.82rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.chart-links a {
    color: var(--premium-accent) !important;
    text-decoration: none !important;
    font-weight: 600;
    background: rgba(var(--premium-accent-rgb), 0.08);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    border: 1px solid rgba(var(--premium-accent-rgb), 0.15);
    transition: var(--premium-transition);
}
.chart-links a:hover {
    background: var(--premium-accent);
    color: #ffffff !important;
}
body.light-theme .chart-links a:hover {
    color: #ffffff !important;
}
.chart-links .text-muted {
    display: none; /* Hide the "|" separator since we are using flex gap badges */
}

/* Drill crumbs style in Report view */
.ar-crumb {
    color: var(--premium-accent) !important;
    text-decoration: none;
    font-weight: 500;
    transition: var(--premium-transition);
}
.ar-crumb:hover {
    color: var(--premium-text-primary) !important;
    text-decoration: underline;
}

/* Live Video Preview Styles */
video#preview, video#live {
    border: 1px solid var(--premium-border) !important;
    background-color: #0b0e14 !important;
    box-shadow: var(--premium-shadow);
    border-radius: var(--premium-radius-lg);
}
#offline {
    background-color: var(--premium-panel);
    border: 1px dashed var(--premium-border);
    border-radius: var(--premium-radius-lg);
    padding: 3rem 1.5rem !important;
}

/* Load Panel Premium Overrides */
.lp-tab {
    border-radius: var(--premium-radius-md) !important;
    border: 1px solid var(--premium-border) !important;
    padding: 0.75rem !important;
    box-shadow: var(--premium-shadow) !important;
    color: var(--premium-text-primary) !important;
    text-shadow: none !important;
    transition: var(--premium-transition) !important;
}
.lp-single {
    background: linear-gradient(135deg, rgba(75, 69, 209, 0.2) 0%, rgba(75, 69, 209, 0.05) 100%) !important;
    border-color: rgba(75, 69, 209, 0.3) !important;
}
.lp-jodi {
    background: linear-gradient(135deg, rgba(192, 102, 58, 0.2) 0%, rgba(192, 102, 58, 0.05) 100%) !important;
    border-color: rgba(192, 102, 58, 0.3) !important;
}
.lp-panna {
    background: linear-gradient(135deg, rgba(107, 98, 56, 0.2) 0%, rgba(107, 98, 56, 0.05) 100%) !important;
    border-color: rgba(107, 98, 56, 0.3) !important;
}
.lp-ld {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.01) 100%) !important;
    color: var(--premium-text-secondary) !important;
    border-color: var(--premium-border) !important;
}
body.light-theme .lp-ld {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.03) 0%, rgba(0, 0, 0, 0.005) 100%) !important;
}
.lp-total {
    background: linear-gradient(135deg, rgba(var(--premium-accent-rgb), 0.15) 0%, rgba(var(--premium-accent-rgb), 0.02) 100%) !important;
    color: var(--premium-accent) !important;
    border-color: rgba(var(--premium-accent-rgb), 0.3) !important;
}

.lp-grid {
    background: rgba(0, 0, 0, 0.25) !important;
    border: 1px solid var(--premium-border) !important;
    border-radius: var(--premium-radius-lg) !important;
    padding: 0.75rem !important;
}
body.light-theme .lp-grid {
    background: rgba(0, 0, 0, 0.01) !important;
}
.lp-single-grid {
    border-color: rgba(75, 69, 209, 0.2) !important;
}
.lp-jodi-grid {
    border-color: rgba(192, 102, 58, 0.2) !important;
}
.lp-panna-grid {
    border-color: rgba(107, 98, 56, 0.2) !important;
}

.lp-cell {
    background-color: var(--premium-panel) !important;
    border: 1px solid var(--premium-border) !important;
    border-radius: var(--premium-radius-md) !important;
    color: var(--premium-text-primary) !important;
    transition: var(--premium-transition) !important;
}
.lp-cell:hover {
    outline: none !important;
    border-color: var(--premium-accent) !important;
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5) !important;
    z-index: 10;
}
body.light-theme .lp-cell:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08) !important;
}
.lp-cell .num {
    color: var(--premium-text-secondary) !important;
    font-weight: 500;
}
.lp-cell .amt {
    color: var(--premium-success) !important;
}
.lp-cell.empty .amt {
    color: transparent !important;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .premium-sidebar {
        left: -280px; /* Hide sidebar offscreen on mobile */
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    }
    
    .premium-sidebar.open {
        left: 0; /* Open drawer */
    }
    
    .premium-drawer-overlay.open {
        display: block;
    }
    
    .premium-main {
        margin-left: 0; /* Full width on mobile */
        padding-bottom: 64px; /* Space for bottom navbar */
    }
    
    .premium-topbar {
        padding: 0 1rem;
    }
    
    .premium-mobile-toggle {
        display: block; /* Hamburger button */
    }
    
    .premium-bottombar {
        display: flex; /* Show mobile bottom navbar */
    }
    
    .premium-content {
        padding: 1.25rem;
    }
}

@media (max-width: 767px) {
    /* Wide tables scroll sideways instead of cramming every word onto its own line. */
    .premium-content table.table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    .table th, .table td {
        padding: 0.55rem 0.5rem !important;
        font-size: 0.85rem;
    }

    /* Any Bootstrap responsive wrappers also scroll. */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Subtle transitions and micro-animations */
@keyframes pulseGlow {
    0% { box-shadow: 0 0 5px rgba(var(--premium-accent-rgb), 0.2); }
    50% { box-shadow: 0 0 15px rgba(var(--premium-accent-rgb), 0.4); }
    100% { box-shadow: 0 0 5px rgba(var(--premium-accent-rgb), 0.2); }
}

.premium-brand-logo {
    animation: pulseGlow 3s infinite ease-in-out;
}

/* ---- Desktop: collapsed mini-sidebar that expands on hover ---- */
@media (min-width: 992px) {
    .premium-sidebar {
        width: 74px;
        overflow: hidden;
        z-index: 1200; /* expands over the content on hover */
        white-space: nowrap;
    }

    .premium-sidebar:hover {
        width: 280px;
        box-shadow: 6px 0 30px rgba(0, 0, 0, 0.45);
    }

    /* content only reserves the collapsed width */
    .premium-main {
        margin-left: 74px;
    }

    /* keep labels on one line so they clip when collapsed, reveal on hover */
    .premium-brand,
    .premium-nav-link,
    .premium-sidebar-logout-btn,
    .premium-theme-toggle-btn,
    .premium-user-name,
    .premium-user-role { white-space: nowrap; }

    /* fixed icon column so icons stay aligned when collapsed */
    .premium-nav-icon {
        display: inline-block;
        width: 1.6rem;
        text-align: center;
    }

    /* hide section titles / user text while collapsed; show on hover */
    .premium-sidebar:not(:hover) .premium-nav-section-title,
    .premium-sidebar:not(:hover) .premium-user-info,
    .premium-sidebar:not(:hover) .premium-brand-name { opacity: 0; }
}

/* ---- Visible checkboxes / radios on the premium theme ---- */
.premium-theme .form-check-input {
    width: 1.15em;
    height: 1.15em;
    background-color: var(--premium-input-bg);
    border: 1.5px solid var(--premium-text-muted);
    cursor: pointer;
}
.premium-theme .form-check-input:checked {
    background-color: var(--premium-accent);
    border-color: var(--premium-accent);
}
.premium-theme .form-check-input:focus {
    border-color: var(--premium-border-focus);
    box-shadow: 0 0 0 0.2rem rgba(var(--premium-accent-rgb), 0.25);
}
.premium-theme .form-check-label { cursor: pointer; }

/* ---- Logout as a mobile bottom-bar item (form/button) ---- */
.premium-bottombar .premium-bottom-form { display: contents; }
.premium-bottombar button.premium-bottom-item {
    background: none;
    border: none;
    font: inherit;
    cursor: pointer;
}
.premium-bottom-logout { color: var(--premium-danger, #dc2626); }

/* ---- Topbar user avatar ---- */
.premium-topbar-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    text-decoration: none;
    color: #000;
    background: linear-gradient(135deg, var(--premium-accent), #ff6b6b);
    box-shadow: 0 0 12px rgba(var(--premium-accent-rgb), 0.35);
    flex: 0 0 auto;
    line-height: 1;
    overflow: hidden;
}
.premium-topbar-avatar:hover { filter: brightness(0.95); }

/* ---- Topbar Balance / Exposure stats ---- */
.premium-hdr-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-right: 0.5rem;
}
.premium-hdr-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--premium-text-muted);
}
@media (max-width: 480px) {
    .premium-hdr-label { display: none; }   /* icons/values only on tiny screens */
    .premium-hdr-stat { margin-right: 0.3rem; }
}

/* ---- Neon game-lobby header and mobile footer ---- */
.premium-topbar {
    min-height: 74px;
    height: 74px;
    background:
        radial-gradient(circle at 75% 0%, rgba(95, 47, 255, .17), transparent 34%),
        linear-gradient(105deg, rgba(3, 9, 29, .97), rgba(12, 12, 39, .96)) !important;
    border-bottom: 1px solid rgba(157, 58, 255, .38);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .28), 0 2px 12px rgba(128, 45, 255, .12);
}
.premium-topbar::after {
    content: "";
    position: absolute;
    left: 5%;
    right: 5%;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #8139ff, #ed42ff, transparent);
    opacity: .72;
    pointer-events: none;
}
.premium-mobile-toggle {
    width: 42px;
    height: 42px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(150, 74, 231, .4);
    border-radius: .65rem;
    color: #d8d3ea;
    background: linear-gradient(145deg, rgba(17, 26, 58, .9), rgba(13, 9, 35, .92));
    box-shadow: inset 0 0 15px rgba(91, 41, 180, .12), 0 0 12px rgba(89, 40, 170, .1);
}
.premium-page-title { color: #f8f6ff; font-size: 1.28rem; font-weight: 850; letter-spacing: .01em; }
.premium-topbar-actions { gap: .48rem; }
.premium-header-quick {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(49, 112, 255, .42);
    border-radius: .7rem;
    color: #735cff;
    text-decoration: none;
    font-size: 1.15rem;
    background: linear-gradient(145deg, rgba(8, 26, 60, .95), rgba(17, 9, 48, .95));
    box-shadow: inset 0 0 14px rgba(73, 48, 180, .14), 0 0 10px rgba(52, 93, 255, .1);
}
.premium-header-quick:hover { color: #c75cff; border-color: rgba(192, 76, 255, .65); }
.premium-hdr-stat {
    min-height: 38px;
    gap: .55rem;
    margin: 0;
    padding: .25rem .65rem;
    border: 1px solid rgba(108, 77, 182, .32);
    border-radius: .55rem;
    background: linear-gradient(180deg, rgba(16, 23, 54, .92), rgba(9, 12, 34, .94));
    box-shadow: inset 0 0 12px rgba(71, 39, 136, .1);
}
.premium-hdr-label { color: #a9a6bd; font-size: .68rem; letter-spacing: .055em; }
.premium-header-value { font-size: .92rem; font-weight: 900; line-height: 1; white-space: nowrap; }
.premium-header-value.balance-value { color: #27df58; text-shadow: 0 0 8px rgba(39, 223, 88, .3); }
.premium-header-value.exposure-value { color: #ffab09; text-shadow: 0 0 8px rgba(255, 171, 9, .28); }
.premium-topbar-avatar {
    width: 43px;
    height: 43px;
    color: #fff;
    border: 2px solid #ff5ac8;
    background: radial-gradient(circle at 35% 30%, #5b256e, #1a173c 64%, #090b20);
    box-shadow: 0 0 0 2px rgba(255, 154, 31, .2), 0 0 17px rgba(255, 66, 181, .72), -5px 2px 16px rgba(255, 140, 21, .35);
}
.premium-bottombar {
   /* left: .65rem;
    right: .65rem;*/
    bottom: .55rem;
    height: 72px;
    overflow: hidden;
    padding: 0 .2rem env(safe-area-inset-bottom);
    border: 1px solid rgba(67, 81, 154, .34);
   /* border-radius: 1rem;*/
    background: linear-gradient(180deg, rgba(8, 16, 44, .97), rgba(3, 8, 27, .98));
    box-shadow: 0 -8px 26px rgba(0, 0, 0, .38), inset 0 1px rgba(255,255,255,.025);
}
.premium-bottombar::before {
    content: "";
    position: absolute;
    top: 0;
    left: 4%;
    right: 4%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #5735de, #d63eff, transparent);
    opacity: .55;
}
.premium-bottom-item { position: relative; gap: .12rem; color: #817d9e; font-size: .67rem; font-weight: 650; }
.premium-bottom-icon { font-size: 1.35rem; line-height: 1.1; filter: saturate(.55); transition: .2s ease; }
.premium-bottom-item:hover, .premium-bottom-item.active { color: #ffb31a; }
.premium-bottom-item:hover .premium-bottom-icon, .premium-bottom-item.active .premium-bottom-icon { filter: saturate(1.2) drop-shadow(0 0 7px rgba(255, 174, 17, .68)); transform: translateY(-1px); }
.premium-bottom-item.active::after {
    content: "";
    position: absolute;
    left: 28%;
    right: 28%;
    bottom: 0;
    height: 2px;
    border-radius: 2px;
    background: #ffad11;
    box-shadow: 0 0 10px #ff8a00;
}
.premium-bottom-logout { color: #e33864; }
.premium-bottom-logout:hover { color: #ff4a78; }
body.light-theme .premium-topbar,
body.light-theme .premium-bottombar { color-scheme: dark; }

@media (max-width: 991px) {
    .premium-main { padding-bottom: 84px; }
    .premium-topbar { padding: 0 .8rem; border-radius: 0 0 .9rem .9rem; }
    .premium-mobile-toggle { display: inline-flex; }
}
@media (max-width: 600px) {
    .premium-topbar-actions { gap: .3rem; }
    .premium-header-quick { width: 38px; height: 38px; }
    .premium-hdr-stat { min-height: 36px; gap: .38rem; padding: .2rem .48rem; }
    .premium-topbar-avatar { width: 39px; height: 39px; }
}
@media (max-width: 480px) {
    .premium-hdr-label { display: inline; }
    .premium-page-title { font-size: 1.08rem; }
    .premium-header-quick { display: none; }
    .premium-hdr-stat { margin: 0; }
    .premium-topbar-leading { gap: .4rem; }
    .premium-header-back { width: 38px; height: 38px; flex-basis: 38px; }
    .premium-page-title { max-width: 7.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (max-width: 390px) {
    .premium-hdr-label { display: none; }
    .premium-hdr-stat { padding-inline: .42rem; }
}

/* Mobile side drawer: compact, scrollable, and clear of the bottom navigation. */
@media (max-width: 991px) {
    .premium-sidebar {
        --drawer-accent: #ffb31a;
        --drawer-purple: #d946ef;
        top: .55rem;
        bottom: calc(72px + 1.1rem + env(safe-area-inset-bottom));
        left: .55rem;
        width: min(62vw, 320px);
        height: auto;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
        scrollbar-color: rgba(179, 66, 220, .45) transparent;
        border: 1px solid rgba(111, 76, 191, .38);
        border-radius: 1.1rem;
        color-scheme: dark;
        background:
            radial-gradient(circle at 10% 4%, rgba(133, 47, 212, .16), transparent 24%),
            linear-gradient(165deg, rgba(11, 13, 35, .99), rgba(5, 8, 25, .99));
        box-shadow: 12px 12px 38px rgba(0, 0, 0, .48), inset -1px 0 rgba(229, 68, 255, .08);
        transform: translateX(calc(-100% - 1.1rem));
        transition: transform .24s ease;
        z-index: 1002;
    }

    .premium-sidebar.open {
        left: .25rem;
        transform: translateX(0);
    }

    .premium-drawer-overlay {
        bottom: calc(72px + 1.1rem + env(safe-area-inset-bottom));
    }

    .premium-brand {
        flex: 0 0 auto;
        min-height: 76px;
        padding: .9rem 1rem;
        gap: .7rem;
        border-bottom-color: rgba(135, 87, 204, .26);
    }

    .premium-brand-logo {
        width: 44px;
        height: 44px;
        border-radius: .75rem;
        font-size: 1.25rem;
        color: #fff;
        background: linear-gradient(135deg, #7c3aed, #e33bc8 62%, #ff8a1f);
        box-shadow: 0 0 18px rgba(210, 55, 234, .42);
    }

    .premium-brand-name {
        font-size: 1.3rem;
        background: none;
        -webkit-text-fill-color: #f8f6ff;
        color: #f8f6ff;
    }

    .premium-sidebar-nav {
        flex: 0 0 auto;
        min-height: calc(100% - 76px);
        overflow: visible;
        padding: 1rem .8rem .55rem;
    }

    .premium-nav-section-title {
        margin: .25rem 0 .45rem;
        padding-left: .7rem;
        color: #8e89a4;
        font-size: .68rem;
        letter-spacing: .12em;
    }

    .premium-nav-list { margin-bottom: .8rem; }
    .premium-nav-item { margin-bottom: .2rem; }

    .premium-nav-link {
        min-height: 46px;
        gap: .75rem;
        padding: .58rem .75rem;
        border-radius: .65rem;
        color: #aaa7bb;
        font-size: .9rem;
    }

    .premium-nav-link:hover {
        color: #fff;
        border-color: rgba(202, 61, 232, .2);
        background: rgba(108, 38, 155, .18);
    }

    .premium-nav-icon {
        width: 28px;
        flex: 0 0 28px;
        font-size: 1.15rem;
    }

    .premium-nav-item.active .premium-nav-link {
        border: 1px solid rgba(217, 70, 239, .2);
        border-left: 3px solid var(--drawer-accent);
        color: var(--drawer-accent);
        background: linear-gradient(90deg, rgba(112, 32, 150, .3), rgba(61, 23, 100, .08));
        box-shadow: inset 0 0 18px rgba(217, 70, 239, .06), 0 0 12px rgba(118, 45, 180, .06);
    }

    .premium-sidebar-footer {
        flex: 0 0 auto;
        max-height: none;
        overflow: visible;
        padding: .8rem;
        border-top-color: rgba(135, 87, 204, .26);
        background: rgba(3, 6, 21, .72);
        scrollbar-width: thin;
    }

    .premium-sidebar-footer .form-select,
    .premium-sidebar-footer .premium-theme-toggle-btn {
        min-height: 42px;
        border-color: rgba(135, 87, 204, .3);
        color: #f2effa;
        background: rgba(20, 18, 52, .9);
    }
    .premium-sidebar-footer .form-select {
        color: #f2effa;
        background-color: #10132f;
    }
    .premium-sidebar-footer .mb-3 { margin-bottom: .65rem !important; }
    .premium-user-card { margin: .35rem 0 .55rem; }
    .premium-user-name { color: #f8f6ff; }
    .premium-user-role, .premium-sidebar-footer .text-muted { color: #8f8ba2 !important; }
    .premium-user-avatar { color: var(--drawer-accent); background: rgba(76, 38, 113, .25); border-color: rgba(176, 73, 213, .3); }
    .premium-sidebar-logout-btn { min-height: 42px; }

    body.light-theme .premium-sidebar {
        border-color: rgba(111, 76, 191, .38);
        background:
            radial-gradient(circle at 10% 4%, rgba(133, 47, 212, .16), transparent 24%),
            linear-gradient(165deg, rgba(11, 13, 35, .99), rgba(5, 8, 25, .99));
        box-shadow: 12px 12px 38px rgba(0, 0, 0, .4), inset -1px 0 rgba(229, 68, 255, .08);
    }

    body.light-theme .premium-sidebar-footer {
        border-top-color: rgba(135, 87, 204, .26);
        background: rgba(3, 6, 21, .72);
    }

    body.light-theme .premium-nav-section-title { color: #8e89a4; }
    body.light-theme .premium-sidebar .premium-nav-link { color: #aaa7bb; }
    body.light-theme .premium-sidebar .premium-nav-link:hover { color: #fff; }
    body.light-theme .premium-sidebar .premium-nav-item.active .premium-nav-link { color: var(--drawer-accent); }
    body.light-theme .premium-sidebar .premium-brand-name { -webkit-text-fill-color: #f8f6ff; }
    body.light-theme .premium-sidebar .premium-user-name { color: #f8f6ff; }
}

/* Shared side-menu theme: desktop and mobile use the same visual design. */
.premium-sidebar {
    --drawer-accent: #ffb31a;
    --drawer-purple: #d946ef;
    color-scheme: dark;
    border-color: rgba(111, 76, 191, .38);
    background:
        radial-gradient(circle at 10% 4%, rgba(133, 47, 212, .16), transparent 24%),
        linear-gradient(165deg, rgba(11, 13, 35, .99), rgba(5, 8, 25, .99));
    box-shadow: 8px 0 30px rgba(0, 0, 0, .36), inset -1px 0 rgba(229, 68, 255, .08);
}
.premium-sidebar .premium-brand {
    min-height: 76px;
    padding: .9rem 1rem;
    gap: .7rem;
    border-bottom-color: rgba(135, 87, 204, .26);
}
.premium-sidebar .premium-brand-logo {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: .75rem;
    color: #fff;
    background: linear-gradient(135deg, #7c3aed, #e33bc8 62%, #ff8a1f);
    box-shadow: 0 0 18px rgba(210, 55, 234, .42);
}
.premium-sidebar .premium-brand-name {
    color: #f8f6ff;
    background: none;
    -webkit-text-fill-color: #f8f6ff;
}
.premium-sidebar .premium-sidebar-nav {
    padding: 1rem .8rem .55rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(179, 66, 220, .45) transparent;
}
.premium-sidebar .premium-nav-section-title {
    margin: .25rem 0 .45rem;
    padding-left: .7rem;
    color: #8e89a4;
    font-size: .68rem;
    letter-spacing: .12em;
}
.premium-sidebar .premium-nav-list { margin-bottom: .8rem; }
.premium-sidebar .premium-nav-item { margin-bottom: .2rem; }
.premium-sidebar .premium-nav-link {
    min-height: 46px;
    gap: .75rem;
    padding: .58rem .75rem;
    border-radius: .65rem;
    color: #aaa7bb;
    font-size: .9rem;
}
.premium-sidebar .premium-nav-link:hover {
    color: #fff;
    border-color: rgba(202, 61, 232, .2);
    background: rgba(108, 38, 155, .18);
}
.premium-sidebar .premium-nav-icon {
    width: 28px;
    flex: 0 0 28px;
    font-size: 1.15rem;
}
.premium-sidebar .premium-nav-item.active .premium-nav-link {
    border: 1px solid rgba(217, 70, 239, .2);
    border-left: 3px solid var(--drawer-accent);
    color: var(--drawer-accent);
    background: linear-gradient(90deg, rgba(112, 32, 150, .3), rgba(61, 23, 100, .08));
    box-shadow: inset 0 0 18px rgba(217, 70, 239, .06), 0 0 12px rgba(118, 45, 180, .06);
}
.premium-sidebar .premium-sidebar-footer {
    padding: .8rem;
    border-top-color: rgba(135, 87, 204, .26);
    background: rgba(3, 6, 21, .72);
}
.premium-sidebar .premium-sidebar-footer .form-select {
    min-height: 42px;
    border-color: rgba(135, 87, 204, .3);
    color: #f2effa;
    background-color: #10132f;
}
.premium-sidebar .premium-user-name { color: #f8f6ff; }
.premium-sidebar .premium-user-role,
.premium-sidebar .premium-sidebar-footer .text-muted { color: #8f8ba2 !important; }
.premium-sidebar .premium-user-avatar {
    color: var(--drawer-accent);
    background: rgba(76, 38, 113, .25);
    border-color: rgba(176, 73, 213, .3);
}
.premium-sidebar .premium-sidebar-logout-btn { min-height: 42px; }
body.light-theme .premium-sidebar {
    border-color: rgba(111, 76, 191, .38);
    background:
        radial-gradient(circle at 10% 4%, rgba(133, 47, 212, .16), transparent 24%),
        linear-gradient(165deg, rgba(11, 13, 35, .99), rgba(5, 8, 25, .99));
}
body.light-theme .premium-sidebar .premium-sidebar-footer { background: rgba(3, 6, 21, .72); }
body.light-theme .premium-sidebar .premium-nav-link { color: #aaa7bb; }
body.light-theme .premium-sidebar .premium-nav-link:hover { color: #fff; }
body.light-theme .premium-sidebar .premium-nav-item.active .premium-nav-link { color: var(--drawer-accent); }

/* My Accounts: dark game-theme account network. */
.accounts-shell {
    min-height: calc(100vh - 155px);
    padding: 1.4rem;
    overflow: hidden;
    border: 1px solid rgba(124, 58, 237, .38);
    border-radius: 1rem;
    color: #f8f6ff;
    color-scheme: dark;
    background:
        radial-gradient(circle at 92% 5%, rgba(179, 36, 167, .14), transparent 25%),
        radial-gradient(circle at 8% 18%, rgba(89, 42, 183, .12), transparent 26%),
        linear-gradient(155deg, #050a20, #07051f 58%, #030718);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .32), inset 0 0 36px rgba(91, 34, 154, .045);
}
.accounts-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.accounts-kicker { margin-bottom: .2rem; color: #b95af0; font-size: .68rem; font-weight: 850; letter-spacing: .13em; }
.accounts-heading h2 { margin: 0; color: #fff; font-size: 1.75rem; font-weight: 900; }
.accounts-heading p { margin: .28rem 0 0; color: #aaa5ba; font-size: .9rem; }
.accounts-heading p strong { color: #ffbe25; }
.accounts-create-btn {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .42rem;
    flex: 0 0 auto;
    padding: .65rem 1.1rem;
    border: 1px solid #ffb817;
    border-radius: .65rem;
    color: #fff;
    text-decoration: none;
    font-size: .95rem;
    font-weight: 850;
    background: linear-gradient(120deg, #ffb511, #ff7a26 58%, #f34555);
    box-shadow: 0 0 18px rgba(255, 155, 20, .28);
}
.accounts-create-btn:hover { color: #fff; filter: brightness(1.07); transform: translateY(-1px); }
.accounts-create-btn span { font-size: 1.2rem; }
.accounts-toolbar { display: flex; gap: .55rem; margin-bottom: .75rem; }
.accounts-tool-btn {
    min-height: 38px;
    padding: .42rem .75rem;
    border: 1px solid rgba(176, 67, 219, .42);
    border-radius: .5rem;
    color: #c9c2d8;
    font: inherit;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    background: rgba(40, 18, 72, .48);
}
.accounts-tool-btn:hover { color: #fff; border-color: #d84bea; background: rgba(94, 26, 124, .42); }
.accounts-table-card { overflow: hidden; border: 1px solid rgba(137, 55, 190, .42); border-radius: .72rem; background: rgba(5, 8, 30, .76); }
.accounts-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.accounts-table { width: 100%; min-width: 680px; border-collapse: collapse; color: #eae5f3; }
.accounts-table th, .accounts-table td { padding: .72rem .58rem; border-bottom: 1px solid rgba(131, 51, 177, .24); vertical-align: middle; }
.accounts-table thead { background: linear-gradient(110deg, rgba(53, 16, 92, .96), rgba(12, 15, 52, .97)); }
.accounts-table thead th { color: #c9c1d6; font-size: .74rem; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; white-space: nowrap; }
.accounts-table tbody tr { background: rgba(10, 12, 42, .68); transition: background .17s ease; }
.accounts-table tbody tr:nth-child(even) { background: rgba(16, 13, 49, .78); }
.accounts-table tbody tr:hover { background: rgba(73, 24, 105, .28); }
.accounts-table tbody tr:last-child td { border-bottom: 0; }
.accounts-login { color: #f8f4ff; font-weight: 750; white-space: nowrap; }
.accounts-login .caret { width: 1.35em; display: inline-block; color: #ffb51a; cursor: pointer; user-select: none; filter: drop-shadow(0 0 5px rgba(255, 174, 17, .35)); }
.caret-spacer { width: 1.35em; display: inline-block; }
.accounts-role { width: 2rem; height: 2rem; display: inline-grid; place-items: center; border: 1px solid rgba(164, 91, 238, .55); border-radius: .48rem; color: #fff !important; font-size: .75rem; font-weight: 900; background: linear-gradient(145deg, #6d36d7, #3d1e91) !important; box-shadow: 0 0 10px rgba(113, 53, 211, .2); }
.accounts-role.bg-info { border-color: rgba(49, 193, 235, .52); background: linear-gradient(145deg, #148db3, #155b92) !important; }
.accounts-role.bg-secondary { border-color: rgba(205, 78, 221, .5); background: linear-gradient(145deg, #9b32a7, #552078) !important; }
.accounts-balance { color: #007029; font-weight: 900; text-shadow: 0 0 7px rgba(53, 233, 118, .2); }
.accounts-table th:last-child, .accounts-actions { width: 1%; }
.accounts-actions { min-width: 0; }
.accounts-table th:nth-child(5),
.accounts-table td:nth-child(5) { width: 1%; padding-left: .4rem; padding-right: .4rem; white-space: nowrap; }
.accounts-action { width: 35px; height: 35px; display: inline-grid; place-items: center; margin-left: .25rem; border: 1px solid; border-radius: .48rem; text-decoration: none; font-size: .8rem; font-weight: 900; background: rgba(12, 13, 42, .76); }
.accounts-action.deposit { color: #007029; border-color: rgba(53, 233, 118, .56); }
.accounts-action.withdraw { color: #ffb51a; border-color: rgba(255, 181, 26, .58); }
.accounts-action.password { color: #a77bff; border-color: rgba(133, 88, 255, .62); }
.accounts-action.view { color: #61c8ff; border-color: rgba(67, 178, 242, .55); }
.accounts-action:hover { color: #fff; border-color: #d94bec; background: rgba(108, 35, 142, .42); box-shadow: 0 0 10px rgba(202, 53, 230, .2); }
.accounts-party-balance { display: inline-flex; margin-right: .3rem; padding: .3rem .45rem; border: 1px solid; border-radius: .38rem; font-size: .72rem; font-weight: 850; }
.accounts-party-balance.positive { color: #007029; border-color: rgba(247 247 247, .42); background: rgba(22, 126, 61, .16); }
.accounts-party-balance.negative { color: #ff5f7e; border-color: rgba(255, 95, 126, .42); background: rgba(130, 27, 51, .16); }
.accounts-empty { min-height: 280px; display: grid; place-items: center; border: 1px dashed rgba(154, 67, 204, .42); border-radius: .75rem; color: #8f89a0; background: rgba(10, 10, 37, .6); }
body.light-theme .accounts-shell { color-scheme: dark; }

@media (max-width: 680px) {
    .accounts-shell { min-height: calc(100vh - 170px); margin: -1.25rem; padding: 1rem .8rem 1.25rem; border-left: 0; border-right: 0; border-radius: 0; }
    .accounts-heading { align-items: flex-start; }
    .accounts-heading h2 { font-size: 1.45rem; }
    .accounts-heading p { max-width: 250px; font-size: .78rem; }
    .accounts-create-btn { min-height: 42px; padding: .52rem .7rem; font-size: .78rem; }
    .accounts-toolbar { margin-top: .75rem; }
    .accounts-table th, .accounts-table td { padding: .65rem .48rem; font-size: .8rem; }
}

/* Create downline account: two-column neon form. */
.user-create-shell {
    max-width: 980px;
    margin: 0 auto;
    padding: 1.5rem;
    border: 1px solid rgba(136, 48, 205, .56);
    border-radius: .9rem;
    color: #f8f6ff;
    color-scheme: dark;
    background:
        radial-gradient(circle at 88% 12%, rgba(124, 32, 171, .14), transparent 26%),
        linear-gradient(150deg, #070b27, #05091e 62%, #0b0625);
    box-shadow: 0 0 28px rgba(117, 32, 177, .18), inset 0 0 28px rgba(99, 39, 166, .045);
}
.user-create-title { margin-bottom: 1.1rem; }
.user-create-title h2 { margin: 0; color: #fff; font-size: 1.55rem; font-weight: 900; }
.user-create-title > span { width: 118px; height: 2px; display: block; margin-top: .65rem; background: linear-gradient(90deg, #e046f0, #7034df, transparent); box-shadow: 0 0 8px rgba(223, 65, 239, .5); }
.user-create-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.15rem; }
.user-create-summary { grid-column: 1 / -1; padding: .65rem .8rem; border: 1px solid rgba(255, 81, 119, .36); border-radius: .5rem; color: #ff6b88; background: rgba(112, 19, 46, .18); }
.user-create-summary:empty { display: none; }
.user-create-field { min-width: 0; }
.user-create-percent-row { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.15rem; }
.user-create-percent-row.commission-only { grid-template-columns: minmax(0, 1fr); }
.user-create-field label { display: block; margin-bottom: .38rem; color: #e9e4f2; font-size: .78rem; font-weight: 750; }
.user-create-control { min-height: 46px; display: grid; grid-template-columns: 42px minmax(0, 1fr); overflow: hidden; border: 1px solid rgba(112, 62, 200, .48); border-radius: .52rem; background: rgba(6, 11, 36, .82); transition: border-color .18s ease, box-shadow .18s ease; }
.user-create-control:focus-within { border-color: #d93eea; box-shadow: 0 0 0 3px rgba(205, 55, 230, .1), 0 0 12px rgba(180, 44, 221, .12); }
.user-create-control > span { display: grid; place-items: center; border-right: 1px solid rgba(112, 62, 200, .38); color: #995dff; font-size: .82rem; font-weight: 900; background: rgba(65, 29, 118, .26); }
.user-create-control input { width: 100%; min-width: 0; border: 0; outline: 0; padding: .65rem .8rem; color: #fff; font: inherit; font-size: .86rem; background: transparent; }
.user-create-control input::placeholder { color: #716c86; }
.user-create-control input::-webkit-inner-spin-button, .user-create-control input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.user-create-field small { display: block; margin-top: .28rem; color: #78738b; font-size: .7rem; }
.user-create-error { display: block; min-height: .9rem; margin-top: .18rem; color: #ff607e; font-size: .7rem; }
.user-create-error:empty { min-height: 0; margin: 0; }
.user-create-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: .65rem; padding-top: .2rem; }
.user-create-submit, .user-create-cancel { min-width: 130px; min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .6rem 1rem; border-radius: .55rem; font: inherit; font-size: .85rem; font-weight: 850; text-decoration: none; cursor: pointer; }
.user-create-submit { border: 1px solid #ffcc36; color: #fff; background: linear-gradient(120deg, #ffb814, #ff7928 58%, #f34c52); box-shadow: 0 0 16px rgba(255, 168, 24, .38); }
.user-create-submit:hover { filter: brightness(1.08); }
.user-create-cancel { border: 1px solid rgba(170, 68, 216, .52); color: #c5bfd3; background: rgba(29, 17, 58, .72); }
.user-create-cancel:hover { color: #fff; border-color: #d843e8; }
body.light-theme .user-create-shell { color-scheme: dark; }

@media (max-width: 680px) {
    .user-create-shell { margin: -1.25rem; padding: 1.1rem .85rem 1.25rem; border-left: 0; border-right: 0; border-radius: 0; }
    .user-create-form { grid-template-columns: 1fr; gap: .8rem; }
    .user-create-percent-row { grid-column: 1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
    .user-create-percent-row.commission-only { grid-template-columns: minmax(0, 1fr); }
    .user-create-percent-row .user-create-control { grid-template-columns: 34px minmax(0, 1fr); }
    .user-create-percent-row .user-create-control input { padding: 0 .55rem; font-size: .78rem; }
    .user-create-percent-row .user-create-field small { font-size: .62rem; line-height: 1.25; }
    .user-create-actions { grid-column: 1; }
    .user-create-submit, .user-create-cancel { min-width: 0; flex: 1; }
}

/* Load Panel: neon live-book theme. */
.load-panel-shell {
    min-height: calc(100vh - 155px);
    padding: 1.25rem;
    border: 1px solid rgba(125, 55, 210, .42);
    border-radius: 1rem;
    color: #f7f4ff;
    color-scheme: dark;
    background:
        radial-gradient(circle at 92% 3%, rgba(180, 26, 170, .13), transparent 23%),
        radial-gradient(circle at 7% 16%, rgba(79, 49, 190, .12), transparent 28%),
        linear-gradient(155deg, #050a20, #08051f 58%, #030718);
    box-shadow: 0 18px 46px rgba(0, 0, 0, .34), inset 0 0 38px rgba(92, 30, 153, .045);
}
.load-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.load-panel-kicker { margin-bottom: .15rem; color: #b85bec; font-size: .67rem; font-weight: 900; letter-spacing: .14em; }
.load-panel-heading h2 { margin: 0; color: #fff; font-size: 1.7rem; font-weight: 900; }
.load-panel-live { display: inline-flex; align-items: center; gap: .45rem; padding: .42rem .7rem; border: 1px solid rgba(39, 223, 88, .42); border-radius: 999px; color: #32e66c; font-size: .75rem; font-weight: 850; background: rgba(12, 98, 42, .19); }
.load-panel-live span { width: 7px; height: 7px; border-radius: 50%; background: #31ed6d; box-shadow: 0 0 9px #31ed6d; animation: pulseGlow 2s infinite ease-in-out; }
.load-panel-filters { display: grid; grid-template-columns: repeat(3, minmax(150px, 1fr)); gap: .75rem; margin-bottom: .9rem; padding: .85rem; border: 1px solid rgba(127, 57, 190, .35); border-radius: .7rem; background: rgba(8, 11, 39, .72); }
.load-panel-filters > div { width: 100%; }
.load-panel-filters label { margin-bottom: .3rem !important; color: #aaa4b8; font-size: .7rem !important; font-weight: 800; letter-spacing: .035em; text-transform: uppercase; }
.load-panel-filters .form-control, .load-panel-filters .form-select { width: 100%; min-height: 42px; border: 1px solid rgba(112, 66, 190, .48); border-radius: .5rem; color: #f6f2ff; background-color: #0d102f; }
.load-panel-filters .form-select option,
.load-panel-filters .form-select optgroup { color: #f6f2ff; background-color: #0d102f; }
.load-panel-filters .form-control:focus, .load-panel-filters .form-select:focus { border-color: #d840e7; box-shadow: 0 0 0 3px rgba(211, 58, 231, .1); }
.load-panel-shell .lp-tabs { display: grid; grid-template-columns: repeat(5, minmax(135px, 1fr)); gap: .55rem; margin: .8rem 0; overflow-x: auto; padding-bottom: .1rem; }
.load-panel-shell .lp-tab { min-width: 135px; padding: .75rem; border: 1px solid rgba(125, 67, 205, .46) !important; border-radius: .65rem !important; color: #fff !important; background: linear-gradient(145deg, rgba(18, 20, 61, .96), rgba(10, 10, 38, .97)) !important; box-shadow: inset 0 0 18px rgba(89, 39, 155, .07), 0 5px 14px rgba(0, 0, 0, .12) !important; }
.load-panel-shell .lp-single { border-top: 2px solid #22b8ff !important; }
.load-panel-shell .lp-jodi { border-top: 2px solid #ed4ddb !important; }
.load-panel-shell .lp-panna { border-top: 2px solid #ffb51a !important; }
.load-panel-shell .lp-ld { border-top: 2px solid #8e67ff !important; }
.load-panel-shell .lp-total { border-top: 2px solid #31e970 !important; }
.load-panel-shell .lp-tab .cut-stat { margin-top: .35rem; color: #8f8aa2; opacity: 1; }
.load-panel-shell .lp-tab .cut-stat strong { color: #f8f5ff; }
.load-panel-shell .lp-tab .cut-stat:nth-child(3) strong { color: #ffb51a; }
.load-panel-shell .lp-tab .cut-stat:nth-child(4) strong { color: #31e970; }
.load-panel-cutting-btn { min-width: 120px; min-height: 40px; padding: .48rem 1rem; border: 1px solid #ffbd21; border-radius: .55rem; color: #fff; font: inherit; font-size: .82rem; font-weight: 850; background: linear-gradient(120deg, #ffb915, #ff7c27 58%, #f34b51); box-shadow: 0 0 15px rgba(255, 162, 20, .3); }
.load-panel-cutting-btn:hover { filter: brightness(1.08); }
.load-panel-shell .lp-sort-control label { color: #d9d3e5; }
.load-panel-shell .lp-sort-select-wrap { position: relative; }
.load-panel-shell .lp-sort-select-wrap::after {
    content: "";
    position: absolute;
    z-index: 2;
    top: 50%;
    right: .9rem;
    width: .52rem;
    height: .52rem;
    border-right: 2px solid #d9d3e5;
    border-bottom: 2px solid #d9d3e5;
    pointer-events: none;
    transform: translateY(-70%) rotate(45deg);
}
.load-panel-shell .lp-sort-control .form-select {
    appearance: none;
    padding-right: 2.35rem !important;
    border-color: rgba(152, 95, 226, .68) !important;
    color: #fff !important;
    color-scheme: dark;
    background-color: #0d102f !important;
    background-image: none !important;
    background-repeat: no-repeat !important;
    background-position: right .75rem center !important;
    background-size: 16px 12px !important;
}
.load-panel-shell .lp-sort-control .form-select option { color: #fff; background-color: #0d102f; }
.load-panel-shell .lp-grid { gap: 4px !important; padding: .7rem !important; border: 1px solid rgba(121, 53, 181, .34) !important; border-radius: .72rem !important; background: rgba(5, 8, 31, .78) !important; }
.load-panel-shell .lp-single-grid { border-top-color: rgba(34, 184, 255, .62) !important; }
.load-panel-shell .lp-jodi-grid { border-top-color: rgba(237, 77, 219, .58) !important; }
.load-panel-shell .lp-panna-grid { border-top-color: rgba(255, 181, 26, .56) !important; }
.load-panel-shell .lp-cell { width: 47px; min-height: 45px; padding: .25rem .1rem; border: 1px solid rgba(111, 68, 174, .42) !important; border-radius: .42rem !important; color: #f7f3ff !important; background: linear-gradient(145deg, rgba(19, 18, 57, .94), rgba(8, 11, 36, .96)) !important; box-shadow: inset 0 0 9px rgba(75, 37, 132, .055); }
.load-panel-shell .lp-cell:hover { z-index: 5; border-color: #dd45ea !important; outline: 0 !important; transform: translateY(-2px) scale(1.04); box-shadow: 0 5px 14px rgba(192, 48, 220, .2) !important; }
.load-panel-shell .lp-cell .num { color: #fff !important; font-weight: 800; text-shadow: 0 0 5px rgba(255, 255, 255, .16); }
.load-panel-shell .lp-cell .amt { color: #f3edf9 !important; font-weight: 850; }
.load-panel-shell .lp-cell.empty { opacity: 1; }
.load-panel-shell .lp-cell.empty .num { color: #d8d1e5 !important; }
.load-panel-shell .lp-cell.empty .amt { color: #77718a !important; }
.load-panel-shell .lp-cell .cut-passed { color: #ffb51a !important; border-top-color: rgba(255, 181, 26, .24) !important; }
.load-panel-shell .lp-cell .cut-retained { color: #31e970 !important; border-top-color: rgba(49, 233, 112, .24) !important; }
.load-panel-shell #lpLiveNote { color: #89849b !important; }
.load-panel-empty { min-height: 260px; display: grid; place-items: center; border: 1px dashed rgba(145, 60, 198, .4); border-radius: .72rem; color: #8f899e; background: rgba(7, 9, 34, .62); }
.load-panel-shell .modal-content { border: 1px solid rgba(137, 55, 202, .56); border-radius: .8rem; color: #eee9f5; background: linear-gradient(155deg, #0b0e2d, #08071f); box-shadow: 0 18px 55px rgba(0, 0, 0, .6); }
.load-panel-shell .modal-header, .load-panel-shell .modal-footer { border-color: rgba(131, 53, 190, .34); }
.load-panel-shell .modal-title { color: #fff; font-weight: 850; }
.load-panel-shell .btn-close { filter: invert(1) grayscale(1); }
.load-panel-shell .modal-content .table { color: #e9e4f1; --bs-table-bg: transparent; --bs-table-striped-bg: rgba(77, 29, 105, .12); --bs-table-border-color: rgba(130, 56, 177, .3); }
.load-panel-shell .modal-content .table-light, .load-panel-shell .modal-content thead.table-light { --bs-table-bg: rgba(49, 18, 82, .88); --bs-table-color: #eee8f5; }
body:not(.light-theme):not(.forest-theme) .load-panel-shell .agent-summary .total-row > th,
body:not(.light-theme):not(.forest-theme) .load-panel-shell .agent-summary .total-row > td {
    color: #fff !important;
    background: #171334 !important;
    box-shadow: inset 0 1px 0 rgba(211, 75, 235, .42);
}
body:not(.light-theme):not(.forest-theme) .load-panel-shell .agent-summary .total-row > td {
    color: #ffd75a !important;
    font-weight: 900;
}
.load-panel-shell .modal-content .form-control { border-color: rgba(112, 65, 184, .48); color: #fff; background: #0d102e; }
.load-panel-shell .modal-content .text-muted { color: #8e899d !important; }
.load-panel-shell .income-toggle { color: #d84bea; }
body.light-theme .load-panel-shell { color-scheme: dark; }

@media (max-width: 680px) {
    .load-panel-shell { min-height: calc(100vh - 170px); margin: -1.25rem; padding: .9rem .65rem 1.15rem; border-left: 0; border-right: 0; border-radius: 0; }
    .load-panel-heading h2 { font-size: 1.45rem; }
    .load-panel-filters { grid-template-columns: 1fr 1fr; gap: .55rem; padding: .65rem; }
    .load-panel-filters > div:first-child { grid-column: 1 / -1; }
    .load-panel-shell .lp-tabs { grid-template-columns: repeat(5, 125px); }
    .load-panel-shell .lp-tab { min-width: 125px; padding: .6rem; }
    .load-panel-shell .lp-grid { padding: .45rem !important; }
    .load-panel-shell .lp-cell { width: 43px; font-size: .68rem; }
}

/* Report: dark drill-down analytics theme. */
.report-shell {
    min-height: calc(100vh - 155px);
    padding: 1.3rem;
    border: 1px solid rgba(126, 55, 205, .42);
    border-radius: 1rem;
    color: #f7f4ff;
    color-scheme: dark;
    background:
        radial-gradient(circle at 91% 4%, rgba(181, 28, 167, .13), transparent 24%),
        radial-gradient(circle at 7% 18%, rgba(75, 45, 184, .12), transparent 27%),
        linear-gradient(155deg, #050a20, #08051f 58%, #030718);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .34), inset 0 0 36px rgba(92, 30, 153, .045);
}
.report-heading { margin-bottom: 1rem; }
.report-kicker { margin-bottom: .15rem; color: #b95aec; font-size: .67rem; font-weight: 900; letter-spacing: .14em; }
.report-heading h2 { margin: 0; color: #fff; font-size: 1.7rem; font-weight: 900; }
.report-builder { margin-bottom: 1rem; overflow: hidden; border: 1px solid rgba(132, 58, 194, .42); border-radius: .72rem; background: rgba(7, 10, 36, .78); box-shadow: inset 0 0 20px rgba(77, 33, 131, .055); }
.report-builder-body { padding: 1rem; }
.report-builder .text-muted { color: #8f899e !important; }
.report-builder .rp-chip { min-height: 38px; border-color: rgba(154, 70, 218, .48); border-radius: .5rem; color: #cfc8dc; font-weight: 750; background: rgba(49, 21, 81, .42); }
.report-builder .rp-chip:hover:not(:disabled) { color: #fff; border-color: #d94bea; background: rgba(99, 29, 132, .42); }
.report-builder .rp-chip:disabled { opacity: .38; }
.report-builder #seqDisplay { color: #ffbd24; }
.report-builder #rpReset { border-color: rgba(154, 70, 218, .45); color: #bbb4ca; background: rgba(26, 16, 55, .7); }
.report-builder #rpGenerate { border: 1px solid #ffbd24; color: #fff; background: linear-gradient(120deg, #ffb914, #ff7c27 58%, #f34b51); box-shadow: 0 0 13px rgba(255, 159, 20, .24); }
.report-builder #rpGenerate:disabled { border-color: rgba(130, 121, 142, .35); color: #777183; background: rgba(35, 31, 48, .65); box-shadow: none; }
.report-builder .rp-preset { color: #ca55ed; text-decoration: none; font-weight: 700; }
.report-builder .rp-preset:hover { color: #ffb51a; }
.report-shell #arCrumbs { min-height: 26px; display: flex; align-items: center; gap: .35rem; color: #e8e3ef; }
.report-shell #arCrumbs .ar-crumb { color: #cb52e9 !important; }
.report-results { min-height: 220px; overflow-x: auto; border: 1px solid rgba(130, 55, 189, .4); border-radius: .72rem; background: rgba(5, 8, 30, .78); -webkit-overflow-scrolling: touch; }
.report-results > p { min-height: 220px; display: grid; place-items: center; margin: 0; color: #898398 !important; }
.report-results .table { min-width: 980px; margin: 0; color: #fff; --bs-table-color: #fff; --bs-table-striped-color: #fff; --bs-table-hover-color: #fff; --bs-table-bg: transparent; --bs-table-striped-bg: rgba(66, 25, 94, .14); --bs-table-border-color: rgba(128, 52, 176, .26); }
.report-results .table thead { background: linear-gradient(110deg, rgba(55, 17, 93, .97), rgba(11, 15, 51, .98)); }
.report-results .table thead th { padding: .72rem .65rem !important; color: rgb(255, 189, 36) !important; border-bottom-color: rgba(190, 61, 219, .38); font-size: .72rem; font-weight: 800; letter-spacing: .025em; white-space: nowrap; }
.report-results .table tbody td { padding: .68rem .65rem !important; color: #fff !important; border-color: rgba(128, 52, 176, .22); font-size: .8rem; white-space: nowrap; }
.report-results .table tbody td * { color: #fff !important; }
.report-results .table tbody tr:hover { background: rgba(87, 27, 118, .22); }
.report-results .table tfoot { background: rgba(37, 14, 69, .88); }
.report-results .table tfoot td, .report-results .table tfoot td * { color: rgb(255, 189, 36) !important; font-weight: 900; }
.report-results .ar-detail { border-color: rgba(161, 75, 226, .56); color: #d45cef; background: rgba(70, 25, 103, .2); }
.report-results .ar-detail:hover { color: #fff; border-color: #dc4bea; background: rgba(117, 34, 146, .42); }
.report-results .text-success { color: #31e970 !important; }
.report-results .text-danger { color: #ff5d79 !important; }
body.light-theme .report-shell { color-scheme: dark; }

@media (max-width: 680px) {
    .report-shell { min-height: calc(100vh - 170px); margin: -1.25rem; padding: .9rem .65rem 1.15rem; border-left: 0; border-right: 0; border-radius: 0; }
    .report-heading h2 { font-size: 1.45rem; }
    .report-builder-body { padding: .75rem; }
    .report-builder .rp-chip { padding: .42rem .58rem; font-size: .76rem; }
    .report-results .table th, .report-results .table td { padding: .62rem .55rem !important; font-size: .74rem; }
}

/* Admin settings: Rates, Holidays, and Markets. */
.admin-page-shell {
    min-height: calc(100vh - 155px);
    padding: 1.35rem;
    border: 1px solid rgba(126, 55, 205, .42);
    border-radius: 1rem;
    color: #f7f4ff;
    color-scheme: dark;
    background:
        radial-gradient(circle at 92% 4%, rgba(181, 28, 167, .13), transparent 24%),
        radial-gradient(circle at 7% 18%, rgba(75, 45, 184, .12), transparent 27%),
        linear-gradient(155deg, #050a20, #08051f 58%, #030718);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .34), inset 0 0 36px rgba(92, 30, 153, .045);
}
.admin-page-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .65rem; }
.admin-page-kicker { margin-bottom: .15rem; color: #b95aec; font-size: .67rem; font-weight: 900; letter-spacing: .14em; }
.admin-page-heading h2 { margin: 0; color: #fff; font-size: 1.7rem; font-weight: 900; }
.admin-page-intro { margin: 0 0 1rem; color: #928ca1; font-size: .88rem; }
.admin-primary-btn, .admin-outline-btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: .5rem .9rem; border-radius: .55rem; font: inherit; font-size: .82rem; font-weight: 850; text-decoration: none; cursor: pointer; }
.admin-primary-btn { border: 1px solid #ffbd24; color: #fff; background: linear-gradient(120deg, #ffb914, #ff7c27 58%, #f34b51); box-shadow: 0 0 14px rgba(255, 159, 20, .26); }
.admin-primary-btn:hover { color: #fff; filter: brightness(1.08); }
.admin-outline-btn { border: 1px solid rgba(163, 73, 221, .5); color: #cec7da; background: rgba(42, 19, 73, .48); }
.admin-outline-btn:hover { color: #fff; border-color: #d94bea; background: rgba(97, 29, 129, .4); }
.admin-form-panel { padding: 1rem; border: 1px solid rgba(132, 58, 194, .4); border-radius: .72rem; background: rgba(7, 10, 36, .78); box-shadow: inset 0 0 20px rgba(77, 33, 131, .05); }
.admin-form-panel h5 { margin: 0 0 .8rem; color: #fff; font-size: 1rem; font-weight: 850; }
.admin-rates-form { max-width: 760px; }
.admin-rates-form .admin-primary-btn { margin-top: .85rem; }
.admin-table-card { overflow: hidden; border: 1px solid rgba(130, 55, 189, .4); border-radius: .65rem; background: rgba(5, 8, 30, .78); }
.admin-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.admin-table { width: 100%; min-width: 560px; border-collapse: collapse; color: #ebe6f2; }
.admin-table th, .admin-table td { padding: .75rem .8rem; border-bottom: 1px solid rgba(128, 52, 176, .24); vertical-align: middle; }
.admin-table thead { background: linear-gradient(110deg, rgba(55, 17, 93, .97), rgba(11, 15, 51, .98)); }
.admin-table thead th { color: #c9c1d6; font-size: .72rem; font-weight: 800; letter-spacing: .035em; text-transform: uppercase; white-space: nowrap; }
.admin-table tbody tr { background: rgba(10, 12, 42, .68); }
.admin-table tbody tr:nth-child(even) { background: rgba(16, 13, 49, .76); }
.admin-table tbody tr:hover { background: rgba(73, 24, 105, .28); }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table .form-control { min-height: 40px; border: 1px solid rgba(112, 65, 184, .48); border-radius: .48rem; color: #fff; background: #0d102e; }
.admin-table .form-control:focus { border-color: #d94bea; box-shadow: 0 0 0 3px rgba(211, 58, 231, .1); }
.admin-market-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .75rem; }
.admin-market-item { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .85rem 1rem; border: 1px solid rgba(132, 58, 194, .38); border-radius: .65rem; color: #fff; font-weight: 800; background: linear-gradient(145deg, rgba(16, 18, 54, .92), rgba(9, 10, 37, .95)); }
.admin-market-item:hover { border-color: rgba(218, 72, 234, .62); box-shadow: 0 5px 16px rgba(177, 46, 207, .12); }
.admin-empty { min-height: 250px; display: grid; place-items: center; border: 1px dashed rgba(145, 60, 198, .4); border-radius: .72rem; color: #8f899e; background: rgba(7, 9, 34, .62); }
.admin-empty.compact { min-height: 120px; }
.admin-markets-table { min-width: 900px; }
.admin-markets-table td:first-child { color: #fff; font-weight: 850; }
.admin-action-btn { min-height: 32px; display: inline-flex; align-items: center; justify-content: center; margin-left: .25rem; padding: .34rem .55rem; border: 1px solid; border-radius: .42rem; font-size: .72rem; font-weight: 850; text-decoration: none; background: rgba(10, 12, 39, .7); }
.admin-action-btn.edit { color: #a87dff; border-color: rgba(150, 99, 242, .55); }
.admin-action-btn.holiday { color: #ffb51a; border-color: rgba(255, 181, 26, .55); }
.admin-action-btn.result { color: #36dff2; border-color: rgba(54, 223, 242, .52); }
.admin-action-btn.remove { color: #ff607e; border-color: rgba(255, 96, 126, .5); }
.admin-action-btn:hover { color: #fff; border-color: #d94bea; background: rgba(100, 29, 133, .42); }
.admin-holiday-grid { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(420px, 1.2fr); gap: 1rem; }
.admin-day-check { margin-bottom: .52rem; padding: .55rem .65rem .55rem 2.2rem; border: 1px solid rgba(119, 67, 184, .3); border-radius: .48rem; color: #d8d2e1; background: rgba(16, 15, 48, .58); }
.admin-day-check .form-check-label { color: #fff !important; }
.admin-holiday-add { display: grid; grid-template-columns: minmax(150px, .75fr) minmax(180px, 1.25fr) auto; align-items: end; gap: .65rem; margin-bottom: .9rem; }
.admin-page-shell .form-label { color: #d4cedd; font-size: .78rem; font-weight: 750; }
.admin-page-shell .form-control, .admin-page-shell .form-select { border: 1px solid rgba(112, 65, 184, .48); color: #fff; background-color: #0d102e; }
.admin-page-shell .form-select option,
.admin-page-shell .form-select optgroup { color: #fff; background-color: #0d102e; }
.admin-page-shell .form-control:focus, .admin-page-shell .form-select:focus { border-color: #d94bea; box-shadow: 0 0 0 3px rgba(211, 58, 231, .1); }
.admin-market-form-panel { max-width: 900px; }
.admin-session-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.admin-session-panel { min-width: 0; margin-bottom: 1rem; padding: 1rem; border: 1px solid rgba(132, 58, 194, .38); border-radius: .62rem; background: rgba(11, 13, 43, .7); }
.admin-session-panel legend { float: none; width: auto; margin: 0; padding: 0 .45rem; color: #d951eb; font-size: .88rem; font-weight: 850; }
.admin-market-form .text-muted { color: #827c90 !important; }
.admin-market-form .form-check-label { color: #fff !important; }
.admin-form-actions { display: flex; gap: .65rem; margin-top: .3rem; }
.results-table { min-width: 900px; }
.results-table .result-date { color: #aaa3b8; font-variant-numeric: tabular-nums; }
.results-table .result-market { color: #fff; font-weight: 850; }
.result-number, .result-display { display: inline-flex; align-items: center; justify-content: center; min-width: 58px; padding: .38rem .55rem; border: 1px solid; border-radius: .45rem; font-weight: 900; font-variant-numeric: tabular-nums; background: rgba(9, 12, 39, .76); }
.result-number.open { color: #39dff1; border-color: rgba(57, 223, 241, .45); }
.result-number.jodi { color: #ef58dd; border-color: rgba(239, 88, 221, .45); }
.result-number.close { color: #ffbd24; border-color: rgba(255, 189, 36, .48); }
.result-display { min-width: 116px; color: #f8f4ff; border-color: rgba(151, 87, 234, .55); background: linear-gradient(145deg, rgba(50, 20, 89, .72), rgba(12, 15, 48, .9)); }
.result-declare-panel { max-width: 900px; }
.result-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1rem; margin-bottom: 1rem; }
.result-form-grid .form-control, .result-form-grid .form-select { min-height: 44px; border-radius: .5rem; }
.admin-validation-summary { margin-bottom: .75rem; color: #ff607e; font-size: .78rem; }
.admin-validation-summary:empty { display: none; }
.result-preview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; margin-bottom: 1rem; padding: .75rem; border: 1px solid rgba(131, 56, 190, .35); border-radius: .62rem; background: rgba(9, 11, 39, .7); }
.result-preview > div { min-height: 64px; display: flex; flex-direction: column; justify-content: center; padding: .6rem .75rem; border: 1px solid rgba(117, 66, 181, .34); border-radius: .5rem; background: linear-gradient(145deg, rgba(20, 18, 58, .92), rgba(9, 11, 37, .94)); }
.result-preview span { color: #918a9f; font-size: .69rem; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.result-preview strong { margin-top: .15rem; color: #ffbd24; font-size: 1.25rem; font-weight: 900; }

/* Account details: dark profile and account controls. */
.user-details-content { width: 100%; max-width: 1040px; margin: 0 auto; }
.user-details-heading { margin-bottom: 1rem; }
.user-role-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 76px; min-height: 38px; padding: .4rem .75rem; border: 1px solid rgba(211, 66, 232, .58); border-radius: 999px; color: #fff; font-size: .75rem; font-weight: 900; text-transform: uppercase; background: linear-gradient(145deg, rgba(87, 34, 139, .72), rgba(22, 18, 61, .92)); box-shadow: 0 0 14px rgba(190, 51, 218, .16); }
.user-details-notice { margin-bottom: .85rem; padding: .68rem .8rem; border: 1px solid; border-radius: .55rem; font-size: .78rem; font-weight: 700; }
.user-details-notice.editable { color: #4ceaf3; border-color: rgba(59, 220, 236, .36); background: rgba(17, 100, 118, .16); }
.user-details-notice.readonly { color: #bcb5c8; border-color: rgba(139, 92, 186, .34); background: rgba(48, 29, 76, .32); }
.user-details-summary { display: grid; grid-template-columns: minmax(135px, .42fr) minmax(0, 1fr); margin: 0 0 1rem; overflow: hidden; border: 1px solid rgba(130, 55, 189, .4); border-radius: .65rem; background: rgba(6, 9, 32, .78); }
.user-details-summary dt, .user-details-summary dd { width: 100%; max-width: none; margin: 0; padding: .68rem .8rem; border-bottom: 1px solid rgba(128, 52, 176, .22); }
.user-details-summary dt { color: #958eaa; font-size: .72rem; font-weight: 800; letter-spacing: .035em; text-transform: uppercase; background: rgba(37, 18, 68, .55); }
.user-details-summary dd { color: #fff; font-size: .84rem; background: rgba(11, 13, 43, .64); }
.user-details-summary dt:nth-last-of-type(1), .user-details-summary dd:last-child { border-bottom: 0; }
.user-details-card { overflow: hidden; border: 1px solid rgba(132, 58, 194, .4); border-radius: .65rem; color: #eee9f5; background: rgba(7, 10, 36, .78); box-shadow: inset 0 0 20px rgba(77, 33, 131, .05); }
.user-details-card .card-header { padding: .7rem .85rem; border-bottom: 1px solid rgba(133, 54, 192, .34); color: #fff; font-size: .85rem; font-weight: 850; background: linear-gradient(110deg, rgba(55, 17, 93, .92), rgba(11, 15, 51, .96)); }
.user-details-card .card-body { padding: .85rem; color: #d8d2e1; background: transparent; }
.user-details-card .form-label, .user-details-card .form-check-label { color: #fff; font-size: .75rem; font-weight: 750; }
.user-details-card .form-control { min-height: 40px; border: 1px solid rgba(112, 65, 184, .48); border-radius: .48rem; color: #fff; background: #0d102e; }
.user-details-card .form-control:focus { border-color: #d94bea; box-shadow: 0 0 0 3px rgba(211, 58, 231, .1); }
.user-details-card .form-text, .user-details-card .text-muted { color: #9992a8 !important; }
.user-details-card .btn-primary, .user-details-card .btn-success { border-color: #ffbd24; color: #fff; font-weight: 800; background: linear-gradient(120deg, #ffb914, #ff7c27 58%, #f34b51); box-shadow: 0 0 12px rgba(255, 159, 20, .2); }
.user-details-card .btn-outline-primary { border-color: rgba(168, 93, 232, .62); color: #d65aeb; }
.user-details-card .btn-outline-danger { border-color: rgba(255, 96, 126, .52); color: #ff607e; }
.user-details-card .btn:hover { color: #fff; filter: brightness(1.08); }
body.light-theme .admin-page-shell { color-scheme: dark; }

@media (max-width: 760px) {
    .admin-page-shell { min-height: calc(100vh - 170px); margin: -1.25rem; padding: .9rem .7rem 1.15rem; border-left: 0; border-right: 0; border-radius: 0; }
    .admin-page-heading h2 { font-size: 1.45rem; }
    .admin-holiday-grid, .admin-session-grid { grid-template-columns: 1fr; }
    .admin-holiday-add { grid-template-columns: 1fr; }
    .admin-holiday-add .col-auto, .admin-holiday-add .col { width: 100%; }
    .admin-holiday-add .admin-primary-btn { width: 100%; }
    .result-form-grid { grid-template-columns: 1fr; }
    .result-preview { gap: .4rem; padding: .55rem; }
    .result-preview > div { min-height: 58px; padding: .48rem; }
    .user-details-summary { grid-template-columns: minmax(110px, .46fr) minmax(0, 1fr); }
    .user-details-summary dt, .user-details-summary dd { padding: .62rem .65rem; }
    .user-details-card .card-header { flex-wrap: wrap; gap: .35rem; }
}
