/* ==========================================================================
   TaskBoard — agency project management demo
   Palette "Graphite & Lime": near-black graphite surfaces with an
   acid-lime accent; slate / sky / amber / mint status colours.
   Type: Bricolage Grotesque (display) + Figtree (interface)
   1. Tokens  2. Base  3. Layout & sidebar  4. Top bar  5. Primitives
   6. Board  7. Cards & menu  8. My tasks  9. Workload  10. Modal
   11. Overlays  12. Responsive
   ========================================================================== */

/* ------------------------------ 1. Tokens ------------------------------ */
:root {
  color-scheme: dark;
  --bg: #111214;
  --panel: #18191D;
  --panel-2: #1E2025;
  --panel-3: #272A31;
  --line: #2D3038;
  --line-2: #23262C;
  --ink: #ECEDEF;
  --muted: #A4A8B1;
  --faint: #868B96;
  --lime: #C9F24E;
  --lime-2: #B6E032;
  --lime-ink: #16180E;

  --todo: #9AA3B5;
  --progress: #5EB0FF;
  --review: #FFB547;
  --done: #45D19A;
  --urgent: #FF6B6B;
  --high: #FFA24C;
  --medium: #5EB0FF;
  --low: #9AA3B5;

  --r: 16px;
  --r-sm: 10px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 18px 40px -24px rgba(0, 0, 0, .8);
  --display: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  --sans: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --side-w: 252px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ------------------------------- 2. Base ------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 14px; line-height: 1.5; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--lime); color: var(--lime-ink); }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--lime); color: var(--lime-ink); padding: 10px 14px; border-radius: 10px; font-weight: 700; }
.skip:focus { top: 12px; }

/* ------------------------- 3. Layout & sidebar ------------------------- */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.main { min-width: 0; display: flex; flex-direction: column; }
#main { padding: 18px 26px 36px; outline: none; flex: 1; }

.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; padding: 20px 14px 16px; background: #0C0D0F; border-right: 1px solid var(--line-2); }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; font-family: var(--display); font-size: 20px; font-weight: 800; letter-spacing: -.03em; }
.ws { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line-2); }
.ws__logo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 13px; color: #fff; background: linear-gradient(135deg, #FF8A65, #F472B6); }
.ws__txt { display: flex; flex-direction: column; min-width: 0; }
.ws__txt strong { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws__txt small { font-size: 11.5px; color: var(--faint); }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav__link { display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px; background: none; font-size: 13.5px; font-weight: 600; color: var(--muted); text-align: left; transition: background .2s, color .2s; }
.nav__link:hover { background: var(--panel); color: var(--ink); }
.nav__link[aria-current="page"] { background: var(--panel-2); color: var(--ink); box-shadow: inset 3px 0 0 var(--lime); }
.nav__link[aria-current="page"] .ico { color: var(--lime); }
.nav__link--mob { display: none; }
.nav__count { margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--lime-ink); background: var(--lime); }
.nav__count:empty { display: none; }

