/* Look and feel follows the ronic.ai design language: warm paper, ink, one indigo accent,
   Plus Jakarta Sans for text, Instrument Serif for display, pill controls, soft sheet shadows. */
:root {
  color-scheme: light;
  --sans: "Plus Jakarta Sans", "Aptos", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", "Times New Roman", serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --bg: #f4efe7; --panel: #fdfbf7; --panel2: #f8f3ed; --ink: #1a1816; --muted: #5a5550; --line: #ddd5c8; --line2: #ebe4d8;
  --accent: #4548e2; --accent-deep: #2b2eb8; --accent-bg: #e9e8f1; --on-accent: #fff;
  --red: #a8392a; --red-bg: #f3e2db; --amber: #6f5622; --amber-bg: #efe6d2; --green: #3a6449; --green-bg: #e3e9dc;
  --s-incoming: #5a5550; --s-incoming-bg: #ebe4d8; --s-ai: #5c5080; --s-ai-bg: #e9e5ec; --s-needs: #3a3ca8; --s-needs-bg: #e9e8f1;
  --s-waiting: #6f5622; --s-waiting-bg: #efe6d2; --s-ready: #35605a; --s-ready-bg: #e0e8e2; --s-done: #5d6657; --s-done-bg: #e7e8dd;
  --shadow: inset 0 .5px 0 rgba(255, 255, 255, .9), 0 1px 2px rgba(26, 24, 22, .06), 0 10px 26px -18px rgba(26, 24, 22, .32);
  --shadow-lg: 0 32px 80px rgba(28, 26, 23, .18), 0 6px 16px rgba(28, 26, 23, .06), 0 0 0 .5px rgba(28, 26, 23, .08);
  --shadow-accent: 0 1px 2px rgba(26, 24, 22, .12);
  --glass: color-mix(in srgb, #f8f3ed 71%, transparent); --float: #1a1816; --on-float: #f4efe7;
  --r: 12px;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font: 13px/1.5 var(--sans); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
h1 { font: 400 30px/1.1 var(--serif); margin: 0; letter-spacing: -.01em; text-wrap: balance; }
h3 { font-size: 14px; margin: 22px 0 8px; font-weight: 650; letter-spacing: -.01em; } h4 { font-size: 10.5px; margin: 14px 0 6px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 650; } h5 { font-size: 12px; margin: 0 0 6px; color: var(--muted); }
button, select, input, textarea { font: inherit; color: inherit; }
select, input[type=text], input[type=search], input[type=date], input:not([type]), textarea { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 4px 10px; min-height: 30px; transition: border-color .2s, box-shadow .2s; }
select:hover, input:hover, textarea:hover { border-color: var(--muted); }
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
textarea { width: 100%; resize: vertical; }
select.on { border-color: var(--accent); background: var(--accent-bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent); color: var(--on-accent); }
kbd { font: 11px ui-monospace, monospace; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 4px; background: var(--panel2); }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12px; }
.muted { color: var(--muted); } .red { color: var(--red); } .amber { color: var(--amber); } .sm { font-size: 12px; } .nw { white-space: nowrap; } .num { text-align: right; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.hint { color: var(--muted); font-size: 12px; margin: 8px 0 0; } .none { color: var(--muted); padding: 14px 4px; text-align: center; font-size: 12px; }
.ic { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; vertical-align: -2px; flex: none; color: var(--muted); }
.cnt { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--line2); color: var(--muted); font-size: 11px; font-weight: 600; text-align: center; text-transform: none; letter-spacing: 0; }
.btn { background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px; min-height: 30px; cursor: pointer; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .2s, background-color .2s; }
.btn:hover { border-color: var(--muted); } .btn:active { transform: scale(.97); }
.btn.pri { background: var(--accent); border-color: transparent; color: var(--on-accent); box-shadow: var(--shadow-accent); } .btn.pri:hover { background: var(--accent-deep); transform: translateY(-1px); } .btn.pri:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; transform: none; } .btn.sm { padding: 0 11px; min-height: 26px; }
.link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-weight: 550; } .link:hover { text-decoration: underline; }
.pill { background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; cursor: pointer; font-weight: 550; transition: border-color .2s, background-color .2s; } .pill.on { background: var(--line2); border-color: var(--ink); color: var(--ink); font-weight: 650; } .pill:hover { border-color: var(--muted); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Shell */
#app { display: grid; grid-template-columns: 212px minmax(0, 1fr); height: 100vh; }
#side { background: var(--panel2); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 16px 12px 14px; gap: 18px; }
.brand { display: flex; gap: 10px; align-items: center; padding: 0 4px; } .mark { background: var(--ink); color: var(--on-accent); font-weight: 700; border-radius: 50%; width: 34px; height: 34px; display: grid; place-items: center; font-size: 12px; letter-spacing: .02em; box-shadow: var(--shadow-accent); flex: none; }
.bn { font: 400 22px/1.05 var(--serif); letter-spacing: -.01em; } .bn small { display: block; font: 500 10.5px/1.4 var(--sans); letter-spacing: 0; color: var(--muted); }
#nav { display: flex; flex-direction: column; gap: 2px; } #nav a { display: flex; justify-content: space-between; align-items: center; padding: 7px 12px; border-radius: 999px; color: var(--ink); font-weight: 550; transition: background-color .2s; }
#nav a:hover { background: var(--line2); text-decoration: none; } #nav a.on { background: var(--line2); color: var(--ink); font-weight: 700; }
.bdg { background: var(--line); color: var(--ink); border-radius: 999px; font-size: 11px; padding: 0 6px; font-weight: 650; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; } .lbl { display: block; font-size: 11px; color: var(--muted); margin: 8px 0 2px; } .side-foot .lbl { margin: 0; }
#mainwrap { display: flex; flex-direction: column; min-width: 0; height: 100vh; }
#top { display: flex; gap: 8px; align-items: center; padding: 10px 22px; border-bottom: 1px solid var(--line); background: var(--glass); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4); }
#q { flex: 1; max-width: 420px; border-radius: 999px; padding-left: 14px; } #today { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.sysban { display: flex; gap: 8px; align-items: center; background: var(--red-bg); color: var(--red); border-bottom: 1px solid var(--red); padding: 7px 22px; font-weight: 550; } .sysban .ic { color: var(--red); } .sysban a { margin-left: auto; color: var(--red); font-weight: 650; text-decoration: underline; white-space: nowrap; }
#main { flex: 1; overflow: auto; padding: 20px 22px 80px; outline: none; }
.ph { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; } .ph .btn { margin-left: auto; } .ph .savedrow { margin: 0 0 0 auto; }
.crumb { color: var(--muted); font-size: 12px; margin-bottom: 6px; }

/* Stage colours */
.st, .chip, .occ { display: inline-block; border-radius: 999px; padding: 1px 8px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.st-incoming { background: var(--s-incoming-bg); color: var(--s-incoming); } .st-ai { background: var(--s-ai-bg); color: var(--s-ai); } .st-needs { background: var(--s-needs-bg); color: var(--s-needs); }
.st-waiting { background: var(--s-waiting-bg); color: var(--s-waiting); } .st-ready { background: var(--s-ready-bg); color: var(--s-ready); } .st-done { background: var(--s-done-bg); color: var(--s-done); }
.flag { display: inline-block; border-radius: 999px; padding: 0 7px; font-size: 11px; font-weight: 600; background: var(--line2); color: var(--muted); white-space: nowrap; }
.flag.red { background: var(--red-bg); color: var(--red); } .flag.amber { background: var(--amber-bg); color: var(--amber); } .flag.green { background: var(--green-bg); color: var(--green); }
.av { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 9.5px; font-weight: 700; color: #fff; vertical-align: middle; flex: none; }
.av-0 { background: #5a5f9e; } .av-1 { background: #a3705f; } .av-2 { background: #5f877b; } .av-3 { background: #998457; } .av-none { background: none; border: 1px dashed var(--muted); color: var(--muted); }

/* Dashboard */
.strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; text-align: left; cursor: pointer; display: flex; align-items: baseline; gap: 10px; box-shadow: var(--shadow); transition: transform .45s var(--ease), border-color .2s, background-color .2s; }
.stat b { font: 400 32px/1 var(--serif); } .stat span { color: var(--muted); font-size: 12px; font-weight: 550; } .stat:hover { border-color: var(--muted); transform: translateY(-1px); }
.stat.on { border-color: var(--accent); background: var(--accent-bg); } .s-needs b { color: var(--s-needs); } .s-overdue b, .s-qafail b { color: var(--red); } .s-waitclient b { color: var(--amber); }
.savedrow, .toolbar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; } .tl { color: var(--muted); font-size: 12px; } .tsep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }
.toolbar select { max-width: 150px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; gap: 2px; background: var(--panel); margin-right: 6px; } .seg button { border: 0; background: none; padding: 2px 13px; cursor: pointer; min-height: 24px; border-radius: 999px; font-weight: 550; } .seg .on { background: var(--line2); color: var(--ink); font-weight: 700; }
.board { overflow: auto; max-height: calc(100vh - 150px); border: 1px solid var(--line); border-radius: 16px; background: var(--panel2); box-shadow: var(--shadow); }
.board-in { min-width: 1120px; }
.cols { display: grid; grid-template-columns: repeat(6, minmax(180px, 1fr)); }
.heads { position: sticky; top: 0; z-index: 3; background: var(--panel); border-bottom: 1px solid var(--line); }
.colh { padding: 9px 11px; font-weight: 650; border-top: 2px solid; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; } .colh small { flex-basis: 100%; color: var(--muted); font-size: 11px; }
.colh.col-incoming { border-color: var(--s-incoming); } .colh.col-ai { border-color: var(--s-ai); } .colh.col-needs { border-color: var(--s-needs); background: var(--s-needs-bg); } .colh.col-waiting { border-color: var(--s-waiting); } .colh.col-ready { border-color: var(--s-ready); } .colh.col-done { border-color: var(--s-done); }
.col { padding: 8px; display: flex; flex-direction: column; gap: 8px; min-height: 44px; border-right: 1px solid var(--line2); } .col:last-child { border-right: 0; }
.col.col-needs { background: color-mix(in srgb, var(--s-needs-bg) 45%, transparent); } .col.over { outline: 2px dashed var(--accent); outline-offset: -3px; }
.col .none { padding: 8px 0; opacity: .7; }
.lane-h { position: sticky; left: 0; margin: 0; padding: 5px 9px; background: var(--line2); color: var(--ink); text-transform: none; letter-spacing: 0; font-size: 12.5px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lane-h2 { margin: 0; padding: 3px 9px 3px 22px; font-size: 12px; color: var(--muted); border-bottom: 1px dashed var(--line); }
.card { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 12px; padding: 9px 11px; cursor: pointer; display: block; color: inherit; box-shadow: var(--shadow); transition: transform .45s var(--ease), border-color .2s; }
.card:hover { border-color: var(--muted); text-decoration: none; transform: translateY(-1px); } .card.od { border-left-color: var(--red); } .card.sel { outline: 2px solid var(--accent); } .card.drag { opacity: .4; }
.card.sys { background: var(--red-bg); border-color: var(--red); } .card.sys .c-client, .card.sys .ic { color: var(--red); }
.c-top { display: flex; align-items: center; gap: 6px; } .c-client { font-size: 10.5px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; } .c-id { margin-left: auto; white-space: nowrap; font-size: 10.5px; color: var(--muted); font-family: ui-monospace, monospace; }
.c-top input { margin: 0; opacity: .35; } .card:hover .c-top input, .card.sel .c-top input { opacity: 1; }
.c-title { font-weight: 650; margin-top: 2px; letter-spacing: -.01em; } .per { font-weight: 400; color: var(--muted); }
.c-need { margin: 2px 0 4px; font-size: 12px; } .col-needs .c-need { color: var(--s-needs); font-weight: 550; } .sub { background: var(--s-ai-bg); color: var(--s-ai); border-radius: 999px; padding: 0 7px; font-size: 11px; font-weight: 600; }
.c-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 6px; font-size: 11.5px; color: var(--muted); } .c-meta span { white-space: nowrap; } .c-top .av { width: 18px; height: 18px; font-size: 9px; } .c-meta .due.red { color: var(--red); font-weight: 650; }
.c-flags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }

