/* ══════════════════════════════════════════════
   BetSignals — Shared Stylesheet
   ══════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:            #4F46E5;
  --primary-light:      #EEF2FF;
  --primary-dark:       #3730A3;
  --secondary:          #22C55E;
  --secondary-light:    #DCFCE7;
  --accent:             #F59E0B;
  --accent-light:       #FEF3C7;
  --danger:             #EF4444;
  --danger-light:       #FEE2E2;
  --bg:                 #F9FAFB;
  --card:               #FFFFFF;
  --text:               #111827;
  --text-light:         #6B7280;
  --text-xlight:        #9CA3AF;
  --border:             #E5E7EB;
  --sidebar-bg:         #0F172A;
  --sidebar-hover:      #1E293B;
  --sidebar-active:     #4F46E5;
  --sidebar-text:       #94A3B8;
  --sidebar-text-active:#FFFFFF;
  --shadow-sm:          0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:          0 4px 16px rgba(0,0,0,.07), 0 2px 6px rgba(0,0,0,.04);
  --shadow-lg:          0 10px 32px rgba(0,0,0,.10), 0 4px 12px rgba(0,0,0,.06);
  --radius-sm:          8px;
  --radius-md:          12px;
  --radius-lg:          16px;
  --font:               'Inter', sans-serif;
}

body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  display: flex;
  min-height: 100vh;
  letter-spacing: 0.3px;
  line-height: 1.6;
}

/* ─── SIDEBAR ──────────────────────────────────────── */
.sidebar {
  width: 256px;
  min-height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
}
.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  text-decoration: none;
}
.logo-icon {
  width: 36px; height: 36px;
  background: var(--primary); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px; flex-shrink: 0;
}
.logo-text { font-size: 17px; font-weight: 700; color: #fff; letter-spacing: 0.4px; }
.logo-text span { color: var(--secondary); }

.sidebar-section-label {
  font-size: 10px; font-weight: 600; color: #334155;
  text-transform: uppercase; letter-spacing: 1px;
  padding: 20px 20px 6px;
}
.sidebar-nav { flex: 1; padding: 8px 12px; overflow-y: auto; }

.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--sidebar-text); cursor: pointer;
  transition: background .18s, color .18s;
  margin-bottom: 2px; font-weight: 500; font-size: 14px;
  letter-spacing: 0.3px; text-decoration: none;
}
.nav-item i { width: 20px; text-align: center; font-size: 15px; flex-shrink: 0; }
.nav-item:hover { background: var(--sidebar-hover); color: #CBD5E1; }
.nav-item.active { background: var(--sidebar-active); color: var(--sidebar-text-active); font-weight: 600; }
.nav-item .badge {
  margin-left: auto; background: var(--secondary);
  color: #fff; font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 20px; letter-spacing: 0.2px;
}
.nav-item.active .badge { background: rgba(255,255,255,.25); }

.sidebar-divider { height: 1px; background: rgba(255,255,255,.06); margin: 10px 12px; }

.sidebar-footer { padding: 16px 12px; border-top: 1px solid rgba(255,255,255,.06); }
.user-profile {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  cursor: pointer; transition: background .18s;
}
.user-profile:hover { background: var(--sidebar-hover); }
.user-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), #7C3AED);
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; color: #fff; font-weight: 700;
  font-size: 14px; flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; color: #E2E8F0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-plan { font-size: 11px; color: var(--sidebar-text); font-weight: 400; }
.user-profile .fa-ellipsis { color: #475569; font-size: 14px; }

/* ─── MAIN ───────────────────────────────────────────── */
.main { margin-left: 256px; flex: 1; display: flex; flex-direction: column; min-height: 100vh; }

/* ─── TOPBAR ─────────────────────────────────────────── */
.topbar {
  background: var(--card); border-bottom: 1px solid var(--border);
  padding: 0 28px; height: 64px; display: flex; align-items: center;
  gap: 16px; position: sticky; top: 0; z-index: 50; box-shadow: var(--shadow-sm);
}
.topbar-title { font-size: 18px; font-weight: 700; color: var(--text); letter-spacing: 0.3px; }
.topbar-spacer { flex: 1; }
.back-btn {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--text-light);
  text-decoration: none; padding: 6px 12px;
  border-radius: var(--radius-sm); border: 1.5px solid var(--border);
  transition: background .18s, color .18s; background: var(--card);
}
.back-btn:hover { background: var(--bg); color: var(--text); }

