/* ═══════════════════════════════════════════════════════════════════════
   YansDataHub — Store Portal Theme
   ONE shared stylesheet used by every page. Nothing else loads local CSS.
   To force everyone's browser to drop a stale cached copy after an edit,
   bump ASSET_VERSION in includes/config.php — it's appended as ?v=... on
   the <link> tag that loads this file, so no other change is needed here.
   Palette matched to yansdatahub.com/buy (light + dark).
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Design tokens ── */
:root {
    /* Primary CTA gradient — warm orange → pink → purple, matches buy.php's
       "Sign up" / "Create account" / "Track order" buttons */
    --grad: linear-gradient(90deg, #f97316 0%, #ec4899 55%, #8b5cf6 100%);
    --accent:  #a855f7;
    --ok:      #10b981;
    --warn:    #f59e0b;
    --bad:     #ef4444;
    --info:    #06b6d4;
    --yellow:  #ffc107;
    --green:   #10b981;
    --blue:    #3b82f6;
    --red:     #ef4444;
    --purple:  #a855f7;
    --orange:  #f97316;
    --pink:    #ec4899;

    --topnav-h: 60px;

    /* Dark theme — deep indigo/purple-black, NOT neutral grey */
    --base:       #0b0712;
    --sheet:      #150f23;
    --text:       #f6f4fb;
    --muted:      rgba(246,244,251,.56);
    --faint:      rgba(246,244,251,.28);
    --glass:      rgba(168,139,250,.07);
    --glass-strong: rgba(168,139,250,.13);
    --field:      rgba(255,255,255,.07);
    --line:       rgba(255,255,255,.10);
    --edge:       rgba(255,255,255,.14);

    /* legacy aliases kept for older inline references */
    --bg-dark:    #150f23;
    --bg-darker:  #0b0712;
    --card-dark:  #1c1530;
}

[data-bs-theme="light"] {
    --base:       #faf9fc;
    --sheet:      #ffffff;
    --text:       #150f23;
    --muted:      rgba(21,15,35,.58);
    --faint:      rgba(21,15,35,.32);
    --glass:      rgba(139,92,246,.045);
    --glass-strong: rgba(139,92,246,.09);
    --field:      rgba(21,15,35,.045);
    --line:       rgba(21,15,35,.09);
    --edge:       rgba(21,15,35,.13);

    --bg-dark:    #f1edf9;
    --bg-darker:  #ffffff;
    --card-dark:  #ffffff;
}

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }

body {
    background: var(--base);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    transition: background .3s ease, color .3s ease;
    min-height: 100vh;
    overflow-x: hidden;
}

.mdi { font-size: 1.1em; vertical-align: middle; line-height: 1; }
[class*="mdi-"]::before { vertical-align: middle; }

/* ── Mesh background — three soft gradient orbs, matches buy.php ── */
body::before,
body::after,
.mesh-orb-3 {
    content: '';
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(10px);
}
body::before {
    top: -180px;
    right: -140px;
    width: 620px;
    height: 620px;
    background: radial-gradient(circle at center, rgba(168,85,247,.32) 0%, transparent 70%);
}
body::after {
    bottom: -140px;
    right: -100px;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle at center, rgba(59,130,246,.26) 0%, transparent 70%);
}
[data-bs-theme="light"] body::before { background: radial-gradient(circle at center, rgba(168,85,247,.16) 0%, transparent 70%); }
[data-bs-theme="light"] body::after  { background: radial-gradient(circle at center, rgba(59,130,246,.14) 0%, transparent 70%); }

/* third orb (orange/pink, bottom-left) — inserted via body tag in head.php */
.mesh-orb-3 {
    bottom: -160px;
    left: -140px;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle at center, rgba(249,115,22,.28) 0%, transparent 70%);
}
[data-bs-theme="light"] .mesh-orb-3 { background: radial-gradient(circle at center, rgba(249,115,22,.15) 0%, transparent 70%); }

/* ── Container ── */
.container-custom {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
    padding-bottom: 5rem;
    position: relative;
    z-index: 1;
}
@media (min-width: 576px) { .container-custom { padding: 1.5rem; padding-bottom: 5.5rem; } }

/* ── Glass card ── */
.yd-card {
    background: var(--glass);
    border: 1px solid var(--edge);
    border-radius: 18px;
    padding: 1.25rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: border-color .2s;
    position: relative;
    overflow: hidden;
}
.yd-card:hover { border-color: rgba(168,85,247,.4); }
.yd-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 1rem; }
.yd-card-title { font-size: .95rem; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }

/* ── Stat grid ── */
.stats-grid-4col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 768px) { .stats-grid-4col { grid-template-columns: repeat(4,1fr); } }
.col-span-4 { grid-column: 1/-1; }

.stat-box {
    background: var(--glass);
    border: 1px solid var(--edge);
    border-radius: 16px;
    padding: 1rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: transform .2s, border-color .2s;
    position: relative;
    overflow: hidden;
}
.stat-box:hover { transform: translateY(-2px); border-color: rgba(168,85,247,.45); }
.stat-box-label { font-size: .75rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; display: flex; align-items: center; gap: 8px; margin-bottom: .5rem; }
.stat-box-value { font-size: 1.4rem; font-weight: 800; color: var(--text); line-height: 1.2; margin-bottom: .25rem; }
@media (max-width: 375px) { .stat-box-value { font-size: 1.1rem; } }
.stat-change { font-size: .72rem; color: var(--muted); display: flex; align-items: center; gap: 4px; }