/* Tables */
.tblwrap { overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: var(--shadow); }
.tbl { border-collapse: collapse; width: 100%; } .tbl th, .tbl td { padding: 7px 11px; text-align: left; border-bottom: 1px solid var(--line2); vertical-align: top; } .tbl th.num, .tbl td.num { text-align: right; }
.tbl thead th { position: sticky; top: 0; background: var(--panel2); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650; white-space: nowrap; border-bottom: 1px solid var(--line); z-index: 1; }
.tbl tbody tr:last-child td { border-bottom: 0; } .tbl.jobs tbody tr, .tbl.pick tbody tr { cursor: pointer; } .tbl.jobs tbody tr:hover td, .tbl.pick tbody tr:hover td { background: var(--panel2); }
.tbl tr.sel td { background: var(--accent-bg) !important; } .tbl tr.od td:first-child { box-shadow: inset 3px 0 var(--red); } .tbl .ck { width: 24px; } .tbl .need { min-width: 220px; }
.tbl tr.grp td { background: var(--line2); font-weight: 650; cursor: default; } .tbl tr.g2 td { background: var(--panel2); padding-left: 24px; font-weight: 600; color: var(--muted); }
.tbl tr.skipped td { opacity: .5; text-decoration: line-through; } .tbl tr.skipped td:last-child { text-decoration: none; opacity: 1; } .tbl tr.broken td { background: var(--red-bg); }
.tbl tfoot th { background: var(--panel2); font-size: 12px; } .chips { display: flex; flex-wrap: wrap; gap: 4px; } .chip { font-weight: 500; }
.chip.od { box-shadow: inset 3px 0 var(--red); }

