/* Tokens measured from the reference app (computed styles at 1440px). */
:root {
  --page: #E5EAED;
  --side: #F5F6F6;
  --surface: #FFFFFF;
  --well: #F5F6F6;
  --ink: #161616;
  --ink-2: #515151;
  --ink-3: #8A9399;
  --line: #D5DCE0;
  --field: #C5CDD2;
  --blue: #1C64F5;
  --blue-soft: #E8F0FE;
  --danger: #D92D20;
  --warn-bg: #FFF4D6;
  --warn-ink: #8A5A00;
  --shadow-1: 0 1px 4px rgba(0, 0, 0, .1);
  --shadow-side: 0 6px 20px rgba(0, 0, 0, .1);
  --font: 'Geist', -apple-system, system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--page) linear-gradient(110deg, rgba(214, 222, 245, .55), rgba(229, 234, 237, 0) 45%, rgba(225, 238, 226, .55));
  background-attachment: fixed;
  color: var(--ink); font: 400 14px/20px var(--font); letter-spacing: -0.015px; -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; font-weight: 600; }
h1 { font-size: 22px; line-height: 30px; letter-spacing: -0.025px; }
h2 { font-size: 16px; line-height: 20px; }
h3 { font-size: 14px; line-height: 20px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.muted { color: var(--ink-2); }
.small { font-size: 12px; line-height: 16px; }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico.sm { width: 16px; height: 16px; }
.ico.lg { width: 24px; height: 24px; stroke-width: 1.6; }
.ico.xs { width: 14px; height: 14px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--field); background: var(--surface); font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; }
.btn:hover { background: #FAFBFB; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: #333; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: rgba(0, 0, 0, .05); }
.btn.danger { color: var(--danger); }
.btn.icon { width: 32px; height: 32px; padding: 0; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12px; }
.btn:disabled { opacity: .45; cursor: default; }

/* Fields */
.input, select.input, textarea.input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--field); border-radius: 7px; background: var(--surface); font-size: 14px; }
select.input { appearance: none; padding-right: 36px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23515151' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; }
textarea.input { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; }
.input::placeholder { color: #9AA3A9; }
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(28, 100, 245, .15); }
.input:disabled { background: var(--well); color: var(--ink-2); }
label.field, .field { display: grid; gap: 8px; font-weight: 600; font-size: 14px; }
.field .opt-tag { font-weight: 500; font-size: 12px; color: var(--ink-3); }
.hint { font-weight: 500; font-size: 12px; line-height: 16px; color: var(--ink-2); }
.toggle { position: relative; width: 44px; height: 24px; flex: none; appearance: none; border-radius: 99px; background: #C5CDD2; cursor: pointer; transition: background .15s; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.toggle:checked { background: var(--ink); }
.toggle:checked::after { transform: translateX(20px); }
input[type=checkbox]:not(.toggle) { width: 16px; height: 16px; accent-color: var(--ink); }

/* Layout helpers */
.row { display: flex; gap: 10px; align-items: center; }
.grow { flex: 1; min-width: 0; }
.stack { display: grid; gap: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 18px; padding: 0 8px; border-radius: 4px; background: var(--well); color: var(--ink-2); font-size: 11px; font-weight: 600; line-height: 18px; }
.pcard .chip, .doc-card .chip { border-radius: 12px; height: auto; padding: 4px 8px; line-height: 13px; font-weight: 500; }
.chip.blue { background: var(--blue-soft); color: var(--blue); }
.chip.warn { background: var(--warn-bg); color: var(--warn-ink); }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--page); font-size: 12px; font-weight: 500; color: var(--ink-2); }
.count-box { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); font-size: 12px; font-weight: 600; }
.err { color: var(--danger); font-size: 13px; }

/* Shell */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { position: sticky; top: 15px; height: calc(100vh - 30px); margin: 15px 0; display: flex; flex-direction: column; padding: 0 10px 6px; background: var(--side); border-radius: 0 16px 16px 0; box-shadow: var(--shadow-side); z-index: 5; }
.side-scroll { flex: 1; overflow-y: auto; margin: 0 -10px; padding: 0 10px; }
.brand { display: flex; align-items: center; gap: 10px; height: 58px; padding: 0 2px 0 4px; font-weight: 600; font-size: 17px; letter-spacing: -0.02em; }
.mark { width: 26px; height: 26px; border-radius: 7px; background: var(--blue); position: relative; flex: none; }
.mark::after { content: ''; position: absolute; width: 10px; height: 10px; border-radius: 50%; background: #fff; left: 11px; top: 6px; }
.navgroup { padding: 16px 12px 5px; font-size: 11px; line-height: 16px; letter-spacing: .2px; color: var(--ink-3); }
.nav { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 8px; font-size: 12px; font-weight: 500; line-height: 16px; color: var(--ink); }
.nav > span:not(.badge) { flex: 1; }
.nav:hover { background: rgba(0, 0, 0, .04); }
.nav.on { background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.side-foot { display: grid; gap: 8px; padding-top: 8px; }
.checklist { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-1); padding: 8px; }
.checklist-head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 4px; border: 0; background: none; cursor: pointer; font-size: 12px; font-weight: 600; }
.bar { height: 4px; background: var(--page); border-radius: 9px; overflow: hidden; margin: 6px 4px 6px; }
.bar > i { display: block; height: 100%; background: var(--blue); }
.check { display: flex; gap: 8px; align-items: center; padding: 6px 4px; font-size: 12px; font-weight: 500; }
.check .box { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #B5BEC4; flex: none; display: grid; place-items: center; }
.check.done { color: var(--ink-3); text-decoration: line-through; }
.check.done .box { background: var(--blue); border-color: var(--blue); }
.iconbar { display: flex; justify-content: space-between; padding: 4px 2px 0; }
.iconbar .btn.icon { color: var(--ink-2); }
.main { padding: 43px 40px 80px; min-width: 0; }

/* Page header + tabs */
.head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; min-height: 34px; }
.head p { margin: 2px 0 0; color: var(--ink-2); }
.title-chip { display: flex; align-items: center; gap: 8px; padding: 2px 8px 2px 0; }
.sq { width: 22px; height: 22px; border-radius: 6px; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 10px; font-weight: 600; flex: none; background-size: cover; background-position: center; }
.tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tab { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 15px; font-size: 12px; font-weight: 600; line-height: 16px; color: var(--ink); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab .ico { width: 16px; height: 16px; }
.tab.on { color: var(--blue); border-color: var(--blue); }
.tab:hover:not(.on) { color: var(--ink-2); }

/* Surfaces */
.panel { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-1); padding: 20px; }
.section { display: grid; gap: 20px; padding: 16px 0; max-width: 600px; }
.empty { text-align: center; padding: 56px 24px; max-width: 520px; margin: 40px auto; }
.empty h2 { font-size: 20px; line-height: 28px; margin-bottom: 6px; }
.empty ul { text-align: left; color: var(--ink-2); padding-left: 18px; margin: 16px 0 24px; }

/* Card grids */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card { display: block; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-1); overflow: hidden; transition: box-shadow .15s; }
.card:hover { box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.card .swatch { height: 96px; }
.card .body { padding: 12px 14px; }
.avatar { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; font-weight: 600; font-size: 12px; color: #fff; flex: none; background-size: cover; background-position: center; }

/* Client hero card */
.hero-card { border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-1); }
.hero-card .top { height: 150px; display: grid; place-items: center; color: rgba(255,255,255,.7);
  background-image: linear-gradient(rgba(255,255,255,.14) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.14) 1px, transparent 1px); background-size: 16px 16px; }
.hero-card .bottom { background: var(--ink); color: #fff; padding: 0 14px 16px; position: relative; }
.hero-card .logo { width: 44px; height: 44px; border-radius: 10px; background: #fff; color: #555; display: grid; place-items: center; font-weight: 600; font-size: 15px; transform: translateY(-22px); margin-bottom: -14px; background-size: cover; background-position: center; box-shadow: var(--shadow-1); }
.hero-card .name { font-size: 16px; font-weight: 600; }

/* Kanban */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: 365px; gap: 16px; overflow-x: auto; align-items: stretch; min-height: calc(100vh - 200px); padding-bottom: 8px; }
.col { display: flex; flex-direction: column; background: var(--well); border-radius: 16px; box-shadow: var(--shadow-1); padding: 8px; }
.col.over { box-shadow: inset 0 0 0 2px var(--blue), var(--shadow-1); }
.colhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 8px; margin-bottom: 12px; }
.colhead .name { font-size: 20px; font-weight: 500; line-height: 28px; letter-spacing: -0.02px; }
.col-body { flex: 1; display: grid; gap: 12px; align-content: start; }
.task { background: var(--surface); border: 1px solid transparent; border-radius: 7px; padding: 8px; cursor: grab; display: grid; gap: 8px; }
.task:hover { box-shadow: 0 1px 4px rgba(0, 0, 0, .1); }
.task .t { font-size: 14px; line-height: 20px; }
.task.done-task .t { color: var(--ink-3); text-decoration: line-through; }
.task .meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.due { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; font-size: 11px; color: var(--ink-3); }
.due.late { color: var(--danger); }
.col-foot { display: flex; align-items: center; justify-content: center; padding-top: 8px; }
.addtask { flex: 1; height: 40px; border-radius: 12px; font-size: 14px; font-weight: 600; }

/* Modal */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); display: grid; place-items: center; padding: 20px; z-index: 50; }
.modal { background: var(--surface); border-radius: 16px; width: min(640px, 100%); max-height: 90vh; overflow-y: auto; padding: 24px; box-shadow: var(--shadow-1); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }

