/* ==========================================================================
   DevDash Command Center — Material 3 glassmorphism
   Palette mirrors the Android app: indigo primary, emerald positive,
   amber warning, rose negative, on a very light blue ground.
   ========================================================================== */

:root {
  --primary: #5b6cff;
  --primary-dim: #7c89ff;
  --positive: #10b981;
  --warning: #f59e0b;
  --negative: #ef4444;
  --accent-pink: #e1306c;

  --bg: #eef2fb;
  --bg-glow-a: rgba(91, 108, 255, 0.22);
  --bg-glow-b: rgba(225, 48, 108, 0.14);

  --surface: rgba(255, 255, 255, 0.62);
  --surface-strong: rgba(255, 255, 255, 0.82);
  --border: rgba(255, 255, 255, 0.75);
  --border-soft: rgba(20, 24, 60, 0.08);

  --text: #10142c;
  --text-dim: #5a6180;
  --text-faint: #868ca6;

  --radius-lg: 22px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(20, 24, 60, 0.10);
  --shadow-lg: 0 20px 60px rgba(20, 24, 60, 0.16);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #080b1a;
    --bg-glow-a: rgba(91, 108, 255, 0.30);
    --bg-glow-b: rgba(225, 48, 108, 0.18);

    --surface: rgba(255, 255, 255, 0.055);
    --surface-strong: rgba(255, 255, 255, 0.10);
    --border: rgba(255, 255, 255, 0.12);
    --border-soft: rgba(255, 255, 255, 0.08);

    --text: #eef1ff;
    --text-dim: #a3aacb;
    --text-faint: #767d9e;

    --shadow: 0 8px 32px rgba(0, 0, 0, 0.40);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.55);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Ambient light behind the glass — this is what makes the blur read as glass. */
body::before {
  content: '';
  position: fixed;
  inset: -20%;
  z-index: -1;
  background:
    radial-gradient(45% 40% at 15% 12%, var(--bg-glow-a), transparent 70%),
    radial-gradient(40% 38% at 88% 78%, var(--bg-glow-b), transparent 70%),
    radial-gradient(35% 30% at 70% 8%, rgba(16, 185, 129, 0.14), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}

.glass {
  background: var(--surface);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* ---------------- auth gate ---------------- */

.gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.gate-card {
  width: min(420px, 100%);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.gate-mark, .mark {
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent-pink));
  letter-spacing: 0.5px;
}

.gate-mark {
  width: 64px; height: 64px;
  margin: 0 auto 20px;
  border-radius: 20px;
  font-size: 22px;
  box-shadow: 0 10px 30px rgba(91, 108, 255, 0.4);
}

.gate h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.5px; }
.gate-sub { color: var(--text-dim); margin: 6px 0 28px; font-size: 15px; }

.gate-msg {
  margin-top: 18px;
  font-size: 14px;
  font-weight: 600;
  min-height: 20px;
  color: var(--negative);
}
.gate-msg.ok { color: var(--positive); }

.gate-foot { margin-top: 22px; font-size: 12px; color: var(--text-faint); }

/* ---------------- buttons ---------------- */

.btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dim));
  color: #fff;
  box-shadow: 0 6px 20px rgba(91, 108, 255, 0.35);
}
.btn-primary:hover:not(:disabled) { box-shadow: 0 10px 28px rgba(91, 108, 255, 0.45); }

.btn-lg { width: 100%; justify-content: center; padding: 14px 20px; font-size: 15px; }

.btn-ghost {
  background: var(--surface-strong);
  color: var(--text);
  border-color: var(--border-soft);
}
.btn-ghost:hover { background: var(--surface); }

.btn-mini {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface-strong);
  border-color: var(--border-soft);
  color: var(--text-dim);
}
.btn-mini:hover { color: var(--text); }
.btn-mini.danger:hover { color: var(--negative); border-color: var(--negative); }

