/* ── Design tokens ───────────────────────────────── */
:root {
  --bg: #eef2f7;
  --surface: #ffffff;
  --border: #e2e8f0;
  --nav-bg: #0a1118;
  --nav-text: #94a3b8;
  --text-1: #0f172a;
  --text-2: #475569;
  --text-3: #94a3b8;
  /* Primary cyan + amber alert. Soft/bright variants let panels and chips
     pick the right tone without re-declaring rgb(). */
  --accent: #06b6d4;
  --accent-bright: #22d3ee;
  --accent-dark: #0e7490;
  --accent-soft: #ecfeff;
  --accent-border: #67e8f9;
  --alert: #f59e0b;
  --alert-bright: #fbbf24;
  --alert-soft: #fffbeb;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 3px rgb(0 0 0 / 0.07), 0 1px 2px rgb(0 0 0 / 0.04);
  --shadow-md: 0 4px 12px rgb(0 0 0 / 0.08), 0 2px 4px rgb(0 0 0 / 0.04);
  --shadow-glow:
    0 0 0 1px rgba(34, 211, 238, 0.18),
    0 6px 18px rgba(34, 211, 238, 0.08);

  --font-display: "Space Grotesk", "DM Sans", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ── Reset ───────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

[v-cloak] {
  display: none !important;
}

/* ── Pronounced atmosphere ───────────────────────── */
/* Three radial color washes (cyan top-left, amber bottom-right, indigo top-
   right) layered above a subtle dot grid produce the ambient depth. They
   stay fixed so they don't scroll out from under content on long pages.
   Grain texture is applied via body::before so it can sit at its own
   z-index without affecting layout. */
body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(900px circle at 0% 0%, rgba(34, 211, 238, 0.14), transparent 55%),
    radial-gradient(1000px circle at 100% 100%, rgba(251, 191, 36, 0.09), transparent 55%),
    radial-gradient(700px circle at 100% 0%, rgba(99, 102, 241, 0.07), transparent 60%),
    radial-gradient(rgba(148, 163, 184, 0.32) 1px, transparent 1px);
  background-size: auto, auto, auto, 24px 24px;
  background-attachment: fixed, fixed, fixed, scroll;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-1);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  letter-spacing: -0.005em;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.08;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
}

/* Display font on prominent type. Body inherits Inter from <body>. */
h1, h2 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

h3 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

h1,
h2,
h3,
p {
  margin: 0;
}

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

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* ── Particle network background ─────────────────── */
/* Lives only on the home dashboard (#particles-bg is not rendered on
   other pages that share this stylesheet). Sits between the body dot
   pattern and #app — pointer-events: none so it never blocks input. */
#particles-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

@media (prefers-reduced-motion: reduce) {
  #particles-bg {
    display: none;
  }
}

/* ── App shell ───────────────────────────────────── */
#app {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Nav ─────────────────────────────────────────── */
.nav {
  background: var(--nav-bg);
  border-bottom: 1px solid rgb(255 255 255 / 0.06);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}

.nav-wordmark {
  color: #f1f5f9;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.nav-search {
  position: relative;
  flex: 1;
  max-width: 340px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  background: rgb(255 255 255 / 0.07);
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 999px;
  padding: 0 14px;
  gap: 8px;
  transition:
    border-color 0.15s,
    background 0.15s;
}

/* Recent-ticker dropdown, anchored under the pill */
.search-history {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 60;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius-md, 10px);
  box-shadow: 0 8px 24px rgb(15 23 42 / 0.18);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.search-history-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3, #94a3b8);
  padding: 4px 8px 2px;
}

.search-history-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: none;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1, #0f172a);
  text-align: left;
  padding: 7px 8px;
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  transition: background 0.12s;
}