.search-bar {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 7px 14px;
  width: 220px; transition: border-color .18s;
}
.search-bar:focus-within { border-color: var(--primary); }
.search-bar i { color: var(--text-xlight); font-size: 13px; }
.search-bar input {
  border: none; background: transparent; outline: none;
  font-family: var(--font); font-size: 13px; color: var(--text); width: 100%;
}
.search-bar input::placeholder { color: var(--text-xlight); }

.topbar-btn {
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--card);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-light); font-size: 15px;
  transition: background .18s, border-color .18s, color .18s; position: relative;
}
.topbar-btn:hover { background: var(--bg); color: var(--text); border-color: #D1D5DB; }
.notif-dot {
  position: absolute; top: 7px; right: 7px;
  width: 7px; height: 7px; background: var(--danger);
  border-radius: 50%; border: 1.5px solid var(--card);
}
.topbar-avatar {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--primary), #7C3AED);
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; color: #fff; font-weight: 700;
  font-size: 14px; cursor: pointer; flex-shrink: 0;
}

/* ─── PAGE CONTENT ───────────────────────────────────── */
.content { padding: 28px; flex: 1; }

/* ─── CARD ───────────────────────────────────────────── */
.card {
  background: var(--card); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); border: 1px solid var(--border); overflow: hidden;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 16px; border-bottom: 1px solid var(--border);
}
.card-title { font-size: 15px; font-weight: 700; color: var(--text); letter-spacing: 0.3px; }
.card-subtitle { font-size: 12px; color: var(--text-light); font-weight: 400; margin-top: 1px; }
.card-action {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--primary);
  cursor: pointer; background: var(--primary-light);
  padding: 6px 12px; border-radius: var(--radius-sm);
  transition: background .18s; border: none; font-family: var(--font);
  text-decoration: none;
}
.card-action:hover { background: #E0E7FF; }
.card-body { padding: 20px 24px; }

/* ─── STATS GRID ─────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; margin-bottom: 24px; }
.stat-card {
  background: var(--card); border-radius: var(--radius-lg);
  padding: 22px 24px; box-shadow: var(--shadow-md); border: 1px solid var(--border);
  display: flex; align-items: flex-start; gap: 16px;
  transition: box-shadow .2s, transform .2s;
}
.stat-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.stat-icon-wrap {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.stat-icon-wrap.blue   { background: var(--primary-light); color: var(--primary); }
.stat-icon-wrap.green  { background: var(--secondary-light); color: var(--secondary); }
.stat-icon-wrap.orange { background: var(--accent-light); color: var(--accent); }
.stat-icon-wrap.red    { background: var(--danger-light); color: var(--danger); }
.stat-body { flex: 1; min-width: 0; }
.stat-label { font-size: 12px; font-weight: 500; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.stat-value { font-size: 28px; font-weight: 700; color: var(--text); line-height: 1.2; letter-spacing: 0; }
.stat-change {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600; margin-top: 4px;
  padding: 2px 8px; border-radius: 20px;
}
.stat-change.up   { color: var(--secondary); background: var(--secondary-light); }
.stat-change.down { color: var(--danger); background: var(--danger-light); }

/* ─── GRID LAYOUTS ───────────────────────────────────── */
.two-col   { display: grid; grid-template-columns: 1fr 340px; gap: 20px; margin-bottom: 24px; }
.three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }

/* ─── QUICK ACTIONS ──────────────────────────────────── */
.quick-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 24px; }
.quick-btn {
  background: var(--card); border: 1.5px solid var(--border);
  border-radius: var(--radius-md); padding: 18px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  cursor: pointer; transition: border-color .18s, box-shadow .18s, transform .18s;
  box-shadow: var(--shadow-sm); text-decoration: none;
}
.quick-btn:hover { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.08); transform: translateY(-1px); }
.quick-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.quick-label { font-size: 12px; font-weight: 600; color: var(--text); letter-spacing: 0.3px; text-align: center; }

