/* ============================================================
   Zapid Tracker — design system
   Brand: Zapid blue #006BD5 · neutral grey surfaces · flat elevation
   ============================================================ */

:root {
  --primary: #006BD5;
  --primary-bright: #3B8FE4;
  --primary-deep: #0056AC;
  --primary-soft: #EAF3FC;
  --amber: #F59E0B;
  --amber-soft: #FEF3E2;
  --success: #16A34A;
  --success-soft: #EAF7EF;
  --error: #DC2626;
  --error-soft: #FDEDED;

  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --border: #E5E7EB;
  --border-strong: #D1D5DB;
  --text: #111827;
  --text-2: #6B7280;
  --text-3: #9CA3AF;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-lift: 0 6px 16px rgba(16, 24, 40, .10);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, "Courier New", monospace;

  --sidebar-w: 232px;
  --topbar-h: 54px;
  --bottomnav-h: 60px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
}
h1, h2, h3, h4 { margin: 0; font-weight: 700; }
p { margin: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14.5px; color: var(--text); }

/* ---------- boot splash ---------- */
.boot-splash {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
}
.boot-logo {
  width: 56px; height: 56px; border-radius: 14px; background: var(--primary);
  color: #fff; font-size: 30px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.boot-text { color: var(--text-2); font-weight: 600; }

/* ---------- app layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  background: var(--surface); border-right: 1px solid var(--border);
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; padding: 16px 12px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 16px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--primary);
  color: #fff; font-weight: 800; font-size: 19px;
  display: flex; align-items: center; justify-content: center; flex: 0 0 34px;
}
.brand-name { font-weight: 800; font-size: 16px; letter-spacing: -.01em; }
.brand-sub { font-size: 11px; color: var(--text-3); margin-top: -2px; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--r-sm);
  color: var(--text-2); font-weight: 600; font-size: 14px;
}
.nav-item:hover { background: var(--bg); color: var(--text); text-decoration: none; }
.nav-item.active { background: var(--primary-soft); color: var(--primary-deep); }
.nav-item .ico { width: 20px; height: 20px; flex: 0 0 20px; }
.nav-spacer { flex: 1; }
.nav-user {
  display: flex; align-items: center; gap: 10px; padding: 10px;
  border-top: 1px solid var(--border); margin-top: 8px;
}
.nav-user .who { flex: 1; min-width: 0; }
.nav-user .who .n { font-weight: 700; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-user .who .r { font-size: 11.5px; color: var(--text-3); text-transform: capitalize; }

.content { flex: 1; min-width: 0; padding: 24px 28px 56px; max-width: 1160px; margin: 0 auto; width: 100%; }

/* top bar + bottom nav (mobile) */
.topbar {
  display: none; position: sticky; top: 0; z-index: 40;
  height: var(--topbar-h); background: var(--surface);
  border-bottom: 1px solid var(--border);
  align-items: center; gap: 10px; padding: 0 14px;
}
.topbar .brand-mark { width: 30px; height: 30px; font-size: 16px; }
.topbar .t { font-weight: 800; font-size: 16px; flex: 1; }
.bottomnav {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: calc(var(--bottomnav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--surface); border-top: 1px solid var(--border);
}
.bottomnav .bn-row { display: flex; height: var(--bottomnav-h); }
.bn-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; color: var(--text-3); font-size: 10.5px; font-weight: 600;
}
.bn-item:hover { text-decoration: none; }
.bn-item .ico { width: 22px; height: 22px; }
.bn-item.active { color: var(--primary); }

/* ---------- page headers ---------- */
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 21px; letter-spacing: -.01em; flex: 1; min-width: 160px; }
.page-sub { color: var(--text-2); font-size: 13.5px; margin-top: 2px; }
.back-link { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; font-size: 13.5px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 14px; border-radius: var(--r-sm); border: 1px solid transparent;
  font-weight: 600; font-size: 14px; cursor: pointer; user-select: none;
  transition: background .12s, border-color .12s, color .12s;
  white-space: nowrap;
}
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-deep); }
.btn-secondary { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-secondary:hover:not(:disabled) { border-color: var(--text-3); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--bg); color: var(--text); }
.btn-danger { background: var(--surface); border-color: var(--border-strong); color: var(--error); }
.btn-danger:hover:not(:disabled) { background: var(--error); border-color: var(--error); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 13px; border-radius: 7px; }
.btn-xs { padding: 3px 8px; font-size: 12px; border-radius: 6px; }
.btn-block { width: 100%; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 7px; border: none; background: transparent;
  color: var(--text-3); cursor: pointer; flex: 0 0 30px;
}
.icon-btn:hover { background: var(--bg); color: var(--text); }
.icon-btn.danger:hover { background: var(--error-soft); color: var(--error); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn:disabled { opacity: .35; cursor: default; }

/* ---------- forms ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 5px; color: var(--text); }
.field .hint { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.field .err { font-size: 12.5px; color: var(--error); margin-top: 4px; font-weight: 600; }
.input, .select, .textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border-strong);
  border-radius: var(--r-sm); background: var(--surface); outline: none;
  transition: border-color .12s, box-shadow .12s;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft);
}
.input.invalid, .select.invalid, .textarea.invalid { border-color: var(--error); }
.textarea { resize: vertical; min-height: 84px; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; padding-right: 32px; }
.checkbox { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.form-row { display: flex; gap: 12px; }
.form-row .field { flex: 1; }

/* ---------- cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: var(--shadow);
}
.card-pad { padding: 16px 18px; }
.section { margin-bottom: 22px; }
.section-title { font-size: 15px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.section-title .count { color: var(--text-3); font-weight: 600; font-size: 13px; }

/* ---------- auth screens ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 22px; }
.auth-brand .brand-mark { width: 52px; height: 52px; border-radius: 13px; font-size: 27px; }
.auth-brand h1 { font-size: 20px; }
.auth-brand .sub { color: var(--text-2); font-size: 13.5px; text-align: center; }
.auth-alert {
  border-radius: var(--r-sm); padding: 10px 12px; font-size: 13.5px; font-weight: 600;
  margin-bottom: 14px; border: 1px solid;
}
.auth-alert.error { background: var(--error-soft); border-color: #F5C6C6; color: var(--error); }
.auth-alert.warn { background: var(--amber-soft); border-color: #F7DFB8; color: #92600A; }
.auth-alert.ok { background: var(--success-soft); border-color: #BFE5CC; color: var(--success); }

/* ---------- pills & chips ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2.5px 9px; border-radius: 999px; font-size: 12px; font-weight: 700;
  border: 1px solid transparent; white-space: nowrap;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-idea            { background: #F3F4F6; color: #4B5563; border-color: #E5E7EB; }
.st-planned         { background: #EEF2F7; color: #475569; border-color: #DCE3EC; }
.st-in_progress     { background: var(--primary-soft); color: var(--primary-bright); border-color: #CFE4F8; }
.st-built           { background: var(--primary-soft); color: var(--primary-deep); border-color: #C3DDF5; }
.st-awaiting_deploy { background: var(--amber-soft); color: #B45309; border-color: #F7DFB8; }
.st-deployed        { background: #E5F0FA; color: var(--primary); border-color: #C3DDF5; }
.st-verified        { background: var(--success-soft); color: var(--success); border-color: #BFE5CC; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border-strong);
  color: var(--text-2); cursor: pointer; user-select: none; white-space: nowrap;
}
.chip:hover { border-color: var(--text-3); color: var(--text); }
.chip.on { background: var(--primary-soft); border-color: var(--primary-bright); color: var(--primary-deep); }
.chip-row { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }

.badge {
  display: inline-flex; align-items: center; padding: 1px 7px;
  font-size: 11.5px; font-weight: 700; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary-deep);
}
.badge.amber { background: var(--amber-soft); color: #B45309; }
.badge.red { background: var(--error-soft); color: var(--error); }
.badge.grey { background: #F3F4F6; color: var(--text-2); }

.mono { font-family: var(--mono); font-size: 12.5px; }

/* ---------- stat cards ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat-card { padding: 14px 16px; display: block; color: inherit; }
.stat-card:hover { text-decoration: none; border-color: var(--primary-bright); }
.stat-num { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.stat-label { color: var(--text-2); font-size: 12.5px; font-weight: 600; margin-top: 3px; }
.stat-card.warn .stat-num { color: #B45309; }
.stat-card.bad .stat-num { color: var(--error); }
.stat-card.good .stat-num { color: var(--success); }
.stat-card.blue .stat-num { color: var(--primary); }

/* ---------- feature list ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.feature-card { padding: 14px 16px; display: flex; flex-direction: column; gap: 9px; color: inherit; }
.feature-card:hover { text-decoration: none; border-color: var(--primary-bright); box-shadow: var(--shadow-lift); }
.feature-card .f-top { display: flex; align-items: flex-start; gap: 8px; }
.feature-card .f-title { font-weight: 700; font-size: 14.5px; flex: 1; min-width: 0; }
.feature-card .f-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); }
.progress { height: 6px; border-radius: 999px; background: #EEF1F4; overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 999px; background: var(--primary); transition: width .2s; }
.progress.done > i { background: var(--success); }

/* ---------- feature detail ---------- */
.detail-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 6px; flex-wrap: wrap; }
.detail-head h1 { font-size: 20px; flex: 1; min-width: 200px; }
.detail-desc { color: var(--text-2); white-space: pre-wrap; margin: 6px 0 0; }
.status-select {
  appearance: none; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  padding: 4px 26px 4px 12px; border: 1px solid; cursor: pointer; outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center;
}