.search-history-item:hover {
  background: var(--bg, #f4f6f9);
  color: var(--accent);
}

.nav-search:focus-within {
  border-color: var(--accent);
  background: rgb(255 255 255 / 0.11);
}

.search-icon {
  color: var(--text-3);
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  color: #f1f5f9;
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
  padding: 8px 0;
}

.search-input::placeholder {
  color: #64748b;
}

.search-submit {
  flex-shrink: 0;
  border: none;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s;
}

.search-submit:hover {
  background: var(--accent-dark);
}

.nav-date {
  font-family: var(--font-mono);
  color: var(--nav-text);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  flex-shrink: 0;
  opacity: 0.85;
  text-transform: uppercase;
}

/* ── Dashboard grid ──────────────────────────────── */
main.dashboard {
  flex: 1;
  max-width: 1280px;
  width: 100%;
  margin: 28px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 20px;
  align-items: start;
}

/* ── Panel base ──────────────────────────────────── */
/* Panel surface is opaque-white on top of the atmospheric body so data
   remains crisp. The 1px border + subtle shadow + top-edge highlight give
   each panel a defined "lifted" feel against the gradient washes behind. */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    var(--shadow-sm);
  overflow: hidden;
  position: relative;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(
    180deg,
    rgba(236, 254, 255, 0.55) 0%,
    transparent 100%
  );
}

.panel-title {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Small cyan tick before each panel title — reads as a HUD indicator. */
.panel-title::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.18);
  border-radius: 1px;
  transform: rotate(45deg);
  flex-shrink: 0;
}

.panel-badge {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--alert-soft);
  color: #b45309;
  border: 1px solid #fcd34d;
  padding: 2px 8px;
  border-radius: 999px;
}

.expense-widget-body {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.expense-stat {
  display: grid;
  gap: 3px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.expense-stat:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.expense-stat-label {
  font-family: var(--font-display);
  color: var(--text-3);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.expense-stat-value {
  font-family: var(--font-mono);
  color: var(--text-1);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.expense-stat-meta {
  color: var(--text-2);
  font-size: 12px;
}

.expense-bar-wrap {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 3px;
}

.expense-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
}

.expense-bar--over {
  background: #9b2335;
}

.expense-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
}

.expense-row-name {
  color: var(--text-1);
  font-size: 13px;
  font-weight: 500;
  min-width: 0;
  max-width: 16ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.expense-row-amount {
  color: var(--text-2);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Left column (news + tasks) ──────────────────── */
.left-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* ── News panel ──────────────────────────────────── */
/* Left accent stripe with a subtle cyan-to-amber gradient — the morning
   brief is the closest thing to a "headline" surface on the dashboard, so
   it carries a visible identity marker. */
.panel-news {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-left: 3px solid transparent;
  background-image: linear-gradient(var(--surface), var(--surface)),
    linear-gradient(180deg, var(--accent-bright), var(--alert-bright));
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

.news-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px;
  scrollbar-width: none;
}

.news-list::-webkit-scrollbar {
  display: none;
}

.news-item {
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.12s;
  margin-bottom: 2px;
}

.news-item:hover {
  background: #f8fafc;
}

.news-title {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: var(--text-1);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-preview {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.45;
}

.news-empty {
  padding: 24px 16px;
  color: var(--text-3);
  font-size: 13px;
  text-align: center;
}

/* ── Tasks panel ─────────────────────────────────── */
.task-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-3);
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}

.task-add-btn:hover,
.task-add-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.task-add-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 16px 12px;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}

.task-add-input {
  width: 100%;
  padding: 6px 10px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text-1);
  box-sizing: border-box;
}

.task-add-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 20%, transparent);
}

.task-add-select {
  padding: 5px 8px;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text-2);
  width: 100%;
  box-sizing: border-box;
}

.task-add-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.task-add-submit {
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.task-add-submit:disabled {
  opacity: 0.5;
  cursor: default;
}

.task-add-cancel {
  padding: 5px 10px;
  font-size: 12px;
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
}

.task-add-cancel:hover {
  background: #f1f5f9;
}

.task-count {
  font-size: 11px;
  font-weight: 600;
  background: #f1f5f9;
  color: var(--text-2);
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.task-list {
  padding: 4px 0;
}

.task-item {
  display: grid;
  grid-template-columns: 8px 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 3px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.task-item:last-child {
  border-bottom: none;
}

.task-priority {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 4px;
  flex-shrink: 0;
}

.task-priority--high {
  background: #ef4444;
}
.task-priority--medium {
  background: #f59e0b;
}
.task-priority--low {
  background: #94a3b8;
}

.task-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-1);
  line-height: 1.4;
  text-decoration: none;
}

.task-title:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

.task-item {
  position: relative;
  transition: opacity 0.2s ease;
}

.task-item--completing {
  opacity: 0.35;
}

.task-meta {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 6px;
}

.task-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.15s;
}