/* Month grid */
.mnav { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; } .mnav b { min-width: 130px; text-align: center; font: 400 22px/1 var(--serif); } .calbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; } .calbar .tabs { margin-bottom: 8px; flex: 1; }
.mgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; background: var(--line2); gap: 1px; }
.mdow { background: var(--panel2); padding: 5px 8px; font-size: 10.5px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.mday { background: var(--panel); min-height: 88px; padding: 5px 6px; display: flex; flex-direction: column; gap: 2px; min-width: 0; } .mday.off, .mday.past { background: var(--panel2); } .mday.today { box-shadow: inset 0 0 0 2px var(--accent); }
.mnum { font-size: 11px; color: var(--muted); } .mday.today .mnum { color: var(--accent); font-weight: 700; } .mday .chip, .mday .occ { overflow: hidden; text-overflow: ellipsis; display: block; font-weight: 500; font-size: 11px; }
.occ { font-weight: 550; } a.occ:hover, a.chip:hover { filter: brightness(.95); text-decoration: none; }
.oc-done { background: var(--green-bg); color: var(--green); } .oc-progress { background: var(--s-needs-bg); color: var(--s-needs); } .oc-overdue { background: var(--red-bg); color: var(--red); box-shadow: inset 0 0 0 1px var(--red); } .oc-notstarted { background: var(--line2); color: var(--muted); } .oc-skipped { background: none; color: var(--muted); text-decoration: line-through; border: 1px dashed var(--line); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; color: var(--muted); } .legend i { width: 16px; height: 10px; padding: 0; margin-right: 5px; vertical-align: -1px; }
.tline td { min-width: 104px; } .tline .occ { margin: 1px 0; display: block; width: fit-content; } .nowcol { background: var(--accent-bg) !important; }
.pivot td .occ { display: block; width: fit-content; margin: 1px 0; }

/* Tabs, panels */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 10px; overflow-x: auto; } .tabs > * { background: none; border: 0; border-bottom: 2px solid transparent; padding: 7px 12px; cursor: pointer; color: var(--muted); font-weight: 600; white-space: nowrap; transition: color .2s; }
.tabs > *:hover { color: var(--ink); text-decoration: none; } .tabs .on { color: var(--ink); border-bottom-color: var(--accent); }
.cards3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; } .pcard { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); } .pcard h4:first-child { margin-top: 0; } .pcard ol { margin: 0 0 8px; padding-left: 18px; }
.cl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 3px 12px; margin: 0; } .kv dt { color: var(--muted); } .kv dd { margin: 0; overflow-wrap: anywhere; } .kv.keys { row-gap: 8px; }

