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

:root {
    --card-radius: 16px;
    --control-radius: 12px;
    --ease: cubic-bezier(0.25, 0.8, 0.25, 1);
    /* Theme-agnostic fallbacks used by the admin panel (admin.css only overrides
       brand/surface/ink colors, not these semantic/shadow tokens). */
    --danger-text: #b91c1c;
    --danger-border: #fca5a5;
    --lose-bg: #fee2e2;
    --gold: #d97706;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --input-bg: #ffffff;
    --disabled-bg: #e5e7eb;
    --disabled-text: #9ca3af;
}

/* ---------- Player theme: matka crimson + gold on warm ivory — festive game-app feel ---------- */
body.player-theme {
    --brand: #c81e3a;
    --brand-dark: #9c1530;
    --brand-light: #f0a6b4;
    --brand-rgb: 200, 30, 58;
    --cream: #fff8f1;
    --surface: #ffffff;
    --sidebar-bg: #ffffff;
    --ink: #271416;
    --muted: #7a6266;
    --border: #f0ded7;
    --win: #059669;
    --win-bg: #ecfdf5;
    --lose-bg: #fef2f2;
    --gold: #e3a008;
    --gold-dark: #b47a05;
    --danger-text: #dc2626;
    --danger-border: #fca5a5;
    --accent-soft: #fdecef;
    --accent-soft-rgb: 200, 30, 58;
    --shadow-sm: 0 1px 3px rgba(39, 20, 22, 0.07);
    --shadow-md: 0 6px 20px rgba(39, 20, 22, 0.12);
    --input-bg: #ffffff;
    --disabled-bg: #f1e7e3;
    --disabled-text: #b0999c;
}

* { box-sizing: border-box; }

html { -webkit-tap-highlight-color: transparent; }

body {
    margin: 0;
    font-family: 'Nunito', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    background: var(--cream);
    color: var(--ink);
    padding-bottom: 84px;
}

h1, h2, h3 { font-family: 'Fredoka', 'Nunito', sans-serif; font-weight: 600; letter-spacing: 0.2px; margin: 0 0 6px; }

a { color: inherit; text-decoration: none; }

button, .btn, input, select, textarea { font-family: inherit; }

.icon { width: 20px; height: 20px; flex-shrink: 0; vertical-align: -4px; }

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: 6px;
}

/* ---------- Top bar ---------- */
.topbar {
    background: var(--surface);
    color: var(--ink);
    height: 60px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--border);
}

.topbar .brand { display: flex; align-items: center; gap: 4px; }
.menu-btn, .sidebar-toggle-btn {
    background: transparent;
    border: none;
    color: var(--ink);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    margin-right: 2px;
    transition: background-color 150ms var(--ease);
}
.menu-btn:hover, .sidebar-toggle-btn:hover { background: #f3f4f6; }
.menu-btn .icon, .sidebar-toggle-btn .icon { width: 20px; height: 20px; }
.sidebar-toggle-btn { display: none; }

/* ---------- Drawer ---------- */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms var(--ease);
    z-index: 30;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }

.drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 280px;
    max-width: 82vw;
    background: var(--surface);
    box-shadow: 4px 0 24px rgba(0,0,0,0.2);
    transform: translateX(-100%);
    transition: transform 260ms var(--ease);
    z-index: 31;
    overflow-y: auto;
}
.drawer.open { transform: translateX(0); }

.drawer-header {
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #fff;
    padding: 22px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.drawer-avatar-img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    flex-shrink: 0;
    object-fit: cover;
}
.drawer-name { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 15px; }
.drawer-viewprofile { font-size: 12.5px; color: rgba(255,255,255,0.85); text-decoration: underline; }

.drawer-nav { padding: 10px 0; }
.drawer-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 20px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--ink);
    transition: background-color 150ms var(--ease);
}
.drawer-nav a .icon { width: 19px; height: 19px; color: var(--brand); }
.drawer-nav a:hover { background: var(--accent-soft); }
.drawer-nav a.active { background: var(--accent-soft); color: var(--brand); }
.topbar h1 { font-size: 17px; margin: 0; color: var(--ink); font-weight: 700; }

