/* SS28 Projects — site-board styling */
:root {
  --bg: #e9ebe8;          /* cured concrete */
  --surface: #ffffff;
  --surface-2: #f4f5f3;
  --ink: #18212b;         /* drafting ink */
  --ink-2: #4a5561;
  --ink-3: #78828c;
  --line: #d3d7d3;
  --line-strong: #aab1ad;
  --brand: #b81d24;       /* SS28 red */
  --brand-ink: #ffffff;
  --brand-soft: #fbe9ea;
  --plan: #e0a100;        /* planned-progress marker, survey yellow */
  --ok: #1f7a46;
  --ok-soft: #e3f3e9;
  --warn: #9a5b00;
  --warn-soft: #fdf1dc;
  --bad: #b81d24;
  --bad-soft: #fbe9ea;
  --info: #24548a;
  --info-soft: #e5eef8;
  --radius-s: 6px;
  --radius: 10px;
  --shadow: 0 1px 0 rgba(24,33,43,.06), 0 2px 8px rgba(24,33,43,.06);
  --sans: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --cond: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12171c; --surface: #1b2128; --surface-2: #222a32; --ink: #eef1f3; --ink-2: #b7c0c8; --ink-3: #8a959f;
    --line: #2f3841; --line-strong: #46515c; --brand: #e0454b; --brand-soft: #3a1c1e; --plan: #f0b72a;
    --ok: #4cc283; --ok-soft: #173326; --warn: #f0b04a; --warn-soft: #3a2c14; --bad: #ef5d62; --bad-soft: #3a1c1e;
    --info: #79aee8; --info-soft: #172a3d; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12171c; --surface: #1b2128; --surface-2: #222a32; --ink: #eef1f3; --ink-2: #b7c0c8; --ink-3: #8a959f;
  --line: #2f3841; --line-strong: #46515c; --brand: #e0454b; --brand-soft: #3a1c1e; --plan: #f0b72a;
  --ok: #4cc283; --ok-soft: #173326; --warn: #f0b04a; --warn-soft: #3a2c14; --bad: #ef5d62; --bad-soft: #3a1c1e;
  --info: #79aee8; --info-soft: #172a3d; --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.45 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--plan); outline-offset: 2px; }
.num, .money { font-variant-numeric: tabular-nums; }
.money { white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: var(--ink); color: #dfe4e8; padding: 18px 12px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; }
:root[data-theme="dark"] .side { background: #0d1115; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .side { background: #0d1115; } }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; text-decoration: none; }
.brand-mark { min-width: 36px; padding: 0 6px; height: 36px; border-radius: 8px; background: var(--brand); color: #fff; display: grid; place-items: center; font: 700 17px/1 var(--cond); letter-spacing: .02em; }
.brand-name { font: 600 19px/1.1 var(--cond); color: #fff; }
.brand-name small { display: block; font: 400 12px/1.3 var(--sans); color: #9aa6b1; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: #c8d0d7; font-weight: 500; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.on { background: rgba(255,255,255,.1); color: #fff; box-shadow: inset 3px 0 0 var(--brand); }
.nav svg { width: 20px; height: 20px; flex: none; }
.nav .badge { margin-left: auto; }
.side-foot { margin-top: auto; padding: 12px; border-top: 1px solid rgba(255,255,255,.1); font-size: 14px; color: #9aa6b1; }
.side-foot strong { color: #fff; display: block; font-weight: 600; }
.side-foot button { background: none; border: 0; color: #c8d0d7; padding: 6px 0 0; cursor: pointer; text-decoration: underline; }

.main { min-width: 0; padding: 24px 28px 60px; }
.topbar { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.topbar h1 { font: 600 30px/1.1 var(--cond); margin: 0; letter-spacing: .005em; }
.topbar .crumb { display: block; font-size: 14px; color: var(--ink-3); margin-bottom: 2px; text-decoration: none; }
.topbar .crumb:hover { color: var(--brand); }
.topbar .grow { flex: 1; min-width: 0; }
.mobile-head, .tabbar { display: none; }

/* ---------- elements ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 16px; border-radius: var(--radius-s); border: 1px solid var(--line-strong); background: var(--surface); font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--ink-2); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { color: var(--bad); }
.btn.sm { min-height: 32px; padding: 4px 10px; font-size: 14px; }
.btn[disabled] { opacity: .55; cursor: wait; }
.btn svg { width: 18px; height: 18px; }
.icon-btn { width: 36px; height: 36px; border-radius: var(--radius-s); border: 0; background: transparent; display: inline-grid; place-items: center; cursor: pointer; color: var(--ink-2); }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font: 600 20px/1.2 var(--cond); margin: 0; flex: 1; }
.panel-body { padding: 16px 18px; }
.panel + .panel, .stack > * + * { margin-top: 16px; }
.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
.grid-2 > .panel + .panel { margin-top: 0; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; border: 1px solid var(--line); }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.badge.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.nav .badge { background: var(--brand); color: #fff; border: 0; }

.muted { color: var(--ink-3); }
.small { font-size: 14px; }
.empty { padding: 28px 18px; text-align: center; color: var(--ink-3); }
.empty strong { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; }
.empty .btn { margin-top: 12px; }

/* ---------- the tape: actual vs planned progress ---------- */
.tape { position: relative; height: 14px; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 3px; overflow: visible;
  background-image: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), var(--line-strong) calc(10% - 1px) 10%); }
.tape > i { position: absolute; inset: 0 auto 0 0; background: var(--ink); border-radius: 2px 0 0 2px; }
.tape.ahead > i, .tape.done > i { background: var(--ok); }
.tape.behind > i { background: var(--brand); }
.tape > b { position: absolute; top: -5px; bottom: -5px; width: 3px; margin-left: -1.5px; background: var(--plan); border-radius: 2px; }
.tape.lg { height: 22px; }
.tape-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--ink-2); margin-top: 6px; }
.tape-meta .pct { font: 600 26px/1 var(--cond); color: var(--ink); }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--ink-3); flex-wrap: wrap; }
.legend span::before { content: ""; display: inline-block; width: 12px; height: 8px; margin-right: 5px; border-radius: 2px; vertical-align: 1px; background: var(--ink); }
.legend .l-plan::before { width: 3px; height: 12px; background: var(--plan); vertical-align: -1px; }
.legend .l-behind::before { background: var(--brand); }
.legend .l-ahead::before { background: var(--ok); }

/* ---------- project list ---------- */
.proj-list { display: grid; gap: 12px; }
.proj { display: grid; grid-template-columns: 1fr 260px; gap: 18px; align-items: center; padding: 16px 18px; text-decoration: none; }
.proj:hover { border-color: var(--line-strong); }
.proj-code { font: 600 14px/1 var(--cond); color: var(--brand); letter-spacing: .03em; }
.proj-name { font-size: 18px; font-weight: 600; margin: 3px 0 2px; }
.proj-sub { font-size: 14px; color: var(--ink-3); display: flex; gap: 12px; flex-wrap: wrap; }
.proj-flags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.stat { padding: 14px 18px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat .k { font-size: 14px; color: var(--ink-3); }
.stat .v { font: 600 26px/1.15 var(--cond); }
.stat .v.bad { color: var(--bad); } .stat .v.ok { color: var(--ok); }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 2px solid var(--line); margin: 0 0 18px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 10px 14px; text-decoration: none; font-weight: 600; color: var(--ink-3); border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tabs a.on { color: var(--ink); border-color: var(--brand); }
.tabs a:hover { color: var(--ink); }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { text-align: left; font-weight: 600; font-size: 13px; color: var(--ink-3); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; }
.tbl tfoot td { font-weight: 700; border-top: 2px solid var(--line-strong); background: var(--surface-2); }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--surface-2); }
.tbl .cat-row td { background: var(--surface-2); font-weight: 600; }

/* ---------- schedule / gantt ---------- */
.gantt { overflow-x: auto; }
.gantt-inner { min-width: 760px; }
.g-row { display: grid; grid-template-columns: 300px 1fr; border-bottom: 1px solid var(--line); min-height: 58px; }
.g-row:last-child { border-bottom: 0; }
.g-label { padding: 10px 14px; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.g-label .nm { font-weight: 600; line-height: 1.25; }
.g-label { position: relative; z-index: 3; background: var(--surface); min-width: 0; }
.g-label .meta { font-size: 13px; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; white-space: nowrap; }
.g-track { position: relative; }
.g-months { display: grid; grid-template-columns: 300px 1fr; border-bottom: 1px solid var(--line-strong); background: var(--surface-2); font-size: 12px; color: var(--ink-3); }
.g-months .ticks { position: relative; height: 28px; }
.g-months .ticks span { position: absolute; top: 7px; padding-left: 5px; border-left: 1px solid var(--line-strong); height: 21px; white-space: nowrap; }
.g-grid { position: absolute; inset: 0; pointer-events: none; }
.g-grid span { position: absolute; top: 0; bottom: 0; border-left: 1px dashed var(--line); }
.g-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--plan); z-index: 2; }
.g-bar { position: absolute; top: 14px; height: 14px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--line-strong); overflow: hidden; }
.g-bar i { position: absolute; inset: 0 auto 0 0; background: var(--ink); }
.g-bar.behind i { background: var(--brand); } .g-bar.ahead i, .g-bar.done i { background: var(--ok); }
.g-actual { position: absolute; top: 34px; height: 5px; border-radius: 3px; background: var(--info); opacity: .75; }
.pct-input { display: flex; align-items: center; gap: 8px; }
.pct-input input[type=range] { flex: 1; accent-color: var(--brand); }

/* ---------- forms & modal ---------- */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 5px; color: var(--ink-2); }
.field small { display: block; color: var(--ink-3); font-size: 13px; margin-top: 4px; }
.input, select.input, textarea.input { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--surface); }
textarea.input { min-height: 96px; resize: vertical; line-height: 1.45; }
.input:focus { border-color: var(--ink-2); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--plan) 45%, transparent); }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 14px; }
.checks { display: grid; gap: 6px; max-height: 220px; overflow: auto; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-s); }
.checks label { display: flex; gap: 8px; align-items: center; }
.checks input { width: 18px; height: 18px; accent-color: var(--brand); }