.task-item:hover .task-actions,
.task-item:focus-within .task-actions {
  opacity: 1;
}

.task-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  color: var(--text-3);
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
}

.task-action:hover {
  background: #f1f5f9;
}

.task-action--done:hover {
  color: #059669;
}

.task-action--delete:hover {
  color: #dc2626;
}

.task-tag {
  font-size: 11px;
  color: var(--text-3);
  background: #f8fafc;
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
}

.task-due {
  font-size: 11px;
  color: var(--text-3);
}

/* ── Main column ─────────────────────────────────── */
.main-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

/* ── Section label ───────────────────────────────── */
.section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: 0 0 10px;
  padding-left: 8px;
  border-left: 2px solid var(--accent);
}

/* ── App grid ────────────────────────────────────── */
.app-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.app-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 10px 14px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition:
    box-shadow 0.15s,
    border-color 0.15s,
    transform 0.1s;
  color: var(--text-1);
  gap: 8px;
}

.app-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.app-card--disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: default;
}

.app-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.app-icon--blue {
  background: #cffafe;
  color: var(--accent);
}
.app-icon--purple {
  background: #ede9fe;
  color: #7c3aed;
}
.app-icon--green {
  background: #dcfce7;
  color: #16a34a;
}
.app-icon--orange {
  background: #ffedd5;
  color: #ea580c;
}
.app-icon--rose {
  background: #fce7f3;
  color: #db2777;
}
.app-icon--amber {
  background: #fef3c7;
  color: #d97706;
}

.app-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.app-desc {
  font-size: 11.5px;
  color: var(--text-2);
  line-height: 1.4;
}

/* ── Watchlist ───────────────────────────────────── */
.watchlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.watchlist-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.watchlist-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.wl-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.wl-ticker {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-dark);
  letter-spacing: 0.3px;
}

.wl-sector {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-2);
  background: var(--surface-2, rgba(148,163,184,0.12));
  border-radius: 4px;
  padding: 2px 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90px;
}

.wl-name {
  font-size: 11px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wl-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 2px;
}

.wl-price {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-1, var(--text));
  font-variant-numeric: tabular-nums;
}

