/* Design tokens unified with the desktop app's actual theme (see
   src/SEOHARBI.App/Themes/Colors.xaml) — same brand amber sampled from the logo, same near-black
   sidebar, same soft blue-tinted card shadow and subtle button shadow, so the web dashboard and
   desktop app read as one product instead of two different-looking tools. */
:root {
  --bg: #f5f6f8; --panel: #ffffff; --panel-2: #f8f9fb;
  --ink: #1f2430; --muted: #6b7280; --muted-2: #7a8290;
  --line: #e5e8f0; --line-strong: #d6dbe7;
  --accent: #fda602; --accent-2: #e39400; --accent-light: #fff1d9;
  --green: #1fa971; --green-vivid: #18b368; --amber: #f0a73c; --red: #ef4b62; --blue: #4a6cf7;
  --ink-solid: #15161a;
  --sidebar-bg: #121317; --sidebar-border: #26282f; --sidebar-text: #9ca3af;
  --sidebar-hover-bg: #1d1f26; --sidebar-active-bg: #2b2110;
  --card-shadow: 0 5px 18px rgba(27,37,89,0.14);
  --btn-shadow: 2px 3px 6px rgba(0,0,0,0.22);
  --sidebar-w: 240px; --sidebar-w-collapsed: 76px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--ink); font-family: 'Inter', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
.mono { font-family: 'JetBrains Mono', monospace; }
a { color: inherit; }

/* ================= AUTH GATE ================= */
.auth-gate { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--muted); font-size: 13.5px; }
.auth-spinner { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.login-card { width: 380px; max-width: 92vw; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 32px 28px; box-shadow: var(--card-shadow); text-align: center; }
.login-logo { width: 44px; height: 44px; border-radius: 12px; background: var(--ink-solid); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; padding: 8px; }
.login-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 6px; }
.login-card h1 { font-size: 18px; font-weight: 800; color: var(--ink); }
.login-sub { font-size: 12.5px; color: var(--muted); margin-top: 5px; margin-bottom: 22px; }
.login-card form { text-align: left; }
.login-card label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin: 14px 0 6px; }
.login-card label:first-of-type { margin-top: 0; }
.login-card input { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--panel-2); color: var(--ink); font-family: inherit; font-size: 13.5px; }
.login-card input:focus { outline: none; border-color: var(--accent); }
.login-error { margin-top: 12px; font-size: 12px; color: var(--red); background: rgba(239,75,98,0.08); border: 1px solid rgba(239,75,98,0.25); border-radius: 8px; padding: 9px 11px; }
.login-foot { font-size: 12px; color: var(--muted); margin-top: 14px; }
.login-foot a { color: var(--accent-2); font-weight: 600; text-decoration: none; }
.login-foot a:hover { text-decoration: underline; }

/* ================= SHELL (2-column: sidebar + main — right "System Activity" panel removed) ================= */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; transition: grid-template-columns 0.25s ease; }
.shell.collapsed { grid-template-columns: var(--sidebar-w-collapsed) 1fr; }

/* ================= ANNOUNCEMENT BANNER =================
   Background/text color are set inline by app.js from the admin-configured values — see
   renderAnnouncementBanner(). Animation (static/scroll) and position (left/center/right, static
   only) are driven by these classes, admin-controlled the same way. */
.announcement-banner { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 11px 22px; font-size: 13px; font-weight: 600; line-height: 1.4; overflow: hidden; }
.announcement-banner svg { width: 17px; height: 17px; flex-shrink: 0; }
.announcement-banner.align-left { justify-content: flex-start; }
.announcement-banner.align-center { justify-content: center; }
.announcement-banner.align-right { justify-content: flex-end; }
.announcement-banner.scrolling { justify-content: flex-start; }
.announcement-banner.scrolling #announcementBannerText { display: inline-block; white-space: nowrap; padding-left: 100%; animation: announcementBannerScroll 18s linear infinite; }
@keyframes announcementBannerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ================= PLAN EXPIRY BANNER =================
   Shown when the logged-in user's Pro plan expires within 2 days (see renderPlanExpiryBanner()
   in app.js) — separate from the admin-configurable announcement banner above since this one is
   per-user, always the same content/styling (not admin-editable), and always urgent. */