.modal-back { position: fixed; inset: 0; background: rgba(12,17,22,.55); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal { background: var(--surface); border-radius: 12px; width: min(620px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal.wide { width: min(860px, 100%); }
.modal-head { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; flex: 1; font: 600 22px/1.2 var(--cond); }
.modal-body { padding: 18px 20px 4px; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.modal-foot .left { margin-right: auto; }
.form-err { background: var(--bad-soft); color: var(--bad); padding: 10px 12px; border-radius: var(--radius-s); margin-bottom: 14px; font-weight: 500; }

.toast-wrap { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80; display: grid; gap: 8px; }
.toast { background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 8px; font-weight: 500; box-shadow: 0 6px 20px rgba(0,0,0,.25); animation: toast-in .18s ease-out; }
.toast.err { background: var(--bad); color: #fff; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

/* ---------- daily report ---------- */
.list-edit { display: grid; gap: 8px; }
.list-edit .li { display: grid; gap: 8px; align-items: center; }
.list-edit .li.c2 { grid-template-columns: 1fr 96px 36px; }
.list-edit .li.c3 { grid-template-columns: 1fr 80px 80px 36px; }
.list-edit .li.c3m { grid-template-columns: 1fr 110px 1fr 36px; }
.list-head { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line-strong); background: var(--surface); padding: 6px 12px; border-radius: 999px; cursor: pointer; font-size: 14px; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.section-t { font: 600 18px/1.2 var(--cond); margin: 20px 0 10px; display: flex; align-items: center; gap: 8px; }
.section-t .total { margin-left: auto; font: 500 14px var(--sans); color: var(--ink-3); }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.photo { position: relative; border-radius: 8px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.photo img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; cursor: zoom-in; }
.photo .cap { font-size: 13px; padding: 6px 8px; min-height: 30px; }
.photo .x { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,.6); color: #fff; border: 0; border-radius: 6px; width: 30px; height: 30px; cursor: pointer; }
.photo.pending { opacity: .6; }
.photo .bar { position: absolute; left: 0; bottom: 30px; height: 4px; background: var(--brand); }
.drop { border: 2px dashed var(--line-strong); border-radius: 10px; padding: 18px; text-align: center; color: var(--ink-2); cursor: pointer; display: block; }
.drop:hover { border-color: var(--ink-2); }
.drop input { display: none; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 14px; font-size: 15px; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; }
.prose { white-space: pre-wrap; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.9); z-index: 90; display: grid; place-items: center; padding: 20px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 88vh; border-radius: 6px; }
.lightbox p { color: #fff; text-align: center; margin: 10px 0 0; }
.draft-note { background: var(--warn-soft); color: var(--warn); padding: 10px 12px; border-radius: var(--radius-s); margin-bottom: 14px; font-size: 14px; display: flex; gap: 10px; align-items: center; }

/* ---------- tasks ---------- */
.task { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); align-items: start; }
.task:last-child { border-bottom: 0; }
.task .tick { width: 26px; height: 26px; border-radius: 6px; border: 2px solid var(--line-strong); background: var(--surface); cursor: pointer; display: grid; place-items: center; padding: 0; color: #fff; }
.task .tick.done { background: var(--ok); border-color: var(--ok); }
.task .tick.prog { border-color: var(--info); background: var(--info-soft); }
.task .tick svg { width: 16px; height: 16px; }
.task .t { font-weight: 600; cursor: pointer; }
.task.closed .t { text-decoration: line-through; color: var(--ink-3); }
.task .m { display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); margin-top: 3px; align-items: center; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters .input { width: auto; min-height: 38px; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-s); overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: transparent; padding: 7px 12px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.seg button.on { background: var(--ink); color: var(--bg); }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: var(--bg) repeating-linear-gradient(0deg, transparent 0 39px, color-mix(in srgb, var(--line) 70%, transparent) 39px 40px),
  repeating-linear-gradient(90deg, transparent 0 39px, color-mix(in srgb, var(--line) 70%, transparent) 39px 40px); }
.login form { width: min(380px, 100%); background: var(--surface); padding: 28px; border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 10px 40px rgba(24,33,43,.12); }
.login .brand { padding: 0 0 20px; }
.login .brand-name { color: var(--ink); }
.login .brand-name small { color: var(--ink-3); }
.login .btn { width: 100%; min-height: 46px; margin-top: 6px; }

/* ---------- print ---------- */
.print-only { display: none; }
@media print {
  @page { size: A4; margin: 14mm 12mm; }
  body { background: #fff; color: #000; font-size: 12px; }
  .side, .tabbar, .mobile-head, .topbar, .no-print, .toast-wrap { display: none !important; }
  .shell { display: block; } .main { padding: 0; }
  .panel { border: 0; box-shadow: none; }
  .print-only { display: block; }
  .rpt-print h1 { font: 700 18px var(--cond); margin: 0; }
  .rpt-print .hdr { border-bottom: 2px solid #000; padding-bottom: 6px; margin-bottom: 10px; }
  .rpt-print table { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
  .rpt-print td, .rpt-print th { border: 1px solid #000; padding: 4px 6px; text-align: left; vertical-align: top; font-size: 11.5px; }
  .rpt-print th { background: #eee; }
  .rpt-print .photos { grid-template-columns: repeat(3, 1fr); }
  .rpt-print .photo { break-inside: avoid; border: 1px solid #999; }
  .rpt-print .sign { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 30px; }
  .rpt-print .sign div { border-top: 1px solid #000; padding-top: 4px; text-align: center; }
  .screen-only { display: none !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-2 > .panel + .panel { margin-top: 16px; }
  .proj { grid-template-columns: 1fr; gap: 10px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .shell { display: block; }
  .side { display: none; }
  .main { padding: 12px 16px 96px; }
  .mobile-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 20; }
  .mobile-head .brand-mark { min-width: 30px; height: 30px; font-size: 15px; }
  .mobile-head .brand-name { font-size: 17px; }
  .mobile-head .grow { flex: 1; }
  .mobile-head .icon-btn { color: #fff; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); z-index: 20; padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px; text-decoration: none; font-size: 11.5px; font-weight: 600; color: var(--ink-3); position: relative; }
  .tabbar a.on { color: var(--brand); }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar .badge { position: absolute; top: 3px; left: 54%; padding: 0 5px; font-size: 11px; background: var(--brand); color: #fff; border: 0; }
  .topbar h1 { font-size: 26px; }
  .topbar .actions { width: 100%; display: flex; gap: 8px; }
  .topbar .actions .btn { flex: 1; }
  .panel-head { padding: 12px 14px; } .panel-body { padding: 14px; }
  .task { padding: 12px 14px; }
  .kv { grid-template-columns: 1fr; gap: 0; } .kv dd { margin-bottom: 8px; }
  .modal-back { padding: 0; place-items: end stretch; }
  .modal { width: 100%; max-height: 94vh; border-radius: 14px 14px 0 0; }
  .modal.wide { width: 100%; }
  .modal-foot .btn { flex: 1; }
  .list-edit .li.c3m { grid-template-columns: 1fr 80px 36px; }
  .list-edit .li.c3m .rm-remarks { display: none; }
  .g-row, .g-months { grid-template-columns: 200px 1fr; }
  .g-label .meta > span:last-child { margin-left: 0 !important; width: 100%; }
  .gantt-inner { min-width: 640px; }
  .tbl { font-size: 14px; } .tbl th, .tbl td { padding: 8px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