.phase-card { margin-bottom: 10px; overflow: hidden; }
.phase-head { display: flex; align-items: center; gap: 9px; padding: 11px 14px; cursor: pointer; user-select: none; }
.phase-head:hover { background: var(--bg); }
.phase-head .ph-title { font-weight: 700; flex: 1; min-width: 0; font-size: 14px; }
.phase-head .ph-sub { color: var(--text-3); font-size: 12px; font-weight: 600; }
.phase-head .chev { transition: transform .15s; color: var(--text-3); }
.phase-card.open .chev { transform: rotate(90deg); }
.phase-body { border-top: 1px solid var(--border); padding: 12px 14px 14px; display: none; }
.phase-card.open .phase-body { display: block; }

.checklist { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.check-item { display: flex; align-items: center; gap: 9px; padding: 5px 6px; border-radius: 7px; }
.check-item:hover { background: var(--bg); }
.check-item input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--success); cursor: pointer; flex: 0 0 16px; }
.check-item .txt { flex: 1; min-width: 0; font-size: 13.5px; }
.check-item.done .txt { color: var(--text-3); text-decoration: line-through; }
.check-item .icon-btn { opacity: 0; }
.check-item:hover .icon-btn { opacity: 1; }
.add-inline { display: flex; gap: 8px; }
.add-inline .input { padding: 7px 10px; font-size: 13.5px; }