.points-pill {
    background: var(--accent-soft);
    color: var(--brand-dark);
    padding: 7px 14px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.points-pill .icon { width: 16px; height: 16px; color: var(--gold); }

.fun-banner {
    background: var(--surface);
    color: var(--muted);
    text-align: center;
    padding: 7px 16px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.2px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.fun-banner .icon { width: 14px; height: 14px; flex-shrink: 0; }

.container { padding: 18px 16px 28px; max-width: 640px; margin: 0 auto; }

/* ---------- Desktop app shell: persistent sidebar replaces bottom nav ---------- */
.main-content { min-width: 0; }

.sidebar { display: none; }
.sidebar-brand {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: var(--ink);
    display: flex;
    align-items: center;
    min-height: 60px;
}
.sidebar-brand img { max-height: 28px; max-width: 100%; display: block; }
.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}
.sidebar-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--accent-soft);
    object-fit: cover;
    flex-shrink: 0;
}
.sidebar-profile .drawer-name { color: var(--ink); font-size: 14.5px; }
.sidebar-profile .drawer-viewprofile { color: var(--muted); font-size: 12px; text-decoration: none; }
.sidebar-profile .drawer-viewprofile:hover { color: var(--brand); }

.sidebar-section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--muted);
    padding: 16px 20px 6px;
}
.sidebar-nav { padding: 4px 0 12px; display: flex; flex-direction: column; }
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 20px;
    margin: 1px 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    transition: background-color 150ms var(--ease), color 150ms var(--ease);
}
.sidebar-nav a .icon { width: 18px; height: 18px; color: var(--muted); transition: color 150ms var(--ease); }
.sidebar-nav a:hover { background: #f9fafb; }
.sidebar-nav a.active { background: var(--accent-soft); color: var(--brand); }
.sidebar-nav a.active .icon { color: var(--brand); }

/* ---------- Home promo slider ---------- */
.home-slider {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-bottom: 16px;
    padding-bottom: 2px;
}
.home-slider img {
    scroll-snap-align: start;
    flex: 0 0 100%;
    max-width: 100%;
    aspect-ratio: 16 / 7;
    object-fit: cover;
    border-radius: var(--card-radius);
    border: 1px solid var(--border);
}

/* ---------- Cards ---------- */
.market-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: 18px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    transition: box-shadow 200ms var(--ease), transform 200ms var(--ease);
}
.market-card:hover { box-shadow: var(--shadow-md); }