.side__label { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); padding: 0 10px 6px; }
.projects__head { display: flex; align-items: center; justify-content: space-between; }
.projects .projects__close { display: none; }
.proj-list { display: grid; gap: 2px; }
.proj { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; column-gap: 10px; row-gap: 5px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: none; text-align: left; color: var(--muted); font-size: 13px; transition: background .2s, color .2s; }
.proj:hover { background: var(--panel); color: var(--ink); }
.proj[aria-pressed="true"] { background: var(--panel-2); color: var(--ink); }
.proj__dot { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.proj__name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proj__count { font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.proj__bar { grid-column: 2 / -1; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.proj__bar span { display: block; height: 100%; background: var(--c); border-radius: 3px; }

.team__row { display: flex; gap: 5px; padding: 0 10px; }
.team__row .av { width: 28px; height: 28px; }
.side__foot { margin-top: auto; padding: 0 10px; font-size: 11.5px; color: var(--faint); }

/* ------------------------------ 4. Top bar ----------------------------- */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 26px; background: rgba(17, 18, 20, .86); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-2); }
.crumb { font-size: 12px; color: var(--faint); display: flex; align-items: center; gap: 6px; }
.crumb i { width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.top__title { font-family: var(--display); font-size: 24px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.demo-badge { padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: var(--lime); border: 1px solid rgba(201, 242, 78, .35); background: rgba(201, 242, 78, .08); }
.top__tools { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.search { position: relative; display: block; }
.search .ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); pointer-events: none; }
.search input { width: 220px; height: 38px; padding: 0 12px 0 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); font-size: 13.5px; }
.search input::placeholder, input::placeholder, textarea::placeholder { color: var(--faint); }

/* ---------------------------- 5. Primitives ---------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid transparent; font-weight: 700; font-size: 13.5px; white-space: nowrap; transition: background .2s, border-color .2s, color .2s, transform .2s; }
.btn:active { transform: translateY(1px); }
.btn--sm { height: 32px; padding: 0 11px; font-size: 12.5px; }
.btn--lime { background: var(--lime); color: var(--lime-ink); }
.btn--lime:hover { background: var(--lime-2); }
.btn--ghost { background: var(--panel); border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: #3D414B; }
.btn--soft { background: var(--panel-3); color: var(--ink); }
.btn--soft:hover { background: #31353D; }
.btn--danger { background: none; border-color: rgba(255, 107, 107, .35); color: #FF8C8C; }
.btn--danger:hover { background: rgba(255, 107, 107, .1); }
.btn .ico { width: 16px; height: 16px; }
.icon-btn { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); display: grid; place-items: center; color: var(--ink); }
.icon-btn:hover { border-color: #3D414B; }
.link-btn { border: 0; background: none; padding: 4px 2px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--ink); }

.select, .field input, .field textarea, .add-row input, .cmt-add textarea {
  width: 100%; min-height: 38px; padding: 8px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); font-size: 13.5px;
}
.select { width: auto; appearance: none; -webkit-appearance: none; padding-right: 32px;
  background: var(--panel-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%23A4A8B1' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 9px center / 16px; }
.select:focus, .field input:focus, .field textarea:focus, .add-row input:focus, .cmt-add textarea:focus, .search input:focus { outline: none; border-color: var(--lime); box-shadow: 0 0 0 3px rgba(201, 242, 78, .15); }
.field { display: grid; gap: 5px; min-width: 0; }
.field label { font-size: 12px; font-weight: 700; color: var(--muted); }
.field .select { width: 100%; }
.err { font-size: 12.5px; color: #FF8C8C; font-weight: 600; }
.err:empty { display: none; }
[aria-invalid="true"] { border-color: var(--urgent) !important; }

.av { width: 26px; height: 26px; border-radius: 50%; flex: none; display: inline-grid; place-items: center; font-size: 10.5px; font-weight: 800; color: var(--lime-ink); background: var(--c, var(--todo)); }
.av--lg { width: 44px; height: 44px; font-size: 14px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.prio { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; color: var(--c); white-space: nowrap; }
.prio::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.prio--urgent { --c: var(--urgent); } .prio--high { --c: var(--high); } .prio--medium { --c: var(--medium); } .prio--low { --c: var(--low); }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); white-space: nowrap; }
.panel { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r); padding: 20px 22px; box-shadow: var(--shadow); margin-bottom: 18px; min-width: 0; }
.panel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.panel__title { font-family: var(--display); font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.panel__sub { font-size: 13px; color: var(--muted); }

/* ------------------------------- 6. Board ------------------------------ */
.filters { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-bottom: 16px; }
.filters__people { display: flex; align-items: center; gap: 10px; }
.filters__label { font-size: 12px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }
.av-filter { display: flex; gap: 4px; }
.av-btn { padding: 2px; border-radius: 50%; border: 2px solid transparent; background: none; transition: border-color .2s, opacity .2s; }
.av-btn .av { width: 28px; height: 28px; }
.av-btn[aria-pressed="true"] { border-color: var(--lime); }
.av-filter.is-filtering .av-btn[aria-pressed="false"] { opacity: .4; }
.av-btn:hover { opacity: 1 !important; }
.filters__sum { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.col-tabs { display: none; }

.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
.col { display: flex; flex-direction: column; min-width: 0; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line-2); }
.col__head { display: flex; align-items: center; gap: 9px; padding: 13px 12px 10px 14px; }
.col__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 18%, transparent); }
.col__name { font-family: var(--display); font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.col__count { font-size: 12px; font-weight: 700; color: var(--faint); font-variant-numeric: tabular-nums; }
.col__hrs { margin-left: auto; font-size: 11.5px; color: var(--faint); }
.col__add { width: 28px; height: 28px; border-radius: 8px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; }
.col__add:hover { background: var(--panel-3); color: var(--ink); }
.col__body { display: flex; flex-direction: column; gap: 8px; padding: 4px 8px 10px; min-height: 120px; border-radius: 0 0 var(--r) var(--r); transition: background .2s; }
.col__body.is-over { background: rgba(201, 242, 78, .05); box-shadow: inset 0 0 0 1.5px rgba(201, 242, 78, .4); }
.col__empty { padding: 18px 10px; border: 1px dashed var(--line); border-radius: 12px; text-align: center; font-size: 12.5px; color: var(--faint); }
.drop-ph { height: 64px; border-radius: 12px; border: 1.5px dashed var(--lime); background: rgba(201, 242, 78, .06); flex: none; }
.hint { margin-top: 14px; font-size: 12.5px; color: var(--faint); }
.hint b { color: var(--muted); }

/* --------------------------- 7. Cards & menu --------------------------- */
.card { position: relative; padding: 11px 12px 10px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); cursor: grab; transition: border-color .2s, transform .2s var(--ease), box-shadow .2s, opacity .2s; }
.card:hover { border-color: #3B3F49; box-shadow: 0 14px 28px -18px rgba(0, 0, 0, .9); }
.card.is-dragging { opacity: .35; }
.card.is-done .card__title { color: var(--muted); }
.card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; min-width: 0; }
.card__title { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; font-size: 14px; font-weight: 600; line-height: 1.35; color: var(--ink); cursor: pointer; }
.card__title:hover { text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; }
.card__meta { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.card__meta > span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.card__top .tag { min-width: 0; flex: 0 1 auto; }
.card__who { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.card__who .av { width: 24px; height: 24px; font-size: 10px; }
.card__meta .ico { width: 14px; height: 14px; }
.due--over { color: #FF8C8C; font-weight: 700; }
.due--soon { color: var(--review); font-weight: 700; }
.chk-done { color: var(--done); }
.move-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); font-size: 11.5px; font-weight: 700; color: var(--muted); }
.move-btn:hover, .move-btn[aria-expanded="true"] { color: var(--ink); border-color: #3D414B; }
.move-btn .ico { width: 13px; height: 13px; }
@media (prefers-reduced-motion: no-preference) {
  .card.is-new { animation: land .45s var(--ease); }
}
@keyframes land { from { transform: scale(.96); box-shadow: 0 0 0 2px var(--lime); } to { transform: none; } }

.menu { position: fixed; z-index: 80; min-width: 190px; padding: 6px; border-radius: 12px; background: var(--panel-3); border: 1px solid #3A3E47; box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .9); }
.menu__label { padding: 6px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.menu__item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; text-align: left; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.menu__item:hover:not(:disabled), .menu__item:focus { background: #343842; outline: none; }
.menu__item:disabled { color: var(--faint); cursor: default; }
.menu__item i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.menu__item small { margin-left: auto; font-size: 11px; color: var(--faint); }
.menu hr { border: 0; border-top: 1px solid #3A3E47; margin: 5px 4px; }

/* ----------------------------- 8. My tasks ----------------------------- */
.mine-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.me-card { display: flex; align-items: center; gap: 12px; }
.me-card__name { font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.me-card__role { font-size: 13px; color: var(--muted); }
.mine-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.stat { padding: 10px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line-2); min-width: 104px; }
.stat b { display: block; font-family: var(--display); font-size: 22px; font-weight: 800; line-height: 1.1; color: var(--c, var(--ink)); }
.stat span { font-size: 12px; color: var(--muted); }
.group { margin-bottom: 18px; }
.group__h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--c, var(--faint)); }
.group__h small { font-size: 12px; color: var(--faint); letter-spacing: 0; }
.rows { border-radius: 14px; background: var(--panel); border: 1px solid var(--line-2); overflow: hidden; }
.row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; align-items: center; gap: 14px; padding: 11px 14px; border-bottom: 1px solid var(--line-2); }
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--panel-2); }
.row__chk { position: relative; width: 20px; height: 20px; }
.row__chk input { appearance: none; -webkit-appearance: none; margin: 0; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid #4A4F5A; background: var(--panel-2); cursor: pointer; display: grid; place-items: center; }
.row__chk input:checked { background: var(--done); border-color: var(--done); }
.row__chk input:checked::after { content: ""; width: 10px; height: 5px; border: 2.2px solid var(--lime-ink); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.row__main { min-width: 0; }
.row__title { display: block; padding: 0; border: 0; background: none; text-align: left; font-weight: 600; font-size: 14px; color: var(--ink); cursor: pointer; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__title:hover { text-decoration: underline; text-underline-offset: 3px; }
.row.is-done .row__title { color: var(--faint); text-decoration: line-through; }
.row__sub { display: flex; gap: 8px; align-items: center; margin-top: 3px; min-width: 0; }
.row__due { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.empty-note { padding: 18px; text-align: center; color: var(--faint); font-size: 13px; }

/* ----------------------------- 9. Workload ----------------------------- */
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 12px; color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.sw--cap { width: 2px; height: 14px; border-radius: 0; background: repeating-linear-gradient(180deg, var(--ink) 0 3px, transparent 3px 5px); }
.wl-chart svg { display: block; overflow: visible; }
.wl-chart .gl { stroke: var(--line-2); }
.wl-chart .ax { font-size: 11px; fill: var(--faint); font-family: var(--sans); }
.wl-chart .nm { font-size: 13px; font-weight: 700; fill: var(--ink); font-family: var(--sans); }
.wl-chart .rl { font-size: 11.5px; fill: var(--faint); font-family: var(--sans); }
.wl-chart .tot { font-size: 12.5px; font-weight: 700; fill: var(--ink); font-family: var(--sans); }
.wl-chart .tot--over { fill: #FF8C8C; }
.wl-chart .cap { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 3 2; opacity: .8; }
.wl-chart .track { fill: var(--panel-2); }
.seg { cursor: pointer; outline: none; transition: opacity .2s; }
.seg:hover, .seg:focus { opacity: .82; }
.seg:focus-visible { stroke: var(--ink); stroke-width: 2; }
@media (prefers-reduced-motion: no-preference) {
  .seg { transform-box: fill-box; transform-origin: 0 50%; animation: widen .6s var(--ease) both; }
}
@keyframes widen { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.table-wrap { position: relative; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); padding: 0 10px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--line-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.member-btn { display: inline-flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; text-align: left; }
.member-btn b { display: block; font-weight: 700; }
.member-btn small { display: block; font-size: 12px; color: var(--muted); }
.member-btn:hover b { text-decoration: underline; text-underline-offset: 3px; }
.load { display: inline-flex; align-items: center; gap: 8px; }
.load__bar { width: 64px; height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.load__bar span { display: block; height: 100%; border-radius: 6px; background: var(--c); }
.over { color: #FF8C8C; font-weight: 700; }

/* ------------------------------- 10. Modal ----------------------------- */
.modal { width: min(880px, calc(100vw - 32px)); max-height: calc(100vh - 40px); padding: 0; border: 1px solid #353943; border-radius: 20px; background: var(--panel); color: var(--ink); box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .95); }
.modal::backdrop { background: rgba(5, 6, 8, .66); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
@media (prefers-reduced-motion: no-preference) { .modal[open] { animation: rise .3s var(--ease); } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.modal__inner { padding: 20px 24px 24px; }
.modal__head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.modal__id { font-size: 12px; font-weight: 700; color: var(--faint); font-variant-numeric: tabular-nums; }
.modal__head .icon-btn { margin-left: auto; }
.modal__title { width: 100%; padding: 6px 8px; margin-left: -8px; border: 1px solid transparent; border-radius: 10px; background: none; font-family: var(--display); font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.modal__title:hover { border-color: var(--line); }
.modal__title:focus { outline: none; border-color: var(--lime); background: var(--panel-2); }
.modal__grid { display: grid; grid-template-columns: minmax(0, 1fr) 236px; gap: 24px; margin-top: 14px; }
.modal__main { display: grid; gap: 22px; align-content: start; min-width: 0; }
.modal__side { display: grid; gap: 12px; align-content: start; padding: 14px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line-2); }
.modal__side .field input, .modal__side .select { background-color: var(--panel); }
.modal__saved { font-size: 12px; color: var(--faint); }
.modal__saved.is-flash { color: var(--done); }
.modal__actions { display: grid; gap: 8px; }
.chk__head { display: flex; align-items: baseline; justify-content: space-between; }
.chk h3, .cmts h3 { font-family: var(--display); font-size: 15px; font-weight: 700; }
.chk__head span { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chk__bar { height: 5px; border-radius: 5px; background: var(--line); margin: 8px 0 10px; overflow: hidden; }
.chk__bar span { display: block; height: 100%; background: var(--done); border-radius: 5px; transition: width .3s var(--ease); }
.chk__list { display: grid; gap: 2px; margin-bottom: 8px; }
.ci { display: flex; align-items: center; gap: 10px; padding: 6px 6px; border-radius: 8px; }
.ci:hover { background: var(--panel-2); }
.ci input[type="checkbox"] { appearance: none; -webkit-appearance: none; margin: 0; flex: none; width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid #4A4F5A; background: var(--panel-2); display: grid; place-items: center; cursor: pointer; }
.ci input:checked { background: var(--done); border-color: var(--done); }
.ci input:checked::after { content: ""; width: 9px; height: 4.5px; border: 2px solid var(--lime-ink); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.ci label { flex: 1; font-size: 13.5px; cursor: pointer; }
.ci input:checked + label { color: var(--faint); text-decoration: line-through; }
.ci__del { border: 0; background: none; padding: 4px; border-radius: 6px; color: var(--faint); display: inline-flex; opacity: .6; }
.ci__del:hover, .ci__del:focus-visible { opacity: 1; color: #FF8C8C; }
.ci__del .ico { width: 14px; height: 14px; }
.add-row { display: flex; gap: 8px; }
.cmt-list { display: grid; gap: 12px; margin: 10px 0 14px; }
.cmt { display: flex; gap: 10px; }
.cmt__body { flex: 1; min-width: 0; padding: 9px 12px; border-radius: 4px 12px 12px 12px; background: var(--panel-2); border: 1px solid var(--line-2); }
.cmt__by { font-size: 12.5px; font-weight: 700; }
.cmt__by small { font-weight: 500; color: var(--faint); margin-left: 6px; }
.cmt__text { font-size: 13.5px; color: #D4D6DA; margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cmt-add { display: flex; gap: 10px; }
.cmt-add__box { flex: 1; display: grid; gap: 8px; }
.cmt-add__box .btn { justify-self: end; }
.cmt-add textarea { resize: vertical; }

/* ----------------------------- 11. Overlays ---------------------------- */
.tip { position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none; max-width: 240px; padding: 9px 11px; border-radius: 10px; background: #F2F3F5; color: #16171A; font-size: 12.5px; line-height: 1.45; box-shadow: 0 16px 36px -14px rgba(0, 0, 0, .8); opacity: 0; transition: opacity .15s; }
.tip.is-on { opacity: 1; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 95; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 11px 16px; border-radius: 12px; background: var(--lime); color: var(--lime-ink); font-size: 13.5px; font-weight: 700; box-shadow: 0 16px 36px -12px rgba(0, 0, 0, .7); transition: opacity .25s, transform .25s var(--ease); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.mob-credit { display: none; }

/* ---------------------------- 12. Responsive --------------------------- */
@media (max-width: 1240px) {
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search input { width: 180px; }
}
@media (max-width: 900px) {
  .app { display: block; }
  body { padding-bottom: 74px; }
  .side { position: fixed; top: auto; left: 0; right: 0; bottom: 0; z-index: 40; height: auto; overflow: visible; flex-direction: row; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line-2); }
  .brand, .ws, .team, .side__foot { display: none; }
  .nav { flex-direction: row; width: 100%; gap: 4px; }
  .nav__link { position: relative; flex: 1; flex-direction: column; justify-content: center; gap: 3px; padding: 7px 2px; font-size: 11px; text-align: center; min-width: 0; }
  .nav__link span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .nav__link--mob { display: flex; }
  .nav__link[aria-current="page"] { box-shadow: inset 0 2px 0 var(--lime); }
  .nav__count { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 17px; font-size: 10.5px; }
  .projects { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; max-height: 70vh; overflow-y: auto; padding: 16px 14px calc(18px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; background: var(--panel); border-top: 1px solid var(--line); box-shadow: 0 -30px 60px -20px rgba(0, 0, 0, .9); transform: translateY(105%); visibility: hidden; transition: transform .3s var(--ease), visibility .3s; }
  .projects.is-open { transform: none; visibility: visible; }
  .projects .projects__close { display: grid; }
  .proj { padding: 11px 10px; font-size: 14px; }
  .top { padding: 12px 16px; gap: 10px; }
  .top__title { font-size: 21px; }
  .top__tools { margin-left: 0; width: 100%; }
  .search { flex: 1; }
  .search input { width: 100%; }
  #main { padding: 14px 16px 26px; }
  .modal__grid { grid-template-columns: minmax(0, 1fr); }
  .modal__side { order: -1; grid-template-columns: 1fr 1fr; }
  .modal__side .modal__saved, .modal__side .modal__actions { grid-column: 1 / -1; }
  .mob-credit { display: block; text-align: center; font-size: 12px; color: var(--faint); margin-top: 22px; }
}
@media (max-width: 640px) {
  .top { position: relative; }
  .btn--ghost span { display: none; }
  .btn--ghost { width: 38px; padding: 0; }
  .board { grid-template-columns: minmax(0, 1fr); }
  .col-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-bottom: 12px; padding: 4px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line-2); }
  .col-tab { padding: 7px 2px; border: 0; border-radius: 9px; background: none; font-size: 12px; font-weight: 700; color: var(--muted); line-height: 1.2; }
  .col-tab b { display: block; font-size: 15px; color: var(--ink); font-family: var(--display); }
  .col-tab[aria-pressed="true"] { background: var(--panel-3); color: var(--ink); box-shadow: inset 0 -2px 0 var(--c); }
  .col:not(.is-current) { display: none; }
  .filters__sum { margin-left: 0; width: 100%; }
  .hint { display: none; }
  .modal__inner { padding: 16px 16px 20px; }
  .modal__title { font-size: 20px; }
  .modal { max-height: calc(100vh - 24px); width: calc(100vw - 16px); }
  .row { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; padding: 11px 12px; }
  .row .prio, .row .av { display: none; }
  .hide-sm { display: none; }
  .panel { padding: 16px; }
  .stat { min-width: 0; flex: 1; padding: 9px 11px; }
  .member-btn small, .member-btn .av, .load__bar { display: none; }

  .table th, .table td { padding-left: 6px; padding-right: 6px; }
  .table th { letter-spacing: .04em; font-size: 10.5px; }
}