/* ─── BOOKMAKER LIST ─────────────────────────────────── */
.bookmaker-item {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 24px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .18s; text-decoration: none;
}
.bookmaker-item:last-child { border-bottom: none; }
.bookmaker-item:hover { background: var(--bg); }
.bk-logo {
  width: 52px; height: 40px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 11px; letter-spacing: 0.5px;
  flex-shrink: 0; overflow: hidden; text-align: center;
  line-height: 1.2;
}
.bk-info { flex: 1; min-width: 0; }
.bk-name { font-size: 14px; font-weight: 600; color: var(--text); letter-spacing: 0.3px; }
.bk-bonus { font-size: 12px; color: var(--text-light); font-weight: 400; margin-top: 1px; }
.bk-bonus span { color: var(--secondary); font-weight: 600; }
.bk-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.bk-signals { font-size: 11px; font-weight: 600; background: var(--primary-light); color: var(--primary); padding: 2px 8px; border-radius: 20px; }
.bk-arrow { color: var(--text-xlight); font-size: 13px; }

/* ─── SIGNAL ITEMS ───────────────────────────────────── */
.signal-item { display: flex; flex-direction: column; gap: 10px; padding: 16px 24px; border-bottom: 1px solid var(--border); }
.signal-item:last-child { border-bottom: none; }
.signal-top { display: flex; align-items: center; justify-content: space-between; }
.signal-sport { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.5px; }
.signal-badge { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; letter-spacing: 0.3px; }
.signal-badge.hot  { background: var(--danger-light); color: var(--danger); }
.signal-badge.safe { background: var(--secondary-light); color: var(--secondary); }
.signal-badge.mid  { background: var(--accent-light); color: var(--accent); }
.signal-match { font-size: 14px; font-weight: 600; color: var(--text); letter-spacing: 0.3px; }
.signal-pick { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-light); }
.signal-pick strong { color: var(--text); font-weight: 600; }
.signal-pick .odds { margin-left: auto; font-size: 15px; font-weight: 700; color: var(--primary); background: var(--primary-light); padding: 3px 10px; border-radius: 8px; }

/* ─── WIN RATE BARS ──────────────────────────────────── */
.win-rate-section { padding: 16px 24px 20px; }
.wr-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.wr-label { font-size: 12px; font-weight: 500; color: var(--text-light); width: 80px; flex-shrink: 0; }
.wr-bar-wrap { flex: 1; height: 8px; background: var(--bg); border-radius: 20px; overflow: hidden; }
.wr-bar { height: 100%; border-radius: 20px; }
.wr-pct { font-size: 12px; font-weight: 700; color: var(--text); width: 36px; text-align: right; }

/* ─── TABLE ──────────────────────────────────────────── */
.mini-table { width: 100%; border-collapse: collapse; }
.mini-table th { font-size: 11px; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.5px; padding: 0 0 10px; text-align: left; border-bottom: 1px solid var(--border); }
.mini-table td { padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 500; color: var(--text); }
.mini-table tr:last-child td { border-bottom: none; }
.result-win  { color: var(--secondary); font-weight: 700; }
.result-loss { color: var(--danger); font-weight: 700; }
.result-pend { color: var(--accent); font-weight: 700; }