/* Auth + onboarding */
.center { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.authbox { width: min(400px, 100%); background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-1); padding: 28px; }
.steps { display: flex; gap: 6px; margin: 0 auto 32px; width: 200px; }
.steps i { height: 3px; flex: 1; border-radius: 9px; background: #C9D1D6; }
.steps i.on { background: var(--blue); }
.onb { width: min(760px, 100%); }
.onb .brand { justify-content: center; }
.pick { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.opt { display: flex; align-items: center; gap: 8px; min-height: 40px; border: 1px solid var(--field); background: var(--surface); border-radius: 8px; padding: 8px 12px; cursor: pointer; text-align: left; font-size: 13px; font-weight: 500; }
.opt:hover { border-color: #9EA9B0; }
.opt.on { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.buddy { font-size: 28px; justify-content: center; aspect-ratio: 1; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }

/* Timeline */
.timeline { display: grid; gap: 0; }
.tl-item { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; padding-bottom: 14px; position: relative; }
.tl-item:not(:last-child)::before { content: ''; position: absolute; left: 13px; top: 28px; bottom: 0; width: 1px; background: var(--field); }
.tl-dot { width: 28px; height: 28px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-2); }
.tl-item b { font-weight: 600; font-size: 14px; display: block; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.sw { width: 24px; height: 24px; border-radius: 50%; border: 0; cursor: pointer; }
.sw.on { box-shadow: 0 0 0 2px var(--page), 0 0 0 4px var(--ink); }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 60; font-size: 13px; font-weight: 500; }

@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .side { position: sticky; top: 0; height: auto; margin: 0; border-radius: 0; flex-direction: row; align-items: center; padding: 6px 10px; overflow-x: auto; }
  .side-scroll { display: flex; overflow: visible; margin: 0; padding: 0; gap: 2px; }
  .navgroup, .checklist, .brand > .btn { display: none; }
  .brand { height: auto; padding-right: 10px; }
  .nav { flex: none; white-space: nowrap; }
  .side-foot { padding: 0; }
  .iconbar { padding: 0; gap: 2px; }
  .main { padding: 20px 16px 40px; }
  .grid2 { grid-template-columns: 1fr; }
  .head { flex-direction: column; align-items: flex-start; }
  .board { grid-auto-columns: 85vw; min-height: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Project cards (portrait, like the reference grid) */
.pcards { display: grid; grid-template-columns: repeat(auto-fill, 192px); gap: 24px; }
.folder { position: relative; display: block; height: 256px; color: inherit; perspective: 1000px; }
.folder-front { position: absolute; inset: 0; transform-origin: 0 50%; transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.folder:hover .folder-front, .folder:focus-visible .folder-front { transform: rotateY(20deg); }
.folder-bg { position: absolute; inset: 0; border-radius: 12px; }
.folder svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: var(--surface); filter: drop-shadow(0 1px 1px rgba(0,0,0,.04)); }
.folder-pill { position: absolute; top: 12px; left: 12px; }
.folder-pill .chip { border-radius: 12px; height: auto; padding: 4px 8px; line-height: 13px; font-weight: 500; }
.folder-body { position: absolute; left: 16px; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 2px; }
.folder-ini { width: 36px; height: 36px; border-radius: 8px; background: #F5F6F6; color: #555; display: grid; place-items: center; font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.folder-name { font-size: 16px; font-weight: 600; letter-spacing: -.015px; }
.pcard { display: flex; flex-direction: column; height: 256px; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-1); overflow: hidden; transition: box-shadow .15s; border: 0; padding: 0; text-align: left; cursor: pointer; }
.pcard-top { flex: 1; }
.pcard-body { padding: 12px 14px 14px; }
.pcard-new { align-items: center; justify-content: center; gap: 8px; text-align: center; background: transparent; box-shadow: none; border: 1px dashed #161616; border-radius: 10px; }
.doc-card { background: #F5F6F6; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.ccard { position: relative; display: flex; flex-direction: column; height: 256px; border-radius: 9px; overflow: hidden; color: #fff; box-shadow: var(--shadow-1); }
.ccard-cover { height: 176px; background-image: linear-gradient(rgba(255,255,255,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.18) 1px, transparent 1px); background-size: 16px 16px; }
.ccard-band { flex: 1; background: #272727; padding: 26px 12px 0; display: flex; flex-direction: column; gap: 1px; }
.ccard-band b { font-size: 16px; font-weight: 600; } .ccard-band span { font-size: 12px; opacity: .6; }
.ccard-logo { position: absolute; left: 12px; top: 144px; width: 52px; height: 52px; border-radius: 12px; background: #F5F6F6 center / cover; color: #555; display: grid; place-items: center; font-size: 15px; font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.pcard-new-title { font-size: 16px; font-weight: 500; margin-top: 6px; }


/* ---------- Motion (timings measured on the reference) ---------- */
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.page-enter { animation: fade-in .3s ease-out backwards; } /* backwards, not both: a held animation keeps a stacking context that traps modals under the sidebar */
.scrim { animation: fade-in .25s ease-out both; }
.modal { animation: fade-in .25s ease-out both; transition: width .38s cubic-bezier(.16, 1, .3, 1); }
.pop { animation: pop-in .14s ease-out both; transform-origin: top right; }
.nav, .tab, .btn, .task, .opt, .menu-item, .check { transition: background-color .12s, border-color .12s, color .12s, box-shadow .12s; }

/* ---------- Modal sizes ---------- */
.modal { padding: 28px; border-radius: 16px; box-shadow: 0 8px 24px rgba(0, 0, 0, .15); }
.modal.md { width: min(720px, 100%); }
.modal.sm { width: min(520px, 100%); }
.modal.xl { position: relative; width: min(920px, 100%); height: min(870px, calc(100vh - 30px)); max-height: none; display: flex; flex-direction: column; padding: 28px; }
.modal-head { margin-bottom: 16px; gap: 12px; }
.modal-title { font-size: 22px; line-height: 30px; font-weight: 500; letter-spacing: -0.025px; }
.modal-sub { color: var(--ink-2); margin: -10px 0 20px; }
.modal-foot { display: flex; align-items: center; gap: 10px; margin-top: 24px; }

/* ---------- Menus ---------- */
.pop-wrap { position: relative; }
.pop { position: absolute; top: calc(100% + 6px); z-index: 40; background: var(--surface); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .15), 0 0 0 1px rgba(0, 0, 0, .04); padding: 6px; }
.pop.right { right: 0; } .pop.left { left: 0; transform-origin: top left; }
.menu-label { padding: 8px 10px 4px; font-size: 10px; font-weight: 600; letter-spacing: .6px; color: var(--ink-3); text-transform: uppercase; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 8px 12px; border: 0; border-radius: 7px; background: none; text-align: left; font-size: 14px; font-weight: 500; cursor: pointer; }
.menu-item:hover, .menu-item.on { background: var(--well); }
.menu-item.on { box-shadow: inset 0 0 0 1.5px var(--blue); background: var(--surface); }
.menu-item.danger { color: var(--danger); }
.menu-sub { display: block; font-size: 11px; color: var(--ink-2); font-weight: 400; line-height: 14px; }
.menu-sep { height: 1px; background: var(--line); margin: 4px 6px; }
.tool { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--ink); }
.tool:hover, .tool.on { background: var(--surface); box-shadow: var(--shadow-1); }

/* ---------- Empty hero ---------- */
.hero { max-width: 560px; margin: 6vh auto 0; display: grid; gap: 14px; }
.hero-art { height: 210px; border-radius: 14px; background-color: var(--blue); background-image: linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px); background-size: 22px 22px; display: grid; place-items: center; margin-bottom: 10px; }
.hero-tile { width: 92px; height: 92px; border-radius: 22px; background: var(--surface); display: grid; place-items: center; box-shadow: 0 12px 30px rgba(0,0,0,.18); }
.hero-tile .ico { width: 40px; height: 40px; stroke-width: 1.5; }
.hero-title { font-size: 22px; line-height: 30px; }
.hero-list { margin: 0; padding-left: 18px; color: var(--ink-2); display: grid; gap: 4px; }
.hero-actions { display: grid; justify-items: start; gap: 8px; margin-top: 6px; }
.btn.pill { height: 40px; border-radius: 10px; padding: 0 16px; font-size: 14px; }

/* ---------- Board extras ---------- */
.task { position: relative; }
.task .quick { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 6px; border: 0; background: var(--well); color: var(--ink-3); display: grid; place-items: center; opacity: 0; cursor: pointer; transition: opacity .12s; }
.task:hover .quick, .task:focus-within .quick { opacity: 1; }
.task .quick:hover { color: var(--ink); }
.new-task { background: var(--surface); border-radius: 7px; padding: 8px; box-shadow: var(--shadow-1); display: grid; gap: 8px; }
.new-task input { border: 0; outline: 0; font-size: 14px; padding: 2px 0; background: transparent; }
.chip-btn { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px; border: 0; border-radius: 6px; background: var(--well); font-size: 12px; font-weight: 600; cursor: pointer; position: relative; }
.chip-btn input[type=date] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ---------- Task modal ---------- */
.tm { display: grid; grid-template-columns: 1fr 214px; gap: 28px; flex: 1; min-height: 0; }
.tm-main { overflow-y: auto; min-height: 0; display: grid; gap: 4px; align-content: start; padding-right: 4px; }
.tm-side { border-left: 1px solid var(--line); padding-left: 14px; overflow-y: auto; display: grid; gap: 14px; align-content: start; }
.tm-title { width: 100%; border: 0; outline: 0; resize: none; font: 500 22px/30px var(--font); letter-spacing: -0.025px; padding: 0 0 2px; background: transparent; }
.editor-box { background: var(--well); border-radius: 8px; padding: 8px 12px 12px; margin-bottom: 12px; }
.editor-bar { display: flex; gap: 2px; padding-bottom: 6px; border-bottom: 1px solid var(--line); margin-bottom: 8px; color: var(--ink-2); }
.editor-bar button { width: 26px; height: 26px; border: 0; background: none; border-radius: 5px; display: grid; place-items: center; cursor: pointer; color: inherit; }
.editor-bar button:hover { background: rgba(0,0,0,.06); color: var(--ink); }
.editor-bar .sep { width: 1px; background: var(--line); margin: 4px 4px; }
.editor { min-height: 150px; outline: 0; font-size: 15px; line-height: 24px; font-weight: 400; }
.editor:empty::before { content: attr(data-placeholder); color: #9AA3A9; }
.sec-head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px 0 8px; border: 0; border-bottom: 1px solid var(--line); background: none; cursor: pointer; font-size: 11px; font-weight: 500; letter-spacing: .5px; text-transform: uppercase; color: var(--ink); margin-bottom: 8px; }
.sec-head .ico { width: 14px; height: 14px; }
.well-input { width: 100%; height: 36px; border: 0; border-radius: 8px; background: var(--well); padding: 0 10px; font-size: 13px; outline: 0; }
.well-input:focus { box-shadow: 0 0 0 2px rgba(28, 100, 245, .25); background: var(--surface); }
.sub-row { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-radius: 6px; font-size: 14px; font-weight: 400; }
.sub-row:hover { background: var(--well); }
.sub-row .x { opacity: 0; } .sub-row:hover .x { opacity: 1; }
.drop-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.drop-tile { height: 64px; border: 1px solid var(--field); border-radius: 8px; background: var(--surface); display: grid; place-items: center; align-content: center; gap: 4px; font-size: 12px; font-weight: 500; cursor: pointer; }
.drop-tile:hover { background: var(--well); }
.side-label { font-size: 11px; font-weight: 500; letter-spacing: .4px; text-transform: uppercase; margin-bottom: 6px; color: var(--ink); }
.side-val { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; height: 36px; padding: 0 10px; border: 0; border-radius: 8px; background: var(--well); font-size: 14px; font-weight: 500; color: var(--ink-2); cursor: pointer; text-align: left; }
.side-val.set { color: var(--ink); }
.side-val input, .side-val select { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; height: 34px; }
.seg button { border: 0; background: var(--surface); font-size: 12px; color: var(--ink-2); cursor: pointer; border-left: 1px solid var(--line); }
.seg button:first-child { border-left: 0; }
.seg button.on { background: var(--well); color: var(--ink); font-weight: 600; }
.act { display: flex; align-items: center; gap: 8px; width: 100%; height: 40px; padding: 0 12px; border: 0; border-radius: 12px; background: #F6F6F6; font-size: 14px; font-weight: 600; cursor: pointer; }
.act:hover { background: #EEEFEF; }
.act.on { background: var(--blue-soft); color: var(--blue); }
.act.danger { background: transparent; border: 1px solid #FF4306; color: #FF4306; }
.act.danger:hover { background: #FFF1EC; }

/* ---------- Files ---------- */
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.file-tile { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-1); overflow: hidden; display: grid; grid-template-rows: 110px auto; cursor: pointer; }
.file-tile .thumb { background: var(--well) center/cover no-repeat; display: grid; place-items: center; color: var(--ink-3); }
.file-tile .meta { padding: 10px 12px; display: flex; gap: 6px; align-items: center; }
.empty-files { display: grid; justify-items: center; gap: 8px; text-align: center; margin-top: 18vh; }
.circle-ico { width: 64px; height: 64px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; box-shadow: var(--shadow-1); margin-bottom: 4px; }
.circle-ico .ico { width: 26px; height: 26px; stroke-width: 1.5; }
.btn.soft { border: 0; box-shadow: var(--shadow-1); }

/* ---------- Settings layout ---------- */
.set-side .nav { font-size: 13px; }
.set-page { max-width: 1240px; }
.set-card { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-1); padding: 22px 22px 90px; position: relative; display: grid; gap: 22px; }
.set-card hr { border: 0; border-top: 1px solid var(--line); margin: 0; }
.save-bar { position: sticky; bottom: 0; margin: 0 -22px -90px; padding: 14px 22px; background: var(--surface); border-top: 1px solid var(--line); border-radius: 0 0 16px 16px; display: flex; justify-content: flex-end; gap: 10px; align-items: center; }
.photo { width: 108px; height: 108px; border-radius: 14px; background: var(--well) center/cover; display: grid; place-items: center; cursor: pointer; color: var(--ink-2); position: relative; }
.photo .ico { width: 34px; height: 34px; stroke-width: 1.5; }
.photo input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.choice { display: flex; align-items: center; gap: 10px; height: 64px; padding: 0 22px; border: 1px solid var(--field); border-radius: 10px; background: var(--surface); font-size: 14px; font-weight: 500; cursor: pointer; }
.choice.on { border: 2px solid var(--ink); }
.dropzone { position: relative; height: 180px; border-radius: 10px; background: var(--well) center/contain no-repeat; display: grid; place-items: center; color: var(--ink-2); cursor: pointer; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.color-dot { position: relative; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--field); display: grid; place-items: center; flex: none; cursor: pointer; }
.color-dot input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.font-card { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--surface); text-align: left; padding: 0; }
.font-card.on { border: 2px solid var(--ink); }
.font-card .preview { padding: 18px 14px 14px; background: var(--well); }
.font-card .preview b { font-size: 30px; font-weight: 500; display: block; margin-bottom: 6px; }
.font-card .name { padding: 10px 14px; font-size: 12px; font-weight: 500; display: flex; justify-content: space-between; }
.type-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }

/* ---------- Dark theme ---------- */
:root[data-theme="dark"] {
  /* measured on the reference's dark theme: cool slate, surfaces get lighter as they rise */
  --page: #15181C; --side: #1C2025; --surface: #25292E; --well: #1C2025; --card: #343B45; --card-line: #505B69; --task: #2C323A; --task-line: #414A56;
  --ink: #FFFFFF; --ink-2: #DBDFE2; --ink-3: #8C96A1; --line: #424A53; --field: #424A53; --link: #8BB8FF;
  --blue-soft: #1D2B47; --warn-bg: #3B300F; --warn-ink: #F6C66B; --ok-ink: #67D99B;
  --shadow-1: 0 1px 4px rgba(0, 0, 0, .1); --shadow-side: 0 6px 20px rgba(0, 0, 0, .1);
  color-scheme: dark;
}
/* page: dot grid plus soft corner glows */
:root[data-theme="dark"] body { background: var(--page) fixed;
  background-image: radial-gradient(rgba(115, 116, 122, .04) 1px, transparent 1px), radial-gradient(65% 55% at 0% 104%, rgba(28, 100, 245, .16), rgba(28, 100, 245, 0) 70%), radial-gradient(60% 50% at 100% 104%, rgba(255, 60, 254, .07), rgba(255, 60, 254, 0) 68%), radial-gradient(55% 45% at 100% -4%, rgba(209, 255, 110, .22), rgba(209, 255, 110, 0) 70%), radial-gradient(60% 50% at 0% -4%, rgba(28, 100, 245, .16), rgba(28, 100, 245, 0) 72%);
  background-size: 24px 24px, 100% 100%, 100% 100%, 100% 100%, 100% 100%; background-repeat: repeat, no-repeat, no-repeat, no-repeat, no-repeat; background-attachment: fixed; }
:root[data-theme="dark"] .col { background: var(--side); }
:root[data-theme="dark"] .task { background: var(--task); border-color: var(--task-line); }
:root[data-theme="dark"] .doc-card, :root[data-theme="dark"] .pcard:not(.pcard-new) { background: var(--card); box-shadow: inset 0 0 0 1px var(--card-line), var(--shadow-1); }
:root[data-theme="dark"] .pcard-new { border-color: #FFFFFF; }
:root[data-theme="dark"] .folder svg { fill: var(--card); }
:root[data-theme="dark"] .folder-ini, :root[data-theme="dark"] .rcard-ini { background: var(--side); color: var(--ink-2); }
:root[data-theme="dark"] .input { background: var(--surface); border-color: var(--field); color: var(--ink); }
:root[data-theme="dark"] .modal { border: 1px solid var(--line); }
:root[data-theme="dark"] .tab.on { color: var(--link); }
:root[data-theme="dark"] .nav:hover { background: rgba(255, 255, 255, .06); }
:root[data-theme="dark"] .btn.ghost.icon:hover { background: rgba(255, 255, 255, .06); }
:root[data-theme="dark"] .cw-panel { border: 1px solid var(--line); }
:root[data-theme="dark"] .cw-switch { background: rgba(37, 41, 46, .88); }
:root[data-theme="dark"] .btn.primary { background: #F1F3F4; border-color: #F1F3F4; color: #161616; }
:root[data-theme="dark"] .act { background: var(--well); }
:root[data-theme="dark"] .sq { background: #F1F3F4; color: #161616; }
:root[data-theme="dark"] .toggle:checked { background: var(--blue); }
@media (prefers-reduced-motion: reduce) { .page-enter, .scrim, .modal, .pop { animation: none; } }

/* ---------- Planner ---------- */
.seg-nav { display: flex; align-items: center; background: var(--surface); border-radius: 9px; box-shadow: var(--shadow-1); padding: 2px; }
.seg-nav button { height: 30px; min-width: 30px; border: 0; background: none; border-radius: 7px; cursor: pointer; display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--ink); }
.seg-nav button:hover { background: var(--well); }
.seg-nav .today { padding: 0 10px; background: var(--well); }
.banner { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-1); padding: 10px 12px 10px 16px; margin-bottom: 16px; font-size: 13px; }
.planner { display: grid; grid-template-columns: 280px 1fr; gap: 16px; min-height: calc(100vh - 190px); align-items: stretch; }
.plan-unsched { overflow: hidden; }
.plan-unsched .col-body { overflow-y: auto; }
.plan-days { display: grid; gap: 12px; overflow-x: auto; align-items: stretch; padding-bottom: 6px; }
.planner.month .plan-days { gap: 8px; grid-auto-rows: minmax(110px, auto); }
.plan-day { display: flex; flex-direction: column; background: var(--well); border-radius: 16px; box-shadow: var(--shadow-1); padding: 10px 8px 8px; min-width: 0; }
.plan-day.is-today { background: var(--surface); }
.plan-day.past { opacity: .5; }
.plan-day.mini { border-radius: 10px; padding: 6px; gap: 4px; }
.plan-day.mini.other { opacity: .55; }
.plan-head { padding: 0 6px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.plan-date { font-size: 20px; font-weight: 500; line-height: 28px; }
.today-pill { background: var(--ink); color: #fff; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 5px; }
.plan-slots { flex: 1; display: flex; flex-direction: column; }
.plan-slot { flex: 1; min-height: 70px; padding: 4px 2px 8px; display: grid; gap: 6px; align-content: start; border-radius: 8px; }
.plan-slot.allday { flex: 0 0 auto; min-height: 40px; }
.plan-slot.hour { flex: 0 0 auto; min-height: 44px; border-top: 1px dashed var(--line); border-radius: 0; }
.plan-slot.drop-over, .plan-day.drop-over { box-shadow: inset 0 0 0 2px var(--blue); background: rgba(28, 100, 245, .05); }
.slot-label { font-size: 10px; font-weight: 500; letter-spacing: .5px; text-transform: uppercase; color: var(--ink-2); padding: 0 6px; }
.plan-card { padding: 8px; gap: 6px; }
.plan-day.mini .plan-card { padding: 4px 6px; }
.plan-routine { display: flex; align-items: center; gap: 6px; border: 1px dashed var(--field); border-radius: 7px; background: transparent; padding: 5px 8px; font-size: 12px; text-align: left; cursor: pointer; color: var(--ink-2); }
.plan-event { border-left: 3px solid var(--blue); background: var(--surface); border-radius: 6px; padding: 5px 8px; font-size: 12px; line-height: 16px; }
select.chip-btn { appearance: none; border: 0; }

/* ---------- Time tracking ---------- */
.tt { display: grid; gap: 12px; overflow-x: auto; align-items: stretch; min-height: calc(100vh - 150px); padding-bottom: 6px; }
.tt-col { background: var(--well); border-radius: 16px; box-shadow: var(--shadow-1); padding: 10px 8px 8px; display: flex; flex-direction: column; min-width: 0; }
.tt-col.is-today { background: var(--surface); }
.tt-head { height: 64px; padding: 0 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.tt-left .tt-head { height: 64px; align-items: flex-start; padding-top: 4px; gap: 8px; }
.tt-bar { height: 3px; border-radius: 3px; background: transparent; margin-top: 2px; overflow: hidden; }
.tt-bar i { display: block; height: 100%; background: var(--ink-3); border-radius: 3px; }
.tt-group, .tt-group-gap { height: 40px; flex: none; }
.tt-group { display: flex; align-items: center; gap: 8px; padding: 0 6px; font-size: 13px; font-weight: 600; }
.tt-row-label { height: 56px; flex: none; display: flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 8px; padding: 0 8px 0 10px; margin-bottom: 0; box-sizing: border-box; border-bottom: 4px solid var(--well); }
.play { width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--well); color: var(--ink-2); display: grid; place-items: center; cursor: pointer; flex: none; }
.play:hover { background: var(--ink); color: #fff; }
.play.on { background: var(--danger); color: #fff; }
.tt-cell { height: 56px; flex: none; position: relative; display: grid; place-items: center; border-bottom: 1px solid var(--line); }
.tt-cell-btn { min-width: 30px; height: 30px; padding: 0 8px; border: 0; border-radius: 7px; background: transparent; color: var(--ink-3); cursor: pointer; font-size: 13px; font-weight: 600; }
.tt-cell-btn:hover { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.tt-cell-btn.has { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.tt-pop { top: 44px; left: 50%; transform: translateX(-50%); animation: fade-in .14s ease-out both; }
.tt-log { height: 62px; flex: none; display: flex; align-items: center; gap: 8px; border: 0; background: var(--surface); border-radius: 8px; padding: 0 10px; margin-top: 0; cursor: pointer; box-shadow: var(--shadow-1); }
.tt-log .plus { width: 24px; height: 24px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; }
.tt-total { height: 40px; flex: none; display: flex; align-items: center; padding: 0 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.timer-pill { display: flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-1); padding: 8px 6px 8px 10px; }
.timer-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); animation: pulse 1.6s ease-in-out infinite; flex: none; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- Invoices ---------- */
.chip.paid { background: #E3F6EA; color: #1E7A43; }
.inv-top { display: flex; align-items: center; gap: 10px; margin: -18px 0 18px; }
.inv-edit { display: grid; grid-template-columns: 380px 1fr; gap: 24px; align-items: start; }
.inv-form { display: grid; gap: 12px; }
.inv-preview { position: sticky; top: 16px; }
.line-head { display: flex; gap: 6px; font-size: 11px; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: .4px; }
.line-row { display: flex; gap: 6px; align-items: center; }
.line-row .input { height: 36px; padding: 0 8px; font-size: 13px; }
.tpl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tpl { border: 0; background: none; padding: 0; cursor: pointer; display: grid; gap: 6px; font-size: 12px; font-weight: 600; text-align: left; }
.tpl-thumb { height: 150px; border-radius: 8px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); background: #fff; position: relative; }
.tpl.on .tpl-thumb { box-shadow: 0 0 0 2px var(--ink); }
.tpl-scale { width: 640px; transform: scale(.26); transform-origin: top left; pointer-events: none; }

/* The invoice document itself. Always light, like paper. */
.inv { --brand: #161616; --accent: #F5F6F6; color: #161616; background: #fff; border-radius: 4px; box-shadow: var(--shadow-1); padding: 48px 52px; font-size: 13px; line-height: 19px; min-height: 820px; position: relative; overflow: hidden; }
.inv .pre { white-space: pre-line; }
.inv-label { font-size: 10px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: #8A9399; margin-bottom: 6px; }
.inv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 56px; }
.inv-brand { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.inv-brand img { max-height: 44px; max-width: 160px; object-fit: contain; }
.inv-meta { text-align: right; display: grid; gap: 2px; font-size: 12px; color: #515151; }
.inv-meta b { color: #161616; }
.inv-title { font-size: 12px; letter-spacing: .4em; text-transform: uppercase; color: #161616; margin-bottom: 6px; }
.inv-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 36px; }
.inv-parties b { display: block; font-weight: 600; }
.inv-table { width: 100%; border-collapse: collapse; margin-bottom: 18px; }
.inv-table th { font-size: 10px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: #8A9399; text-align: right; padding: 8px 0; border-bottom: 1px solid #E5E7E9; }
.inv-table th:first-child, .inv-table td:first-child { text-align: left; }
.inv-table td { text-align: right; padding: 12px 0; border-bottom: 1px solid #EEF0F1; }
.inv-table td:first-child { font-weight: 600; padding-right: 12px; }
.inv-totals { margin-left: auto; width: min(320px, 100%); display: grid; gap: 6px; border-top: 2px solid #161616; padding-top: 12px; }
.inv-totals > div { display: flex; justify-content: space-between; }
.inv-totals .grand { font-size: 17px; font-weight: 600; padding-top: 4px; }
.inv-totals .due-now { background: var(--accent); padding: 6px 8px; border-radius: 6px; font-weight: 600; }
.inv-notes { margin-top: 32px; display: grid; gap: 6px; max-width: 60ch; color: #515151; }
/* templates */
.inv.t-minimal .inv-title { letter-spacing: .1em; } .inv.t-minimal .inv-totals { border-top-width: 1px; } .inv.t-minimal .inv-brand { font-size: 17px; font-weight: 500; }
.inv.t-classic { font-family: Georgia, 'Times New Roman', serif !important; } .inv.t-classic .inv-head { border-bottom: 3px double #161616; padding-bottom: 20px; } .inv.t-classic .inv-title { letter-spacing: .05em; font-size: 26px; text-transform: none; font-style: italic; }
.inv.t-corporate .inv-head { margin: -48px -52px 40px; padding: 36px 52px; background: var(--brand); color: #fff; } .inv.t-corporate .inv-meta, .inv.t-corporate .inv-meta b, .inv.t-corporate .inv-title { color: #fff; }
.inv.t-statement .inv-title { font-size: 40px; letter-spacing: -0.03em; text-transform: none; line-height: 44px; font-weight: 600; } .inv.t-statement .inv-totals .grand { font-size: 24px; }
.inv.t-centered .inv-head { flex-direction: column; align-items: center; text-align: center; } .inv.t-centered .inv-meta { text-align: center; } .inv.t-centered .inv-parties { text-align: center; }
.inv.t-sidebar { padding-left: 120px; } .inv.t-sidebar .inv-side-band { position: absolute; left: 0; top: 0; bottom: 0; width: 72px; background: var(--brand); }
.inv.t-gradient .inv-head { margin: -48px -52px 28px; padding: 40px 52px; background: linear-gradient(135deg, var(--brand), #6B8AF7); color: #fff; } .inv.t-gradient .inv-big { text-align: right; } .inv.t-gradient .inv-big .inv-label { color: rgba(255,255,255,.75); } .inv.t-gradient .inv-big b { font-size: 34px; line-height: 40px; } .inv.t-gradient > .inv-meta { text-align: left; margin-bottom: 28px; }
.inv.t-twotone .inv-parties { background: var(--accent); margin: 0 -52px 36px; padding: 24px 52px; } .inv.t-twotone .inv-totals { border-top-color: var(--brand); }
.inv.t-tabular .inv-table td, .inv.t-tabular .inv-table th { border: 1px solid #E5E7E9; padding: 10px; } .inv.t-tabular .inv-table th { background: #F5F6F6; }
.inv.t-fintech { background: #0F1115; color: #F1F3F4; } .inv.t-fintech .inv-meta, .inv.t-fintech .inv-meta b, .inv.t-fintech .inv-title { color: #F1F3F4; } .inv.t-fintech .inv-table td { border-color: #24282E; } .inv.t-fintech .inv-table th { border-color: #2E333A; } .inv.t-fintech .inv-totals { border-top-color: #F1F3F4; } .inv.t-fintech .inv-notes { color: #A9B1B6; }
/* public page */
.public-inv { max-width: 860px; margin: 0 auto; padding: 24px 16px; }
.public-bar { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-1); padding: 10px 12px 10px 16px; margin-bottom: 18px; flex-wrap: wrap; }
@media print {
  body { background: #fff !important; } .no-print, .side, .inv-top, .inv-form, .toast { display: none !important; }
  .public-inv { padding: 0; max-width: none; } .inv { box-shadow: none; border-radius: 0; min-height: 0; }
  .inv.t-fintech, .inv.t-corporate .inv-head, .inv.t-gradient .inv-head, .inv.t-sidebar .inv-side-band, .inv.t-twotone .inv-parties { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (max-width: 1100px) { .inv-edit { grid-template-columns: 1fr; } .inv-preview { position: static; } .inv { padding: 28px 22px; } .inv-top { flex-wrap: wrap; } }

/* ---------- Leads ---------- */
.leads-board { grid-auto-columns: 255px; }
.lead-table { display: grid; }
.lt-row { display: flex; align-items: center; gap: 12px; padding: 12px 6px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; font-size: 14px; cursor: pointer; width: 100%; }
.lt-row > * { flex: 1; min-width: 0; }
.lt-row:not(.lt-head):hover { background: rgba(255,255,255,.5); }
.lt-head { cursor: default; padding-top: 0; }
.th { display: flex; align-items: center; gap: 4px; border: 0; background: none; font-size: 11px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; color: var(--ink-2); cursor: pointer; padding: 0; }
.lead-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; background: var(--surface); padding: 2px 9px; border-radius: 99px; box-shadow: var(--shadow-1); }
.lead-status { display: flex; align-items: center; gap: 8px; width: 100%; height: 30px; padding: 0 8px; border: 0; border-radius: 7px; background: none; font-size: 12px; cursor: pointer; color: var(--ink); text-align: left; }
.lead-status:hover { background: var(--well); }
.lead-status.on { background: var(--blue-soft); font-weight: 600; }
.suggest { background: var(--well); border-radius: 8px; padding: 10px 12px; font-size: 13px; margin-bottom: 6px; }
.act:disabled { cursor: not-allowed; }

/* ---------- Proposals: editor ---------- */
/* Icon-only sidebar: forced on pages that need the width (.collapsed), or chosen with the toggle (.mini, remembered per device) */
.shell { transition: grid-template-columns .25s cubic-bezier(.2, .8, .2, 1); }
.shell.collapsed, .shell.mini { grid-template-columns: 64px 1fr; }
:is(.collapsed, .mini) .side { padding: 0 8px 6px; }
:is(.collapsed, .mini) .brand span:not(.mark), :is(.collapsed, .mini) .brand > a { font-size: 0; gap: 0; }
:is(.collapsed, .mini) .nav > span, :is(.collapsed, .mini) .navgroup, :is(.collapsed, .mini) .checklist, :is(.collapsed, .mini) .timer-pill .grow { display: none; }
:is(.collapsed, .mini) .nav { justify-content: center; padding: 0; }
:is(.collapsed, .mini) .iconbar { flex-direction: column; align-items: center; }
.side-toggle { color: var(--ink-3); flex: none; } .side-toggle:hover { color: var(--ink); }
.shell.mini .brand { flex-direction: column; justify-content: center; height: auto; padding: 14px 0 10px; gap: 8px; }
.shell.mini .brand > a { flex: none; }
@media (max-width: 720px) { .side-toggle { display: none; } }
.shell.collapsed .main { padding: 14px 14px 0; }
.pe { display: grid; grid-template-columns: auto 1fr 380px; gap: 14px; height: calc(100vh - 28px); }
.pe-pages { width: 220px; background: var(--side); border-radius: 14px; box-shadow: var(--shadow-1); padding: 14px 10px; overflow-y: auto; }
.pe-page { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 8px; cursor: pointer; }
.pe-page:hover, .pe-page.on { background: var(--surface); box-shadow: var(--shadow-1); }
.pe-page-tools { display: none; } .pe-page:hover .pe-page-tools { display: flex; }
.pe-page-tools .btn.icon { width: 22px; height: 22px; }
.pe-canvas { overflow-y: auto; min-width: 0; padding: 0 6px 60px; }
.pe-bar { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; gap: 8px; padding: 0 0 14px; background: linear-gradient(var(--page) 70%, transparent); }
.pe-panel { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-1); padding: 12px 14px; display: flex; flex-direction: column; min-height: 0; }
.pe-panel-body { overflow-y: auto; flex: 1; min-height: 0; margin: 0 -14px; padding: 0 14px 30px; }
.pe-section { display: grid; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 8px; }
.pe-section.on { box-shadow: -14px 0 0 -11px var(--blue); }
.pe-field { gap: 6px; font-size: 13px; } .pe-field .input { font-size: 13px; }
.pe-note { background: var(--well); border-radius: 8px; padding: 10px 12px; font-size: 12px; color: var(--ink-2); }
.pe-card { display: grid; gap: 8px; background: var(--well); border-radius: 10px; padding: 10px; }
.pe-card .input { height: 36px; background: var(--surface); }
.pe-card textarea.input { height: auto; }
.link { border: 0; background: none; padding: 0; color: var(--blue); font-weight: 600; cursor: pointer; font-size: inherit; }
.cv { width: 40px; height: 52px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); padding: 4px; cursor: pointer; }
.cv.on { border: 2px solid var(--ink); }
.cv-i { display: block; width: 100%; height: 100%; border-radius: 3px; background: #2B2B2B; }
.cv-i.v-band { background: linear-gradient(#fff 55%, #E85A2A 55%); } .cv-i.v-split { background: linear-gradient(90deg, #2B2B2B 50%, #EEE 50%); } .cv-i.v-minimal { background: #F4F4F4; box-shadow: inset 0 -10px 0 -8px #161616; }
.look-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.look-grid.two { grid-template-columns: 1fr 1fr; gap: 10px; }
.look { border: 0; background: none; padding: 0; cursor: pointer; display: grid; gap: 6px; font-size: 12px; font-weight: 600; text-align: center; }
.look-thumb { aspect-ratio: 1 / 1.3; border-radius: 8px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); position: relative; }
.look.on .look-thumb { box-shadow: 0 0 0 2px var(--blue); }
.look-scale { width: 640px; transform: scale(.22); transform-origin: top left; pointer-events: none; }
.look-grid:not(.two) .look-scale { transform: scale(.24); }
.look-scale .ppage { margin: 0; box-shadow: none; height: 905px; overflow: hidden; }

/* ---------- Proposals: the document (type scale measured from the reference at 626px page width) ---------- */
.pdoc { --lbl: color-mix(in srgb, var(--p-ink) 45%, transparent); --hair: color-mix(in srgb, var(--p-ink) 12%, transparent);
  display: grid; gap: 28px; justify-items: center; color: var(--p-ink); font-family: var(--p-body); font-size: var(--p-size); line-height: 1.55; letter-spacing: -0.01em; }
.ppage { position: relative; width: 626px; max-width: 100%; min-height: 886px; background: var(--p-page); box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 8px 28px rgba(0,0,0,.08); padding: 56px 56px 36px; display: flex; flex-direction: column; gap: var(--p-gap); cursor: default; scroll-margin-top: 60px; }
.pe-canvas .ppage { cursor: pointer; transition: box-shadow .15s; } .pe-canvas .ppage:hover { box-shadow: 0 0 0 1px rgba(28,100,245,.35), 0 8px 28px rgba(0,0,0,.08); }
.pe-canvas .ppage.sel { box-shadow: 0 0 0 2px var(--blue), 0 8px 28px rgba(0,0,0,.08); }
.pdoc.web { gap: 0; } .pdoc.web .ppage { min-height: 0; box-shadow: none; width: 100%; max-width: 860px; padding: 80px 72px; }
.p-folio { display: flex; justify-content: space-between; font-size: 10px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--lbl); margin: -20px 0 6px; }
.p-eyebrow { font-size: 9.5px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--lbl); margin-bottom: 8px; }
.p-h { font-family: var(--p-head); font-size: 40px; line-height: 1.02; font-weight: 400; letter-spacing: -0.025em; margin: 0; }
.p-h.lg { font-size: 56px; line-height: 1; letter-spacing: -1px; padding-bottom: 20px; position: relative; }
.p-h.lg::after { content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; background: var(--p-accent); }
.p-md p { margin: 0 0 12px; } .p-md p:last-child { margin-bottom: 0; } .p-md ul { margin: 0 0 12px; padding-left: 16px; } .p-md li { margin-bottom: 4px; }
.p-md h3, .p-md h4, .p-md h5 { font-family: var(--p-head); font-weight: 500; margin: 18px 0 6px; } .p-md a { color: var(--p-accent); }
.p-md.intro { font-size: 16px; line-height: 24px; font-weight: 500; letter-spacing: -0.015em; } .p-md.small { font-size: 11.5px; line-height: 1.6; color: color-mix(in srgb, var(--p-ink) 75%, transparent); }
.p-grid { display: grid; grid-template-columns: 1fr 172px; gap: 36px; }
.p-aside { display: grid; gap: 0; align-content: start; }
.p-kv { display: grid; gap: 2px; padding: 10px 0; border-top: 0.8px solid var(--hair); font-size: 12px; }
.p-kv span { font-size: 9.5px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--lbl); } .p-kv b { font-weight: 500; }
.ppage.t-pricing .p-kv { grid-template-columns: 1fr auto; align-items: baseline; } .ppage.t-pricing .p-kv span { font-size: 11px; letter-spacing: 0; text-transform: none; color: inherit; opacity: .75; }
.p-callout { margin-top: 18px; border-top: 0.8px solid var(--hair); padding-top: 10px; font-size: 12px; }
.p-callout b { display: block; font-size: 9.5px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--lbl); margin-bottom: 4px; }
.p-lines { display: grid; border-top: 0.8px solid color-mix(in srgb, var(--p-ink) 50%, transparent); }
.p-line { display: grid; grid-template-columns: 170px 1fr 96px; gap: 18px; padding: 14px 0; border-bottom: 0.8px solid var(--hair); align-items: start; }
.p-line > b:first-child { font-size: 14px; line-height: 18px; font-weight: 700; letter-spacing: -0.02em; }
.p-line > span { font-size: 11px; line-height: 16px; color: color-mix(in srgb, var(--p-ink) 70%, transparent); }
.p-line > b:last-child { text-align: right; font-size: 15px; font-weight: 500; letter-spacing: -0.02em; font-family: var(--font); }
.p-line.sub { border-bottom: 0; padding-bottom: 4px; } .p-line.sub > span:first-child { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--p-ink); }
.p-line.total { grid-template-columns: 1fr auto; border-top: 0.8px solid color-mix(in srgb, var(--p-ink) 50%, transparent); border-bottom: 0; padding-top: 16px; } .p-line.total > span:first-child { font-size: 16px; font-weight: 500; color: var(--p-ink); }
.p-line.total > span:nth-child(2) { display: none; } .p-line.total > b:last-child { font-size: 26px; font-weight: 600; letter-spacing: -0.03em; }
.p-scope { background: color-mix(in srgb, #fff 70%, var(--p-page)); border-radius: 2px; padding: 18px 20px; }
.p-scope > .p-eyebrow { margin-bottom: 12px; }
.p-scope-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 22px; }
.p-scope-cols .p-eyebrow { font-size: 9px; font-weight: 600; margin: 0 0 6px; }
.p-check { font-size: 11px; line-height: 15px; padding: 3px 0; display: flex; gap: 6px; } .p-check.off { color: var(--lbl); }
.p-packages { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.p-package { border: 0.8px solid color-mix(in srgb, var(--p-ink) 25%, transparent); border-radius: var(--p-radius); padding: 18px; display: grid; gap: 8px; align-content: start; background: color-mix(in srgb, #fff 50%, var(--p-page)); }
.p-package > b { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; } .p-package.chosen { border: 2px solid var(--p-accent); }
.p-price { font-size: 30px; font-weight: 500; letter-spacing: -0.03em; font-family: var(--p-head); line-height: 1.1; } .p-pk-item { font-size: 11px; border-top: 0.8px solid var(--hair); padding-top: 6px; }
.p-cases { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 18px; } .p-cases.one { grid-template-columns: 1fr; }
.p-case { display: grid; gap: 4px; font-size: 11.5px; line-height: 16px; } .p-case b { font-size: 14px; font-weight: 600; letter-spacing: -0.02em; margin-top: 4px; } .p-case a { color: var(--p-accent); font-weight: 600; }
.p-case-img { aspect-ratio: 4 / 3; border-radius: var(--p-radius); background: color-mix(in srgb, var(--p-ink) 8%, var(--p-page)) center/cover; }
.p-contact { display: flex; gap: 18px; align-items: flex-start; border-top: 0.8px solid var(--hair); padding-top: 14px; font-size: 12px; }
.p-contact b { display: block; margin-top: 8px; font-weight: 600; }
.p-accept { margin-top: auto; border-top: 0.8px solid color-mix(in srgb, var(--p-ink) 50%, transparent); padding-top: 18px; }
.p-accept-btn { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 26px; border: 0; border-radius: 999px; background: var(--p-ink); color: var(--p-page); font-weight: 600; font-size: 14px; cursor: pointer; font-family: var(--font); letter-spacing: -0.01em; }
.p-accept-btn:hover { background: var(--p-accent); color: #fff; }
.p-decline { border: 0; background: none; color: inherit; opacity: .6; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-family: var(--font); font-size: 12px; }
.p-signed { display: grid; gap: 2px; } .p-signed .p-sig { font-family: 'Brush Script MT', 'Segoe Script', cursive; font-size: 34px; line-height: 1.2; }
.print-only { display: none; }
.p-sign-lines { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; } .p-sign-lines div { border-top: 0.8px solid var(--p-ink); padding-top: 4px; margin-top: 44px; font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--lbl); }
.p-logo { max-height: 30px; max-width: 130px; object-fit: contain; }
/* cover */
.ppage.t-cover { padding: 0; }
.p-cover { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; padding: 56px; background: var(--p-cover); color: var(--p-cover-ink); overflow: hidden; }
.p-cover::before { content: ''; position: absolute; inset: 0; background: var(--p-img, none) center/cover; opacity: .4; }
.p-cover > * { position: relative; }
.p-cover .p-logo { position: absolute; top: 56px; left: 56px; }
.p-cover-meta { position: absolute; top: 56px; right: 56px; display: grid; grid-template-columns: auto auto; gap: 9px 22px; font-size: 10px; line-height: 13px; }
.p-cover-meta div { display: contents; } .p-cover-meta span { color: color-mix(in srgb, var(--p-cover-ink) 50%, transparent); text-transform: uppercase; letter-spacing: .1em; font-size: 9.5px; font-weight: 500; } .p-cover-meta b { font-weight: 500; white-space: pre-line; }
.p-cover-title h1 { font-family: var(--p-head); font-size: 112px; line-height: .88; letter-spacing: -0.02em; margin: 0 0 18px; font-weight: 500; overflow-wrap: anywhere; }
.p-cover.upper .p-cover-title h1 { text-transform: uppercase; font-weight: 800; font-size: 84px; line-height: .9; }
.p-cover-sub { font-size: 15px; letter-spacing: .04em; text-transform: uppercase; color: color-mix(in srgb, var(--p-cover-ink) 60%, transparent); padding-bottom: 30px; border-bottom: 0.8px solid color-mix(in srgb, var(--p-cover-ink) 60%, transparent); }
.p-cover.v-band { background: var(--p-page); color: var(--p-ink); justify-content: center; }
.p-cover.v-band::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 30%; background: var(--p-accent); }
.p-cover.v-band .p-cover-meta span { color: var(--lbl); }
.p-cover.v-split { background: linear-gradient(90deg, var(--p-cover) 58%, var(--p-page) 58%); }
.p-cover.v-split .p-cover-meta { color: var(--p-ink); } .p-cover.v-split .p-cover-meta span { color: var(--lbl); }
.p-cover.v-minimal { background: var(--p-page); color: var(--p-ink); } .p-cover.v-minimal .p-cover-meta span { color: var(--lbl); }
.p-cover.v-minimal .p-cover-title h1 { font-size: 56px; line-height: 1; font-weight: 400; } .p-cover.v-minimal .p-cover-sub { color: var(--lbl); border-color: var(--hair); }
@media print {
  .pdoc { gap: 0; } .ppage { box-shadow: none; width: 100%; break-after: page; aspect-ratio: auto; min-height: 100vh; }
  .print-only { display: grid; } .p-cover, .ppage, .p-accept-btn, .p-callout, .p-scope { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (max-width: 1100px) { .pe { grid-template-columns: 1fr; height: auto; } .pe-pages { width: auto; } .p-grid, .p-scope-cols { grid-template-columns: 1fr; } }

/* ---------- Claude requests ---------- */
.claude-card { display: grid; gap: 10px; background: var(--surface); border: 1px dashed #A9B8F5; border-radius: 12px; padding: 12px 14px; }
.claude-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--blue); animation: pulse 1.6s ease-in-out infinite; flex: none; }
.claude-say { background: var(--well); border-radius: 6px; padding: 3px 8px; font-size: 12px; }
.bubble { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-1); padding: 12px 14px; max-width: 92%; }
.bubble.me { justify-self: end; background: var(--ink); color: #fff; }
:root[data-theme="dark"] .bubble.me { background: var(--blue); }
.report { max-width: 820px; font-size: 15px; line-height: 1.7; }
.report .p-md h3 { font-size: 18px; } .report .p-md h4 { font-size: 15px; }
.agenda-item { display: grid; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.agenda-n { width: 22px; height: 22px; border-radius: 50%; background: var(--well); display: grid; place-items: center; font-size: 11px; font-weight: 600; flex: none; }

/* ---------- Portal ---------- */
.portal-setup { display: grid; grid-template-columns: 240px 1fr; gap: 18px; align-items: start; }
.portal { max-width: 860px; margin: 0 auto; padding: 24px 16px; }
.portal-head { display: flex; align-items: center; justify-content: space-between; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-1); padding: 14px 18px; margin-bottom: 22px; border-top: 4px solid var(--brand); }
.portal-logo { max-height: 36px; max-width: 140px; object-fit: contain; }
.list-row.on { background: var(--well); border-radius: 8px; }
@media (max-width: 820px) { .portal-setup { grid-template-columns: 1fr; } }

/* ---------- Client portal (public) ---------- */
.cp { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.cp-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 2px; padding: 18px 10px; border-right: 1px solid var(--line); background: var(--side); }
.cp-side .nav { border: 0; background: none; cursor: pointer; width: 100%; text-align: left; font-family: inherit; }
.cp-side .nav.on { background: var(--surface); }
.cp-brand { display: flex; align-items: center; gap: 10px; padding: 0 6px 18px; font-weight: 600; font-size: 17px; letter-spacing: -0.02em; }
.cp-brand img { max-height: 28px; max-width: 120px; object-fit: contain; }
.cp-switch { height: 36px; margin: 0 0 10px; font-size: 13px; }
.cp-client { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 10px 6px 0; border-top: 1px solid var(--line); }
.cp-main { padding: 40px 40px 20px; max-width: 1100px; width: 100%; display: grid; gap: 12px; align-content: start; }
.cp-main h1 { font-size: 22px; }
.cp-card { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-1); padding: 18px 20px; }
.cp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cp-lbl { font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.cp-val { font-size: 18px; font-weight: 500; letter-spacing: -0.02em; margin-top: 6px; }
.cp-empty { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 22px 12px; font-size: 13px; }
.cp-empty b { font-weight: 600; }
.cp-well { background: var(--well); border-radius: 12px; }
.cp-steps { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.cp-step { display: grid; gap: 8px; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; color: var(--ink-2); }
.cp-step.active, .cp-step.done { color: var(--ink); }
.cp-bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.cp-bar i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.cp-num { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; font-size: 9px; font-weight: 600; background: transparent; color: var(--ink-2); }
.cp-step.active .cp-num { background: var(--brand); color: #fff; } .cp-step.done .cp-num { color: var(--brand); }
.cp-check { font-size: 13px; padding: 3px 0; }
@media (max-width: 820px) { .cp { grid-template-columns: 1fr; } .cp-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; } .cp-client, .cp-brand { display: none; } .cp-main { padding: 20px 16px; } .cp-stats { grid-template-columns: 1fr; } .cp-steps { grid-auto-flow: row; } }

/* ---------- Public pages (proposal, invoice) ---------- */
.pub { min-height: 100vh; }
.pub-bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; height: 60px; padding: 0 24px; background: color-mix(in srgb, var(--page) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.pub-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.02em; flex: 1; min-width: 0; }
.pub-brand img { max-height: 26px; max-width: 120px; object-fit: contain; }
.pub-title { font-size: 13px; color: var(--ink-2); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pub-bar > .row { flex: 1; justify-content: flex-end; }
.pub-doc { max-width: 900px; margin: 32px auto 0; padding: 0 16px; }
.pub-due { display: flex; align-items: baseline; justify-content: center; gap: 10px; margin-top: 28px; } .pub-due b { font-size: 26px; font-weight: 600; letter-spacing: -0.03em; }
.pub-float { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 30; display: flex; align-items: center; gap: 14px; background: var(--surface); border-radius: 999px; padding: 8px 8px 8px 22px; box-shadow: 0 10px 34px rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.04); animation: pop-in .3s ease-out both; white-space: nowrap; }
.pub-float .btn { border-radius: 999px; }
@media (max-width: 700px) { .pub-title { display: none; } .pub-float { left: 12px; right: 12px; transform: none; } .ppage { padding: 32px 22px 24px; min-height: 0; } .p-cover { padding: 28px; min-height: 520px; } .p-cover-title h1 { font-size: 64px; } .p-cover-meta { top: 28px; right: 28px; } .p-h.lg { font-size: 38px; } .p-grid, .p-scope-cols, .p-cases { grid-template-columns: 1fr; } .p-line { grid-template-columns: 1fr auto; } .p-line > span { grid-column: 1 / -1; grid-row: 2; } }
@media print { .pub-bar, .pub-float, .pub-due { display: none !important; } .pub-doc { margin: 0; padding: 0; max-width: none; } }

/* ---------- Notifications, join ---------- */
.bell-dot { position: absolute; top: 3px; right: 2px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 99px; background: var(--danger); color: #fff; font-size: 9px; font-weight: 700; display: grid; place-items: center; }
.notif { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 8px; }
.notif:hover { background: var(--well); } .notif.new { background: var(--blue-soft); }
.join-note { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); background: var(--surface); border-radius: 10px; box-shadow: var(--shadow-1); padding: 10px 16px; font-size: 13px; font-weight: 500; z-index: 5; }
.pop.up { top: auto; bottom: calc(100% + 6px); transform-origin: bottom left; }

/* ---------- search palette ---------- */
.sp-scrim { place-items: start center; padding-top: 26vh; }
.sp { width: min(600px, 100%); background: var(--surface); border-radius: 10px; box-shadow: 0 8px 12px rgba(0, 0, 0, .15); overflow: hidden; display: flex; flex-direction: column; max-height: 60vh; animation: pop-in .14s ease-out both; }
.sp-in { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.sp-in input { flex: 1; height: 44px; border: 0; outline: 0; background: none; font: inherit; font-size: 14px; color: var(--ink); }
.sp-in kbd { font: 11px/1 inherit; color: var(--ink-2); background: var(--well); border-radius: 4px; padding: 3px 5px; }
.sp-list { overflow-y: auto; padding: 6px; }
.sp-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: 8px; text-align: left; cursor: pointer; color: var(--ink); }
.sp-row.on { background: var(--well); }
.sp-row b { display: block; font-size: 14px; font-weight: 500; } .sp-row .grow > span { display: block; font-size: 12px; color: var(--ink-2); }
.sp-ico { width: 30px; height: 30px; border-radius: 8px; background: var(--well); display: grid; place-items: center; flex: none; color: var(--ink-2); }
.sp-row.on .sp-ico { background: var(--surface); }
.sp-group { font-size: 11px; color: var(--ink-2); flex: none; }
.sp-foot { padding: 9px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-2); }
.pill-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.pill-tabs button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid transparent; border-radius: 8px; background: rgba(255,255,255,.5); font: inherit; font-size: 12px; font-weight: 600; color: var(--ink-2); cursor: pointer; transition: background .15s, color .15s; }
.pill-tabs button:hover { color: var(--ink); }
.pill-tabs button.on { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-1); }
.rcard { display: flex; flex-direction: column; height: 100%; padding: 12px 14px 14px; }
.rcard-ini { width: 52px; height: 52px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-1); display: grid; place-items: center; font-weight: 600; color: #555; margin: 18px auto 0; }
.rcard b { margin-top: auto; font-size: 16px; font-weight: 600; line-height: 21px; padding-right: 22px; }
.hello-tile { width: 48px; height: 48px; border-radius: 12px; background: var(--surface) center / cover; box-shadow: 0 1px 4px rgba(0,0,0,.1); display: grid; place-items: center; color: var(--ink-2); }
.check-scroll { max-height: 260px; overflow-y: auto; }

/* ---------- Hover motion (measured on the reference) ---------- */
/* cards and add tiles grow 1.5%; folders open their front cover (above) */
.pcard, .ccard, .doc-card { transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .15s; }
.pcard:hover, .ccard:hover, .pcard:focus-visible, .ccard:focus-visible { transform: scale(1.015); }
.task { transition: box-shadow .15s, border-color .12s; }
.btn.ghost.icon:hover { background: rgba(0, 0, 0, .04); }
.colhead .btn.icon { opacity: 0; transition: opacity .15s; }
.colhead:hover .btn.icon, .colhead .btn.icon:focus-visible { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .folder:hover .folder-front, .pcard:hover, .ccard:hover { transform: none; } .cw-fab-img, .cw-panel { animation: none !important; } }

/* ---------- Co-worker avatars ---------- */
.buddy-img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; user-select: none; }
.opt.buddy { padding: 0; overflow: hidden; border-radius: 12px; }
.opt.buddy.on { box-shadow: 0 0 0 2px var(--ink); }
.buddy-hero { width: 112px; height: 112px; border-radius: 24px; overflow: hidden; margin: 4px auto 10px; }
.buddy-dot { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex: none; }
.buddy-dot.sm { width: 28px; height: 28px; border-radius: 8px; }

/* ---------- Co-worker side panel (440px floating card, slides in from the right) ---------- */
@keyframes cw-in { from { transform: translateX(calc(100% + 30px)); } }
@keyframes cw-float { 50% { transform: translateY(-3px); } }
.cw-panel { position: fixed; top: 15px; right: 15px; bottom: 15px; width: 440px; max-width: calc(100vw - 30px); z-index: 55; display: flex; flex-direction: column; background: var(--surface); border-radius: 16px;
  box-shadow: -8px 0 16px -8px rgba(0, 0, 0, .2), 4px 8px 18px -5px rgba(0, 0, 0, .16); animation: cw-in .4s cubic-bezier(.16, 1, .3, 1) both; }
.cw-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 8px 16px; font-size: 14px; } .cw-head b { font-weight: 600; }
.cw-body { flex: 1; overflow: auto; padding: 12px 16px; }
.cw-title { font-size: 16px; font-weight: 700; } .cw-sub { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.cw-tips { margin-top: 16px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.cw-tips-head { display: flex; align-items: center; padding: 6px 8px 6px 12px; font-size: 13px; font-weight: 500; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.cw-tip { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-top: 1px solid var(--line); background: none; font: inherit; font-size: 14px; font-weight: 500; text-align: left; color: var(--ink); cursor: pointer; }
.cw-tips-head + .cw-tip { border-top: 0; } .cw-tip:hover { background: var(--well); }
.cw-num { width: 20px; height: 20px; flex: none; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 5px; font-size: 11px; color: var(--ink-2); }
.cw-compose { margin: 0 12px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 6px; box-shadow: var(--shadow-1); }
.cw-compose textarea { border: 0; outline: 0; resize: none; min-height: 48px; font: inherit; font-size: 14px; background: none; color: var(--ink); }
.cw-send { width: 28px; height: 28px; flex: none; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--blue); color: #fff; cursor: pointer; }
.cw-send:disabled { opacity: .35; cursor: default; }
.cw-foot { padding: 8px 16px 12px; font-size: 11px; color: var(--ink-3); text-align: center; }
.cw-switch { position: fixed; top: 6px; right: 12px; z-index: 20; display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 6px 0 10px; border-radius: 8px; background: color-mix(in srgb, var(--surface) 70%, transparent); font-size: 12px; font-weight: 600; cursor: pointer; }
.toggle.sm { width: 36px; height: 20px; } .toggle.sm::after { width: 14px; height: 14px; top: 3px; left: 3px; }
.toggle.sm:checked::after { transform: translateX(16px); }
.cw-fab { position: fixed; right: 14px; bottom: 14px; z-index: 20; width: 58px; height: 58px; padding: 0; border: 0; background: none; cursor: pointer; transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
.cw-fab-img { display: block; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; border: 2px solid var(--surface); filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .22)); animation: cw-float 3s ease-in-out infinite; transition: filter .25s; }
.cw-fab:hover { transform: scale(1.098); } .cw-fab:hover .cw-fab-img { filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .25)); }
.buddy-dot.xs { width: 22px; height: 22px; border-radius: 50%; }

/* Lead panel: suggestions and a chat box that hands off to the Co-worker panel */
.lead-cw { margin-top: 18px; display: grid; gap: 8px; }
.lead-cw .suggest { border: 1px solid var(--line); text-align: left; font: inherit; font-size: 13px; color: var(--ink); cursor: pointer; margin: 0; } .lead-cw .suggest:hover { background: var(--surface); }
.cw-inline { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.cw-inline input { flex: 1; border: 0; outline: 0; background: none; font: inherit; font-size: 13px; color: var(--ink); }
@media (max-width: 720px) { .cw-switch { display: none; } }

/* New research and new client forms */
.nr-title { font-size: 20px; font-weight: 600; margin: 0; } .nr-sub { margin: 6px 0 0; font-size: 13px; color: var(--ink-2); }
.nr-label { font-size: 13px; font-weight: 600; } .req { color: #E5484D; font-style: normal; }
.nr-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.nr-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 4px 0 10px; border-radius: 8px; background: var(--well); font-size: 12px; font-weight: 500; animation: pop-in .14s ease-out both; }
.nr-chip button { width: 20px; height: 20px; border: 0; border-radius: 5px; background: none; display: grid; place-items: center; color: var(--ink-3); cursor: pointer; } .nr-chip button:hover { background: rgba(0,0,0,.06); color: var(--ink); }
.nr-steps { display: grid; gap: 10px; }
.nr-step { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-3); transition: color .2s; } .nr-step.ok, .nr-step.now { color: var(--ink); } .nr-step.now { font-weight: 600; }
.nr-dot { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; flex: none; transition: background .2s; }
.nr-step.ok .nr-dot { background: #30A46C; border-color: #30A46C; color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--ink); animation: spin .8s linear infinite; }
.nc-preview { display: grid; grid-template-columns: 192px 1fr; gap: 20px; align-items: start; animation: fade-in .25s ease-out both; }

/* Dark: anything that paints var(--ink) as a fill needs dark text on top */
:root[data-theme="dark"] .toast, :root[data-theme="dark"] .today-pill, :root[data-theme="dark"] .play:hover, :root[data-theme="dark"] .hero-card .bottom { color: #161616; }
:root[data-theme="dark"] .btn:hover { background: #2C323A; }
:root[data-theme="dark"] .btn.primary:hover { background: #DBDFE2; }
:root[data-theme="dark"] .act:hover { background: #2C323A; }
:root[data-theme="dark"] .lt-row:not(.lt-head):hover { background: rgba(255, 255, 255, .04); }
:root[data-theme="dark"] .pill-tabs button { background: rgba(255, 255, 255, .04); }
:root[data-theme="dark"] .ccard-logo { background-color: var(--surface); color: var(--ink-2); }
:root[data-theme="dark"] .cw-num { border-color: var(--line); }
.seg-tools { gap: 2px; background: rgba(255, 255, 255, .5); border-radius: 9px; padding: 2px; }
:root[data-theme="dark"] .seg-tools { background: var(--side); }
:root[data-theme="dark"] .tool.on { background: var(--surface); box-shadow: var(--shadow-1); }
:root[data-theme="dark"] .toggle { background: var(--line); }
:root[data-theme="dark"] .toggle:checked { background: var(--blue); }
:root[data-theme="dark"] .folder svg { fill: #3D4754; stroke: #6B7A8D; stroke-width: 1px; vector-effect: non-scaling-stroke; }
:root[data-theme="dark"] .folder svg path { vector-effect: non-scaling-stroke; }
.ns-top { height: 110px; background: var(--bg); display: grid; place-items: center; color: #161616; }
:root[data-theme="dark"] .ns-top { background: color-mix(in srgb, var(--bg) 22%, #2C323A); color: var(--ink); }
:root[data-theme="dark"] .card { background: var(--surface); }

/* ---------- Proposal editor, measured on the reference at 1440×900 ---------- */
.pe { grid-template-columns: auto 1fr 360px; gap: 0; height: calc(100vh - 14px); }
.pe-pages { width: 236px; background: #F7FAFC; border-radius: 16px; box-shadow: none; padding: 16px 12px; }
.pe-pages-head { margin-bottom: 18px; padding: 0 4px 0 12px; font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-2); }
.pe-pages-head span span { margin-left: 4px; letter-spacing: 0; }
.pe-page { gap: 8px; padding: 10px 12px; border-radius: 10px; align-items: flex-start; }
.pe-page:hover { background: rgba(0, 0, 0, .03); box-shadow: none; } .pe-page.on { background: var(--surface); box-shadow: var(--shadow-1); }
.pe-num { width: 12px; flex: none; font-size: 11px; font-weight: 600; line-height: 20px; color: var(--ink-2); }
.pe-title { display: block; font-size: 13px; line-height: 20px; font-weight: 400; color: var(--ink); }
.pe-sub { font-size: 11px; line-height: 20px; font-weight: 500; color: var(--ink-2); }
.pe-add { width: 100%; height: 42px; margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--field); border-radius: 12px; background: none; font: inherit; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.pe-add:hover { background: rgba(0, 0, 0, .03); color: var(--ink); }
.pe-canvas { padding: 0 20px 60px; }
.pe-bar { gap: 8px; padding: 16px 0 32px; background: linear-gradient(var(--page) 80%, transparent); }
.pe-bar .seg-nav { border-radius: 10px; padding: 3px; } .pe-bar .seg-nav button { width: 30px; height: 28px; }
.pe-bar .chip { height: 28px; padding: 0 8px; border-radius: 12px; font-size: 11px; font-weight: 600; letter-spacing: .3px; }
.pe-bar .chip.blue { background: #DCE7FF; }
.pe-btn { height: 40px; padding: 0 12px; border: 0; border-radius: 12px; background: #F6F6F6; font-size: 14px; font-weight: 600; gap: 6px; }
.pe-btn:hover { background: #EDEEEE; }
.pe-panel { margin: 12px 12px 12px 0; padding: 0; border-radius: 20px; box-shadow: 0 2px 12px rgba(0, 0, 0, .08); overflow: hidden; }
.pe-tabs { display: flex; gap: 0; align-self: flex-start; margin: 16px 12px 0; padding: 3px; border-radius: 8px; background: #F5F6F6; }
.pe-tabs button { padding: 6px 10px; border: 0; border-radius: 6px; background: none; font: inherit; font-size: 13px; line-height: 20px; color: var(--ink-2); cursor: pointer; }
.pe-tabs button.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.pe-panel-body { margin: 12px 0 0; padding: 0 0 30px; }
.pe-section { display: block; padding: 0; border-bottom: 0; }
.pe-section.on { box-shadow: none; }
.pe-section-head { position: sticky; top: 0; z-index: 1; padding: 12px 16px 10px; background: var(--surface); border-bottom: 1px solid var(--field); font-size: 12px; line-height: 20px; font-weight: 500; color: var(--ink-2); }
.pe-section-head b { display: block; font-size: 14px; font-weight: 600; color: var(--ink); }
.pe-section.on .pe-section-head b::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); margin: 0 6px 2px 0; }
.pe-section-body { display: grid; gap: 20px; padding: 16px 19px 20px; }
.pe-field { gap: 4px; font-size: 14px; font-weight: 600; } .pe-field .hint { margin-top: 0 !important; font-size: 12px; font-weight: 500; }
.pe-field .input, .pe-section-body .input { height: 42px; font-size: 14px; } .pe-section-body textarea.input { height: auto; }
.pe-note { display: flex; align-items: center; gap: 10px; justify-content: space-between; background: #F7FAFC; border-radius: 8px; padding: 8px 10px; font-size: 12px; font-weight: 500; line-height: 16px; }
.pe-note .link { flex: none; font-size: 12px; }
.pe-image { height: 200px; border: 0; border-radius: 9px; background-color: #F5F6F6; background-size: cover; background-position: center; }
.pe-section-body .side-label { margin: 0; font-size: 11px; font-weight: 600; letter-spacing: 1px; color: var(--ink-2); }
.pe-section-body .row > b { font-size: 14px !important; }
.pe-panel .toggle { width: 36px; height: 20px; } .pe-panel .toggle::after { width: 14px; height: 14px; } .pe-panel .toggle:checked { background: var(--ink); } .pe-panel .toggle:checked::after { transform: translateX(16px); }
.cv { width: 34px; height: 45px; padding: 2px; border: 2px solid transparent; border-radius: 6px; background: none; }
.cv.on { background: #EFF6FF; border-color: #2563EB; }
.cv-i { border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .1); }
:root[data-theme="dark"] .pe-pages { background: var(--side); }
:root[data-theme="dark"] .pe-btn, :root[data-theme="dark"] .pe-tabs { background: var(--well); }
:root[data-theme="dark"] .pe-note, :root[data-theme="dark"] .pe-image { background: var(--well); }
:root[data-theme="dark"] .cv.on { background: var(--blue-soft); }
:root[data-theme="dark"] .pe-panel .toggle:checked { background: var(--blue); }
/* editor fills the window: canvas runs edge to edge, side panels float 15/12px in */
.shell.collapsed .main:has(> .page-enter > .pe), .shell.collapsed .main:has(> .pe) { padding: 0 0 0 8px; }
.pe { height: 100vh; }
.pe-pages { margin: 15px 0; }
.pe-pages-head { margin-bottom: 12px; }
.pe-add { margin-top: 2px; }
.pe-section-body { gap: 12px; }
.pe-group { font-size: 14px; font-weight: 600; line-height: 20px; }
.pe { grid-template-columns: auto 1fr 372px; }
.pe-pages-head { margin-bottom: 6px; }
.pe-section-body { padding-top: 24px; }
.pe-section-body .field.pe-field { gap: 4px; }
.pe-add { margin-top: 8px; }
.pe-section-body { padding: 26px 26px 20px 19px; }
.pe-section-body > .side-label { margin-top: 17px; }
.pe-section-body > .row:has(> .toggle) { height: 20px; }
.pe-section-body { padding-right: 11px; }
/* Proposal cards: folder with a light front and a status-coloured strip */
.pfolder .folder-bg { box-shadow: var(--shadow-1); border-radius: 10px; }
.pfolder .folder svg { fill: #F5F6F6; }
.pfolder svg { fill: #F5F6F6; filter: none; }
.pfolder .folder-pill { left: auto; right: 22px; top: 8px; }
.pfolder .chip { height: 28px; padding: 0 8px; border-radius: 12px; font-size: 11px; font-weight: 600; letter-spacing: .3px; }
.pfolder .chip.blue { background: #DCE7FF; }
.pfolder .folder-body { left: 12px; right: 28px; bottom: 15px; gap: 2px; }
.pf-name { font-size: 16px; line-height: 22px; font-weight: 600; letter-spacing: -.015px; }
.pf-meta { display: flex; align-items: center; gap: 5px; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ink-2); }
.pf-date { font-size: 12px; line-height: 16px; font-weight: 500; color: rgba(22, 22, 22, .4); margin-top: 6px; }
:root[data-theme="dark"] .pfolder svg { fill: var(--card); stroke: var(--card-line); } :root[data-theme="dark"] .pf-date { color: var(--ink-3); }
.folder-body svg.ico, .folder-pill svg { position: static; inset: auto; width: 12px; height: 12px; fill: none; filter: none; stroke: currentColor; }
.pe-pad { padding: 12px 11px 20px 19px; }
/* segmented controls inside the editor panel: grey track, white raised choice */
.pe-panel .seg { border: 0; background: #F5F6F6; border-radius: 8px; padding: 3px; gap: 0; height: 38px !important; }
.pe-panel .seg button { border: 0; border-radius: 6px; background: none; font-size: 13px; color: var(--ink-2); }
.pe-panel .seg button.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
:root[data-theme="dark"] .pe-panel .seg { background: var(--well); }
/* proposal card ⋯ menu: sits beside the folder so it doesn't tilt with the cover */
.pf-wrap { position: relative; height: 256px; }
.pf-wrap:hover .folder-front { transform: rotateY(20deg); }
.pf-wrap:has(.pf-dots.on) .folder-front { transform: none; }
.pf-menu { position: absolute; right: 22px; bottom: 12px; z-index: 3; }
.pf-dots { width: 24px; height: 24px; display: grid; place-items: center; border: 0; border-radius: 6px; background: none; color: var(--ink-2); cursor: pointer; }
.pf-dots:hover, .pf-dots.on { background: rgba(0, 0, 0, .06); color: var(--ink); }
.pf-menu .pop { max-height: min(420px, 60vh); overflow-y: auto; }
:root[data-theme="dark"] .pf-dots:hover, :root[data-theme="dark"] .pf-dots.on { background: rgba(255, 255, 255, .08); }

/* Client portal: invoices */
.cp-inv-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.cp-inv-sum .cp-card { display: grid; gap: 4px; } .cp-inv-sum b { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.cp-inv { display: flex; align-items: center; gap: 14px; padding: 12px 6px; border-top: 1px solid var(--line); color: inherit; border-radius: 8px; }
.cp-inv:first-of-type { border-top: 0; } .cp-inv:hover { background: var(--well); }
.cp-inv b { font-weight: 600; } .cp-inv .grow { display: grid; gap: 2px; min-width: 0; }
.cp-inv-due { font-size: 12px; color: var(--ink-2); width: 110px; } .cp-inv-amt { width: 110px; text-align: right; }
.cp-inv .chip { width: 86px; justify-content: center; } .cp-inv > .ico { color: var(--ink-3); }
@media (max-width: 720px) { .cp-inv-due { display: none; } .cp-inv-amt { width: auto; } }
:root { --nd-7f3a91c2: 0.0137; }

/* ---------- team: avatars, assignees, mentions, access ---------- */
.av { display: inline-grid; place-items: center; flex: none; border-radius: 50%; background: var(--well) center / cover; color: var(--ink-2); font-weight: 600; box-shadow: 0 0 0 2px var(--surface); }
.avs { display: inline-flex; margin-left: auto; }
.avs .av + .av { margin-left: -6px; }
.add-av { width: 28px; height: 28px; border: 1px dashed var(--line); border-radius: 50%; }
.mention { color: var(--blue); background: color-mix(in srgb, var(--blue) 12%, transparent); border-radius: 6px; padding: 0 4px; font-weight: 500; }
.mention-pop { position: absolute; top: auto; left: 0; bottom: calc(100% + 4px); width: 260px; max-height: 220px; overflow-y: auto; z-index: 20; }
.check-box { width: 18px; height: 18px; accent-color: #22A06B; cursor: pointer; }
.check-box:disabled { cursor: default; }
.seg.sm { height: 26px; display: inline-grid; }
.seg.sm button { padding: 0 10px; font-size: 11px; }
.assign-list { margin-top: 6px; background: var(--well); border-radius: 10px; padding: 4px; }
.assign-list .menu-item { min-height: 44px; padding: 6px 8px; font-size: 13px; }
.assign-list .menu-item.picked { background: var(--surface); }

/* ---------- team settings, invite and new team (measured against the reference) ---------- */
:root { --tm-box: #F8F8F8; --tm-ctl: #F5F6F6; --tm-line: #EBEBEB; --tm-sub: #515151; --tm-faint: #A2A2A2; --tm-btn: #F6F6F6; --tm-tile: #FFFFFF; --tm-ico: #6B6B6B; }
:root[data-theme="dark"] { --tm-box: #2B3037; --tm-ctl: #343B45; --tm-line: #3A414B; --tm-sub: #B6BCC4; --tm-faint: #8A929C; --tm-btn: #343B45; --tm-tile: #25292E; --tm-ico: #B6BCC4; }
.set-card.tmc { padding: 20px; gap: 24px; }
.tm-sec { display: grid; gap: 24px; }
.tm-sec h2 { font-size: 20px; line-height: 28px; font-weight: 600; margin: 0; }
.tm-sec h3 { font-size: 16px; line-height: 22px; font-weight: 600; margin: 0; }
.tm-top { display: flex; align-items: flex-start; gap: 12px; }
.tm-hd { flex: 1; display: grid; gap: 4px; }
.tm-hd p, .tm-desc { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--tm-sub); margin: 4px 0 0; }
.tm-hd p { margin: 0; }
.tm-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 4px 12px; border: 0; border-radius: 12px; background: var(--tm-btn); color: var(--ink); font-family: inherit; font-size: 14px; line-height: 20px; font-weight: 600; cursor: pointer; flex: none; }
.tm-btn.sm { height: 34px; }
.tm-btn.ghost { background: none; }
.tm-btn.ghost:disabled { color: #737373; cursor: default; }
.tm-btn.dark { background: var(--ink); color: var(--surface); }
.tm-btn:disabled { opacity: 1; }
.tm-btn.dark:disabled { opacity: .5; }
.tm-box { background: var(--tm-box); border: 1px solid var(--tm-line); border-radius: 9px; }
.tm-cur { display: flex; align-items: center; gap: 16px; padding: 16px; }
.tm-logo { width: 64px; height: 64px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--tm-tile) center / cover; font-size: 22px; line-height: 30px; font-weight: 600; }
.tm-field { display: grid; gap: 4px; flex: 1; }
.tm-field > span:first-child { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--tm-sub); }
.tm-sel { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 10px; background: var(--tm-ctl); border: 1px solid var(--tm-line); border-radius: 7px; font-size: 14px; line-height: 20px; font-weight: 400; color: var(--ink); box-sizing: border-box; flex: none; }
.tm-sel select { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.tm-sel.off { color: var(--ink); }
.tm-list { display: grid; gap: 8px; }
.tm-row { display: flex; align-items: center; gap: 12px; padding: 12px; }
.av.tile { border-radius: 8px; background-color: var(--tm-tile); box-shadow: none; color: var(--tm-ico); }
.tm-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tm-who b { font-size: 14px; line-height: 20px; font-weight: 600; }
.tm-who small, .tm-person small { font-size: 12px; line-height: 16px; font-weight: 500; }
.tm-col { display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.tm-who.tm-col { gap: 0; align-items: flex-start; }
.tmc small.muted { color: var(--tm-sub); }
.tm-acts { display: flex; align-items: center; gap: 8px; }
.tm-ico { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 8px; background: var(--tm-ctl); color: var(--ink); cursor: pointer; padding: 0; }
.tm-pill { font-size: 12px; line-height: 16px; font-weight: 500; padding: 4px 8px; border-radius: 6px; background: var(--tm-ctl); color: var(--tm-sub); }
.tm-fa { display: grid; gap: 16px; padding: 16px; }
.tm-person { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--tm-ctl); border: 1px solid var(--tm-line); border-radius: 8px; }
.tm-person b { font-size: 14px; line-height: 20px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.tm-person select { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.tm-ticks { display: grid; gap: 4px; }
.tm-ticks > small { font-size: 12px; line-height: 16px; font-weight: 500; }
.tm-tick { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--tm-line); font-size: 14px; line-height: 20px; font-weight: 500; }
.tm-tick:nth-last-child(2) { border-bottom: 0; }
.tm-tick.last { border-bottom: 0; border-top: 1px solid var(--tm-line); padding: 16px 0 0; }
.tm-tick.last .tm-col { gap: 4px; }
.tm-tick.last small { font-size: 12px; line-height: 16px; font-weight: 500; }
.tk { width: 18px; height: 18px; flex: none; padding: 0; display: grid; place-items: center; border: 1px solid #C5CDD2; border-radius: 5px; background: var(--surface); cursor: pointer; }
.tk.on { background: #00DE48; border-color: #00DE48; }
.tk svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.tk:disabled { cursor: default; }
.inv-modal { width: min(600px, 100%); background: var(--surface); border-radius: 22px; overflow: hidden; padding-bottom: 16px; box-shadow: 0 8px 24px rgba(0, 0, 0, .15); animation: fade-in .25s ease-out both; }
.inv-hero { position: relative; height: 220px; background: var(--tm-ctl); border-radius: 22px 22px 0 0; overflow: hidden; }
.inv-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.inv-x { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 34px; background: none; color: #fff; display: grid; place-items: center; cursor: pointer; }
.inv-body { display: grid; gap: 20px; padding: 16px 20px 0; }
.inv-hd { display: grid; gap: 4px; }
.inv-hd h2 { font-size: 22px; line-height: 30px; font-weight: 600; margin: 0; }
.inv-hd p { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--tm-faint); margin: 0; }
.inv-f { display: grid; gap: 8px; justify-items: start; }
.inv-f b { font-size: 14px; line-height: 20px; font-weight: 600; }
.inv-f small { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--tm-faint); }
.inv-f textarea { width: 100%; height: 82px; box-sizing: border-box; padding: 10px 12px; background: var(--tm-ctl); border: 1px solid var(--tm-ctl); border-radius: 7px; font-family: inherit; font-size: 14px; line-height: 20px; font-weight: 400; color: var(--ink); resize: vertical; outline: none; }
.inv-f textarea::placeholder { color: var(--tm-faint); }
.inv-foot { display: flex; justify-content: space-between; }
.tm-btn.ghost.go { color: var(--ink); }
.modal.nt { width: min(500px, 100%); padding: 22px 20px 18px; }
.nt-title { font-size: 18px; line-height: 26px; font-weight: 600; margin: -8px 0 4px; }
.nt-sub { font-size: 14px; line-height: 20px; color: var(--tm-sub); margin: 0 0 18px; }
.nt-logo { width: 72px; height: 72px; flex: none; display: grid; place-items: center; border: 1px dashed #C5CDD2; border-radius: 9px; background: var(--tm-box) center / cover; color: var(--tm-ico); cursor: pointer; }
.nt-name { height: 42px; padding: 0 12px; background: var(--tm-ctl); border: 1px solid var(--tm-line); border-radius: 7px; font-family: inherit; font-size: 14px; line-height: 20px; font-weight: 400; color: var(--ink); outline: none; }

/* people: avatars, assignee picker, mentions */
.av { display: inline-grid; place-items: center; flex: none; border-radius: 50%; background: var(--tm-ctl) center / cover; color: var(--tm-ico); box-shadow: none; }
.av .ico { stroke: currentColor; fill: none; stroke-width: 2; }
.av.ring { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }
.avs { display: inline-flex; gap: 3px; margin-left: auto; }
.avs .av + .av { margin-left: 0; }
.add-av { width: 32px; height: 32px; padding: 0; border: 1px dashed #C5CDD2; border-radius: 50%; background: none; color: var(--tm-sub); display: grid; place-items: center; cursor: pointer; }
.float-menu { position: fixed; z-index: 60; background: var(--surface); border-radius: 9px; padding: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .15); display: grid; gap: 8px; animation: pop-in .14s ease-out both; transform-origin: top left; }
.fm-title { font-size: 12px; line-height: 20px; font-weight: 600; color: var(--tm-sub); padding: 0 8px; }
.fm-list { display: grid; gap: 4px; }
.fm-row { display: flex; align-items: center; gap: 8px; padding: 8px; border: 0; border-radius: 5px; background: none; text-align: left; cursor: pointer; color: var(--ink); font-family: inherit; }
.fm-row:hover, .fm-row.on { background: var(--tm-ctl); }
.fm-row b { display: block; font-size: 12px; line-height: 20px; font-weight: 500; }
.fm-row small { display: block; font-size: 11px; line-height: 20px; font-weight: 500; color: var(--tm-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mention { color: #1C64F5; background: rgba(28, 100, 245, .1); border-radius: 12px; padding: 2px 8px; font-weight: 500; }
.mention-pop { position: absolute; top: calc(100% + 8px); bottom: auto; left: 0; width: 200px; z-index: 30; background: var(--surface); border-radius: 7px; padding: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, .15); display: grid; }
.mention-pop .fm-row { padding: 8px 12px; font-size: 14px; line-height: 20px; font-weight: 500; }
.cm-head { display: flex; align-items: center; gap: 6px; font-size: 12px; line-height: 16px; color: var(--tm-faint); }
.cm-head b { color: var(--ink); font-weight: 600; }
.head.tm-head { display: block; margin: -3px 0 24px; padding: 0; }
.head.tm-head h1 { margin: 0; }
.head.tm-head p { margin: 4px 0 0; }
.set-card.tmc { margin-right: 10px; }
.tm-top.mid { align-items: center; }
.tm-btn .ico { width: 20px; height: 20px; }
.nt-modal { width: min(500px, 100%); background: var(--surface); border-radius: 22px; padding: 24px; display: grid; gap: 16px; box-shadow: 0 8px 24px rgba(0, 0, 0, .15); animation: fade-in .25s ease-out both; }
.nt-modal h2 { font-size: 20px; line-height: 20px; font-weight: 600; margin: 0; }
.nt-modal p { font-size: 15px; line-height: 22px; font-weight: 400; margin: 0; }
.nt-row { display: flex; align-items: center; gap: 16px; }
.nt-modal .nt-logo { width: 100px; height: 100px; border: 2px dashed #C5CDD2; border-radius: 12px; background-color: #E5EAED; }
.nt-modal .nt-logo .ico { width: 28px; height: 28px; }
.nt-modal .nt-name { flex: 1; height: 44px; background: var(--tm-box); }
.nt-foot { display: flex; justify-content: flex-end; gap: 12px; padding-top: 8px; }
:root[data-theme="dark"] .nt-modal .nt-logo { background-color: var(--tm-ctl); }
.up-seg { display: flex; gap: 8px; margin: -2px 0 12px; }
.up-seg button { height: 28px; padding: 1px 8px; border: 1px solid transparent; border-radius: 5px; background: none; font-family: inherit; font-size: 12px; line-height: 17px; font-weight: 400; color: var(--ink); cursor: pointer; }
.up-seg button.on { background: #F0F0F0; }
:root[data-theme="dark"] .up-seg button.on { background: var(--tm-ctl); }
.up-open { height: 28px; padding: 0 10px; display: inline-grid; place-items: center; border-radius: 8px; background: var(--tm-btn); font-size: 12px; font-weight: 600; color: var(--ink); }
