:root {
    --tg-blue: #2AABEE;
    --tg-blue-dark: #229ED9;
    --tg-blue-light: #E8F4FD;
    --bg: #0f1419;
    --bg-card: #1a2332;
    --bg-card-hover: #1f2a3d;
    --bg-input: #0d1117;
    --text: #e7ecf3;
    --text-muted: #8b9cb3;
    --border: #2a3548;
    --success: #22c55e;
    --error: #ef4444;
    --warning: #f59e0b;
    --radius: 12px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --text-color: #e7ecf3;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--tg-blue); text-decoration: none; }
a:hover { color: var(--tg-blue-dark); }

.container { max-width: 1140px; margin: 0 auto; padding: 0 1.25rem; }

/* Navbar */
.navbar {
    background: rgba(26, 35, 50, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    overflow: visible;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    position: relative;
    overflow: visible;
    gap: 0.75rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--tg-blue);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.logo-icon { font-size: 1.4rem; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-links a { color: var(--text-muted); font-weight: 500; font-size: 0.9rem; }
.nav-links a:hover { color: var(--text); }
.nav-links a.btn-primary { color: #fff; }
.nav-links a.btn-primary:hover { color: #fff; }
.nav-links a.btn-outline { color: var(--text); }
.nav-links a.btn-outline:hover { color: var(--tg-blue); }

.nav-balance {
    background: var(--tg-blue-light);
    color: var(--tg-blue-dark);
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.nav-balance-mobile {
    display: none;
    margin-left: auto;
    background: rgba(42, 171, 238, 0.14);
    color: var(--tg-blue);
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-notif-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--warning);
    text-decoration: none;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.nav-notif-badge:hover {
    background: rgba(245, 158, 11, 0.2);
}

.notification-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.notification-item {
    padding: 1rem 1.1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
}

.notification-item.is-unread {
    border-color: rgba(245, 158, 11, 0.45);
    background: rgba(245, 158, 11, 0.06);
}

.notification-item-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 0.45rem;
}

.notification-item-head h3 {
    margin: 0;
    font-size: 0.95rem;
}

.notification-item-head time {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.notification-item p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Hidden checkbox that drives mobile menu (works without JS) */
.nav-check {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
    margin: 0;
}

.nav-toggle {
    display: none;
    appearance: none;
    -webkit-appearance: none;
    background: var(--tg-blue);
    border: none;
    color: #fff;
    cursor: pointer;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 120;
    position: relative;
    flex-shrink: 0;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    margin: 0;
}

.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
    display: block;
    width: 18px;
    height: 2px;
    background: #fff;
    border-radius: 1px;
    position: relative;
    transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle-icon::before,
.nav-toggle-icon::after {
    content: '';
    position: absolute;
    left: 0;
}
.nav-toggle-icon::before { top: -6px; }
.nav-toggle-icon::after { top: 6px; }

.nav-check:checked + .nav-toggle {
    background: var(--tg-blue-dark);
}
.nav-check:checked + .nav-toggle .nav-toggle-icon {
    background: transparent;
}
.nav-check:checked + .nav-toggle .nav-toggle-icon::before {
    top: 0;
    transform: rotate(45deg);
}
.nav-check:checked + .nav-toggle .nav-toggle-icon::after {
    top: 0;
    transform: rotate(-45deg);
}

.lang-selector {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
}
.lang-link {
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-color);
    opacity: 0.5;
}
.lang-link.is-active {
    font-weight: 800;
    opacity: 1;
}
.lang-sep {
    opacity: 0.3;
    font-size: 0.85rem;
    color: var(--text-color);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--tg-blue);
    color: #fff;
}
.btn-primary:hover { background: var(--tg-blue-dark); color: #fff; }

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}
.btn-outline:hover { border-color: var(--tg-blue); color: var(--tg-blue); }

.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--error); color: #fff; }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.85rem; }
.btn-lg { padding: 0.85rem 1.75rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* Hero */
.hero {
    padding: 5rem 0 4rem;
    text-align: center;
    background: radial-gradient(ellipse at 50% 0%, rgba(42, 171, 238, 0.15) 0%, transparent 60%);
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero h1 span { color: var(--tg-blue); }

.hero p {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Features */
.features { padding: 4rem 0; }

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: transform 0.2s, border-color 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--tg-blue);
}

.feature-icon { font-size: 2rem; margin-bottom: 1rem; }
.feature-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.feature-card p { color: var(--text-muted); font-size: 0.9rem; }

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

/* Forms */
.form-group { margin-bottom: 1.25rem; }

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 0.7rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--tg-blue);
    box-shadow: 0 0 0 3px rgba(42, 171, 238, 0.15);
}

.form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.3rem; }

/* Auth */
.auth-page {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
}

.auth-card h1 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.auth-card .subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-demo-link {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Pricing */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0 4rem;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
    transition: transform 0.2s, border-color 0.2s;
}

.pricing-card.featured {
    border-color: var(--tg-blue);
    transform: scale(1.03);
}

.pricing-card.featured::before {
    content: 'Populer';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--tg-blue);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.75rem;
    border-radius: 20px;
}

