/* ─────────────────────────────────────────────────────────────────────────
   dashboard-mock.css
   A faithful, scoped port of the real extension's popup.css. Selectors,
   class names, and CSS variable names are kept identical to the source
   (see popup.css in the extension package) and only ever apply inside a
   `.dbm` root, so the marketing site's own chrome is never affected and
   the mock never drifts from what the real popup actually looks like.
   ───────────────────────────────────────────────────────────────────────── */

.dbm, .dbm *, .dbm *::before, .dbm *::after {
  box-sizing: border-box;
}

/* == THEMES: identical values to popup.css, scoped to .dbm == */

.dbm[data-theme="dark"] {
  --bg-base: #0d1117;
  --bg-surface: #161b22;
  --bg-elevated: #1c2128;
  --border: rgba(255, 255, 255, 0.06);
  --border-btn: rgba(255, 255, 255, 0.08);
  --text-primary: #e6edf3;
  --text-secondary: #c9d1d9;
  --text-muted: #8b949e;
  --text-faint: #7d8590;
  --accent: #0f6e56;
  --accent-text: #e1f5ee;
  --btn-active-bg: #e1f5ee;
  --btn-active-color: #0f6e56;
  --header-muted: rgba(225, 245, 238, 0.65);
  --live-color: #1d9e75;
  --scrollbar: rgba(255, 255, 255, 0.1);
  --cat-work: #1D9E75; --cat-learning: #378ADD; --cat-social: #D85A30; --cat-entertainment: #BA7517; --cat-other: #5F5E5A;
}
.dbm[data-theme="catppuccin-mocha"] {
  --bg-base: #1e1e2e; --bg-surface: #181825; --bg-elevated: #313244;
  --border: rgba(205, 214, 244, 0.07); --border-btn: rgba(205, 214, 244, 0.1);
  --text-primary: #cdd6f4; --text-secondary: #bac2de; --text-muted: #a6adc8; --text-faint: #6c7086;
  --accent: #cba6f7; --accent-text: #1e1e2e; --btn-active-bg: #cba6f7; --btn-active-color: #1e1e2e;
  --header-muted: rgba(30, 30, 46, 0.6); --live-color: #a6e3a1; --scrollbar: rgba(205, 214, 244, 0.1);
  --cat-work: #a6e3a1; --cat-learning: #89dceb; --cat-social: #f38ba8; --cat-entertainment: #fab387; --cat-other: #6c7086;
}
.dbm[data-theme="catppuccin-latte"] {
  --bg-base: #eff1f5; --bg-surface: #e6e9ef; --bg-elevated: #dce0e8;
  --border: rgba(76, 79, 105, 0.1); --border-btn: rgba(76, 79, 105, 0.15);
  --text-primary: #4c4f69; --text-secondary: #5c5f77; --text-muted: #6c6f85; --text-faint: #9ca0b0;
  --accent: #8839ef; --accent-text: #eff1f5; --btn-active-bg: #8839ef; --btn-active-color: #eff1f5;
  --header-muted: rgba(239, 241, 245, 0.75); --live-color: #40a02b; --scrollbar: rgba(76, 79, 105, 0.12);
  --cat-work: #40a02b; --cat-learning: #1e66f5; --cat-social: #d20f39; --cat-entertainment: #fe640b; --cat-other: #9ca0b0;
}
.dbm[data-theme="tokyo-night"] {
  --bg-base: #1a1b26; --bg-surface: #16161e; --bg-elevated: #24283b;
  --border: rgba(192, 202, 245, 0.07); --border-btn: rgba(192, 202, 245, 0.1);
  --text-primary: #c0caf5; --text-secondary: #a9b1d6; --text-muted: #787c99; --text-faint: #565f89;
  --accent: #7aa2f7; --accent-text: #1a1b26; --btn-active-bg: #7aa2f7; --btn-active-color: #1a1b26;
  --header-muted: rgba(26, 27, 38, 0.65); --live-color: #9ece6a; --scrollbar: rgba(192, 202, 245, 0.08);
  --cat-work: #9ece6a; --cat-learning: #7aa2f7; --cat-social: #f7768e; --cat-entertainment: #e0af68; --cat-other: #565f89;
}
.dbm[data-theme="rose-pine"] {
  --bg-base: #191724; --bg-surface: #1f1d2e; --bg-elevated: #26233a;
  --border: rgba(224, 222, 244, 0.07); --border-btn: rgba(224, 222, 244, 0.1);
  --text-primary: #e0def4; --text-secondary: #e0def4; --text-muted: #908caa; --text-faint: #6e6a86;
  --accent: #eb6f92; --accent-text: #191724; --btn-active-bg: #eb6f92; --btn-active-color: #191724;
  --header-muted: rgba(25, 23, 36, 0.65); --live-color: #9ccfd8; --scrollbar: rgba(224, 222, 244, 0.08);
  --cat-work: #31748f; --cat-learning: #9ccfd8; --cat-social: #eb6f92; --cat-entertainment: #f6c177; --cat-other: #6e6a86;
}
.dbm[data-theme="gruvbox"] {
  --bg-base: #282828; --bg-surface: #1d2021; --bg-elevated: #3c3836;
  --border: rgba(235, 219, 178, 0.08); --border-btn: rgba(235, 219, 178, 0.12);
  --text-primary: #ebdbb2; --text-secondary: #d5c4a1; --text-muted: #a89984; --text-faint: #7c6f64;
  --accent: #d79921; --accent-text: #282828; --btn-active-bg: #d79921; --btn-active-color: #282828;
  --header-muted: rgba(40, 40, 40, 0.65); --live-color: #98971a; --scrollbar: rgba(235, 219, 178, 0.1);
  --cat-work: #98971a; --cat-learning: #458588; --cat-social: #cc241d; --cat-entertainment: #d79921; --cat-other: #7c6f64;
}
.dbm[data-theme="nord"] {
  --bg-base: #2e3440; --bg-surface: #272c36; --bg-elevated: #3b4252;
  --border: rgba(216, 222, 233, 0.07); --border-btn: rgba(216, 222, 233, 0.1);
  --text-primary: #d8dee9; --text-secondary: #e5e9f0; --text-muted: #8fbcbb; --text-faint: #616e88;
  --accent: #88c0d0; --accent-text: #2e3440; --btn-active-bg: #88c0d0; --btn-active-color: #2e3440;
  --header-muted: rgba(46, 52, 64, 0.65); --live-color: #a3be8c; --scrollbar: rgba(216, 222, 233, 0.08);
  --cat-work: #a3be8c; --cat-learning: #88c0d0; --cat-social: #bf616a; --cat-entertainment: #ebcb8b; --cat-other: #616e88;
}
.dbm[data-theme="dracula"] {
  --bg-base: #282a36; --bg-surface: #21222c; --bg-elevated: #44475a;
  --border: rgba(248, 248, 242, 0.07); --border-btn: rgba(248, 248, 242, 0.1);
  --text-primary: #f8f8f2; --text-secondary: #f8f8f2; --text-muted: #6272a4; --text-faint: #44475a;
  --accent: #bd93f9; --accent-text: #282a36; --btn-active-bg: #bd93f9; --btn-active-color: #282a36;
  --header-muted: rgba(40, 42, 54, 0.65); --live-color: #50fa7b; --scrollbar: rgba(248, 248, 242, 0.08);
  --cat-work: #50fa7b; --cat-learning: #8be9fd; --cat-social: #ff5555; --cat-entertainment: #ffb86c; --cat-other: #6272a4;
}
.dbm[data-theme="solarized"] {
  --bg-base: #fdf6e3; --bg-surface: #eee8d5; --bg-elevated: #e2dcc8;
  --border: rgba(101, 123, 131, 0.1); --border-btn: rgba(101, 123, 131, 0.15);
  --text-primary: #657b83; --text-secondary: #586e75; --text-muted: #839496; --text-faint: #93a1a1;
  --accent: #268bd2; --accent-text: #fdf6e3; --btn-active-bg: #268bd2; --btn-active-color: #fdf6e3;
  --header-muted: rgba(253, 246, 227, 0.75); --live-color: #859900; --scrollbar: rgba(101, 123, 131, 0.12);
  --cat-work: #859900; --cat-learning: #268bd2; --cat-social: #dc322f; --cat-entertainment: #b58900; --cat-other: #93a1a1;
}

