:root {
  --bg: #F6F7FB; --panel: #FFFFFF; --ink: #10132A; --body: #3E4357; --muted: #7A7F93; --faint: #A4A9BA;
  --line: #E6E8F0; --line2: #EEF0F6; --blue: #3D55E0; --blue-d: #2F45C7; --blue-soft: #EEF1FD; --blue-soft2: #DFE5FC;
  --green: #1E9E6A; --green-soft: #E6F6EF; --amber: #C98512; --amber-soft: #FDF4E3; --red: #D64545; --red-soft: #FCEBEB;
  --grey-soft: #F0F1F5; --violet: #7A4FD8; --violet-soft: #F1ECFC;
  --r: 14px; --r-sm: 10px;
  --shadow: 0 1px 2px rgba(16,19,42,.04), 0 6px 24px rgba(16,19,42,.05);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: 'Manrope', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  font-size: 13.5px; color: var(--body); background: var(--bg);
  -webkit-font-smoothing: antialiased; overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue); text-decoration: none; }
h1, h2, h3 { color: var(--ink); margin: 0; letter-spacing: -.015em; }

.app { display: grid; grid-template-columns: 236px 1fr; height: 100vh; }

/* ---------- sidebar ---------- */
.side {
  background: var(--panel); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 54px 14px 16px; -webkit-app-region: drag;
}
.side * { -webkit-app-region: no-drag; }
.side .brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 22px; }
.side .brand svg { width: 30px; height: 30px; }
.side .brand b { display: block; color: var(--ink); font-weight: 800; font-size: 15.5px; letter-spacing: .02em; line-height: 1; }
.side .brand span { display: block; color: var(--blue); font-weight: 700; font-size: 9px; letter-spacing: .34em; margin-top: 5px; }
.side .new { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0 2px 18px; }
.side .new .btn { justify-content: center; padding: 0 8px; font-size: 12.5px; }
.nav-lbl { color: var(--faint); font-size: 10px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; padding: 10px 12px 6px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px;
  color: var(--body); font-weight: 600; cursor: pointer;
}
.nav a svg { width: 18px; height: 18px; color: var(--faint); flex: none; }
.nav a:hover { background: var(--bg); }
.nav a.on { background: var(--blue-soft); color: var(--blue); }
.nav a.on svg { color: var(--blue); }
.nav a .count { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--muted); background: var(--grey-soft); border-radius: 20px; padding: 1px 8px; }
.nav a.on .count { background: #fff; color: var(--blue); }
.side .foot { margin-top: auto; padding: 12px; border-radius: 12px; background: var(--bg); font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.side .foot b { color: var(--ink); display: block; font-size: 12px; }
.side .foot .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin-right: 6px; }

/* ---------- main ---------- */
.main { overflow-y: auto; position: relative; }
.topbar {
  position: sticky; top: 0; z-index: 5; height: 52px; -webkit-app-region: drag;
  background: rgba(246,247,251,.86); backdrop-filter: blur(12px);
}
.page { padding: 0 36px 60px; max-width: 1320px; margin: 0 auto; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 4px 0 22px; }
.head .eyebrow { color: var(--blue); font-size: 10.5px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; margin-bottom: 6px; display: flex; align-items: center; gap: 10px; }
.head .eyebrow::after { content: ''; width: 34px; height: 1px; background: var(--blue-soft2); }
.head h1 { font-size: 26px; font-weight: 800; }
.head .sub { color: var(--muted); margin-top: 4px; }
.head .actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.crumb { color: var(--muted); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.crumb:hover { color: var(--blue); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 700; font-size: 13px;
  cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, box-shadow .12s;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { border-color: #CDD2E0; background: #FBFBFD; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 2px 8px rgba(61,85,224,.25); }
.btn.primary:hover { background: var(--blue-d); }
.btn.soft { background: var(--blue-soft); border-color: transparent; color: var(--blue); }
.btn.soft:hover { background: var(--blue-soft2); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--grey-soft); color: var(--ink); }
.btn.danger { color: var(--red); }
.btn.danger:hover { background: var(--red-soft); border-color: #F3C9C9; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn.icon { width: 32px; padding: 0; justify-content: center; }
.btn:disabled { opacity: .5; cursor: default; }

/* ---------- cards ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card .card-h { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line2); }
.card .card-h h3 { font-size: 14.5px; font-weight: 800; }
.card .card-b { padding: 18px 20px; }
.lbl { color: var(--blue); font-size: 10.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { padding: 18px 20px; }
.stat .k { color: var(--muted); font-weight: 600; font-size: 12.5px; display: flex; align-items: center; gap: 8px; }
.stat .k i { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }
.stat .v { color: var(--ink); font-size: 25px; font-weight: 800; letter-spacing: -.02em; margin-top: 8px; }
.stat .s { color: var(--muted); font-size: 12px; margin-top: 2px; }
.grid2 { display: grid; grid-template-columns: 1.55fr 1fr; gap: 18px; }
.grid-even { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* ---------- tables ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line2); flex-wrap: wrap; }
.search { position: relative; flex: 0 1 260px; }
.search svg { position: absolute; left: 11px; top: 10px; width: 16px; height: 16px; color: var(--faint); }
.search input { padding-left: 34px; }
.chips { display: flex; gap: 4px; flex-wrap: wrap; }
.chip { height: 30px; padding: 0 12px; border-radius: 20px; border: 1px solid transparent; background: transparent; color: var(--muted); font-weight: 700; font-size: 12px; cursor: pointer; }
.chip:hover { background: var(--grey-soft); }
.chip.on { background: var(--ink); color: #fff; }
.chip .n { opacity: .6; margin-left: 4px; }
.toolbar .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }

table.list { width: 100%; border-collapse: collapse; }
.list th {
  text-align: left; color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  padding: 11px 16px; border-bottom: 1px solid var(--line2); background: #FCFCFE; white-space: nowrap;
}
.list td { padding: 13px 16px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
.list tr:last-child td { border-bottom: 0; }
.list tbody tr { cursor: pointer; transition: background .1s; }
.list tbody tr:hover { background: #FAFBFE; }
.list .r { text-align: right; }
.list .strong { color: var(--ink); font-weight: 700; }
.list .num { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.list .sm { color: var(--muted); font-size: 12px; }
.list .no { color: var(--blue); font-weight: 700; white-space: nowrap; }
.empty { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty .ill { width: 54px; height: 54px; border-radius: 16px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; margin: 0 auto 14px; }
.empty .ill svg { width: 26px; height: 26px; }
.empty h3 { font-size: 16px; margin-bottom: 4px; }
.empty .btn { margin-top: 16px; }

.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 20px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-draft { background: var(--grey-soft); color: #6B7086; }
.b-sent, .b-unpaid { background: var(--blue-soft); color: var(--blue); }
.b-accepted, .b-paid { background: var(--green-soft); color: var(--green); }
.b-invoiced { background: var(--violet-soft); color: var(--violet); }
.b-partial { background: var(--amber-soft); color: var(--amber); }
.b-overdue, .b-declined { background: var(--red-soft); color: var(--red); }
.b-expired, .b-cancelled { background: var(--grey-soft); color: var(--faint); }

/* ---------- forms ---------- */
.input, select.input, textarea.input {
  width: 100%; height: 38px; padding: 0 12px; border: 1px solid #DDE1EC; border-radius: var(--r-sm);
  background: #fff; outline: none; transition: border-color .12s, box-shadow .12s; color: var(--ink);
}
textarea.input { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
select.input { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237A7F93' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(61,85,224,.14); }
.input::placeholder { color: var(--faint); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 12px; font-weight: 700; color: var(--ink); }
.field > label em { font-style: normal; color: var(--faint); font-weight: 600; }
.field .hint { font-size: 11.5px; color: var(--muted); }
.fgrid { display: grid; gap: 14px 16px; }
.c2 { grid-template-columns: 1fr 1fr; } .c3 { grid-template-columns: repeat(3, 1fr); } .c4 { grid-template-columns: repeat(4, 1fr); }
.span2 { grid-column: span 2; } .span3 { grid-column: span 3; } .span4 { grid-column: 1 / -1; }
.seg { display: inline-flex; background: var(--grey-soft); border-radius: 9px; padding: 3px; }
.seg button { border: 0; background: transparent; height: 30px; min-width: 36px; padding: 0 10px; border-radius: 7px; font-weight: 700; color: var(--muted); cursor: pointer; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(16,19,42,.1); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; color: var(--ink); }
.check input { width: 16px; height: 16px; accent-color: var(--blue); }

/* ---------- editor ---------- */
.editor { display: grid; grid-template-columns: 1fr 300px; gap: 18px; align-items: start; }
.editor .card + .card { margin-top: 18px; }
.sticky { position: sticky; top: 64px; }
.items-t { width: 100%; border-collapse: collapse; }
.items-t th { text-align: left; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 0 6px 8px; }
.items-t td { padding: 6px; vertical-align: top; }
.items-t tbody tr { border-top: 1px solid var(--line2); }
.items-t .input { height: 36px; }
.items-t textarea.input { min-height: 36px; height: 36px; margin-top: 6px; font-size: 12.5px; color: var(--body); }
.items-t .r, .items-t .r .input { text-align: right; }
.items-t .amt { color: var(--ink); font-weight: 800; padding-top: 15px; white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.items-t .rm { margin-top: 3px; }
.add-row { display: flex; gap: 8px; padding: 12px 0 2px; }
.sumcard .row { display: flex; justify-content: space-between; padding: 6px 0; }
.sumcard .row span:last-child { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.sumcard .grand { margin-top: 10px; padding: 14px 16px; border-radius: 12px; background: var(--blue); color: #fff; display: flex; justify-content: space-between; align-items: center; }
.sumcard .grand span:first-child { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; opacity: .9; }
.sumcard .grand span:last-child { font-size: 20px; font-weight: 800; }
.sumcard .words { margin-top: 10px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.sumcard .tax-note { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--bg); font-size: 12px; color: var(--muted); }
.sumcard .tax-note b { color: var(--ink); }

/* ---------- document view ---------- */
.docview { display: grid; grid-template-columns: 1fr 330px; gap: 20px; align-items: start; }
.paper-wrap { background: #E9EBF2; border-radius: var(--r); padding: 26px; display: flex; justify-content: center; overflow: hidden; }
.paper { box-shadow: 0 2px 6px rgba(16,19,42,.06), 0 18px 50px rgba(16,19,42,.10); border-radius: 4px; overflow: hidden; background: #fff; transform-origin: top center; }
.side-panel .card + .card { margin-top: 14px; }
.big-amt { color: var(--ink); font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.kv { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.kv:last-child { border-bottom: 0; }
.kv span:last-child { color: var(--ink); font-weight: 700; }
.btn-stack { display: grid; gap: 8px; }
.btn-stack .btn { justify-content: center; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 20px; font-size: 12.5px; }
.timeline li::before { content: ''; position: absolute; left: 3px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.timeline li::after { content: ''; position: absolute; left: 6px; top: 16px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline .t { color: var(--ink); font-weight: 600; }
.timeline .d { color: var(--muted); font-size: 11.5px; }
.pay { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line2); }
.pay:last-child { border-bottom: 0; }
.pay .a { color: var(--ink); font-weight: 800; }
.pay .m { color: var(--muted); font-size: 11.5px; }
.linkbox { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--violet-soft); color: var(--violet); font-weight: 700; font-size: 12.5px; cursor: pointer; }

/* ---------- chart ---------- */
.chart { width: 100%; height: 210px; display: block; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); font-weight: 600; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

.mini { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--line2); cursor: pointer; gap: 12px; }
.mini:last-child { border-bottom: 0; }
.mini .l b { display: block; color: var(--ink); font-size: 13px; }
.mini .l span { color: var(--muted); font-size: 12px; }
.mini .rt { text-align: right; }
.mini .rt b { display: block; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- settings ---------- */
.set-grid { display: grid; grid-template-columns: 200px 1fr; gap: 26px; align-items: start; }
.set-nav { position: sticky; top: 64px; display: flex; flex-direction: column; gap: 2px; }
.set-nav a { padding: 8px 12px; border-radius: 9px; font-weight: 600; color: var(--body); cursor: pointer; }
.set-nav a:hover { background: #fff; }
.set-nav a.on { background: #fff; color: var(--blue); box-shadow: var(--shadow); }
.set-sec { margin-bottom: 18px; scroll-margin-top: 70px; }
.set-sec .card-h p { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; }
.logo-drop { display: flex; align-items: center; gap: 16px; padding: 14px; border: 1px dashed #CDD2E0; border-radius: 12px; }
.logo-drop .pv { width: 140px; height: 56px; border-radius: 10px; background: var(--bg); display: grid; place-items: center; overflow: hidden; }
.logo-drop .pv img { max-width: 100%; max-height: 100%; }
.pathline { font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; background: var(--bg); border-radius: 8px; padding: 8px 10px; color: var(--body); word-break: break-all; }

/* ---------- modal & toast ---------- */
.overlay { position: fixed; inset: 0; background: rgba(16,19,42,.32); backdrop-filter: blur(2px); display: grid; place-items: center; z-index: 50; animation: fade .12s ease; }
.modal { width: min(620px, calc(100vw - 40px)); max-height: calc(100vh - 60px); overflow: auto; background: #fff; border-radius: 18px; box-shadow: 0 30px 80px rgba(16,19,42,.25); animation: pop .16s ease; }
.modal.narrow { width: min(440px, calc(100vw - 40px)); }
.modal .m-h { padding: 20px 24px 0; }
.modal .m-h h2 { font-size: 18px; font-weight: 800; }
.modal .m-h p { margin: 4px 0 0; color: var(--muted); }
.modal .m-b { padding: 18px 24px; }
.modal .m-f { padding: 14px 24px 20px; display: flex; justify-content: flex-end; gap: 8px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 60; align-items: center; }
.toast { background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 12px; font-weight: 600; box-shadow: 0 10px 30px rgba(16,19,42,.25); display: flex; gap: 12px; align-items: center; animation: pop .16s ease; }
.toast a { color: #AFC0FF; cursor: pointer; font-weight: 700; }

.muted { color: var(--muted); }
.mt { margin-top: 18px; }
.row-gap { display: flex; gap: 8px; align-items: center; }
.hide { display: none !important; }

/* items grid in editor */
.items-g .ig-h, .items-g .ig-row { display: grid; grid-template-columns: 1fr 84px 104px 72px 100px 30px; gap: 6px 8px; align-items: start; }
.items-g.nogst .ig-h, .items-g.nogst .ig-row { grid-template-columns: 1fr 84px 104px 100px 30px; }
.items-g .ig-h { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 0 2px 8px; }
.items-g .ig-h .r, .items-g .r { text-align: right; }
.items-g .ig-row { padding: 12px 0; border-top: 1px solid var(--line2); }
.items-g .nm { font-weight: 700; }
.items-g .ds { grid-column: 1; min-height: 34px; height: 34px; font-size: 12.5px; color: var(--body); resize: none; overflow: hidden; }
.items-g .sm2 { height: 34px; font-size: 12.5px; color: var(--body); }
.items-g .amt { color: var(--ink); font-weight: 800; padding-top: 10px; white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- v1.2: sign-in ---------- */
.auth { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background:
  radial-gradient(1200px 600px at 85% -10%, #E4E9FD 0%, transparent 60%), radial-gradient(900px 500px at -10% 110%, #EEF1FD 0%, transparent 55%), var(--bg); -webkit-app-region: drag; }
.auth * { -webkit-app-region: no-drag; }
.auth-box { width: 420px; background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 30px 80px rgba(16,19,42,.10); padding: 34px 34px 28px; animation: pop .2s ease; }
.auth-box .field { margin-top: 14px; }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.auth-brand b { display: block; color: var(--ink); font-weight: 800; font-size: 18px; letter-spacing: .02em; line-height: 1; }
.auth-brand span { display: block; color: var(--blue); font-weight: 700; font-size: 9.5px; letter-spacing: .34em; margin-top: 6px; }
.auth h2 { font-size: 21px; font-weight: 800; }
.auth-sub { color: var(--muted); margin: 6px 0 4px; line-height: 1.5; }
.auth-go { width: 100%; justify-content: center; height: 42px; margin-top: 20px; font-size: 14px; }
.auth-alt { text-align: center; margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.auth-alt a { cursor: pointer; font-weight: 700; }
.who { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.who-u { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; }
.who-u:hover { border-color: var(--blue); background: var(--blue-soft); }
.who-u b { color: var(--ink); } .who-u span:last-child { color: var(--muted); font-size: 12px; }
.who-one { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px; background: var(--bg); }
.who-one b { display: block; color: var(--ink); font-size: 15px; } .who-one span { color: var(--muted); font-size: 12.5px; }
.av { width: 34px; height: 34px; border-radius: 50%; background: var(--blue); color: #fff; display: inline-grid; place-items: center; font-weight: 800; font-size: 12.5px; flex: none; letter-spacing: .02em; }
.av.lg { width: 48px; height: 48px; font-size: 16px; }
.recovery { margin: 18px 0 4px; padding: 16px; text-align: center; border-radius: 12px; background: var(--blue-soft); color: var(--blue); font: 800 22px ui-monospace, Menlo, monospace; letter-spacing: .12em; user-select: all; }
.shake { animation: shake .35s; border-color: var(--red) !important; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.side .foot .me { display: flex; align-items: center; gap: 10px; }
.side .foot .me div { flex: 1; min-width: 0; }
.side .foot .me b { display: block; color: var(--ink); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .foot .me span { color: var(--muted); font-size: 11.5px; }
.side .foot .saved { margin-top: 10px; font-size: 11px; }

/* team */
.team .tm { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line2); }
.team .tm:last-child { border-bottom: 0; }
.team .tm-n { flex: 1; } .team .tm-n b { display: block; color: var(--ink); } .team .tm-n em { font-style: normal; color: var(--muted); font-weight: 600; }
.team .tm-n span { color: var(--muted); font-size: 12px; }
.roles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.roles div { background: var(--bg); border-radius: 10px; padding: 10px 12px; font-size: 12px; color: var(--muted); }
.roles b { display: block; color: var(--ink); font-size: 12.5px; margin-bottom: 2px; }

/* quick fill */
.quickfill { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px; margin-bottom: 14px; border-radius: 12px; background: var(--bg); border: 1px dashed #CDD2E0; }
.qf-hint { color: var(--muted); font-size: 12px; flex: 1; min-width: 180px; }
.modal.drop .quickfill { border-color: var(--blue); background: var(--blue-soft); }
.qf-list { display: grid; gap: 6px; margin: -4px 0 14px; }
.qf-item { text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
button.qf-item:hover { border-color: var(--blue); background: var(--blue-soft); }
.qf-item b { color: var(--ink); } .qf-item span { color: var(--muted); font-size: 12px; }
.qf-wait { padding: 10px 12px; color: var(--muted); font-size: 12.5px; background: var(--bg); border-radius: 10px; }
.input.filled { background: #F1F4FE; border-color: var(--blue); transition: background 1s; }

/* follow-up */
.fu-task { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--amber-soft); color: #7A520C; font-weight: 600; font-size: 12.5px; line-height: 1.5; }
.fu-notes { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 12.5px; line-height: 1.55; }

/* online version: no Mac title bar */
html.web .side { padding-top: 24px; }
html.web .topbar { height: 26px; }