.stat-icon { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.stat-icon.yellow { background: rgba(251,191,36,.18); color: var(--warn); }
.stat-icon.green  { background: rgba(16,185,129,.18); color: var(--ok); }
.stat-icon.blue   { background: rgba(59,130,246,.18); color: var(--blue); }
.stat-icon.purple { background: rgba(168,85,247,.18); color: var(--purple); }
.stat-icon.red    { background: rgba(239,68,68,.18);  color: var(--bad); }
.stat-icon.orange { background: rgba(249,115,22,.18); color: var(--orange); }

/* ── Section panels ── */
.stats-section {
    background: var(--glass);
    border: 1px solid var(--edge);
    border-radius: 18px;
    padding: 1.25rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    margin-bottom: 1rem;
}
.section-header { display: flex; align-items: center; gap: 12px; margin-bottom: 1rem; }
.section-icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.section-icon.yellow { background: rgba(251,191,36,.18); color: var(--warn); }
.section-icon.green  { background: rgba(16,185,129,.18); color: var(--ok); }
.section-icon.blue   { background: rgba(59,130,246,.18); color: var(--blue); }
.section-icon.purple { background: rgba(168,85,247,.18); color: var(--purple); }
.section-icon.orange { background: rgba(249,115,22,.18); color: var(--orange); }
.section-title { font-size: .95rem; font-weight: 700; color: var(--text); margin: 0; }

/* ── Top nav — full-width bar matching buy.php's header ── */
.top-nav {
    background: var(--sheet);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 200;
    width: 100%;
}
[data-bs-theme="dark"] .top-nav { background: rgba(21,15,35,.78); }
[data-bs-theme="light"] .top-nav { background: rgba(255,255,255,.85); }

.logo {
    background: var(--grad);
    color: #fff;
    font-weight: 900;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 1.1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nav-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
    font-size: 1.05rem;
}
.nav-btn.wallet { background: rgba(16,185,129,.16); color: var(--ok); border: 1px solid rgba(16,185,129,.3); }
.nav-btn.wallet:hover { background: rgba(16,185,129,.28); }
.nav-btn.user   { background: var(--glass-strong); color: var(--text); border: 1px solid var(--edge); }
.nav-btn.user:hover { border-color: var(--purple); }
.nav-btn.menu   { background: var(--grad); color: #fff; }
.nav-btn.menu:hover { filter: brightness(1.08); }
.nav-btn.back   { background: var(--glass-strong); color: var(--text); border: 1px solid var(--edge); }
.nav-btn.back:hover { border-color: var(--purple); }

/* pill-style buttons (buy.php "Sign in" / "Sign up" header style) */
.nav-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid var(--edge);
    min-height: 40px;
    transition: all .2s;
}
.nav-pill.outline { background: var(--glass-strong); color: var(--text); }
.nav-pill.outline:hover { border-color: var(--purple); }
.nav-pill.grad { background: var(--grad); color: #fff; border: none; box-shadow: 0 4px 16px rgba(236,72,153,.3); }
.nav-pill.grad:hover { filter: brightness(1.06); }

/* ── Sidebar (right-slide drawer) ── */
.sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    height: 100dvh;
    background: var(--sheet);
    border-left: 1px solid var(--edge);
    z-index: 2000;
    transition: right .3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: -8px 0 40px rgba(0,0,0,.5);
}
[data-bs-theme="light"] .sidebar { box-shadow: -8px 0 40px rgba(0,0,0,.12); }
.sidebar.show { right: 0; }

.sidebar-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 1999;
    opacity: 0; visibility: hidden;
    transition: all .3s;
    backdrop-filter: blur(2px);
}
.sidebar-overlay.show { opacity: 1; visibility: visible; }

.sidebar-header { padding: 1rem 1.25rem; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: inherit; z-index: 1; }
.sidebar-header h4 { font-size: 1rem; font-weight: 700; color: var(--text); margin: 0; }

.sidebar-profile {
    background: var(--glass);
    border: 1px solid var(--edge);
    border-radius: 16px;
    padding: .875rem 1rem;
    margin: 1rem;
    display: flex; align-items: center; gap: 1rem;
    cursor: pointer;
    transition: background .2s, border-color .2s;
    text-decoration: none;
    color: var(--text);
}
.sidebar-profile:hover { background: rgba(168,85,247,.12); border-color: rgba(168,85,247,.4); }

.profile-avatar {
    width: 48px; height: 48px; border-radius: 14px;
    background: var(--grad);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; color: #fff; flex-shrink: 0;
}

.sidebar-menu { padding: 0 1rem .5rem; }
.menu-section { margin-bottom: 1.25rem; }
.menu-section-title { color: var(--muted); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .5rem; padding: 0 .5rem; }