.plan-expiry-banner {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 22px; font-size: 13px; font-weight: 600; line-height: 1.4;
  background: linear-gradient(90deg, #fff3dd, #ffe6bd); color: #7a4a00; border-bottom: 1px solid #f0c878;
}
.plan-expiry-banner svg { width: 18px; height: 18px; flex-shrink: 0; color: #b5720a; }
.plan-expiry-banner span { flex: 1; min-width: 200px; }
.plan-expiry-banner-btn {
  display: inline-flex; align-items: center; flex-shrink: 0; background: var(--ink-solid); color: #fff;
  font-size: 12.5px; font-weight: 700; padding: 8px 16px; border-radius: 8px; text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.plan-expiry-banner-btn:hover { transform: translateY(-1px); box-shadow: var(--btn-shadow); }
@media (max-width: 640px) {
  .plan-expiry-banner { padding: 10px 16px; }
}

/* ================= SIDEBAR ================= */
.sidebar { background: var(--sidebar-bg); border-right: 1px solid var(--sidebar-border); display: flex; flex-direction: column; padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow: hidden; }
.sb-top { display: flex; align-items: center; gap: 10px; padding: 4px 4px 22px; }
.sb-brand { display: flex; align-items: center; text-decoration: none; overflow: hidden; }
.sb-brand-wide { display: flex; align-items: center; background: #0a0a0a; border-radius: 10px; padding: 7px 12px; flex-shrink: 0; }
.sb-brand-wide img { display: block; height: 20px; width: auto; }
.sb-brand-square { display: none; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: #0a0a0a; flex-shrink: 0; }
.sb-brand-square img { width: 24px; height: 24px; object-fit: contain; border-radius: 5px; }
.shell.collapsed .sb-brand-wide { display: none; }
.shell.collapsed .sb-brand-square { display: flex; }

.sb-collapse { margin-left: auto; width: 26px; height: 26px; border-radius: 7px; background: rgba(255,255,255,0.06); color: #9ca3af; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: background 0.2s ease; }
.sb-collapse:hover { background: rgba(255,255,255,0.12); }
.sb-collapse svg { width: 13px; height: 13px; transition: transform 0.25s ease; }
.shell.collapsed .sb-collapse svg { transform: rotate(180deg); }
.shell.collapsed .sb-top { justify-content: center; }
.shell.collapsed .sb-collapse { margin-left: 0; }

.sb-label { color: #7d8590; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: 14px 10px 6px; white-space: nowrap; }
.shell.collapsed .sb-label { display: none; }

.sb-nav { display: flex; flex-direction: column; gap: 2px; }
.sb-item { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 8px; color: var(--sidebar-text); text-decoration: none; font-size: 13.5px; font-weight: 500; white-space: nowrap; cursor: pointer; transition: background 0.15s ease, color 0.15s ease; }
.sb-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.sb-item:hover { background: var(--sidebar-hover-bg); color: #fff; }
/* Subtle dark-amber-tinted selected state (matches the desktop app's SidebarActiveBgColor) —
   not a solid amber block, which read as too loud/cartoonish next to the rest of the palette. */
.sb-item.active { background: var(--sidebar-active-bg); color: var(--accent); }
.sb-item.locked { opacity: 0.5; }
.sb-item .badge { margin-left: auto; background: rgba(255,255,255,0.1); color: #d1d5db; font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.shell.collapsed .sb-item span, .shell.collapsed .sb-item .badge { display: none; }
.shell.collapsed .sb-item { position: relative; }
.shell.collapsed .sb-item { justify-content: center; }

.credits-box { margin-top: auto; background: var(--sidebar-hover-bg); border: 1px solid var(--sidebar-border); border-radius: 12px; padding: 13px; }
.shell.collapsed .credits-box { display: none; }
.credits-box .plan-line { font-size: 11px; color: #9ca3af; margin-bottom: 10px; font-weight: 600; }
.credits-box .plan-line b { color: #fff; }
.credits-box .row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.credits-box .row .n { font-size: 13.5px; font-weight: 700; color: #fff; }
.credits-box .row a { font-size: 12px; color: var(--accent); font-weight: 700; text-decoration: none; }
.credits-track { height: 5px; border-radius: 3px; background: rgba(255,255,255,0.1); overflow: hidden; }
.credits-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }

.sb-profile-wrap { position: relative; margin-top: 12px; }
.sb-profile { display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: 10px; cursor: pointer; transition: background 0.15s ease; }
.sb-profile:hover { background: var(--sidebar-hover-bg); }
.sb-profile .av { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(150deg, var(--accent), var(--accent-2)); color: var(--ink-solid); font-weight: 700; font-size: 11.5px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: var(--btn-shadow); }
.sb-profile .info { flex: 1; min-width: 0; }
.shell.collapsed .sb-profile .info, .shell.collapsed .sb-profile svg.chev { display: none; }
.shell.collapsed .sb-profile { justify-content: center; }
.sb-profile .info .n { font-size: 12.5px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-profile .info .e { font-size: 10.5px; color: var(--sidebar-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-profile .plan-tag { font-size: 9px; font-weight: 800; color: var(--accent); background: rgba(253,166,2,0.18); padding: 1px 6px; border-radius: 999px; margin-left: 4px; }
.sb-profile svg.chev { width: 13px; height: 13px; color: var(--sidebar-text); flex-shrink: 0; }

.profile-popover {
  position: absolute; bottom: calc(100% + 6px); left: 0; right: 0;
  background: #17181e; border: 1px solid rgba(255,255,255,0.09); border-radius: 12px; padding: 6px;
  opacity: 0; pointer-events: none; transform: translateY(6px); transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 60; box-shadow: 0 16px 34px rgba(0,0,0,0.4);
}
.profile-popover.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.pp-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: #d1d5db; font-size: 12.5px; font-weight: 500; cursor: pointer; transition: background 0.15s ease; white-space: nowrap; }
.pp-item:hover { background: rgba(255,255,255,0.07); }
.pp-item svg { width: 15px; height: 15px; flex-shrink: 0; }
.pp-item.danger { color: #f87171; }
.pp-divider { height: 1px; background: rgba(255,255,255,0.08); margin: 5px 4px; }

/* ================= MAIN ================= */
.main { padding: 22px 26px 40px; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 16px; }
.topbar h1 { font-size: 21px; font-weight: 800; letter-spacing: -0.3px; }
.topbar p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.btn-primary { display: inline-flex; align-items: center; gap: 7px; background: var(--accent); color: var(--ink-solid); border: none; padding: 9px 16px; border-radius: 8px; font-family: inherit; font-weight: 600; font-size: 13px; cursor: pointer; box-shadow: var(--btn-shadow); transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease; }
.btn-primary svg { width: 14px; height: 14px; stroke-width: 2; }
.btn-primary:hover { background: var(--accent-2); transform: translateY(-1px); box-shadow: 3px 5px 10px rgba(0,0,0,0.25); }
.btn-primary:active { transform: translateY(0); box-shadow: 1px 1px 3px rgba(0,0,0,0.2); }
.btn-outline { background: var(--panel); border: 1px solid var(--line-strong); color: var(--ink); padding: 9px 16px; border-radius: 8px; font-family: inherit; font-weight: 600; font-size: 13px; cursor: pointer; transition: background 0.15s ease, border-color 0.15s ease; display: inline-flex; align-items: center; gap: 7px; }
.btn-outline:hover { background: var(--panel-2); border-color: var(--muted-2); }
.btn-outline svg { width: 14px; height: 14px; transition: transform 0.5s ease; }
#refreshStatsBtn.spinning svg { animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* "Download App" CTA — an amber-outline premium look (soft cream-to-amber fill, gradient-glow
   ring via box-shadow) rather than the flat solid .btn-primary fill, so it reads as the standout
   action in the topbar. */
.btn-download-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: 9px;
  background: linear-gradient(180deg, #fffaf0, #fff2d8);
  border: 1.5px solid var(--accent);
  color: var(--accent-2);
  font-family: inherit; font-weight: 700; font-size: 13px; text-decoration: none; cursor: pointer;
  box-shadow: 0 0 0 3px rgba(253,166,2,0.1), 0 4px 14px rgba(253,166,2,0.3);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn-download-cta svg { width: 15px; height: 15px; stroke: var(--accent-2); }
.btn-download-cta:hover {
  background: linear-gradient(180deg, #fff2d8, #ffe4b0);
  box-shadow: 0 0 0 4px rgba(253,166,2,0.16), 0 8px 24px rgba(253,166,2,0.42);
  transform: translateY(-1px);
}
.btn-download-cta:active { transform: translateY(0); }

.live-indicator { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--green-vivid); }
.live-indicator .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green-vivid); animation: livePulse 2s infinite; }
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(24,179,104,0.5); }
  70% { box-shadow: 0 0 0 6px rgba(24,179,104,0); }
  100% { box-shadow: 0 0 0 0 rgba(24,179,104,0); }
}

.value-flash { animation: valueFlash 1s ease; border-radius: 6px; }
@keyframes valueFlash {
  0% { background-color: rgba(253,166,2,0.35); }
  100% { background-color: transparent; }
}
.btn-outline-danger { width: 100%; margin-top: 20px; background: rgba(220,38,38,0.08); border: 1px solid rgba(220,38,38,0.25); color: var(--red); padding: 11px; border-radius: 10px; font-family: inherit; font-weight: 700; font-size: 13px; cursor: pointer; transition: background 0.2s ease; }
.btn-outline-danger:hover { background: rgba(220,38,38,0.14); }

/* ---- Welcome banner ---- */
.welcome { position: relative; border-radius: 18px; padding: 24px 26px; margin-bottom: 16px; background: linear-gradient(120deg, #fff7ea, #ffffff 60%); border: 1px solid rgba(253,166,2,0.25); overflow: hidden; }
.welcome::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 50% 90% at 90% 0%, rgba(253,166,2,0.14), transparent 70%); pointer-events: none; }
.welcome-top { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; flex-wrap: wrap; gap: 14px; }
.welcome h2 { font-size: 21px; font-weight: 800; letter-spacing: -0.4px; }
.welcome p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.welcome .date-chip { background: rgba(253,166,2,0.1); border: 1px solid rgba(253,166,2,0.25); padding: 7px 14px; border-radius: 999px; font-size: 11.5px; color: #8a5a0a; font-weight: 600; }

.kpi-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-top: 16px; position: relative; z-index: 1; }
.kpi { background: rgba(255,255,255,0.7); border: 1px solid rgba(253,166,2,0.18); border-radius: 11px; padding: 10px 13px; }
.kpi .top { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; margin-bottom: 5px; }
.kpi .top svg { width: 12px; height: 12px; color: var(--accent-2); flex-shrink: 0; }
.kpi .val { font-size: 18px; font-weight: 800; letter-spacing: -0.3px; }
.kpi .delta { font-size: 10.5px; color: var(--green); margin-top: 2px; font-weight: 600; }
.kpi .delta.down { color: var(--red); }
.kpi .delta.neutral { color: var(--muted-2); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: var(--card-shadow); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 15px; flex-wrap: wrap; gap: 10px; }
.card-head h3 { font-size: 14px; font-weight: 700; }
.card-head p { font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }

/* ---- Support Chat — floating widget (bubble + popup panel), lives in footer.php so it renders
   on every app page. z-index 90 stays below .modal-overlay's 100 so Settings/Locked modals still
   sit on top of it. ---- */
.support-widget { position: fixed; right: 24px; bottom: 24px; z-index: 90; }
.support-bubble-btn { width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer; background: linear-gradient(180deg, var(--accent), var(--accent-2)); color: var(--ink-solid); display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(253,166,2,0.35), 0 2px 10px rgba(0,0,0,0.14); position: relative; transition: transform 0.15s ease; }
.support-bubble-btn:hover { transform: scale(1.06); }
.support-bubble-btn svg { width: 25px; height: 25px; }
.support-bubble-btn .icon-close { display: none; }
.support-widget.open .support-bubble-btn .icon-chat { display: none; }
.support-widget.open .support-bubble-btn .icon-close { display: block; }
.support-bubble-badge { position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg); }
.support-widget-panel { position: absolute; bottom: 70px; right: 0; width: 366px; max-width: calc(100vw - 32px); height: 490px; max-height: calc(100vh - 140px); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 20px 56px rgba(15,18,30,0.22); display: flex; flex-direction: column; overflow: hidden; opacity: 0; transform: translateY(14px) scale(0.98); pointer-events: none; transition: opacity 0.16s ease, transform 0.16s ease; }
.support-widget.open .support-widget-panel { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
/* Widget header — ported 1:1 from the provided design reference (gradient amber header, avatar
   with pulsing presence-ring, animated status-text crossfade between loading dots / online /
   offline). Exact colors/keyframes kept as given rather than mapped onto --accent tokens. */
.support-widget-header { position: relative; padding: 16px 18px; background: linear-gradient(165deg, #ffb347 0%, #f5a623 45%, #e08e0b 100%); box-shadow: 0 1px 0 rgba(255,255,255,0.35) inset, 0 4px 14px rgba(224,142,11,0.35); display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.support-widget-header::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 50%; background: linear-gradient(180deg, rgba(255,255,255,0.22), transparent); pointer-events: none; }
.head-avatar-wrap { position: relative; width: 44px; height: 44px; flex-shrink: 0; }
.head-avatar { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; box-shadow: 0 3px 8px rgba(0,0,0,0.18), 0 0 0 2px rgba(255,255,255,0.6); background: linear-gradient(150deg, var(--accent), var(--accent-2)); display: flex; align-items: center; justify-content: center; color: var(--ink-solid); font-weight: 700; font-size: 15px; }
.head-avatar img { width: 100%; height: 100%; object-fit: cover; }
.presence-ring { position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #22c55e; opacity: 0; pointer-events: none; }
.presence-ring.show { opacity: 1; animation: ringPulse 1.8s ease-out infinite; }
.presence-ring.ring2 { animation-delay: 0.5s; }
@keyframes ringPulse { 0% { transform: scale(0.85); opacity: 0.8; } 100% { transform: scale(1.35); opacity: 0; } }
.head-info { flex: 1; min-width: 0; position: relative; z-index: 1; }
.head-info .name { color: #1a1206; font-weight: 800; font-size: 15px; line-height: 1.2; }
.head-info .sub { font-size: 11.5px; font-weight: 600; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; height: 14px; position: relative; }
.status-text { position: absolute; left: 0; top: 0; opacity: 0; transform: translateY(4px); transition: opacity 0.35s ease, transform 0.35s ease; color: #6b4a12; }
.status-text.show { opacity: 1; transform: translateY(0); }
.status-text.online { color: #1a5c2e; font-weight: 700; }
.status-dots { color: #6b4a12; opacity: 0.75; }
.status-dots span { animation: dotFade 1.2s ease-in-out infinite; }
.status-dots span:nth-child(2) { animation-delay: 0.2s; }
.status-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotFade { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
.support-widget-header .sw-close { position: relative; z-index: 1; align-self: flex-start; background: none; border: none; cursor: pointer; color: #1a1206; opacity: 0.6; padding: 3px; display: flex; border-radius: 6px; flex-shrink: 0; }
.support-widget-header .sw-close:hover { opacity: 1; background: rgba(0,0,0,0.08); }
.support-widget-header .sw-close svg { width: 17px; height: 17px; }
.support-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; }
.support-bubble-row { display: flex; align-items: flex-end; margin-bottom: 5px; }
.support-bubble-row.user { justify-content: flex-end; }
.support-bubble-row.admin { justify-content: flex-start; }
/* The support team's avatar (set via the admin panel's Settings → Profile Picture), shown on
   every incoming admin message — falls back to their initials until one's been uploaded. */
.msg-avatar { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; object-fit: cover; margin-right: 6px; }
.msg-avatar-fallback { display: flex; align-items: center; justify-content: center; background: linear-gradient(150deg, var(--accent), var(--accent-2)); color: var(--ink-solid); font-size: 9px; font-weight: 700; }
/* Compact, content-sized bubble — no fixed height, grows/shrinks with the message. Timestamp
   (+ ticks) sits INLINE at the end of the text (not a separate line) via .msg-meta, same trick
   real chat apps use — for a one-line message it just trails the last word; for a wrapped message
   it naturally lands at the end of the last line. */
.support-bubble { display: inline-block; max-width: 70%; padding: 5px 9px 4px 10px; border-radius: 12px; font-size: 13.5px; line-height: 1.35; word-break: break-word; }
.support-bubble-row.user .support-bubble { background: linear-gradient(180deg, var(--accent), var(--accent-2)); color: var(--ink-solid); border-bottom-right-radius: 3px; }
.support-bubble-row.admin .support-bubble { background: var(--panel-2); color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 3px; }
.support-bubble img { max-width: 200px; width: 100%; border-radius: 8px; display: block; margin-bottom: 3px; cursor: pointer; }
.support-bubble .msg-text { white-space: pre-wrap; }
.msg-meta { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; font-size: 10px; opacity: 0.7; white-space: nowrap; }
.support-tick { color: rgba(21,22,26,0.45); flex-shrink: 0; }
.support-tick.read { color: #2b90ff; }
.support-bubble .msg-text a { color: inherit; text-decoration: underline; }
.support-bubble-row.admin .support-bubble .msg-text a { color: var(--accent); }
.msg-deleted { font-style: italic; opacity: 0.65; }

.support-input-row { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-top: 1px solid var(--line); background: var(--panel); }
.support-attach-btn { flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--panel-2); color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.15s ease, color 0.15s ease; }
.support-attach-btn:hover { background: var(--accent-light); color: var(--accent-2); }
.support-attach-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.support-attach-btn svg { width: 18px; height: 18px; }
.support-message-input { flex: 1; resize: none; padding: 10px 16px; border-radius: 18px; border: 1px solid var(--line-strong); background: var(--panel-2); color: var(--ink); font-family: inherit; font-size: 13.5px; max-height: 90px; line-height: 1.4; }
.support-message-input:focus { outline: none; border-color: var(--accent); }
.support-send-btn { flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; padding: 0 !important; display: flex; align-items: center; justify-content: center; }
.support-send-btn svg { width: 16px; height: 16px; }

.support-image-preview { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--panel-2); }
.support-image-preview img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; }
.support-image-preview .lbl { font-size: 12px; color: var(--muted); }
.support-image-preview button { margin-left: auto; width: 24px; height: 24px; border-radius: 50%; border: none; background: var(--panel); color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; }

/* ==========================================================================
   Invite & Earn (referrals.php) — two independent reward mechanics: a flat 50/20 credit bonus on
   verification (unchanged, existing), and a cash commission (Rs 200 to the referrer, automatic
   Rs 300 discount to the referred user) when a referral upgrades to Pro inside the referral
   window. Every color/spacing token here reuses the SAME variables as the rest of the dashboard
   (--accent/--panel/--line/etc. from :root above) — nothing here introduces a second palette.
   ========================================================================== */

.two-col { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; margin-bottom: 16px; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

/* ---- Sub-nav pill tabs (Home / Referrals / Commissions / Payouts) ---- */
.subnav { display: flex; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 5px; width: fit-content; margin: 0 auto 20px; box-shadow: var(--card-shadow); }
.subnav button { display: flex; align-items: center; gap: 7px; border: none; background: none; color: var(--muted); font-family: inherit; font-size: 13px; font-weight: 600; padding: 9px 16px; border-radius: 9px; cursor: pointer; transition: background 0.2s ease, color 0.2s ease; }
.subnav button svg { width: 15px; height: 15px; }
.subnav button.active { background: linear-gradient(150deg, var(--accent), var(--accent-2)); color: var(--ink-solid); }
.tab-page { display: none; }
.tab-page.active { display: block; }

/* ---- Earnings banner ---- */
.earn-banner { position: relative; border-radius: 16px; padding: 22px 24px; margin-bottom: 14px; background: linear-gradient(120deg, #ffb347, var(--accent-2) 90%); color: var(--ink-solid); overflow: hidden; box-shadow: var(--card-shadow); }
.earn-banner::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 90% at 100% 0%, rgba(255,255,255,0.28), transparent 70%); pointer-events: none; }
.earn-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; position: relative; z-index: 1; }
.earn-row .item { border-right: 1px solid rgba(0,0,0,0.1); }
.earn-row .item:last-child { border-right: none; }
.earn-row .item .t { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; opacity: 0.75; }
.earn-row .item .n { font-size: 22px; font-weight: 800; margin-top: 5px; }
.earn-row .item .s { font-size: 10.5px; opacity: 0.8; margin-top: 3px; }
@media (max-width: 900px) { .earn-row { grid-template-columns: repeat(2,1fr); gap: 14px 10px; } .earn-row .item:nth-child(2) { border-right: none; } }

/* ---- Setup-payout warning ---- */
.warn-banner { display: flex; align-items: center; justify-content: space-between; gap: 14px; background: var(--accent-light); border: 1px solid rgba(253,166,2,0.35); border-radius: 14px; padding: 14px 18px; margin-bottom: 14px; flex-wrap: wrap; }
.warn-banner .left { display: flex; align-items: center; gap: 12px; }
.warn-banner .ic { width: 34px; height: 34px; border-radius: 10px; background: rgba(253,166,2,0.16); color: var(--accent-2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.warn-banner .ic svg { width: 17px; height: 17px; }
.warn-banner .t { font-size: 13px; font-weight: 700; }
.warn-banner .s { font-size: 11.5px; color: var(--muted); margin-top: 1px; }

/* ---- Home tab: stat cards (reuses the existing .stat-card shell, new inner layout) ---- */
.stat-card .ic { width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.stat-card .ic svg { width: 15px; height: 15px; color: #fff; }
.stat-card .n { font-size: 20px; font-weight: 800; }
.stat-card .l { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.prog-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.prog-head .logo-box { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(150deg, var(--accent), var(--accent-2)); color: var(--ink-solid); font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.prog-head .name { font-size: 14px; font-weight: 700; }
.prog-head .status { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--green); font-weight: 600; }
.prog-head .status .d { width: 6px; height: 6px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.prog-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; text-align: center; }
.prog-grid .n { font-size: 16px; font-weight: 800; }
.prog-grid .l { font-size: 10.5px; color: var(--muted-2); margin-top: 3px; }

.reward-item { display: flex; gap: 10px; padding: 12px; background: var(--accent-light); border: 1px solid rgba(253,166,2,0.2); border-radius: 12px; margin-bottom: 10px; }
.reward-item:last-child { margin-bottom: 0; }
.reward-item svg { width: 16px; height: 16px; color: var(--accent-2); flex-shrink: 0; margin-top: 1px; }
.reward-item .t { font-size: 12.5px; font-weight: 700; }
.reward-item .s { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ---- Referral link box ---- */
.link-box { display: flex; align-items: center; gap: 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.link-box svg.chain { width: 16px; height: 16px; color: var(--muted-2); flex-shrink: 0; }
.link-box input { flex: 1; border: none; background: none; outline: none; font-family: 'JetBrains Mono', monospace; font-size: 12.5px; color: var(--ink); }
.icon-btn { width: 32px; height: 32px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line-strong); color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: background 0.15s ease, color 0.15s ease; }
.icon-btn:hover { background: var(--panel-2); color: var(--ink); }
.icon-btn svg { width: 14px; height: 14px; }

/* ---- Filter bar / search / select (Referrals, Commissions tabs) ---- */
.filter-bar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.search-box { display: flex; align-items: center; gap: 9px; background: var(--panel-2); border: 1px solid var(--line); padding: 10px 14px; border-radius: 10px; flex: 1; min-width: 200px; }
.search-box svg { width: 15px; height: 15px; color: var(--muted-2); flex-shrink: 0; }
.search-box input { border: none; background: none; outline: none; font-family: inherit; font-size: 13px; width: 100%; color: var(--ink); }
select.filter-select { background: var(--panel-2); border: 1px solid var(--line); padding: 10px 12px; border-radius: 10px; font-family: inherit; font-size: 13px; color: var(--ink); }

/* ---- Tables (Referrals, Commissions, Payouts tabs) ---- */
table { width: 100%; border-collapse: collapse; }
thead th { text-align: left; font-size: 10.5px; letter-spacing: 0.4px; text-transform: uppercase; color: var(--muted-2); font-weight: 700; padding: 0 10px 12px; border-bottom: 1px solid var(--line); }
tbody td { padding: 13px 10px; font-size: 13px; border-bottom: 1px solid var(--line); color: var(--ink); }
tbody tr:last-child td { border-bottom: none; }
.table-empty { text-align: center; color: var(--muted-2); padding: 28px 10px !important; }
.u-cell { display: flex; align-items: center; gap: 10px; }
.u-cell .av { width: 28px; height: 28px; border-radius: 50%; background: var(--panel-2); color: var(--muted); font-weight: 700; font-size: 11px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.u-cell .n { font-weight: 600; font-size: 12.5px; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 10.5px; font-weight: 700; white-space: nowrap; }
.pill.cash { background: rgba(37,99,235,0.1); color: var(--blue); }
.pill.credits { background: var(--accent-light); color: var(--accent-2); }
.pill.upgraded { background: rgba(31,169,113,0.12); color: var(--green); }
.pill.verified { background: rgba(37,99,235,0.1); color: var(--blue); }
.pill.pending { background: var(--panel-2); color: var(--muted-2); border: 1px solid var(--line); }
.pill.paid { background: rgba(31,169,113,0.12); color: var(--green); }

.empty-state { text-align: center; padding: 36px 20px; }
.empty-state .ic { width: 50px; height: 50px; border-radius: 14px; background: var(--accent-light); color: var(--accent-2); display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.empty-state .ic svg { width: 22px; height: 22px; }
.empty-state .t { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.empty-state .s { font-size: 12px; color: var(--muted-2); }

/* ---- T&C / Setup Payouts modals (reuses .modal-overlay from the shared Settings modal above) ---- */
.tc-modal { width: 560px; max-width: calc(100vw - 40px); max-height: 82vh; background: var(--panel); border-radius: 18px; padding: 26px; overflow-y: auto; transform: scale(0.96); opacity: 0; transition: transform 0.2s ease, opacity 0.2s ease; box-shadow: 0 30px 70px rgba(0,0,0,0.35); }
.modal-overlay.open .tc-modal { transform: scale(1); opacity: 1; }
.tc-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.tc-modal-head h2 { font-size: 17px; font-weight: 700; color: var(--accent-2); }
.tc-close { width: 30px; height: 30px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.tc-close svg { width: 14px; height: 14px; }
.tc-list { list-style: none; }
.tc-list li { display: flex; gap: 10px; font-size: 13px; color: var(--muted); line-height: 1.6; padding: 10px 0; border-bottom: 1px solid var(--line); }
.tc-list li:last-child { border-bottom: none; }
.tc-list li b { color: var(--ink); }
.tc-list li::before { content: "•"; color: var(--accent); font-weight: 800; flex-shrink: 0; }
.tc-modal .btn-primary { width: 100%; justify-content: center; margin-top: 18px; padding: 12px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.field input, .field select { width: 100%; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--panel-2); font-family: inherit; font-size: 13px; color: var(--ink); outline: none; }
.field input:focus, .field select:focus { border-color: var(--accent); }

@media (max-width: 720px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .prog-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
}

/* ---- Stat cards ----
   Slim/classic layout: icon + label share ONE line (.head-left), not icon-on-top-then-label-
   below — that single change is what actually shrinks the card's height, everything else here is
   just tighter padding/margins/font-sizes on top of it. */
.stat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 14px; }
.stat-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; box-shadow: var(--card-shadow); transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; }
.stat-card:hover { transform: translateY(-2px); border-color: rgba(253,166,2,0.35); box-shadow: 0 10px 26px rgba(27,37,89,0.18); }
.stat-card .head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.stat-card .head-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.stat-card .icon-wrap { width: 25px; height: 25px; border-radius: 7px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.stat-card .icon-wrap svg { width: 12px; height: 12px; }
.stat-card .head-left .lbl { font-size: 11.5px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-card .trend { font-size: 10.5px; font-weight: 700; color: var(--green); flex-shrink: 0; }
.stat-card .trend.down { color: var(--red); }
.stat-card .trend.neutral { color: var(--muted-2); }
.stat-card .num { font-size: 18px; font-weight: 800; letter-spacing: -0.3px; margin-bottom: 8px; }
.bar-track { height: 5px; border-radius: 3px; background: var(--panel-2); overflow: hidden; margin-bottom: 6px; }
.bar-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width 0.4s ease; }
.stat-card .compare { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted-2); }

.stat-grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 14px; }
.section-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted-2); margin: 4px 2px 10px; }
.stat-card.unavailable { opacity: 0.8; }
.compare-note { font-size: 10px; color: var(--muted-2); font-style: italic; }

/* ---- Credits Usage (module-usage line chart + credits-by-module donut, both Chart.js) ---- */
.credits-usage-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; margin-bottom: 14px; align-items: stretch; }
.chart-card { display: flex; flex-direction: column; }
.mini-card-head { margin-bottom: 12px; }
.mini-card-head h4 { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.mini-card-head p { font-size: 10.5px; color: var(--muted-2); margin-top: 2px; }
.chart-canvas-wrap { position: relative; height: 220px; flex: 1; }

.donut-body { display: flex; flex-direction: column; align-items: center; flex: 1; justify-content: center; gap: 14px; }
.donut-canvas-wrap { position: relative; width: 168px; height: 168px; flex-shrink: 0; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.donut-center .n { font-size: 19px; font-weight: 800; letter-spacing: -0.3px; }
.donut-center .l { font-size: 9.5px; color: var(--muted-2); font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; margin-top: 1px; }
.donut-legend { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.donut-legend-item { display: flex; align-items: center; gap: 8px; font-size: 11.5px; }
.donut-legend-item .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.donut-legend-item .name { flex: 1; color: var(--ink); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.donut-legend-item .val { color: var(--muted-2); font-weight: 700; font-size: 10.5px; flex-shrink: 0; }
.donut-legend-item .pct { color: var(--ink); font-weight: 800; min-width: 34px; text-align: right; flex-shrink: 0; }

/* ---- Dashboard-wide time-range filter (topbar, next to Refresh Stats) ---- */
.toggle-group { display: flex; background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 2px; }
.toggle-group button { border: none; background: none; color: var(--muted); font-family: inherit; font-size: 11.5px; font-weight: 600; padding: 6px 12px; border-radius: 7px; cursor: pointer; }
.toggle-group button.active { background: var(--accent); color: var(--ink-solid); }

.chart-empty { font-size: 12.5px; color: var(--muted-2); padding: 30px 0; text-align: center; }

.activity-scroll { max-height: 380px; overflow-y: auto; }
.activity-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.activity-item:last-child { border-bottom: none; padding-bottom: 0; }
.activity-item .dot-wrap { width: 28px; height: 28px; border-radius: 9px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: rgba(253,166,2,0.12); color: var(--accent-2); }
.activity-item .dot-wrap svg { width: 13px; height: 13px; }
.activity-item .txt { font-size: 12px; }
.activity-item .time { font-size: 10.5px; color: var(--muted-2); margin-top: 2px; }

/* ---- Reserved promo/ad slot ---- */
.ad-slot {
  border: 1.5px dashed rgba(253,166,2,0.35); border-radius: 14px; background: rgba(253,166,2,0.04);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 26px 20px; min-height: 130px; margin-bottom: 14px;
}
.ad-slot svg { width: 24px; height: 24px; color: var(--accent-2); margin-bottom: 8px; }
.ad-slot .t { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.ad-slot .s { font-size: 11px; color: var(--muted-2); margin-top: 3px; }

/* ================= MODALS (settings + locked-feature) ================= */
.modal-overlay { position: fixed; inset: 0; background: rgba(10,10,15,0.5); opacity: 0; pointer-events: none; transition: opacity 0.2s ease; z-index: 100; display: flex; align-items: center; justify-content: center; }
.modal-overlay.open { opacity: 1; pointer-events: auto; }

.settings-modal-simple { width: 420px; max-width: 92vw; background: var(--panel); border-radius: 16px; padding: 26px; position: relative; transform: scale(0.97); opacity: 0; transition: transform 0.2s ease, opacity 0.2s ease; box-shadow: 0 30px 70px rgba(0,0,0,0.35); }
.modal-overlay.open .settings-modal-simple { transform: scale(1); opacity: 1; }
.settings-modal-simple h2 { font-size: 18px; font-weight: 700; margin-bottom: 18px; }
.acct-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); gap: 14px; }
.acct-row:last-of-type { border-bottom: none; }
.acct-row .lbl { font-size: 12px; color: var(--muted); flex-shrink: 0; }
.acct-row .val { font-size: 13px; font-weight: 600; text-align: right; overflow: hidden; text-overflow: ellipsis; }
.acct-row .key-row { display: flex; align-items: center; gap: 8px; }
.key-mono { font-family: 'JetBrains Mono', monospace; font-size: 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; }
.mini-btn { border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); font-family: inherit; font-size: 11px; font-weight: 700; padding: 5px 9px; border-radius: 7px; cursor: pointer; }
.mini-btn:hover { background: var(--line); }
.set-close { position: absolute; top: 16px; right: 16px; width: 28px; height: 28px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.set-close svg { width: 13px; height: 13px; }

.download-prompt-modal { width: 400px; max-width: 92vw; background: var(--panel); border-radius: 16px; padding: 30px 26px; text-align: center; transform: scale(0.97); opacity: 0; transition: transform 0.2s ease, opacity 0.2s ease; box-shadow: 0 30px 70px rgba(0,0,0,0.35); }
.modal-overlay.open .download-prompt-modal { transform: scale(1); opacity: 1; }
.download-prompt-modal .dp-icon { width: 56px; height: 56px; border-radius: 16px; background: linear-gradient(150deg, var(--accent), var(--accent-2)); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; font-size: 26px; box-shadow: 0 6px 18px rgba(253,166,2,0.35); }
.download-prompt-modal h3 { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.download-prompt-modal p { font-size: 13px; color: var(--muted); margin-bottom: 20px; line-height: 1.55; }
.download-prompt-modal .dp-actions { display: flex; gap: 10px; margin-bottom: 16px; }
.download-prompt-modal .dp-actions button, .download-prompt-modal .dp-actions a { flex: 1; }
.dp-checkbox-row { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12.5px; color: var(--muted); cursor: pointer; user-select: none; }
.dp-checkbox-row input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }

/* ================= TOASTS ================= */
.toast-stack { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 10px; font-size: 12.5px; font-weight: 600; box-shadow: 0 10px 28px rgba(0,0,0,0.25); display: flex; align-items: center; gap: 9px; animation: toastIn 0.25s ease; max-width: 320px; }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

@media (max-width: 1100px) {
  .kpi-row, .stat-grid, .stat-grid-3 { grid-template-columns: repeat(2,1fr); }
  .credits-usage-grid { grid-template-columns: 1fr; }
}
