/* =====================================================================
   FiveM Board — neutral black UI, white active blocks, bold caps labels
   ===================================================================== */

:root {
  /* surfaces */
  --bg: #141414;
  --panel: rgba(10, 10, 10, 0.9);
  --block: rgba(255, 255, 255, 0.06);
  --block-hi: rgba(255, 255, 255, 0.11);
  --raised: var(--block);
  --line: rgba(255, 255, 255, 0.08);
  --line-hi: rgba(255, 255, 255, 0.18);

  /* text */
  --text: #fff;
  --muted: rgba(255, 255, 255, 0.58);
  --faint: rgba(255, 255, 255, 0.34);
  --ink: #0b0b0b;
  --accent: #fff;

  /* types / states */
  --script: #7ee2a8;
  --feature: #8cb4ff;
  --bug: #ff7a7a;
  --task: #fff;
  --warn: #ffc85a;

  /* label colours */
  --l-green: #4ade80; --l-yellow: #facc15; --l-orange: #fb923c; --l-red: #f87171; --l-purple: #c084fc;
  --l-blue: #60a5fa; --l-sky: #38bdf8; --l-pink: #f472b6; --l-gray: #9ca3af;

  --radius: 2px;
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  --ease: 120ms ease;

  color-scheme: dark;
  font-family: "Outfit", system-ui, sans-serif;
}

/* ---------------------------------------------------------------- base */

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.65); outline-offset: 2px; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.16); border-radius: var(--radius); }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.28); }

.hidden { display: none !important; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* caps label: the core type style of the UI */
.chip, .primary, .add-card, .add-column, .expand, .pick, .prio,
.who-menu button, .popover button, .discord,
dialog label, fieldset, .side-label, .block h3, .block summary, dialog h2 {
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* -------------------------------------------------------------- topbar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
  padding: 16px 32px;
  background: rgba(20, 20, 20, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 14px; }
.logo { display: block; height: 44px; width: auto; }
.brand-title { font-weight: 800; font-size: 13px; letter-spacing: 0.1em; white-space: nowrap; }

.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.filters { display: flex; gap: 2px; padding: 2px; background: var(--panel); border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); }

#search {
  min-width: 240px;
  padding: 9px 12px;
  background: var(--panel);
  border: 0;
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--line);
  font-weight: 600;
  transition: box-shadow var(--ease);
}
#search:focus { outline: none; box-shadow: inset 0 0 0 1px var(--line-hi); }
#search::placeholder { color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px; font-weight: 700; }

