/* OSA Internal Management — v2 design system ("clean light", with dark mode) */
@font-face { font-family: 'Inter'; src: url('../fonts/inter.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #FFFFFF; --canvas: #FAFAFA; --surface: #FFFFFF; --surface-2: #FAFAFA; --hover: #F4F4F5;
  --line: #EBEBEB; --line-2: #DEDEE1; --input: #D4D4D8; --input-hover: #A1A1AA;
  --text: #0A0A0A; --body: #3F3F46; --muted: #71717A; --faint: #A1A1AA;
  --accent: #1A7A8A; --accent-strong: #146472; --accent-soft: #EAF6F7; --accent-line: #A8D5DB;
  --btn: #0A0A0A; --btn-hover: #27272A; --btn-ink: #FFFFFF;
  --warn: #B86D08; --danger: #D93F3F; --ok: #1E8A4A;
  --shadow-xs: 0 1px 2px rgba(0,0,0,.04);
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-lg: 0 20px 50px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.05);
  --overlay: rgba(10,10,10,.28);
  --r-sm: 7px; --r: 10px; --r-lg: 12px;
  --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
  --dock: 480px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0B0B0C; --canvas: #0F0F11; --surface: #131315; --surface-2: #18181B; --hover: #1E1E22;
  --line: #232326; --line-2: #2E2E33; --input: #3A3A40; --input-hover: #55555D;
  --text: #F4F4F5; --body: #D4D4D8; --muted: #A1A1AA; --faint: #71717A;
  --accent: #3FB8C8; --accent-strong: #62CBD8; --accent-soft: rgba(63,184,200,.12); --accent-line: rgba(63,184,200,.42);
  --btn: #F4F4F5; --btn-hover: #FFFFFF; --btn-ink: #0A0A0A;
  --warn: #E8A33B; --danger: #F06A6A; --ok: #3DD68C;
  --shadow-xs: none; --shadow: 0 1px 2px rgba(0,0,0,.5);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.04);
  --overlay: rgba(0,0,0,.55); color-scheme: dark;
} }
:root[data-theme="dark"] {
  --bg: #0B0B0C; --canvas: #0F0F11; --surface: #131315; --surface-2: #18181B; --hover: #1E1E22;
  --line: #232326; --line-2: #2E2E33; --input: #3A3A40; --input-hover: #55555D;
  --text: #F4F4F5; --body: #D4D4D8; --muted: #A1A1AA; --faint: #71717A;
  --accent: #3FB8C8; --accent-strong: #62CBD8; --accent-soft: rgba(63,184,200,.12); --accent-line: rgba(63,184,200,.42);
  --btn: #F4F4F5; --btn-hover: #FFFFFF; --btn-ink: #0A0A0A;
  --warn: #E8A33B; --danger: #F06A6A; --ok: #3DD68C;
  --shadow-xs: none; --shadow: 0 1px 2px rgba(0,0,0,.5);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.04);
  --overlay: rgba(0,0,0,.55); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--body); font: 14px/1.45 Inter, system-ui, -apple-system, 'Segoe UI', sans-serif; font-feature-settings: 'cv11', 'ss01'; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, h4 { margin: 0; color: var(--text); font-weight: 600; letter-spacing: -.012em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--accent); }
