/* ProManGlobal demo. Light mode only by design. */
:root {
  color-scheme: light;
  --bg: #e6e4dc;
  --surface: #fffefb;
  --surface-2: #f5f3ed;
  --wash: #e9e7df;
  --ink: #1c1c1a;
  --ink-2: #45443f;
  --ink-3: #66645e;
  --line: #d9d7ce;
  --line-2: #b5b3a8;
  --side: #1c1c1a;
  --side-ink: #b9b8b0;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #e34948;
  --good: #0ca30c; --warn: #fab219; --serious: #ec835a; --crit: #d03b3b;
  --r: 5px;
  --panel-w: 360px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font: 13.5px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
h2 { font-size: 15px; font-weight: 600; }
h3 { font-size: 13.5px; font-weight: 600; }
a { color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { display: block; flex: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d3d2ca; border: 2px solid transparent; background-clip: padding-box; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background-color: #b5b4ab; }

/* Controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); font-weight: 500; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--wash); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #f6f5f1; }
.btn.primary:hover { background: #33332f; }
.btn.light { background: #e1ecfa; border-color: #a9c6ea; color: #174f96; }
.btn.light:hover { background: #d0e1f6; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--wash); }
.btn.danger { color: var(--crit); border-color: #e0b5b0; }
.btn.danger:hover { background: #f8ecea; }
.btn.sm { height: 27px; padding: 0 9px; font-size: 12.5px; }
.btn.block { width: 100%; height: 38px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.ibtn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 0; border-radius: var(--r); background: transparent; color: var(--ink-2); position: relative; }
.ibtn:hover { background: var(--wash); color: var(--ink); }
.ibtn.sm { width: 24px; height: 24px; }
.ibtn.on { background: var(--wash); color: var(--ink); }
.input, .select, textarea.input { width: 100%; height: 32px; padding: 0 9px; border: 1px solid var(--line-2); border-radius: var(--r); background: #fff; }
textarea.input { height: auto; min-height: 72px; padding: 7px 9px; resize: vertical; line-height: 1.45; }
.input:focus, .select:focus { outline: 2px solid var(--ink); outline-offset: -1px; border-color: var(--ink); }
.input.err { border-color: var(--crit); }
.select.inline, .input.inline { width: auto; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > label, .lbl { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.hint { font-size: 12px; color: var(--ink-3); }
.check { display: flex; gap: 8px; align-items: flex-start; }
.check input { margin: 2px 0 0; accent-color: var(--ink); width: 15px; height: 15px; flex: none; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: transparent; height: 30px; padding: 0 11px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button:hover { background: var(--wash); }
.seg button.on { background: var(--ink); color: #f6f5f1; }

/* Layout helpers */
.row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.row.wrap { flex-wrap: wrap; }
.row.top { align-items: flex-start; }
.stack { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.stack.tight { gap: 6px; }
.sp { flex: 1; min-width: 0; }
.muted { color: var(--ink-3); }
.sec { color: var(--ink-2); }
.small { font-size: 12px; }
.b { font-weight: 600; }
.nowrap { white-space: nowrap; }
.trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.num { font-variant-numeric: tabular-nums; text-align: right; }
.grid { display: grid; gap: 14px; min-width: 0; }
.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)); }
.span2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 7px; min-width: 0; box-shadow: 0 1px 2px rgba(28,28,26,.09), 0 3px 10px rgba(28,28,26,.05); }
.card-h { display: flex; align-items: center; gap: 8px; padding: 12px 14px 0; min-height: 36px; }
.card-b { padding: 12px 14px 14px; }
.card-b.flush { padding: 8px 0 2px; }
.page { padding: 18px 20px 72px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.page-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.empty { padding: 26px 14px; text-align: center; color: var(--ink-3); }
.hr { height: 1px; background: var(--line); border: 0; margin: 0; }

/* Tables */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--ink-3); padding: 7px 12px; border-bottom: 1px solid var(--line-2); white-space: nowrap; background: var(--surface); position: sticky; top: 0; }
.tbl td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--surface-2); }
.tbl th.num { text-align: right; }