/* ---------- deploys ---------- */
.deploy-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px;
  border-top: 1px solid var(--border); flex-wrap: wrap;
}
.deploy-row:first-child { border-top: none; }
.deploy-row .tarball { font-family: var(--mono); font-size: 12.5px; font-weight: 600; word-break: break-all; }
.deploy-row .d-ctx { flex: 1; min-width: 180px; }
.deploy-row .d-sub { color: var(--text-2); font-size: 12.5px; margin-top: 2px; }
.deploy-row .d-dates { display: flex; gap: 14px; font-size: 12px; color: var(--text-2); flex-wrap: wrap; }
.deploy-row .d-dates b { color: var(--text); font-weight: 600; }
.deploy-actions { display: flex; gap: 7px; align-items: center; }

/* ---------- kanban ---------- */
.board-wrap { margin: 0 -28px; padding: 0 28px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.board { display: flex; gap: 14px; align-items: flex-start; min-height: 420px; padding-bottom: 20px; }
.col { width: 292px; flex: 0 0 292px; background: #F1F4F8; border: 1px solid var(--border); border-radius: var(--r-md); display: flex; flex-direction: column; max-height: calc(100vh - 210px); }
.col-head { display: flex; align-items: center; gap: 8px; padding: 11px 13px 8px; }
.col-head .c-name { font-weight: 700; font-size: 13.5px; }
.col-head .c-count { color: var(--text-3); font-size: 12.5px; font-weight: 700; }
.col-body { flex: 1; overflow-y: auto; padding: 4px 9px 9px; display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.task-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; box-shadow: var(--shadow); cursor: pointer;
  display: flex; flex-direction: column; gap: 7px;
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.task-card:hover { border-color: var(--border-strong); }
.task-card.dragging { opacity: .35; }
.task-card.is-done .t-title { color: var(--text-3); text-decoration: line-through; }
.task-card .t-title { font-weight: 600; font-size: 13.5px; overflow-wrap: anywhere; }
.task-card .t-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.task-card .due { font-size: 11.5px; font-weight: 700; color: var(--text-2); }
.task-card .due.overdue { color: var(--error); }
.label-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.prio { font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.prio-0 { color: var(--text-3); }
.prio-2 { color: #B45309; }
.prio-3 { color: var(--error); }
.avatar {
  width: 22px; height: 22px; border-radius: 50%; background: var(--primary-soft);
  color: var(--primary-deep); font-size: 10px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 22px;
  margin-left: auto;
}
.drag-ghost {
  position: fixed; z-index: 90; pointer-events: none;
  box-shadow: var(--shadow-lift); transform: rotate(2deg); opacity: .95;
}
.drop-hint { border: 2px dashed var(--primary-bright); border-radius: 10px; background: var(--primary-soft); min-height: 42px; }
.col-add { padding: 7px 9px 10px; }
.col-add .btn { width: 100%; justify-content: flex-start; color: var(--text-3); }
.col-add .btn:hover { color: var(--text); }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; }

/* ---------- activity ---------- */
.day-head { font-size: 12px; font-weight: 800; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; margin: 18px 0 8px; }
.act-row { display: flex; gap: 11px; padding: 9px 12px; border-top: 1px solid var(--border); align-items: flex-start; }
.act-row:first-child { border-top: none; }
.act-row .a-text { flex: 1; min-width: 0; font-size: 13.5px; }
.act-row .a-text b { font-weight: 700; }
.act-row .a-time { color: var(--text-3); font-size: 12px; white-space: nowrap; padding-top: 1px; }
.act-ico {
  width: 28px; height: 28px; border-radius: 8px; flex: 0 0 28px;
  display: flex; align-items: center; justify-content: center;
}
.act-ico svg { width: 15px; height: 15px; }
.ai-blue { background: var(--primary-soft); color: var(--primary); }
.ai-green { background: var(--success-soft); color: var(--success); }
.ai-amber { background: var(--amber-soft); color: #B45309; }
.ai-grey { background: #F3F4F6; color: var(--text-2); }
.ai-red { background: var(--error-soft); color: var(--error); }

/* ---------- tables (admin) ---------- */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); font-weight: 700; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 13.5px; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl .actions { text-align: right; white-space: nowrap; }
.tbl-scroll { overflow-x: auto; }

/* ---------- admin tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tab {
  padding: 9px 14px; font-weight: 700; font-size: 13.5px; color: var(--text-2);
  border: none; background: none; cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -1px; white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.on { color: var(--primary); border-bottom-color: var(--primary); }

/* ---------- list rows (areas/labels/columns/tokens) ---------- */
.row-list { display: flex; flex-direction: column; }
.row-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--border); }
.row-item:first-child { border-top: none; }
.row-item .r-main { flex: 1; min-width: 0; font-weight: 600; font-size: 13.5px; }
.row-item .r-sub { color: var(--text-3); font-size: 12px; font-weight: 500; }
.swatch { width: 18px; height: 18px; border-radius: 6px; border: 1px solid rgba(0,0,0,.08); flex: 0 0 18px; }
.swatch-row { display: flex; gap: 7px; flex-wrap: wrap; }
.swatch-pick { width: 26px; height: 26px; border-radius: 8px; cursor: pointer; border: 2px solid transparent; }
.swatch-pick.on { border-color: var(--text); }

/* ---------- modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 60; background: rgba(17, 24, 39, .45);
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
.modal {
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lift);
  width: 100%; max-width: 480px; max-height: calc(100vh - 40px);
  display: flex; flex-direction: column;
}
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 0; }
.modal-head h2 { font-size: 16.5px; flex: 1; }
.modal-body { padding: 14px 18px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 9px; padding: 0 18px 16px; flex-wrap: wrap; }
.modal-foot .left { margin-right: auto; }

/* ---------- toasts ---------- */
.toast-stack {
  position: fixed; z-index: 100; bottom: 18px; right: 18px;
  display: flex; flex-direction: column; gap: 8px; max-width: 340px;
}
.toast {
  background: #1F2937; color: #fff; border-radius: 10px; padding: 11px 14px;
  font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-lift);
  display: flex; align-items: center; gap: 9px;
  animation: toast-in .18s ease-out;
}
.toast.err { background: var(--error); }
.toast.ok { background: #14532D; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- empty states / skeletons ---------- */
.empty {
  text-align: center; padding: 42px 18px; color: var(--text-2);
}
.empty .e-ico { font-size: 30px; margin-bottom: 8px; }
.empty .e-title { font-weight: 700; color: var(--text); margin-bottom: 3px; }
.empty .e-sub { font-size: 13px; margin-bottom: 14px; }
.skel { border-radius: var(--r-sm); background: linear-gradient(90deg, #EEF1F4 25%, #F6F8FA 45%, #EEF1F4 65%); background-size: 300% 100%; animation: skel 1.1s infinite linear; }
@keyframes skel { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.skel-row { height: 54px; margin-bottom: 10px; }

/* ---------- misc ---------- */
.muted { color: var(--text-2); }
.tiny { font-size: 12px; }
.flex { display: flex; align-items: center; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.mt-8 { margin-top: 8px; } .mt-14 { margin-top: 14px; } .mt-20 { margin-top: 20px; }
.mb-8 { margin-bottom: 8px; } .mb-14 { margin-bottom: 14px; }
.wrap-anywhere { overflow-wrap: anywhere; }
.copy-box {
  display: flex; gap: 8px; align-items: center; background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--r-sm); padding: 10px 12px;
}
.copy-box code { flex: 1; font-family: var(--mono); font-size: 12px; word-break: break-all; }
.kbd-hint { color: var(--text-3); font-size: 12px; }

/* ---------- responsive ---------- */
@media (max-width: 899px) {
  .sidebar { display: none; }
  .topbar { display: flex; }
  .bottomnav { display: block; }
  .content { padding: 16px 14px calc(var(--bottomnav-h) + 34px); }
  .board-wrap { margin: 0 -14px; padding: 0 14px; }
  .board { scroll-snap-type: x mandatory; }
  .col { scroll-snap-align: start; width: 84vw; flex-basis: 84vw; max-width: 320px; max-height: calc(100vh - var(--topbar-h) - var(--bottomnav-h) - 150px); }
  .form-row { flex-direction: column; gap: 0; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .stat-num { font-size: 22px; }
  .modal { max-width: none; align-self: flex-end; border-bottom-left-radius: 0; border-bottom-right-radius: 0; max-height: 88vh; }
  .modal-overlay { padding: 0; align-items: flex-end; }
  .toast-stack { left: 12px; right: 12px; bottom: calc(var(--bottomnav-h) + 16px); max-width: none; align-items: center; }
  .content > .page-head h1 { font-size: 18px; }
}
@media (min-width: 900px) {
  .mobile-only { display: none !important; }
}
@media (max-width: 899px) {
  .desktop-only { display: none !important; }
}