.menu-item {
    display: flex; align-items: center; gap: .875rem;
    padding: .875rem 1rem; border-radius: 14px;
    cursor: pointer; transition: background .2s;
    margin-bottom: .25rem; color: var(--text);
    text-decoration: none; min-height: 54px;
}
.menu-item:hover { background: var(--glass-strong); color: var(--purple); }
.menu-item:hover .menu-item-icon { border-color: var(--purple); }

.menu-item-icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; border: 1px solid transparent; transition: border-color .2s; }
.menu-item-icon.yellow { background: rgba(251,191,36,.18); color: var(--warn); }
.menu-item-icon.blue   { background: rgba(59,130,246,.18); color: var(--blue); }
.menu-item-icon.red    { background: rgba(239,68,68,.18);  color: var(--bad); }
.menu-item-icon.green  { background: rgba(16,185,129,.18); color: var(--ok); }
.menu-item-icon.orange { background: rgba(249,115,22,.18); color: var(--orange); }
.menu-item-icon.dark   { background: var(--glass-strong);  color: var(--purple); }

.menu-item-content { flex: 1; min-width: 0; }
.menu-item-title { font-weight: 600; font-size: .9rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-item-subtitle { font-size: .78rem; color: var(--muted); margin-top: 2px; }

.soon-badge { background: var(--glass-strong); color: var(--muted); padding: 3px 10px; border-radius: 12px; font-size: .7rem; font-weight: 700; letter-spacing: .04em; border: 1px solid var(--edge); flex-shrink: 0; }

.dark-mode-toggle { display: flex; align-items: center; justify-content: space-between; padding: .875rem 1rem; margin: .75rem 1rem; background: var(--glass); border: 1px solid var(--edge); border-radius: 16px; }
.toggle-switch { position: relative; width: 48px; height: 26px; background: var(--line); border-radius: 13px; cursor: pointer; transition: background .3s; flex-shrink: 0; }
.toggle-switch.active { background: var(--grad); }
.toggle-slider { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: #fff; border-radius: 50%; transition: transform .3s; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.toggle-switch.active .toggle-slider { transform: translateX(22px); }

.sign-out {
    margin: .75rem 1rem; padding: .875rem 1rem;
    background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.2);
    border-radius: 16px; color: var(--bad);
    display: flex; align-items: center; gap: .875rem;
    cursor: pointer; text-decoration: none;
    width: calc(100% - 2rem); font-size: .9rem; font-weight: 600;
    transition: background .2s; min-height: 52px;
}
.sign-out:hover { background: rgba(239,68,68,.18); color: var(--bad); }
.sidebar-footer { padding: 1rem; text-align: center; color: var(--muted); font-size: .8rem; }

/* ── Action buttons ── */
.action-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 16px; border-radius: 12px;
    border: 1px solid var(--edge); background: var(--glass);
    color: var(--text); font-size: .85rem; font-weight: 600;
    text-decoration: none; cursor: pointer; transition: all .2s;
    min-height: 44px; white-space: nowrap;
}
.action-btn:hover { background: var(--glass-strong); color: var(--text); }
.action-btn.refresh { background: var(--glass); }
.action-btn.gray    { background: var(--glass); }
.action-btn.green   { background: rgba(16,185,129,.15); color: var(--ok);    border-color: rgba(16,185,129,.3); }
.action-btn.green:hover { background: rgba(16,185,129,.25); }
.action-btn.blue    { background: rgba(59,130,246,.15);  color: var(--blue); border-color: rgba(59,130,246,.3); }
.action-btn.blue:hover  { background: rgba(59,130,246,.25); }
.action-btn.purple  { background: rgba(168,85,247,.15); color: var(--purple); border-color: rgba(168,85,247,.3); }
.action-btn.purple:hover { background: rgba(168,85,247,.25); }
.action-btn.yellow  { background: rgba(251,191,36,.15);  color: var(--warn); border-color: rgba(251,191,36,.3); }
.action-btn.yellow:hover { background: rgba(251,191,36,.25); }
.action-btn.red     { background: rgba(239,68,68,.15);   color: var(--bad);  border-color: rgba(239,68,68,.3); }
.action-btn.red:hover { background: rgba(239,68,68,.25); }
.action-btn.primary { background: var(--grad); color: #fff; border: none; box-shadow: 0 4px 16px rgba(236,72,153,.3); }
.action-btn.primary:hover { filter: brightness(1.06); color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.action-btn.refresh.spinning .mdi { animation: spin .6s linear infinite; }

.quick-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: .75rem; }

/* ── Page header ── */
.page-header { margin-bottom: 1.25rem; }
.header-content { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: .75rem; flex-wrap: wrap; }
.page-title h1 { font-size: 1.4rem; font-weight: 800; color: var(--text); margin: 0 0 4px; }
@media (max-width: 375px) { .page-title h1 { font-size: 1.15rem; } }
.page-subtitle { font-size: .8rem; color: var(--muted); margin: 0; }
.header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex-shrink: 0; }

/* ── Status / badges ── */
.status-badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: 20px; font-size: .78rem; font-weight: 700; cursor: pointer; transition: filter .2s; }
.status-badge:hover { filter: brightness(1.1); }
.status-badge.active { background: rgba(16,185,129,.18); color: var(--ok); border: 1px solid rgba(16,185,129,.35); }
.status-badge.closed { background: rgba(239,68,68,.18);  color: var(--bad); border: 1px solid rgba(239,68,68,.35); }