.pricing-card:hover { border-color: var(--tg-blue); }

.pricing-coins {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--tg-blue);
}

.pricing-price {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0.5rem 0 1rem;
}

.pricing-features {
    list-style: none;
    text-align: left;
    margin: 1.25rem 0;
}

.pricing-features li {
    padding: 0.4rem 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.pricing-features li::before {
    content: '✓ ';
    color: var(--success);
    font-weight: 700;
}

.check-price-banner {
    background: linear-gradient(135deg, var(--tg-blue), var(--tg-blue-dark));
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
}

.check-price-banner h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.check-price-banner .price { font-size: 3rem; font-weight: 800; }

/* Dashboard layout */
.dashboard-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: calc(100vh - 64px);
}

.sidebar {
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 0 1.25rem 1.25rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.5rem;
}

.sidebar-header h3 { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.sidebar-balance { font-size: 1.25rem; font-weight: 700; color: var(--tg-blue); margin-top: 0.25rem; }

.sidebar-nav a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(42, 171, 238, 0.08);
    color: var(--tg-blue);
    border-left-color: var(--tg-blue);
}

.dashboard-content { padding: 2rem; }

.page-header { margin-bottom: 2rem; }
.page-header h1 { font-size: 1.75rem; font-weight: 700; }
.page-header p { color: var(--text-muted); font-size: 0.95rem; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.stat-card .label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.stat-card .value { font-size: 1.75rem; font-weight: 700; margin-top: 0.25rem; }
.stat-card .value.blue { color: var(--tg-blue); }

/* Tables */
.table-wrap { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    font-weight: 600;
}

tr:hover td { background: var(--bg-card-hover); }

/* Badges */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.badge-error { background: rgba(239, 68, 68, 0.15); color: var(--error); }
.badge-info { background: rgba(42, 171, 238, 0.15); color: var(--tg-blue); }

/* Alerts */
.alert {
    padding: 0.85rem 1.25rem;
    border-radius: 8px;
    margin: 1rem auto;
    max-width: 1140px;
    font-size: 0.9rem;
}

.alert-error { background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.3); color: #fca5a5; }
.alert-success { background: rgba(34, 197, 94, 0.12); border: 1px solid rgba(34, 197, 94, 0.3); color: #86efac; }

/* Check result */
.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.result-item .key { color: var(--text-muted); }
.result-item .val { font-weight: 500; text-align: right; }

.history-list { list-style: none; }
.history-list li {
    padding: 0.4rem 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

/* Admin */
.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.admin-tabs a {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.admin-tabs a.active,
.admin-tabs a:hover {
    background: var(--tg-blue);
    color: #fff;
    border-color: var(--tg-blue);
}

.inline-form { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 3rem;
}

/* Payment QRIS */
.payment-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    max-width: 900px;
}

.payment-qr-card { text-align: center; }

.payment-status { margin-bottom: 1rem; }

.payment-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.qr-wrapper {
    display: inline-block;
    padding: 1rem;
    background: #fff;
    border-radius: 12px;
    margin-bottom: 1rem;
    transition: opacity 0.3s;
}

.payment-amount { margin-bottom: 1.25rem; }
.payment-amount .label { display: block; font-size: 0.85rem; color: var(--text-muted); }
.payment-amount .amount { font-size: 2rem; font-weight: 800; color: var(--tg-blue); }
.payment-amount .fee-note { display: block; font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }

.payment-details { text-align: left; margin-bottom: 1rem; }
.payment-hint { font-size: 0.8rem; color: var(--text-muted); }

.payment-success { padding: 1.5rem 0; }
.payment-success .success-icon { font-size: 3rem; margin-bottom: 0.5rem; }
.payment-success h3 { margin-bottom: 0.5rem; }

.payment-steps {
    padding-left: 1.25rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.payment-steps li { margin-bottom: 0.6rem; }

@media (max-width: 768px) {
    .payment-layout { grid-template-columns: 1fr; }
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-content > div[style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

/* Visibility helpers — desktop default */
.m-mobile-only { display: none !important; }
.m-hero { display: none; }
.nav-app-menu,
.nav-app-bell { display: none; }
.bottom-nav,
.mobile-menu { display: none; }

.m-rep-card {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 0.85rem;
}
.m-rep-card h4 {
    margin: 0;
    font-size: 0.95rem;
    color: var(--accent, var(--tg-blue));
}
.m-rep-card p {
    margin: 0.3rem 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.45;
}
.m-rep-card--score {
    background: var(--accent-soft, rgba(42, 171, 238, 0.1));
    border: 1px solid var(--border);
    justify-content: space-between;
}
.m-rep-level {
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent, var(--tg-blue));
}
.m-rep-card--empty {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.28);
}
.m-rep-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: var(--success);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .nav-toggle {
        display: inline-flex !important;
    }
    .nav-links {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        background: var(--bg-card);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem 1.25rem 1rem;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
        z-index: 2000;
        max-height: min(85vh, 640px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .nav-check:checked ~ .nav-links,
    .nav-links.open,
    .nav-links.is-open {
        display: flex !important;
    }
    .nav-links > a,
    .nav-links > .nav-balance,
    .nav-links > .lang-selector,
    .nav-links > .theme-toggle {
        width: 100%;
        justify-content: flex-start;
        padding: 0.85rem 0.35rem;
        border-bottom: 1px solid var(--border);
        box-sizing: border-box;
    }
    .nav-links > .theme-toggle {
        border-bottom: none;
        margin-top: 0.35rem;
    }
    .nav-links .btn {
        width: 100%;
        margin-top: 0.35rem;
    }

    /* App shell: hamburger + bell replaces classic mobile nav */
    body.has-app-nav .nav-toggle,
    body.has-app-nav .nav-check,
    body.has-app-nav .nav-links,
    body.has-app-nav .nav-balance-mobile {
        display: none !important;
    }
    body.has-app-nav .nav-app-menu,
    body.has-app-nav .nav-app-bell {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    body.has-app-nav .nav-inner {
        justify-content: flex-start;
        gap: 0.65rem;
    }
    body.has-app-nav .logo {
        flex: 1;
        min-width: 0;
        justify-content: center;
    }
    body.has-app-nav .nav-app-bell {
        margin-left: auto;
    }

    .nav-app-menu {
        width: 40px;
        height: 40px;
        border: 1px solid var(--border);
        border-radius: 12px;
        background: var(--bg-card);
        color: var(--text);
        cursor: pointer;
        flex-shrink: 0;
        position: relative;
    }
    .nav-app-menu .nav-toggle-icon,
    .nav-app-menu .nav-toggle-icon::before,
    .nav-app-menu .nav-toggle-icon::after {
        background: var(--text);
    }
    .nav-app-bell {
        position: relative;
        width: 40px;
        height: 40px;
        border: 1px solid var(--border);
        border-radius: 12px;
        background: var(--bg-card);
        color: var(--text);
        text-decoration: none;
        flex-shrink: 0;
    }
    .nav-app-bell-dot {
        position: absolute;
        top: -4px;
        right: -4px;
        min-width: 16px;
        height: 16px;
        padding: 0 4px;
        border-radius: 999px;
        background: var(--error);
        color: #fff;
        font-size: 0.62rem;
        font-weight: 800;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1.5px solid var(--bg-card);
    }

    .dashboard-layout {
        grid-template-columns: 1fr;
        min-height: calc(100vh - 64px);
        padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
    }
    .sidebar {
        display: none !important;
    }
    .nav-balance-mobile {
        display: inline-flex;
        align-items: center;
    }
    .logo > span:last-child {
        max-width: 46vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .dashboard-content {
        padding: 0.9rem 0.9rem 1.35rem;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }
    .page-header {
        margin-bottom: 1rem;
    }
    .page-header h1 {
        font-size: 1.3rem;
    }
    .card {
        padding: 1rem;
        border-radius: 16px;
    }
    .table-wrap {
        margin: 0 -0.25rem;
    }
    th, td {
        padding: 0.65rem 0.7rem;
        font-size: 0.82rem;
    }
    .btn {
        min-height: 46px;
        border-radius: 12px;
    }
    .btn-sm {
        min-height: 36px;
    }
    .form-control {
        min-height: 48px;
        border-radius: 12px;
        font-size: 1rem;
    }
    .result-tabs-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        scrollbar-width: none;
        gap: 0.4rem;
        margin-left: -0.25rem;
        margin-right: -0.25rem;
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }
    .result-tabs-nav::-webkit-scrollbar {
        display: none;
    }
    .result-tabs-nav label {
        flex: 0 0 auto;
        white-space: nowrap;
        border-radius: 999px;
        padding: 0.55rem 0.95rem;
    }
    #msg-fetch-panel > div[style*="display:flex"] {
        flex-direction: column;
        align-items: stretch !important;
    }

    .m-mobile-only { display: block !important; }
    .m-desktop-only,
    .m-hide-on-mobile { display: none !important; }

    /* Hero: balance + quick tools */
    .m-hero {
        display: block;
        margin-bottom: 1rem;
    }
    .m-balance-card {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.85rem;
        padding: 1.05rem 1.1rem;
        border-radius: 18px;
        background: linear-gradient(135deg, #1d8fd6 0%, #2AABEE 55%, #3bb8f5 100%);
        color: #fff;
        box-shadow: 0 10px 28px rgba(42, 171, 238, 0.28);
        margin-bottom: 0.9rem;
    }
    .m-balance-label {
        display: block;
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        opacity: 0.9;
    }
    .m-balance-value {
        display: block;
        font-size: 1.45rem;
        font-weight: 800;
        line-height: 1.2;
        margin-top: 0.15rem;
    }
    .m-balance-hint {
        display: block;
        font-size: 0.75rem;
        opacity: 0.88;
        margin-top: 0.2rem;
    }
    .m-balance-cta {
        flex-shrink: 0;
        background: #fff;
        color: #1a7fbd;
        font-weight: 800;
        font-size: 0.82rem;
        padding: 0.55rem 0.9rem;
        border-radius: 999px;
        text-decoration: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    }
    .m-balance-cta:hover {
        color: #156a9e;
    }
    .m-quick-tools {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.45rem;
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: 16px;
        padding: 0.7rem 0.35rem;
    }
    .m-quick-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.35rem;
        text-decoration: none;
        color: var(--text-muted);
        font-size: 0.68rem;
        font-weight: 600;
        text-align: center;
        padding: 0.25rem;
        border-radius: 12px;
    }
    .m-quick-item.is-active,
    .m-quick-item:hover {
        color: var(--tg-blue);
    }
    .m-quick-item.is-active .m-quick-icon {
        background: rgba(42, 171, 238, 0.16);
        border-color: rgba(42, 171, 238, 0.35);
    }
    .m-quick-icon {
        width: 2.6rem;
        height: 2.6rem;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.15rem;
        background: var(--bg-input);
        border: 1px solid var(--border);
    }
    .m-quick-label {
        line-height: 1.2;
        max-width: 100%;
    }

    .m-stats-row {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.55rem;
        margin-bottom: 1rem;
    }
    .m-stat-chip {
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: 14px;
        padding: 0.7rem 0.55rem;
        text-align: center;
    }
    .m-stat-chip span {
        display: block;
        font-size: 0.68rem;
        color: var(--text-muted);
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }
    .m-stat-chip strong {
        display: block;
        margin-top: 0.2rem;
        font-size: 1.05rem;
    }

    .m-check-card-head h2 {
        margin: 0 0 0.35rem;
        font-size: 1.15rem;
        display: flex;
        align-items: center;
        gap: 0.4rem;
    }
    .m-check-card-head p {
        margin: 0 0 1rem;
        color: var(--text-muted);
        font-size: 0.85rem;
    }
    .m-check-verified {
        width: 1.15rem;
        height: 1.15rem;
        border-radius: 50%;
        background: var(--tg-blue);
        color: #fff;
        font-size: 0.7rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-weight: 800;
    }
    .m-check-submit {
        width: 100%;
        font-weight: 700;
    }
    .m-info-box {
        margin-top: 1rem;
        padding: 0.85rem 0.95rem;
        border-radius: 12px;
        background: rgba(42, 171, 238, 0.1);
        border: 1px solid rgba(42, 171, 238, 0.22);
        color: var(--text-muted);
        font-size: 0.82rem;
        line-height: 1.45;
    }

    /* Bottom navigation */
    .bottom-nav {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1500;
        height: calc(3.85rem + env(safe-area-inset-bottom, 0px));
        padding: 0.3rem 0.2rem env(safe-area-inset-bottom, 0px);
        background: var(--bg-card);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-top: 1px solid var(--border);
        box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.22);
        align-items: stretch;
        justify-content: space-around;
        gap: 0.1rem;
    }
    .bottom-nav-item {
        flex: 1 1 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.12rem;
        min-width: 0;
        padding: 0.3rem 0.15rem;
        border: 0;
        background: transparent;
        color: var(--text-muted);
        font: inherit;
        font-size: 0.66rem;
        font-weight: 700;
        line-height: 1.15;
        text-decoration: none;
        border-radius: 12px;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    .bottom-nav-item.is-active,
    .bottom-nav-item:hover,
    .bottom-nav-item:focus-visible {
        color: var(--tg-blue);
        outline: none;
    }
    .bottom-nav-item.is-active {
        background: rgba(42, 171, 238, 0.1);
    }
    .bottom-nav-icon {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 1.4rem;
    }
    .bottom-nav-label {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .bottom-nav-dot {
        position: absolute;
        top: -2px;
        right: -6px;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--error);
        border: 1.5px solid var(--bg-card);
    }

    /* Full mobile menu drawer */
    .mobile-menu {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1700;
    }
    .mobile-menu[hidden] {
        display: none !important;
    }
    .mobile-menu-backdrop {
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.55);
        border: 0;
        cursor: pointer;
    }
    .mobile-menu-panel {
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(86vw, 340px);
        background: var(--bg-card);
        border-right: 1px solid var(--border);
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        padding: 1rem 1rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
        box-shadow: 12px 0 40px rgba(0, 0, 0, 0.35);
        animation: tf-drawer-in 0.22s ease-out;
    }
    @keyframes tf-drawer-in {
        from { transform: translateX(-16px); opacity: 0.7; }
        to { transform: translateX(0); opacity: 1; }
    }
    .mobile-menu-top {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }
    .mobile-menu-brand {
        display: flex;
        align-items: center;
        gap: 0.7rem;
        min-width: 0;
    }
    .mobile-menu-brand strong {
        display: block;
        font-size: 0.95rem;
        line-height: 1.25;
    }
    .mobile-menu-sub {
        margin: 0.15rem 0 0;
        font-size: 0.78rem;
        color: var(--text-muted);
    }
    .mobile-menu-close {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: 1px solid var(--border);
        background: var(--bg-input);
        color: var(--text-muted);
        cursor: pointer;
        flex-shrink: 0;
    }
    .mobile-menu-links {
        display: flex;
        flex-direction: column;
        gap: 0.15rem;
        margin-bottom: 0.85rem;
    }
    .mobile-menu-links a {
        padding: 0.7rem 0.65rem;
        border-radius: 10px;
        color: var(--text);
        font-weight: 600;
        font-size: 0.92rem;
        text-decoration: none;
    }
    .mobile-menu-links a:hover {
        background: rgba(42, 171, 238, 0.1);
        color: var(--tg-blue);
    }
    .mobile-menu-account {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.75rem 0.65rem;
        border: 1px solid var(--border);
        border-radius: 12px;
        margin-bottom: 0.85rem;
        background: var(--bg-input);
    }
    .mobile-menu-coins {
        font-weight: 800;
        color: var(--tg-blue);
        font-size: 0.95rem;
    }
    .mobile-menu-logout {
        color: var(--error);
        font-weight: 700;
        font-size: 0.88rem;
        text-decoration: none;
    }
    .mobile-menu-lang {
        display: flex;
        align-items: center;
        gap: 0.45rem;
        margin-bottom: 1rem;
    }
    .lang-chip {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 2.4rem;
        height: 2rem;
        padding: 0 0.55rem;
        border-radius: 999px;
        border: 1px solid var(--border);
        color: var(--text-muted);
        font-size: 0.78rem;
        font-weight: 800;
        text-decoration: none;
    }
    .lang-chip.is-active {
        background: var(--tg-blue);
        border-color: var(--tg-blue);
        color: #fff;
    }
    .mobile-menu-section {
        margin: 0 0 0.45rem;
        font-size: 0.72rem;
        font-weight: 800;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: var(--text-muted);
    }
    .mobile-menu-tools {
        display: flex;
        flex-direction: column;
        gap: 0.2rem;
    }
    .mobile-menu-tool {
        display: flex;
        align-items: center;
        gap: 0.7rem;
        padding: 0.8rem 0.65rem;
        border-radius: 12px;
        color: var(--text);
        font-weight: 600;
        font-size: 0.92rem;
        text-decoration: none;
        border: 1px solid transparent;
    }
    .mobile-menu-tool.is-active,
    .mobile-menu-tool:hover {
        background: rgba(42, 171, 238, 0.1);
        border-color: rgba(42, 171, 238, 0.22);
        color: var(--tg-blue);
    }
    .mobile-menu-tool-icon {
        width: 1.6rem;
        text-align: center;
        font-size: 1.05rem;
    }
    .bottom-sheet-badge {
        margin-left: auto;
        min-width: 1.35rem;
        height: 1.35rem;
        padding: 0 0.4rem;
        border-radius: 999px;
        background: var(--error);
        color: #fff;
        font-size: 0.72rem;
        font-weight: 700;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    body.mobile-menu-open {
        overflow: hidden;
    }
}

@media (min-width: 901px) {
    .bottom-nav,
    .mobile-menu,
    .m-hero,
    .nav-app-menu,
    .nav-app-bell,
    .m-mobile-only {
        display: none !important;
    }
    .nav-check { display: none !important; }
    .nav-toggle { display: none !important; }
    .nav-balance-mobile { display: none !important; }
    .nav-links {
        display: flex !important;
        position: static !important;
        box-shadow: none !important;
        max-height: none !important;
        overflow: visible !important;
        padding: 0 !important;
        border: none !important;
        width: auto !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 1.25rem !important;
        background: transparent !important;
    }
}

/* Theme switcher button (icons handled in themes.css) */
.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    cursor: pointer;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: var(--text);
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
}

.theme-toggle:hover {
    background: var(--bg-card-hover);
    border-color: var(--tg-blue);
}

/* Sidebar Call to Action */
.sidebar-cta {
    padding: 1.25rem;
    margin-top: auto;
    border-top: 1px solid var(--border);
}

.sidebar-cta p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.65rem;
    font-weight: 500;
}

/* Demo Preview Bar */
.demo-preview-bar {
    background: rgba(42, 171, 238, 0.1);
    border: 1px solid rgba(42, 171, 238, 0.2);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
}

.demo-preview-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
}

.demo-preview-bar-inner span {
    color: var(--text-muted);
}

.demo-preview-bar-inner strong {
    color: var(--text);
}