/* Pills, status and avatars */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 11px; font-size: 11.5px; font-weight: 500; color: var(--ink-2); background: var(--surface); white-space: nowrap; }
.pill.dark { background: var(--ink); color: #f6f5f1; border-color: var(--ink); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--line-2); }
.dot.good { background: var(--good); } .dot.warn { background: var(--warn); }
.dot.serious { background: var(--serious); } .dot.crit { background: var(--crit); }
.dot.ink { background: var(--ink); }
.swatch { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.stripe { width: 4px; align-self: stretch; border-radius: 2px; flex: none; }
.av { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #d9d8d1; color: var(--ink); font-weight: 600; flex: none; overflow: hidden; background-size: cover; background-position: center; user-select: none; }
.av { color: #fff; }
.av.t1 { background: #1f66c1; } .av.t2 { background: #c8501f; } .av.t3 { background: #0f8a5f; } .av.t4 { background: #9a6600; }
.av.t5 { background: #b84a7c; } .av.t6 { background: #1b7a1b; } .av.t7 { background: #5a49c4; } .av.t8 { background: #c23a3a; }
.av.more { background: var(--wash); color: var(--ink); }
.avs { display: inline-flex; align-items: center; }
.avs .av { margin-left: -6px; box-shadow: 0 0 0 2px var(--surface); }
.avs .av:first-child { margin-left: 0; }
.meter { height: 6px; border-radius: 3px; background: var(--wash); overflow: hidden; display: flex; gap: 2px; }
.meter > i { display: block; height: 100%; background: var(--ink); border-radius: 3px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.subtabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line-2); overflow-x: auto; flex: none; }
.subtabs button { border: 0; background: transparent; padding: 8px 12px; font-weight: 500; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.subtabs button:hover { color: var(--ink); }
.subtabs button.on { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }

/* App frame */
body.app { overflow: hidden; }
#frame { display: grid; height: 100vh; grid-template: 54px minmax(0, 1fr) / 56px minmax(0, 1fr) auto; grid-template-areas: "top top top" "side main panel"; }
#topbar { grid-area: top; display: flex; align-items: center; gap: 12px; padding: 0 12px 0 14px; background: var(--surface); border-bottom: 1px solid var(--line); z-index: 30; }
#topbar .logo { flex: none; height: 30px; width: auto; display: block; }
#topbar .logo-wrap { flex: 1 0 auto; }
.search { flex: 0 1 520px; min-width: 110px; position: relative; }
.search .input { padding-left: 32px; background: var(--surface-2); height: 34px; border-color: var(--line-2); text-overflow: ellipsis; }
.search > svg { position: absolute; left: 10px; top: 9px; color: var(--ink-3); pointer-events: none; z-index: 1; }
.top-r { flex: 1 0 auto; display: flex; align-items: center; justify-content: flex-end; gap: 4px; min-width: 0; }
.me { display: flex; align-items: center; gap: 8px; padding: 3px 8px 3px 4px; border: 0; background: transparent; border-radius: var(--r); font-weight: 500; }
.me:hover { background: var(--wash); }
.badge { position: absolute; top: 1px; right: 0; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px; background: #d92d2d; color: #fff; font-size: 10px; font-weight: 700; line-height: 15px; text-align: center; box-shadow: 0 0 0 2px var(--surface); }
#side { grid-area: side; background: var(--side); display: flex; flex-direction: column; align-items: center; padding: 8px 0; gap: 2px; z-index: 20; }
.nav { position: relative; width: 50px; padding: 7px 0 5px; display: flex; flex-direction: column; align-items: center; gap: 3px; border: 0; border-radius: 6px; background: transparent; color: var(--side-ink); font-size: 9.5px; font-weight: 500; }
.nav:hover { background: #2e2e2a; color: #f6f5f1; }
.nav.on { background: #f6f5f1; color: var(--ink); }
#mainwrap { grid-area: main; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.tabstrip { display: flex; align-items: stretch; background: #d8d6cd; border-bottom: 1px solid var(--line-2); flex: none; min-width: 0; }
.tabbar { display: flex; align-items: flex-end; gap: 1px; padding: 6px 8px 0; overflow-x: auto; flex: 1; min-width: 0; }
.tabbar::-webkit-scrollbar { height: 6px; }
.tabbar::-webkit-scrollbar-thumb { background: #8e8c85; border: 0; border-radius: 3px; }
.ts-btn { flex: none; width: 24px; border: 0; background: transparent; color: var(--ink-2); display: flex; align-items: center; justify-content: center; }
.ts-btn:hover:not([disabled]) { background: #c6c4ba; color: var(--ink); }
.ts-btn[disabled] { opacity: .3; cursor: default; }
.tab { display: flex; align-items: center; gap: 6px; height: 31px; padding: 0 5px 0 10px; max-width: 200px; flex: none; border: 1px solid transparent; border-bottom: 0; border-radius: 6px 6px 0 0; background: transparent; color: var(--ink-2); font-size: 12.5px; cursor: pointer; margin-bottom: -1px; }
.tab:hover { background: #cac8be; }
.tab.on { background: var(--bg); border-color: var(--line-2); color: var(--ink); font-weight: 600; }
.tab .x { display: inline-flex; width: 18px; height: 18px; align-items: center; justify-content: center; border-radius: 3px; border: 0; background: transparent; color: var(--ink-3); padding: 0; flex: none; }
.tab .x:hover { background: #bdbbb0; color: var(--ink); }
.tab .pinned-ic { color: var(--ink); }
.tab .ph { width: 5px; }
#main { flex: 1; overflow: auto; min-height: 0; }

/* Right panel */
#panel { grid-area: panel; width: var(--panel-w); background: var(--surface); border-left: 1px solid var(--line-2); display: flex; flex-direction: column; min-height: 0; }
#panel.collapsed { width: 46px; }
#panel.wide { --panel-w: 560px; }
.panel-tabs { background: #d8d6cd; border-bottom: 1px solid var(--line-2); display: flex; align-items: stretch; flex: none; padding-top: 6px; }
.panel-tabs .tabbar { flex: 1; padding: 0 2px 0 6px; }
.panel-tabs .tab { max-width: 150px; }
.panel-tabs .tab.on { background: var(--surface); }
.panel-ctl { display: flex; align-items: center; padding: 0 4px 2px; flex: none; }
#pbody { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
#pfoot { height: 50px; flex: none; border-top: 1px solid var(--line); background: var(--surface-2); }
.rail { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0; flex: 1; min-height: 0; overflow-y: auto; }
.inbox-item { display: flex; gap: 9px; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; width: 100%; text-align: left; align-items: flex-start; }
.inbox-item:hover { background: var(--surface-2); }
.unread { min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #d92d2d; color: #fff; font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center; flex: none; }
.th-head { padding: 10px 12px; border-bottom: 1px solid var(--line); flex: none; }
.th-body { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.th-foot { padding: 8px 10px; border-top: 1px solid var(--line); flex: none; display: flex; flex-direction: column; gap: 6px; }
.msg { display: flex; gap: 8px; align-items: flex-start; }
.msg .bub { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; min-width: 0; overflow-wrap: anywhere; }
.msg.mine { flex-direction: row-reverse; }
.msg.mine .bub { background: var(--ink); color: #f6f5f1; border-color: var(--ink); }
.msg.mine .bub .muted { color: #b9b8b0; }
.att { display: flex; flex-direction: column; gap: 5px; background: #fff; color: var(--ink); border: 1px solid var(--line-2); border-radius: 6px; padding: 6px 7px; margin-top: 5px; min-width: 200px; max-width: 100%; }
.msg.mine .bub .att .muted { color: var(--ink-3); }
.att-img { border: 0; padding: 0; background: var(--wash); border-radius: 4px; overflow: hidden; cursor: zoom-in; display: block; width: 100%; }
.att-img img { display: block; width: 100%; max-height: 170px; object-fit: cover; object-position: top; }
.sys-msg { text-align: center; font-size: 12px; color: var(--ink-3); padding: 2px 8px; }
.mail { border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.mail-h { display: flex; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); align-items: center; }
.mail-b { padding: 9px 10px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Time tracker dock */
#dock { position: fixed; right: 9px; bottom: 9px; z-index: 40; display: flex; justify-content: flex-end; }
.dock-btn { display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); font-weight: 500; font-size: 12.5px; }
.dock-btn:hover { background: var(--wash); }
.dock-btn.run { background: var(--ink); color: #f6f5f1; border-color: var(--ink); font-variant-numeric: tabular-nums; }
.dock-pop { position: fixed; right: 9px; bottom: 48px; width: 410px; max-width: calc(100vw - 18px); background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px; box-shadow: 0 10px 30px rgba(28,28,26,.18); z-index: 41; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #e34948; animation: pulse 1.6s infinite; flex: none; }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }

/* Popovers and modals */
.menu { position: fixed; z-index: 70; background: var(--surface); border: 1px solid var(--line-2); border-radius: 7px; box-shadow: 0 10px 30px rgba(28,28,26,.16); overflow: auto; max-height: 70vh; }
.menu-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 11px; border: 0; background: transparent; text-align: left; }
.menu-item:hover { background: var(--wash); }
.menu-h { padding: 8px 11px 4px; font-size: 11px; font-weight: 700; color: var(--ink-3); letter-spacing: .03em; text-transform: uppercase; }
.overlay { position: fixed; inset: 0; background: rgba(28,28,26,.38); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: var(--surface); border-radius: 9px; width: 100%; max-width: 620px; max-height: 92vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(28,28,26,.3); min-height: 0; }
.modal.lg { max-width: 860px; } .modal.sm { max-width: 440px; }
.modal-h { display: flex; align-items: center; gap: 8px; padding: 13px 16px; border-bottom: 1px solid var(--line); flex: none; }
.modal-b { padding: 16px; overflow-y: auto; min-height: 0; flex: 1; }
.modal-f { display: flex; gap: 8px; justify-content: flex-end; padding: 11px 16px; border-top: 1px solid var(--line); flex: none; flex-wrap: wrap; }
#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: 22px; z-index: 90; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.toast { background: var(--ink); color: #f6f5f1; padding: 8px 14px; border-radius: 6px; font-weight: 500; box-shadow: 0 8px 22px rgba(28,28,26,.25); }
#tip { position: fixed; z-index: 95; pointer-events: none; background: var(--ink); color: #f6f5f1; font-size: 12px; padding: 6px 9px; border-radius: 5px; max-width: 280px; display: none; line-height: 1.4; }
#tip .muted { color: #b9b8b0; }
.choice { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--line-2); border-radius: 7px; background: #fff; text-align: left; align-items: flex-start; width: 100%; }
.choice:hover { border-color: var(--ink); background: var(--surface-2); }
.pick { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border: 0; border-bottom: 1px solid var(--line); background: transparent; width: 100%; text-align: left; }
.pick:hover { background: var(--surface-2); }
.pick.on { background: var(--wash); }
.checkbox { width: 16px; height: 16px; border: 1.5px solid var(--line-2); border-radius: 3px; display: inline-flex; align-items: center; justify-content: center; flex: none; background: #fff; color: #fff; }
.pick.on .checkbox { background: var(--ink); border-color: var(--ink); }

/* KPIs and data blocks */
.kpi { padding: 13px 14px; display: flex; flex-direction: column; gap: 5px; }
.kpi .v { font-size: 25px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
.kpi .v small { font-size: 14px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.kpi .t { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.seg-bar { display: flex; gap: 2px; height: 34px; }
.seg-bar > div { display: flex; align-items: center; padding: 0 8px; font-size: 12px; font-weight: 600; color: #fff; min-width: 2px; overflow: hidden; white-space: nowrap; }
.seg-bar > div:first-child { border-radius: 4px 0 0 4px; } .seg-bar > div:last-child { border-radius: 0 4px 4px 0; }
.hbar { display: grid; grid-template-columns: 150px minmax(0, 1fr) 96px; gap: 8px; align-items: center; padding: 5px 0; cursor: default; }
.hbar .tr { display: flex; flex-direction: column; gap: 2px; }
.hbar .tr i { display: block; height: 7px; border-radius: 0 4px 4px 0; min-width: 2px; }
.heat { display: grid; gap: 2px; font-size: 11.5px; align-items: center; }
.heat .c { height: 26px; border-radius: 3px; display: flex; align-items: center; justify-content: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.risk { display: grid; grid-template-columns: 18px repeat(5, minmax(0, 1fr)); gap: 2px; }
.risk .c { height: 36px; border-radius: 3px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; }
.chart svg { width: 100%; }
.chart text { font: 11px var(--font); fill: var(--ink-3); }
.hv .g { opacity: 0; } .hv:hover .g { opacity: 1; }
.chart-tbl { display: none; max-height: 260px; overflow: auto; font-size: 12px; }
.show-tbl .chart-tbl { display: block; } .show-tbl .chart { display: none; }

/* Gantt */
.gantt { overflow: auto; position: relative; border-top: 1px solid var(--line); background: var(--surface); }
.g-in { width: max-content; min-width: 100%; }
.g-head { display: flex; position: sticky; top: 0; z-index: 4; background: var(--surface); border-bottom: 1px solid var(--line-2); }
.g-corner { position: sticky; left: 0; z-index: 5; width: var(--gw, 290px); flex: none; background: var(--surface); padding: 0 12px; display: flex; align-items: flex-end; padding-bottom: 6px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); border-right: 1px solid var(--line-2); }
.g-body { display: flex; }
.g-names { position: sticky; left: 0; z-index: 3; width: var(--gw, 290px); flex: none; background: var(--surface); border-right: 1px solid var(--line-2); }
.g-row { display: flex; align-items: center; gap: 6px; padding-right: 8px; border: 0; border-bottom: 1px solid #efeee8; background: transparent; width: 100%; text-align: left; font-size: 12.5px; }
.g-row:hover { background: var(--surface-2); }
.g-row.section { font-weight: 700; background: var(--surface-2); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.g-row.phase { font-weight: 600; }
.g-row.spacer { border: 0; background: var(--bg); pointer-events: none; }
.gantt svg text { font: 10.5px var(--font); fill: var(--ink-3); }
.gantt svg .bar { cursor: pointer; }
.gantt svg .bar:hover { opacity: .8; }

/* Plan */
.sec-card { border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); overflow: hidden; }
.sec-h { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); min-height: 44px; }
.ph-h { display: flex; align-items: center; gap: 8px; padding: 7px 12px; font-weight: 600; border-bottom: 1px solid var(--line); min-height: 38px; }
.tk { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 28px; border-bottom: 1px solid #efeee8; min-height: 36px; cursor: pointer; }
.tk:hover { background: var(--surface-2); }
.tk.flat { padding-left: 12px; }
.tk .acts { display: none; }
.tk:hover .acts, .tk:focus-within .acts { display: flex; }
.tk:hover .acts .acts, .tk:focus-within .acts .acts { display: flex; }
@media (hover: none) { .tk .acts { display: flex; } }
.acts { display: flex; gap: 1px; flex: none; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.b-col { background: var(--wash); border-radius: 7px; padding: 8px; display: flex; flex-direction: column; gap: 7px; min-height: 160px; }
.b-col.over { outline: 2px dashed var(--ink-3); outline-offset: -2px; }
.b-card { background: var(--surface); border: 1px solid var(--line); border-left-width: 3px; border-radius: 5px; padding: 8px 9px; cursor: grab; display: flex; flex-direction: column; gap: 6px; }
.b-card:hover { border-color: var(--line-2); }
.steps { display: flex; gap: 2px; flex-wrap: wrap; }
.steps button { border: 0; background: transparent; padding: 6px 10px 6px 6px; display: flex; align-items: center; gap: 7px; color: var(--ink-3); font-weight: 500; border-radius: var(--r); }
.steps button i { width: 21px; height: 21px; border: 1.5px solid var(--line-2); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 11px; font-weight: 700; background: var(--surface); }
.steps button.on { color: var(--ink); font-weight: 600; } .steps button.on i, .steps button.done i { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border: 1px dashed var(--line-2); border-radius: 13px; background: transparent; font-size: 12.5px; color: var(--ink-2); }
.chip:hover { border-style: solid; background: var(--wash); }
.chip.mine { border-style: solid; padding-right: 3px; }
.chip .ibtn { width: 18px; height: 18px; }

/* Calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.cal > div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.cal-d { padding: 5px 7px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); background: var(--surface-2); }
.cal-c { min-height: 102px; padding: 4px 5px; display: flex; flex-direction: column; gap: 2px; background: var(--surface); }
.cal-c.off { background: var(--surface-2); }
.cal-c.off .n { color: var(--line-2); }
.cal-c .n { font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 1px; height: 21px; width: 21px; display: flex; align-items: center; justify-content: center; }
.cal-c.today .n { background: var(--ink); color: #fff; border-radius: 50%; }
.ev { display: flex; align-items: center; gap: 4px; padding: 1px 4px; font-size: 11.5px; border: 0; background: var(--surface-2); border-left: 3px solid var(--ink); border-radius: 2px; text-align: left; width: 100%; min-width: 0; }
.ev:hover { background: var(--wash); }
.ev span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk { display: grid; grid-template-columns: 46px repeat(7, minmax(0, 1fr)); }
.wk-col { position: relative; border-left: 1px solid var(--line); }
.wk-h { height: 44px; border-bottom: 1px solid var(--line); }
.wk-ev { position: absolute; left: 2px; right: 2px; border: 0; border-left: 3px solid; border-radius: 3px; background: var(--wash); font-size: 11.5px; padding: 2px 5px; text-align: left; overflow: hidden; line-height: 1.25; }
.now-row { display: flex; gap: 9px; padding: 8px 0; border-bottom: 1px solid var(--line); align-items: center; }
.now-row:last-child { border-bottom: 0; }

/* Settings and reports */
.split { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 14px; align-items: start; }
.vnav { display: flex; flex-direction: column; gap: 1px; padding: 6px; }
.vnav button { border: 0; background: transparent; padding: 7px 10px; text-align: left; border-radius: var(--r); display: flex; gap: 8px; align-items: center; color: var(--ink-2); }
.vnav button:hover { background: var(--wash); }
.vnav button.on { background: var(--ink); color: #f6f5f1; font-weight: 500; }
.plan-card { border: 1px solid var(--line-2); border-radius: 8px; padding: 16px; display: flex; flex-direction: column; gap: 8px; background: #fff; }
.plan-card.on { border: 2px solid var(--ink); padding: 15px; }
.plan-card .price { font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.plan-card ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 5px; color: var(--ink-2); }
.plan-card li { display: flex; gap: 7px; align-items: flex-start; }

/* Auth and legal pages */
body.auth { display: flex; min-height: 100%; background: var(--bg); }
.auth-left { flex: 1 1 52%; background: var(--ink); color: #f6f5f1; padding: 44px 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; min-height: 100vh; }
.auth-left .logo { height: 40px; width: auto; align-self: flex-start; }
.auth-claim { font-size: 34px !important; color: #f6f5f1 !important; margin: 0; font-weight: 600; }
.auth-left h1 { font-size: 34px; line-height: 1.16; letter-spacing: -.02em; max-width: 520px; font-weight: 600; }
.auth-left p { color: #b9b8b0; font-size: 15px; max-width: 480px; margin-top: 12px; }
.auth-left .auth-claim { line-height: 1.16; letter-spacing: -.02em; max-width: 520px; margin-top: 0; }
.auth-gantt { display: flex; flex-direction: column; gap: 9px; max-width: 540px; }
.auth-gantt div { height: 13px; border-radius: 3px; }
.auth-right { flex: 1 1 48%; display: flex; align-items: center; justify-content: center; padding: 32px 20px; overflow-y: auto; }
.auth-box { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 14px; }
.auth-box.wide { max-width: 620px; }
.auth-foot { font-size: 12px; color: var(--ink-3); display: flex; gap: 12px; flex-wrap: wrap; }
.notice { background: var(--wash); border-radius: 6px; padding: 9px 11px; font-size: 12.5px; color: var(--ink-2); }
.err-msg { color: var(--crit); font-size: 12.5px; }
.err-box { background: #fbeceb; border: 1px solid #e0b5b0; color: #8f2a22; border-radius: 6px; padding: 9px 11px; font-size: 12.5px; }
.legal-wrap { max-width: 780px; margin: 0 auto; padding: 26px 20px 60px; }
.legal-wrap h1 { font-size: 26px; margin-bottom: 4px; }
.legal-wrap h2 { margin: 22px 0 6px; }
.legal-wrap p, .legal-wrap li { color: var(--ink-2); font-size: 14px; line-height: 1.6; }
.legal-nav { display: flex; gap: 6px; flex-wrap: wrap; margin: 18px 0; }

@media print { #frame > *:not(#mainwrap), .tabbar { display: none; } }
@media (max-width: 1320px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .g3, .g2 { grid-template-columns: minmax(0, 1fr); } .span2 { grid-column: auto; } .split { grid-template-columns: minmax(0, 1fr); } .me .nm { display: none; } }
@media (max-width: 860px) { body.auth { flex-direction: column; } .auth-left { min-height: 0; padding: 24px; flex: none; } .auth-left p, .auth-gantt { display: none; } .auth-right { align-items: flex-start; } }