/* ─── DONUT ──────────────────────────────────────────── */
.donut-wrap { display: flex; align-items: center; justify-content: center; padding: 20px 24px; gap: 24px; }
.donut-svg { width: 120px; height: 120px; flex-shrink: 0; }
.donut-legend { display: flex; flex-direction: column; gap: 10px; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.legend-label { color: var(--text-light); font-weight: 400; }
.legend-val { font-weight: 700; color: var(--text); margin-left: 2px; }

/* ─── ACTIVITY FEED ──────────────────────────────────── */
.activity-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.activity-item:last-child { border-bottom: none; }
.act-icon { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.act-text { flex: 1; min-width: 0; }
.act-desc { font-size: 13px; font-weight: 500; color: var(--text); line-height: 1.4; }
.act-time { font-size: 11px; color: var(--text-xlight); margin-top: 2px; font-weight: 400; }

/* ─── PLAN BANNER ────────────────────────────────────── */
.plan-banner {
  background: linear-gradient(135deg, var(--primary) 0%, #7C3AED 100%);
  border-radius: var(--radius-lg); padding: 22px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; box-shadow: 0 8px 24px rgba(79,70,229,.25); margin-bottom: 24px;
}
.plan-text-main { font-size: 15px; font-weight: 700; color: #fff; letter-spacing: 0.3px; }
.plan-text-sub  { font-size: 12px; color: rgba(255,255,255,.7); font-weight: 400; margin-top: 2px; }
.plan-btn {
  background: rgba(255,255,255,.15); border: 1.5px solid rgba(255,255,255,.3);
  color: #fff; padding: 8px 18px; border-radius: 10px;
  font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background .18s; font-family: var(--font); letter-spacing: 0.3px;
  display: flex; align-items: center; gap: 6px;
}
.plan-btn:hover { background: rgba(255,255,255,.25); }

/* ─── PILLS ──────────────────────────────────────────── */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; letter-spacing: 0.3px; }
.pill.live { background: var(--danger-light); color: var(--danger); }
.pill.live::before { content:''; width:6px; height:6px; background:var(--danger); border-radius:50%; animation: pulse 1.2s infinite; }
.pill.green  { background: var(--secondary-light); color: var(--secondary); }
.pill.orange { background: var(--accent-light); color: var(--accent); }

/* ─── BOOKMAKER PAGE ─────────────────────────────────── */
.bk-hero {
  border-radius: var(--radius-lg); padding: 32px;
  display: flex; align-items: center; gap: 28px;
  margin-bottom: 24px; box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}
.bk-hero-logo {
  width: 80px; height: 64px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 14px; flex-shrink: 0; text-align: center; line-height: 1.2;
}
.bk-hero-info { flex: 1; }
.bk-hero-name { font-size: 24px; font-weight: 700; color: var(--text); letter-spacing: 0.3px; }
.bk-hero-sub  { font-size: 14px; color: var(--text-light); font-weight: 400; margin-top: 4px; }
.bk-hero-meta { display: flex; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.bk-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 600;
}
.cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 700; cursor: pointer;
  text-decoration: none; transition: opacity .18s, transform .18s;
  letter-spacing: 0.3px; font-family: var(--font); border: none;
  background: var(--primary); color: #fff;
  box-shadow: 0 4px 12px rgba(79,70,229,.3);
}
.cta-btn:hover { opacity: .9; transform: translateY(-1px); }

/* ─── FULL-SIGNAL TABLE ──────────────────────────────── */
.signal-table { width: 100%; border-collapse: collapse; }
.signal-table th {
  font-size: 11px; font-weight: 600; color: var(--text-light);
  text-transform: uppercase; letter-spacing: 0.5px;
  padding: 0 16px 12px; text-align: left; border-bottom: 1px solid var(--border);
}
.signal-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text); }
.signal-table tr:last-child td { border-bottom: none; }
.signal-table tr:hover td { background: var(--bg); }
.odds-badge { font-size: 14px; font-weight: 700; color: var(--primary); background: var(--primary-light); padding: 4px 12px; border-radius: 8px; display: inline-block; }

/* ─── SCROLLBAR ──────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 20px; }

@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

/* ══════════════════════════════════════════════
   MOBILE HEADER + BOTTOM NAV (hidden on desktop)
   ══════════════════════════════════════════════ */
.mobile-header { display: none; }
.bottom-nav    { display: none; }

/* ── Mobile header bar ── */
.mobile-header {
  align-items: center;
  justify-content: space-between;
  background: var(--sidebar-bg);
  padding: 0 16px;
  height: 58px;
  position: sticky;
  top: 0;
  z-index: 60;
}
.mh-logo {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none;
}
.mh-logo-icon {
  width: 32px; height: 32px;
  background: var(--primary); border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px;
}
.mh-logo-text { font-size: 16px; font-weight: 700; color: #fff; letter-spacing: 0.4px; }
.mh-logo-text span { color: var(--secondary); }
.mh-actions { display: flex; align-items: center; gap: 10px; }
.mh-btn {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
  color: #CBD5E1; font-size: 15px; cursor: pointer; position: relative;
  border: none;
}
.mh-btn:hover { background: rgba(255,255,255,.15); }
.mh-notif-dot {
  position: absolute; top: 7px; right: 8px;
  width: 7px; height: 7px; background: var(--danger);
  border-radius: 50%; border: 1.5px solid var(--sidebar-bg);
}
.mh-avatar {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--primary), #7C3AED);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 13px;
}

/* ── Mobile back row (for inner pages) ── */
.mobile-subhead {
  display: none;
}