.chip {
  padding: 7px 11px;
  background: transparent;
  color: var(--muted);
  border: 0;
  border-radius: var(--radius);
  transition: background var(--ease), color var(--ease);
}
.chip:hover { color: #fff; background: var(--block); }
.chip.active, .chip.toggle.active { background: #fff; color: var(--ink); }

/* account menu */
.who { position: relative; }
.who-btn { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; background: transparent; border: 0; border-radius: var(--radius); font-weight: 700; font-size: 13px; }
.who-btn:hover { background: var(--block); }
.who-btn span { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who img, .who .mini { width: 28px; height: 28px; box-shadow: none; }

.who-menu, .popover {
  position: absolute;
  z-index: 20;
  min-width: 170px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  background: #0d0d0d;
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
}
.who-menu { top: calc(100% + 6px); right: 0; }

.who-menu button, .popover button {
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  text-align: left;
}
.who-menu button:hover, .popover button:hover:not(:disabled), .popover button:focus-visible { background: #fff; color: var(--ink); outline: none; }
.popover button:disabled { opacity: 0.35; cursor: default; }
.popover .danger-item { color: var(--bug); }
.popover .danger-item:hover { background: var(--bug); color: var(--ink); }

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

.gate {
  min-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
  text-align: center;
}
.gate img { height: 88px; width: auto; }
.gate p { margin: 0; max-width: 420px; color: var(--muted); }
.discord { padding: 12px 18px; background: #5865f2; color: #fff; text-decoration: none; border-radius: var(--radius); }
.discord:hover { background: #4752c4; }

/* --------------------------------------------------------------- board */

.board {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 32px 56px;
}

.column {
  display: grid;
  grid-template-columns: 44px minmax(0, max-content) auto;
  align-items: center;
  column-gap: 16px;
  padding: 10px 10px 10px 0;
  overflow: hidden;
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
}

/* white title strip on the left edge, full row height */
.column-head {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 44px;
  margin: -10px 0;
  padding: 12px 0 8px;
  background: #fff;
  color: var(--ink);
}

.column-title {
  flex: 1;
  width: 1.5rem;
  field-sizing: content;
  margin: 0;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
  text-align: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
.column-title:focus { outline: none; }

.column-count { font: 600 11px "JetBrains Mono", monospace; color: var(--ink); opacity: 0.55; }
.column-count.over { opacity: 1; padding: 1px 4px; background: var(--bug); border-radius: var(--radius); }

.column-menu {
  padding: 0 8px 6px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  line-height: 1;
}
.column-menu:hover { background: rgba(0, 0, 0, 0.1); }

.cards {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 48px;
  max-width: calc(100vw - 230px);
  padding: 2px;
  overflow-x: auto;
}

.empty, .no-results { margin: 0; color: var(--faint); font-size: 13px; }
.empty { padding: 0 4px; }
.no-results { padding: 8px 0; }

.add-card, .add-column {
  padding: 9px 12px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  white-space: nowrap;
  transition: background var(--ease), color var(--ease);
}
.add-card { justify-self: start; }
.add-card:hover, .add-column:hover { background: var(--block); color: #fff; }
.add-column { align-self: flex-start; box-shadow: inset 0 0 0 1px var(--line); }

.column.collapsed .add-card { display: none; }

.expand {
  padding: 10px 14px;
  border: 0;
  border-radius: var(--radius);
  background: var(--block);
  color: var(--muted);
}
.expand:hover { background: var(--block-hi); color: #fff; }

/* drag & drop */
.drop-hover { box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.4); }
.drop-slot {
  flex: 0 0 auto;
  align-self: stretch;
  width: 3px;
  min-height: 72px;
  border-radius: 99px;
  background: #fff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

/* --------------------------------------------------------------- cards */
/* dark section block like the debug panel: caps type tag + priority on top,
   bold caps title, muted notes, stat-style footer under a hairline */

.card {
  --type: rgba(255, 255, 255, 0.5);
  position: relative;
  flex: 0 0 264px;
  width: 264px;
  height: 148px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--block);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: grab;
  transition: background var(--ease), box-shadow var(--ease);
}
.card.script { --type: var(--script); }
.card.feature { --type: var(--feature); }
.card.bug { --type: var(--bug); }
.card.task { --type: #fff; }

/* type colour bar on the left edge */
.card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--type);
}

.card:hover { background: var(--block-hi); box-shadow: inset 0 0 0 1px var(--line-hi); }
.card:active { cursor: grabbing; }
.card.dragging { opacity: 0.35; }

.card-open {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  min-height: 0;
  padding: 12px 14px 10px 17px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: inherit;
}

.card-head {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "kind corner" "title title";
  align-items: center;
  row-gap: 6px;
}

.card-kind {
  grid-area: kind;
  color: var(--type);
  font: 800 10px "Outfit", sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.card h3 {
  grid-area: title;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.card-corner { grid-area: corner; justify-self: end; display: flex; align-items: center; gap: 6px; }

.priority-mark { width: 14px; height: 14px; color: var(--faint); }
.priority-mark svg { display: block; width: 100%; height: 100%; }
.priority-mark.low { color: var(--script); }
.priority-mark.medium { color: var(--warn); }
.priority-mark.high { color: var(--bug); }

.card-author {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  object-fit: cover;
  background: #2a2a2a;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.card-labels { display: flex; gap: 4px; padding-top: 8px; overflow: hidden; }

.card-notes {
  margin: 0;
  padding-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--faint);
}
.card-foot:empty, .card-foot:not(:has(.badge, .mini, .card-script)) { border-top: 0; }

.card-script {
  margin-left: auto;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--faint);
  font: 500 11px "JetBrains Mono", ui-monospace, Consolas, monospace;
}

.badge {
  padding: 2px 6px;
  border-radius: var(--radius);
  background: var(--block-hi);
  color: var(--muted);
  font: 600 11px "JetBrains Mono", monospace;
  white-space: nowrap;
}
.badge.complete { background: var(--l-green); color: var(--ink); }
.badge.due.overdue { background: var(--bug); color: var(--ink); }
.badge.due.soon { background: var(--l-yellow); color: var(--ink); }

.people { display: flex; }
.people .mini + .mini { margin-left: -6px; }

.mini, .avatar {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  object-fit: cover;
  background: #2a2a2a;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  box-shadow: 0 0 0 2px #1a1a1a;
}

/* labels */
.lbl {
  display: inline-block;
  padding: 2px 6px;
  border-radius: var(--radius);
  background: var(--l-gray);
  color: var(--ink);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.lbl.big { padding: 4px 8px; font-size: 11px; }

.lbl.green, .swatch.green, .lbl-toggle.green.on { background: var(--l-green); }
.lbl.yellow, .swatch.yellow, .lbl-toggle.yellow.on { background: var(--l-yellow); }
.lbl.orange, .swatch.orange, .lbl-toggle.orange.on { background: var(--l-orange); }
.lbl.red, .swatch.red, .lbl-toggle.red.on { background: var(--l-red); }
.lbl.purple, .swatch.purple, .lbl-toggle.purple.on { background: var(--l-purple); }
.lbl.blue, .swatch.blue, .lbl-toggle.blue.on { background: var(--l-blue); }
.lbl.sky, .swatch.sky, .lbl-toggle.sky.on { background: var(--l-sky); }
.lbl.pink, .swatch.pink, .lbl-toggle.pink.on { background: var(--l-pink); }
.lbl.gray, .swatch.gray, .lbl-toggle.gray.on { background: var(--l-gray); }

/* ------------------------------------------------------------ composer */

.composer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 280px;
  padding: 12px;
  background: #0d0d0d;
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line-hi);
}

.type-picks, .prio-picks, .choice-row { display: flex; flex-wrap: wrap; gap: 4px; }

.pick, .prio {
  padding: 6px 10px;
  border: 0;
  border-radius: var(--radius);
  background: var(--block);
  color: var(--muted);
  transition: background var(--ease), color var(--ease);
}
.pick:hover, .prio:hover { background: var(--block-hi); color: #fff; }
.pick.active, .prio.active { background: #fff; color: var(--ink); }
.pick[data-type="script"].active { background: var(--script); }
.pick[data-type="feature"].active { background: var(--feature); }
.pick[data-type="bug"].active { background: var(--bug); }
.prio.low.active { background: var(--script); }
.prio.medium.active { background: var(--warn); }
.prio.high.active { background: var(--bug); }

.composer-actions, .dialog-head, .dialog-actions { display: flex; align-items: center; gap: 8px; }

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

.primary, .ghost, .danger, .icon-btn { border: 0; border-radius: var(--radius); transition: background var(--ease), color var(--ease); }

.primary { width: fit-content; padding: 10px 14px; background: #fff; color: var(--ink); }
.primary:hover { background: #dcdcdc; }

.ghost, .danger { padding: 9px 10px; background: transparent; color: var(--muted); font-weight: 700; font-size: 13px; }
.ghost:hover { background: var(--block); color: #fff; }
.danger { color: var(--bug); }
.danger:hover { background: var(--bug); color: var(--ink); }
.small.ghost, .small.danger { padding: 6px 8px; font-size: 12px; }

.icon-btn { width: 28px; height: 28px; background: var(--block); color: var(--muted); font-size: 16px; line-height: 1; }
.icon-btn:hover { background: var(--block-hi); color: #fff; }
.icon-btn.small { flex: 0 0 auto; width: 24px; height: 24px; font-size: 14px; }

.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.link:hover { color: #fff; }

/* -------------------------------------------------------------- inputs */

.composer input, dialog input, dialog textarea, dialog select {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--radius);
  background: var(--block);
  box-shadow: inset 0 0 0 1px transparent;
  font-weight: 500;
  transition: background var(--ease), box-shadow var(--ease);
}
.composer input:hover, dialog input:hover, dialog textarea:hover, dialog select:hover { background: var(--block-hi); }
.composer input:focus, dialog input:focus, dialog textarea:focus, dialog select:focus { outline: none; box-shadow: inset 0 0 0 1px var(--line-hi); }
input::placeholder, textarea::placeholder { color: var(--faint); }
dialog textarea { resize: vertical; line-height: 1.5; }

select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 32px !important;
  font-weight: 700 !important;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23ffffff' stroke-opacity='.6' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
select option { background: #141414; color: #fff; }
select option:checked { background: #fff; color: var(--ink); }

input[type="date"] { color-scheme: dark; }

input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: 18px !important;
  height: 18px;
  margin: 0;
  padding: 0 !important;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--block-hi) !important;
  box-shadow: inset 0 0 0 1px var(--line-hi) !important;
  cursor: pointer;
}
input[type="checkbox"]:hover { background: rgba(255, 255, 255, 0.18) !important; }
input[type="checkbox"]:checked { background: #fff !important; box-shadow: none !important; }
input[type="checkbox"]:checked::after {
  content: "";
  width: 5px;
  height: 9px;
  margin-top: -2px;
  border: solid var(--ink);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ------------------------------------------------------------- dialogs */

dialog {
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: var(--radius);
  background: #0d0d0d;
  color: var(--text);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), inset 0 0 0 1px var(--line);
}
dialog.wide { width: min(920px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(2px); }

dialog h2 { flex: 1; margin: 0; font-size: 13px; }

.stack, .editor { display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.editor { gap: 10px; }

.dialog-head { padding-bottom: 12px; border-bottom: 1px solid var(--line); }

dialog label, fieldset {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--muted);
}
legend { padding: 0; margin-bottom: 8px; }

.where { flex: 1; margin: 0; color: var(--muted); font-size: 13px; }
.where strong { color: #fff; }

dialog .title-input { padding: 8px 10px; background: transparent; font-size: 20px; font-weight: 700; }
dialog .title-input:hover { background: var(--block); }

.edit-people { margin: -4px 0 0; padding: 0 10px; color: var(--muted); font-size: 12px; }

.tag-archived { padding: 1px 6px; border-radius: var(--radius); background: var(--l-yellow); color: var(--ink); font-size: 11px; font-weight: 800; text-transform: uppercase; }

.label-row { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 10px; }
.label-row:empty { display: none; }

.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; margin-top: 8px; }
.editor-main, .editor-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.editor-side { padding-left: 24px; border-left: 1px solid var(--line); }

/* segmented radio choices */
.choice-row label {
  position: relative;
  flex-direction: row;
  align-items: center;
  padding: 7px 11px;
  border-radius: var(--radius);
  background: var(--block);
  color: rgba(255, 255, 255, 0.75);
  font-size: 11px;
  cursor: pointer;
  transition: background var(--ease), color var(--ease);
}
.choice-row label:hover { background: var(--block-hi); color: #fff; }
.choice-row input { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; opacity: 0; }
.choice-row label:has(input:focus-visible) { outline: 2px solid rgba(255, 255, 255, 0.65); outline-offset: 2px; }

#type-choices label:has(input[value="script"]:checked) { background: var(--script); color: var(--ink); }
#type-choices label:has(input[value="feature"]:checked) { background: var(--feature); color: var(--ink); }
#type-choices label:has(input[value="bug"]:checked) { background: var(--bug); color: var(--ink); }
#type-choices label:has(input[value="task"]:checked) { background: #fff; color: var(--ink); }
#priority-choices label:has(input[value="low"]:checked) { background: var(--script); color: var(--ink); }
#priority-choices label:has(input[value="medium"]:checked) { background: var(--warn); color: var(--ink); }
#priority-choices label:has(input[value="high"]:checked) { background: var(--bug); color: var(--ink); }
.choice-row label:has(input[name="kind"]:checked) { background: #fff; color: var(--ink); }

.kind-help { margin: -6px 0 0; color: var(--faint); font-size: 12px; }

.side-field { display: flex; flex-direction: column; gap: 8px; }
.side-label { display: flex; align-items: baseline; gap: 8px; color: var(--muted); }
.due-row { display: flex; align-items: center; gap: 10px; }
.due-row input[type="date"] { flex: 1; }
dialog label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; cursor: pointer; }

.toggle-list { display: flex; flex-wrap: wrap; gap: 4px; }
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 0;
  border-radius: var(--radius);
  background: var(--block);
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
  font-weight: 700;
  transition: background var(--ease), color var(--ease);
}
.toggle:hover { background: var(--block-hi); color: #fff; }
.toggle.on { background: #fff; color: var(--ink); }
.member .mini { width: 18px; height: 18px; box-shadow: none; }

.lbl-toggle { box-shadow: inset 3px 0 0 var(--l-gray); }
.lbl-toggle.green { box-shadow: inset 3px 0 0 var(--l-green); }
.lbl-toggle.yellow { box-shadow: inset 3px 0 0 var(--l-yellow); }
.lbl-toggle.orange { box-shadow: inset 3px 0 0 var(--l-orange); }
.lbl-toggle.red { box-shadow: inset 3px 0 0 var(--l-red); }
.lbl-toggle.purple { box-shadow: inset 3px 0 0 var(--l-purple); }
.lbl-toggle.blue { box-shadow: inset 3px 0 0 var(--l-blue); }
.lbl-toggle.sky { box-shadow: inset 3px 0 0 var(--l-sky); }
.lbl-toggle.pink { box-shadow: inset 3px 0 0 var(--l-pink); }
.lbl-toggle.on { color: var(--ink); box-shadow: none; }

.side-actions { display: flex; gap: 6px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }

/* sections inside the editor */
.block { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.block-head { display: flex; align-items: center; gap: 8px; }
.block h3, .block summary { margin: 0; color: var(--muted); }
.block summary { cursor: pointer; }
.block summary:hover { color: #fff; }
#check-count { font: 600 11px "JetBrains Mono", monospace; }

.progress { height: 4px; overflow: hidden; border-radius: var(--radius); background: var(--block-hi); }
.progress span { display: block; width: 0; height: 100%; background: #fff; transition: width 0.2s; }
.progress span.full { background: var(--l-green); }

.checklist { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.checklist li { display: flex; align-items: center; gap: 8px; padding: 2px 6px; border-radius: var(--radius); }
.checklist li:hover { background: var(--block); }
.checklist .icon-btn { opacity: 0; }
.checklist li:hover .icon-btn, .checklist .icon-btn:focus-visible { opacity: 1; }
dialog .checklist .item-text { padding: 6px 4px; background: transparent; }
.checklist li.done .item-text { color: var(--muted); text-decoration: line-through; }

.inline-form { display: flex; align-items: center; gap: 8px; }
.inline-form input { flex: 1; }
dialog .inline-form select { width: auto; }

.comment-form { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.comments { display: flex; flex-direction: column; gap: 8px; }
.comment { display: flex; gap: 10px; padding: 10px 12px; border-radius: var(--radius); background: var(--block); }
.comment > div { flex: 1; min-width: 0; }
.comment header { display: flex; align-items: baseline; gap: 8px; font-size: 13px; }
.comment time { color: var(--faint); font-size: 11px; }
.comment header .link { margin-left: auto; font-size: 11px; }
.comment p { margin: 4px 0 0; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment .mini { width: 26px; height: 26px; box-shadow: none; }

.activity { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 12px; }
.activity strong { color: #fff; }
.activity time { margin-left: 4px; color: var(--faint); font-size: 11px; }

/* labels dialog */
.label-list { display: flex; flex-direction: column; gap: 6px; }
.label-edit { display: flex; align-items: center; gap: 8px; }
.label-edit input { flex: 1; }
dialog .label-edit select { width: 120px; }
.swatch { flex: 0 0 auto; width: 6px; height: 34px; border-radius: var(--radius); background: var(--l-gray); }

/* archive dialog */
.archive-list { display: flex; flex-direction: column; gap: 4px; }
.archive-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 12px; border-radius: var(--radius); background: var(--block); }
.archive-row:hover { background: var(--block-hi); }
.archive-row .title { max-width: 50%; overflow: hidden; color: #fff; text-align: left; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.archive-row .title:hover { text-decoration: underline; }
.kind-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.kind-dot.script { background: var(--script); }
.kind-dot.feature { background: var(--feature); }
.kind-dot.bug { background: var(--bug); }

/* --------------------------------------------------------------- toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 14px 12px 16px;
  transform: translateX(-50%);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
  font-weight: 600;
}
.toast button { padding: 4px 8px; border: 0; border-radius: var(--radius); background: var(--ink); color: #fff; font-weight: 800; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }

/* --------------------------------------------------------------- small */

@media (max-width: 760px) {
  .topbar { position: static; padding: 14px 16px; }
  .toolbar, #search { width: 100%; }
  #search { min-width: 0; }
  .board { padding: 12px 16px 32px; }
  .column { grid-template-columns: 44px minmax(0, 1fr); }
  .column-head { grid-row: span 2; }
  .column .add-card, .column .composer { grid-column: 2; }
  .cards { width: auto; max-width: 100%; }
  .editor-grid { grid-template-columns: 1fr; }
  .editor-side { padding-left: 0; border-left: 0; }
}

/* card: white header bar across the top */
.card-open { padding: 0 0 10px; }
.card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  margin: 0 0 2px;
  background: #fff;
  color: var(--ink);
}
.card-kind {
  align-self: stretch;
  display: flex;
  align-items: center;
  padding: 0 9px;
  background: var(--type);
  color: var(--ink);
}
.card.task .card-kind { background: var(--ink); color: #fff; }
.card h3 { flex: 1; color: var(--ink); font-size: 11px; letter-spacing: 0.08em; }
.card-corner { margin-left: auto; padding-right: 8px; }
.priority-mark.low { color: #22a35a; }
.priority-mark.medium { color: #d39e00; }
.priority-mark.high { color: #e5484d; }
.card::before { top: 30px; }
.card-labels, .card-notes, .card-foot { margin-left: 17px; margin-right: 14px; }
.card-labels, .card-notes { padding-top: 8px; }

/* card: black header bar */
.card-head { background: #000; color: #fff; box-shadow: inset 0 -1px 0 var(--line); }
.card h3 { color: #fff; }
.card.task .card-kind { background: #fff; color: var(--ink); }
.priority-mark.low { color: var(--script); }
.priority-mark.medium { color: var(--warn); }
.priority-mark.high { color: var(--bug); }

/* titles shrink to fit (see fitTitles in app.js) */
.card h3 { text-overflow: clip; }