/* ---------------- chrome ---------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 22px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  border-top: none;
  flex-wrap: wrap;
}

.topbar-left { display: flex; align-items: center; gap: 12px; }
.mark { width: 40px; height: 40px; border-radius: 13px; font-size: 15px; }
.topbar-title { font-weight: 800; font-size: 17px; letter-spacing: -0.3px; }
.topbar-sub { font-size: 12px; color: var(--text-dim); }
.topbar-right { display: flex; align-items: center; gap: 8px; }

.pill {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.16);
  color: var(--positive);
}

.tabs {
  display: flex;
  gap: 6px;
  padding: 18px 22px 0;
  max-width: 1240px;
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.tab:hover { color: var(--text); }
.tab.active {
  color: var(--primary);
  background: var(--surface-strong);
  border-color: var(--border);
  box-shadow: var(--shadow);
}

.panel { display: none; max-width: 1240px; margin: 0 auto; padding: 18px 22px 40px; }
.panel.active { display: block; animation: rise 0.3s ease; }

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

/* ---------------- cards ---------------- */

.card {
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin-bottom: 16px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.card-head h2 { font-size: 16px; font-weight: 700; letter-spacing: -0.2px; }

.hint { font-size: 12px; color: var(--text-faint); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

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

.stat {
  border-radius: var(--radius);
  padding: 16px 18px;
  background: var(--surface);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.stat-value { font-size: 24px; font-weight: 800; letter-spacing: -0.6px; }
.stat-label { font-size: 12px; color: var(--text-dim); margin-top: 3px; }
.stat-value.pos { color: var(--positive); }
.stat-value.neg { color: var(--negative); }
.stat-value.warn { color: var(--warning); }

/* ---------------- lists ---------------- */

.item-list { display: flex; flex-direction: column; gap: 10px; }

.item {
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  background: var(--surface-strong);
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.item-main { flex: 1; min-width: 0; }
.item-title { font-weight: 600; font-size: 14px; line-height: 1.4; word-break: break-word; }
.item-notes {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.item-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }

.tag {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 7px;
  background: rgba(91, 108, 255, 0.14);
  color: var(--primary);
  white-space: nowrap;
}
.tag.pos { background: rgba(16, 185, 129, 0.15); color: var(--positive); }
.tag.warn { background: rgba(245, 158, 11, 0.16); color: var(--warning); }
.tag.neg { background: rgba(239, 68, 68, 0.15); color: var(--negative); }
.tag.muted { background: rgba(134, 140, 166, 0.16); color: var(--text-dim); }

.empty {
  text-align: center;
  color: var(--text-faint);
  font-size: 14px;
  padding: 30px 16px;
}

/* ---------------- forms ---------------- */

.form-row { margin-bottom: 10px; }
.form-row-inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.form-row-inline .input { flex: 1; min-width: 130px; }

.input {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--surface-strong);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  resize: vertical;
}
.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(91, 108, 255, 0.16);
}
.input::placeholder { color: var(--text-faint); }
.input-sm { max-width: 90px; flex: 0 0 auto !important; min-width: 70px !important; }
.mono { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 13px; line-height: 1.6; }

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  margin: 16px 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.prompt-help {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 4px;
}

.filters { display: flex; gap: 6px; flex-wrap: wrap; }

.chip {
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
}
.chip.active { background: rgba(91, 108, 255, 0.15); color: var(--primary); border-color: transparent; }

select.input {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path fill='%235a6180' d='M2 4l4 4 4-4z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* ---------------- table ---------------- */

.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 520px; }
th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-faint);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
}
td { padding: 10px 12px; border-bottom: 1px solid var(--border-soft); }
tr:last-child td { border-bottom: none; }
td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.num.pos { color: var(--positive); font-weight: 600; }
td.num.neg { color: var(--negative); font-weight: 600; }

/* ---------------- misc ---------------- */

.foot {
  text-align: center;
  font-size: 12px;
  color: var(--text-faint);
  padding: 20px 22px 40px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 140%);
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2);
  z-index: 100;
  max-width: min(90vw, 460px);
  text-align: center;
}
.toast.show { transform: translate(-50%, 0); }