/* ── Bottom navigation bar ── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--sidebar-bg);
  height: 64px;
  align-items: center;
  justify-content: space-around;
  z-index: 80;
  padding-bottom: env(safe-area-inset-bottom, 0);
  border-top: 1px solid rgba(255,255,255,.06);
}
.bn-item {
  display: flex; flex-direction: column;
  align-items: center; gap: 4px;
  text-decoration: none;
  color: var(--sidebar-text);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.2px;
  flex: 1;
  padding: 8px 0;
  transition: color .18s;
}
.bn-item i { font-size: 19px; }
.bn-item.active { color: var(--secondary); }
.bn-item.active i { color: var(--secondary); }
.bn-item:hover { color: #CBD5E1; }

/* ══════════════════════════════════════════════
   RESPONSIVE — TABLET (≤ 1100px, desktop layout preserved)
   ══════════════════════════════════════════════ */
@media (max-width: 1100px) and (min-width: 769px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col    { grid-template-columns: 1fr; }
  .three-col  { grid-template-columns: 1fr; }
  .bk-grid    { grid-template-columns: repeat(2, 1fr) !important; }
  .bk-hero    { flex-wrap: wrap; }
  .bk-hero .cta-btn { width: 100%; justify-content: center; }
}

/* ══════════════════════════════════════════════
   MOBILE LAYOUT — completely different (≤ 768px)
   ══════════════════════════════════════════════ */
@media (max-width: 768px) {

  body { display: block; }

  /* Hide the desktop chrome entirely */
  .sidebar { display: none !important; }
  .topbar  { display: none !important; }

  /* Show mobile chrome */
  .mobile-header { display: flex; }
  .bottom-nav    { display: flex; }

  .main { margin-left: 0; }

  /* Content padding + room for bottom nav */
  .content { padding: 16px 16px 88px; }

  /* Mobile back/title sub-header for inner pages */
  .mobile-subhead {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
  }
  .mobile-subhead .back-btn {
    width: 38px; height: 38px;
    padding: 0;
    justify-content: center;
    border-radius: 10px;
  }
  .mobile-subhead .back-btn span { display: none; }
  .mobile-subhead .ms-title { font-size: 18px; font-weight: 700; color: var(--text); letter-spacing: 0.3px; }

  /* ── DASHBOARD: condensed ── */

  /* Plan banner */
  .plan-banner { flex-direction: column; align-items: flex-start; padding: 18px; margin-bottom: 18px; }
  .plan-btn { width: 100%; justify-content: center; }

  /* Stats: 2x2 compact grid */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 18px; }
  .stat-card { flex-direction: column; gap: 10px; padding: 16px; }
  .stat-icon-wrap { width: 40px; height: 40px; font-size: 17px; }
  .stat-value { font-size: 24px; }
  .stat-label { font-size: 11px; }
  .stat-change { font-size: 11px; }

  /* Quick actions: 4 across, compact */
  .quick-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 20px; }
  .quick-btn { padding: 12px 6px; gap: 7px; }
  .quick-icon { width: 38px; height: 38px; font-size: 15px; }
  .quick-label { font-size: 10px; }

  /* Stack the two/three column layouts */
  .two-col   { grid-template-columns: 1fr; gap: 16px; margin-bottom: 16px; }
  .three-col { grid-template-columns: 1fr; gap: 16px; }

  /* Bookmaker list = full width rows (like the original app sample) */
  .bk-grid { grid-template-columns: 1fr !important; }

  /* Hero card on bookmaker pages stacks */
  .bk-hero { flex-direction: column; align-items: flex-start; padding: 20px; gap: 14px; }
  .bk-hero-name { font-size: 20px; }
  .bk-hero .cta-btn { width: 100%; justify-content: center; }
  .bk-hero-meta { gap: 8px; }

  /* Card paddings */
  .card-header { padding: 16px 18px 14px; flex-wrap: wrap; gap: 8px; }
  .card-body { padding: 16px 18px; }
  .bookmaker-item { padding: 14px 16px; gap: 14px; }
  .signal-item { padding: 14px 16px; }
  .win-rate-section { padding: 14px 18px 18px; }

  /* Donut stacks vertically */
  .donut-wrap { flex-direction: column; gap: 16px; padding: 18px; }

  /* Allow tables to scroll */
  .card-body { overflow-x: auto; }
}

/* ── Very small phones (≤ 380px) ── */
@media (max-width: 380px) {
  .quick-label { font-size: 9px; }
  .bn-item { font-size: 10px; }
  .bn-item i { font-size: 18px; }
  .bk-meta .bk-signals { display: none; }
}
