@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700&family=Barlow:wght@400;500;600&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --bg: #0c0d0a;
  --bg-alt: #111209;
  --surface: #15160f;
  --surface-2: #1b1c13;
  --border: #2a2b1f;
  --border-strong: #3d3e2b;
  --text: #f3f1e7;
  --text-dim: #a8a692;
  --text-faint: #6f6d5c;
  --amber: #f5a524;
  --amber-dim: #c98a1c;
  --green: #5ec26a;
  --red: #e0563f;
  --blue: #2a78d6;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Barlow', system-ui, sans-serif;
}

body {
  background-image:
    linear-gradient(var(--bg-alt) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-alt) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: -1px -1px;
  min-height: 100vh;
}

.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* Hazard stripe accent, used sparingly as a signature detail */
.hazard {
  background: repeating-linear-gradient(
    135deg,
    var(--amber) 0px, var(--amber) 10px,
    #191a10 10px, #191a10 20px
  );
}

/* ---------- Topbar ---------- */

.topbar {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 28px;
  height: 64px;
  border-bottom: 1px solid var(--border);
  background: rgba(12, 13, 10, 0.9);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  width: 20px;
  height: 20px;
  border-radius: 3px;
  flex-shrink: 0;
}

.brand-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tabs {
  display: flex;
  gap: 4px;
  flex: 1;
}

.tab {
  appearance: none;
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 22px 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.tab:hover { color: var(--text); }
.tab.active { color: var(--amber); border-bottom-color: var(--amber); }

.status-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 6px 12px 6px 10px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-faint);
}

.dot.online { background: var(--green); box-shadow: 0 0 0 0 rgba(94, 194, 106, 0.6); animation: pulse 2s infinite; }
.dot.offline { background: var(--red); }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(94, 194, 106, 0.55); }
  70% { box-shadow: 0 0 0 6px rgba(94, 194, 106, 0); }
  100% { box-shadow: 0 0 0 0 rgba(94, 194, 106, 0); }
}

/* ---------- Layout ---------- */

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 28px 80px;
}

.view { display: none; animation: rise 0.35s ease both; }
.view.active { display: block; }

@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 34px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0 0 4px;
}

.page-sub {
  color: var(--text-dim);
  font-size: 14px;
  margin: 0 0 32px;
}

.page-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

/* ---------- Modal ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 7, 4, 0.72);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.modal-overlay.show { opacity: 1; pointer-events: auto; }

.modal-panel {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  width: min(520px, calc(100vw - 48px));
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  padding: 26px 28px;
  transform: translateY(10px) scale(0.98);
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.modal-overlay.show .modal-panel { transform: translateY(0) scale(1); }
.modal-panel input { width: 100%; }
.modal-panel-wide { width: min(680px, calc(100vw - 48px)); }

/* ---------- Day detail drilldown ---------- */

.day-timeline-wrap { border-top: 1px solid var(--border); padding-top: 16px; }

.day-timeline-svg {
  display: block;
  width: 100%;
  height: 80px;
  background: var(--bg-alt);
  border-radius: 6px;
  overflow: visible;
}

.day-timeline-seg.normal { fill: var(--blue); }
.day-timeline-seg.overtime { fill: var(--amber); }

.day-timeline-hours {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-faint);
}

.day-detail-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 8px;
  max-height: 280px;
  overflow-y: auto;
}

.day-detail-item {
  display: flex;
  gap: 10px;
  font-size: 12.5px;
  align-items: baseline;
}

.day-detail-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-faint);
  width: 52px;
  flex-shrink: 0;
}

.day-detail-item.commit .day-detail-time { color: var(--red); }
.day-detail-item.overtime .day-detail-time { color: var(--amber); }

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.modal-close {
  appearance: none;
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}
.modal-close:hover { color: var(--text); }

/* ---------- Cards ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 24px;
  position: relative;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02) inset, 0 8px 24px rgba(0, 0, 0, 0.18);
}

.card-bar { height: 3px; }

.card-body { padding: 22px 24px; }

.card-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0 0 4px;
}

.card-desc { color: var(--text-dim); font-size: 13.5px; margin: 0; line-height: 1.5; }

/* Connect card */

#connect-card .card-body { display: flex; flex-direction: column; gap: 14px; }

.token-row {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.google-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 40px;
  border: 1px solid var(--border-strong);
  background: #f3f1e7;
  color: #14150c;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
.google-btn:hover { background: #ffffff; box-shadow: 0 0 0 3px rgba(243, 241, 231, 0.15); }
.google-btn:active { transform: scale(0.98); }

.divider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-dim);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.divider-row::before, .divider-row::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-strong);
}

