/* Joblist — monday-style board. No build step. */
:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #323338;
  --muted: #676879;
  --faint: #9699a6;
  --line: #e6e9ef;
  --line-strong: #d0d4e4;
  --hover: #f5f6f8;
  --primary: #0073ea;
  --primary-hover: #0060c2;
  --danger: #e2445c;
  --blank: #c4c4c4;
  --row-h: 38px;
  --radius: 8px;
  --shadow: 0 6px 20px rgba(0, 0, 0, .16);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.4 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--primary); }
code { background: #eef0f5; padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

/* ---------- buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); cursor: pointer; white-space: nowrap; }
a.btn { text-decoration: none; color: inherit; }
a.btn-primary { color: #fff; }
.btn:hover { background: var(--hover); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-danger { color: var(--danger); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: rgba(0,0,0,.05); }
.btn-sm { height: 26px; padding: 0 8px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; height: 38px; }
.badge { background: var(--primary); color: #fff; border-radius: 9px; font-size: 11px; padding: 0 6px; line-height: 17px; }
input[type=text], input[type=search], input[type=password], input[type=email], input[type=number], input[type=date], input[type=url], input:not([type]), select, textarea {
  border: 1px solid var(--line-strong); border-radius: 6px; padding: 6px 8px; background: #fff; outline: none; min-width: 0;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(0,115,234,.15); }
.inline-form { display: inline; margin: 0; }

/* ---------- auth pages ---------- */
.auth-page { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.auth-card { width: 100%; max-width: 380px; background: var(--surface); border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,.08); padding: 28px; }
.auth-card form { display: grid; gap: 14px; }
.auth-card label { display: grid; gap: 5px; font-size: 13px; color: var(--muted); }
.auth-card input { height: 38px; font-size: 15px; color: var(--text); }
.auth-logo { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 700; margin-bottom: 18px; }
.form-error { background: #fde8eb; color: #b3263c; padding: 9px 12px; border-radius: 6px; font-size: 13px; }
.form-ok { background: #e3f8ee; color: #087443; padding: 9px 12px; border-radius: 6px; font-size: 13px; }
.logo-mark { width: 26px; height: 26px; border-radius: 7px; background:
  linear-gradient(#fff,#fff) 6px 7px / 14px 2.5px no-repeat,
  linear-gradient(#fff,#fff) 6px 12px / 10px 2.5px no-repeat,
  linear-gradient(#fff,#fff) 6px 17px / 6px 2.5px no-repeat, #579bfc; flex: none; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 10px 18px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 17px; }
.toolbar { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.search-wrap input { width: 230px; height: 32px; }
.topbar-right { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.save-state { min-width: 64px; text-align: right; font-size: 12px; color: var(--faint); transition: opacity .3s; }
.save-state.saving { color: var(--muted); }
.save-state.saved { color: #00a35c; }
.save-state.error { color: var(--danger); }

/* ---------- board ---------- */
.board { padding: 18px 18px 80px; overflow-x: auto; }
.loading { color: var(--muted); padding: 40px; text-align: center; }
.group { margin-bottom: 34px; --gc: #579bfc; width: max-content; min-width: 100%; }
.group-head { position: sticky; left: 0; display: flex; align-items: center; gap: 8px; height: 36px; width: max-content; max-width: 100vw; padding-right: 10px; }
.group-toggle { width: 24px; height: 24px; border: 0; background: none; color: var(--gc); cursor: pointer; border-radius: 4px; display: grid; place-items: center; transition: transform .15s; }
.group-toggle:hover { background: rgba(0,0,0,.05); }
.group.collapsed .group-toggle { transform: rotate(-90deg); }
.group-name { font-size: 17px; font-weight: 600; color: var(--gc); padding: 2px 6px; border-radius: 4px; border: 1px solid transparent; cursor: text; }
.group-name:hover { border-color: var(--line-strong); }
.group-name-input { font-size: 17px; font-weight: 600; color: var(--gc); width: 260px; }
.group-count { color: var(--faint); font-size: 13px; }
.group-menu-btn { opacity: 0; }
.group-head:hover .group-menu-btn, .group-menu-btn:focus { opacity: 1; }

table.grid { border-collapse: separate; border-spacing: 0; table-layout: fixed; background: var(--surface); }
.grid th, .grid td { height: var(--row-h); border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 0; font-weight: normal; position: relative; }
.grid thead th { height: 34px; color: var(--muted); font-size: 13px; text-align: center; background: var(--surface); border-top: 1px solid var(--line); user-select: none; }
.grid thead th .th-inner { display: flex; align-items: center; justify-content: center; gap: 4px; height: 100%; padding: 0 6px; cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.grid thead th .th-inner:hover { background: var(--hover); }
.grid thead th .sort-ind { font-size: 10px; color: var(--primary); }
.grid thead th .col-resize { position: absolute; right: -3px; top: 0; bottom: 0; width: 7px; cursor: col-resize; z-index: 2; }
.grid thead th .col-resize:hover { background: rgba(0,115,234,.25); }
.grid th.c-name, .grid td.c-name { position: sticky; left: 0; z-index: 3; background: var(--surface); text-align: left; border-left: 6px solid var(--gc); }
.grid thead th.c-name { border-top-left-radius: 6px; z-index: 4; }
.grid thead th.c-name .th-inner { justify-content: flex-start; padding-left: 40px; }
.grid tbody tr:hover td { background: var(--hover); }
.grid tbody tr:hover td.c-name { background: #f0f2f6; }
.grid tbody tr.selected td { background: #e5f0ff; }
.grid tbody tr.dragging { opacity: .35; }
.grid tbody tr.drop-before td { box-shadow: inset 0 2px 0 var(--primary); }
.grid tbody tr.drop-after td { box-shadow: inset 0 -2px 0 var(--primary); }
.grid tbody tr.flash td { animation: flash 1.2s ease; }
@keyframes flash { from { background: #fff6c7; } }

.cell { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 0 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; }
.cell.left { justify-content: flex-start; }
.cell .ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell.empty::after { content: ""; }
.cell:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.cell-input { width: 100%; height: 100%; border: 2px solid var(--primary) !important; border-radius: 0 !important; padding: 0 8px !important; box-shadow: none !important; text-align: inherit; background: #fff; }
td.editing { z-index: 5; }

/* name cell */
.name-cell { display: flex; align-items: center; height: 100%; gap: 2px; padding-right: 6px; }
.drag-handle { width: 18px; height: 100%; display: grid; place-items: center; color: var(--faint); cursor: grab; opacity: 0; flex: none; font-size: 12px; letter-spacing: -2px; touch-action: none; }
tr:hover .drag-handle { opacity: 1; }
.row-check { width: 16px; height: 16px; margin: 0 4px 0 2px; flex: none; accent-color: var(--primary); opacity: .35; }
tr:hover .row-check, .row-check:checked { opacity: 1; }
.name-text { flex: 1; min-width: 0; padding: 0 6px; height: 100%; display: flex; align-items: center; cursor: text; }
.name-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.name-text.placeholder span { color: var(--faint); }
.row-actions { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 2px; padding-left: 10px; background: linear-gradient(to right, transparent, #f0f2f6 10px); opacity: 0; pointer-events: none; }
tr:hover .row-actions, tr:focus-within .row-actions { opacity: 1; pointer-events: auto; }
.row-actions.has-updates { opacity: 1; pointer-events: auto; background: linear-gradient(to right, transparent, var(--surface) 10px); }
tr:hover .row-actions.has-updates { background: linear-gradient(to right, transparent, #f0f2f6 10px); }
.open-btn { flex: none; display: flex; align-items: center; gap: 4px; height: 24px; padding: 0 6px; border: 1px solid transparent; background: none; color: var(--muted); border-radius: 4px; cursor: pointer; font-size: 12px; }
.open-btn:hover { border-color: var(--line-strong); background: #fff; }
.open-btn .bubble { width: 16px; height: 16px; }
.open-btn.has-updates { color: var(--primary); }
.row-menu-btn { flex: none; width: 24px; height: 24px; border: 0; background: none; border-radius: 4px; color: var(--muted); cursor: pointer; }
.row-menu-btn:hover { background: rgba(0,0,0,.06); }

/* pill (label) cells */
.pill-cell { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 0 6px; color: #fff; font-size: 13px; cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; position: relative; }
.pill-cell.dark-text { color: #323338; }
.pill-cell.blank { background: var(--blank); }
.pill-cell::after { content: ""; position: absolute; right: 0; top: 0; border-style: solid; border-width: 0 9px 9px 0; border-color: transparent rgba(255,255,255,.55) transparent transparent; opacity: 0; transition: opacity .1s; }
.pill-cell:hover::after { opacity: 1; }

/* misc cell types */
.check { width: 20px; height: 20px; border-radius: 4px; border: 1.5px solid var(--line-strong); display: grid; place-items: center; background: #fff; }
.check.on { background: #00c875; border-color: #00c875; color: #fff; }
.created-cell { gap: 7px; font-size: 12.5px; color: var(--muted); cursor: default; }
.avatar { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-size: 10.5px; font-weight: 600; flex: none; border: 2px solid #fff; }
.avatars { display: flex; }
.avatars .avatar + .avatar { margin-left: -8px; }
.avatar.more { background: #676879; }
.avatar.empty { background: none; border: 1.5px dashed var(--line-strong); color: var(--faint); }
.link-cell { gap: 6px; }
.link-cell a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-cell .edit-pen { flex: none; opacity: 0; border: 0; background: none; cursor: pointer; color: var(--muted); }
td:hover .link-cell .edit-pen { opacity: 1; }
.due-cell.overdue { color: var(--danger); }
.due-cell.soon { color: #d17a00; }
.timer-cell { gap: 8px; font-variant-numeric: tabular-nums; }
.timer-btn { width: 24px; height: 24px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: #e5f0ff; color: var(--primary); flex: none; }
.timer-btn.running { background: var(--danger); color: #fff; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px rgba(226,68,92,.18); } }
.notes-cell { justify-content: flex-start; color: var(--text); font-size: 13px; }

/* add row */
.add-row td { height: 36px; }
.add-row td.c-name { border-left-color: color-mix(in srgb, var(--gc) 40%, white); }
.add-row input { border: 0 !important; box-shadow: none !important; width: 100%; height: 100%; padding: 0 10px 0 40px !important; background: transparent; }
.add-row input:focus { background: #fff; outline: 1px solid var(--primary); }

/* footer summaries */
.sum-row td { height: 38px; border-bottom: 0; border-right: 0; background: transparent; }
.sum-row td.c-name { background: var(--bg); border-left-color: transparent; }
.sum-row td.has-sum { border: 1px solid var(--line); border-top: 0; background: var(--surface); }
.sum { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; font-size: 13px; font-variant-numeric: tabular-nums; }
.sum small { color: var(--faint); font-size: 10.5px; line-height: 1; }
.dist { display: flex; width: calc(100% - 12px); height: 22px; border-radius: 2px; overflow: hidden; }
.dist span { height: 100%; }
.group.collapsed table.grid tbody tr:not(.sum-row), .group.collapsed .add-row { display: none; }
.more-row td { height: 44px; }
.more-row td.c-name { padding-left: 40px; }
.more-row .btn { margin-left: 10px; }
.empty-group td.empty-msg { color: var(--faint); font-size: 13px; text-align: left; padding-left: 40px; }

.new-group-btn { margin-top: 4px; }

/* ---------- popovers & menus ---------- */
.pop { position: fixed; z-index: 100; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px; max-height: min(70vh, 520px); overflow: auto; min-width: 180px; animation: popin .12s ease; }
@keyframes popin { from { opacity: 0; transform: translateY(-4px); } }
.pop-backdrop { position: fixed; inset: 0; z-index: 99; }
.label-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; width: 330px; max-width: calc(100vw - 30px); }
.label-grid button { height: 32px; border: 0; border-radius: 3px; color: #fff; cursor: pointer; font-size: 13px; padding: 0 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.label-grid button.dark-text { color: #323338; }
.label-grid button:hover { filter: brightness(1.07); box-shadow: 0 0 0 2px rgba(0,0,0,.12) inset; }
.label-grid button.current { box-shadow: 0 0 0 2px #323338 inset; }
.label-grid button.blank { background: #fff; color: var(--muted); border: 1px dashed var(--line-strong); }
.pop-foot { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 8px; display: flex; justify-content: center; }
.pop-link { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 4px 8px; border-radius: 4px; font-size: 13px; }
.pop-link:hover { background: var(--hover); color: var(--text); }
.menu { display: flex; flex-direction: column; min-width: 190px; padding: 2px 0; }
.menu button { text-align: left; border: 0; background: none; padding: 7px 10px; border-radius: 4px; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.menu button:hover { background: var(--hover); }
.menu button.danger { color: var(--danger); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }
.menu .menu-title { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--faint); padding: 6px 10px 2px; }
.picker { width: 260px; display: grid; gap: 8px; }
.picker-list { display: flex; flex-direction: column; max-height: 260px; overflow: auto; }
.picker-list button, .picker-list label { text-align: left; border: 0; background: none; padding: 6px 8px; border-radius: 4px; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.picker-list button:hover, .picker-list label:hover, .picker-list .active { background: var(--hover); }
.picker-list .current { font-weight: 600; }
.picker-add { color: var(--primary) !important; }
.textarea-pop { width: 340px; display: grid; gap: 8px; }
.textarea-pop textarea { min-height: 140px; resize: vertical; }
.row-end { display: flex; justify-content: flex-end; gap: 8px; align-items: center; }

/* ---------- side panel ---------- */
.panel-backdrop { position: fixed; inset: 0; background: rgba(15,20,40,.25); z-index: 60; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 100vw); background: var(--surface); z-index: 61; box-shadow: -8px 0 30px rgba(0,0,0,.15); display: flex; flex-direction: column; animation: slidein .2s ease; }
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } }
.panel-head { padding: 16px 20px 0; border-bottom: 1px solid var(--line); }
.panel-title { display: flex; align-items: flex-start; gap: 10px; }
.panel-title textarea { flex: 1; font-size: 20px; font-weight: 600; border: 1px solid transparent; resize: none; padding: 4px 6px; line-height: 1.3; min-height: 36px; }
.panel-title textarea:hover { border-color: var(--line-strong); }
.panel-sub { color: var(--muted); font-size: 12.5px; padding: 4px 6px 10px; }
.tabs { display: flex; gap: 2px; }
.tabs button { border: 0; background: none; padding: 10px 12px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.active { color: var(--text); border-bottom-color: var(--primary); }
.panel-body { flex: 1; overflow: auto; padding: 18px 20px 40px; }
.field-grid { display: grid; grid-template-columns: 150px 1fr; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.field-grid > .fl { padding: 0 12px; color: var(--muted); font-size: 13px; display: flex; align-items: center; border-bottom: 1px solid var(--line); background: #fafbfc; min-height: 40px; }
.field-grid > .fv { border-bottom: 1px solid var(--line); min-height: 40px; display: flex; align-items: stretch; min-width: 0; overflow: hidden; }
.field-grid > .fv > * { flex: 1; }
.field-grid > .fv .cell { justify-content: flex-start; }
.composer { display: grid; gap: 8px; margin-bottom: 20px; }
.composer textarea { min-height: 80px; resize: vertical; }
.update { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; }
.update-head { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 6px; }
.update-head .when { color: var(--faint); margin-left: auto; }
.update-body { white-space: pre-wrap; word-wrap: break-word; }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: grid; grid-template-columns: 165px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.activity .when { color: var(--faint); }
.activity .chg { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.activity .old { text-decoration: line-through; color: var(--faint); }
.activity .tag { background: #eef0f5; border-radius: 4px; padding: 1px 6px; }
.time-form { display: grid; grid-template-columns: 100px 140px 1fr auto; gap: 8px; margin-bottom: 16px; }
.time-list { width: 100%; border-collapse: collapse; font-size: 13px; }
.time-list td, .time-list th { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.time-list th { color: var(--muted); font-weight: 500; }
.empty-note { color: var(--faint); padding: 20px 0; text-align: center; }

/* ---------- modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,20,40,.35); z-index: 80; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { background: var(--surface); border-radius: 10px; box-shadow: var(--shadow); width: min(620px, 100%); max-height: 90vh; display: flex; flex-direction: column; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 17px; margin: 0; }
.modal-body { padding: 16px 20px; overflow: auto; }
.modal-foot { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.label-edit-row { display: grid; grid-template-columns: 24px 40px 1fr 160px 30px; gap: 8px; align-items: center; padding: 4px 0; }
.label-edit-row input[type=color] { width: 40px; height: 32px; padding: 2px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; }
.label-edit-row .mv { display: flex; flex-direction: column; }
.label-edit-row .mv button { border: 0; background: none; cursor: pointer; color: var(--muted); line-height: 1; padding: 1px; }
.col-list { display: flex; flex-direction: column; gap: 2px; }
.col-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; border: 1px solid transparent; background: #fff; }
.col-item:hover { background: var(--hover); }
.col-item.drop-before { border-top-color: var(--primary); }
.col-item .grip { cursor: grab; color: var(--faint); }
.col-item label { flex: 1; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.filter-rows { display: grid; gap: 8px; min-width: 520px; }
.filter-row { display: grid; grid-template-columns: 150px 120px 1fr 28px; gap: 6px; align-items: start; }
.filter-vals { display: flex; flex-wrap: wrap; gap: 4px; }
.filter-vals label { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 12px; font-size: 12.5px; cursor: pointer; border: 1px solid var(--line-strong); }
.filter-vals label.on { box-shadow: 0 0 0 2px #323338 inset; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 5px 10px; cursor: pointer; }
.seg button.on { background: #e5f0ff; color: var(--primary); }

/* ---------- bulk bar ---------- */
.bulk-bar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--surface); box-shadow: var(--shadow); border-radius: 10px; padding: 8px 10px 8px 16px; display: flex; align-items: center; gap: 10px; z-index: 40; animation: popin .15s; }
.bulk-bar .count { font-weight: 600; }

/* ---------- toast ---------- */
#toast-root { position: fixed; bottom: 20px; left: 20px; z-index: 200; display: grid; gap: 8px; }
.toast { background: #323338; color: #fff; padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow); font-size: 13px; display: flex; align-items: center; gap: 12px; max-width: 420px; animation: popin .15s; }
.toast.error { background: #b3263c; }
.toast button { background: none; border: 0; color: #9cc9ff; cursor: pointer; font-weight: 600; }

/* ---------- import page ---------- */
.page { max-width: 1000px; margin: 0 auto; padding: 24px 18px 80px; }
.page h1 { font-size: 22px; margin: 0 0 6px; }
.card { background: var(--surface); border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); padding: 18px 20px; margin: 16px 0; }
.card h2 { font-size: 16px; margin: 0 0 10px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: 13.5px; }
.simple-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.simple-table th, .simple-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.simple-table th { color: var(--muted); font-weight: 500; }
.tag-list { display: flex; flex-wrap: wrap; gap: 4px; }
.tag-list span { background: #eef0f5; border-radius: 4px; padding: 1px 7px; font-size: 12.5px; }
.warn { color: #b26a00; }

/* ---------- phones ---------- */
@media (max-width: 760px) {
  :root { --row-h: 42px; }
  .topbar { flex-wrap: wrap; padding: 8px 10px; gap: 8px; }
  .brand-name, .me { display: none; }
  .toolbar { order: 3; flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; }
  .search-wrap { flex: 1; min-width: 120px; }
  .search-wrap input { width: 100%; }
  .topbar-right { margin-left: auto; }
  .board { padding: 12px 0 80px 8px; }
  .grid th.c-name, .grid td.c-name { width: 210px !important; max-width: 210px; }
  .drag-handle { display: none; }
  .row-actions { opacity: 1; pointer-events: auto; background: linear-gradient(to right, transparent, var(--surface) 10px); }
  .open-btn .open-txt { display: none; }
  .field-grid { grid-template-columns: 120px 1fr; }
  .time-form { grid-template-columns: 1fr 1fr; }
  .filter-rows { min-width: 0; }
  .filter-row { grid-template-columns: 1fr 1fr; }
  .label-edit-row { grid-template-columns: 22px 36px 1fr 30px; }
  .label-edit-row select { grid-column: 3 / 4; }
  .activity li { grid-template-columns: 1fr; gap: 2px; }
}