.skeleton {
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(90deg, var(--surface-strong) 25%, var(--surface) 50%, var(--surface-strong) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  margin-bottom: 10px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------------- banners & read-only affordance ---------------- */

.banner {
  max-width: 1240px;
  margin: 14px auto 0;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: var(--text);
  font-size: 13px;
  line-height: 1.6;
}
.banner code { font-size: 12px; }

.linkbtn {
  font: inherit;
  color: var(--primary);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  font-weight: 600;
}

.readonly-note {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px dashed var(--border-soft);
  border-radius: var(--radius);
  padding: 11px 16px;
  margin-bottom: 16px;
}
.readonly-note .lock { font-size: 14px; }

.warn-note {
  margin-top: 12px;
  font-size: 13px;
  color: var(--warning);
  line-height: 1.6;
}

.stat-sub { font-size: 11px; color: var(--text-faint); margin-top: 2px; }
.stat-grid.tight { gap: 10px; margin-bottom: 0; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
.stat-grid.tight .stat { padding: 12px 14px; }
.stat-grid.tight .stat-value { font-size: 18px; }

.dim { color: var(--text-faint); }

/* ---------------- charts ---------------- */

.chart { margin-bottom: 4px; }
.chart-inner { position: relative; width: 100%; }
.chart-svg { width: 100%; height: 100%; display: block; }

.chart-max {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-faint);
  background: var(--surface-strong);
  padding: 2px 7px;
  border-radius: 6px;
}

.chart-labels {
  position: relative;
  height: 16px;
  margin-top: 6px;
}
.chart-labels span {
  position: absolute;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--text-faint);
  white-space: nowrap;
}

.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; }
.lg { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-dim); font-weight: 600; }
.lg i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.bd { margin-bottom: 12px; }
.bd-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 5px; }
.bd-label { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-value { font-size: 13px; font-weight: 700; color: var(--text-dim); white-space: nowrap; }
.bd-track { height: 6px; border-radius: 999px; background: var(--border-soft); overflow: hidden; }
.bd-fill { height: 100%; border-radius: 999px; }

/* ---------------- toolbar & segmented control ---------------- */

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.input-inline { width: auto; min-width: 150px; padding: 7px 12px; font-size: 13px; }

.seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--border-soft);
}
.seg-btn {
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  white-space: nowrap;
}
.seg-btn.active { background: var(--primary); color: #fff; }

.seg-sm .seg-btn { padding: 5px 11px; font-size: 12px; }

/* ---------------- dev journey counter ---------------- */

.journey { margin-bottom: 16px; }

.journey-head { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.journey-flame { font-size: 20px; line-height: 1; }
.journey-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-dim);
}
.journey-sub { font-size: 12px; color: var(--text-faint); margin-top: 1px; }

.journey-units {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4px;
}
.ju { display: flex; flex-direction: column; align-items: center; flex: 1; }
.ju-val {
  font-size: clamp(20px, 5vw, 30px);
  font-weight: 800;
  line-height: 1.05;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}
.ju-lbl {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--text-faint);
  margin-top: 3px;
}
.ju-sep {
  font-size: clamp(18px, 4vw, 26px);
  color: var(--border-soft);
  line-height: 1.1;
}

.mini-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.ms {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--surface-strong);
  border: 1px solid var(--border-soft);
  padding: 5px 12px;
  border-radius: 999px;
}
.ms.pos { color: var(--positive); }
.ms.warn { color: var(--warning); }
.ms.neg { color: var(--negative); }
.ms.dim { color: var(--text-faint); }

/* ---------------- kanban ---------------- */

.kanban {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(290px, 1fr);
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 12px;
  align-items: start;
}

.col {
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 14px;
  min-width: 0;
}

.col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 2px solid var(--accent, var(--primary));
}
.col-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--accent, var(--primary));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.col-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  background: var(--surface-strong);
  border-radius: 999px;
  padding: 2px 9px;
  flex: 0 0 auto;
}

.col-body { display: flex; flex-direction: column; gap: 10px; min-height: 60px; border-radius: var(--radius); transition: background 0.15s ease; }
.col-body.over { background: rgba(91, 108, 255, 0.10); outline: 2px dashed var(--primary); outline-offset: 4px; }
.col-empty { font-size: 12px; color: var(--text-faint); text-align: center; padding: 18px 8px; }