input[type="password"], input[type="text"], input[type="date"], input[type="number"], select {
  flex: 1;
  background: var(--bg-alt);
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  padding: 11px 13px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
select { cursor: pointer; }
input[type="password"]:focus, input[type="text"]:focus, input[type="date"]:focus, input[type="number"]:focus, select:focus {
  box-shadow: 0 0 0 3px rgba(245, 165, 36, 0.12);
}

input:focus { border-color: var(--amber); }

button.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  border: 1px solid var(--amber);
  background: transparent;
  color: var(--amber);
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

button.btn:hover {
  background: var(--amber);
  color: #14150c;
  box-shadow: 0 0 0 3px rgba(245, 165, 36, 0.15);
}
button.btn:active { transform: scale(0.97); }
button.btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
button.btn:disabled {
  opacity: 0.35;
  cursor: default;
  background: none;
  color: var(--amber);
  box-shadow: none;
  transform: none;
}

button.btn.ghost { border-color: var(--border-strong); color: var(--text-dim); }
button.btn.ghost:hover {
  background: var(--surface-2);
  color: var(--text);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04);
}

.field-error { color: var(--red); font-size: 12.5px; display: none; }

/* Setup steps */

.steps { list-style: none; margin: 0; padding: 0; }

.steps li {
  display: flex;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  align-items: baseline;
}

.steps li:first-child { border-top: none; }

.step-no {
  font-family: 'JetBrains Mono', monospace;
  color: var(--amber);
  font-size: 12px;
  min-width: 20px;
}

.step-text { font-size: 14px; color: var(--text-dim); }
.step-text code {
  font-family: 'JetBrains Mono', monospace;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 6px;
  color: var(--amber);
  font-size: 12.5px;
}

/* ---------- Project grid ---------- */

.section-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 36px 0 14px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.project-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
}

.project-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.project-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 19px;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.project-meta { font-size: 11.5px; color: var(--text-faint); margin-top: 2px; }

.figures { display: flex; gap: 22px; }

.figure-label {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 3px;
}

.figure-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.figure-value.overtime.zero { color: var(--green); }
.figure-value.overtime.active { color: var(--amber); }

.commit-line {
  font-size: 12px;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
  padding-top: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.commit-line .hash { color: var(--text-faint); }

.project-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.last-sent { font-size: 11px; color: var(--text-faint); }

.btn-sm {
  padding: 0 14px;
  height: 30px;
  font-size: 12px;
}

.empty-state {
  color: var(--text-faint);
  font-size: 13.5px;
  padding: 30px 0;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
}

/* ---------- Project card: charts, map, activity ---------- */

.card-sub-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 2px 0 8px;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-dim);
}

.legend-swatch { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }

.trend-chart-wrap { border-top: 1px solid var(--border); padding-top: 14px; }
.trend-chart { display: block; width: 100%; height: 64px; overflow: visible; }
.trend-bar-normal { fill: var(--blue); }
.trend-bar-overtime { fill: var(--amber); }
.trend-bar-normal, .trend-bar-overtime { cursor: pointer; transition: opacity 0.1s ease; }
.trend-bar-hitbox:hover ~ .trend-bar-normal,
.trend-bar-group:hover .trend-bar-normal,
.trend-bar-group:hover .trend-bar-overtime { opacity: 0.75; }

.heatmap-wrap { border-top: 1px solid var(--border); padding-top: 14px; }
.heatmap-grid { display: flex; gap: 3px; }
.heatmap-week { display: flex; flex-direction: column; gap: 3px; }
.heatmap-cell {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--border);
  cursor: pointer;
}
.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 10.5px;
  color: var(--text-faint);
}
.heatmap-legend .heatmap-cell { cursor: default; }

.lang-map-wrap { border-top: 1px solid var(--border); padding-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.lang-map-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.lang-map-name { width: 78px; flex-shrink: 0; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lang-map-track { flex: 1; height: 8px; background: var(--bg-alt); border-radius: 4px; overflow: hidden; }
.lang-map-fill { height: 100%; border-radius: 4px; }
.lang-map-value { width: 44px; text-align: right; color: var(--text-faint); font-size: 11px; }

.activity-wrap { border-top: 1px solid var(--border); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }

.activity-view-all {
  appearance: none;
  background: none;
  border: none;
  color: var(--amber);
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: left;
  padding: 2px 0 0;
  cursor: pointer;
}
.activity-view-all:hover { text-decoration: underline; }
.activity-item { display: flex; gap: 9px; font-size: 12px; }
.activity-icon {
  width: 16px; height: 16px; border-radius: 4px; flex-shrink: 0; margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700;
}
.activity-icon.commit { background: rgba(42, 120, 214, 0.18); color: var(--blue); }
.activity-icon.report { background: rgba(245, 165, 36, 0.18); color: var(--amber); }
.activity-text { color: var(--text-dim); line-height: 1.4; }
.activity-text .hash, .activity-meta { color: var(--text-faint); font-size: 11px; }

#chart-tooltip {
  position: fixed;
  pointer-events: none;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  padding: 7px 10px;
  font-size: 11.5px;
  color: var(--text);
  line-height: 1.5;
  opacity: 0;
  transform: translate(-50%, -100%);
  transition: opacity 0.1s ease;
  z-index: 300;
  max-width: 260px;
  white-space: normal;
}
#chart-tooltip.show { opacity: 1; }
#chart-tooltip .tt-title { color: var(--text-faint); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- Table (Projects tab) ---------- */

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

th {
  text-align: left;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--text-faint);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-strong);
}