/* ── Tabs / filters ── */
.tab-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 1rem; }
.tab-btn {
    flex: 1; min-width: 70px; padding: 10px 8px;
    border: 1px solid var(--edge); border-radius: 12px;
    background: var(--glass); color: var(--muted);
    font-size: .82rem; font-weight: 600; cursor: pointer;
    transition: all .2s; text-align: center; min-height: 44px;
}
.tab-btn:hover { background: var(--glass-strong); color: var(--text); }
.tab-btn.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 0 14px rgba(236,72,153,.35); }

/* ── Lists ── */
.customer-item { display: flex; align-items: center; gap: 10px; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.customer-item:last-child { border-bottom: none; }
.customer-info { flex: 1; min-width: 0; }
.customer-name { font-weight: 600; font-size: .88rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.customer-purchases { font-size: .75rem; color: var(--muted); margin-top: 2px; }
.customer-amount { font-weight: 700; font-size: .88rem; color: var(--ok); flex-shrink: 0; }
.customer-date { font-size: .72rem; color: var(--muted); flex-shrink: 0; }

.wallet-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
@media (max-width: 400px) { .wallet-grid { grid-template-columns: 1fr; } }
.wallet-card { background: var(--glass); border: 1px solid var(--edge); border-radius: 14px; padding: .875rem; }
.wallet-label { font-size: .72rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.wallet-amount { font-size: 1.15rem; font-weight: 800; }
.wallet-amount.green  { color: var(--ok); }
.wallet-amount.yellow { color: var(--warn); }
.wallet-amount.blue   { color: var(--blue); }

/* ── Bottom nav ── */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 300;
    background: var(--sheet);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--edge);
    padding-bottom: env(safe-area-inset-bottom);
}
[data-bs-theme="dark"] .bottom-nav { background: rgba(21,15,35,.85); }
[data-bs-theme="light"] .bottom-nav { background: rgba(255,255,255,.9); }
.bottom-nav-items { display: flex; align-items: stretch; }
.bottom-nav-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 10px 4px; text-decoration: none; color: var(--muted);
    font-size: .65rem; font-weight: 600; gap: 4px; transition: color .2s;
    min-height: 56px; position: relative;
}
.bottom-nav-item .mdi { font-size: 1.35rem; }
.bottom-nav-item:hover { color: var(--purple); }
.bottom-nav-item.active { color: var(--purple); }
.bottom-nav-item.active::before {
    content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 32px; height: 3px; border-radius: 0 0 3px 3px;
    background: var(--grad);
}

/* ── WhatsApp float ── */
.whatsapp-float {
    position: fixed; bottom: 80px; right: 20px; width: 52px; height: 52px;
    background: #25D366; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 20px rgba(37,211,102,.4); cursor: pointer; z-index: 290;
    animation: float 3s ease-in-out infinite; text-decoration: none; color: #fff; font-size: 1.5rem;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ── Toasts ── */
.yd-toast-stack { position: fixed; bottom: 72px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; width: min(90vw, 360px); }
.yd-toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; font-size: .85rem; font-weight: 600; color: #fff; pointer-events: auto; animation: toastIn .25s ease; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 4px 20px rgba(0,0,0,.4); }
@keyframes toastIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:none; } }
.yd-toast.success { background: rgba(16,185,129,.92); }
.yd-toast.error   { background: rgba(239,68,68,.92); }
.yd-toast.warning { background: rgba(245,158,11,.92); }
.yd-toast.info    { background: rgba(6,182,212,.92); }

