/* Flawsbug CRM -- clean, airy, rounded. Brand: navy + teal. */
@font-face { font-family: "Inter"; src: url("fonts/inter-var.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
:root {
  --navy: #0b1e39;
  --navy-2: #12294a;
  --navy-dark: #071427;
  --accent: #00c2a8;
  --accent-dark: #00a58f;
  --accent-soft: #e6f9f5;
  --ink: #131a24;
  --text: #2a3542;
  --muted: #6b7a89;
  --faint: #9aa7b4;
  --bg: #f4f6f9;
  --panel: #ffffff;
  --line: #e6eaef;
  --line-2: #eef1f4;
  --danger: #d64545;
  --danger-soft: #fdecec;
  --warn: #c77d0a;
  --warn-soft: #fff4e2;
  --blue: #2f6fe4;
  --blue-soft: #eaf1fe;
  --violet: #7a5af5;
  --violet-soft: #f1edfe;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 32px rgba(11, 30, 57, .10);
  --font: "Inter", "Segoe UI Variable", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); font-size: 14px; -webkit-font-smoothing: antialiased; }
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ---------- shell ---------- */
.shell { display: flex; min-height: 100vh; background: linear-gradient(90deg, var(--navy) 240px, var(--bg) 240px); }
.sidebar { width: 240px; flex-shrink: 0; background: var(--navy); color: rgba(255,255,255,.82); padding: 20px 14px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 18px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 0 0 1px rgba(255,255,255,.12); }
.brand strong { display: block; font-size: 16.5px; letter-spacing: .2px; }
.brand span { display: block; font-size: 11.5px; color: var(--accent); font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.2px; color: rgba(255,255,255,.38); font-weight: 700; padding: 16px 10px 6px; }
.sidebar nav a { display: flex; align-items: center; gap: 11px; color: rgba(255,255,255,.74); padding: 9px 10px; border-radius: 9px; font-size: 14px; font-weight: 600; }
.sidebar nav a:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.sidebar nav a.active { background: var(--accent); color: var(--navy-dark); }
.sidebar-foot { font-size: 11.5px; color: rgba(255,255,255,.4); line-height: 1.55; padding: 18px 10px 4px; border-top: 1px solid rgba(255,255,255,.08); margin-top: 16px; }

.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 62px; display: flex; align-items: center; justify-content: space-between; padding: 0 34px; background: rgba(255,255,255,.75); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.topbar-date { color: var(--muted); font-size: 13px; font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.user-chip { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; padding: 4px 10px 4px 4px; border-radius: 999px; transition: background .12s; }
.user-chip:hover { background: rgba(0,0,0,.04); text-decoration: none; }
.avatar-img { object-fit: cover; padding: 0; border: 2px solid #fff; box-shadow: 0 0 0 1.5px var(--accent); }
.person-cell { display: flex; align-items: center; gap: 10px; }
.person-cell .avatar { flex: none; }
.avatar-xl { width: 96px; height: 96px; font-size: 34px; }
.profile-top { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.profile-photo img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--accent); }
.profile-id { display: grid; gap: 4px; min-width: 0; }
.profile-name { font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing: -.3px; }
.profile-photo-actions { display: grid; gap: 6px; margin-top: 8px; justify-items: start; }
.btn-file { cursor: pointer; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.btn-file:focus-within, #photo:focus + small { outline: 2px solid var(--accent); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #2f6fe4); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 14px; }
.user-meta strong { display: block; font-size: 13px; color: var(--ink); line-height: 1.2; }
.user-meta small { color: var(--muted); font-size: 11.5px; }
.mode-pill { background: var(--warn-soft); color: var(--warn); font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
main { padding: 30px 34px 60px; max-width: 1280px; width: 100%; }

/* ---------- page header ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
h1 { margin: 0; font-size: 27px; color: var(--ink); letter-spacing: -.3px; font-weight: 800; }
.sub { color: var(--muted); margin: 5px 0 0; font-size: 14px; max-width: 720px; line-height: 1.5; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- flashes ---------- */
.flashes { margin-bottom: 18px; }
.flash { padding: 11px 16px; border-radius: 10px; margin-bottom: 8px; font-size: 13.5px; font-weight: 600; }
.flash-ok { background: var(--accent-soft); color: #00806f; border: 1px solid rgba(0,194,168,.3); }
.flash-error { background: var(--danger-soft); color: var(--danger); border: 1px solid rgba(214,69,69,.3); }

/* ---------- cards ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 20px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 14px; font-size: 15.5px; color: var(--ink); font-weight: 750; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.card-head h3 { margin: 0; }
.notice { font-size: 14px; line-height: 1.55; }
.notice-warn { border-color: rgba(199,125,10,.35); background: var(--warn-soft); }
.notice-error { border-color: rgba(214,69,69,.35); background: var(--danger-soft); }
.notice-info { border-color: rgba(47,111,228,.25); background: var(--blue-soft); }
.muted { color: var(--muted); font-size: 13px; line-height: 1.5; }
.small { font-size: 12px; }
.grid { display: grid; gap: 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.split { display: grid; grid-template-columns: 1.55fr 1fr; gap: 20px; align-items: start; }

/* ---------- KPI cards ---------- */
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-bottom: 22px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 16px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--kpi, var(--accent)); }
.kpi-label { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .6px; }
.kpi-num { font-size: 29px; font-weight: 800; color: var(--ink); margin: 6px 0 2px; letter-spacing: -.5px; }
.kpi-foot { font-size: 12.5px; color: var(--muted); }
.kpi-foot a { font-weight: 700; }
a.kpi-link { display: block; color: inherit; text-decoration: none; transition: transform .12s, box-shadow .12s, border-color .12s; cursor: pointer; }
a.kpi-link:hover { transform: translateY(-2px); border-color: var(--kpi, var(--accent)); text-decoration: none; }
a.kpi-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
a.kpi-link:active { transform: translateY(0); }
.kpi-go { color: var(--accent-dark, #007a69); font-weight: 700; }
a.funnel-link { color: inherit; text-decoration: none; border-radius: 8px; margin: 0 -6px 4px; padding: 3px 6px; }
a.funnel-link:hover { background: var(--line-2, #f2f5f9); text-decoration: none; }
#attention { scroll-margin-top: 80px; }
@media (prefers-reduced-motion: reduce) { a.kpi-link { transition: none; } a.kpi-link:hover { transform: none; } }

/* ---------- greeting ---------- */
.hello { background: linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 60%, #0f3a5a 100%); color: #fff; border-radius: 18px; padding: 26px 28px; margin-bottom: 22px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; box-shadow: var(--shadow-lg); }
.hello h1 { color: #fff; font-size: 25px; }
.hello p { margin: 6px 0 0; color: rgba(255,255,255,.75); font-size: 14px; }
.hello .head-actions .btn-light { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.2); }
.hello .head-actions .btn-light:hover { background: rgba(255,255,255,.18); }

/* ---------- lists ---------- */
.attn { list-style: none; margin: 0; padding: 0; }
.attn li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.attn li:last-child { border-bottom: 0; }
.attn .kind { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.kind-lead { background: var(--blue-soft); color: var(--blue); }
.kind-client { background: var(--accent-soft); color: var(--accent-dark); }
.kind-federal { background: var(--violet-soft); color: var(--violet); }
.kind-target { background: #fff4e2; color: #b26f05; }
.kind-invoice { background: var(--danger-soft); color: var(--danger); }
.kind-task { background: #f3efff; color: #6d4ad8; }
.attn .what { flex: 1; min-width: 0; }
.attn .what strong { display: block; color: var(--ink); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attn .what span { color: var(--muted); font-size: 12.5px; }
.empty-state { text-align: center; padding: 26px 10px; color: var(--muted); }
.empty-state strong { display: block; color: var(--ink); font-size: 14.5px; margin-bottom: 4px; }

/* ---------- funnel ---------- */
.funnel-row { display: grid; grid-template-columns: 138px 1fr 34px; align-items: center; gap: 12px; margin-bottom: 9px; font-size: 13px; }
.funnel-row .label { color: var(--text); font-weight: 600; }
.funnel-bar { height: 10px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.funnel-bar span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), #2f6fe4); min-width: 4px; }
.funnel-row .count { text-align: right; font-weight: 800; color: var(--ink); }

/* ---------- badges ---------- */
.stage, .pill, .due { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pill { background: var(--line-2); color: var(--muted); }
.pill-ok { background: var(--accent-soft); color: #00806f; }
.pill-bad { background: var(--danger-soft); color: var(--danger); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-blue { background: var(--blue-soft); color: var(--blue); }
.stage-new { background: var(--blue-soft); color: var(--blue); }
.stage-contacted { background: #e9f4ff; color: #1b6fb5; }
.stage-qualified { background: #eef0ff; color: #4a55c9; }
.stage-discovery { background: var(--violet-soft); color: var(--violet); }
.stage-authorization { background: #fff0f6; color: #b8336a; }
.stage-pilot { background: var(--warn-soft); color: var(--warn); }
.stage-proposal { background: #fff7e0; color: #9a6b00; }
.stage-won, .stage-awarded, .stage-active, .stage-paid, .stage-submitted { background: var(--accent-soft); color: #00806f; }
.stage-lost, .stage-no_bid, .stage-inactive, .stage-overdue { background: var(--danger-soft); color: var(--danger); }
.stage-identified, .stage-draft { background: var(--line-2); color: var(--muted); }
.stage-sources_sought, .stage-sent { background: var(--blue-soft); color: var(--blue); }
.stage-rfp_open { background: var(--warn-soft); color: var(--warn); }
.stage-teaming { background: var(--violet-soft); color: var(--violet); }
.due-overdue { background: var(--danger-soft); color: var(--danger); }
.due-today { background: var(--warn-soft); color: var(--warn); }
.due-soon { background: var(--blue-soft); color: var(--blue); }
.due-later { background: var(--line-2); color: var(--muted); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: var(--navy-dark); border: none; padding: 10px 17px; border-radius: 10px; font-weight: 750; font-size: 13.5px; cursor: pointer; font-family: inherit; text-decoration: none; line-height: 1.2; }
.btn:hover { background: var(--accent-dark); text-decoration: none; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-light { background: var(--panel); color: var(--ink); border: 1px solid var(--line); }
.btn-light:hover { background: var(--bg); }
.btn-sm { display: inline-flex; align-items: center; gap: 6px; background: var(--panel); color: var(--ink); border: 1px solid var(--line); padding: 6px 11px; border-radius: 8px; font-weight: 650; font-size: 12.5px; cursor: pointer; font-family: inherit; white-space: nowrap; text-decoration: none; }
.btn-sm:hover { background: var(--bg); text-decoration: none; }
.btn-sm .ico { width: 15px; height: 15px; }
.btn-accent { background: var(--accent-soft); border-color: rgba(0,194,168,.35); color: #00806f; }
.btn-accent:hover { background: #d3f4ed; }
.btn-danger { background: var(--danger-soft); border-color: rgba(214,69,69,.3); color: var(--danger); }
.btn-ghost { display: inline-flex; align-items: center; gap: 7px; background: transparent; border: 1px solid var(--line); color: var(--text); padding: 7px 12px; border-radius: 9px; font-weight: 650; cursor: pointer; font-family: inherit; font-size: 13px; }
.btn-ghost:hover { background: var(--bg); }
.inline { display: inline; margin: 0; }
.row-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
button[disabled], .btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 14px; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-all { grid-column: 1 / -1; }
.field label, label.lbl { display: block; font-size: 12px; font-weight: 700; color: var(--ink); margin: 0 0 6px; }
.field small { display: block; color: var(--faint); font-size: 11.5px; margin-top: 4px; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="time"], input[type="tel"], input[type="url"], input[type="search"], input:not([type]), select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 13.5px; font-family: inherit; color: var(--ink); background: #fbfcfd; transition: border-color .15s, box-shadow .15s, background .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,194,168,.15); background: #fff; }
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); }
.check input { width: auto; }
details.add-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 20px; box-shadow: var(--shadow); }
details.add-panel > summary { list-style: none; cursor: pointer; padding: 16px 22px; display: flex; align-items: center; gap: 10px; font-weight: 750; color: var(--ink); font-size: 14.5px; }
details.add-panel > summary::-webkit-details-marker { display: none; }
details.add-panel > summary .plus { width: 26px; height: 26px; border-radius: 8px; background: var(--accent-soft); color: #00806f; display: grid; place-items: center; }
details.add-panel[open] > summary { border-bottom: 1px solid var(--line); }
details.add-panel .add-body { padding: 18px 22px 22px; }

/* ---------- toolbar ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--panel); color: var(--text); padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 650; cursor: pointer; font-family: inherit; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip .n { opacity: .6; margin-left: 4px; }
.search { position: relative; min-width: 240px; }
.search input { padding-left: 34px; background: var(--panel); }
.search::before { content: ""; position: absolute; left: 12px; top: 50%; width: 12px; height: 12px; border: 2px solid var(--faint); border-radius: 50%; transform: translateY(-60%); }
.search::after { content: ""; position: absolute; left: 23px; top: 58%; width: 6px; height: 2px; background: var(--faint); transform: rotate(45deg); }

/* ---------- tables ---------- */
.table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; margin-bottom: 20px; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .7px; padding: 12px 12px; border-bottom: 1px solid var(--line); background: #fafbfc; white-space: nowrap; font-weight: 750; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fbfcfd; }
.table input, .table select, .table textarea { padding: 7px 9px; border: 1px solid transparent; border-radius: 8px; font-size: 13px; background: transparent; }
.table input:hover, .table select:hover, .table textarea:hover { border-color: var(--line); background: #fff; }
.table input:focus, .table select:focus, .table textarea:focus { border-color: var(--accent); background: #fff; }
.table textarea { min-height: 38px; height: 38px; }
.table .empty { text-align: center; color: var(--muted); padding: 34px 20px; }
.cell-name input[name="name"] { font-weight: 700; color: var(--ink); }
.cell-sub input { color: var(--muted); font-size: 12.5px; padding-top: 3px; padding-bottom: 3px; }
.row-meta { display: flex; gap: 6px; flex-wrap: wrap; padding: 4px 9px 0; }
.row-overdue td { background: #fff8f8; }
.tight td { padding: 9px 12px; vertical-align: middle; }
.stage-select { position: relative; }
.stage-select select { font-weight: 700; border-radius: 999px; padding: 5px 10px; font-size: 12px; }
.money { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); white-space: nowrap; }
details.more summary { cursor: pointer; color: var(--muted); font-size: 12px; font-weight: 700; list-style: none; padding: 4px 9px; }
details.more summary::-webkit-details-marker { display: none; }
details.more[open] summary { color: var(--accent-dark); }
details.more .more-body { display: grid; gap: 6px; padding: 6px 0 2px; min-width: 230px; }

/* ---------- record rows + edit drawer ---------- */
.records td { vertical-align: middle; padding: 14px 14px; }
.records th { padding: 12px 14px; }
.records th.num, .records td.num { text-align: right; }
.records tbody tr[data-row] { transition: background .12s; }
.records tbody tr[data-row].is-open td { background: #f7fbfb; border-bottom-color: transparent; }
.rec { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.rec-avatar { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; font-size: 15px; flex-shrink: 0; }
.av-0 { background: #e6f9f5; color: #00806f; } .av-1 { background: #eaf1fe; color: #2f6fe4; } .av-2 { background: #f1edfe; color: #7a5af5; }
.av-3 { background: #fff4e2; color: #b26f05; } .av-4 { background: #fff0f6; color: #b8336a; } .av-5 { background: #eef0ff; color: #4a55c9; }
.inv-ico { background: var(--line-2); color: var(--muted); } .inv-ico.is-paid { background: var(--accent-soft); color: #00806f; } .inv-ico.is-late { background: var(--danger-soft); color: var(--danger); }
.fed-ico { background: var(--violet-soft); color: var(--violet); }
.rec-main { min-width: 0; }
.rec-main strong { display: block; color: var(--ink); font-size: 14px; font-weight: 750; line-height: 1.3; }
.rec-main > span { display: block; color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.rec-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 7px; }
.rec-tags .pill { font-size: 11px; padding: 2px 8px; display: inline-flex; align-items: center; gap: 4px; }
.rec-tags .pill .ico { width: 12px; height: 12px; }
a.pill:hover { text-decoration: none; filter: brightness(.97); }
.contact span { display: block; font-size: 13px; line-height: 1.55; white-space: nowrap; }
.contact span:first-child { color: var(--ink); }
.notes { max-width: 260px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.money.big { font-size: 14.5px; }
.ink { color: var(--ink); font-weight: 650; }
.acts { width: 1%; white-space: nowrap; }
.acts .row-actions { flex-wrap: nowrap; justify-content: flex-end; }
.edit-row > td { background: #f7fbfb; padding: 4px 18px 20px !important; border-bottom: 1px solid var(--line) !important; }
.edit-row .table-form, .edit-row form.drawer { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px 18px 16px; box-shadow: var(--shadow); }
.edit-row .drawer input, .edit-row .drawer select, .edit-row .drawer textarea { border: 1px solid var(--line); background: #fbfcfd; padding: 9px 11px; font-size: 13.5px; border-radius: 9px; }
.edit-row .drawer input:focus, .edit-row .drawer select:focus, .edit-row .drawer textarea:focus { border-color: var(--accent); background: #fff; }
.edit-row fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.edit-row fieldset[disabled] input, .edit-row fieldset[disabled] select, .edit-row fieldset[disabled] textarea { background: var(--bg); color: var(--text); }
.edit-row textarea { min-height: 80px; }
.edit-actions { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.edit-actions .spacer { flex: 1; }
.form-grid.g4 { grid-template-columns: repeat(4, 1fr); }
.inline-hint { display: inline !important; color: var(--faint); font-weight: 500; margin-left: 4px; font-size: 11px !important; }
.btn-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: var(--accent-dark); border: 1px solid var(--line); background: #fff; flex-shrink: 0; }
.btn-icon:hover { background: var(--accent-soft); border-color: rgba(0,194,168,.4); }
.btn-icon .ico { width: 16px; height: 16px; }
a.what { color: inherit; text-decoration: none; }
a.what:hover strong { color: var(--accent-dark); }
.edit-row:target > td, tr.flash-row td { animation: rowflash 1.6s ease-out; }
@keyframes rowflash { from { background: #dff7f2; } }

/* ---------- compose ---------- */
.compose { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.preview-frame { width: 100%; height: 720px; border: 1px solid var(--line); border-radius: var(--radius); background: #f2f5f8; }
.tokens { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.token { background: var(--line-2); border: 1px solid var(--line); border-radius: 7px; padding: 3px 8px; font-size: 11.5px; font-family: Consolas, monospace; cursor: pointer; color: var(--ink); }
.token:hover { background: var(--accent-soft); border-color: rgba(0,194,168,.4); }
.tpl-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }

/* ---------- login ---------- */
.login-body { min-height: 100vh; background: var(--bg); display: flex; flex-direction: column; }
.login-top { background: radial-gradient(120% 140% at 50% 0%, #12305a 0%, var(--navy) 55%, var(--navy-dark) 100%); padding: 44px 20px 46px; display: flex; justify-content: center; }
.login-brand { display: flex; align-items: center; gap: 14px; color: #fff; }
.login-brand img { width: 60px; height: 60px; border-radius: 15px; box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 10px 28px rgba(0,0,0,.35); }
.login-brand span { font-size: 30px; font-weight: 800; letter-spacing: -.3px; line-height: 1; }
.login-brand small { display: block; margin-top: 6px; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: 2.2px; text-transform: uppercase; }

.login-card { background: #fff; flex: 1; border-radius: 22px 22px 0 0; padding: 44px 24px 40px; box-shadow: 0 -1px 0 var(--line); }
.login-inner { max-width: 420px; margin: 0 auto; }
.login-inner h1 { text-align: center; font-size: 34px; letter-spacing: -.6px; margin-bottom: 8px; }
.login-inner .lead { text-align: center; color: var(--muted); margin: 0 0 30px; font-size: 14.5px; }
.login-inner input[type="email"] { background: var(--bg); border: 1px solid transparent; padding: 16px 18px; font-size: 16px; border-radius: 12px; }
.login-inner input[type="email"]:focus { background: #fff; border-color: var(--accent); }
.login-row { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.passkey { width: 64px; height: 56px; border: 1px solid var(--line); border-radius: 12px; background: #fff; display: grid; place-items: center; cursor: pointer; flex-shrink: 0; color: #2f6fe4; }
.passkey:hover { border-color: #2f6fe4; box-shadow: 0 0 0 3px rgba(47,111,228,.12); }
.passkey svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.login-row .or-mini { color: var(--muted); font-size: 15px; }
.login-row .hint { flex: 1; background: var(--bg); border-radius: 12px; padding: 14px 16px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.btn-login { width: 100%; justify-content: center; margin-top: 24px; background: var(--ink); color: #fff; padding: 17px; font-size: 17px; border-radius: 12px; }
.btn-login:hover { background: #000; }
.divider { display: flex; align-items: center; gap: 16px; color: var(--muted); margin: 30px 0 22px; font-size: 14px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn-ms { width: 100%; display: flex; align-items: center; justify-content: center; gap: 12px; background: #fff; border: 1px solid #c8d0d9; color: var(--ink); padding: 15px; border-radius: 12px; font-size: 16px; font-weight: 650; font-family: inherit; cursor: pointer; text-decoration: none; }
.btn-ms:hover { background: var(--bg); text-decoration: none; }
.ms-logo { display: grid; grid-template-columns: 9px 9px; gap: 2px; }
.ms-logo i { width: 9px; height: 9px; display: block; }
.login-help { text-align: center; margin-top: 22px; font-size: 13px; color: var(--muted); }
.banner-800 { margin-top: 30px; font-size: 11.5px; line-height: 1.55; color: var(--faint); border-top: 1px solid var(--line); padding-top: 16px; }
.login-flash { max-width: 420px; margin: 0 auto 18px; }

/* ---------- misc ---------- */
code { background: var(--line-2); padding: 2px 6px; border-radius: 5px; font-size: 12.5px; font-family: Consolas, monospace; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 8px 14px; font-size: 13px; }
.kv dt { color: var(--muted); font-weight: 650; }
.kv dd { margin: 0; color: var(--ink); word-break: break-all; }
.steps { margin: 0; padding-left: 20px; line-height: 1.75; font-size: 13.5px; }
.role-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 4px; }
.role-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fbfcfd; }
.role-card strong { display: block; color: var(--ink); text-transform: capitalize; margin-bottom: 4px; }
.role-card span { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.logo-preview { width: 56px; height: 56px; border-radius: 14px; border: 1px solid var(--line); }
.import-drop { border: 2px dashed #cfd7e0; border-radius: var(--radius); padding: 30px; text-align: center; background: #fbfcfd; }
.import-drop input[type="file"] { margin: 14px auto 0; display: block; }
.error-page { max-width: 520px; margin: 60px auto; text-align: center; }
.error-page .code { font-size: 64px; font-weight: 900; color: var(--line); letter-spacing: -2px; }

@media (max-width: 1150px) {
  .form-grid.g4 { grid-template-columns: repeat(2, 1fr); }
  .notes { display: none; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .split, .compose { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; }
  .nav-label { display: none; }
  .sidebar-foot { display: none; }
  .kpis, .grid-2, .grid-3, .role-cards { grid-template-columns: 1fr 1fr; }
  .form-grid, .form-grid.g4 { grid-template-columns: 1fr; }
  .shell { background: var(--bg); }
  .form-grid .span-2 { grid-column: auto; }
  main { padding: 20px 16px 40px; }
  .topbar { padding: 0 16px; }
}
input[type="file"] { font-family: inherit; font-size: 13px; color: var(--muted); }
input[type="file"]::file-selector-button { font-family: inherit; font-weight: 700; font-size: 13px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 8px 14px; margin-right: 12px; cursor: pointer; }
input[type="file"]::file-selector-button:hover { background: var(--accent-soft); border-color: rgba(0,194,168,.4); }
.users-table select { border: 1px solid var(--line) !important; background: #fff !important; }

/* ---------- phone & tablet ---------- */
.menu-btn, .mobile-brand, .tabbar, .scrim { display: none; }
@media (max-width: 860px) {
  body { font-size: 15px; }
  .shell { display: block; background: var(--bg); }
  /* sidebar becomes a slide-in drawer */
  .sidebar { position: fixed; z-index: 40; top: 0; bottom: 0; left: 0; width: 284px; height: 100%; transform: translateX(-102%); transition: transform .22s ease; padding-top: calc(20px + env(safe-area-inset-top)); box-shadow: 0 0 40px rgba(0,0,0,.25); }
  .sidebar nav { flex-direction: column; flex-wrap: nowrap; }
  .sidebar nav a { padding: 12px 12px; font-size: 15px; }
  .nav-label { display: block; }
  .sidebar-foot { display: block; }
  body.nav-open .sidebar { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(7,20,39,.45); }
  .scrim[hidden] { display: none; }
  /* top bar */
  .topbar { padding: env(safe-area-inset-top) 12px 0; height: calc(58px + env(safe-area-inset-top)); gap: 8px; background: rgba(255,255,255,.92); }
  .menu-btn { display: grid; place-items: center; width: 42px; height: 42px; border: 0; background: transparent; border-radius: 10px; color: var(--ink); cursor: pointer; }
  .menu-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  .menu-btn:active { background: var(--line-2); }
  .mobile-brand { display: flex; align-items: center; gap: 9px; color: var(--ink); margin-right: auto; }
  .mobile-brand img { width: 30px; height: 30px; border-radius: 8px; }
  .mobile-brand strong { font-size: 16px; }
  .topbar-date, .user-meta, .mode-pill, .btn-ghost span { display: none; }
  .topbar-right { gap: 8px; }
  .btn-ghost { padding: 8px; }
  /* bottom tab bar, like a native app */
  .tabbar { display: flex; position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; align-items: center; }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 700; padding: 4px 0; text-decoration: none; }
  .tabbar a .ico { width: 23px; height: 23px; }
  .tabbar a.on { color: var(--accent-dark); }
  .tabbar a.tab-main { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 16px; background: var(--accent); color: var(--navy-dark); justify-content: center; margin: -18px 6px 0; box-shadow: 0 8px 20px rgba(0,194,168,.35); }
  .tabbar a.tab-main .ico { width: 24px; height: 24px; }
  main { padding: 18px 14px calc(96px + env(safe-area-inset-bottom)); }
  /* type & controls: 16px inputs stop iPhone from zooming in */
  input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="time"], input[type="tel"], input[type="url"], input[type="search"], input:not([type]), select, textarea,
  .edit-row .drawer input, .edit-row .drawer select, .edit-row .drawer textarea { font-size: 16px; padding: 12px 13px; }
  h1 { font-size: 24px; }
  .page-head { align-items: flex-start; margin-bottom: 16px; }
  .page-head .head-actions, .page-head .head-actions .btn { width: 100%; justify-content: center; }
  .hello { padding: 20px; border-radius: 16px; }
  .hello .head-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .hello .head-actions .btn:first-child { grid-column: 1 / -1; justify-content: center; }
  .hello .head-actions .btn { justify-content: center; padding: 12px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 14px; }
  .kpi-num { font-size: 24px; }
  .kpi:last-child { grid-column: 1 / -1; }
  .card { padding: 18px 16px; }
  .btn, .btn-sm { min-height: 40px; }
  .btn-icon { width: 40px; height: 40px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .chips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex-shrink: 0; padding: 8px 14px; }
  .search { min-width: 0; }
  .toolbar > *, .main-col, main { min-width: 0; max-width: 100%; }
  .search input { padding-left: 38px !important; }
  details.add-panel > summary { padding: 15px 16px; }
  details.add-panel .add-body { padding: 14px 16px 18px; }
  /* record tables turn into cards */
  .records thead { display: none; }
  .records, .records tbody { display: block; }
  .records tr[data-row] { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 16px; border-bottom: 1px solid var(--line-2); }
  .records tr[data-row] > td { display: block; padding: 0; border: 0; background: transparent !important; }
  .records tr[data-row] > td:first-child, .records td.contact, .records td.acts { flex-basis: 100%; }
  .records td.contact span { display: inline; margin-right: 10px; white-space: normal; }
  .records tr[data-row] > td.notes { flex-basis: 100%; max-width: none; }
  .records td.num { text-align: left; }
  .records td.acts .row-actions { justify-content: stretch; }
  .records td.acts .row-actions > * { flex: 1; justify-content: center; }
  .records tr.is-open { background: #f7fbfb; }
  .records .edit-row { display: block; }
  .records .edit-row[hidden] { display: none; }
  .records .edit-row > td { display: block; padding: 0 12px 16px !important; }
  .edit-row .drawer { padding: 14px; }
  .edit-actions .btn, .edit-actions .btn-ghost { flex: 1; justify-content: center; min-height: 44px; }
  .edit-actions .spacer { flex-basis: 100%; height: 0; }
  .records .empty { display: block; }
  .rec { min-width: 0; }
  .table-wrap { border-radius: 14px; }
  /* compose & misc */
  .preview-frame { height: 600px; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 8px; }
  .role-cards, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .funnel-row { grid-template-columns: 112px 1fr 26px; }
  .attn li { gap: 10px; }
  .attn .due { font-size: 11px; padding: 3px 8px; }
  .login-top { padding: calc(30px + env(safe-area-inset-top)) 20px 34px; }
  .login-brand img { width: 52px; height: 52px; border-radius: 13px; }
  .login-brand span { font-size: 26px; }
  .login-card { padding: 32px 20px calc(30px + env(safe-area-inset-bottom)); }
  .login-inner h1 { font-size: 30px; }
  .login-inner input[type="email"] { font-size: 16px; }
}
.split > *, .compose > *, .grid-2 > *, .grid-3 > * { min-width: 0; }
.form-grid.two-col { grid-template-columns: 1fr 1fr; }
@media (max-width: 860px) { .form-grid.two-col { grid-template-columns: 1fr; } }
.seg { display: inline-flex; gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 18px; box-shadow: var(--shadow); max-width: 100%; overflow-x: auto; }
.seg a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 9px; color: var(--text); font-weight: 700; font-size: 13.5px; white-space: nowrap; text-decoration: none; }
.seg a:hover { background: var(--bg); }
.seg a.seg-on { background: var(--ink); color: #fff; }
.seg .n { opacity: .6; font-weight: 650; }
.seg .ico { width: 16px; height: 16px; }
.section-title { font-size: 19px; color: var(--ink); margin: 28px 0 12px; letter-spacing: -.2px; scroll-margin-top: 80px; }
.section-title:first-of-type { margin-top: 0; }
.section-sub { margin: -6px 0 16px; }
.card.starter { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; background: linear-gradient(120deg, #f2fbf9, #eef4ff); border-color: rgba(0,194,168,.35); }
.card.starter h3 { margin-bottom: 4px; }
.card.starter p { margin: 0; max-width: 640px; }
.stage-researching { background: var(--line-2); color: var(--muted); }
.stage-meeting { background: var(--blue-soft); color: var(--blue); }
.stage-not_fit { background: var(--danger-soft); color: var(--danger); }

/* ---------- calling ---------- */
.btn-call { background: #eef4ff; border-color: rgba(47,111,228,.3); color: var(--blue); }
.btn-call:hover { background: #e1ebfe; }
.btn-icon.btn-call-icon { color: var(--blue); }
.btn-icon.btn-call-icon:hover { background: #eef4ff; border-color: rgba(47,111,228,.35); }
.pill-call { background: #eef4ff; color: var(--blue); }
.kind-call { background: #eef4ff; color: var(--blue); }
.sheet-wrap { position: fixed; inset: 0; z-index: 70; background: rgba(7,20,39,.45); display: grid; place-items: center; padding: 16px; }
.sheet-wrap[hidden] { display: none; }
.sheet { background: #fff; width: 100%; max-width: 460px; border-radius: 18px; padding: 22px; box-shadow: var(--shadow-lg); animation: sheetin .18s ease-out; }
.sheet form { display: grid; gap: 14px; }
.sheet-head { display: flex; gap: 12px; align-items: center; }
.sheet-head h3 { margin: 0; font-size: 17px; color: var(--ink); }
.sheet-head p { margin: 2px 0 0; }
.sheet-ico { width: 42px; height: 42px; border-radius: 12px; background: #eef4ff; color: var(--blue); display: grid; place-items: center; flex-shrink: 0; }
.outcomes { display: flex; flex-wrap: wrap; gap: 8px; }
.outcome input { position: absolute; opacity: 0; pointer-events: none; }
.outcome span { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-weight: 650; font-size: 13.5px; cursor: pointer; background: #fff; }
.outcome input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.outcome input:focus-visible + span { box-shadow: 0 0 0 3px rgba(0,194,168,.35); }
.sheet textarea { min-height: 76px; }
.sheet-actions { display: flex; gap: 10px; }
.sheet-actions .btn { flex: 1; justify-content: center; }
@keyframes sheetin { from { transform: translateY(12px); opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }
@media (max-width: 860px) {
  .sheet-wrap { place-items: end stretch; padding: 0; }
  .sheet { max-width: none; border-radius: 20px 20px 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); }
  .sheet-actions .btn, .sheet-actions .btn-ghost { min-height: 48px; }
}
.push-card .card-head h3 { display: flex; align-items: center; gap: 8px; }
.push-card .card-head .ico { color: var(--accent-dark); }

textarea.doc-edit { min-height: 360px; font-size: 14px; line-height: 1.6; }
.note-row td { padding-top: 0 !important; font-style: italic; }


/* =========================================================================
   Customer pages (request, booking, portal, e-sign, pay): premium layout.
   Navy hero band with the content card lifted over it, Inter type,
   generous spacing, one accent color, trust details close to every action.
   ========================================================================= */
.hub-body { background: #f3f5f9; min-height: 100vh; display: flex; flex-direction: column; font-feature-settings: "cv11", "ss01"; }
.hub-wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
.hub-top { background: #081830; color: #fff; padding-top: env(safe-area-inset-top); border-bottom: 1px solid rgba(255,255,255,.06); }
.hub-top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 70px; }
.hub-brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.hub-brand:hover { text-decoration: none; }
.hub-brand img { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 6px 18px rgba(0,0,0,.25); }
.hub-brand strong { display: block; font-size: 17.5px; font-weight: 750; letter-spacing: -.2px; }
.hub-brand small { display: block; color: var(--accent); font-size: 12px; font-weight: 600; }
.hub-link, .hub-link-btn { color: rgba(255,255,255,.78); font-weight: 600; font-size: 13.5px; text-decoration: none; background: none; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 7px 14px; cursor: pointer; font-family: inherit; }
.hub-link:hover, .hub-link-btn:hover { color: #fff; border-color: rgba(255,255,255,.4); text-decoration: none; }
.hub-hero { color: #fff; padding: 44px 0 100px;
  background:
    radial-gradient(900px 380px at 85% -10%, rgba(0,194,168,.22), transparent 60%),
    radial-gradient(700px 300px at -10% 120%, rgba(47,111,228,.25), transparent 60%),
    linear-gradient(160deg, #0b1e39 0%, #0d2648 55%, #0b1e39 100%); }
.hub-hero-slim { padding: 34px 0 86px; }
.hub-hero h1 { color: #fff; font-size: clamp(28px, 4.2vw, 42px); font-weight: 800; letter-spacing: -1px; line-height: 1.1; max-width: 760px; text-wrap: balance; margin: 0; }
.hub-hero p { color: rgba(255,255,255,.76); font-size: 16.5px; line-height: 1.55; max-width: 620px; margin: 12px 0 0; }
.hub-hero a.on-dark { color: var(--accent); }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; letter-spacing: .4px; color: var(--accent); background: rgba(0,194,168,.12); border: 1px solid rgba(0,194,168,.28); border-radius: 999px; padding: 5px 12px; margin-bottom: 16px; }
.eyebrow .ico { width: 15px; height: 15px; }
.hub-main { flex: 1; display: grid; gap: 20px; align-content: start; padding-bottom: 44px; margin-top: -64px; position: relative; }
.lift { position: relative; z-index: 1; }
.hub-card { background: #fff; border: 1px solid #e4e9f0; border-radius: 20px; padding: 28px; box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 18px 48px -18px rgba(11,30,57,.22); min-width: 0; }
.hub-card h2 { font-size: 19px; font-weight: 750; margin: 0 0 16px; color: var(--ink); letter-spacing: -.2px; display: flex; align-items: center; gap: 9px; }
.hub-card h2 .ico { color: var(--accent-dark); }
.hub-center { text-align: center; max-width: 600px; width: 100%; margin: 0 auto; padding: 40px 32px; }
.hub-center h1 { font-size: 28px; letter-spacing: -.6px; margin: 0 0 8px; }
.hub-center .btn-big { margin-top: 14px; }
.side-card { background: #fff; border: 1px solid #e4e9f0; border-radius: 20px; padding: 24px; box-shadow: 0 10px 30px -16px rgba(11,30,57,.18); }
.side-card h3 { margin: 0 0 14px; font-size: 15.5px; color: var(--ink); }
.side-dark { background: linear-gradient(160deg, #0b1e39, #10294d); border-color: transparent; color: rgba(255,255,255,.85); }
.side-dark h3 { color: #fff; }
.fine { color: var(--faint); font-size: 12.5px; line-height: 1.55; margin: 12px 0 0; display: flex; gap: 6px; align-items: flex-start; }
.fine .ico { width: 14px; height: 14px; margin-top: 2px; }
.btn-block { width: 100%; justify-content: center; margin-top: 18px; }
.btn-big { padding: 15px 26px; font-size: 16px; border-radius: 12px; box-shadow: 0 8px 22px -8px rgba(0,194,168,.65); transition: transform .12s ease, box-shadow .12s ease; }
.btn-big:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -8px rgba(0,194,168,.75); }
.btn-big .ico { width: 18px; height: 18px; }
.hub-body input, .hub-body select, .hub-body textarea { background: #f8fafc; border-color: #dfe5ec; border-radius: 12px; padding: 13px 14px; font-size: 15px; }
.hub-body .field label { font-size: 12.5px; color: #33404f; }

/* request page */
.req-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.req-side { display: grid; gap: 16px; }
.steps-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps-list li { display: flex; gap: 12px; }
.steps-list li > span { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: #00806f; font-weight: 800; display: grid; place-items: center; flex-shrink: 0; font-size: 13px; }
.steps-list strong { display: block; color: var(--ink); font-size: 14px; }
.steps-list small { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 13.5px; }
.check-list li { display: flex; gap: 9px; align-items: flex-start; }
.check-list .ico { color: var(--accent); width: 17px; height: 17px; margin-top: 1px; }
.side-contact { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.12); font-size: 13.5px; }
.side-contact a { color: var(--accent); font-weight: 700; }
fieldset.choice { border: 0; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
fieldset.choice legend { font-size: 12.5px; font-weight: 700; color: #33404f; margin-bottom: 8px; padding: 0; }
.choice-opt { display: flex; gap: 12px; align-items: flex-start; border: 1.5px solid #e1e7ee; border-radius: 14px; padding: 14px; cursor: pointer; background: #fff; transition: border-color .12s, box-shadow .12s; }
.choice-opt:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(0,194,168,.12); }
.choice-opt input { position: absolute; opacity: 0; pointer-events: none; }
.choice-opt:has(input:focus-visible) { box-shadow: 0 0 0 4px rgba(0,194,168,.3); }
.choice-ico { width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: #00806f; display: grid; place-items: center; flex-shrink: 0; }
.choice-opt strong { display: block; color: var(--ink); font-size: 14.5px; }
.choice-opt small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }

/* booking */
.stepper { list-style: none; display: flex; gap: 8px; margin: 22px 0 0; padding: 0; flex-wrap: wrap; }
.stepper li { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.55); font-weight: 650; font-size: 13.5px; padding: 6px 14px 6px 6px; border-radius: 999px; background: rgba(255,255,255,.06); }
.stepper li span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.12); font-size: 12px; font-weight: 800; }
.stepper li span .ico { width: 14px; height: 14px; }
.stepper li.on { color: #fff; background: rgba(0,194,168,.18); }
.stepper li.on span { background: var(--accent); color: var(--navy-dark); }
.stepper li.done { color: rgba(255,255,255,.85); }
.stepper li.done span { background: rgba(0,194,168,.35); color: #fff; }
.book-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.book-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.book-head h2 { margin-bottom: 14px; }
.book-summary { position: sticky; top: 18px; }
.sum-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.sum-list li { display: flex; gap: 12px; align-items: flex-start; }
.sum-list .ico { width: 20px; height: 20px; color: var(--accent-dark); margin-top: 2px; }
.sum-list strong { display: block; color: var(--ink); font-size: 14px; }
.sum-list small { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.type-card { border: 1.5px solid #e1e7ee; border-radius: 16px; padding: 20px; color: var(--text); display: grid; gap: 8px; text-decoration: none; transition: border-color .12s, box-shadow .12s, transform .12s; }
.type-card:hover { border-color: var(--accent); box-shadow: 0 12px 28px -14px rgba(0,194,168,.55); transform: translateY(-2px); text-decoration: none; }
.type-ico { width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); color: #00806f; display: grid; place-items: center; }
.type-card strong { color: var(--ink); font-size: 17px; letter-spacing: -.2px; }
.type-meta { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 600; }
.type-meta .ico { width: 15px; height: 15px; }
.type-card p { margin: 0; font-size: 13.5px; }
.type-go { color: var(--accent-dark); font-weight: 750; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; }
.type-go .ico { width: 15px; height: 15px; }
.day-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.day-chip { border: 1.5px solid #e1e7ee; border-radius: 14px; padding: 10px 6px; text-align: center; display: grid; gap: 1px; color: var(--text); text-decoration: none; background: #fff; transition: border-color .12s, transform .12s; }
.day-chip small { color: var(--muted); font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .5px; }
.day-chip strong { color: var(--ink); font-size: 21px; font-weight: 800; letter-spacing: -.5px; }
.day-chip:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-1px); }
.day-chip.on { background: var(--ink); border-color: var(--ink); }
.day-chip.on strong, .day-chip.on small { color: #fff; }
.times-head { margin: 24px 0 12px; font-size: 16px; color: var(--ink); scroll-margin-top: 20px; }
.cal { border: 1.5px solid #e1e7ee; border-radius: 16px; padding: 14px; background: #fff; max-width: 460px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-title { font-size: 17px; font-weight: 800; color: var(--ink); letter-spacing: -.2px; }
.cal-nav { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; line-height: 1; color: var(--ink); text-decoration: none; border: 1.5px solid #e1e7ee; background: #fff; }
.cal-nav:hover { border-color: var(--accent); text-decoration: none; }
.cal-nav.off { opacity: .3; }
.cal-grid { display: grid; gap: 4px; }
.cal-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { text-align: center; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; padding: 4px 0; }
.cal-day { aspect-ratio: 1; min-height: 38px; display: grid; place-items: center; border-radius: 50%; font-weight: 650; font-size: 15px; color: #a3adb9; text-decoration: none; position: relative; }
.cal-day.blank { visibility: hidden; }
.cal-day.open { color: #007a69; background: rgba(0,194,168,.12); font-weight: 800; }
.cal-day.open:hover { background: var(--accent); color: var(--navy-dark); text-decoration: none; }
.cal-day.on, .cal-day.on:hover { background: var(--ink); color: #fff; }
.cal-day.today::after { content: ""; position: absolute; bottom: 5px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.cal-legend { margin: 10px 0 0; }
.cal-legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: rgba(0,194,168,.35); vertical-align: -1px; margin-right: 4px; }
@media (max-width: 420px) { .cal { padding: 10px; } .cal-day { font-size: 14px; min-height: 34px; } }
.resched-now { display: flex; gap: 8px; align-items: center; background: #f2fbf9; border: 1px solid rgba(0,194,168,.35); border-radius: 12px; padding: 10px 12px; margin: 0 0 14px; color: var(--ink); }
.resched-now svg { width: 18px; height: 18px; flex: none; }
.resched-compare { display: grid; gap: 10px; margin: 6px 0 18px; }
.resched-compare div { border: 1.5px solid #e1e7ee; border-radius: 12px; padding: 12px 14px; display: grid; gap: 2px; }
.resched-compare div:last-child { border-color: var(--accent); background: #f2fbf9; }
.resched-compare small { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.resched-compare s { color: var(--muted); }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 8px; }
.slot { border: 1.5px solid rgba(0,194,168,.45); color: #007a69; border-radius: 12px; padding: 12px 6px; text-align: center; font-weight: 750; text-decoration: none; background: #fbfffe; transition: background .12s, color .12s; }
.slot:hover { background: var(--accent); color: var(--navy-dark); border-color: var(--accent); text-decoration: none; }
.booked-box { display: grid; gap: 12px; text-align: left; max-width: 420px; margin: 18px auto 6px; padding: 18px; border-radius: 16px; background: #f6f9fc; border: 1px solid #e6ecf2; }
.booked-box > div { display: flex; gap: 12px; align-items: flex-start; }
.booked-box .ico { width: 20px; height: 20px; color: var(--accent-dark); margin-top: 2px; }
.booked-box strong { display: block; color: var(--ink); font-size: 14.5px; }
.booked-box small { color: var(--muted); font-size: 12.5px; }
.done-check { width: 72px; height: 72px; border-radius: 50%; background: var(--accent-soft); color: #00806f; display: grid; place-items: center; margin: 0 auto 16px; box-shadow: 0 0 0 10px rgba(0,194,168,.08); animation: pop .4s ease-out; }
.done-check .ico { width: 34px; height: 34px; stroke-width: 2.6; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }

/* portal */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stat { background: #fff; border: 1px solid #e4e9f0; border-radius: 18px; padding: 18px 20px; box-shadow: 0 14px 36px -18px rgba(11,30,57,.25); display: grid; gap: 2px; }
.stat small { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; }
.stat strong { color: var(--ink); font-size: 26px; font-weight: 800; letter-spacing: -.6px; font-variant-numeric: tabular-nums; }
.stat strong.stat-sm { font-size: 17px; letter-spacing: -.2px; padding: 6px 0 3px; }
.stat span { color: var(--muted); font-size: 12.5px; }
.attention-card { border: 1.5px solid rgba(0,194,168,.4); }
.hub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.hub-list { list-style: none; margin: 0; padding: 0; }
.hub-list li { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid #eef2f6; }
.hub-list li:last-child { border-bottom: 0; }
.hub-list li > div { flex: 1; min-width: 0; }
.hub-list strong { display: block; color: var(--ink); font-size: 14.5px; }
.hub-list span { color: var(--muted); font-size: 12.5px; }
.hub-list .kind { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; }
.empty-note { color: var(--faint); font-size: 14px; margin: 4px 0 0; }

/* e-sign */
.paper { padding: 44px 48px; font-size: 15.5px; line-height: 1.75; color: #26313d; }
.doc p { margin: 0 0 15px; }
.doc p:first-child { font-weight: 800; color: var(--ink); letter-spacing: .4px; font-size: 16px; text-align: center; margin-bottom: 22px; }
/* Flawsbug letterhead & document typography */
.hub-card.paper { padding: 44px 48px; overflow: hidden; }
@media (max-width: 600px) { .hub-card.paper { padding: 26px 20px; } }
.lh { display: flex; justify-content: space-between; align-items: center; gap: 16px; background: var(--navy, #0b1e39);
  color: #fff; margin: -44px -48px 30px; padding: 22px 48px; border-bottom: 4px solid var(--accent); border-radius: 0;
  -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.lh-brand { display: flex; align-items: center; gap: 14px; }
.lh-brand img { width: 52px; height: 52px; border-radius: 12px; display: block; }
.lh-brand strong { display: block; font-size: 21px; font-weight: 800; letter-spacing: -.2px; line-height: 1.15; }
.lh-brand span { display: block; color: var(--accent); font-size: 12.5px; font-weight: 700; }
.lh-meta { display: grid; justify-items: end; gap: 2px; font-size: 12.5px; color: #c9d4e2; text-align: right; }
.lh-label { color: #fff; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; font-size: 12px;
  border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: 3px 10px; }
.doc .doc-title { font-size: 21px; font-weight: 800; color: var(--ink); letter-spacing: .3px; margin: 0 0 18px; text-align: left; line-height: 1.3; }
.doc .doc-h { font-size: 13px; font-weight: 800; color: var(--accent-dark, #00a58f); letter-spacing: 1.1px; text-transform: uppercase;
  margin: 26px 0 10px; padding-top: 14px; border-top: 1px solid #e6ebf1; }
.doc .doc-list { margin: 0 0 15px; padding-left: 20px; }
.doc .doc-list li { margin: 0 0 6px; padding-left: 4px; }
.doc .doc-list li::marker { color: var(--accent); }
.lh-foot { margin: 34px -48px -44px; padding: 16px 48px; background: #f6f8fb; border-top: 1px solid #e6ebf1; border-radius: 0;
  font-size: 11.5px; color: #6b7a89; display: grid; gap: 2px; line-height: 1.5; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.lh-foot strong { color: var(--ink); }
.sign-card { border: 1.5px solid rgba(0,194,168,.4); }
.sigpad { position: relative; border: 1.5px dashed #c5cfda; border-radius: 14px; background: #fcfdfe; touch-action: none; }
.sigpad canvas { display: block; width: 100%; height: 180px; cursor: crosshair; touch-action: none; position: relative; z-index: 1; }
.sigpad-preview { position: absolute; left: 44px; bottom: 34px; font: italic 600 32px "Segoe Script", "Brush Script MT", "Snell Roundhand", cursive; color: #0b1e39; opacity: .5; pointer-events: none; }
.sigpad-x { position: absolute; left: 18px; bottom: 36px; color: #b6c1cc; font-size: 16px; pointer-events: none; }
.sigpad::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 30px; border-bottom: 1px solid #d5dde5; pointer-events: none; }
.consent { align-items: flex-start; margin-top: 18px; line-height: 1.55; font-size: 13.5px; background: #f6f9fc; border-radius: 12px; padding: 14px; }
.consent input { margin-top: 3px; width: auto; }
code.hash { word-break: break-all; font-size: 11px; background: none; padding: 0; }
.sig-block { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); }
.sig-img img { max-width: 320px; height: auto; display: block; }
.sig-typed { font: italic 600 32px "Segoe Script", "Brush Script MT", "Snell Roundhand", cursive; color: #0b1e39; }
.sig-line { border-top: 1px solid var(--ink); display: inline-block; padding-top: 6px; margin-top: 6px; min-width: 280px; font-size: 13px; }
.cert .kv { grid-template-columns: 180px 1fr; }

/* pay */
.pay-card { max-width: 560px; width: 100%; margin: 0 auto; padding: 30px; }
.pay-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pay-from { display: flex; align-items: center; gap: 10px; }
.pay-from img { width: 36px; height: 36px; border-radius: 10px; }
.pay-from strong { display: block; color: var(--ink); font-size: 15px; }
.pay-from small { color: var(--muted); font-size: 12.5px; }
.pay-amount { font-size: 46px; font-weight: 800; color: var(--ink); letter-spacing: -1.5px; margin: 22px 0 18px; font-variant-numeric: tabular-nums; }
.pay-lines { margin: 0 0 6px; display: grid; gap: 0; border-top: 1px solid #eef2f6; }
.pay-lines > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid #eef2f6; font-size: 14px; }
.pay-lines dt { color: var(--muted); }
.pay-lines dd { margin: 0; color: var(--ink); font-weight: 600; text-align: right; }
.pay-note { padding: 14px 16px; border-radius: 12px; background: #f6f9fc; font-weight: 600; margin: 18px 0 0; display: flex; gap: 8px; align-items: flex-start; }
.pay-note.ok { background: var(--accent-soft); color: #00806f; }
.pay-note .ico { flex-shrink: 0; margin-top: 2px; }
.secure-row { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-top: 14px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.secure-row span { display: inline-flex; align-items: center; gap: 6px; }
.secure-row .ico { width: 15px; height: 15px; }

/* footer */
.hub-foot { background: #fff; border-top: 1px solid #e4e9f0; padding-bottom: env(safe-area-inset-bottom); }
.hub-foot-in { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding-top: 22px; padding-bottom: 26px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.hub-foot-in > div { display: grid; }
.hub-foot strong { color: var(--ink); }
.hub-trust { text-align: right; }
.hub-trust span { display: inline-flex; gap: 6px; align-items: center; justify-content: flex-end; }
.hub-trust .ico { width: 14px; height: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 860px) {
  .req-grid, .book-grid, .hub-grid { grid-template-columns: 1fr; }
  .book-summary { position: static; order: -1; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .stat-row .stat:last-child { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .hub-wrap { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .hub-hero { padding: 30px 0 86px; }
  .hub-hero p { font-size: 15px; }
  .hub-card { padding: 22px 18px; border-radius: 18px; }
  .hub-center { padding: 30px 20px; }
  .paper { padding: 26px 20px; font-size: 15px; }
  .lh { margin: -26px -20px 22px; padding: 18px 20px; flex-wrap: wrap; } .lh-meta { justify-items: start; text-align: left; }
  .lh-foot { margin: 26px -20px -26px; padding: 14px 20px; }
  .doc .doc-title { font-size: 18px; }
  fieldset.choice, .type-grid { grid-template-columns: 1fr; }
  .hub-list li { flex-wrap: wrap; }
  .hub-list li .btn, .hub-list li .btn-sm { margin-left: 50px; }
  .cert .kv { grid-template-columns: 1fr; }
  .pay-amount { font-size: 38px; }
  .hub-trust { text-align: left; }
  .hub-trust span { justify-content: flex-start; }
  .hub-brand small { display: none; }
  .stepper li { font-size: 12.5px; padding-right: 10px; }
}
@media (prefers-reduced-motion: reduce) { .btn-big, .type-card, .day-chip, .done-check { transition: none; animation: none; } }
@media print {
  .hub-top, .hub-foot, .hub-hero, .no-print, .flash { display: none !important; }
  .hub-main { margin-top: 0; }
  .hub-body { background: #fff; }
  .hub-card { box-shadow: none; border: 0; padding: 0; }
  .paper, .hub-card.paper { padding: 0; overflow: visible; }
  .lh { margin: 0 0 26px; border-radius: 0; }
  .lh-foot { margin: 30px 0 0; border-radius: 0; }
  .doc .doc-h { break-after: avoid; }
  @page { margin: 14mm 14mm 16mm; }
}

/* field hints on customer pages */
.hub-body .field .hint { display: block; margin-top: 6px; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.cal-actions .btn-big { white-space: normal; text-align: center; }
.auto-return { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50;
  display: flex; align-items: center; gap: 14px; max-width: min(560px, calc(100vw - 32px)); background: var(--navy); color: #fff;
  border-radius: 14px; padding: 12px 14px 12px 18px; box-shadow: 0 14px 40px rgba(7,20,39,.35); font-size: 14px; text-align: left; }
.auto-return[hidden] { display: none !important; }
.auto-return .btn-sm { background: var(--accent); color: var(--navy-dark); border: 0; white-space: nowrap; }
.invite-note { display: flex; gap: 10px; align-items: flex-start; text-align: left; background: var(--accent-soft, #e6f9f6); border: 1px solid rgba(0,194,168,.35);
  border-radius: 12px; padding: 12px 14px; margin: 6px 0 12px; font-size: 14px; }
.invite-note .ico { width: 20px; height: 20px; flex-shrink: 0; color: var(--accent-dark, #00a58f); margin-top: 1px; }
@media (max-width: 560px) { .auto-return { width: calc(100vw - 32px); } }

/* ---------- Projects board ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x proximity; }
.board-col { background: #eef2f6; border-radius: var(--radius); padding: 10px; min-height: 220px; scroll-snap-align: start; display: flex; flex-direction: column; }
.board-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; }
.board-head h3 { margin: 0; font-size: 13.5px; font-weight: 800; color: var(--ink); flex: 1; }
.board-head .n { font-size: 12px; font-weight: 800; color: var(--muted); background: #fff; border-radius: 999px; padding: 1px 9px; }
.board-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.board-dot.stage-contract_signed { background: var(--blue); } .board-dot.stage-kickoff { background: var(--violet); }
.board-dot.stage-onboarding { background: #2f9bd6; } .board-dot.stage-planning { background: var(--warn); }
.board-dot.stage-delivery { background: var(--accent); } .board-dot.stage-completed { background: #00806f; }
.board-list { display: grid; gap: 10px; align-content: start; flex: 1; border-radius: 12px; transition: background .12s; min-height: 80px; }
.board-list.drop-on { background: rgba(0,194,168,.12); outline: 2px dashed var(--accent); outline-offset: -2px; }
.board-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; box-shadow: 0 6px 16px -10px rgba(11,30,57,.3); display: grid; gap: 6px; }
.board-card[draggable="true"] { cursor: grab; }
.board-card.dragging { opacity: .5; }
.board-card:target { outline: 2px solid var(--accent); }
.bc-title { color: var(--ink); font-size: 14px; line-height: 1.3; }
.bc-client { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12.5px; }
.bc-client .ico { width: 14px; height: 14px; }
.bc-meta { display: flex; flex-wrap: wrap; gap: 5px; }
.bc-more summary { cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--accent-dark); list-style: none; }
.bc-more summary::-webkit-details-marker { display: none; }
.bc-more[open] summary { margin-bottom: 8px; }
.bc-more .field { margin-bottom: 8px; }
.bc-move { display: flex; gap: 6px; margin-bottom: 10px; }
.bc-move select { flex: 1; }
.board-empty { color: var(--muted); font-size: 12.5px; text-align: center; padding: 18px 6px; border: 1.5px dashed #d5dde6; border-radius: 12px; margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 760px) { .board { grid-auto-columns: 82%; } }

/* ---------- Tasks ---------- */
.task-add { display: grid; grid-template-columns: 1fr 160px 220px auto; gap: 12px; align-items: end; }
.task-list { list-style: none; margin: 0; padding: 0; display: grid; }
.task-list li { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line-2); scroll-margin-top: 90px; }
.task-list li:last-child { border-bottom: 0; }
.task-list li:target { background: #f2fbf9; border-radius: 10px; }
.task-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.task-body strong { color: var(--ink); font-size: 14px; }
.task-body .ico { width: 13px; height: 13px; vertical-align: -2px; }
.task-check { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #c3ccd6; background: #fff; cursor: pointer; display: grid; place-items: center; padding: 0; flex: none; }
.task-check:hover { border-color: var(--accent); background: #f2fbf9; }
.task-check.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.task-check .ico { width: 14px; height: 14px; }
.task-list.done s { color: var(--muted); }
.task-edit { position: relative; }
.task-edit summary { list-style: none; cursor: pointer; color: var(--muted); padding: 4px; border-radius: 8px; }
.task-edit summary::-webkit-details-marker { display: none; }
.task-edit[open] > form, .task-edit[open] > form + form { position: relative; }
.task-edit[open] { flex-basis: 100%; }
.task-list li:has(.task-edit[open]) { flex-wrap: wrap; }
@media (max-width: 760px) { .task-add { grid-template-columns: 1fr 1fr; } .task-add .task-title { grid-column: 1 / -1; } .task-add .btn { grid-column: 1 / -1; } }

/* ---------- Time & reports ---------- */
.kpis.kpis-3 { grid-template-columns: repeat(3, 1fr); }
.kpis.kpis-4 { grid-template-columns: repeat(4, 1fr); }
.form-grid .span-3 { grid-column: span 3; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .axis { stroke: #dfe5ec; stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 11px; font-weight: 600; }
.chart .val { fill: var(--ink); font-size: 11.5px; font-weight: 800; }
.chart .hit { fill: transparent; }
.chart .bar-g:hover .hit, .chart .bar-g:focus .hit { fill: rgba(11,30,57,.05); }
.chart .bar-g:focus { outline: none; }
.chart .bar-g:hover .bar, .chart .bar-g:focus .bar { filter: brightness(.9); }
.chart-table { margin-top: 8px; }
.chart-table summary { cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--accent-dark); }
.hbars { display: grid; gap: 9px; }
.hbar-row { display: grid; grid-template-columns: 120px 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.hbar-label { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { background: var(--line-2); border-radius: 999px; height: 10px; overflow: hidden; }
.hbar-fill { display: block; height: 100%; border-radius: 999px; min-width: 0; }
.hbar-n { font-weight: 800; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; min-width: 26px; }
.hbar-n small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.money-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.money-row div { background: #f6f8fb; border-radius: 12px; padding: 14px; display: grid; gap: 4px; }
.money-row small { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.money-row strong { font-size: 22px; color: var(--ink); font-weight: 800; }
.money-row strong.danger { color: var(--danger); }
@media (max-width: 900px) { .kpis.kpis-4 { grid-template-columns: 1fr 1fr; } .money-row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .kpis.kpis-3 { grid-template-columns: 1fr 1fr 1fr; gap: 8px; } .kpis.kpis-3 .kpi-num { font-size: 20px; } .form-grid .span-3 { grid-column: auto; } .hbar-row { grid-template-columns: 96px 1fr auto; } }

/* ---------- Template library ---------- */
.lib-filters { flex-wrap: wrap; gap: 10px; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.lib-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); display: grid; gap: 8px; align-content: start; }
.lib-card[hidden] { display: none; }
.lib-card strong { color: var(--ink); font-size: 14.5px; line-height: 1.3; }
.lib-card p { margin: 0; }
.lib-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lib-ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; margin-right: 2px; }
.lib-proposal { background: var(--accent-soft); color: #00806f; }
.lib-contract { background: var(--blue-soft); color: var(--blue); }
.lib-invoice { background: var(--warn-soft); color: var(--warn); }
.lib-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: auto; }
.sig-preview { background: #fff; border: 1px dashed #d5dde6; border-radius: 12px; padding: 6px 18px 12px; overflow-x: auto; }