/* Job page */
.jhead h1 { margin-bottom: 8px; } .snap { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0 0 10px; } .snap dt { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; color: var(--muted); } .snap dd { margin: 0; display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.needban { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; border: 1px solid var(--line); border-left: 5px solid var(--muted); background: var(--panel); border-radius: 14px; padding: 14px 18px; box-shadow: var(--shadow); }
.nb-t { display: flex; flex-direction: column; min-width: 220px; flex: 1; } .nb-who { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--muted); } .nb-t strong { font: 400 24px/1.15 var(--serif); letter-spacing: -.01em; } .nb-b { display: flex; gap: 6px; flex-wrap: wrap; }
.nb-needs { border-left-color: var(--s-needs); background: var(--s-needs-bg); } .nb-needs .nb-who { color: var(--s-needs); } .nb-waiting { border-left-color: var(--s-waiting); } .nb-waiting .nb-who { color: var(--s-waiting); } .nb-ai { border-left-color: var(--s-ai); } .nb-ai .nb-who { color: var(--s-ai); }
.nb-ready { border-left-color: var(--s-ready); background: var(--s-ready-bg); } .nb-ready .nb-who { color: var(--s-ready); } .nb-done { border-left-color: var(--s-done); } .nb-done .nb-who { color: var(--s-done); }
.steps { list-style: none; display: flex; gap: 0; padding: 0; margin: 10px 0 14px; font-size: 11.5px; } .steps li { flex: 1; padding: 5px 12px; background: var(--line2); color: var(--muted); border-right: 2px solid var(--bg); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.steps li:first-child { border-radius: 999px 0 0 999px; } .steps li:last-child { border-radius: 0 999px 999px 0; border-right: 0; } .steps .past { background: var(--green-bg); color: var(--green); } .steps .past::before { content: "✓ "; } .steps .now { background: var(--ink); color: var(--bg); }
.jgrid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 14px; align-items: start; } .jside section { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; box-shadow: var(--shadow); } .jside h4 { margin-top: 0; }
.tabpanel { min-width: 0; } .jmain .tabpanel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); }
.hist { list-style: none; margin: 0; padding: 0; } .ev { display: grid; grid-template-columns: 96px 18px minmax(0, 1fr); gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line2); } .ev:last-child { border-bottom: 0; }
.ev-when { color: var(--muted); font-size: 12px; white-space: nowrap; } .ev-type { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--muted); } .ev-actor { font-weight: 600; font-size: 12px; } .ev-t { margin-top: 1px; }
.ev.bad .ev-type { color: var(--red); } .ev.ok .ev-type { color: var(--green); } .reasons { margin: 3px 0 0; padding-left: 18px; color: var(--red); }
.verb { margin: 4px 0 0; padding: 8px 14px; border-left: 3px solid var(--amber); background: var(--amber-bg); border-radius: 0 var(--r) var(--r) 0; font: italic 400 17px/1.35 var(--serif); color: var(--ink); } .vlab { display: block; font: 650 10.5px/1.6 var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--amber); } .vlab .ic { color: var(--amber); width: 11px; height: 11px; }
.instr { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; } .instr .muted { margin-top: 3px; }
.qa { border-top: 1px solid var(--line2); padding: 8px 0; } .qa:first-of-type { border-top: 0; padding-top: 0; } .qa p { margin: 0 0 4px; } .qopts { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 6px; } .qa textarea { margin-bottom: 6px; } .qa.done p { color: var(--muted); }
.links { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.outs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; } .fname { font-weight: 600; overflow-wrap: anywhere; margin-bottom: 6px; } .vers { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 4px; }
.vers button { width: 100%; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 5px 8px; cursor: pointer; } .vers button.on { border-color: var(--accent); background: var(--accent-bg); } .vers small { display: block; color: var(--muted); }
.chk { display: flex; gap: 6px; align-items: flex-start; margin: 0 0 10px; font-size: 12px; } .pv-h { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650; margin-bottom: 6px; }
.xl-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 8px; } .xl { border-collapse: collapse; font-size: 12px; width: 100%; background: var(--panel); } .xl th { background: var(--line2); color: var(--muted); font-weight: 500; font-size: 10.5px; padding: 1px 6px; border: 1px solid var(--line); text-align: center; }
.xl td { border: 1px solid var(--line); padding: 3px 7px; white-space: nowrap; } .xl td[data-act] { cursor: cell; } .xl td.hd { font-weight: 650; background: var(--panel2); } .xl td.chg { background: var(--amber-bg); box-shadow: inset 0 0 0 1px var(--amber); } .xl td.cur { outline: 2px solid var(--accent); outline-offset: -2px; } .xl td.has { background-image: linear-gradient(225deg, var(--accent) 6px, transparent 6px); }
.xl tr:last-child td { font-weight: 650; }
.diff { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .pdf { border: 1px solid var(--line); background: var(--panel); padding: 18px 22px; font-family: Georgia, serif; font-size: 13px; max-width: 640px; } .pdf p { margin: 0 0 8px; } .pdf p.chg { background: var(--amber-bg); box-shadow: -4px 0 var(--amber); }
.cmts { margin-top: 12px; } .cmts ul { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 4px; } .cm-add { display: flex; gap: 6px; align-items: center; } .cm-add input { flex: 1; min-width: 0; } .cellref { font: 600 12px ui-monospace, monospace; background: var(--line2); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.rounds { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; } .round { border-radius: 999px; padding: 2px 10px; font-weight: 600; font-size: 12px; } .round.bad { background: var(--red-bg); color: var(--red); } .round.ok { background: var(--green-bg); color: var(--green); } .arrow { color: var(--muted); font-size: 12px; }

/* Intake */
.split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 12px; align-items: start; } .preview { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; position: sticky; top: 0; box-shadow: var(--shadow); } .preview h3 { margin: 4px 0 8px; }
.msg { background: var(--panel2); border: 1px solid var(--line2); border-radius: var(--r); padding: 10px; margin-bottom: 8px; white-space: pre-wrap; } .atts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; } .att { background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; cursor: pointer; }
.sortbox { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 4px; } .frow { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin: 6px 0; } .frow label { display: grid; gap: 2px; font-size: 11px; color: var(--muted); flex: 1; min-width: 120px; } .frow label > * { font-size: 13px; color: var(--ink); width: 100%; } .frow > input { flex: 1; min-width: 0; }
.conf { display: inline-block; width: 44px; height: 6px; background: var(--line2); border-radius: 3px; overflow: hidden; margin-right: 5px; } .conf i { display: block; height: 100%; background: var(--green); } .conf.low i { background: var(--amber); }