/* ── Custom modal ── */
.modal-custom { display: none; position: fixed; inset: 0; z-index: 3000; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); align-items: flex-end; justify-content: center; padding: 1rem; }
.modal-custom.show { display: flex; }
@media (min-width: 576px) { .modal-custom { align-items: center; } }
.modal-content-custom { background: var(--sheet); border: 1px solid var(--edge); border-radius: 22px 22px 16px 16px; max-width: 440px; width: 100%; animation: slideUp .25s ease; overflow: hidden; }
@media (min-width: 576px) { .modal-content-custom { border-radius: 18px; } }
@keyframes slideUp { from { transform:translateY(30px); opacity:0; } to { transform:none; opacity:1; } }
.modal-header-custom { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.modal-header-custom h3 { font-size: 1rem; font-weight: 700; color: var(--text); margin: 0; display: flex; align-items: center; gap: 8px; }
.close-modal { background: var(--glass-strong); border: 1px solid var(--edge); color: var(--text); width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: .95rem; }
.modal-body-custom { padding: 1.5rem; }
.modal-form-group { margin-bottom: 1.25rem; }
.modal-form-label { display: block; font-size: .82rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.modal-form-input { width: 100%; padding: .75rem 1rem; background: var(--field); border: 1px solid var(--edge); border-radius: 12px; color: var(--text); font-size: .9rem; outline: none; transition: border-color .2s; }
.modal-form-input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(168,85,247,.15); }
.modal-form-hint { font-size: .75rem; color: var(--muted); margin-top: 5px; }
.btn-claim { width: 100%; padding: .875rem; background: var(--grad); border: none; border-radius: 14px; color: #fff; font-weight: 700; font-size: .9rem; cursor: pointer; transition: opacity .2s; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; }
.btn-claim:hover { opacity: .92; }

#featureModal { position: fixed; inset: 0; z-index: 4000; background: rgba(0,0,0,.5); backdrop-filter: blur(4px); align-items: flex-end; justify-content: center; padding: 20px; }
#featureModal > div { background: var(--sheet); border: 1px solid var(--edge); border-radius: 18px; padding: 22px 24px; max-width: 420px; width: 100%; margin-bottom: 10px; animation: slideUp .3s ease; }

/* ── Form controls ── */
.form-control, .form-select {
    background: var(--field) !important;
    border: 1px solid var(--edge) !important;
    color: var(--text) !important;
    border-radius: 12px !important;
}
.form-control:focus, .form-select:focus {
    border-color: var(--purple) !important;
    box-shadow: 0 0 0 3px rgba(168,85,247,.15) !important;
    background: var(--field) !important;
    color: var(--text) !important;
}
.form-control::placeholder { color: var(--muted) !important; }
[data-bs-theme="light"] .form-select option { background: #fff; color: #150f23; }
[data-bs-theme="dark"] .form-select option { background: #150f23; color: #f6f4fb; }

/* ── Tables ── */
.table { color: var(--text) !important; }
.table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted) !important; border-color: var(--line) !important; font-weight: 700; padding: .75rem 1rem; }
.table td { border-color: var(--line) !important; color: var(--text) !important; padding: .75rem 1rem; vertical-align: middle; }
.table-hover tbody tr:hover { background: var(--glass) !important; }

.badge { font-weight: 600; letter-spacing: .03em; }
.spinner-border { border-color: var(--purple); border-right-color: transparent; }
.spinner-border.text-warning { border-color: var(--warn); border-right-color: transparent; }

.text-accent  { color: var(--purple) !important; }
.text-ok      { color: var(--ok) !important; }
.text-warn    { color: var(--warn) !important; }
.text-bad     { color: var(--bad) !important; }
.text-info    { color: var(--info) !important; }
.text-muted-yd { color: var(--muted) !important; }
.border-glass { border-color: var(--edge) !important; }
.bg-glass { background: var(--glass) !important; }
.bg-glass-strong { background: var(--glass-strong) !important; }

.main-wrapper { min-height: 100vh; position: relative; z-index: 1; }
@media (min-width: 992px) {
    body.has-left-sidebar .main-wrapper { margin-left: 240px; }
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--edge); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--purple); }

/* ── Auth pages (signin / index store-select) — buy.php hero-card style ── */
.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    z-index: 1;
}
.auth-topbar {
    position: fixed; top: 0; left: 0; right: 0;
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.25rem;
    z-index: 100;
}
.auth-topbar .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.05rem; color: var(--text); text-decoration: none; }
.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--glass);
    border: 1px solid var(--edge);
    border-radius: 24px;
    padding: 2rem 1.75rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
[data-bs-theme="light"] .auth-card { box-shadow: 0 20px 60px rgba(80,40,140,.08); }
.auth-card h1 { font-size: 1.5rem; font-weight: 800; color: var(--text); margin-bottom: .35rem; }
.auth-card .auth-sub { font-size: .88rem; color: var(--muted); margin-bottom: 1.5rem; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 1.25rem 0; color: var(--muted); font-size: .8rem; }
.auth-divider::before, .auth-divider::after { content:''; flex:1; height:1px; background: var(--line); }
.auth-field { margin-bottom: 1rem; position: relative; }
.auth-field .mdi { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); font-size: 1.1rem; pointer-events: none; }
.auth-field input {
    width: 100%; padding: .85rem 1rem .85rem 2.6rem;
    background: var(--field); border: 1px solid var(--edge); border-radius: 14px;
    color: var(--text); font-size: .92rem; outline: none; transition: border-color .2s;
    min-height: 48px;
}
.auth-field input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(168,85,247,.15); }
.auth-field .toggle-eye { position: absolute; right: 14px; left: auto; cursor: pointer; pointer-events: auto; }
.btn-grad {
    width: 100%; padding: .9rem; background: var(--grad); border: none; border-radius: 14px;
    color: #fff; font-weight: 700; font-size: .92rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 50px; box-shadow: 0 8px 24px rgba(236,72,153,.3); transition: filter .2s;
}
.btn-grad:hover { filter: brightness(1.06); }
.btn-google {
    width: 100%; padding: .85rem; background: var(--glass-strong); border: 1px solid var(--edge); border-radius: 14px;
    color: var(--text); font-weight: 600; font-size: .9rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px;
    transition: border-color .2s;
}
.btn-google:hover { border-color: var(--purple); }
.auth-foot { text-align: center; font-size: .82rem; color: var(--muted); margin-top: 1.5rem; }
.auth-foot a { color: var(--purple); font-weight: 600; text-decoration: none; }
.auth-copyright { text-align: center; font-size: .76rem; color: var(--muted); margin-top: 1.25rem; position: relative; z-index: 1; }