.mono { font-family: var(--mono); font-size: .9em; letter-spacing: -.01em; font-feature-settings: normal; }
.ic { width: 17px; height: 17px; flex: none; display: block; }
.ic-sm { width: 15px; height: 15px; }
.ic-xs { width: 13px; height: 13px; }
.grip .ic circle { fill: currentColor; stroke: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }
.sp { flex: 1; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.none { color: var(--faint); }
.hint { font-size: 12.5px; color: var(--muted); }
.warn-t { color: var(--warn); font-weight: 600; }
.req, .req-mark { color: var(--danger); }
.req-mark { font-weight: 700; }

/* ── atoms ───────────────────────────── */
.mark { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; color: #fff; font-weight: 800; font-size: 9.5px; letter-spacing: .02em; background: linear-gradient(135deg, #0B2440, #0F4C75 55%, #1A7A8A); }
.sdot, .pdot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--faint)); flex: none; display: inline-block; }
.pdot { border-radius: 3px; }
.ring { width: 14px; height: 14px; border-radius: 50%; flex: none; display: inline-block; position: relative; background: conic-gradient(var(--c) calc(var(--p) * 1%), transparent 0); box-shadow: inset 0 0 0 1.5px var(--c); }
.ring::after { content: ''; position: absolute; inset: 3.5px; border-radius: 50%; background: var(--bg); }
.ring.big { width: 18px; height: 18px; }
.pri { display: inline-flex; align-items: flex-end; gap: 1.5px; height: 12px; flex: none; }
.pri i { width: 3px; border-radius: 1px; background: var(--line-2); }
.pri i:nth-child(1) { height: 5px; } .pri i:nth-child(2) { height: 8px; } .pri i:nth-child(3) { height: 11.5px; }
.pri.l1 i:nth-child(1), .pri.l2 i:nth-child(-n+2), .pri.l3 i { background: var(--muted); }
.pri.hi i { background: var(--warn) !important; }
.pri.l3.hi i:nth-child(n) { background: var(--warn); }
.pri.u { width: 14px; height: 14px; border-radius: 4px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; line-height: 1; }
.av { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; font-size: 9.5px; font-weight: 700; color: var(--text); background: var(--surface-2); border: 1px solid var(--line-2); }
.av.c0 { background: #EEE9FB; color: #4B3A8C; border-color: #DCD3F5; }
.av.c1 { background: #E3F5F1; color: #1E6B5C; border-color: #C7EAE2; }
.av.c2 { background: #FCEFDD; color: #8A5A12; border-color: #F4DDBA; }
.av.c3 { background: #E4EEFA; color: #1F4E85; border-color: #C9DCF3; }
.av.c4 { background: #FBE7EC; color: #8C2F49; border-color: #F3CFD9; }
.av.c5 { background: #EEF2E3; color: #4C5E1F; border-color: #DCE5C3; }
:root[data-theme="dark"] .av.c0 { background: #2A2340; color: #CFC2FF; border-color: #3B3159; }
:root[data-theme="dark"] .av.c1 { background: #16322D; color: #9FF0DF; border-color: #224740; }
:root[data-theme="dark"] .av.c2 { background: #3A2A13; color: #FFD49A; border-color: #523C1C; }
:root[data-theme="dark"] .av.c3 { background: #15283F; color: #AFD3FF; border-color: #213A59; }
:root[data-theme="dark"] .av.c4 { background: #3A1A24; color: #FFB8C9; border-color: #532634; }
:root[data-theme="dark"] .av.c5 { background: #262E14; color: #D6EC9C; border-color: #37421E; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .av.c0 { background: #2A2340; color: #CFC2FF; border-color: #3B3159; }
  :root:not([data-theme="light"]) .av.c1 { background: #16322D; color: #9FF0DF; border-color: #224740; }
  :root:not([data-theme="light"]) .av.c2 { background: #3A2A13; color: #FFD49A; border-color: #523C1C; }
  :root:not([data-theme="light"]) .av.c3 { background: #15283F; color: #AFD3FF; border-color: #213A59; }
  :root:not([data-theme="light"]) .av.c4 { background: #3A1A24; color: #FFB8C9; border-color: #532634; }
  :root:not([data-theme="light"]) .av.c5 { background: #262E14; color: #D6EC9C; border-color: #37421E; } }
.av.empty { color: var(--faint); border-style: dashed; background: transparent; }
.avatars { display: inline-flex; }
.avatars .av + .av { margin-left: -5px; box-shadow: 0 0 0 2px var(--surface); }
.prog { display: inline-flex; align-items: center; gap: 8px; width: 100%; min-width: 0; }
.pb { position: relative; flex: 1; min-width: 36px; height: 4px; border-radius: 2px; background: var(--line-2); overflow: hidden; display: block; }
.pb > i { position: absolute; inset: 0 auto 0 0; border-radius: 2px; background: var(--accent); }
.pct { font-size: 11.5px; color: var(--text); min-width: 32px; text-align: right; }
.due { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.due.od { color: var(--danger); font-weight: 600; }
.due.soon { color: var(--warn); font-weight: 600; }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11.5px; font-weight: 600; color: var(--muted); border: 1px solid var(--line-2); white-space: nowrap; }
.tag.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: color-mix(in srgb, var(--warn) 8%, transparent); }
.meta-i { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); white-space: nowrap; }

/* buttons & controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 8px; font-weight: 600; font-size: 13.5px; border: 1px solid transparent; white-space: nowrap; }
.btn-primary { background: var(--btn); color: var(--btn-ink); }
.btn-primary:hover { background: var(--btn-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--line-2); box-shadow: var(--shadow-xs); }
.btn-secondary:hover { border-color: var(--input-hover); }
.btn-block { width: 100%; height: 42px; }
.link-btn { color: var(--accent); font-weight: 500; font-size: 13px; padding: 4px 2px; border-radius: 4px; }
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.link-btn.danger { color: var(--danger); }
.icon-btn { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; color: var(--muted); flex: none; }
.icon-btn:hover { color: var(--text); background: var(--hover); }
.ib { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--body); background: var(--surface); flex: none; }
.x-sm { color: var(--faint); padding: 4px; border-radius: 6px; display: grid; place-items: center; flex: none; }
.x-sm:hover { color: var(--danger); background: var(--hover); }
.seg { display: flex; padding: 2px; gap: 2px; border-radius: 9px; background: var(--hover); border: 1px solid var(--line); }
.seg button { flex: 1 1 0; min-width: 0; height: 30px; padding: 0 10px; border-radius: 7px; font-size: 13px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.seg button:disabled { cursor: default; }
.seg.full { width: 100%; }
.inp, .sel, .ta { width: 100%; min-width: 0; height: 38px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }
.inp:hover, .sel:hover, .ta:hover { border-color: var(--input-hover); }
.inp:focus, .sel:focus, .ta:focus, .prop-in:focus, .title-input:focus, .stage-name:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ta { height: auto; min-height: 88px; padding: 9px 11px; resize: vertical; line-height: 1.5; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .lbl { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid2 > * { min-width: 0; }

/* ── app shell ───────────────────────── */
.app { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.side { display: none; }
.main-col { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: calc(8px + env(safe-area-inset-top)) 16px 8px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); }
.top-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.top h1 { font-size: 22px; font-weight: 700; letter-spacing: -.025em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-tag { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); border-radius: 5px; padding: 1px 5px; flex: none; }
.av-btn { border-radius: 50%; flex: none; }
.av-btn .av { width: 36px; height: 36px; font-size: 12px; }
.d-only { display: none !important; }
.msearch { display: flex; align-items: center; gap: 10px; padding: 0 16px 8px; }
.msearch .search { flex: 1; }
.search { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); color: var(--muted); min-width: 0; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
kbd { font: 500 11px Inter, sans-serif; color: var(--faint); border: 1px solid var(--line-2); border-radius: 4px; padding: 0 5px; line-height: 16px; }
.fbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 4px 16px 12px; }
.chips-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.fchip { position: relative; display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border: 1px dashed var(--input); border-radius: 8px; color: var(--muted); font-size: 12.5px; font-weight: 500; max-width: 100%; min-width: 0; background: transparent; }
.fchip:hover { border-color: var(--input-hover); color: var(--text); }
.fchip.set { border-style: solid; border-color: var(--line-2); background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }
.fchip.set .k { color: var(--muted); }
.fchip b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.fchip select { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.list-opts .fchip select { position: static; opacity: 1; border: 0; background: transparent; font-size: 12.5px; font-weight: 600; color: var(--text); padding: 0; cursor: pointer; outline: none; }
.fchip.danger { border-color: color-mix(in srgb, var(--danger) 50%, transparent); color: var(--danger); background: color-mix(in srgb, var(--danger) 7%, var(--surface)); }
.fcount { font-size: 11px; font-weight: 700; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; display: inline-grid; place-items: center; background: var(--danger); color: #fff; margin-left: 2px; }
main { padding: 0 12px calc(96px + env(safe-area-inset-bottom)); min-width: 0; }

/* mobile tab bar */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--canvas) 92%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-top: 1px solid var(--line); }
.tb { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 500; color: var(--faint); padding: 4px 0; min-width: 0; }
.tb .ic { width: 21px; height: 21px; }
.tb.on { color: var(--text); }
.tb.new span { width: 46px; height: 40px; border-radius: 12px; background: var(--btn); color: var(--btn-ink); display: grid; place-items: center; box-shadow: var(--shadow); }
.tb.new .ic { width: 20px; height: 20px; stroke-width: 2; }
.tb-badge { position: absolute; top: 0; left: calc(50% + 6px); font-style: normal; font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: #fff; display: grid; place-items: center; }

@media (min-width: 900px) {
  .m-only { display: none !important; }
  .d-only { display: flex !important; }
  .app { grid-template-columns: 240px minmax(0, 1fr); }
  .side { display: flex; flex-direction: column; gap: 1px; position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; padding: 12px 10px; background: var(--canvas); border-right: 1px solid var(--line); }
  .top { padding: 0 24px; height: 56px; min-height: 56px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 90%, transparent); }
  .top h1 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
  .top .search { width: 240px; height: 32px; }
  .top .btn { height: 32px; }
  .fbar { padding: 12px 24px; border-bottom: 1px solid var(--line); }
  .list-opts { margin-left: auto; }
  main { padding: 16px 24px 48px; }
  body.has-dock .main-col { margin-right: 0; }
}
@media (min-width: 1200px) {
  body.has-dock .main-col { margin-right: var(--dock); }
}
.view-tabs { display: flex; gap: 2px; margin-left: 6px; }
.tab { height: 28px; padding: 0 10px; border-radius: 7px; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 500; font-size: 13px; }
.tab:hover { color: var(--text); background: var(--hover); }
.tab.on { color: var(--text); background: var(--surface); box-shadow: 0 0 0 1px var(--line-2), var(--shadow-xs); }

/* sidebar */
.logo { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; min-width: 0; }
.logo b { display: block; color: var(--text); font-size: 13.5px; font-weight: 600; }
.logo small { display: block; color: var(--muted); font-size: 11.5px; margin-top: -1px; white-space: nowrap; }
.search-btn { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; margin-bottom: 10px; border: 1px solid var(--line-2); border-radius: 8px; color: var(--muted); background: var(--surface); box-shadow: var(--shadow-xs); }
.search-btn kbd { margin-left: auto; }
.nav { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: 7px; color: var(--body); font-weight: 500; font-size: 13.5px; text-align: left; width: 100%; min-width: 0; }
.nav span:not(.n):not(.pdot) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.nav:hover { background: var(--hover); color: var(--text); }
.nav.on { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--line-2), var(--shadow-xs); }
.nav .ic { color: var(--muted); }
.nav.on .ic { color: var(--text); }
.nav .n { margin-left: auto; font-size: 11.5px; color: var(--faint); font-weight: 500; flex: none; }
.nav .n.hot { color: #fff; background: var(--accent); border-radius: 9px; padding: 0 6px; font-weight: 700; line-height: 17px; }
.sec { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); padding: 18px 10px 6px; }
.side-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.me-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border-radius: 8px; text-align: left; color: var(--muted); }
.me-row:hover { background: var(--hover); }
.me-row .who { flex: 1; min-width: 0; }
.me-row b { display: block; color: var(--text); font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-row small { display: block; font-size: 11.5px; }

/* ── list ────────────────────────────── */
.lwrap { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; box-shadow: var(--shadow-xs); }
.lhead { display: none; }
.grp + .grp { border-top: 1px solid var(--line); }
.grp-head { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 8px 14px; text-align: left; background: var(--surface-2); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.grp-head h3 { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; max-width: 100%; }
.grp-head .sub { font-size: 12.5px; color: var(--muted); }
.grp-head .chev { color: var(--faint); transition: transform .15s; }
.grp.collapsed .grp-head .chev { transform: rotate(-90deg); }
.grp.collapsed .grp-head { border-bottom: 0; }
.grp.collapsed .grp-body { display: none; }
.grp-head.warn h3 { color: var(--danger); }
.gprog { width: 140px; flex: none; }
.lrow { display: grid; align-items: center; cursor: pointer; position: relative; grid-template-columns: 16px auto minmax(0, 1fr) auto auto; grid-template-areas: "ring title title title status" "ring id stage stage stage" "ring prog prog pri due"; gap: 6px 10px; padding: 12px 14px; border-top: 1px solid var(--line); }
.ltable > .lrow:first-child { border-top: 0; }
.lrow:hover { background: var(--hover); }
.lrow.sel { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }
.c-ring { grid-area: ring; align-self: start; padding-top: 2px; display: flex; }
.c-id { grid-area: id; color: var(--muted); font-size: 12px; white-space: nowrap; }
.c-id:empty { display: none; }
.c-title { grid-area: title; min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.c-title .t { color: var(--text); font-weight: 550; overflow-wrap: anywhere; }
.tdisc { display: none; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.c-stage { grid-area: stage; min-width: 0; display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--body); }
.c-stage .k { color: var(--muted); font-size: 11.5px; flex: none; }
.c-stage .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.c-stage .av { width: 20px; height: 20px; font-size: 8.5px; }
.st-due { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.st-due.od { color: var(--danger); font-weight: 600; }
.c-prog { grid-area: prog; min-width: 0; }
.c-prog .prog { max-width: 260px; }
.c-pri { grid-area: pri; display: flex; justify-content: center; }
.c-due { grid-area: due; justify-self: end; }
.c-status { grid-area: status; justify-self: end; align-self: start; }
.spill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 6px; font-size: 12px; font-weight: 500; color: var(--body); white-space: nowrap; background: var(--surface); }
@media (min-width: 900px) {
  .lhead, .lrow { grid-template-columns: 16px 56px minmax(0, 1fr) minmax(0, 180px) 110px 60px; grid-template-areas: none; gap: 12px; }
  .lhead { display: grid; align-items: center; height: 34px; padding: 0 14px; font-size: 11.5px; font-weight: 500; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--surface); }
  .lrow { height: 46px; padding: 0 14px; }
  .lrow > * { grid-area: auto !important; }
  .c-ring { align-self: center; padding: 0; }
  .c-title { flex-wrap: nowrap; }
  .c-title .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .c-pri, .c-status, .lhead > :nth-child(6), .lhead > :nth-child(8) { display: none; }
  .c-due { justify-self: start; align-self: center; order: 9; }
  .lhead > :nth-child(7) { order: 9; }
  .c-pri { justify-content: flex-start; }
}
@media (min-width: 1280px) {
  .lhead, .lrow { grid-template-columns: 16px 62px minmax(0, 1fr) minmax(0, 240px) 132px 26px 64px 116px; gap: 14px; }
  .c-pri, .c-status { display: flex; }
  .lhead > :nth-child(6), .lhead > :nth-child(8) { display: block; }
  .c-due, .lhead > :nth-child(7) { order: 0; }
  .c-status { justify-self: start; align-self: center; }
  .tdisc { display: inline-flex; }
}
@media (min-width: 1200px) {
  body.has-dock .lhead, body.has-dock .lrow { grid-template-columns: 16px 56px minmax(0, 1fr) minmax(0, 170px) 104px 56px; gap: 12px; }
  body.has-dock .c-pri, body.has-dock .c-status, body.has-dock .lhead > :nth-child(6), body.has-dock .lhead > :nth-child(8), body.has-dock .tdisc { display: none; }
  body.has-dock .c-due, body.has-dock .lhead > :nth-child(7) { order: 9; }
}
.empty { text-align: center; color: var(--muted); padding: 56px 16px; }
.empty .ic { width: 28px; height: 28px; margin: 0 auto 10px; color: var(--faint); }
.empty p { margin: 0; }

/* ── board ───────────────────────────── */
.board { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
@media (min-width: 640px) { .board { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); } }
@media (min-width: 1500px) { .board { grid-template-columns: repeat(var(--cols, 6), minmax(0, 1fr)); } }
@media (min-width: 1200px) { body.has-dock .board { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); } }
.col { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); min-width: 0; }
.col-head { display: flex; align-items: center; gap: 4px; padding: 8px 8px 8px 12px; }
.col-toggle { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; text-align: left; height: 28px; }
.col-toggle h3 { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.col-toggle .count { font-size: 12px; color: var(--muted); }
.col-toggle .chev { color: var(--faint); transition: transform .15s; opacity: 0; }
.col:hover .col-toggle .chev, .collapsed .col-toggle .chev { opacity: 1; }
.collapsed .col-toggle .chev { transform: rotate(-90deg); }
.col-body { display: flex; flex-direction: column; gap: 8px; padding: 0 8px 8px; min-height: 48px; border-radius: 0 0 var(--r-lg) var(--r-lg); }
.col.collapsed .col-body { display: none; }
.empty-col { font-size: 12.5px; color: var(--faint); text-align: center; padding: 12px; border: 1px dashed var(--line-2); border-radius: var(--r); }
.card { position: relative; display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-xs); cursor: pointer; min-width: 0; }
.card:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.card.sel { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.grip { width: 20px; display: grid; place-items: center; color: var(--faint); cursor: grab; touch-action: none; flex: none; opacity: .55; }
.card:hover .grip, .stage:hover .grip { opacity: 1; }
@media (hover: hover) and (min-width: 900px) { .card .grip { opacity: 0; } .card:hover .grip { opacity: 1; } }
.grip .ic { width: 15px; height: 15px; }
.card-main { flex: 1; min-width: 0; padding: 10px 12px 10px 0; display: grid; gap: 6px; }
.card-l1 { display: flex; align-items: flex-start; gap: 8px; }
.card-l1 .ring { margin-top: 2px; }
.card-title { flex: 1; min-width: 0; color: var(--text); font-weight: 550; font-size: 13.5px; line-height: 1.35; overflow-wrap: anywhere; }
.card-l2 { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); min-width: 0; padding-left: 22px; }
.card-l2 .mono { flex: none; }
.card-l2 .cs { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; color: var(--body); }
.card-l2 .k { color: var(--muted); }
.card-l3 { padding-left: 22px; }
.card-foot { display: flex; align-items: center; gap: 8px; padding-left: 22px; min-height: 22px; }
.drop-ph { border: 1.5px dashed var(--accent); border-radius: var(--r); background: var(--accent-soft); }
.drop-hot { outline: 1.5px dashed var(--accent); outline-offset: -1.5px; }
.is-dragged { display: none !important; }
.drag-ghost { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; box-shadow: var(--shadow-lg); opacity: .96; transform-origin: 0 0; }
body.dragging { user-select: none; -webkit-user-select: none; cursor: grabbing; }

/* ── panels ──────────────────────────── */
.overlay { position: fixed; inset: 0; background: var(--overlay); z-index: 40; animation: fade .15s; }
.panel { position: fixed; z-index: 41; inset: 0; background: var(--surface); display: flex; flex-direction: column; animation: slide-up .2s cubic-bezier(.2,.8,.2,1); }
@media (min-width: 720px) {
  .panel { inset: 0 0 0 auto; width: min(var(--dock), 100vw); border-left: 1px solid var(--line); box-shadow: var(--shadow-lg); animation: slide-in .2s cubic-bezier(.2,.8,.2,1); }
  .panel.narrow { width: min(440px, 100vw); }
}
@media (min-width: 1200px) {
  .overlay.dock-ov { display: none; }
  .panel.dock { box-shadow: -1px 0 0 var(--line), -12px 0 32px rgba(0,0,0,.04); animation: none; z-index: 20; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes slide-up { from { transform: translateY(16px); opacity: 0; } }
@keyframes slide-in { from { transform: translateX(16px); opacity: 0; } }
.panel-head { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: calc(8px + env(safe-area-inset-top)) 10px 8px 20px; border-bottom: 1px solid var(--line); }
.panel-head .titles { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.panel-head h2 { font-size: 15px; white-space: nowrap; }
.panel-head h2.mono { font-size: 13px; color: var(--muted); font-weight: 500; }
.panel-head .sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.panel-head .sub:not(:empty)::before { content: '·'; margin-right: 8px; color: var(--faint); }
.panel.dock .panel-head h2.mono + .sub::before { content: '·'; }
.close-x { width: 34px; height: 34px; display: grid; place-items: center; color: var(--muted); border-radius: 8px; flex: none; }
.close-x:hover { color: var(--text); background: var(--hover); }
.panel-body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 18px 20px 28px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.panel-foot { display: flex; align-items: center; gap: 12px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.panel-foot .btn { flex: 1; height: 38px; }
@media (min-width: 720px) { .panel-foot .btn { flex: 0 0 auto; margin-left: auto; min-width: 180px; } }
.save-state { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.save-state.err { color: var(--danger); }
@media (min-width: 720px) {
  .panel.modal { inset: auto; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 48px)); max-height: min(86vh, 760px); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; animation: pop-in .16s ease-out; }
  .panel.modal .panel-head { padding-top: 8px; }
  .panel.modal .panel-foot { justify-content: flex-end; padding-bottom: 12px; }
  .panel.modal .panel-foot .btn { flex: 0 0 auto; min-width: 150px; margin-left: 0; }
}
@keyframes pop-in { from { opacity: 0; transform: translate(-50%, -48%) scale(.98); } }

/* job detail */
.jd { display: grid; gap: 18px; }
.title-input { width: 100%; display: block; resize: none; overflow: hidden; font-size: 20px; font-weight: 650; letter-spacing: -.02em; line-height: 1.3; color: var(--text); padding: 6px 8px; margin: -6px -8px 0; width: calc(100% + 16px); border: 1px solid transparent; border-radius: 8px; background: transparent; }
.title-input:hover { border-color: var(--line-2); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -6px; }
.pill { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-size: 12.5px; font-weight: 500; box-shadow: var(--shadow-xs); white-space: nowrap; max-width: 100%; }
.pill:hover, .pill[aria-expanded="true"] { border-color: var(--input-hover); }
.pill.status-btn { border-color: color-mix(in srgb, var(--sc) 45%, transparent); background: color-mix(in srgb, var(--sc) 9%, var(--surface)); }
.pill.status-btn .ic { color: var(--muted); }
.pill.date input { border: 0; background: transparent; color: inherit; font: inherit; padding: 0; width: 112px; outline: none; min-width: 0; }
.pill.date.od { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.pills .tag { height: 30px; border-radius: 8px; padding: 0 10px; }
.bigprog { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2); }
.bigprog b { display: block; font-size: 22px; font-weight: 600; color: var(--text); letter-spacing: -.03em; line-height: 1.1; font-family: var(--mono); }
.bigprog small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; }
.bigprog .pb { height: 6px; border-radius: 3px; }
.blk { display: grid; gap: 8px; min-width: 0; }
.h { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.h .hc { color: var(--faint); font-weight: 500; letter-spacing: 0; text-transform: none; }
.h label { cursor: default; }
.stages { display: grid; gap: 4px; }
.stage { display: grid; grid-template-columns: 16px 18px minmax(0, 1fr) auto auto auto; align-items: center; gap: 8px; padding: 5px 6px 5px 2px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.stage.current { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.stage .grip { width: 16px; height: 28px; }
.stage input[type="checkbox"], .ck input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 17px; height: 17px; margin: 0; border: 1.5px solid var(--input); border-radius: 5px; background: var(--surface); display: grid; place-items: center; cursor: pointer; flex: none; }
.stage input[type="checkbox"]:checked, .ck input[type="checkbox"]:checked { background: var(--ok); border-color: var(--ok); }
.stage input[type="checkbox"]:checked::after, .ck input[type="checkbox"]:checked::after { content: ''; width: 9px; height: 4.5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.stage-name { min-width: 0; width: 100%; height: 30px; padding: 0 8px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--text); font-weight: 500; }
.stage-name:hover { border-color: var(--line-2); }
.stage.done .stage-name { color: var(--faint); text-decoration: line-through; }
.stage-who { border-radius: 50%; display: grid; place-items: center; flex: none; }
.stage-who .av { width: 26px; height: 26px; font-size: 9.5px; }
.stage-who:hover .av { box-shadow: 0 0 0 2px var(--line-2); }
.stage-due { position: relative; display: inline-flex; align-items: center; height: 28px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 7px; font-size: 12px; color: var(--body); white-space: nowrap; cursor: pointer; }
.stage-due.empty { color: var(--faint); border-style: dashed; padding: 0 7px; }
.stage-due.od { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); font-weight: 600; }
.stage-due input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; border: 0; padding: 0; cursor: pointer; }
.stage.drag-ghost { width: auto; }
.add-row { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px dashed var(--input); border-radius: var(--r); color: var(--faint); }
.add-row:focus-within { border-style: solid; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); color: var(--accent); }
.add-row input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); height: 100%; }
.ck-list { display: grid; gap: 2px; }
.ck { display: flex; align-items: flex-start; gap: 10px; padding: 5px 2px; }
.ck input[type="checkbox"] { margin-top: 2px; }
.ck .ck-text { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0; color: var(--text); resize: none; outline: none; line-height: 1.45; overflow-wrap: anywhere; }
.ck.done .ck-text { color: var(--faint); text-decoration: line-through; }
.props { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.prop { display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: center; gap: 8px; min-height: 42px; padding: 4px 8px 4px 14px; border-top: 1px solid var(--line); }
.props > .prop:first-child, .fsec-body > .prop:first-child, .props-h + .prop { border-top: 0; }
.props-h { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 10px 14px 4px; }
.prop-l { font-size: 12.5px; color: var(--muted); }
.prop-v { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 32px; padding: 0 8px; border-radius: 7px; border: 1px solid transparent; text-align: left; color: var(--text); font-weight: 500; font-size: 13.5px; }
.prop-v:hover, .prop-v[aria-expanded="true"] { border-color: var(--line-2); background: var(--surface-2); }
.prop-v .chev { margin-left: auto; color: var(--faint); }
.prop-v .pv-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.prop-v.invalid { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 6%, var(--surface)); }
.prop-in { width: 100%; min-width: 0; height: 32px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 7px; background: var(--surface); color: var(--text); font-weight: 500; }
.prop-in:hover { border-color: var(--input-hover); }
input[type="date"].prop-in, input[type="date"].inp { -webkit-appearance: none; appearance: none; }
.fsec { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.fsec-head { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 14px; text-align: left; }
.fsec-head:hover { background: var(--surface-2); }
.fsec-head .ic:first-child { color: var(--muted); }
.fsec-head h3 { font-size: 13.5px; font-weight: 600; }
.fsec-head .sub { font-size: 12px; color: var(--muted); margin-left: auto; }
.fsec-head .chev { color: var(--faint); transition: transform .15s; }
.fsec.collapsed .fsec-head .chev { transform: rotate(-90deg); }
.fsec.collapsed .fsec-body { display: none; }
.fsec-body { border-top: 1px solid var(--line); }
.meta-line { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 12px; color: var(--faint); }
.danger-zone { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.jd-new { display: grid; gap: 8px; }
.jd-new .title-input { margin: 0; width: 100%; border-color: var(--line-2); font-size: 16px; padding: 8px 10px; resize: none; }
.jd-new .props { margin-top: 10px; }

/* popover */
.pop { position: fixed; z-index: 70; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 4px; overflow-y: auto; animation: fade .1s; }
.pop-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 6px 10px; border-radius: 7px; text-align: left; color: var(--text); font-weight: 500; font-size: 13.5px; }
.pop-item:hover { background: var(--hover); }
.pop-item[aria-selected="true"] { background: var(--accent-soft); }
.pop-item .t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pop-item small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; }
.pop-item .tick { color: var(--accent); }
.cbox { width: 16px; height: 16px; border: 1.5px solid var(--input); border-radius: 4px; display: grid; place-items: center; flex: none; }
.pop-item[aria-selected="true"] .cbox { background: var(--accent); border-color: var(--accent); color: #fff; }
.pop-item[aria-selected="true"] .cbox .ic { width: 12px; height: 12px; stroke-width: 2.6; }
.pop-foot { display: flex; justify-content: flex-end; border-top: 1px solid var(--line); margin-top: 4px; padding: 2px 4px 0; }

/* menu & admin */
.menu-user { display: flex; gap: 12px; align-items: center; padding: 0 0 14px; }
.menu-user .av { width: 40px; height: 40px; font-size: 14px; }
.menu-user .name { color: var(--text); font-weight: 600; }
.menu-user .email { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.menu-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 14px; text-align: left; border-top: 1px solid var(--line); color: var(--text); font-weight: 500; }
.menu-item:first-child { border-top: 0; }
.menu-item:hover { background: var(--surface-2); }
.menu-item .ic { color: var(--muted); }
.menu-item .r { margin-left: auto; color: var(--faint); font-size: 12px; font-weight: 500; }
.menu-group-title { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; margin: 18px 2px 8px; }
.version { text-align: center; font-size: 12px; color: var(--faint); margin-top: 20px; }
.role-tag { display: inline-block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--accent-line); color: var(--accent); margin-left: 4px; vertical-align: 1px; }
.admin-row { padding: 12px 14px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.admin-row:first-child { border-top: 0; }
.admin-row .arow-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.admin-row .who { flex: 1; min-width: 0; }
.admin-row .who .n { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.admin-row .who .e { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.admin-row.actions, .admin-row .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.add-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; display: grid; gap: 10px; margin-bottom: 16px; }
.tpl { margin-bottom: 14px; }
.tpl-h { display: grid; grid-template-columns: 22px minmax(0, 1fr) 84px 26px; gap: 8px; padding: 8px 14px 2px; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.tpl-h span:first-child { grid-column: 2; }
.tpl-stage { display: grid; grid-template-columns: 22px minmax(0, 1fr) 84px 26px; gap: 8px; align-items: center; padding: 5px 14px; }
.tpl-stage .inp { height: 34px; }
.tpl-stage .wt { display: flex; align-items: center; gap: 4px; }
.tpl-stage .wt .inp { text-align: right; padding: 0 6px; }
.tpl-stage .wt span { color: var(--muted); font-size: 12px; }
.stage-no { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line-2); display: grid; place-items: center; font-size: 11px; font-weight: 600; color: var(--muted); font-family: var(--mono); }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); }
.row .edge { display: none; }
.row-title { color: var(--text); font-weight: 550; }
.row-meta { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.section { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.section-body .row:first-child { border-top: 0; }

/* sign in */
.signin { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: var(--canvas); background-image: radial-gradient(circle at 1px 1px, var(--line-2) 1px, transparent 0); background-size: 22px 22px; }
.signin-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 32px 26px 26px; box-shadow: var(--shadow-lg); text-align: center; }
.signin-card .mark { width: 44px; height: 44px; border-radius: 12px; font-size: 13px; margin: 0 auto 18px; }
.signin-card .eyebrow { font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.signin-card h1 { font-size: 21px; letter-spacing: -.02em; }
.signin-card p { color: var(--muted); margin: 8px 0 22px; }
.ms-btn { width: 100%; height: 42px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); color: var(--text); font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 10px; box-shadow: var(--shadow-xs); }
.ms-btn:hover { border-color: var(--input-hover); }
.ms-logo { display: grid; grid-template-columns: 8px 8px; gap: 2px; }
.ms-logo i { width: 8px; height: 8px; display: block; }
.note { font-size: 12.5px; color: var(--muted); margin-top: 16px; line-height: 1.5; }
.err-box { border: 1px solid color-mix(in srgb, var(--danger) 50%, transparent); color: var(--danger); background: color-mix(in srgb, var(--danger) 7%, var(--surface)); border-radius: 8px; padding: 9px 11px; font-size: 13px; margin-bottom: 14px; text-align: left; }

/* toast */
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 80; background: var(--btn); color: var(--btn-ink); border-radius: 10px; padding: 10px 14px; font-size: 13px; font-weight: 500; display: flex; gap: 14px; align-items: center; box-shadow: var(--shadow-lg); max-width: calc(100vw - 32px); animation: fade .15s; }
.toast button { color: #62CBD8; font-weight: 700; }
:root[data-theme="dark"] .toast button { color: #146472; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .toast button { color: #146472; } }
@media (min-width: 900px) { .toast { bottom: 24px; } }
.fcount.acc { background: var(--accent); }
.fchip .k { white-space: nowrap; }
@media (max-width: 899px) { .fbar { padding-bottom: 10px; } }
@media (max-width: 440px) {
  .stage { grid-template-columns: 16px 18px minmax(0, 1fr) auto auto; grid-template-areas: "grip cb name name x" "grip . who due ."; row-gap: 2px; }
  .stage > .grip { grid-area: grip; } .stage > input[type="checkbox"] { grid-area: cb; } .stage > .stage-name { grid-area: name; }
  .stage > .stage-who { grid-area: who; justify-self: start; margin-left: 6px; } .stage > .stage-due { grid-area: due; } .stage > .x-sm { grid-area: x; }
}