/* == COMPONENT STYLES: ported from popup.css == */

.dbm {
  width: 340px;
  font-family: "DM Sans", "Segoe UI", system-ui, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.5;
  overflow: hidden;
  border-radius: 10px;
  transition: background 0.25s, color 0.25s;
}

.dbm .header {
  background: var(--accent);
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.dbm .header-left { display: flex; align-items: center; gap: 7px; }
.dbm .header-title {
  display: flex; align-items: center; gap: 7px;
  font-weight: 600; font-size: 13px; color: var(--accent-text);
  letter-spacing: -0.01em; white-space: nowrap;
}
.dbm .theme-toggle-btn {
  background: rgba(0, 0, 0, 0.18); border: none; border-radius: 6px;
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--accent-text); flex-shrink: 0;
  transition: background 0.15s; font-size: 15px; line-height: 1;
}
.dbm .theme-toggle-btn:hover { background: rgba(0, 0, 0, 0.3); }

.dbm .day-selector { display: flex; gap: 2px; background: rgba(0, 0, 0, 0.18); border-radius: 7px; padding: 2px; flex-shrink: 0; }
.dbm .day-btn {
  font-size: 11px; font-weight: 500; padding: 3px 8px; border: none;
  background: transparent; color: var(--header-muted); border-radius: 5px; cursor: pointer;
  font-family: inherit; transition: background 0.15s, color 0.15s;
}
.dbm .day-btn.active { background: var(--btn-active-bg); color: var(--btn-active-color); }
.dbm .day-btn:hover:not(.active) { background: rgba(0, 0, 0, 0.1); color: var(--accent-text); }