/* ── Store-select list (index.php) ── */
.store-pick { border: 1px solid var(--edge); border-radius: 16px; padding: 14px 16px; margin-bottom: 10px; cursor: pointer; transition: border-color .2s, background .2s; background: var(--glass); }
.store-pick:hover:not(.store-pick-disabled) { border-color: var(--purple); background: rgba(168,85,247,.07); }
.store-pick.store-pick-selected { border-color: var(--purple); background: rgba(168,85,247,.1); box-shadow: 0 0 0 1px var(--purple); }
.store-pick.store-pick-disabled { opacity: .55; cursor: not-allowed; }
.store-pick-name { font-weight: 700; font-size: .98rem; color: var(--text); }
.store-pick-slug { font-size: .78rem; color: var(--muted); margin-top: 2px; }
.store-state-hint { font-size: .78rem; padding: 2px 0; margin-top: 6px; display: flex; align-items: center; gap: 6px; color: var(--muted); }
.state-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.state-dot-active  { background-color: var(--ok); }
.state-dot-pending { background-color: var(--warn); }
.state-dot-closed  { background-color: var(--bad); }
.state-dot-unpaid  { background-color: var(--muted); }

/* ═══════════════ v2 additions ═══════════════ */

/* ── Modals: always scrollable, never taller than the screen ── */
.modal-custom { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.modal-content-custom {
    display: flex; flex-direction: column;
    max-height: calc(100vh - 2rem); max-height: calc(100dvh - 2rem);
}
.modal-content-custom > form { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
.modal-header-custom { flex-shrink: 0; }
.modal-body-custom { overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1 1 auto; min-height: 0; }
.modal-content-custom.wide, .modal-content-custom.modal-lg { max-width: 560px; }
.modal-section { background: var(--glass); border: 1px solid var(--line); border-radius: 14px; padding: 1rem; margin-bottom: .9rem; }
.modal-section-title { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: .6rem; display: flex; align-items: center; gap: 6px; }
.modal-actions, .form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 1.25rem; }
.modal-actions > *, .form-actions > * { flex: 1 1 120px; }

/* ── Form fields (modals + wizard + settings) ── */
.form-group { margin-bottom: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 576px) { .form-row { grid-template-columns: 1fr 1fr; } }
.form-label { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.form-label .required, .required { color: var(--bad); }
.form-hint, .char-count { font-size: .74rem; color: var(--muted); margin-top: 5px; }
.form-input, .form-textarea,
.modal-custom input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]),
.modal-custom select, .modal-custom textarea,
.form-container input:not([type=checkbox]):not([type=radio]):not([type=time]),
.form-container select, .form-container textarea,
.settings-tab-content input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]),
.settings-tab-content select, .settings-tab-content textarea {
    width: 100%; padding: .75rem 1rem; min-height: 46px;
    background: var(--field); border: 1px solid var(--edge); border-radius: 12px;
    color: var(--text); font-size: .92rem; font-family: inherit; outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.form-textarea, .modal-custom textarea, .form-container textarea, .settings-tab-content textarea { min-height: 96px; resize: vertical; }
.form-input:focus, .form-textarea:focus, .modal-custom input:focus, .modal-custom select:focus, .modal-custom textarea:focus,
.form-container input:focus, .form-container select:focus, .form-container textarea:focus,
.settings-tab-content input:focus, .settings-tab-content select:focus, .settings-tab-content textarea:focus {
    border-color: var(--purple); box-shadow: 0 0 0 3px rgba(168,85,247,.16);
}
.form-input::placeholder, .form-textarea::placeholder, .modal-custom input::placeholder, .modal-custom textarea::placeholder,
.form-container input::placeholder, .form-container textarea::placeholder, .settings-tab-content input::placeholder, .settings-tab-content textarea::placeholder { color: var(--faint); }
.form-input[readonly], .form-input:disabled, .modal-custom input[readonly], .modal-custom input:disabled { opacity: .7; cursor: not-allowed; }
.modal-custom select option, .form-container select option, .settings-tab-content select option { background: var(--sheet); color: var(--text); }
input[type=checkbox], input[type=radio] { accent-color: var(--purple); width: 18px; height: 18px; cursor: pointer; }
input[type=time] {
    background: var(--field); border: 1px solid var(--edge); border-radius: 10px; color: var(--text);
    padding: .5rem .6rem; min-height: 40px; font-family: inherit; outline: none;
}
[data-bs-theme="dark"] input[type=time]::-webkit-calendar-picker-indicator { filter: invert(1); }

/* ── Buttons used inside forms/modals ── */
.btn-save, .btn-next, .btn-submit, .btn-approve {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; padding: .75rem 1.25rem; border: none; border-radius: 14px;
    background: var(--grad) !important; color: #fff !important; font-weight: 700; font-size: .92rem; cursor: pointer;
    box-shadow: 0 6px 20px rgba(236,72,153,.28); transition: filter .2s, transform .1s; text-decoration: none;
}
.btn-save:hover, .btn-next:hover, .btn-submit:hover { filter: brightness(1.07); }
.btn-save:active, .btn-next:active, .btn-submit:active { transform: scale(.98); }
.btn-save:disabled, .btn-submit:disabled { opacity: .55; cursor: not-allowed; }
.btn-cancel, .btn-back, .btn-reject {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; padding: .75rem 1.25rem; border-radius: 14px;
    background: var(--glass-strong); color: var(--text); border: 1px solid var(--edge);
    font-weight: 600; font-size: .92rem; cursor: pointer; transition: border-color .2s; text-decoration: none;
}
.btn-cancel:hover, .btn-back:hover { border-color: var(--purple); }
.btn-reject { color: var(--bad); border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.1); }