/* Documents tree */
.docq { width: 100%; max-width: 360px; margin-bottom: 10px; } .tree { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 9px 14px; margin-bottom: 8px; } .tree summary { cursor: pointer; font-weight: 650; } .tree.t2 { border: 0; padding: 2px 0 2px 14px; margin: 0; } .tree.t2 summary { font-weight: 600; }
.tree ul { list-style: none; margin: 4px 0 6px; padding: 0 0 0 16px; display: grid; gap: 4px; } .dtype { display: inline-block; min-width: 130px; color: var(--muted); font-size: 12px; }

/* Dialogs, bulk bar, toast */
.ov { position: fixed; inset: 0; background: rgba(26, 24, 22, .38); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: grid; place-items: center; z-index: 50; padding: 16px; } .dlg { background: var(--panel); border-radius: 20px; border: 1px solid var(--line); width: min(460px, 100%); max-height: 90vh; overflow: auto; box-shadow: var(--shadow-lg); } .dlg.wide { width: min(620px, 100%); }
.dlg h3 { margin: 0; padding: 18px 22px 12px; border-bottom: 1px solid var(--line2); font: 400 26px/1.1 var(--serif); letter-spacing: -.01em; } .dlg-b { padding: 16px 22px; } .dlg-b p { margin: 0 0 8px; } .dlg-b ul, .dlg-b ol { margin: 0 0 8px; padding-left: 18px; } .dlg-b select, .dlg-b > input { width: 100%; } .dlg-f { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 22px; border-top: 1px solid var(--line2); background: var(--panel2); }
.pvbox { margin-top: 10px; border: 1px dashed var(--line); border-radius: var(--r); min-height: 150px; display: grid; place-items: center; text-align: center; background: var(--panel2); padding: 20px; }
.wa { display: grid; gap: 8px; margin-top: 10px; } .bub { max-width: 85%; padding: 8px 12px; border-radius: 14px; } .bub small { display: block; color: var(--muted); font-size: 10.5px; margin-top: 2px; } .bub.me { justify-self: end; background: var(--green-bg); } .bub.sys { background: var(--line2); } .parse { border: 1px dashed var(--line); border-radius: var(--r); padding: 8px 10px; }
#bulk { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 40; max-width: calc(100vw - 20px); } .bulkbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--float); color: var(--on-float); padding: 8px 10px 8px 18px; border-radius: 22px; box-shadow: var(--shadow-lg); }
.bulkbar select, .bulkbar input, .bulkbar .btn:not(.pri) { color: var(--ink); } .bulkbar .tl, .bulkbar .link { color: var(--on-float); } .bulkbar .tl { opacity: .8; }
#toast { position: fixed; right: 16px; bottom: 16px; z-index: 60; } .tst { background: var(--float); color: var(--on-float); padding: 10px 16px; border-radius: 14px; font-weight: 550; box-shadow: var(--shadow-lg); max-width: 340px; }