.market-card .name { font-family: 'Fredoka', sans-serif; font-weight: 600; color: var(--brand); font-size: 16px; }
.market-card .digits { color: var(--muted); font-size: 14.5px; margin: 4px 0; font-variant-numeric: tabular-nums; letter-spacing: 0.5px; }
.market-card .times { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.market-card .countdown { font-size: 12px; color: var(--gold); font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.market-card .times .icon { width: 12px; height: 12px; }

.badge {
    font-size: 11px;
    padding: 4px 11px;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.badge.open { background: var(--win-bg); color: var(--win); }
.badge.closed { background: var(--lose-bg); color: var(--danger-text); }
.badge.pending { background: #f3ede2; color: var(--muted); }

.market-card-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.circle-actions { display: flex; gap: 8px; }
.circle-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand);
    color: #fff;
    flex-shrink: 0;
    transition: background-color 150ms var(--ease), transform 100ms var(--ease);
}
.circle-btn .icon { width: 18px; height: 18px; }
.circle-btn:hover { background: var(--brand-dark); }
.circle-btn:active { transform: scale(0.94); }
.circle-btn.secondary { background: var(--accent-soft); color: var(--brand); }
.circle-btn.secondary:hover { background: var(--brand); color: #fff; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--brand);
    color: #fff;
    border: none;
    padding: 12px 22px;
    border-radius: var(--control-radius);
    font-weight: 700;
    font-size: 14.5px;
    cursor: pointer;
    min-height: 44px;
    transition: background-color 180ms var(--ease), transform 100ms var(--ease), box-shadow 180ms var(--ease);
    box-shadow: var(--shadow-sm);
}
.btn:hover { background: var(--brand-dark); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(1px); box-shadow: var(--shadow-sm); }
.btn:disabled { background: var(--disabled-bg); color: var(--disabled-text); box-shadow: none; cursor: not-allowed; }
.btn.secondary { background: var(--surface); color: var(--brand); border: 1.5px solid var(--brand); box-shadow: none; }
.btn.secondary:hover { background: var(--accent-soft); }
.btn.win { background: var(--win); }
.btn.win:hover { background: #047857; }

/* ---------- Cards / panels ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
}
.card h2 { font-size: 20px; }

/* ---------- Auth pages: centered, branded card ---------- */
.auth-shell {
    min-height: calc(100vh - 108px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 16px;
}
.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 34px 28px;
    box-shadow: var(--shadow-md);
}
.auth-badge {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 10px 22px rgba(var(--brand-rgb), 0.35);
}
.auth-badge .icon { width: 28px; height: 28px; color: #fff; }
.auth-badge img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.auth-card h2 { text-align: center; font-size: 22px; margin-bottom: 4px; }
.auth-card .helper-text { text-align: center; }
.auth-card .field-label:first-of-type { margin-top: 18px; }
.auth-footer-link { text-align: center; margin-top: 18px; font-size: 13.5px; color: var(--muted); }
.auth-footer-link a { color: var(--brand); font-weight: 700; }

@media (min-width: 1024px) {
    .auth-shell { min-height: 100vh; padding: 48px 16px; }
}

/* ---------- Game type chooser (2-column icon tile grid, mirrors the original app's layout) ---------- */
.game-tile-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.game-tile {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: 26px 16px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 150ms var(--ease), transform 150ms var(--ease);
}
.game-tile:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.game-tile-icon {
    width: 56px; height: 56px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--tile-color);
    color: #fff;
    position: relative;
}
.game-tile-icon .icon { width: 26px; height: 26px; }
.game-tile-icon::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 3px;
    border-radius: 2px;
    background: var(--tile-color);
}
.game-tile-label { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 14.5px; color: var(--ink); text-align: center; }
.game-tile-rate { font-size: 12px; font-weight: 700; color: var(--muted); }

.tile-1 { --tile-color: #2563eb; }
.tile-j { --tile-color: #059669; }
.tile-sp { --tile-color: #7c3aed; }
.tile-dp { --tile-color: #d97706; }
.tile-tp { --tile-color: #db2777; }
.tile-hs { --tile-color: #0891b2; }
.tile-fs { --tile-color: #dc2626; }
.badge-1 { background: #2563eb; }
.badge-j { background: #059669; }
.badge-sp { background: #7c3aed; }
.badge-dp { background: #d97706; }
.badge-tp { background: #db2777; }
.badge-hs { background: #0891b2; }
.badge-fs { background: #dc2626; }

/* ---------- Basket-style bid entry ---------- */
.basket-toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 18px; }
.basket-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.basket-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--control-radius);
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.basket-item .n { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 15px; color: var(--ink); }
.basket-item input { width: 84px; border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; font-size: 13px; text-align: right; background: var(--input-bg); color: var(--ink); }
.basket-footer {
    position: sticky;
    bottom: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-md);
}
.basket-footer .totals { display: flex; gap: 24px; }
.basket-footer .totals .label { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.basket-footer .totals .val { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 18px; color: var(--ink); }
.basket-footer .btn { width: auto; padding: 12px 28px; }

.digit-toggle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 12px; margin-bottom: 16px; }
.digit-toggle {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--control-radius);
    padding: 14px;
    text-align: center;
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: var(--ink);
    cursor: pointer;
    user-select: none;
}
.digit-toggle.selected { background: var(--brand); color: #fff; border-color: var(--brand); }

.field-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 7px;
    margin-top: 16px;
}
.field-label:first-child { margin-top: 0; }

.form-input {
    width: 100%;
    padding: 13px 15px;
    border: 1.5px solid var(--border);
    border-radius: var(--control-radius);
    margin-bottom: 4px;
    font-size: 15px;
    background: var(--input-bg);
    color: var(--ink);
    transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease);
}
.form-input::placeholder { color: var(--muted); }
.form-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.12);
    outline: none;
}

.helper-text { color: var(--muted); font-size: 13px; margin: -2px 0 14px; }

.msg { padding: 11px 14px; border-radius: var(--control-radius); font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.msg.error { background: var(--lose-bg); color: var(--danger-text); }
.msg.success { background: var(--win-bg); color: var(--win); }

/* ---------- Bottom nav ---------- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    display: flex;
    justify-content: space-around;
    padding: 8px 0 max(8px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    z-index: 20;
    box-shadow: 0 -2px 12px rgba(43, 35, 32, 0.05);
}
.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    padding: 6px 14px;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    border-radius: 10px;
    transition: color 150ms var(--ease), background-color 150ms var(--ease);
}
.bottom-nav a .icon { width: 21px; height: 21px; }
.bottom-nav a.active { color: var(--brand); background: var(--lose-bg); }
.bottom-nav a:active { transform: scale(0.94); }

/* ---------- Rates ---------- */
.rate-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: 14px 16px;
    margin-bottom: 10px;
    transition: box-shadow 200ms var(--ease);
}
.rate-row:hover { box-shadow: var(--shadow-md); }
.rate-row .rate-name { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 15px; }
.rate-row .rate-desc { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.rate-row .mult { font-size: 21px; font-weight: 700; color: var(--brand); font-family: 'Fredoka', sans-serif; }

/* ---------- Disclaimer ---------- */
.disclaimer-box {
    background: var(--lose-bg);
    border: 1px solid var(--danger-border);
    color: var(--danger-text);
    padding: 13px 15px;
    border-radius: var(--control-radius);
    font-size: 12.5px;
    line-height: 1.5;
    margin-bottom: 16px;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}
.disclaimer-box .icon { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }

/* ---------- Balance panel ---------- */
.balance-panel { text-align: center; }
.balance-panel .label { font-size: 13px; color: var(--muted); font-weight: 600; }
.balance-panel .amount {
    font-family: 'Fredoka', sans-serif;
    font-size: 34px;
    font-weight: 700;
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 4px 0 16px;
}
.balance-panel .amount .icon { width: 28px; height: 28px; color: var(--gold); }

/* ---------- Chart table ---------- */
table.chart-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--card-radius); overflow: hidden; border: 1px solid var(--border); }
table.chart-table th, table.chart-table td { padding: 11px; text-align: center; font-size: 13.5px; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
table.chart-table th { background: var(--brand); color: #fff; font-weight: 700; }
table.chart-table tr:last-child td { border-bottom: none; }

/* ---------- Weekly panel chart ---------- */
.panel-chart-wrap { overflow-x: auto; border-radius: var(--card-radius); box-shadow: var(--shadow-sm); }
table.panel-chart { width: 100%; border-collapse: collapse; background: var(--surface); min-width: 560px; }
table.panel-chart th {
    background: var(--brand);
    color: #fff;
    font-weight: 700;
    font-size: 12.5px;
    padding: 10px 6px;
    text-align: center;
}
table.panel-chart td {
    border: 1px solid var(--border);
    text-align: center;
    padding: 6px 4px;
    font-variant-numeric: tabular-nums;
    vertical-align: middle;
}
table.panel-chart .week-label { font-size: 11px; color: var(--muted); font-weight: 700; white-space: nowrap; padding: 6px 10px; }
table.panel-chart .panel-cell.today { background: var(--accent-soft); }
table.panel-chart .panel-cell .open,
table.panel-chart .panel-cell .close { font-size: 12px; color: var(--muted); line-height: 1.3; }
table.panel-chart .panel-cell .jodi { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 17px; color: var(--brand); line-height: 1.3; }
table.panel-chart .panel-cell .off { color: var(--disabled-text); font-size: 13px; }
table.panel-chart .panel-cell .pending { color: var(--disabled-text); font-size: 13px; }

.chart-nav { display: flex; justify-content: space-between; margin-top: 14px; gap: 10px; }
.chart-nav .btn { width: auto; padding: 10px 18px; }

/* ---------- Empty states ---------- */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--muted);
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--card-radius);
}
.empty-state .icon { width: 40px; height: 40px; color: var(--brand-light); margin-bottom: 12px; }
.empty-state .title { font-family: 'Fredoka', sans-serif; font-weight: 600; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.empty-state .subtitle { font-size: 13.5px; }

@media (prefers-reduced-motion: reduce) {
    * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- Desktop app shell: full-height sidebar, same structure as the admin panel ---------- */
.app-layout { display: flex; min-height: 100vh; }
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }

@media (min-width: 1024px) {
    body { padding-bottom: 0; }
    .menu-btn { display: none; }
    .bottom-nav { display: none; }

    .sidebar {
        display: flex;
        flex-direction: column;
        width: 264px;
        flex-shrink: 0;
        background: var(--sidebar-bg);
        border-right: 1px solid var(--border);
        position: sticky;
        top: 0;
        height: 100vh;
        overflow-y: auto;
    }
    .sidebar-toggle-btn { display: flex; }
    .sidebar ~ .main-col .topbar-name { display: none; }
    .container { width: 92%; max-width: 1400px; padding: 36px 0; margin: 0 auto; }

    body.sidebar-collapsed .sidebar { display: none; }
    body.sidebar-collapsed .sidebar ~ .main-col .topbar-name { display: block; }
}
