/* DailyDose — Apple-style dashboard */

:root {
  --bg: #0b0b0e;
  --bg-2: #111114;
  --panel: #16171c;
  --panel-2: #1c1d23;
  --panel-3: #22232a;
  --text: #f0f0f2;
  --text-2: #b8b9c0;
  --muted: #7c7d86;
  --border: rgba(255,255,255,0.06);
  --border-strong: rgba(255,255,255,0.10);
  --accent: #0a84ff;            /* Apple system blue */
  --accent-2: #5e5ce6;          /* Apple system indigo */
  --warm: #ff9f0a;
  --green: #30d158;
  --red: #ff453a;
  --pink: #ff375f;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 0 0 1px var(--border);
}

* { box-sizing: border-box; }

html, body { background: var(--bg); }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
               "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background:
    radial-gradient(1200px 600px at 80% -200px, rgba(10,132,255,0.08), transparent 60%),
    radial-gradient(900px 500px at -10% 100%, rgba(94,92,230,0.06), transparent 50%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
}

/* ── Topbar ─────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(11,11,14,0.78);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-left {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}
.topbar h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.topbar h1::before {
  content: "◐";
  margin-right: 8px;
  color: var(--accent);
  font-size: 16px;
}
.topbar-right {
  display: flex;
  gap: 10px;
  align-items: center;
  position: relative;
}
.topbar .date {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.refresh-btn {
  background: var(--panel-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.refresh-btn:hover { background: var(--accent); border-color: var(--accent); }
.refresh-btn:active { transform: scale(0.97); }

/* Desktop nav: inline links */
.topbar-nav-inline {
  display: flex;
  gap: 16px;
  align-items: center;
}
.nav-link {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
  white-space: nowrap;
}
.nav-link:hover { color: var(--text); }

/* Mobile hamburger: hidden on desktop */
.topbar-nav-mobile {
  display: none;
  position: relative;
}
.hamburger {
  list-style: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--panel-2);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.hamburger::-webkit-details-marker { display: none; }
.hamburger:hover { background: var(--panel-3); }
.hamburger-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  padding: 6px;
  display: flex;
  flex-direction: column;
  z-index: 100;
}
.hamburger-menu .nav-link {
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
}
.hamburger-menu .nav-link:hover { background: var(--panel-2); color: var(--accent); }

/* Breakpoint — switch nav style on narrow viewports */
@media (max-width: 640px) {
  .topbar { padding: 12px 16px; }
  .topbar-nav-inline { display: none; }
  .topbar-nav-mobile { display: block; }
  .topbar .date { display: none; } /* re-claim space on phones */
  .refresh-btn { padding: 6px 12px; font-size: 11px; }
  .grid { padding: 16px; gap: 12px; }
}

/* Old class kept for backwards compat with any unmigrated template */
.logs-link {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}
.logs-link:hover { color: var(--text); }

/* ── Grid ───────────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  padding: 20px 28px;
  max-width: 1400px;
  margin: 0 auto;
  align-items: start; /* cards size to content; no stretching */
}

/* ── Card base ──────────────────────────────────────── */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: var(--border-strong); }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.card-head .label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
}
.card-head .icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--panel-3);
}
.card-head .icon svg { width: 14px; height: 14px; }