/* Phone views (shared pieces; they only render under 860px) */
.eyebrow { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; font-weight: 650; color: var(--muted); }
.mhead { margin: 2px 0 12px; } .mhead h1 { font-size: 34px; margin-top: 2px; }
.mrail, .mquick { display: flex; gap: 6px; overflow-x: auto; margin: 0 -14px 10px; padding: 2px 14px; scrollbar-width: none; } .mrail::-webkit-scrollbar, .mquick::-webkit-scrollbar { display: none; }
.mrail > *, .mquick > * { flex: none; } .mrail .pill { min-height: 38px; padding: 0 14px; font-size: 14px; } .mrail .pill.on { background: var(--ink); border-color: var(--ink); color: var(--bg); } .mrail .pill.on .cnt { background: transparent; color: inherit; opacity: .75; padding: 0; min-width: 0; margin-left: 3px; }
.qk { display: inline-flex; align-items: center; gap: 5px; background: none; border: 1px solid var(--line); border-radius: 999px; min-height: 32px; padding: 0 12px; font-size: 12.5px; font-weight: 550; color: var(--muted); cursor: pointer; } .qk b { color: var(--ink); } .qk.s-overdue b, .qk.s-qafail b { color: var(--red); }
.qk.on { background: var(--line2); border-color: var(--ink); color: var(--ink); font-weight: 650; } .mquick .link { padding: 0 6px; }
.mlist { display: grid; gap: 10px; } .mgrp { margin: 18px 2px 8px; } .mgrp:first-child { margin-top: 4px; }
.mcard { display: block; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 16px; padding: 14px 14px 12px; color: inherit; box-shadow: var(--shadow); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.mcard:hover { text-decoration: none; } .mcard:active { background: var(--panel2); } .mcard.od { border-left-color: var(--red); }
.mc-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; } .mc-top .c-client { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .mc-top .due { flex: none; font-size: 12.5px; color: var(--muted); font-weight: 550; } .mc-top .due.red { color: var(--red); font-weight: 700; }
.mcard .c-title { font-size: 16px; line-height: 1.3; margin-top: 4px; } .mcard .c-title.big { font: 400 24px/1.15 var(--serif); display: flex; align-items: center; gap: 8px; } .mcard .c-need { font-size: 14px; margin: 4px 0 0; color: var(--muted); } .mcard .c-flags { margin-top: 8px; gap: 5px; }
.mc-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line2); min-height: 40px; } .mc-who { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; min-width: 0; }
.mc-foot .btn { min-height: 40px; padding: 0 20px; font-size: 14px; flex: none; }
.mmenu { display: grid; margin: -6px 0 12px; } .mmenu > * { display: block; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line2); padding: 14px 2px; font-size: 16px; font-weight: 600; color: var(--ink); cursor: pointer; }
.back { display: inline-block; padding: 6px 0 12px; font-size: 14px; }
.ag { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); } .ag.past { opacity: .72; }
.ag-d { margin: 0; text-transform: none; letter-spacing: 0; text-align: center; } .ag-d b { display: block; font: 400 30px/1 var(--serif); color: var(--ink); } .ag-d span { font-size: 11px; font-weight: 600; } .ag.today .ag-d b { color: var(--accent); }
.ag-l { display: grid; gap: 8px; } .ag-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; } .ag-t { min-width: 0; font-size: 14px; } .ag-t a { color: inherit; } .ag-row .occ { flex: none; margin-top: 1px; } .ag-row.skipped .ag-t > :first-child { text-decoration: line-through; opacity: .6; }
/* Search anywhere */
.icb { display: inline-flex; align-items: center; gap: 7px; } .icb .ic { color: inherit; width: 15px; height: 15px; } .icb kbd { margin-left: 2px; }
.ov.top { place-items: start center; padding-top: 9vh; } .dlg.gs { width: min(680px, 100%); max-height: 78vh; display: flex; flex-direction: column; overflow: hidden; } .dlg.gs .dlg-b { overflow: auto; padding-top: 4px; }
.gs-top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line2); } .gs-top .ic { width: 18px; height: 18px; } .gs-top input { flex: 1; min-width: 0; border: 0; background: none; font-size: 17px; box-shadow: none !important; padding: 4px 0; }
.gs-l { display: grid; } .gs-l .link { justify-self: start; padding: 6px 10px; } .gs-r { display: block; padding: 8px 10px; border-radius: 10px; color: inherit; } .gs-r:hover, .gs-r:focus-visible { background: var(--line2); text-decoration: none; } .gs-r b { display: block; font-weight: 650; } .gs-r span { display: block; color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }

/* Search within a page */
.fhide { display: none !important; } mark { background: #f3dc9a; color: inherit; border-radius: 3px; padding: 0 1px; }
.findbar { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 6px 16px; margin-bottom: 12px; box-shadow: var(--shadow); } .findbar span { flex: 1; min-width: 180px; }
.fsec > h3 { font: 400 22px/1.2 var(--serif); margin: 18px 0 10px; } .fsec:first-of-type > h3 { margin-top: 4px; }

/* Client conversation feed (laptop and phone) */
.cvf { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; } .ag.cv { grid-template-columns: 64px minmax(0, 1fr); max-width: 860px; } .ag.cv:first-of-type { border-top: 0; }
.cv-sum { font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 6px 2px 0; }
.cv-row { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; } .cv-row.out { background: var(--panel2); margin-left: 28px; }
.cv-h { display: flex; align-items: center; gap: 6px; } .cv-h .ev-type { flex: 1; } .cv-t { font-size: 12px; color: var(--muted); white-space: nowrap; } .cv-who { font-weight: 650; margin-top: 2px; } .cv-who .muted { font-weight: 400; } .cv-x { margin-top: 2px; } .cv-f { margin-top: 6px; font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.cv-meeting { border-left: 3px solid var(--s-waiting); } .cv-call { border-left: 3px solid var(--s-ready); }

/* Phone: built for the partner reviewing and approving on the go */
@media (max-width: 860px) {
  body { font-size: 14.5px; }
  #app { display: block; height: auto; } #mainwrap { height: 100dvh; }
  select, input[type=text], input[type=search], input[type=date], input:not([type]), textarea { font-size: 16px; min-height: 44px; border-radius: 12px; } .btn { min-height: 44px; padding: 0 18px; font-size: 14.5px; } .btn.sm { min-height: 36px; min-width: 36px; }
  .lbl { font-size: 12px; margin-top: 12px; }
  #side { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; display: block; padding: 0 4px env(safe-area-inset-bottom); border: 0; border-top: 1px solid var(--line); background: var(--glass); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); }
  #side .brand, #side .side-foot { display: none; }
  #nav { flex-direction: row; gap: 0; } #nav > * { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 58px; padding: 0; border: 0; border-radius: 0; background: none; font-size: 10.5px; font-weight: 600; color: var(--muted); cursor: pointer; -webkit-tap-highlight-color: transparent; }
  #nav > *:hover { background: none; } #nav i { position: relative; display: grid; place-items: center; width: 52px; height: 28px; border-radius: 999px; font-style: normal; transition: background-color .2s; } #nav .ic { width: 20px; height: 20px; color: inherit; stroke-width: 1.3; }
  #nav > .on { background: none; color: var(--ink); font-weight: 700; } #nav > .on i { background: var(--line2); } #nav .bdg { position: absolute; top: -3px; right: 2px; font-size: 10px; min-width: 16px; text-align: center; padding: 0 4px; background: var(--accent); color: var(--on-accent); }
  #top { padding: 8px 14px; } #top .btn:not(.icb), #today { display: none; } .icb span, .icb kbd { display: none; } #top .icb { flex: none; width: 44px; padding: 0; justify-content: center; } .icb .ic { width: 19px; height: 19px; }
  .ov.top { place-items: start stretch; padding: 0; } .dlg.gs { max-height: 100dvh; height: 100dvh; border-radius: 0; border: 0; animation: none; } .gs-top { padding: 10px 14px; } .gs-r { padding: 10px 6px; } .gs-r span { font-size: 13.5px; } #q { max-width: none; }
  .sysban { padding: 8px 14px; font-size: 13px; } .sb-d { display: none; }
  #main { padding: 14px 14px 96px; } h1 { font-size: 28px; } .ph { margin-bottom: 10px; } .ph .btn { margin-left: 0; }
  .tabs { margin: 0 -14px 12px; padding: 0 14px; scrollbar-width: none; } .tabs > * { padding: 10px 12px; font-size: 14px; }
  .tblwrap { border-radius: 14px; } .tbl th, .tbl td { padding: 9px 11px; }
  .card:hover, .stat:hover, .btn.pri:hover { transform: none; }
  /* Job page */
  .snap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; margin-top: 12px; }
  .needban { padding: 14px; gap: 12px; } .nb-t strong { font-size: 22px; } .nb-b { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; } .nb-b .btn { white-space: normal; line-height: 1.2; padding: 6px 10px; } .nb-b .btn.pri { grid-column: 1 / -1; min-height: 50px; font-size: 16px; } .nb-b .btn:only-child { grid-column: 1 / -1; }
  .steps { gap: 4px; margin: 12px 0 16px; } .steps li { flex: 0 0 34px; font-size: 0; padding: 0; height: 28px; border: 0; border-radius: 999px !important; display: grid; place-items: center; } .steps li.past::before { content: "✓"; font-size: 12px; } .steps li.now { flex: 1; font-size: 12.5px; padding: 0 12px; }
  .jgrid { display: flex; flex-direction: column; align-items: stretch; gap: 12px; } .jside { display: contents; } .jside section { margin: 0; } #questions { order: -1; } #questions.noq { display: none; } .jmain { min-width: 0; }
  .ev { grid-template-columns: 18px minmax(0, 1fr); padding: 10px 0; } .ev-when { grid-column: 1 / -1; }
  .findbar { border-radius: 16px; padding: 10px 14px; } .tabpanel { overflow-x: auto; } .ag.cv { grid-template-columns: 46px minmax(0, 1fr); } .cv-row.out { margin-left: 16px; } .cvf { flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px 6px; padding: 0 14px; scrollbar-width: none; } .cvf > * { flex: none; min-height: 36px; }
  .split, .outs, .diff { grid-template-columns: minmax(0, 1fr); } .preview { position: static; } .frow label { min-width: 100%; } .cm-add { flex-wrap: wrap; } .cm-add input { flex-basis: 100%; order: 3; }
  .calbar { align-items: center; margin-bottom: 4px; } .calbar .mnav { margin: 0; } .mnav b { min-width: 110px; }
  .cards3, .cl-grid { grid-template-columns: minmax(0, 1fr); } .kv { grid-template-columns: minmax(0, 1fr); gap: 0; } .kv dt { font-size: 12px; margin-top: 8px; } .kv.keys { display: none; }
  .tree ul { padding-left: 4px; gap: 10px; } .dtype { display: block; }
  /* Dialogs become bottom sheets */
  .ov { place-items: end stretch; padding: 0; } .dlg, .dlg.wide { width: 100%; max-height: 88dvh; border-radius: 22px 22px 0 0; border-width: 1px 0 0; animation: sheet .32s var(--ease); }
  .dlg h3 { padding: 20px 18px 12px; } .dlg-b { padding: 14px 18px; } .dlg-f { padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); position: sticky; bottom: 0; } .dlg-f .btn { flex: 1; }
  #toast { top: 10px; bottom: auto; right: 14px; left: 14px; z-index: 70; } .tst { max-width: none; text-align: center; }
}
@keyframes sheet { from { transform: translateY(40px); opacity: 0; } }

