:root {
  --bg: #f6f7f9; --surface: #ffffff; --surface-2: #f1f3f6; --border: #e3e6eb; --text: #1b1f27; --muted: #677084;
  --accent: #4f46e5; --accent-soft: #eef0ff; --accent-text: #ffffff;
  --green: #12805c; --green-soft: #e3f5ee; --amber: #a15c00; --amber-soft: #fdf1dc;
  --red: #c4302b; --red-soft: #fce8e7; --blue: #1d64c9; --blue-soft: #e5effc; --gray-soft: #eceef2;
  --radius: 10px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  --sidebar: 232px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1116; --surface: #171a21; --surface-2: #1e222b; --border: #2a2f3a; --text: #e7e9ee; --muted: #9098a9;
    --accent: #8b85ff; --accent-soft: #25244a; --accent-text: #0f1116;
    --green: #4cc79a; --green-soft: #15302a; --amber: #f0b454; --amber-soft: #352914;
    --red: #ff7b72; --red-soft: #3a1b1b; --blue: #6ea8ff; --blue-soft: #16263f; --gray-soft: #262a33;
    --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 16px; margin: 0 0 12px; }
h3 { font-size: 14px; margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

/* layout */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { background: var(--surface); border-right: 1px solid var(--border); padding: 16px 12px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; padding: 4px 8px 16px; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: var(--accent-text); display: grid; place-items: center; font-size: 13px; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 14px 10px 4px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--text); font-weight: 500; }
.nav a:hover { background: var(--surface-2); text-decoration: none; }
.nav a.active { background: var(--accent-soft); color: var(--accent); }
.nav svg { width: 17px; height: 17px; flex: none; opacity: .85; }
.nav .count { margin-left: auto; background: var(--red); color: #fff; border-radius: 99px; font-size: 11px; padding: 0 7px; }
.nav .soon { margin-left: auto; font-size: 10px; color: var(--muted); border: 1px solid var(--border); border-radius: 99px; padding: 0 6px; }
.sidebar-foot { margin-top: auto; border-top: 1px solid var(--border); padding-top: 12px; display: flex; align-items: center; gap: 10px; }
.main { min-width: 0; }
.topbar { display: none; }
.page { padding: 24px 32px 48px; max-width: 1400px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* components */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 8px; }
.card-head h2 { margin: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.stat { padding: 14px 16px; }
.stat .label { color: var(--muted); font-size: 12px; font-weight: 500; }
.stat .value { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; }
.stat.warn .value { color: var(--red); }

.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 7px 12px; border-radius: 8px; font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--red); }
.btn.sm { padding: 3px 9px; font-size: 12px; }
.btn.ghost { border-color: transparent; background: transparent; }
.link-btn { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }

.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 99px; background: var(--gray-soft); color: var(--muted); white-space: nowrap; }
.b-green, .b-done, .b-available, .b-active, .b-completed, .b-fulfilled, .b-approved { background: var(--green-soft); color: var(--green); }
.b-amber, .b-review, .b-repair, .b-on_hold, .b-high, .b-pending, .b-expiring { background: var(--amber-soft); color: var(--amber); }
.b-red, .b-urgent, .b-lost, .b-rejected, .b-expired, .b-overdue { background: var(--red-soft); color: var(--red); }
.b-blue, .b-in_progress, .b-assigned, .b-planning { background: var(--blue-soft); color: var(--blue); }
.b-low { background: var(--gray-soft); color: var(--muted); }
.b-medium { background: var(--blue-soft); color: var(--blue); }
.tag { font-size: 11px; padding: 0 7px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }

.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.person { display: inline-flex; align-items: center; gap: 8px; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-2); }
.table-wrap { overflow-x: auto; }
th a { color: inherit; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { color: var(--muted); padding: 18px 0; text-align: center; }

.progress { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }

/* forms */
label { display: block; font-weight: 500; font-size: 13px; margin-bottom: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=url], input[type=search], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
textarea { resize: vertical; }
.field { margin-bottom: 14px; }
.field .help { font-size: 12px; color: var(--muted); margin-top: 3px; }
.field .error, .errorlist { color: var(--red); font-size: 12px; margin: 3px 0 0; padding: 0; list-style: none; }
.field.checkbox label { display: flex; gap: 8px; align-items: center; }
.field ul.checks, .field div[id$=members] { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 12px; max-height: 220px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; }
.field div[id$=members] label { font-weight: 400; display: flex; gap: 6px; align-items: center; margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .wide { grid-column: 1 / -1; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.filters input, .filters select { width: auto; min-width: 140px; padding: 6px 10px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 8px 14px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--accent); border-color: var(--accent); }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg a { padding: 5px 12px; color: var(--muted); border-right: 1px solid var(--border); font-weight: 500; }
.seg a:last-child { border-right: 0; }
.seg a.active { background: var(--accent-soft); color: var(--accent); }
.seg a:hover { text-decoration: none; }

.messages { margin-bottom: 16px; display: grid; gap: 8px; }
.msg { padding: 10px 14px; border-radius: 8px; background: var(--green-soft); color: var(--green); font-weight: 500; }
.msg.error { background: var(--red-soft); color: var(--red); }
.notice { padding: 12px 14px; border-radius: 8px; background: var(--amber-soft); color: var(--amber); display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }

/* kanban */
.board { display: grid; grid-template-columns: repeat(4, minmax(250px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.column { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; min-height: 200px; }
.column-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 10px; font-weight: 600; }
.column-head .n { color: var(--muted); font-weight: 500; margin-left: 6px; }
.dropzone { display: flex; flex-direction: column; gap: 8px; min-height: 60px; border-radius: 8px; }
.dropzone.over { outline: 2px dashed var(--accent); outline-offset: 2px; }
.tcard { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; box-shadow: var(--shadow); cursor: grab; display: block; color: var(--text); }
.tcard:hover { border-color: var(--accent); text-decoration: none; }
.tcard.dragging { opacity: .45; }
.tcard .title { font-weight: 500; margin: 2px 0 8px; }
.tcard .meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.tcard .meta .spacer { flex: 1; }
.quick-add input { background: transparent; border: 1px dashed var(--border); margin-top: 8px; }
.quick-add input:focus { background: var(--surface); border-style: solid; }
.overdue-text { color: var(--red); font-weight: 600; }

/* task page */
.prose { white-space: pre-wrap; word-wrap: break-word; }
.props { display: grid; grid-template-columns: 100px 1fr; gap: 10px; align-items: center; }
.props dt { color: var(--muted); font-size: 12.5px; }
.props dd { margin: 0; }
.props select, .props input { padding: 4px 8px; }
.comment { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.comment:last-of-type { border-bottom: 0; }
.comment .body { flex: 1; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 22px; border-left: 2px solid var(--border); margin-left: 6px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.timeline li.closed::before { border-color: var(--muted); }
.timeline li:last-child { border-color: transparent; }
details.panel { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; background: var(--surface); }
details.panel + details.panel { margin-top: 10px; }
details.panel summary { cursor: pointer; font-weight: 600; }
details.panel[open] summary { margin-bottom: 12px; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.inline-form > * { flex: 1 1 120px; }
.inline-form .btn { flex: 0 0 auto; }

/* auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.auth .card { width: 100%; max-width: 380px; padding: 28px; }

@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .split { grid-template-columns: 1fr; } }
@media (max-width: 800px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; transform: translateX(-100%); transition: transform .2s; z-index: 20; box-shadow: var(--shadow); }
  .shell.nav-open .sidebar { transform: none; }
  .topbar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
  .page { padding: 16px; }
  .g2, .g3, .g4, .form-grid { grid-template-columns: 1fr; }
  .board { grid-template-columns: repeat(4, 82vw); }
}
.bulkbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--accent-soft); border: 1px solid var(--accent); border-radius: var(--radius); padding: 8px 12px; margin-bottom: 12px; position: sticky; top: 8px; z-index: 5; }
.bulkbar[hidden] { display: none; }
.bulkbar select { width: auto; min-width: 220px; padding: 5px 8px; }

/* notification centre */
.brand .grow { flex: 1; }
.bell { position: relative; background: none; border: 1px solid transparent; border-radius: 8px; cursor: pointer; font-size: 16px; padding: 3px 6px; line-height: 1; }
.bell:hover { background: var(--surface-2); }
.bell-count { position: absolute; top: -4px; right: -6px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; border-radius: 99px; padding: 1px 5px; }
.bell-count[hidden] { display: none; }
.bell-panel { position: fixed; top: 56px; left: 16px; width: 380px; max-width: calc(100vw - 32px); max-height: 70vh; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.2); z-index: 50; }
.bell-panel[hidden] { display: none; }
.bell-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.bell-list { overflow-y: auto; padding: 6px; }
.notif { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border-radius: 8px; color: var(--text); }
.notif:hover { background: var(--surface-2); text-decoration: none; }
.notif .grow { display: flex; flex-direction: column; min-width: 0; }
.notif.unread { background: var(--accent-soft); }
.notif.unread .notif-text { font-weight: 600; }
.notif-ico { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; flex: none; font-size: 13px; }
.toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 60; }
.toast { display: flex; gap: 10px; align-items: center; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 10px; padding: 10px 14px; box-shadow: 0 8px 24px rgba(0,0,0,.18); max-width: 360px; transition: opacity .5s, transform .5s; }
.toast:hover { text-decoration: none; }
.toast.out { opacity: 0; transform: translateY(8px); }

/* presence dots on avatars */
[data-presence] { position: relative; }
[data-presence]::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--surface); background: transparent; }
[data-presence].p-online::after { background: #22a06b; }
[data-presence].p-away::after { background: transparent; box-shadow: inset 0 0 0 2px var(--muted); }
@media (max-width: 800px) { .bell-panel { top: 56px; left: auto; right: 16px; } .sidebar .bell { display: none; } }

/* task files */
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 12px; }
.file-tile { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; position: relative; background: var(--surface); }
.file-tile .thumb { height: 100px; display: grid; place-items: center; background: var(--surface-2); overflow: hidden; }
.file-tile .thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-tile .thumb.icon { font-size: 34px; text-decoration: none; }
.file-tile .meta { padding: 6px 8px; display: flex; flex-direction: column; min-width: 0; }
.file-tile form { position: absolute; top: 4px; right: 4px; }
.file-tile form .btn { background: var(--surface); padding: 1px 7px; }
.drop-target { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 2px dashed var(--border); border-radius: 10px; padding: 16px; cursor: pointer; font-weight: 400; text-align: center; margin: 0; }
.drop-target:hover, .drop-target.over { border-color: var(--accent); background: var(--accent-soft); }

/* charts (palette validated: blue #2a78d6 / orange #eb6834 light; #3987e5 / #d95926 dark) */
:root { --series-1: #2a78d6; --series-2: #eb6834; }
@media (prefers-color-scheme: dark) { :root { --series-1: #3987e5; --series-2: #d95926; } }
.chart { margin: 0; }
.chart svg { width: 100%; height: 220px; display: block; overflow: visible; }
.chart .grid { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart .tick { fill: var(--muted); font-size: 10px; }
.chart .ln { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.chart .ln.dashed { stroke: var(--muted) !important; stroke-dasharray: 5 4; }
.chart .s1 { stroke: var(--series-1); fill: var(--series-1); }
.chart .ln.s1, .chart .ln.s2 { fill: none; }
.chart .s2 { stroke: var(--series-2); fill: var(--series-2); }
.chart .bar { stroke: none; }
.chart .dot { stroke: var(--surface); stroke-width: 2; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .hit:hover { fill: color-mix(in srgb, var(--text) 6%, transparent); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-bottom: 6px; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 14px; height: 4px; border-radius: 2px; display: inline-block; }
.sw.s1 { background: var(--series-1); } .sw.s2 { background: var(--series-2); }
.sw.dashed { background: repeating-linear-gradient(90deg, var(--muted) 0 4px, transparent 4px 7px); }
.tip { position: fixed; pointer-events: none; background: var(--text); color: var(--bg); font-size: 12px; padding: 5px 8px; border-radius: 6px; z-index: 70; max-width: 320px; }
.hbar-cell { min-width: 140px; }
.hbar { height: 8px; border-radius: 0 4px 4px 0; background: var(--series-1); min-width: 2px; }
.hbar-track { background: var(--surface-2); border-radius: 4px; }

/* gantt / timeline */
.gantt { display: grid; grid-template-columns: 240px minmax(0, 1fr); padding: 0; overflow: hidden; }
.gantt-labels { border-right: 1px solid var(--border); background: var(--surface); z-index: 2; }
.gantt-corner { height: 48px; border-bottom: 1px solid var(--border); }
.gantt-label { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-bottom: 1px solid var(--border); color: var(--text); font-size: 13px; min-width: 0; }
.gantt-label:hover { background: var(--surface-2); text-decoration: none; }
.gantt-scroll { overflow-x: auto; position: relative; }
.gantt-head { height: 48px; border-bottom: 1px solid var(--border); position: relative; background: var(--surface); }
.gantt-months, .gantt-ticks { position: relative; height: 24px; }
.gantt-months span { position: absolute; top: 0; height: 24px; line-height: 24px; padding-left: 6px; font-size: 12px; font-weight: 600; border-left: 1px solid var(--border); white-space: nowrap; overflow: hidden; }
.gantt-ticks span { position: absolute; top: 0; height: 24px; line-height: 24px; font-size: 10.5px; color: var(--muted); padding-left: 3px; border-left: 1px solid var(--border); white-space: nowrap; }
.gantt-ticks span.we { color: color-mix(in srgb, var(--muted) 60%, transparent); }
.gantt-body { position: relative; }
.gantt-row { position: relative; height: 34px; border-bottom: 1px solid var(--border); }
.gantt-weekend { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.gantt-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--red); opacity: .6; z-index: 1; }
.gantt-bar { position: absolute; top: 6px; height: 22px; border-radius: 6px; display: flex; align-items: center; padding: 0 8px; font-size: 12px; color: #fff; cursor: grab; user-select: none; touch-action: none; overflow: hidden; z-index: 2; }
.gantt-bar:hover { text-decoration: none; filter: brightness(1.08); }
.gantt-bar.saving { opacity: .6; }
.gantt-bar.late { box-shadow: 0 0 0 2px var(--red); }
.gantt-bar .gantt-grip { position: absolute; right: 0; top: 0; bottom: 0; width: 8px; cursor: ew-resize; }
.gantt-bar .gantt-grip:hover { background: rgba(255,255,255,.35); }
.st-todo { background: #8b93a7; } .st-in_progress { background: var(--series-1); } .st-review { background: #b7791f; } .st-done { background: #22a06b; }
.sw.st { height: 10px; width: 14px; border-radius: 3px; } .sw.late-sw { background: transparent; box-shadow: inset 0 0 0 2px var(--red); }
.gantt-bar.portfolio { background: color-mix(in srgb, var(--series-1) 35%, var(--surface)); color: var(--text); cursor: pointer; }
.gantt-bar .progress-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--series-1); opacity: .55; }
.gantt-band { position: absolute; top: 7px; height: 20px; border-radius: 4px; font-size: 11px; line-height: 20px; padding: 0 6px; background: var(--surface-2); border: 1px dashed var(--border); color: var(--muted); overflow: hidden; white-space: nowrap; }
.gantt-band.active { background: var(--blue-soft); border-style: solid; border-color: var(--blue); color: var(--blue); font-weight: 600; }
.gantt-project { position: absolute; top: 14px; height: 6px; border-radius: 3px; background: var(--muted); opacity: .5; }
.gantt-diamond { position: absolute; top: 10px; width: 13px; height: 13px; margin-left: -6px; transform: rotate(45deg); background: var(--amber); border: 2px solid var(--surface); z-index: 3; }
.gantt-diamond.done { background: #22a06b; }
@media (max-width: 800px) { .gantt { grid-template-columns: 130px minmax(0, 1fr); } }
.edit-table td { padding: 4px 6px; }
.edit-table input, .edit-table select { padding: 5px 8px; }
.sprint-move { width: auto; padding: 3px 6px; font-size: 12px; }
table.ts th.num, table.ts td.num, td.num, th.num { text-align: right; }
table.ts td.num input { width: 64px; text-align: right; padding: 5px 6px; }
table.ts .today { background: var(--accent-soft); }
table.ts .we { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }

/* search palette */
.palette-backdrop { position: fixed; inset: 0; background: rgba(10,12,18,.45); z-index: 80; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.palette-backdrop[hidden] { display: none; }
.palette { width: 640px; max-width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 24px 64px rgba(0,0,0,.35); overflow: hidden; display: flex; flex-direction: column; max-height: 70vh; }
.palette input { border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 16px 18px; font-size: 16px; }
.palette input:focus { outline: 0; }
.palette-results { overflow-y: auto; padding: 6px; }
.pal-group { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 10px 4px; font-weight: 600; }
.pal-item { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; color: var(--text); min-width: 0; }
.pal-item .grow { display: flex; flex-direction: column; min-width: 0; }
.pal-item.active, .pal-item:hover { background: var(--accent-soft); text-decoration: none; }
.palette-foot { border-top: 1px solid var(--border); padding: 8px 14px; }
.search-trigger { display: flex; align-items: center; gap: 8px; width: 100%; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; color: var(--muted); font: inherit; cursor: pointer; margin: 0 0 8px; }
.search-trigger kbd, kbd { margin-left: auto; font-size: 11px; border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; background: var(--surface); }
kbd { margin-left: 0; }
.gantt-label .mono { white-space: nowrap; flex: none; }
.gantt-bar { -webkit-user-drag: none; }