td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  white-space: nowrap;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255, 255, 255, 0.015); }

.recipients-list {
  color: var(--text-dim);
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

/* ---------- Profile / keys ---------- */

#keys-table td { font-size: 13px; }
.key-prefix { font-family: 'JetBrains Mono', monospace; color: var(--text-dim); }
.key-revoke { color: var(--red); background: none; border: none; cursor: pointer; font-size: 12px; padding: 4px 8px; }
.key-revoke:hover { text-decoration: underline; }
.key-revoke:disabled { color: var(--text-faint); cursor: default; text-decoration: none; }

/* ---------- Chart empty state ---------- */

.chart-empty {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 12px;
  border: 1px dashed var(--border-strong);
  border-radius: 6px;
}

/* ---------- Settings ---------- */

.kv { display: flex; flex-direction: column; gap: 12px; }
.kv-row { display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--border); }
.kv-row:first-child { border-top: none; }
.kv-key { color: var(--text-faint); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.06em; }
.kv-val { font-family: 'JetBrains Mono', monospace; font-size: 13px; }

/* ---------- Analytics ---------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-tile {
  position: relative;
  overflow: hidden;
  background: linear-gradient(155deg, var(--surface) 0%, var(--surface) 55%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.stat-tile:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.3);
}
.stat-tile::after {
  content: '';
  position: absolute;
  top: -34px;
  right: -34px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--tile-accent, var(--amber));
  opacity: 0.12;
  filter: blur(2px);
  pointer-events: none;
}
.stat-tile.amber { --tile-accent: var(--amber); }
.stat-tile.violet { --tile-accent: #7d6ae8; }
.stat-tile.blue { --tile-accent: var(--blue); }
.stat-tile.green { --tile-accent: var(--green); }

.stat-tile-icon {
  position: relative;
  width: 20px;
  height: 20px;
  color: var(--tile-accent, var(--amber));
  margin-bottom: 12px;
}
.stat-tile-icon svg { width: 100%; height: 100%; }

.stat-tile-label {
  position: relative;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-faint);
  margin-bottom: 6px;
}

.stat-tile-value {
  position: relative;
  font-family: 'JetBrains Mono', monospace;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.stat-tile-value .unit { font-size: 13px; font-weight: 500; color: var(--text-faint); margin-left: 4px; }

.analytics-chart-card { margin-bottom: 20px; }

.churn-chart, .hour-chart { display: block; width: 100%; height: 120px; }
.churn-bar-ins { fill: var(--green); }
.churn-bar-del { fill: var(--red); }
.hour-bar { fill: var(--blue); cursor: pointer; }
.hour-bar:hover { fill: var(--amber); }

.hour-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-faint);
}

/* ---------- Goals / commitments ---------- */

.goal-form {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.goal-form input[type="text"] { flex: 3; }
.goal-form input[type="date"] { flex: 1; min-width: 140px; }

.goal-list { display: flex; flex-direction: column; gap: 2px; }

.goal-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  border-top: 1px solid var(--border);
}
.goal-item:first-child { border-top: none; }

.goal-check {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  font-size: 12px;
}
.goal-check.done { background: rgba(94, 194, 106, 0.15); border-color: var(--green); }

.goal-title { flex: 1; font-size: 13.5px; }
.goal-item.done .goal-title { color: var(--text-faint); text-decoration: line-through; }

.goal-due {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 10px;
  white-space: nowrap;
}
.goal-due.upcoming { color: var(--text-dim); background: var(--bg-alt); }
.goal-due.overdue { color: var(--red); background: rgba(224, 86, 63, 0.12); }
.goal-due.done { color: var(--green); background: rgba(94, 194, 106, 0.1); }

.goal-delete {
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 2px 4px;
}
.goal-delete:hover { color: var(--red); }

/* ---------- Toast ---------- */

#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 13px;
  padding: 12px 20px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
}

#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.error { border-color: var(--red); }
#toast.success { border-color: var(--green); }

::selection { background: var(--amber); color: #14150c; }