.tcard {
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  background: var(--surface-strong);
  padding: 12px 14px;
  cursor: grab;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.tcard:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.tcard.dragging { opacity: 0.45; cursor: grabbing; }

.tcard.selected { outline: 2px solid var(--primary); outline-offset: -1px; }

.tcard-head { display: flex; align-items: flex-start; gap: 9px; }
.tcard-check {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin-top: 2px;
  accent-color: var(--primary);
  cursor: pointer;
}

.tcard-title { font-size: 14px; font-weight: 600; line-height: 1.4; word-break: break-word; }
.tcard-title.done { text-decoration: line-through; color: var(--text-faint); }
.tcard-notes {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 5.5em;
  overflow: hidden;
}
.tcard-actions { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 10px; }
.tcard-actions .btn-mini { font-size: 11px; padding: 4px 9px; }

/* ---------------- bulk selection bar ---------------- */

.selection-bar {
  position: sticky;
  bottom: 18px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 12px 18px;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
}

.selection-count { font-size: 14px; font-weight: 700; }
.selection-actions { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 620px) {
  .selection-bar { border-radius: var(--radius); }
  .selection-actions { width: 100%; }
  .selection-actions .btn { flex: 1; justify-content: center; }
}

/* ---------------- feedback inbox ---------------- */

.inbox { display: flex; flex-direction: column; gap: 8px; }

.msg {
  display: flex;
  gap: 0;
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  background: var(--surface-strong);
  overflow: hidden;
  transition: transform 0.12s ease;
}
.msg:hover { transform: translateX(2px); }
.msg.unread { border-color: rgba(91, 108, 255, 0.4); }

.msg-rail { width: 4px; flex: 0 0 4px; }
.msg-body { flex: 1; min-width: 0; padding: 13px 16px; }

.msg-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 5px; }
.msg-from { font-size: 13px; font-weight: 700; }
.msg.unread .msg-from::before {
  content: '';
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--primary);
  margin-right: 7px;
  vertical-align: middle;
}
.msg-date { font-size: 12px; color: var(--text-faint); white-space: nowrap; }
.msg-text { font-size: 13px; line-height: 1.6; color: var(--text-dim); word-break: break-word; }
.msg .tag-row { margin-top: 8px; }

/* ---------------- diagnostics ---------------- */

.kv { display: flex; flex-direction: column; gap: 2px; }
.kv-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-soft);
}
.kv-row:last-child { border-bottom: none; }
.kv-k { font-size: 13px; color: var(--text-dim); flex: 0 0 auto; }
.kv-v { font-size: 13px; font-weight: 600; text-align: right; word-break: break-all; }
.kv-v.mono, td.mono, .mono-inline {
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-size: 12px;
}

tr.row-active { background: rgba(91, 108, 255, 0.10); }

code {
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-size: 0.92em;
  background: var(--surface-strong);
  padding: 1px 6px;
  border-radius: 5px;
}

@media (max-width: 820px) {
  .grid-2 { grid-template-columns: 1fr; }
  .topbar { padding: 10px 14px; }
  .tabs, .panel { padding-left: 14px; padding-right: 14px; }
  .card { padding: 16px; }
  .kanban { grid-auto-columns: minmax(80vw, 1fr); }
  .toolbar { width: 100%; }
  .input-inline { flex: 1; min-width: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------------- period metrics (Earnings by period) ---------------- */

.period-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.pm {
  position: relative;
  border-radius: var(--radius);
  padding: 14px 15px;
  background: var(--surface-strong);
  border: 1px solid var(--border-soft);
  overflow: hidden;
}
/* Faint top highlight so each tile reads as its own pane of glass. */
.pm::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.pm-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-dim);
}
.pm-value {
  font-size: clamp(18px, 3.2vw, 23px);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-top: 5px;
  font-variant-numeric: tabular-nums;
}
.pm-delta {
  display: inline-block;
  margin-top: 5px;
  font-size: 11px;
  font-weight: 700;
}
.pm-delta.pos { color: var(--positive); }
.pm-delta.neg { color: var(--negative); }
.pm-delta.muted { color: var(--text-faint); font-weight: 600; }

.pm-split {
  display: flex;
  gap: 12px;
  margin-top: 9px;
  font-size: 11px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}
.pm-split .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 5px;
}

.pm-range {
  margin-top: 7px;
  font-size: 10px;
  color: var(--text-faint);
}

/* ---------------- crashlytics sandbox ---------------- */

.crash-status { margin-top: 12px; }

.crash-msg {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13px;
  line-height: 1.6;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: var(--surface-strong);
}
.crash-msg.ok { border-color: rgba(16, 185, 129, 0.4); color: var(--positive); }
.crash-msg.error { border-color: rgba(239, 68, 68, 0.4); color: var(--negative); }
.crash-msg.loading { border-color: rgba(91, 108, 255, 0.4); color: var(--primary); }
.crash-msg.idle { color: var(--text-dim); }