@font-face { font-family: "Plus Jakarta Sans"; src: url("fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("fonts/instrument-serif-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); font-style: italic; font-display: swap; }
.paging { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin: 12px 0; }
.dlg-b .field { display: grid; gap: 4px; margin: 0 0 12px; font-size: 12px; }
.field input, .field select, .field textarea { width: 100%; min-width: 0; }
.dlg-b pre, .tabpanel pre, .msg { white-space: pre-wrap; overflow-wrap: anywhere; }
.tblwrap, .jmain, .tabpanel, .preview, .mcard, .nb-t { min-width: 0; }
#main { overflow-wrap: anywhere; }
iframe.preview-file { border: 0; width: 100%; height: 65vh; }
[hidden] { display: none !important; }
.card .c-title a, .mcard .c-title a { color: inherit; }
.card .c-client { min-width: 0; }
.card .c-id { flex: none; }
.card .c-meta > span { white-space: normal; }
.cs-attention { color: var(--red); background: var(--red-bg); }
@media (max-width: 860px) {
  .ag-row { flex-wrap: wrap; }
  .ag-row > div { min-width: 0; max-width: 100%; }
  .ag-row .occ { white-space: normal; }
  .calbar .tabs { min-width: 0; flex: 1 0 100%; }
  .mcard .c-id { margin-left: auto; }
}
.pdf p { white-space: pre-wrap; }

.classification-log { margin-top: 16px; }
.classification-log summary { cursor: pointer; padding: 6px 0; }
.classification-log td small { display: block; color: var(--muted); }