.wl-change {
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.wl-change--up   { color: #16a34a; font-weight: 600; }
.wl-change--down { color: #dc2626; font-weight: 600; }

.wl-card--up   { background: rgba(34, 197, 94, 0.04); border-color: rgba(34, 197, 94, 0.2); }
.wl-card--down { background: rgba(239, 68, 68, 0.04);  border-color: rgba(239, 68, 68, 0.2); }
.wl-card--up:hover   { border-color: rgba(34, 197, 94, 0.5); }
.wl-card--down:hover { border-color: rgba(239, 68, 68, 0.5); }

.wl-range {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.wl-range-label {
  font-size: 9px;
  color: var(--text-3, var(--text-2));
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.wl-range-bar {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.wl-range-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
}

.wl-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 3px;
}

.wl-target {
  font-size: 11px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.wl-consensus {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border: 1px solid transparent;
}

.wl-consensus--buy        { background: rgba(34,197,94,0.12);  color: #15803d; border-color: rgba(34,197,94,0.3); }
.wl-consensus--strong\ buy { background: rgba(34,197,94,0.18); color: #14532d; border-color: rgba(34,197,94,0.4); }
.wl-consensus--hold       { background: rgba(234,179,8,0.12);  color: #92400e; border-color: rgba(234,179,8,0.35); }
.wl-consensus--sell       { background: rgba(239,68,68,0.12);  color: #b91c1c; border-color: rgba(239,68,68,0.3); }

/* ── Activity (merged per-ticker cards) ──────────── */
.activity-list {
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.activity-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 10px 12px 10px;
  transition: box-shadow 0.15s;
}

.activity-group:hover {
  box-shadow: var(--shadow-md);
}

.activity-group-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.activity-ticker {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-dark);
  letter-spacing: 0.3px;
}

.activity-ticker:hover {
  text-decoration: underline;
}

.activity-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.activity-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: default;
}

.activity-pill--filing {
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-color: var(--accent-border);
  cursor: pointer;
}
.activity-pill--filing:hover {
  background: #cffafe;
}

.pill-bm {
  width: 8px;
  height: 10px;
  margin-left: 3px;
  flex-shrink: 0;
  opacity: 0.75;
}

.activity-pill--metric {
  background: #f0fdf4;
  color: #166534;
  border-color: #bbf7d0;
}

.activity-pill--note {
  display: inline-block; /* inline-flex breaks text-overflow ellipsis */
  background: #fefce8;
  color: #854d0e;
  border-color: #fde68a;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.activity-pill--note[href] {
  cursor: pointer;
}
.activity-pill--note[href]:hover {
  background: #fef08a;
}

.activity-empty {
  padding: 20px 16px;
  font-size: 13px;
  color: var(--text-3);
  text-align: center;
}

/* ── Footer ──────────────────────────────────────── */
.footer {
  text-align: center;
  padding: 20px;
  color: var(--text-3);
  font-size: 12px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

/* ── Reading panel ───────────────────────────────── */
.panel-backdrop {
  position: fixed;
  inset: 0;
  background: rgb(0 0 0 / 0.35);
  z-index: 100;
}

.reading-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(540px, 92vw);
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 32px rgb(0 0 0 / 0.1);
  z-index: 101;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: #f1f5f9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-2);
  transition: background 0.15s;
}

.panel-close:hover {
  background: #e2e8f0;
}

.panel-article-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.45;
  padding: 48px 28px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-1);
}

.panel-article-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 28px 32px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-2);
}

/* ── Toast ───────────────────────────────────────── */
.toast {
  position: fixed;
  top: 72px;
  right: 20px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1e293b;
  color: #f1f5f9;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

/* ── Vue transitions ─────────────────────────────── */
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.2s ease;
}
.fade-enter,
.fade-leave-to {
  opacity: 0;
}

.slide-enter-active,
.slide-leave-active {
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.slide-enter,
.slide-enter-from,
.slide-leave-to {
  transform: translateX(100%);
}

/* Bottom-sheet variant: rise from bottom on phone */
@media (max-width: 560px) {
  .slide-enter,
  .slide-enter-from,
  .slide-leave-to {
    transform: translateY(100%);
  }
}

/* ── AI News ─────────────────────────────────────── */
.section-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.section-label-row .section-label {
  margin-bottom: 0;
}

.news-pager {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.news-pager-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.news-pager-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}
.news-pager-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.news-pager-count {
  font-size: 0.72rem;
  color: var(--text-3);
  min-width: 36px;
  text-align: center;
}
.ai-news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.ai-news-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.ai-news-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.ai-news-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.ai-news-source {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-news-date {
  font-size: 0.7rem;
  color: var(--text-3);
  white-space: nowrap;
}
.ai-news-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-1);
  line-height: 1.35;
  margin: 0;
}
.ai-news-preview {
  font-size: 0.75rem;
  color: var(--text-2);
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 900px) {
  main.dashboard {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-news {
    position: static;
    max-height: 320px;
  }

  .activity-row {
    grid-template-columns: 1fr;
  }

  .watchlist-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .ai-news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .nav-date {
    display: none;
  }

  .nav-inner {
    padding: 0 12px;
    gap: 10px;
  }

  .nav-search {
    min-width: 0;
  }

  .nav-wordmark {
    display: none;
  }

  main.dashboard {
    padding: 0 12px;
    margin: 14px auto;
    gap: 14px;
  }

  /* 2-col app grid saves 3 rows of scroll vs 1-col */
  .app-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .app-card {
    padding: 12px 8px 10px;
    gap: 6px;
  }

  .app-icon {
    width: 36px;
    height: 36px;
  }

  .app-name {
    font-size: 12px;
  }

  .app-desc {
    font-size: 10.5px;
  }


  .watchlist-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .watchlist-card {
    padding: 10px 12px;
  }

  .activity-list {
    grid-template-columns: 1fr;
  }

  .ai-news-grid {
    grid-template-columns: 1fr;
  }

  /* Reading panel: full-width on phone */
  .reading-panel {
    width: 100vw;
    border-left: none;
    border-top: 1px solid var(--border);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    height: 90vh;
    top: auto;
    bottom: 0;
  }

  .panel-article-title {
    font-size: 15px;
    padding: 40px 20px 14px;
  }

  .panel-article-body {
    padding: 16px 20px 24px;
  }

  .section-label {
    font-size: 10px;
  }

  .task-actions {
    opacity: 1;
  }
}