/* ── Left sidebar (desktop only) ── */
.left-sidebar {
    display: none; position: fixed; top: 0; left: 0; bottom: 0; width: 248px; z-index: 250;
    flex-direction: column; background: var(--sheet); border-right: 1px solid var(--edge);
    overflow-y: auto; padding: 1rem .85rem;
}
[data-bs-theme="dark"] .left-sidebar { background: rgba(21,15,35,.86); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
[data-bs-theme="light"] .left-sidebar { background: rgba(255,255,255,.92); }
.left-sidebar-header { display: flex; align-items: center; gap: 10px; padding: .4rem .5rem 1.1rem; }
.left-sidebar-logo { width: 36px; height: 36px; border-radius: 10px; background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.left-sidebar-title { font-weight: 800; font-size: 1rem; color: var(--text); }
.left-sidebar-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.left-nav-item { display: flex; align-items: center; gap: 12px; padding: .75rem .9rem; border-radius: 14px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .9rem; min-height: 46px; transition: background .2s, color .2s; }
.left-nav-item:hover { background: var(--glass-strong); color: var(--text); }
.left-nav-item.active { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(236,72,153,.28); }
.left-nav-icon { font-size: 1.2rem; }
.left-sidebar-footer { padding-top: 1rem; border-top: 1px solid var(--line); }
.create-store-btn { display: flex; align-items: center; justify-content: center; gap: 8px; padding: .8rem; border-radius: 14px; border: 1px dashed var(--edge); color: var(--text) !important; font-weight: 600; font-size: .88rem; transition: border-color .2s, background .2s; }
.create-store-btn:hover { border-color: var(--purple); background: var(--glass); }

@media (min-width: 992px) {
    .left-sidebar { display: flex; }
    .left-sidebar ~ .main-wrapper { margin-left: 248px; }
    .bottom-nav { display: none !important; }
    .container-custom { padding-bottom: 2rem; }
    .whatsapp-float { bottom: 24px; }
    .yd-toast-stack { bottom: 24px; }
}

/* ── Create-store wizard ── */
.progress-steps { display: flex; align-items: flex-start; justify-content: center; gap: 0; margin: 1.25rem 0 1.5rem; }
.step { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 0 0 auto; min-width: 56px; }
.step-number { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; background: var(--glass-strong); border: 1px solid var(--edge); color: var(--muted); transition: all .25s; }
.step-label { font-size: .7rem; font-weight: 600; color: var(--muted); text-align: center; }
.step.active .step-number { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 0 14px rgba(236,72,153,.4); }
.step.active .step-label { color: var(--text); }
.step.completed .step-number { background: var(--ok); color: #fff; border-color: transparent; }
.step-line { flex: 1 1 24px; max-width: 70px; height: 2px; background: var(--line); margin-top: 17px; }
.form-container { background: var(--glass); border: 1px solid var(--edge); border-radius: 20px; padding: 1.25rem; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); max-width: 640px; margin: 0 auto; }
@media (min-width: 576px) { .form-container { padding: 1.75rem; } }
.form-section { display: none; }
.form-section.active { display: block; animation: slideUp .25s ease; }
.form-section .section-title { font-size: 1.05rem; margin-bottom: 1rem; }
.hours-grid { display: flex; flex-direction: column; gap: 8px; }
.hour-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: .65rem .85rem; background: var(--glass); border: 1px solid var(--line); border-radius: 12px; }
.day-checkbox { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: .9rem; min-width: 84px; }
.time-inputs { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.closed-label { color: var(--muted); font-size: .85rem; }
.checkbox-group { display: flex; flex-direction: column; gap: 10px; }
.checkbox-label { display: flex; align-items: center; gap: 10px; font-size: .9rem; cursor: pointer; }

/* ── Settings tabs ── */
.settings-tab-bar, .settings-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 1rem; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.settings-tab-bar::-webkit-scrollbar, .settings-tabs::-webkit-scrollbar { display: none; }
.settings-tab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: .6rem 1rem; min-height: 44px; border-radius: 999px; background: var(--glass); border: 1px solid var(--edge); color: var(--muted); font-weight: 600; font-size: .85rem; cursor: pointer; white-space: nowrap; transition: all .2s; }
.settings-tab:hover { color: var(--text); background: var(--glass-strong); }
.settings-tab.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 4px 14px rgba(236,72,153,.3); }
.settings-tab-content { background: var(--glass); border: 1px solid var(--edge); border-radius: 18px; padding: 1.25rem; }