.icon-weather { color: var(--warm); }
.icon-stock { color: var(--green); }
.icon-gas { color: var(--accent); }
.icon-funfact { color: var(--accent-2); }
.icon-news-ai { color: var(--accent-2); }
.icon-news-immigration { color: #64d2ff; }
.icon-news-uscis { color: var(--pink); }
.icon-news-indian { color: var(--warm); }
.icon-news-greencard { color: var(--green); }
.icon-news-financial { color: #bf5af2; }

.muted { color: var(--muted); font-size: 13px; }

/* ── Fun fact card ──────────────────────────────────── */
.card-funfact {
  background: linear-gradient(135deg, rgba(94,92,230,0.12), rgba(10,132,255,0.06));
  border-color: rgba(94,92,230,0.20);
}
.fun-fact-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  margin: 4px 0;
}
.shuffle-btn {
  background: var(--panel-3);
  border: 1px solid var(--border-strong);
  color: var(--text-2);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.shuffle-btn:hover {
  background: var(--accent-2);
  color: white;
  border-color: var(--accent-2);
  transform: rotate(180deg);
}
.shuffle-btn:active { transform: rotate(180deg) scale(0.92); }

/* ── View-all footer ────────────────────────────────── */
.view-all {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}
.view-all a {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
}
.view-all a:hover { color: var(--text); }
.view-all a::after { content: "→"; transition: transform 0.15s ease; }
.view-all a:hover::after { transform: translateX(2px); }

/* ── Stock card ─────────────────────────────────────── */
.action {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.06em;
}
.action-buy   { background: rgba(48,209,88,0.16);  color: var(--green); }
.action-hold  { background: rgba(255,159,10,0.16); color: var(--warm); }
.action-sell  { background: rgba(255,69,58,0.16);  color: var(--red); }
.action-none  { background: var(--panel-3);        color: var(--muted); }

.risk-pill {
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.06em;
  border: 1px solid transparent;
}
.risk-low    { background: rgba(48,209,88,0.10);  color: var(--green);  border-color: rgba(48,209,88,0.25); }
.risk-medium { background: rgba(255,159,10,0.10); color: var(--warm);   border-color: rgba(255,159,10,0.25); }
.risk-high   { background: rgba(255,69,58,0.10);  color: var(--red);    border-color: rgba(255,69,58,0.25); }

.picks-section { margin-bottom: 6px; }
.picks-section-head {
  margin: 4px 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
}
.picks-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.picks-list li { padding: 0; }
.pick-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pick-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--panel-3);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.pick-ticker {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}
.pick-rationale {
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.4;
  margin: 4px 0 0 30px;
}
.watchlist-list .pick-rationale { margin-left: 0; }
.card-stock .disclaimer-mini {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Detail page pick panels */
.detail-picks {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.detail-pick {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.detail-pick-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.detail-pick-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--panel-3);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.detail-pick-ticker {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.detail-pick-rationale {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  margin: 0 0 8px;
}
.detail-pick-risks {
  font-size: 13px;
  color: var(--text-2);
  margin: 0;
  line-height: 1.4;
}

/* ── Weather card ───────────────────────────────────── */
.card-weather .temp-primary {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}
.card-weather .high {
  font-size: 36px;
  font-weight: 600;
  color: var(--warm);
  letter-spacing: -0.02em;
}
.card-weather .high-c {
  font-size: 18px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 6px;
}
.card-weather .low-row {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.card-weather .low-row .arrow { color: var(--accent); }
.card-weather .summary { font-size: 13px; color: var(--text); line-height: 1.4; }

/* ── Gas card ───────────────────────────────────────── */
.card-gas .gas-prices {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.card-gas .gas-prices li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
}
.card-gas .gas-prices .name { color: var(--muted); font-size: 12px; }
.card-gas .gas-prices .price { font-weight: 600; font-size: 18px; color: var(--text); }

/* ── News card ──────────────────────────────────────── */
.card-news .news-summary {
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.5;
  margin: 4px 0;
}
.sources-btn {
  background: var(--panel-2);
  border: 1px solid var(--border-strong);
  color: var(--text-2);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}
.sources-btn:hover { background: var(--panel-3); color: var(--text); border-color: var(--accent); }
.sources-count {
  background: var(--accent);
  color: white;
  border-radius: 999px;
  padding: 0 6px;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  text-align: center;
}

/* ── Sources modal ──────────────────────────────────── */
.sources-modal {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0;
  max-width: 540px;
  width: calc(100% - 32px);
  max-height: 80vh;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
.sources-modal::backdrop {
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.sources-modal[open] {
  display: flex;
  flex-direction: column;
  animation: modal-pop 0.18s ease-out;
}
@keyframes modal-pop {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.sources-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.sources-modal-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sources-modal-head .icon { background: var(--panel-3); }
.modal-close {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.modal-close:hover { background: var(--panel-2); color: var(--text); }
.sources-list {
  list-style: none;
  padding: 8px 0;
  margin: 0;
  overflow-y: auto;
  flex: 1;
}
.sources-list li {
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
}
.sources-list li:last-child { border-bottom: 0; }
.sources-list a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 13.5px;
  line-height: 1.4;
  display: block;
  transition: color 0.15s ease;
}
.sources-list a:hover { color: var(--accent); }
.sources-list .source-meta {
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}

/* ── Footer ─────────────────────────────────────────── */
.footer {
  padding: 18px 28px 32px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

.refresh-status {
  background: rgba(10,132,255,0.10);
  color: var(--accent);
  padding: 10px 28px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  text-align: center;
  font-weight: 500;
}

/* ── Detail pages ───────────────────────────────────── */
.detail {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 28px 60px;
}
.detail-head { margin-bottom: 20px; }
.detail-back {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
}
.detail-back:hover { color: var(--text); }
.detail h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.detail .subtitle {
  color: var(--muted);
  font-size: 14px;
}
.detail-section {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-top: 16px;
}
.detail-section h2 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-2);
}
.kv {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 8px 24px;
  font-size: 14px;
}
.kv dt { color: var(--muted); font-weight: 400; }
.kv dd { margin: 0; color: var(--text); font-variant-numeric: tabular-nums; }

.stock-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.stock-table th, .stock-table td {
  text-align: right;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.stock-table th { color: var(--muted); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.stock-table td:first-child, .stock-table th:first-child { text-align: left; }
.stock-table tr:last-child td { border-bottom: 0; }
.stock-table .ticker-cell { font-weight: 700; color: var(--text); }
.stock-table .up { color: var(--green); }
.stock-table .down { color: var(--red); }

.full-news {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.full-news li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.full-news li:last-child { border-bottom: 0; }
.full-news a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
}
.full-news a:hover { color: var(--accent); }
.full-news .meta {
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
  letter-spacing: 0.02em;
}
.full-news .summary { color: var(--text-2); font-size: 13px; margin-top: 6px; line-height: 1.45; }

/* ── Login page ─────────────────────────────────────── */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(1200px 600px at 80% -200px, rgba(10,132,255,0.12), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(94,92,230,0.10), transparent 50%),
    var(--bg);
}
.login-shell {
  width: 100%;
  max-width: 380px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.login-card {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  padding: 36px 32px 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.login-brand h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.login-mark {
  color: var(--accent);
  font-size: 22px;
}
.login-subtitle {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--muted);
}
.login-error {
  background: rgba(255,69,58,0.10);
  border: 1px solid rgba(255,69,58,0.25);
  color: var(--red);
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 16px;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.login-field > span {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.login-field > input {
  background: var(--panel-2);
  border: 1.5px solid var(--border-strong);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.login-field > input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--panel-3);
}
.login-submit {
  margin-top: 6px;
  background: var(--accent);
  border: none;
  color: white;
  padding: 13px 18px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}
.login-submit:hover { filter: brightness(1.1); }
.login-submit:active { transform: scale(0.98); }
.login-footer {
  margin-top: 18px;
  color: var(--muted);
  font-size: 11px;
}

/* ── Weather detail page ────────────────────────────── */
.weather-now { padding-bottom: 18px; }
.weather-now-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.weather-icon { width: 88px; height: 88px; flex-shrink: 0; }
.big-temp {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 44px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}
.big-temp-c { font-size: 22px; font-weight: 400; color: var(--muted); }
.condition-text {
  font-size: 14px;
  color: var(--text);
  text-transform: capitalize;
  margin-top: 4px;
}
.weather-kv {
  grid-template-columns: 110px 1fr;
  font-size: 13px;
}

.hourly-grid {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.hourly-block {
  flex: 0 0 auto;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  min-width: 72px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.hourly-time { font-size: 11px; color: var(--muted); }
.hourly-icon { width: 36px; height: 36px; margin: 2px auto; display: block; }
.hourly-temp { font-size: 16px; font-weight: 600; }
.hourly-pop { font-size: 11px; color: var(--accent); min-height: 14px; }

/* ── Settings page ──────────────────────────────────── */
.saved-banner {
  background: rgba(48,209,88,0.10);
  color: var(--green);
  border: 1px solid rgba(48,209,88,0.25);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  margin-bottom: 16px;
}
.topic-form { display: flex; flex-direction: column; gap: 4px; }
.topic-row-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.topic-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease;
  flex: 1;
}
.topic-row:hover { background: var(--panel-2); }
.custom-pill {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  margin-left: 6px;
  border-radius: 999px;
  background: rgba(94,92,230,0.15);
  color: var(--accent-2);
  vertical-align: middle;
}
.remove-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.remove-btn:hover { background: rgba(255,69,58,0.15); color: var(--red); border-color: var(--red); }
.error-banner {
  background: rgba(255,69,58,0.10);
  color: var(--red);
  border: 1px solid rgba(255,69,58,0.25);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  margin-bottom: 16px;
}
.add-topic-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Gas history chart */
.gas-chart-wrap { display: flex; flex-direction: column; gap: 14px; }
.gas-chart { width: 100%; height: auto; max-height: 220px; }
.gas-chart-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 6px 18px;
  font-size: 13px;
}
.legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}
.legend-swatch {
  width: 12px; height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}
.legend-name { color: var(--text-2); flex: 1; }
.legend-latest { color: var(--text); font-weight: 600; }
.legend-change { font-size: 12px; min-width: 50px; text-align: right; }
.legend-change.up { color: var(--red); }    /* gas price up = bad */
.legend-change.down { color: var(--green); } /* gas price down = good */
.topic-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--border-strong);
  background: var(--panel-2);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.topic-row input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.topic-row input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 5px; top: 1px;
  width: 5px; height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.topic-row .icon { background: var(--panel-3); }
.topic-meta { display: flex; flex-direction: column; gap: 2px; }
.topic-name { font-size: 14px; font-weight: 600; }
.topic-desc { font-size: 12px; color: var(--muted); }
.form-actions { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.primary-btn {
  background: var(--accent);
  border: none;
  color: white;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}
.primary-btn:hover { filter: brightness(1.1); }
.primary-btn:active { transform: scale(0.97); }

/* ── Logs table (existing) ──────────────────────────── */
.logs-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}
.logs-table th, .logs-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.logs-table th {
  background: var(--panel-2);
  color: var(--muted);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.06em;
  font-weight: 500;
}
.logs-table tr:last-child td { border-bottom: 0; }
.log-ok td:nth-child(3) { color: var(--green); }
.log-error td:nth-child(3) { color: var(--red); }
.log-unavailable td:nth-child(3) { color: var(--warm); }