.dbm .theme-panel {
  display: none; padding: 10px 14px 12px; background: var(--bg-surface);
  border-bottom: 1px solid var(--border); gap: 8px; flex-wrap: wrap; align-items: flex-start;
}
.dbm .theme-panel.open { display: flex; }
.dbm .theme-panel-title {
  width: 100%; font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-faint); margin-bottom: 2px;
}
.dbm .theme-swatch {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: pointer; background: none; border: none; font-family: inherit; padding: 0;
}
.dbm .swatch-circle {
  width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid transparent;
  transition: border-color 0.15s, transform 0.12s; flex-shrink: 0;
}
.dbm .theme-swatch:hover .swatch-circle { transform: scale(1.12); }
.dbm .theme-swatch.active .swatch-circle { border-color: var(--text-primary); }
.dbm .swatch-label { font-size: 9px; color: var(--text-faint); text-align: center; line-height: 1.2; max-width: 36px; }
.dbm .theme-swatch.active .swatch-label { color: var(--text-primary); font-weight: 600; }
.dbm .theme-swatch:focus-visible .swatch-circle { outline: 2px solid var(--text-primary); outline-offset: 2px; }

.dbm .summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px 14px 8px; border-bottom: 1px solid var(--border); }
.dbm .stat-card { background: var(--bg-surface); border-radius: 8px; padding: 10px 10px 8px; display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--border); transition: background 0.25s; }
.dbm .stat-label { font-size: 10px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 500; }
.dbm .stat-val { font-size: 17px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.02em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.dbm .stat-sub { font-size: 10px; color: var(--text-faint); }

.dbm .section { padding: 12px 14px 6px; border-bottom: 1px solid var(--border); }
.dbm .section-label { font-size: 10px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; margin-bottom: 8px; display: block; }
.dbm .section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }

.dbm .breakdown-bar { display: flex; height: 32px; border-radius: 6px; overflow: hidden; gap: 1px; background: var(--bg-surface); margin-bottom: 8px; }
.dbm .bar-seg { height: 100%; transition: opacity 0.15s; min-width: 2px; cursor: default; }
.dbm .bar-seg:hover { opacity: 0.8; }
.dbm .legend { display: flex; gap: 10px; flex-wrap: wrap; padding-bottom: 4px; }
.dbm .legend-item { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-muted); }
.dbm .legend-dot { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }

.dbm .sites-section { border-bottom: none; }
.dbm .sort-btn {
  display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text-muted);
  background: none; border: 1px solid var(--border-btn); border-radius: 5px; padding: 3px 8px;
  cursor: pointer; font-family: inherit; transition: background 0.15s, color 0.15s;
}
.dbm .sort-btn:hover { background: var(--bg-elevated); color: var(--text-primary); }

.dbm .site-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); animation: dbm-fadeIn 0.2s ease backwards; }
@keyframes dbm-fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.dbm .site-row:last-child { border-bottom: none; }
.dbm .favicon { width: 22px; height: 22px; border-radius: 5px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; text-transform: uppercase; }
.dbm .site-name { font-size: 12px; color: var(--text-secondary); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dbm .site-bar-wrap { width: 70px; height: 3px; background: var(--bg-elevated); border-radius: 2px; flex-shrink: 0; overflow: hidden; }
.dbm .site-bar-fill { height: 100%; border-radius: 2px; }
.dbm .site-time { font-size: 12px; color: var(--text-muted); min-width: 44px; text-align: right; flex-shrink: 0; font-variant-numeric: tabular-nums; }

.dbm .footer { padding: 9px 14px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--border); background: var(--bg-base); }
.dbm .live-indicator { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); max-width: 195px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dbm .live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live-color); flex-shrink: 0; animation: dbm-pulse 1.8s infinite; }
@keyframes dbm-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.dbm .footer-right { display: flex; align-items: center; gap: 6px; }
.dbm .export-btn {
  display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-muted);
  background: none; border: 1px solid var(--border-btn); border-radius: 5px; padding: 4px 9px;
  cursor: pointer; font-family: inherit; transition: background 0.15s, color 0.15s;
}
.dbm .export-btn:hover { background: var(--bg-elevated); color: var(--text-primary); }

@media (prefers-reduced-motion: reduce) {
  .dbm .live-dot { animation: none; opacity: 1; }
  .dbm .site-row { animation: none; }
}

/* ── Mock-only modifiers (not present in the real popup; purely for
     recreating it at different sizes/contexts on the marketing site) ── */

/* "mini": used in the Hero. Shows header + summary + a short site list,
   hides the theme panel and footer. Same markup, same classes, just fewer
   site rows rendered and two sections hidden via this modifier. */
.dbm--mini .theme-panel,
.dbm--mini .footer,
.dbm--mini .sites-section .section-header .sort-btn {
  display: none;
}
.dbm--mini { width: 100%; max-width: 340px; }

/* Demo-data disclosure caption. Sits below the mock, not part of the
   product UI, clearly marked as belonging to the marketing site. */
.dbm-caption {
  font-size: 11px;
  color: var(--dbm-caption-color, #7d8590);
  text-align: center;
  margin-top: 10px;
  letter-spacing: 0.02em;
}