/* ── Generic data tables / cards used by several pages ── */
.table-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 1rem; }
.data-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--edge); border-radius: 16px; background: var(--glass); }
.data-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.data-table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: .8rem 1rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: .8rem 1rem; border-bottom: 1px solid var(--line); color: var(--text); font-size: .88rem; }
.data-table tr:last-child td { border-bottom: none; }
.sub-agent-card-name { font-weight: 700; color: var(--text); }
.sub-agent-card-meta, .sub-agent-card-info { color: var(--muted); font-size: .8rem; }
.export-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* tables never blow out the page on phones */
.table-responsive, .tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
img, video { max-width: 100%; }

/* ═══════════════ store dashboard layout ═══════════════ */
.store-hero { background: var(--glass); border: 1px solid var(--edge); border-radius: 22px; padding: 1.1rem; margin: 1rem 0 .9rem; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); position: relative; overflow: hidden; }
.store-hero::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad); }
.store-hero-top { display: flex; align-items: center; gap: 12px; }
.store-avatar { width: 52px; height: 52px; border-radius: 16px; background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; flex-shrink: 0; box-shadow: 0 8px 20px rgba(236,72,153,.3); }
.store-hero-info { flex: 1; min-width: 0; }
.store-hero-info h1 { font-size: 1.3rem; font-weight: 800; color: var(--text); margin: 0 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.store-hero-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.action-btn.icon-only { padding: 0; width: 44px; justify-content: center; flex-shrink: 0; }
.store-link-bar { display: flex; align-items: center; gap: 8px; margin-top: 1rem; padding: .35rem .35rem .35rem .85rem; background: var(--field); border: 1px solid var(--line); border-radius: 14px; color: var(--muted); }
.store-link-text { flex: 1; min-width: 0; font-size: .82rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.link-bar-btn { display: inline-flex; align-items: center; gap: 5px; padding: 0 .85rem; min-height: 40px; border-radius: 11px; border: 1px solid var(--edge); background: var(--glass-strong); color: var(--text); font-size: .8rem; font-weight: 700; cursor: pointer; text-decoration: none; flex-shrink: 0; }
.link-bar-btn:hover { border-color: var(--purple); color: var(--text); }
.link-bar-btn.primary { background: var(--grad); color: #fff; border: none; }
@media (max-width: 380px) { .link-bar-btn span { display: none; } .link-bar-btn { padding: 0 .75rem; } }

.qa-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 1rem; }
@media (min-width: 576px) { .qa-grid { grid-template-columns: repeat(5, 1fr); } }
.qa-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: .95rem .4rem; min-height: 92px; background: var(--glass); border: 1px solid var(--edge); border-radius: 18px; text-decoration: none; color: var(--text); transition: transform .15s, border-color .2s; text-align: center; }
.qa-tile:hover { transform: translateY(-2px); border-color: rgba(168,85,247,.5); color: var(--text); }
.qa-ico { width: 42px; height: 42px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-size: 1.35rem; }
.qa-ico.purple { background: rgba(168,85,247,.18); color: var(--purple); }
.qa-ico.orange { background: rgba(249,115,22,.18); color: var(--orange); }
.qa-ico.green  { background: rgba(16,185,129,.18); color: var(--ok); }
.qa-ico.blue   { background: rgba(59,130,246,.18); color: var(--blue); }
.qa-ico.wa     { background: rgba(37,211,102,.18); color: #25D366; }
.qa-label { font-size: .74rem; font-weight: 700; line-height: 1.2; }

.seg { display: flex; padding: 4px; gap: 4px; background: var(--glass); border: 1px solid var(--edge); border-radius: 16px; margin-bottom: 1rem; }
.seg-btn { flex: 1; min-height: 42px; border: none; border-radius: 12px; background: transparent; color: var(--muted); font-weight: 700; font-size: .84rem; cursor: pointer; transition: all .2s; }
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--grad); color: #fff; box-shadow: 0 4px 14px rgba(236,72,153,.3); }

.chart-card { background: var(--glass); border: 1px solid var(--edge); border-radius: 20px; padding: 1.1rem; margin-bottom: 1rem; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); position: relative; }
.chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: .75rem; }
.chart-title { font-weight: 700; font-size: .95rem; color: var(--text); display: flex; align-items: center; gap: 8px; }
.chart-sub { font-size: .78rem; color: var(--muted); margin-top: 3px; text-transform: capitalize; }
.chart-wrap { position: relative; height: 240px; }
.chart-wrap.short { height: 170px; }
@media (min-width: 992px) { .chart-wrap { height: 300px; } .chart-wrap.short { height: 200px; } }
.chart-empty { position: absolute; inset: 4rem 0 0 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: .85rem; pointer-events: none; }
.chart-empty .mdi { font-size: 2rem; }
.chip-group { display: inline-flex; padding: 3px; gap: 3px; background: var(--field); border: 1px solid var(--line); border-radius: 12px; }
.chip { border: none; background: transparent; color: var(--muted); font-weight: 700; font-size: .78rem; padding: 0 .85rem; min-height: 34px; border-radius: 9px; cursor: pointer; }
.chip.active { background: var(--glass-strong); color: var(--text); box-shadow: inset 0 0 0 1px var(--edge); }
@media (min-width: 992px) { .charts-row { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; } }
