:root {
  --ink: #101828;
  --muted: #667085;
  --subtle: #98a2b3;
  --line: #dfe4ea;
  --line-soft: #edf0f3;
  --canvas: #f5f7f9;
  --panel: #ffffff;
  --nav: #062b4a;
  --nav-hover: #0b385c;
  --primary: #062b4a;
  --primary-hover: #0a3d66;
  --primary-soft: #e8f2f6;
  --success: #15803d;
  --success-soft: #eaf7ee;
  --warning: #a85d06;
  --warning-soft: #fff4db;
  --danger: #c4323f;
  --danger-soft: #fdebed;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04);
  --sidebar: 232px;
  --topbar: 64px;
  font-family: Inter, "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); overflow-x: hidden; scrollbar-width: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar, .nav-list::-webkit-scrollbar { display: none; }
body { margin: 0; min-width: 320px; min-height: 100%; overflow-x: hidden; background: var(--canvas); color: var(--ink); font-size: 14px; line-height: 1.5; scrollbar-width: none; }
button, input, select, textarea { font: inherit; }
button, a { touch-action: manipulation; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: rgba(8,127,152,.14); }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img, canvas, svg, video { display: block; max-width: 100%; }
svg { width: 18px; height: 18px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { scroll-margin-top: calc(var(--topbar) + 16px); text-wrap: balance; }
p { text-wrap: pretty; }
h1, h2, h3, strong { letter-spacing: -.02em; }
:focus-visible { outline: 3px solid rgba(10, 116, 132, .28); outline-offset: 2px; }
::selection { background: #cdeff2; color: #062b4a; }

/* Keep server-rendered page changes responsive instead of flashing blank. */
body::after { content: ""; position: fixed; z-index: 1000; top: 0; left: 0; width: 0; height: 2px; background: #08a8cd; opacity: 0; pointer-events: none; transition: width .18s ease, opacity .18s ease; }
body.app-navigating::after { width: 72%; opacity: 1; }

.skip-link { position: fixed; z-index: 1000; left: 12px; top: -60px; padding: 10px 14px; border-radius: 6px; background: #fff; box-shadow: var(--shadow); }
.skip-link:focus { top: 12px; }

/* Application shell */
.app-shell { position: relative; min-height: 100vh; min-height: 100svh; }
.app-shell::before { content: ""; position: absolute; z-index: 0; inset: 0 auto 0 0; width: var(--sidebar); background: var(--nav); }
.sidebar { position: fixed; z-index: 40; inset: 0 auto 0 0; width: var(--sidebar); min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; overflow: hidden; background: var(--nav); color: #d5e1ea; }
.brand { flex: 0 0 76px; padding: 0 20px; display: flex; align-items: center; gap: 11px; border-bottom: 1px solid rgba(255,255,255,.1); color: #fff; }
.binary-brand-logo { flex: 0 0 auto; width: 34px; height: 34px; object-fit: contain; }
.sidebar .binary-brand-logo { width: 40px; height: 40px; filter: brightness(0) invert(1); }
.app-brand-wordmark { display: grid; color: inherit; font-size: 13px; font-weight: 820; letter-spacing: .13em; line-height: 1; text-transform: uppercase; }
.app-brand-wordmark strong, .app-brand-wordmark small { font: inherit; }
.app-brand-wordmark small { margin-top: 2px; font-size: 9px; letter-spacing: .36em; }
.brand-mark { flex: 0 0 auto; width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .35); border-radius: 6px; color: #fff; font-weight: 800; }
.brand-mark.mini { width: 30px; height: 30px; border-color: var(--line); color: var(--nav); font-size: 13px; }
.sidebar-close { width: 36px; height: 36px; margin-left: auto; padding: 0; display: none; place-items: center; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; background: rgba(255,255,255,.08); color: #fff; cursor: pointer; }
.sidebar-close:hover { border-color: rgba(255,255,255,.38); background: rgba(255,255,255,.14); }
.close-glyph { position: relative; width: 14px; height: 14px; display: block; }
.close-glyph::before, .close-glyph::after { content: ""; position: absolute; top: 6px; left: 1px; width: 12px; height: 1.5px; border-radius: 2px; background: currentColor; }
.close-glyph::before { transform: rotate(45deg); }
.close-glyph::after { transform: rotate(-45deg); }
.nav-list { flex: 1; min-height: 0; padding: 18px 10px 22px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.nav-section + .nav-section { margin-top: 17px; }
.nav-section h2 { margin: 0 12px 7px; color: #8ea8bc; font-size: 9px; font-weight: 780; letter-spacing: .1em; line-height: 1.2; text-transform: uppercase; }
.nav-link { position: relative; min-height: 40px; padding: 0 12px; display: flex; align-items: center; gap: 11px; border-radius: 7px; color: #d3e0e9; font-size: 12px; font-weight: 620; transition: background-color .15s ease, color .15s ease; }
.nav-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-link.active { background: #0b4d79; color: #fff; }
.nav-link.active::before { content: ""; position: absolute; left: -10px; top: 0; bottom: 0; width: 3px; background: #14b8d4; }
.nav-icon { width: 20px; height: 20px; display: grid; place-items: center; color: #b7ccda; }
.nav-icon svg, .nav-link > [data-icon] svg { width: 20px; height: 20px; stroke-width: 1.8; }
.nav-link.active .nav-icon { color: #fff; }
.sidebar-user { flex: 0 0 auto; min-height: 74px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; border-top: 1px solid rgba(255,255,255,.1); background: var(--nav); }
.sidebar-user-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.sidebar-user-copy strong { overflow: hidden; color: #fff; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-copy small { color: #9eb3c3; font-size: 10px; }
.sidebar-user .icon-button.inverse { border-color: transparent; background: transparent; color: #d0dde7; }
.sidebar-user .icon-button.inverse:hover { border-color: rgba(255,255,255,.15); background: rgba(255,255,255,.08); color: #fff; }
.avatar { flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #087fc4; color: #fff; font-weight: 750; }
.avatar.small { width: 30px; height: 30px; font-size: 11px; }
.avatar.large { width: 52px; height: 52px; font-size: 16px; }

.app-main { min-width: 0; min-height: 100vh; margin-left: var(--sidebar); background: var(--canvas); }
.topbar { display: none; }
.topbar-tools { display: flex; align-items: center; gap: 14px; }
.global-search { width: min(260px, 28vw); height: 38px; padding: 0 11px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--muted); }
.global-search input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.global-search:focus-within { border-color: #91c8d4; box-shadow: 0 0 0 3px rgba(5,170,218,.12); }
.topbar-user { padding-left: 13px; display: flex; align-items: center; gap: 8px; border-left: 1px solid var(--line); }
.topbar-user > span:last-child { display: flex; flex-direction: column; }
.topbar-user strong { font-size: 12px; }
.topbar-user small { color: var(--muted); font-size: 10px; }
.menu-button, .mobile-brand { display: none; }
.sidebar-backdrop { display: none; }
.content { width: 100%; max-width: 1500px; margin: 0 auto; padding: 28px 32px 48px; }
.page-head { min-width: 0; min-height: 62px; margin-bottom: 18px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.page-head h1 { margin: 0 0 4px; color: #101828; font-size: clamp(27px, 2.3vw, 36px); font-weight: 720; line-height: 1.16; letter-spacing: -.035em; }
.page-head p { margin: 0; color: var(--muted); font-size: 13px; }
.page-head-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.page-actions, .dashboard-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.page-actions { margin: -66px 0 24px; position: relative; }
.dashboard-actions { min-height: 42px; margin: -76px 0 28px; position: relative; }

/* Controls and shared surfaces */
.btn { min-height: 40px; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 700; line-height: 1; white-space: nowrap; cursor: pointer; transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn-primary { border-color: var(--primary); background: var(--primary); color: #fff; }
.btn-primary:hover { border-color: var(--primary-hover); background: var(--primary-hover); }
.btn-secondary { border-color: var(--line); background: #fff; color: #344054; }
.btn-secondary:hover { border-color: #b9c2cc; background: #fafbfc; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-ghost:hover { background: #eef1f4; color: var(--ink); }
.btn-ghost.btn-block { margin-top: 10px; background: transparent; transition: background-color .15s ease, color .15s ease; }
.btn-ghost.btn-block:hover { background-color: #fee2e2; color: #b91c1c; }
.btn-danger { border-color: #f3c5ca; background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { border-color: #fecaca; background: #fee2e2; color: #b91c1c; }
.btn-block { width: 100%; }
.btn-small { min-height: 34px; padding: 0 11px; font-size: 12px; }
.icon-button { flex: 0 0 auto; width: 38px; height: 38px; padding: 0; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: #475467; cursor: pointer; }
.icon-button:hover { border-color: #b8c2cc; background: #f8fafb; color: var(--ink); }
.icon-button.small { width: 32px; height: 32px; }
.icon-button.inverse { border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.06); color: #cbd5df; }
.icon-button.danger { color: var(--danger); }
.icon-button.menu-button { display: none; }
.date-control { min-height: 40px; padding: 0 13px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: #344054; font-size: 13px; font-weight: 650; }
.dashboard-period-form { margin: 0; }
.dashboard-period-control { min-width: 278px; min-height: 42px; padding: 5px 6px 5px 11px; display: grid; grid-template-columns: 20px minmax(0, 1fr) 118px; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: #344054; cursor: pointer; }
.dashboard-period-icon { width: 20px; height: 20px; display: grid; place-items: center; color: var(--primary); }
.dashboard-period-copy { min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.dashboard-period-copy strong { font-size: 11px; font-weight: 750; }
.dashboard-period-copy small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-period-control input[type="month"] { width: 118px; min-width: 0; height: 32px; padding: 4px 6px; border: 1px solid #d5dbe2; border-radius: 5px; outline: 0; background: #f9fafb; color: #182230; font-size: 11px; font-weight: 650; cursor: pointer; }
.dashboard-period-control:focus-within { border-color: #0a7484; box-shadow: 0 0 0 3px rgba(10,116,132,.12); }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.panel-head { min-width: 0; min-height: 64px; padding: 15px 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line-soft); }
.panel-head > div { min-width: 0; }
.panel-head h2, .section-heading h2 { margin: 0 0 3px; font-size: 15px; font-weight: 720; }
.panel-head p, .section-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.panel-head > a { flex: 0 0 auto; color: var(--primary); font-size: 12px; font-weight: 700; }

.badge { min-height: 23px; padding: 2px 8px; display: inline-flex; align-items: center; justify-content: center; border-radius: 5px; background: #eef1f4; color: #596575; font-size: 10px; font-weight: 750; line-height: 1.2; text-transform: capitalize; }
.badge-paid, .badge-active, .badge-accepted, .badge-completed { background: var(--success-soft); color: var(--success); }
.badge-unpaid, .badge-overdue, .badge-rejected, .badge-expired, .badge-cancelled { background: var(--danger-soft); color: var(--danger); }
.badge-partial, .badge-sent, .badge-planned, .badge-pending, .badge-transferring { background: var(--warning-soft); color: var(--warning); }
.badge-draft, .badge-lead, .badge-on_hold, .badge-inactive { background: #eef1f4; color: #5f6b7a; }
.strong-link { color: #075fba; font-weight: 700; }
.strong-link:hover { color: #064c94; text-decoration: underline; text-underline-offset: 2px; }
.data-table td .strong-link { display: inline-flex; align-items: center; gap: 8px; color: #111827; font-weight: 600; text-decoration: none; }
.data-table .tiny-tag { width: 14px; height: 14px; display: inline-block; flex: 0 0 14px; overflow: hidden; color: #6366f1; font-size: 0; }
.data-table .tiny-tag::before { content: ""; width: 14px; height: 14px; display: block; background-color: currentColor; -webkit-mask: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3e%3cpath d='M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8'/%3e%3cpath d='M3 3v5h5'/%3e%3cpath d='M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16'/%3e%3cpath d='M16 16h5v5'/%3e%3c/svg%3e") no-repeat center / contain; mask: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3e%3cpath d='M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8'/%3e%3cpath d='M3 3v5h5'/%3e%3cpath d='M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16'/%3e%3cpath d='M16 16h5v5'/%3e%3c/svg%3e") no-repeat center / contain; }
.data-table tbody tr:has(.tiny-tag) { background-color: #f8fafc; }
.warning, .text-warning { color: var(--warning) !important; }
.danger { color: var(--danger) !important; }
.text-success { color: var(--success) !important; }
.alert, .toast { padding: 12px 42px 12px 14px; border: 1px solid; border-radius: 7px; font-size: 12px; font-weight: 650; }
.alert-success, .toast-success { border-color: #b9e1c6; background: var(--success-soft); color: #126b35; }
.alert-error, .toast-error { border-color: #f2c2c7; background: var(--danger-soft); color: #a92734; }
.toast { position: fixed; z-index: 80; top: 78px; right: 20px; max-width: 380px; box-shadow: 0 14px 36px rgba(16,24,40,.12); transition: opacity .2s ease, transform .2s ease; }
.toast button { position: absolute; right: 8px; top: 4px; border: 0; background: none; font-size: 20px; cursor: pointer; }
.toast.fade, .alert.fade { opacity: 0; transform: translateY(-8px); pointer-events: none; }
.toast-icon { display: none; }

/* Dashboard */
.kpi-rail { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.kpi { min-width: 0; min-height: 108px; padding: 18px 20px; display: flex; align-items: center; gap: 12px; border-right: 1px solid var(--line); background: transparent; }
.kpi:last-child { border-right: 0; }
.kpi > div { min-width: 0; display: flex; flex-direction: column; }
.kpi small { color: var(--muted); font-size: 12px; font-weight: 600; }
.kpi strong { color: #101828; font-size: clamp(21px, 2vw, 29px); font-variant-numeric: tabular-nums; font-weight: 720; letter-spacing: -.035em; white-space: nowrap; }
.kpi-note { margin-top: 3px; color: var(--subtle); font-size: 10px; }
.kpi-icon { flex: 0 0 auto; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 6px; background: var(--success-soft); color: var(--success); }
.kpi-icon.cyan { background: var(--primary-soft); color: var(--primary); }
.kpi-icon.danger { background: var(--danger-soft); color: var(--danger); }
.dashboard-kpis { margin-bottom: 18px; }
.dashboard-grid { min-width: 0; margin-bottom: 18px; display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(300px, .75fr); gap: 18px; }
.chart-panel canvas { width: 100% !important; max-width: 100%; height: 280px; padding: 10px 14px 12px; }
.legend { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.cyan-line, .expense-line { width: 18px; height: 2px; display: block; border-radius: 2px; }
.cyan-line { background: var(--primary); }
.expense-line { margin-left: 7px; background: #7b8794; }
.overdue-list, .renewal-list { padding: 2px 0; }
.overdue-row, .renewal-row, .mobile-record { min-width: 0; min-height: 68px; padding: 12px 16px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line-soft); }
.overdue-row:last-child, .renewal-row:last-child, .mobile-record:last-child { border-bottom: 0; }
.overdue-row:hover, .renewal-row:hover, .mobile-record:hover { background: #fafbfc; }
.row-main { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.row-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-main small, .cell-note { color: var(--muted); font-size: 11px; }
.overdue-value, .renewal-date { flex: 0 0 auto; display: flex; align-items: flex-end; flex-direction: column; text-align: right; font-variant-numeric: tabular-nums; }
.overdue-value small { color: var(--danger); font-size: 10px; }
.overdue-value strong { color: var(--danger); }
.renewal-date small { color: var(--muted); font-size: 10px; }
.row-icon, .timeline-icon { flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 6px; background: #eaf1fb; color: #205ca8; }
.dashboard-table { margin-bottom: 18px; }

/* Tables, filters and records */
.table-panel { margin-bottom: 18px; overflow: hidden; }
.table-scroll { max-width: 100%; overflow: visible; }
.data-table { width: 100%; border-collapse: collapse; table-layout: fixed; white-space: normal; }
.data-table th { height: 40px; padding: 0 20px; border-bottom: 1px solid #dfe4ea; background: #f9fafb; color: #667085; font-size: 10px; font-weight: 750; letter-spacing: .035em; text-align: center; text-transform: uppercase; }
.data-table td { min-width: 0; height: 52px; padding: 8px 20px; border-bottom: 1px solid var(--line-soft); color: #344054; text-align: center; vertical-align: middle; overflow-wrap: anywhere; }
.data-table th:first-child, .data-table td:first-child { padding-left: 20px; text-align: left; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fafbfc; }
.data-table .num, .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .num { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .num { display: flex; align-items: center; gap: 8px; }
.list-row .num .badge { margin-left: 8px; }
.data-table .action-column { width: auto; text-align: center; }
.data-table td:last-child .icon-button { margin: 0 auto; }
.mobile-record-list { display: none; }
.mobile-record-value { flex: 0 0 auto; display: flex; align-items: flex-end; flex-direction: column; gap: 3px; text-align: right; font-variant-numeric: tabular-nums; }
.toolbar, .report-filter { min-width: 0; margin-bottom: 16px; padding: 12px 14px; display: flex; align-items: flex-end; gap: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.toolbar.wrap { flex-wrap: wrap; }
.toolbar.wrap {
  margin-top: 0;
  margin-bottom: 30px;
  padding: 10px 12px;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  border: 1px solid #e4e9ee;
  border-radius: 12px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 5px 18px rgba(16,24,40,.045);
}
.toolbar.wrap > form { margin: 0; display: flex; }
.toolbar.wrap > form:has(.btn-danger) { margin-left: auto; }
.toolbar.wrap .btn {
  min-height: 40px;
  padding-inline: 14px;
  border-width: 1px;
  border-style: solid;
  border-radius: 8px;
  font-size: 14px;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.toolbar.wrap .btn:hover { transform: translateY(-1px); }
.toolbar.wrap .btn-secondary:hover { border-color: #e5e7eb; background: #f3f4f6; }
.toolbar.wrap .btn-primary:hover { border-color: #041f36; background: #041f36; box-shadow: 0 3px 8px rgba(6,43,74,.18); }
.toolbar.wrap .btn-danger:hover { border-color: #fecaca; background: #fee2e2; color: #b91c1c; }
.record-actionbar { position: relative; }
.record-action-cluster { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.record-action-cluster:empty { display: none; }
.record-action-cluster + .record-action-cluster { margin-left: 4px; padding-left: 10px; border-left: 1px solid #e3e8ed; }
.record-action-cluster form { margin: 0; display: flex; }
.record-action-documents { padding: 3px; border: 0; border-radius: 9px; background: #f3f6f8; }
.record-action-documents + .record-action-cluster { border-left: 0; }
.record-action-documents .btn { min-height: 36px; border-color: transparent; background: transparent; color: #526174; }
.record-action-documents .btn:hover { border-color: #e1e7ec; background: #fff; box-shadow: 0 1px 4px rgba(16,24,40,.08); }
.record-action-danger { margin-left: auto !important; padding-left: 14px !important; }
.client-actionbar { width: 100%; min-height: 68px; padding: 10px 12px; position: relative; box-sizing: border-box; align-items: center; border-color: #e4e9ee; background: rgba(255,255,255,.88); box-shadow: 0 5px 18px rgba(16,24,40,.045); }
.client-actionbar:has(.client-more-menu[open]) { z-index: 50; }
.client-action-group { min-width: 0; max-width: 100%; display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.client-action-group form { margin: 0; display: flex; }
.client-action-primary { margin-left: 4px; padding-left: 12px; justify-content: flex-start; border-left: 1px solid #e3e8ed; }
.client-actionbar .btn { min-height: 40px; padding-inline: 14px; white-space: nowrap; }
.client-utilities { padding: 3px; gap: 2px; border-radius: 9px; background: #f3f6f8; }
.client-utility-link { min-width: 0; min-height: 38px; padding: 0 12px; display: inline-flex; align-items: center; gap: 8px; border-radius: 7px; color: #475467; font-size: 12px; font-weight: 700; transition: background-color .18s ease,color .18s ease,box-shadow .18s ease,transform .18s ease; }
.client-utility-link:hover { background: #fff; color: #073b60; box-shadow: 0 1px 4px rgba(16,24,40,.09); transform: translateY(-1px); }
.client-utility-link [data-icon] { width: 16px; height: 16px; }
.client-more-menu { position: relative; }
.client-more-menu > summary { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid #d8e0e7; border-radius: 8px; background: #fff; color: #526174; cursor: pointer; list-style: none; transition: border-color .18s ease,background-color .18s ease,transform .18s ease; }
.client-more-menu > summary::-webkit-details-marker { display: none; }
.client-more-menu > summary:hover, .client-more-menu[open] > summary { border-color: #b9c7d2; background: #f5f8fa; transform: translateY(-1px); }
.client-more-dots, .client-more-dots::before, .client-more-dots::after { width: 4px; height: 4px; display: block; border-radius: 50%; background: currentColor; }
.client-more-dots { position: relative; }
.client-more-dots::before, .client-more-dots::after { content: ""; position: absolute; top: 0; }
.client-more-dots::before { left: -7px; }
.client-more-dots::after { right: -7px; }
.client-more-popover { position: absolute; z-index: 35; top: calc(100% + 8px); right: 0; width: 260px; padding: 8px; border: 1px solid #dce3e9; border-radius: 10px; background: #fff; box-shadow: 0 16px 38px rgba(16,24,40,.16); }
.client-more-popover > strong { padding: 6px 8px 8px; display: block; color: #667085; font-size: 9px; letter-spacing: .05em; text-transform: uppercase; }
.client-more-popover form { display: block; }
.client-menu-danger { width: 100%; padding: 10px; display: flex; align-items: center; gap: 10px; border: 0; border-radius: 8px; background: transparent; color: #b4232f; text-align: left; cursor: pointer; }
.client-menu-danger:hover { background: #fff1f2; }
.client-menu-danger [data-icon] { flex: 0 0 18px; width: 18px; height: 18px; }
.client-menu-danger > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.client-menu-danger b { font-size: 11px; }
.client-menu-danger small { margin-top: 2px; color: #8f4b53; font-size: 9px; line-height: 1.35; }
.search-field, .filter-row { min-width: 0; display: flex; align-items: center; gap: 8px; }
.search-field { flex: 1; max-width: 420px; }
.filter-row.grow { flex: 1; }
.search-field input, .filter-row input, .filter-row select { width: 100%; min-width: 0; height: 39px; padding: 0 11px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); }
.toolbar-note { margin-left: auto; color: var(--muted); font-size: 11px; }
.entity { display: flex; align-items: center; gap: 9px; }
.empty-state { min-height: 170px; padding: 28px; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; color: var(--muted); }
.empty-state.small { min-height: 130px; padding: 22px; }
.empty-state > span { width: 40px; height: 40px; margin-bottom: 9px; display: grid; place-items: center; border-radius: 7px; background: var(--primary-soft); color: var(--primary); }
.empty-state strong { color: #344054; }
.empty-state p { max-width: 380px; margin: 4px 0 13px; }
.compact-empty { min-height: 82px !important; padding: 18px !important; }
.muted { color: var(--muted) !important; }
.label { color: var(--muted); font-size: 10px; font-weight: 740; letter-spacing: .035em; text-transform: uppercase; }
.alert-info { border-color: #b9dce5; background: #eef8fa; color: #075f6d; }

/* Forms */
.form-layout { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; }
.form-main, .form-side { min-width: 0; }
.form-shell { max-width: 940px; }
.form-panel { padding: 22px; }
.form-section { padding: 22px; }
.form-section + .form-section { border-top: 1px solid var(--line); }
.section-heading { margin-bottom: 17px; }
.section-heading.separated { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.section-heading.inline { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.form-grid { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.field > span:first-child { color: #475467; font-size: 11px; font-weight: 700; }
.field small { color: var(--muted); font-size: 10px; }
.field input, .field select, .field textarea, .inline-form input, .new-user-form input, .new-user-form select, .team-row select { width: 100%; min-width: 0; min-height: 41px; padding: 9px 11px; border: 1px solid #d5dbe2; border-radius: 6px; outline: 0; background: #fff; color: #182230; transition: border-color .15s ease, box-shadow .15s ease; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .inline-form input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(10,116,132,.12); }
.field input[type=file] { padding: 7px; }
.field input[type=range] { padding: 0; border: 0; }
.span-2 { grid-column: 1 / -1; }
.check-field, .check-row { display: flex; align-items: center; gap: 10px; }
.check-field > span { display: flex; flex-direction: column; }
.check-field input, .check-row input { accent-color: var(--primary); }
.form-actions { margin-top: 22px; padding-top: 18px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); }
.sticky { position: sticky; top: calc(var(--topbar) + 20px); padding: 20px; }
.sticky h3 { margin: 0 0 6px; font-size: 15px; }
.sticky p { color: var(--muted); font-size: 12px; }
.row-actions { display: flex; justify-content: flex-end; gap: 6px; }
.row-actions form { margin: 0; }
.inline-form { min-width: 0; display: flex; gap: 7px; }
.inline-form input { width: 150px; }
.stack-form { padding: 17px; display: flex; flex-direction: column; gap: 12px; }

/* Detail pages, reports and settings */
.summary-strip { margin-bottom: 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.summary-strip > div { min-width: 0; padding: 17px 19px; display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.summary-strip > div:last-child { border-right: 0; }
.summary-strip small { color: var(--muted); }
.summary-strip strong { font-size: 21px; font-variant-numeric: tabular-nums; }
.detail-grid { min-width: 0; display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; align-items: stretch; gap: 18px; }
.profile-head, .project-summary { padding: 22px; }
.profile-head { display: grid; grid-template-columns: minmax(220px,.7fr) minmax(0,1.3fr); align-items: center; gap: 30px; }
.profile-identity { display: flex; align-items: center; gap: 13px; }
.profile-identity h2 { margin: 0 0 2px; }
.profile-identity p { margin: 0 0 8px; color: var(--muted); }
.contact-list, .list-stack { min-width: 0; }
.contact-list { margin: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px 24px; }
.contact-list > div { min-width: 0; }
.contact-list dt { margin: 0 0 3px; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.contact-list dd { margin: 0; color: #253348; overflow-wrap: anywhere; }
.list-row { min-width: 0; min-height: 58px; padding: 11px 16px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line-soft); }
.list-row:last-child { border-bottom: 0; }
.list-row > span:first-child { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.list-row > span:first-child small { color: var(--muted); font-size: 11px; }
.entity { min-width: 0; }
.entity > span:last-child { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.entity > span:last-child strong, .entity > span:last-child small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entity > span:last-child small, .data-table td > small { display: block; color: var(--muted); font-size: 11px; }
.payment-reversed { opacity: .58; text-decoration: line-through; }
.progress { height: 6px; margin-top: 7px; overflow: hidden; border-radius: 6px; background: #e8edf1; }
.progress span { height: 100%; display: block; border-radius: inherit; background: var(--primary); }
.progress.large { height: 9px; }
.split-panels { min-width: 0; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); align-items: start; gap: 18px; }
.record-notice { margin: 16px; padding: 14px 16px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; border: 1px solid #f2c2c7; border-radius: 7px; background: var(--danger-soft); }
.record-notice strong { color: #9f2631; }
.record-notice p { margin: 3px 0 0; color: #7a3038; font-size: 12px; }
.record-notice dl, .record-notice dl div { margin: 0; }
.record-notice dt { color: #9b5960; font-size: 9px; font-weight: 750; text-transform: uppercase; }
.record-notice dd { margin: 2px 0 0; color: #7a3038; font-size: 12px; white-space: nowrap; }
.cancelled-register { margin-top: 18px; overflow: hidden; }
.record-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
.record-card { min-width: 0; min-height: 72px; padding: 13px 16px; display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--line-soft); }
.record-card:nth-child(odd) { border-right: 1px solid var(--line-soft); }
.record-card:hover { background: #fafbfc; }
.record-card > span:first-child { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.record-card small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.record-card-meta { flex: 0 0 auto; display: flex; align-items: flex-end; flex-direction: column; font-variant-numeric: tabular-nums; }
.report-filter .field { max-width: 180px; }
.export-menu { margin-left: auto; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; color: var(--muted); font-size: 11px; }
.export-menu a { padding: 5px 8px; border-radius: 4px; background: #eef2f4; color: #344054; font-weight: 650; }
.report-grid { min-width: 0; margin-bottom: 18px; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .7fr); gap: 18px; }
.mix-list { padding: 10px 18px; }
.mix-row { padding: 10px 0; }
.mix-row > div:first-child { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
.mix-row span { color: var(--muted); }
.timeline { padding: 7px 18px; }
.timeline-row { min-width: 0; padding: 13px 0; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 11px; border-bottom: 1px solid var(--line-soft); }
.timeline-row:last-child { border-bottom: 0; }
.timeline-row p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.timeline-row time { color: var(--muted); font-size: 11px; }
.settings-grid { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 18px; }
.settings-main { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.settings-section { padding: 22px; }
.logo-preview { height: 70px; display: flex; align-items: center; }
.logo-preview img { max-width: 180px; max-height: 58px; }
.team-row { min-width: 0; min-height: 62px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.team-row-controls { flex: 0 0 auto; display: grid; grid-template-columns: 150px 98px auto; align-items: center; gap: 10px; }
.team-row-controls select { width: 100%; min-width: 0; min-height: 41px; padding: 9px 34px 9px 11px; overflow: hidden; border: 1px solid #d5dbe2; border-radius: 6px; background: #fff; color: #182230; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.team-status-control { min-height: 41px; padding: 0 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid var(--line); border-radius: 6px; background: #f9fafb; color: #475467; font-size: 10px; font-weight: 720; }
.team-owner-row { background: #f8fbfd; }
.team-owner-lock { margin-left: auto; white-space: nowrap; }
.switch { width: 44px; height: 24px; position: relative; display: inline-flex; align-items: center; flex: 0 0 44px; cursor: pointer; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.switch span { width: 44px; height: 24px; padding: 3px; display: block; border-radius: 999px; background: #cbd3da; box-shadow: inset 0 0 0 1px rgba(16,24,40,.05); transition: background .15s ease; }
.switch span::after { content: ""; width: 18px; height: 18px; display: block; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(16,24,40,.24); transition: transform .15s ease; }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid rgba(10,116,132,.22); outline-offset: 2px; }
.new-user-form { min-width: 0; }
.new-user-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.new-user-active { grid-column: 1 / -1; }
.access-toggle-card { min-height: 58px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid var(--line); border-radius: 7px; background: #f9fafb; }
.access-toggle-card > span { min-width: 0; display: flex; flex-direction: column; }
.access-toggle-card strong { color: #253348; font-size: 12px; }
.access-toggle-card small { margin-top: 2px; color: var(--muted); font-size: 10px; line-height: 1.4; }

/* Administration settings shell */
.settings-shell { min-width: 0; }
.settings-header { margin-bottom: 22px; }
.settings-header h1 { margin: 0 0 4px; color: #101828; font-size: clamp(27px, 2.3vw, 36px); font-weight: 720; line-height: 1.16; letter-spacing: -.035em; }
.settings-header p { margin: 0; color: var(--muted); font-size: 13px; }

.settings-layout { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.settings-nav { position: sticky; z-index: 24; top: 16px; align-self: stretch; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.98); box-shadow: 0 4px 14px rgba(16,24,40,.05); backdrop-filter: blur(12px); }
.settings-nav-label { display: none; }
.settings-nav-picker { display: none; }
.settings-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: stretch; }
.settings-nav li { position: relative; min-width: 0; flex: 1 1 0; }
.settings-nav li + li::before { content: ""; position: absolute; z-index: 1; top: 13px; bottom: 13px; left: 0; width: 1px; background: var(--line-soft); }
.settings-nav a { position: relative; min-height: 50px; padding: 0 10px; display: flex; align-items: center; justify-content: center; gap: 8px; color: #536071; font-size: 12px; font-weight: 680; white-space: nowrap; transition: background .15s ease, color .15s ease; }
.settings-nav a::after { content: ""; position: absolute; right: 18px; bottom: 0; left: 18px; height: 2px; border-radius: 2px 2px 0 0; background: transparent; transform: scaleX(.4); transition: background .15s ease, transform .15s ease; }
.settings-nav a:hover { background: #f8fafb; color: #0b2d50; }
.settings-nav a.active { background: #f8fafb; color: var(--primary); }
.settings-nav a.active::after { background: var(--primary); transform: scaleX(1); }
.settings-nav [data-icon] { width: 19px; height: 19px; display: grid; place-items: center; flex: 0 0 19px; color: #738092; }
.settings-nav [data-icon] svg { width: 18px; height: 18px; stroke-width: 1.8; }
.settings-nav a.active [data-icon] { color: var(--primary); }

.settings-content { min-width: 0; }
.settings-section-panel { min-width: 0; }
.settings-section-panel + .settings-section-panel { margin-top: 18px; }
.security-settings-stack { display: grid; gap: 18px; }
.security-password-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.settings-activity-panel { min-width: 0; overflow: hidden; }
.settings-activity-head { align-items: center; }
.settings-activity-head .btn { flex: 0 0 auto; }
.settings-activity-list { max-height: 520px; overflow-y: auto; scrollbar-gutter: stable; }
.settings-activity-list .timeline-row strong { color: #253348; font-size: 12px; }

.color-picker-row { display: flex; align-items: center; gap: 10px; }
.color-picker-row input[type="color"] { width: 48px; height: 40px; border: 1px solid var(--line); border-radius: 6px; padding: 2px; background: none; cursor: pointer; }
.color-picker-row input[type="text"] { flex: 1; min-width: 0; height: 40px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: #182230; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.presets-section { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.presets-section h3 { margin: 0 0 10px; font-size: 13px; font-weight: 700; color: #344054; }
.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.category-admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.category-admin-column { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fbfcfd; }
.category-admin-column h3 { margin: 0 0 12px; color: var(--navy); font-size: 14px; }
.category-admin-column .inline-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.category-chip-list { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.category-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 5px 6px 5px 10px; border: 1px solid #d8e1e7; border-radius: 999px; background: #fff; color: #334155; font-size: 12px; font-weight: 650; }
.category-chip form { margin: 0; }
.category-chip button { width: 22px; height: 22px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: #7a8795; cursor: pointer; font-size: 16px; line-height: 1; }
.category-chip button:hover { background: #feecec; color: #b42318; }
.preset-swatch { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 2px solid var(--line); border-radius: 7px; background: #fff; color: #344054; font-size: 12px; font-weight: 600; cursor: pointer; transition: border-color .15s ease, background .15s ease; text-align: left; }
.preset-swatch:hover { border-color: var(--primary); }
.preset-swatch.active { border-color: var(--primary); background: var(--primary-soft); }
.preset-swatch .swatch { flex: 0 0 28px; height: 28px; border-radius: 5px; border: 1px solid rgba(0,0,0,.06); }
.preset-swatch .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.live-preview { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.live-preview h3 { margin: 0 0 10px; font-size: 13px; font-weight: 700; color: #344054; }
.preview-tokens { display: flex; flex-wrap: wrap; gap: 10px; }
.token-row { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; }
.token { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 6px; background: #fff; border: 1px solid var(--line); font-size: 12px; color: #344054; }
.token .swatch { width: 20px; height: 20px; border-radius: 4px; border: 1px solid rgba(0,0,0,.08); }

/* Live preview CSS variables */
:root {
  --primary-preview: #062b4a;
  --primary-soft-preview: #e8f2f6;
}
[data-theme="light"] { --primary: var(--primary-preview, #062b4a); --primary-soft: var(--primary-soft-preview, #e8f2f6); }
[data-theme="dark"] { --primary: var(--primary-preview, #062b4a); --primary-soft: var(--primary-soft-preview, #e8f2f6); }

/* Document editor and document detail */
.document-workspace { min-width: 0; margin: -94px -34px -48px; }
.document-toolbar { position: sticky; z-index: 20; top: 0; min-width: 0; height: 62px; padding: 0 20px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); background: #fff; }
.document-number { margin-right: auto; font-size: 14px; font-weight: 720; }
.save-state { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; }
.save-state > span { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.document-split { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, 1.03fr); }
.document-editor { min-width: 0; border-right: 1px solid var(--line); background: #fff; }
.editor-section { min-width: 0; padding: 26px 24px; border-bottom: 1px solid var(--line); }
.editor-section .section-heading { margin-bottom: 20px; }
.editor-section .section-heading.inline { margin-bottom: 16px; }
.document-editor .form-grid { column-gap: 18px; row-gap: 17px; }
.document-editor .field { gap: 8px; }
.document-client-control { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.document-client-control select { min-width: 0; }
.document-client-control .btn { min-height: 42px; padding-right: 12px; padding-left: 12px; }
.document-client-add { width: 42px; padding: 0 !important; }
.document-client-add > span:last-child { display: none; }
.website-billing-guide { margin: 20px 24px 0; padding: 16px; border: 1px solid #cce7ea; border-radius: var(--radius); background: #f0f9fa; }
.website-billing-guide > div:first-child { margin-bottom: 12px; display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.website-billing-guide strong { color: #0b4050; font-size: 13px; }
.website-billing-guide > div:first-child span { color: #52717a; font-size: 11px; }
.billing-quick-items { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.billing-quick-items button { min-width: 0; min-height: 42px; padding: 0 12px; display: flex; align-items: center; gap: 9px; border: 0; border-right: 1px solid #cce7ea; background: transparent; color: #16475a; font-size: 11px; font-weight: 700; text-align: left; cursor: pointer; }
.billing-quick-items button:last-child { border-right: 0; }
.billing-quick-items button:hover { background: #e3f4f5; }
.billing-quick-items svg { flex: 0 0 auto; color: var(--primary); }
.items-editor { min-width: 0; display: grid; gap: 10px; overflow: visible; }
.item-head { display: none; }
.item-row { min-width: 0; position: relative; padding: 62px 14px 15px; border: 1px solid #e1e6ec; border-radius: 10px; display: grid; grid-template-columns: repeat(4, minmax(72px, 1fr)) minmax(98px, 1.1fr); gap: 10px; align-items: end; background: #fff; transition: border-color .16s ease, box-shadow .16s ease, opacity .16s ease; }
.item-row:focus-within { border-color: #b9dce2; box-shadow: 0 0 0 3px rgba(14,116,144,.08); }
.item-row.is-dragging { opacity: .52; border-color: #8bc8d3; box-shadow: 0 8px 24px rgba(14,52,68,.12); }
.item-row.is-drop-target { border-color: var(--primary); box-shadow: inset 0 3px 0 var(--primary); }
.item-drag-handle { position: absolute; top: 14px; left: 10px; width: 30px; height: 38px; padding: 0; display: grid; place-items: center; border: 1px solid transparent; border-radius: 7px; background: #f5f7f9; color: #8391a2; cursor: grab; touch-action: none; }
.item-drag-handle:hover, .item-drag-handle:focus-visible { border-color: #cbd5df; background: #eef3f5; color: #38566a; outline: 0; }
.item-drag-handle:active { cursor: grabbing; }
.item-grip { width: 20px; height: 20px; display: block; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v18M8 7l4-4 4 4M8 17l4 4 4-4'/%3E%3C/svg%3E") center / 20px 20px no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v18M8 7l4-4 4 4M8 17l4 4 4-4'/%3E%3C/svg%3E") center / 20px 20px no-repeat; }
.item-row input, .item-row select { width: 100%; min-width: 0; height: 40px; padding: 7px 10px; border: 1px solid #d9dfe5; border-radius: 7px; background: #fff; color: #172033; font-size: 13px; }
.item-description { min-width: 0; grid-column: 1 / -1; display: grid; grid-template-columns: minmax(220px, .9fr) minmax(260px, 1.35fr); align-items: end; gap: 12px; }
.item-mode-toggle { position: absolute; z-index: 2; top: 14px; left: 50px; width: fit-content; padding: 4px; display: inline-grid; grid-template-columns: repeat(2, auto); gap: 7px; border: 1px solid #dbe2ea; border-radius: 9px; background: #f3f6f9; }
.item-mode-toggle button { min-height: 32px; padding: 0 14px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #526174; font-size: 12px; font-weight: 680; cursor: pointer; transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease; }
.item-mode-toggle button:hover { border-color: #c7dfe5; background: #e8f5f8; color: #075f73; }
.item-mode-toggle button.active { border-color: #9fcfd9; background: #fff; color: #063b60; box-shadow: 0 2px 5px rgba(16,24,40,.1); }
.item-description-field { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.item-description-field[hidden] { display: none; }
.item-control-label { color: #475467; font-size: 11px; font-weight: 680; }
.item-control-label-row { min-height: 17px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.edit-custom-item { padding: 0; border: 0; background: transparent; color: #08788f; font-size: 10px; font-weight: 720; cursor: pointer; }
.edit-custom-item:hover { color: #055f72; text-decoration: underline; }
.item-description-field > input { height: 48px; font-size: 13px; }
.service-native-select { position: absolute; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0 !important; }
.service-picker { min-width: 0; position: relative; }
.item-row:has(.service-picker.is-open) { z-index: 80; }
.item-description:has(.service-picker.is-open) { position: relative; z-index: 90; }
.service-picker.is-open { z-index: 100; }
.service-picker-trigger { width: 100%; min-height: 48px; padding: 7px 38px 7px 11px; position: relative; display: flex; align-items: center; border: 1px solid #d5dce5; border-radius: 7px; background: #fff; color: #172033; text-align: left; cursor: pointer; }
.service-picker-trigger:hover { border-color: #aab8c4; background: #fbfcfd; }
.service-picker-trigger:focus-visible { border-color: #078daf; outline: 0; box-shadow: 0 0 0 3px rgba(5,170,218,.13); }
.service-picker-trigger > span { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.service-picker-trigger strong, .service-picker-trigger small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.service-picker-trigger strong { font-size: 13px; font-weight: 680; }
.service-picker-trigger small { color: #718096; font-size: 10px; }
.service-picker-trigger i { position: absolute; right: 13px; width: 7px; height: 7px; border-right: 1.5px solid #667085; border-bottom: 1.5px solid #667085; transform: rotate(45deg); transition: transform .16s ease; }
.service-picker.is-open .service-picker-trigger i { transform: rotate(225deg); }
.service-picker-menu { position: absolute; z-index: 110; top: calc(100% + 6px); left: 0; width: min(560px, calc(100vw - 320px)); padding: 12px; display: none; border: 1px solid #d6dee7; border-radius: 12px; background: #fff; box-shadow: 0 18px 42px rgba(16,24,40,.16); }
.service-picker.is-open .service-picker-menu { display: block; }
.service-picker-head { min-height: 32px; margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.service-picker-head strong { color: #172033; font-size: 14px; font-weight: 750; }
.service-picker-close { flex: 0 0 auto; width: 30px; height: 30px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: #667085; cursor: pointer; }
.service-picker-close:hover { background: #f0f3f6; color: #172033; }
.service-picker-close svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.service-picker-search { height: 40px !important; margin-bottom: 9px; padding-left: 34px !important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m16.5 16.5 4 4'/%3E%3C/svg%3E"); background-position: 10px center; background-repeat: no-repeat; background-size: 16px; }
.service-picker-categories { margin-bottom: 9px; display: flex; gap: 6px; overflow-x: auto; overscroll-behavior-x: contain; }
.service-category-field { margin-bottom: 10px; position: relative; }
.service-category-trigger { width: 100%; min-height: 40px; margin-top: 5px; padding: 7px 38px 7px 11px; position: relative; display: flex; align-items: center; border: 1px solid #d5dce5; border-radius: 7px; background: #fff; color: #172033; font-size: 12px; font-weight: 650; text-align: left; cursor: pointer; transition: border-color .16s ease,box-shadow .16s ease,background-color .16s ease; }
.service-category-trigger:hover { border-color: #aebbc6; background: #fbfcfd; }
.service-category-trigger:focus-visible, .service-category-trigger[aria-expanded="true"] { border-color: #078daf; outline: 0; box-shadow: 0 0 0 3px rgba(5,170,218,.12); }
.service-category-trigger i { position: absolute; right: 14px; width: 7px; height: 7px; border-right: 1.5px solid #667085; border-bottom: 1.5px solid #667085; transform: rotate(45deg); transition: transform .18s ease; }
.service-category-trigger[aria-expanded="true"] i { transform: rotate(225deg); }
.service-category-popover { position: absolute; z-index: 130; top: calc(100% + 6px); right: 0; left: 0; max-height: 220px; padding: 6px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px; overflow-y: auto; border: 1px solid #d7e0e7; border-radius: 9px; background: #fff; box-shadow: 0 14px 32px rgba(16,24,40,.16); }
.service-category-popover[hidden] { display: none; }
.service-category-choice { min-width: 0; min-height: 36px; padding: 7px 9px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 0; border-radius: 6px; background: transparent; color: #475467; font-size: 10px; font-weight: 650; text-align: left; cursor: pointer; }
.service-category-choice:hover { background: #f1f8fa; color: #086b80; }
.service-category-choice[aria-selected="true"] { background: #e7f5f8; color: #066f87; }
.service-category-choice[aria-selected="true"] i { width: 8px; height: 4px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); }
.service-category-chip { flex: 0 0 auto; min-height: 30px; padding: 0 11px; border: 1px solid #dce3e9; border-radius: 999px; background: #f8fafb; color: #526174; font-size: 10px; font-weight: 680; white-space: nowrap; cursor: pointer; }
.service-category-chip:hover { border-color: #b9dce3; background: #eef8fa; color: #075f73; }
.service-category-chip.is-active { border-color: #087f99; background: #087f99; color: #fff; }
.service-picker-options { max-height: 280px; display: grid; grid-template-columns: minmax(0,1fr); gap: 3px; overflow-y: auto; overscroll-behavior: contain; }
.service-picker-option { width: 100%; min-height: 54px; padding: 8px 12px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #172033; text-align: left; cursor: pointer; }
.service-picker-option:hover { border-color: #d8e7eb; background: #f5fafb; }
.service-picker-option[aria-selected="true"] { border-color: #b9dce3; background: #eaf7fa; box-shadow: inset 3px 0 0 #0789a8; }
.service-picker-option:disabled { opacity: .42; cursor: not-allowed; }
.service-picker-option > span { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.service-picker-option strong { overflow: hidden; font-size: 12px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.service-picker-option small { color: #718096; font-size: 10px; }
.service-picker-option b { flex: 0 0 auto; color: #344054; font-size: 11px; font-variant-numeric: tabular-nums; }
.item-field, .item-amount { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.item-field small, .item-amount small { color: #475467; font-size: 11px; font-weight: 680; letter-spacing: 0; text-transform: none; }
.item-amount { align-items: flex-end; }
.compact-number { min-width: 0; position: relative; }
.compact-number span { position: absolute; right: 9px; bottom: 10px; color: var(--muted); }
.compact-number input { padding-right: 24px; }
.line-amount { min-height: 40px; padding: 7px 10px; display: flex; align-items: center; justify-content: flex-end; border: 1px solid #d9dfe5; border-radius: 7px; background: #f5f7f9; color: #111827; text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }
.item-row [data-remove-item] { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-color: #f2d4d7; border-radius: 7px; background: #fff8f8; color: #c83c49; }
.item-row [data-remove-item]:hover { border-color: #f2c7cc; background: var(--danger-soft); color: var(--danger); }
.item-row [data-remove-item] svg { width: 17px; height: 17px; }
.remove-label { display: none; }
.document-bottom { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 14px; }
.document-notes { display: contents; }
.document-notes textarea { min-height: 104px; resize: vertical; }
.document-bottom .editor-totals { grid-column: 1 / -1; }
.editor-totals { padding: 16px; border: 1px solid #dfe5eb; border-radius: 10px; background: #fbfcfd; }
.editor-totals h3 { margin: 0 0 8px; color: #172033; font-size: 13px; font-weight: 720; }
.editor-totals dl { margin: 0; }
.editor-totals dl > div { min-height: 34px; padding: 6px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); }
.editor-totals dd { margin: 0; color: #1d2939; font-weight: 700; }
.editor-totals .grand { margin-top: 5px; padding-top: 12px; border-top: 1px solid #cfd7e1; color: #101828; font-size: 17px; }
.editor-totals .deposit-summary { min-height: 54px; margin: 10px -8px -8px; padding: 8px; border-radius: 8px; background: #eaf5f8; color: #173b4a; }
.deposit-summary dt { min-width: 0; display: flex; align-items: center; gap: 8px; }
.deposit-summary label { font-size: 11px; font-weight: 680; }
.deposit-control { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; }
.deposit-control input { width: 58px; height: 32px; padding: 5px 7px; border: 1px solid #bdd2da; border-radius: 6px; background: #fff; color: #172033; text-align: right; }
.deposit-control b { font-size: 11px; }
.editor-totals .deposit-summary dd { color: #0f3850; }
.document-preview-pane { min-width: 0; padding: 18px 20px 30px; background: #eef1f4; }
.preview-toolbar { min-height: 36px; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; }
.preview-toolbar strong { color: #344054; }
.invoice-paper { width: 100%; max-width: 794px; aspect-ratio: 210 / 297; margin: 0 auto; padding: clamp(24px, 3.2vw, 40px); overflow: hidden; background: #fff; border: 1px solid #d5dbe2; box-shadow: 0 4px 14px rgba(16,24,40,.07); color: #17212c; }
.invoice-paper-head { padding-bottom: 22px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; border-bottom: 2px solid #17212c; }
.invoice-brand { display: flex; align-items: center; gap: 9px; }
.invoice-brand img { width: 34px; height: 34px; object-fit: contain; }
.invoice-brand strong { font-size: 15px; }
.invoice-title { display: flex; align-items: flex-end; flex-direction: column; text-align: right; }
.invoice-title strong { font-size: clamp(22px, 2.4vw, 32px); line-height: 1; }
.invoice-title span { margin-top: 6px; color: var(--muted); font-size: 10px; font-weight: 700; }
.invoice-parties { padding: 24px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.invoice-parties > div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.invoice-parties > div:last-child { grid-column: 1 / -1; padding-top: 14px; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .75fr) minmax(0, .75fr); column-gap: 18px; border-top: 1px solid var(--line); }
.invoice-parties > div:last-child small, .invoice-parties > div:last-child strong { grid-column: 1; }
.invoice-parties > div:last-child span:first-of-type { grid-column: 2; grid-row: 1 / span 2; }
.invoice-parties > div:last-child span:last-of-type { grid-column: 3; grid-row: 1 / span 2; }
.invoice-parties small { color: var(--muted); font-size: 8px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.invoice-parties span { color: #52606d; font-size: 9px; }
.preview-items { width: 100%; border-collapse: collapse; font-size: 11px; }
.preview-items th, .preview-items td { padding: 8px 5px; border-bottom: 1px solid var(--line); text-align: left; }
.preview-items th:nth-child(n+3), .preview-items td:nth-child(n+3) { text-align: right; font-variant-numeric: tabular-nums; }
.preview-summary { width: min(260px, 100%); margin: 20px 0 0 auto; }
.preview-summary dl { margin: 0; }
.preview-summary dl > div { padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; font-size: 10px; }
.preview-summary dd { margin: 0; font-variant-numeric: tabular-nums; }
.preview-summary .preview-balance { margin-top: 7px; padding-top: 10px; border-top: 1px solid var(--ink); font-size: 15px; font-weight: 750; }
.preview-summary .preview-deposit { margin-top: 8px; padding: 7px 8px; background: #eaf5f8; font-weight: 700; }
.preview-footer { margin-top: 28px; padding-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.preview-footer p { margin: 4px 0 0; line-height: 1.45; }
.invoice-paper > footer { margin-top: 28px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 8px; text-align: center; }
.quick-client-dialog { width: min(560px, calc(100% - 32px)); max-height: calc(100svh - 32px); padding: 0; overflow: auto; border: 0; border-radius: 10px; background: #fff; box-shadow: 0 24px 70px rgba(3,20,34,.24); color: var(--ink); }
.quick-client-dialog::backdrop { background: rgba(4,17,29,.58); }
.quick-client-form { padding: 24px; }
.quick-client-head { margin-bottom: 22px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.quick-client-head h2 { margin: 0 0 5px; font-size: 22px; }
.quick-client-head p { margin: 0; color: var(--muted); font-size: 12px; }
.quick-client-close { flex: 0 0 auto; width: 38px; height: 38px; padding: 0; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #526273; cursor: pointer; }
.quick-client-close:hover { border-color: #b8c2cc; background: #f7f9fa; color: var(--ink); }
.quick-client-feedback { min-height: 18px; margin-top: 10px; color: var(--danger); font-size: 12px; }
.quick-client-actions { margin-top: 16px; padding-top: 18px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line-soft); }
.custom-item-dialog { box-sizing: border-box; width: min(720px, calc(100vw - 24px)); max-width: calc(100vw - 24px); }
.custom-item-form { width: 100%; min-width: 0; padding: 24px; overflow-x: hidden; }
.custom-item-head { margin-bottom: 16px; }
.custom-item-help { margin-bottom: 20px; padding: 15px; border: 1px solid #cce4e8; border-radius: 9px; background: #f5fbfc; }
.custom-item-help h3 { margin: 0 0 11px; color: #173e4d; font-size: 12px; }
.custom-item-help-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.custom-item-help-options > div { min-width: 0; padding: 10px; border: 1px solid #dce8eb; border-radius: 7px; background: #fff; }
.custom-item-help-options > div.is-current { border-color: #9dcfd7; background: #edf8fa; }
.custom-item-help-options strong, .custom-item-help-options span { display: block; }
.custom-item-help-options strong { margin-bottom: 3px; color: #172033; font-size: 10px; }
.custom-item-help-options span { color: #607080; font-size: 9px; line-height: 1.45; }
.custom-item-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.custom-item-fields textarea { min-height: 78px; resize: vertical; }
.custom-item-number { position: relative; }
.custom-item-number input { width: 100%; padding-right: 30px; }
.custom-item-number > span { position: absolute; top: 50%; right: 11px; color: var(--muted); font-size: 11px; transform: translateY(-50%); }
.custom-item-total { min-height: 48px; margin-top: 16px; padding: 11px 13px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid #dce3e9; border-radius: 8px; background: #f8fafb; }
.custom-item-total span { color: #526174; font-size: 11px; font-weight: 680; }
.custom-item-total strong { color: #102f43; font-size: 16px; font-variant-numeric: tabular-nums; }
.custom-item-feedback { min-height: 18px; margin-top: 8px; color: var(--danger); font-size: 11px; }
.custom-item-actions { margin-top: 4px; }
.document-detail-grid { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; }
.document-detail-grid > .panel { min-width: 0; overflow: hidden; }
.detail-side { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.detail-side > .panel > h3, .detail-side > .panel > p, .detail-side > .panel > .copy-field { margin-left: 17px; margin-right: 17px; }
.detail-document-head { min-width: 0; padding: 23px; display: grid; grid-template-columns: minmax(180px, 1.15fr) repeat(2, minmax(150px, 1fr)); align-items: start; gap: 24px; }
.detail-document-head > div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.detail-document-head > div:first-child { align-items: flex-start; }
.detail-document-head h2 { margin: 2px 0 9px; font-size: 24px; }
.detail-document-head small { margin-bottom: 4px; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.detail-total { width: min(300px, calc(100% - 36px)); margin: 18px 18px 22px auto; }
.detail-total dl { margin: 0; }
.detail-total dl > div { padding: 6px 0; display: flex; justify-content: space-between; gap: 12px; }
.detail-total dd { margin: 0; font-weight: 650; }
.detail-total .grand { margin-top: 7px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 17px; }
.paid-state { padding: 25px; display: flex; align-items: center; flex-direction: column; color: var(--success); }
.deposit-callout { margin: 0 18px 18px; padding: 12px; border: 1px solid #badfe3; border-radius: 6px; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--primary-soft); }
.copy-field { margin-bottom: 18px; display: flex; }
.copy-field input { min-width: 0; flex: 1; padding: 8px; border: 1px solid var(--line); border-radius: 6px 0 0 6px; color: var(--muted); }
.copy-field button { padding: 0 10px; border: 0; border-radius: 0 6px 6px 0; background: var(--primary); color: #fff; font-weight: 700; }

/* Authentication */
.auth-body { width: 100%; min-width: 0; min-height: 100vh; min-height: 100svh; overflow-x: hidden; background: #fff; }
.auth-shell { width: 100%; min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: minmax(380px, 42%) minmax(440px, 58%); background: #fff; }
.auth-story { position: relative; min-width: 0; min-height: 100vh; min-height: 100svh; padding: clamp(38px, 5.2vh, 58px) clamp(42px, 5.5vw, 88px); display: flex; justify-content: space-between; flex-direction: column; overflow: hidden; background: #062b4a; color: #fff; }
.auth-logo, .auth-form-brand { display: inline-flex; align-items: center; gap: 13px; }
.auth-logo { width: fit-content; color: #fff; }
.auth-logo img { width: 52px; height: 52px; object-fit: contain; filter: brightness(0) invert(1); }
.auth-brand-wordmark { display: grid; gap: 0; color: inherit; font-style: normal; font-weight: 800; letter-spacing: .14em; line-height: .98; text-transform: uppercase; }
.auth-brand-wordmark strong, .auth-brand-wordmark small { font: inherit; }
.auth-brand-wordmark small { letter-spacing: .35em; }
.auth-story-copy { width: min(520px, 100%); margin: auto 0; padding: clamp(42px, 8vh, 92px) 0; }
.auth-story h1 { max-width: 520px; margin: 0 0 24px; font-size: clamp(42px, 4.15vw, 62px); font-weight: 650; line-height: 1.08; letter-spacing: -.042em; text-wrap: balance; }
.auth-story p { max-width: 470px; margin: 0; color: #c2d0dc; font-size: clamp(15px, 1.15vw, 18px); line-height: 1.65; }
.auth-ledger-grid { width: min(470px, 100%); margin-top: clamp(40px, 6vh, 68px); display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid rgba(132,196,219,.2); border-left: 1px solid rgba(132,196,219,.2); }
.auth-ledger-grid > span { position: relative; min-height: clamp(58px, 7vh, 76px); display: grid; place-items: center; border-right: 1px solid rgba(132,196,219,.2); border-bottom: 1px solid rgba(132,196,219,.2); color: rgba(109,199,218,.55); font-size: 26px; }
.auth-grid-document::before { content: ""; width: 22px; height: 29px; border: 1px solid currentColor; }
.auth-grid-document::after { content: ""; position: absolute; width: 10px; height: 1px; background: currentColor; box-shadow: 0 5px 0 currentColor, 0 10px 0 currentColor; }
.auth-grid-bars { padding: 16px; display: flex !important; align-items: flex-end; gap: 5px; }
.auth-grid-bars i { width: 7px; border: 1px solid currentColor; }
.auth-grid-bars i:nth-child(1) { height: 12px; }.auth-grid-bars i:nth-child(2) { height: 22px; }.auth-grid-bars i:nth-child(3) { height: 34px; }
.auth-grid-check { font-size: 22px !important; }
.auth-story-foot { display: flex; align-items: center; gap: 9px; color: #a6b8c7; font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.auth-status-dot { width: 7px; height: 7px; border-radius: 50%; background: #65c5d1; box-shadow: 0 0 0 4px rgba(101,197,209,.12); }
.auth-panel { min-width: 0; min-height: 100vh; min-height: 100svh; padding: clamp(40px, 6vh, 72px) clamp(36px, 8vw, 128px); display: grid; place-items: center; background: #fff; }
.auth-card { width: min(430px, 100%); }
.auth-form-brand { margin-bottom: clamp(48px, 7vh, 72px); color: #0b2d50; font-size: 17px; }
.auth-form-brand img { width: 52px; height: 52px; object-fit: contain; }
.auth-copy { margin-bottom: 30px; }
.auth-copy h2 { margin: 0 0 10px; color: #0b2d50; font-size: clamp(36px, 3vw, 42px); font-weight: 720; line-height: 1.08; letter-spacing: -.04em; }
.auth-copy p { max-width: 410px; margin: 0; color: #667587; font-size: 14px; line-height: 1.55; }
.auth-form { display: flex; flex-direction: column; gap: 20px; }
.auth-field { gap: 9px; }
.auth-field > label { color: #25364b; font-size: 12px; font-weight: 720; }
.auth-field input { height: 54px; padding: 0 16px; border-color: #c8d2dc; border-radius: 8px; background: #fff; font-size: 14px; }
.auth-field input::placeholder { color: #8b98a7; opacity: 1; }
.auth-field input:hover { border-color: #9baaba; }
.auth-field input:focus { border-color: #0a7484; box-shadow: 0 0 0 3px rgba(10,116,132,.13); }
.password-control { position: relative; display: block; }
.password-control input { width: 100%; padding-right: 58px; }
.password-control button { position: absolute; top: 7px; right: 7px; width: 40px; height: 40px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: #647386; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.password-control button:hover { background: #f1f5f7; color: #0b2d50; }
.password-control button:focus-visible { outline: 3px solid rgba(10,116,132,.24); outline-offset: 1px; }
.password-eye { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.password-eye-closed { display: none; }
.password-control button.is-revealed .password-eye-open { display: none; }
.password-control button.is-revealed .password-eye-closed { display: block; }
.auth-submit { height: 54px; margin-top: 3px; padding: 0 18px; display: flex; justify-content: center; border-radius: 8px; background: #062b4a; font-size: 14px; }
.auth-submit:hover { background: #0a3d66; }
.auth-help { margin: 22px auto 0; display: flex; align-items: flex-start; justify-content: center; gap: 8px; color: #768394; font-size: 11px; line-height: 1.5; text-align: center; }
.auth-help svg { width: 16px; min-width: 16px; height: 16px; fill: none; stroke: #0a7484; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.auth-body .toast { position: relative; inset: auto; max-width: none; margin: 0 0 17px; box-shadow: none; }

.error-page { min-height: 64vh; display: grid; place-items: center; text-align: center; }

/* Mobile navigation */
.mobile-nav { display: none; }

@media (max-width: 1180px) {
  .content { padding-right: 24px; padding-left: 24px; }
  .dashboard-grid, .report-grid { grid-template-columns: 1fr; }
  .document-split { grid-template-columns: 1fr; }
  .document-editor { border-right: 0; }
  .document-preview-pane { border-top: 1px solid var(--line); }
  .settings-nav { padding: 9px; }
  .settings-nav ul { display: none; }
  .settings-nav-picker { min-width: 0; display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 10px; }
  .settings-nav-picker-icon { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #c9e8ee; border-radius: 7px; background: #eef9fb; color: var(--primary); }
  .settings-nav-picker-icon svg { width: 19px; height: 19px; stroke-width: 1.8; }
  .settings-nav-picker label { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; }
  .settings-nav-picker label > span { color: #667085; font-size: 10px; font-weight: 750; letter-spacing: .035em; text-transform: uppercase; }
  .settings-nav-picker select { width: 100%; min-width: 0; height: 40px; border: 1px solid #d5dbe2; border-radius: 6px; color: #172033; font-size: 13px; font-weight: 680; }
}

@media (max-height: 800px) and (min-width: 941px) {
  .brand { flex-basis: 62px; padding-right: 16px; padding-left: 16px; }
  .sidebar .binary-brand-logo { width: 36px; height: 36px; }
  .nav-list { padding-top: 10px; padding-bottom: 10px; }
  .nav-section + .nav-section { margin-top: 8px; }
  .nav-section h2 { margin-bottom: 3px; font-size: 8px; }
  .nav-link { min-height: 32px; }
  .sidebar-user { min-height: 62px; padding-top: 9px; padding-bottom: 9px; }
}

@media (max-width: 1100px) {
  .topbar-tools .global-search { display: none; }
}

@media (max-width: 940px) {
  :root { --sidebar: min(320px, 86vw); }
  .app-shell::before { display: none; }
  .sidebar { z-index: 60; transform: translateX(-102%); box-shadow: 18px 0 42px rgba(3,20,34,.2); transition: transform .22s ease; }
  .brand { flex-basis: 64px; padding-right: 14px; padding-left: 16px; }
  .sidebar .binary-brand-logo { width: 36px; height: 36px; }
  .nav-list { padding-top: 12px; padding-bottom: 12px; }
  .nav-section + .nav-section { margin-top: 10px; }
  .nav-section h2 { margin-bottom: 4px; font-size: 8px; }
  .nav-link { min-height: 34px; }
  .sidebar-user { min-height: 70px; }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open { overflow: hidden; }
  .sidebar-close { display: grid; }
  .sidebar-backdrop { position: fixed; z-index: 55; inset: 0; display: block; visibility: hidden; background: rgba(4,17,29,.55); opacity: 0; transition: opacity .18s ease, visibility .18s ease; }
  body.nav-open .sidebar-backdrop { visibility: visible; opacity: 1; }
  .app-main { margin-left: 0; }
  .topbar { height: var(--topbar); padding: 0 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.98); }
  .icon-button.menu-button { width: 40px; height: 40px; display: grid; place-items: center; }
  .icon-button.menu-button > [data-icon] { width: 22px; height: 22px; display: grid; place-items: center; }
  .icon-button.menu-button svg { width: 100%; height: 100%; display: block; }
  .mobile-brand { display: flex; }
  .mobile-brand { align-items: center; gap: 8px; }
  .content { padding: 26px 20px 44px; }
  .form-layout, .detail-grid, .split-panels, .settings-grid, .document-detail-grid { grid-template-columns: 1fr; }
  .category-admin-grid { grid-template-columns: 1fr; }
  .form-side { order: -1; }
  .sticky { position: static; }
  .settings-side { order: -1; }
  .settings-nav { top: calc(var(--topbar) + 10px); margin: 0; padding: 9px; border-width: 1px; border-radius: var(--radius); box-shadow: 0 4px 12px rgba(16,24,40,.05); }
  .document-workspace { margin: -90px -20px -44px; }
  .document-toolbar { top: var(--topbar); }
}

@media (max-width: 900px) {
  .toolbar.wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 10px; }
  .toolbar.wrap > .btn, .toolbar.wrap > form, .toolbar.wrap > form .btn { width: 100%; min-width: 0; }
  .toolbar.wrap > form { margin: 0; display: flex; }
  .toolbar.wrap > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .toolbar.wrap.record-actionbar { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .record-actionbar .record-action-cluster { display: contents; }
  .record-actionbar .record-action-cluster + .record-action-cluster { margin-left: 0; padding-left: 0; border-left: 0; }
  .record-actionbar .record-action-cluster > .btn,
  .record-actionbar .record-action-cluster > form,
  .record-actionbar .record-action-cluster > form .btn { width: 100%; min-width: 0; }
  .record-actionbar .record-action-cluster > form { margin: 0; display: flex; }
  .record-actionbar .record-action-documents .btn { min-height: 40px; border-color: #d8e0e7; background: #fff; }
  .toolbar.wrap.client-actionbar { display: flex; align-items: stretch; flex-direction: column; }
  .client-action-group { display: flex; flex-wrap: nowrap; }
  .client-utilities { width: 100%; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .client-utility-link { width: 100%; padding-inline: 8px; box-sizing: border-box; justify-content: center; overflow: hidden; }
  .client-utility-link > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .client-action-primary { width: 100%; margin-left: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)) 40px; gap: 8px; }
  .client-action-primary > * { min-width: 0; }
  .client-action-group .btn, .client-action-group form, .client-action-group form .btn { width: 100%; min-width: 0; }
  .client-action-primary .btn { padding-inline: 7px; font-size: 11px; }
  .client-action-primary > .client-more-menu { grid-column: 3; justify-self: end; }
  .client-action-primary > form:first-child:nth-last-child(2) { grid-column: 1 / span 2; }
  .client-more-popover { width: min(260px,calc(100vw - 40px)); }
  .item-description { grid-template-columns: 1fr; }
}

@media (min-width: 721px) and (max-width: 1180px) {
  .service-picker-menu { position: fixed; z-index: 75; top: 70px; right: 12px; bottom: 12px; left: auto; width: min(410px, calc(100vw - 24px)); max-height: none; overflow: hidden; border-radius: 14px; box-shadow: 0 24px 64px rgba(4,20,34,.24); }
  .service-picker-options { max-height: calc(100svh - 222px); overscroll-behavior: contain; }
}

@media (max-width: 720px) {
  .topbar { height: 60px; }
  .topbar { justify-content: flex-start; gap: 12px; }
  .topbar-tools { margin-left: auto; display: flex; }
  .topbar-tools .global-search { display: none; }
  .topbar-user { padding: 0; display: flex; border-left: 0; }
  .topbar-user > span:last-child { display: none; }
  .content { padding: 22px 14px 88px; }
  .custom-item-dialog.custom-item-dialog[open] { position: fixed; inset: 12px auto auto 12px; box-sizing: border-box; width: calc(100vw - 24px); max-width: calc(100vw - 24px); max-height: calc(100svh - 24px); margin: 0; overflow-x: hidden; }
  .custom-item-form { min-width: 0; position: relative; padding: 18px; overflow-x: hidden; }
  .custom-item-head { padding-right: 46px; }
  .custom-item-head > div, .custom-item-help, .custom-item-fields, .custom-item-fields .field { min-width: 0; }
  .custom-item-head h2 { font-size: 20px; }
  .custom-item-head p, .custom-item-help-options span { overflow-wrap: anywhere; }
  .custom-item-head .quick-client-close { position: absolute; top: 16px; right: 16px; }
  .custom-item-fields input, .custom-item-fields textarea { width: 100%; min-width: 0; max-width: 100%; }
  .custom-item-help-options, .custom-item-fields { grid-template-columns: 1fr; }
  .custom-item-help-options { gap: 6px; }
  .custom-item-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .custom-item-actions .btn { width: 100%; }
  .settings-nav-picker label { grid-template-columns: 1fr; gap: 3px; }
  .settings-nav-picker label > span { padding-left: 2px; font-size: 9px; }
  .page-head { min-height: auto; margin-bottom: 16px; }
  .page-head h1 { font-size: 26px; }
  .page-head p { font-size: 12px; }
  .page-actions, .dashboard-actions { margin: 0 0 16px; justify-content: flex-start; flex-wrap: wrap; }
  .dashboard-period-form { width: 100%; }
  .dashboard-period-control { width: 100%; min-width: 0; grid-template-columns: 20px minmax(0, 1fr) minmax(112px, 38%); }
  .dashboard-period-control input[type="month"] { width: 100%; }
  .dashboard-actions .btn { width: 100%; order: 2; }
  .kpi-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { min-height: 98px; padding: 14px; border-bottom: 1px solid var(--line); }
  .kpi:nth-child(2) { border-right: 0; }
  .kpi:nth-last-child(-n+2) { border-bottom: 0; }
  .kpi strong { font-size: 20px; }
  .kpi-note { display: none; }
  .chart-panel canvas { height: 250px; padding: 8px 5px 10px; }
  .panel-head { padding: 14px; }
  .settings-activity-head { align-items: stretch; flex-direction: column; }
  .settings-activity-head .btn { width: 100%; justify-content: center; }
  .legend { font-size: 10px; }
  .toolbar, .report-filter { align-items: stretch; flex-direction: column; }
  .search-field, .filter-row, .report-filter .field { width: 100%; max-width: none; }
  .toolbar-note, .export-menu { margin-left: 0; }
  .summary-strip { grid-template-columns: 1fr; }
  .summary-strip > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .summary-strip > div:last-child { border-bottom: 0; }
  .profile-head { grid-template-columns: 1fr; align-items: start; gap: 20px; }
  .contact-list { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 18px; }
  .record-grid { grid-template-columns: 1fr; }
  .record-card:nth-child(odd) { border-right: 0; }
  .record-notice { align-items: stretch; flex-direction: column; gap: 10px; }
  .record-notice dd { white-space: normal; }
  .form-grid, .form-grid.two { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .document-client-control { grid-template-columns: 1fr; }
  .document-client-control .btn { width: 100%; }
  .document-client-add > span:last-child { display: inline; }
  .form-panel, .form-section, .settings-section { padding: 16px; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .btn { width: 100%; }
  .team-row { padding: 12px 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; }
  .team-row .row-main { min-width: 0; }
  .team-row-controls { width: 100%; grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) 98px auto; }
  .team-admin-row .team-owner-lock { margin-left: 0; grid-column: 1 / -1; justify-self: start; }
  .inline-form { width: 100%; }
  .inline-form input { width: 100%; }
  .timeline { padding: 5px 14px; }
  .timeline-row { grid-template-columns: 34px minmax(0, 1fr); }
  .timeline-row time { grid-column: 2; }
  .detail-document-head { grid-template-columns: 1fr; gap: 18px; }
  .deposit-callout { align-items: flex-start; flex-direction: column; gap: 5px; }
  .document-workspace { margin: -82px -14px -88px; }
  .document-toolbar { top: 60px; height: auto; min-height: 78px; padding: 9px 12px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .document-number { width: auto; margin: 0; grid-column: 1 / -1; }
  .document-toolbar .save-state { display: none; }
  .document-toolbar .btn { width: 100%; min-width: 0; min-height: 38px; padding: 0 8px; font-size: 12px; }
  .editor-section { padding: 16px; }
  .website-billing-guide { margin: 16px 16px 0; }
  .website-billing-guide > div:first-child { align-items: flex-start; flex-direction: column; gap: 3px; }
  .billing-quick-items { grid-template-columns: 1fr; }
  .billing-quick-items button { border-right: 0; border-bottom: 1px solid #cce7ea; }
  .billing-quick-items button:nth-child(n+4) { border-top: 0; }
  .billing-quick-items button:last-child { border-bottom: 0; }
  .items-editor { gap: 12px; }
  .item-row { padding: 58px 12px 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .item-description { grid-column: 1 / -1; grid-template-columns: 1fr; }
  .item-mode-toggle { right: 58px; left: 58px; width: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-picker-menu { position: fixed; z-index: 75; top: auto; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); left: 12px; width: auto; max-height: min(76svh, 620px); padding: 22px 11px 11px; overflow: hidden; border-radius: 17px 17px 11px 11px; box-shadow: 0 22px 58px rgba(4, 20, 34, .24); }
  .service-picker-menu::before { content: ""; position: absolute; top: 8px; left: 50%; width: 42px; height: 4px; border-radius: 999px; background: #98a2b3; transform: translateX(-50%); }
  .service-picker-search { position: static; margin-bottom: 9px; background-color: #fff; }
  .service-picker-options { max-height: calc(min(76svh, 620px) - 150px); grid-template-columns: 1fr; overscroll-behavior: contain; }
  .service-picker-option { min-height: 58px; }
  .item-drag-handle { top: 10px; left: 12px; width: 38px; height: 30px; transform: none; }
  .item-grip { width: 18px; height: 18px; -webkit-mask-size: 18px 18px; mask-size: 18px 18px; }
  .item-amount { min-height: 40px; padding: 8px 10px; grid-column: 1 / -1; align-items: center; justify-content: space-between; flex-direction: row; border-radius: 6px; background: #f5f7f9; }
  .item-row [data-remove-item] { position: absolute; top: 10px; right: 12px; width: auto; height: 30px; padding: 0 10px; display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 750; }
  .item-row [data-remove-item] svg { width: 15px; height: 15px; }
  .remove-label { display: inline; }
  .document-bottom { grid-template-columns: 1fr; }
  .document-notes { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr; gap: 12px; }
  .document-preview-pane { padding: 10px; }
  .invoice-paper { padding: clamp(15px, 5vw, 28px); }
  .invoice-paper-head { padding-bottom: 14px; }
  .invoice-parties { padding: 14px 0; gap: 14px; }
  .invoice-parties > div:last-child { padding-top: 10px; column-gap: 8px; }
  .preview-items { font-size: 8px; }
  .preview-items th, .preview-items td { padding: 5px 3px; }
  .preview-summary { margin-top: 12px; }
  .preview-footer { margin-top: 16px; padding-top: 10px; gap: 12px; font-size: 7px; }
  .invoice-paper > footer { margin-top: 14px; }
  .quick-client-form { padding: 19px; }
  .quick-client-actions { flex-direction: column-reverse; }
  .quick-client-actions .btn { width: 100%; }

  /* Dedicated mobile records when provided. */
  .table-scroll:has(+ .mobile-record-list) { display: none; }
  .mobile-record-list { display: block; }

  /* Every remaining table becomes labeled vertical records, never a sideways scroller. */
  .table-scroll:not(:has(+ .mobile-record-list)) { overflow: visible; }
  .table-scroll:not(:has(+ .mobile-record-list)) .data-table,
  .table-scroll:not(:has(+ .mobile-record-list)) .data-table tbody,
  .table-scroll:not(:has(+ .mobile-record-list)) .data-table tr { display: block; width: 100%; }
  .table-scroll:not(:has(+ .mobile-record-list)) .data-table thead { display: none; }
  .table-scroll:not(:has(+ .mobile-record-list)) .data-table tr { padding: 8px 14px; border-bottom: 1px solid var(--line); }
  .table-scroll:not(:has(+ .mobile-record-list)) .data-table tr:last-child { border-bottom: 0; }
  .table-scroll:not(:has(+ .mobile-record-list)) .data-table td { width: 100%; height: auto; min-height: 36px; padding: 7px 0; display: grid; grid-template-columns: minmax(105px, .72fr) minmax(0, 1fr); align-items: center; gap: 12px; border: 0; text-align: right; }
  .table-scroll:not(:has(+ .mobile-record-list)) .data-table td::before { content: attr(data-label); color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .025em; text-align: left; text-transform: uppercase; }
  .table-scroll:not(:has(+ .mobile-record-list)) .data-table td .icon-button { margin-left: auto; }

  .mobile-nav { position: fixed; z-index: 50; right: 0; bottom: 0; left: 0; height: 68px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); background: rgba(255,255,255,.98); }
  .mobile-nav a { min-width: 0; padding: 8px 4px 6px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 3px; border: 0; background: transparent; color: #667085; font-size: 10px; cursor: pointer; }
  .mobile-nav a.active { color: var(--primary); }
  .mobile-nav small { font-size: 10px; font-weight: 650; }
}

@media (max-width: 860px) {
  .auth-shell { display: block; }
  .auth-story { display: none; }
  .auth-panel { min-height: 100vh; min-height: 100svh; padding: clamp(38px, 7vh, 68px) clamp(28px, 8vw, 72px); }
  .auth-form-brand { width: 100%; justify-content: center; }
  .auth-copy { text-align: center; }
  .auth-copy p { margin-right: auto; margin-left: auto; }
}

@media (max-width: 580px) {
  body { font-size: 13px; }
  .content { padding-right: 12px; padding-left: 12px; }
  .document-workspace { margin-right: -12px; margin-left: -12px; }
  .dashboard-period-copy strong { font-size: 10px; }
  .kpi { padding: 13px 12px; }
  .kpi small { font-size: 10px; }
  .kpi strong { font-size: 18px; }
  .legend { display: none; }
  .overdue-row, .renewal-row, .mobile-record { padding: 12px; }
  .mobile-record .row-icon { display: none; }
  .mobile-record-value strong { font-size: 12px; }
  .auth-shell { display: block; }
  .auth-story { display: none; }
  .auth-panel { min-height: 100vh; min-height: 100svh; padding: 28px 22px; display: grid; place-items: center; }
  .auth-form-brand { margin-bottom: clamp(42px, 8vh, 64px); font-size: 15px; }
  .auth-form-brand img { width: 46px; height: 46px; }
  .auth-copy h2 { font-size: 34px; }
  .auth-copy p { max-width: 340px; line-height: 1.55; }
  .auth-card { width: 100%; }
  .toast { right: 12px; left: 12px; max-width: none; }
  .profile-head { padding: 17px; }
  .contact-list { grid-template-columns: 1fr; }
}

@media (max-width: 360px) {
  .document-toolbar { gap: 6px; }
  .document-toolbar .btn { padding-right: 4px; padding-left: 4px; font-size: 11px; }
  .team-row-controls { grid-template-columns: minmax(0, 1fr) 98px; }
  .team-row-controls .btn { width: 100%; grid-column: 1 / -1; }
}

@media (max-height: 650px) and (max-width: 860px) {
  .auth-panel { place-items: start center; padding-top: 28px; padding-bottom: 28px; }
  .auth-form-brand { margin-bottom: 30px; }
}

/* Services & Pricing catalogue */
.pricing-command-bar { margin-bottom: 18px; padding: 15px 18px; display: grid; grid-template-columns: minmax(190px, .7fr) minmax(0, 2.3fr); align-items: center; gap: 22px; border: 1px solid #cfe0e7; border-radius: var(--radius); background: #f8fbfc; }
.pricing-command-bar > div { display: flex; flex-direction: column; }
.pricing-command-bar > div strong { font-size: 14px; }
.pricing-command-bar > div span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.pricing-command-bar ol { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); list-style: none; }
.pricing-command-bar li { min-width: 0; padding: 0 15px; display: flex; align-items: center; gap: 9px; border-left: 1px solid var(--line); }
.pricing-command-bar li > span { flex: 0 0 auto; width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: #0b7890; color: #fff; font-size: 11px; font-weight: 800; }
.pricing-command-bar li div { min-width: 0; display: flex; flex-direction: column; }
.pricing-command-bar li strong { font-size: 11px; }
.pricing-command-bar li small { margin-top: 1px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.catalog-tabs { margin-bottom: 14px; display: flex; align-items: center; flex-wrap: wrap; gap: 2px 23px; border-bottom: 1px solid var(--line); }
.catalog-tabs a { position: relative; min-height: 39px; padding: 0 1px; display: inline-flex; align-items: center; color: #475467; font-size: 11px; font-weight: 680; white-space: nowrap; }
.catalog-tabs a::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: transparent; }
.catalog-tabs a:hover { color: var(--ink); }
.catalog-tabs a.active { color: #08788f; }
.catalog-tabs a.active::after { background: #0b91aa; }
.catalog-mobile-category { display: none; }
.catalog-filters { margin-bottom: 14px; padding: 12px; display: grid; grid-template-columns: minmax(260px,1.5fr) repeat(3,minmax(145px,.65fr)) auto auto; align-items: end; gap: 9px; box-shadow: none; }
.catalog-filters > label { min-width: 0; display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 9px; font-weight: 700; }
.catalog-filters input, .catalog-filters select { width: 100%; height: 38px; padding: 0 11px; border: 1px solid var(--line); border-radius: 6px; outline: 0; background: #fff; color: var(--ink); font-size: 12px; }
.catalog-filters input:focus, .catalog-filters select:focus { border-color: #0a7484; box-shadow: 0 0 0 3px rgba(10,116,132,.1); }
.catalog-search { position: relative; align-self: end; }
.catalog-search > span { position: absolute; z-index: 1; left: 11px; bottom: 10px; color: var(--muted); }
.catalog-search input { padding-left: 38px; }
.catalog-panel { overflow: hidden; box-shadow: none; }
.catalog-table-head, .catalog-row-summary { min-width: 0; display: grid; grid-template-columns: minmax(300px,2.3fr) minmax(105px,.7fr) minmax(105px,.65fr) minmax(110px,.7fr) 82px 42px; align-items: center; }
.catalog-table-head[data-admin="true"], .catalog-row-summary[data-admin="true"] { grid-template-columns: minmax(300px,2.3fr) minmax(105px,.7fr) minmax(105px,.65fr) minmax(110px,.7fr) 82px minmax(118px,.75fr) 42px; }
.catalog-table-head { min-height: 40px; padding: 0 13px; border-bottom: 1px solid var(--line); background: #fafbfc; color: #596575; font-size: 9px; font-weight: 780; letter-spacing: .02em; text-transform: uppercase; }
.catalog-group-heading { min-height: 38px; padding: 0 15px; display: flex; align-items: center; gap: 7px; border-bottom: 1px solid var(--line); background: #f2f6f8; }
.catalog-group-heading[hidden] { display: none; }
.catalog-group-heading strong { font-size: 11px; }
.catalog-group-heading span { color: var(--muted); font-size: 9px; }
.catalog-row { border-bottom: 1px solid var(--line-soft); background: #fff; }
.catalog-row:last-child { border-bottom: 0; }
.catalog-row.expanded { background: #fbfdfe; }
.catalog-row-summary { min-height: 68px; padding: 7px 13px; }
.catalog-service-main { min-width: 0; padding-right: 12px; display: flex; align-items: center; gap: 9px; }
.catalog-service-main > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.catalog-service-main strong { color: #182230; font-size: 12px; }
.catalog-service-main small:not(.service-code) { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.service-code { margin-bottom: 2px; color: #08788f; font-size: 8px; font-weight: 800; letter-spacing: .035em; }
.catalog-disclosure { flex: 0 0 auto; width: 24px; height: 24px; display: grid; place-items: center; color: var(--muted); transition: transform .15s ease; }
.catalog-disclosure svg { width: 15px; height: 15px; }
.catalog-row.expanded .catalog-disclosure { transform: rotate(90deg); color: #08788f; }
.catalog-cell, .catalog-price, .catalog-status, .catalog-admin { min-width: 0; padding-right: 9px; font-size: 11px; }
.catalog-cell { display: flex; flex-direction: column; color: #475467; }
.catalog-cell small { color: var(--muted); font-size: 9px; }
.catalog-price { font-variant-numeric: tabular-nums; white-space: nowrap; }
.catalog-admin { display: flex; flex-direction: column; color: #475467; font-variant-numeric: tabular-nums; }
.catalog-admin small { font-size: 9px; }
.catalog-actions { display: flex; justify-content: flex-end; }
.catalog-detail { margin: 0 13px 13px 46px; display: grid; grid-template-columns: 1.1fr 1fr 1fr .85fr 1.1fr; border: 1px solid #d9e2e7; border-radius: 7px; background: #fff; }
.catalog-detail[hidden] { display: none; }
.catalog-detail section { min-width: 0; padding: 14px; border-right: 1px solid var(--line-soft); }
.catalog-detail section:last-child { border-right: 0; }
.catalog-detail h3 { margin: 0 0 8px; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.catalog-detail h4 { margin: 13px 0 5px; color: #344054; font-size: 10px; }
.catalog-detail p, .catalog-detail li { color: #475467; font-size: 9px; line-height: 1.5; }
.catalog-detail p { margin-bottom: 0; }
.catalog-detail ul { margin: 0; padding-left: 15px; }
.catalog-detail .check-list { padding: 0; list-style: none; }
.catalog-detail .check-list li { position: relative; padding-left: 16px; }
.catalog-detail .check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 800; }
.compatibility-list, .related-prices { display: grid; gap: 6px; }
.compatibility-list > span, .related-prices > span { min-width: 0; padding: 7px 8px; display: flex; justify-content: space-between; gap: 7px; border: 1px solid var(--line-soft); border-radius: 5px; background: #fafbfc; }
.compatibility-list > span { align-items: flex-start; flex-direction: column; }
.compatibility-list strong, .related-prices strong { font-size: 9px; }
.compatibility-list small, .related-prices small { color: var(--muted); font-size: 8px; }
.pricing-reference-footer { margin-top: 14px; padding: 13px 15px; display: grid; grid-template-columns: 2fr 1fr; gap: 20px; border: 1px solid #dfe7eb; border-radius: 7px; background: #f8fbfc; }
.pricing-reference-footer p { margin: 0; color: #536173; font-size: 10px; }
.service-editor .form-grid.three { grid-template-columns: repeat(3,minmax(0,1fr)); }
.service-availability-card { min-width: 0; min-height: 62px; padding: 11px 13px; display: grid; grid-template-columns: minmax(0,1fr) 42px; align-items: center; gap: 16px; border: 1px solid #dce4e9; border-radius: 8px; background: #f8fbfc; cursor: pointer; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.service-availability-card:hover { border-color: #b8cbd3; background: #f4fafb; }
.service-availability-card:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(10,116,132,.12); }
.service-availability-card > span:first-child { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.service-availability-card strong { color: #253348; font-size: 11px; }
.service-availability-card small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.service-availability-switch { position: relative; width: 42px; height: 24px; border-radius: 999px; background: #c8d1da; box-shadow: inset 0 0 0 1px rgba(16,24,40,.08); transition: background .15s ease; }
.service-availability-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(16,24,40,.22); transition: transform .15s ease; }
.service-availability-card:has(input:checked) { border-color: #b9dce2; background: #f1f9fa; }
.service-availability-card:has(input:checked) .service-availability-switch { background: var(--primary); }
.service-availability-card:has(input:checked) .service-availability-switch::after { transform: translateX(18px); }
.admin-pricing-section { background: #fbfcfd; }
.compatibility-picker { margin: 0; padding: 0; border: 0; }
.compatibility-picker legend { margin-bottom: 7px; color: #344054; font-size: 11px; font-weight: 700; }
.compatibility-picker > div { max-height: 260px; padding: 10px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.compatibility-option { min-width: 0; min-height: 58px; padding: 10px 11px; display: grid; grid-template-columns: 20px minmax(0,1fr); align-items: center; gap: 10px; border: 1px solid #dfe4ea; border-radius: 7px; background: #fff; cursor: pointer; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.compatibility-option:hover { border-color: #b8c7d1; background: #fbfcfd; }
.compatibility-option:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(10,116,132,.12); }
.compatibility-option:has(input:checked) { border-color: #86c7d1; background: #f0f9fa; }
.compatibility-check { width: 19px; height: 19px; display: grid; place-items: center; border: 1px solid #bac5d0; border-radius: 5px; background: #fff; color: transparent; font-size: 12px; font-weight: 850; line-height: 1; transition: border-color .15s ease, background .15s ease, color .15s ease; }
.compatibility-option:has(input:checked) .compatibility-check { border-color: var(--primary); background: var(--primary); color: #fff; }
.compatibility-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.compatibility-picker strong { overflow: hidden; color: #182230; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.compatibility-picker small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.service-editor { min-width: 0; }
.service-editor-toolbar { position: sticky; z-index: 12; top: calc(var(--topbar) + 10px); min-height: 64px; margin-bottom: 16px; padding: 10px 12px 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid #d9e2e7; border-radius: 8px; background: rgba(255,255,255,.96); box-shadow: 0 8px 22px rgba(16,24,40,.07); backdrop-filter: blur(12px); }
.service-editor-safety { min-width: 0; display: flex; align-items: center; gap: 10px; }
.service-editor-safety-icon { flex: 0 0 auto; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 7px; background: #eef8fa; color: #087d98; }
.service-editor-safety-icon svg { width: 18px; height: 18px; }
.service-editor-safety > span:last-child { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.service-editor-safety strong { color: #182230; font-size: 12px; }
.service-editor-safety small { overflow: hidden; color: #667085; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.service-editor-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; }
.service-editor-actions .btn { min-width: 118px; margin: 0; }
.service-editor-form { overflow: hidden; border: 1px solid #dce3e8; border-radius: 8px; background: #fff; }
.sr-only { position: absolute !important; width: 1px !important; min-width: 0 !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

@media (max-width: 1180px) {
  .pricing-command-bar { grid-template-columns: 1fr; gap: 12px; }
  .pricing-command-bar li:first-child { border-left: 0; padding-left: 0; }
  .catalog-filters { grid-template-columns: minmax(230px,1.4fr) repeat(3,minmax(125px,.7fr)); }
  .catalog-filters .btn { width: 100%; }
  .catalog-detail { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .catalog-detail section { border-bottom: 1px solid var(--line-soft); }
  .catalog-detail section:nth-child(3) { border-right: 0; }
}

@media (max-width: 900px) {
  .catalog-table-head { display: none; }
  .catalog-row-summary, .catalog-row-summary[data-admin="true"] { padding: 13px; grid-template-columns: minmax(0,1fr) auto; gap: 9px 15px; }
  .catalog-service-main { grid-column: 1 / -1; padding-right: 0; }
  .catalog-service-main small:not(.service-code) { white-space: normal; }
  .catalog-cell, .catalog-price, .catalog-status, .catalog-admin { min-height: 30px; padding: 0; display: grid; grid-template-columns: 96px minmax(0,1fr); align-items: center; gap: 10px; }
  .catalog-cell::before, .catalog-price::before, .catalog-status::before, .catalog-admin::before { content: attr(data-label); color: var(--muted); font-size: 8px; font-weight: 780; letter-spacing: .04em; text-transform: uppercase; }
  .catalog-cell small { grid-column: 2; }
  .catalog-actions { grid-column: 2; grid-row: 2 / span 4; align-self: end; }
  .catalog-detail { margin: 0 13px 13px; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .catalog-detail section:nth-child(2n) { border-right: 0; }
  .catalog-detail section:nth-child(3) { border-right: 1px solid var(--line-soft); }
}

@media (max-width: 720px) {
  .content { padding-bottom: 38px; }
  .page-head { align-items: stretch; flex-direction: column; }
  .page-head-actions { justify-content: flex-start; flex-wrap: wrap; }
  .page-head-actions .btn { flex: 1 1 150px; min-width: 0; }
  .pricing-command-bar { padding: 14px; }
  .pricing-command-bar ol { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 0; }
  .pricing-command-bar li:nth-child(3) { border-left: 0; padding-left: 0; }
  .catalog-tabs { gap: 0 16px; }
  .catalog-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .catalog-search { grid-column: 1 / -1; }
  .catalog-filters .btn { width: 100%; }
  .catalog-detail { grid-template-columns: 1fr; }
  .catalog-detail section, .catalog-detail section:nth-child(3) { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .catalog-detail section:last-child { border-bottom: 0; }
  .pricing-reference-footer { grid-template-columns: 1fr; gap: 8px; }
  .service-editor .form-grid.three { grid-template-columns: 1fr; }
  .compatibility-picker > div { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .pricing-command-bar ol { grid-template-columns: 1fr; }
  .pricing-command-bar li, .pricing-command-bar li:nth-child(3) { padding: 0; border-left: 0; }
  .catalog-tabs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 12px; }
  .catalog-filters { grid-template-columns: 1fr; }
  .catalog-search { grid-column: auto; }
  .catalog-row-summary, .catalog-row-summary[data-admin="true"] { grid-template-columns: minmax(0,1fr) 34px; }
  .catalog-cell, .catalog-price, .catalog-status, .catalog-admin { grid-column: 1 / -1; }
  .catalog-actions { grid-column: 2; grid-row: 1; align-self: center; }
}

/* Accepted Services & Pricing specification. */

.topbar { position: sticky; z-index: 32; top: 0; height: 56px; padding: 0 18px; display: flex; align-items: center; justify-content: flex-end; border-bottom: 1px solid #e3e8ee; background: rgba(255,255,255,.98); backdrop-filter: blur(12px); }
.topbar-tools { width: 100%; min-width: 0; justify-content: flex-start; flex-wrap: nowrap; gap: 9px; }
.topbar-tools > * { flex: 0 0 auto; }
.topbar-tools .global-search { flex: 0 1 230px; width: 230px; height: 36px; border-radius: 8px; background: #f8fafc; }
.topbar-shortcuts { margin-left: auto; display: flex; align-items: center; gap: 7px; }
.topbar-shortcuts .icon-button { width: 36px; height: 36px; border-color: #e2e8f0; border-radius: 8px; background: #fff; }
.topbar-create { min-height: 36px; padding: 0 12px; font-size: 12px; }
.topbar-create [data-icon] { width: 16px; height: 16px; }
.topbar-user { min-width: 0; padding-left: 9px; flex-wrap: nowrap; white-space: nowrap; }
.topbar-user > span:last-child { display: none; }
.topbar-context { min-width: 0; margin-left: 7px; padding-left: 16px; display: flex; align-items: center; gap: 9px; border-left: 1px solid #dfe4ea; white-space: nowrap; }
.topbar-context-icon { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid #d8e8ed; border-radius: 8px; background: #f1f8fa; color: #087b97; }
.topbar-context-icon svg { width: 16px; height: 16px; stroke-width: 1.8; }
.topbar-context > strong { overflow: hidden; color: #172033; font-size: 14px; font-weight: 760; line-height: 1.2; text-overflow: ellipsis; }
.topbar-context .save-state { font-size: 10px; }
.editor-save-state { color: #667085; font-size: 10px; animation: save-state-enter .28s cubic-bezier(.2,.75,.3,1) both; }
.editor-save-state > span { position: relative; animation: save-state-pulse 2.4s ease-in-out infinite; }
@keyframes save-state-enter {
  from { opacity: 0; transform: translateX(-5px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes save-state-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(21,128,61,0); }
  45% { box-shadow: 0 0 0 4px rgba(21,128,61,.13); }
}
.topbar-section-label { margin-left: 3px; padding-left: 14px; border-left: 1px solid #dfe4ea; color: #344054; font-size: 12px; font-weight: 720; white-space: nowrap; }
.topbar.is-document-editor .topbar-shortcuts { gap: 8px; }
.topbar.is-document-editor .topbar-save,
.topbar.is-document-editor .topbar-issue { min-height: 36px; padding-right: 13px; padding-left: 13px; }
.document-editor-route .document-toolbar { display: none; }
.content { max-width: none; padding-top: 24px; }

.services-pricing-page { padding: 24px 28px 28px; background: #fff; }
.services-pricing-page .page-head { min-height: 64px; margin-bottom: 16px; }
.services-pricing-page .page-head h1 { font-size: 27px; }
.services-pricing-page .page-head p { font-size: 12px; }
.services-pricing-page .page-head-actions { gap: 12px; }
.services-pricing-page .page-head-actions .btn { min-height: 42px; padding: 0 18px; }
.services-pricing-page .page-head-actions .btn-primary { min-width: 142px; background: #02a9d1; border-color: #02a9d1; }
.services-pricing-page .page-head-actions .btn-primary:hover { background: #018eb2; border-color: #018eb2; }

.services-pricing-page .catalog-tabs { margin: 0 0 24px; min-height: 50px; gap: 0 30px; flex-wrap: wrap; }
.services-pricing-page .catalog-tabs a { min-height: 50px; color: #172033; font-size: 12px; font-weight: 610; }
.services-pricing-page .catalog-tabs a.active { color: #009fd0; }
.services-pricing-page .catalog-tabs a.active::after { height: 3px; background: #05aada; }

.services-pricing-page .catalog-filters { margin-bottom: 24px; padding: 0; display: grid; grid-template-columns: minmax(260px,1.35fr) repeat(3,minmax(150px,.78fr)) auto auto; align-items: end; gap: 10px; border: 0; background: transparent; }
.services-pricing-page .catalog-filters > label { min-width: 0; gap: 4px; font-size: 10px; font-weight: 650; }
.services-pricing-page .catalog-filters input, .services-pricing-page .catalog-filters select { height: 40px; border-color: #d8dde5; border-radius: 5px; font-size: 12px; }
.services-pricing-page .catalog-search > span { bottom: 11px; }
.services-pricing-page .catalog-apply { display: none; }
.services-pricing-page .catalog-clear { min-height: 36px; padding: 0 11px; display: inline-flex; align-items: center; justify-self: end; justify-content: center; gap: 7px; border: 1px solid #d8e1e7; border-radius: 6px; background: #fff; color: #0789ad; font-size: 11px; font-weight: 680; white-space: nowrap; }
.services-pricing-page .catalog-clear:hover { border-color: #aebdc7; background: #f7fafb; color: #056f8e; }
.services-pricing-page .catalog-clear svg { width: 15px; height: 15px; }

.services-pricing-page .catalog-panel { overflow: hidden; border: 1px solid #d8dde5; border-radius: 5px; background: #fff; }
.services-pricing-page .catalog-table-head,
.services-pricing-page .catalog-row-summary { display: grid; grid-template-columns: minmax(290px,2.35fr) minmax(95px,.7fr) minmax(105px,.72fr) minmax(112px,.76fr) 86px 78px; align-items: stretch; }
.services-pricing-page .catalog-table-head[data-admin="true"],
.services-pricing-page .catalog-row-summary[data-admin="true"] { grid-template-columns: minmax(290px,2.35fr) minmax(95px,.7fr) minmax(105px,.72fr) minmax(112px,.76fr) 86px minmax(150px,.92fr) 78px; }
.services-pricing-page .catalog-table-head { min-height: 41px; padding: 0; background: #fbfcfd; color: #293348; font-size: 10px; font-weight: 720; letter-spacing: 0; text-transform: none; }
.services-pricing-page .catalog-table-head > span { padding: 0 13px; display: flex; align-items: center; border-right: 1px solid #e3e7ec; }
.services-pricing-page .catalog-table-head > span:nth-child(5) { justify-content: center; }
.services-pricing-page .catalog-table-head > span:last-child { border-right: 0; }
.services-pricing-page .catalog-inspector-heading { justify-content: space-between; background: #fafbfc; }
.services-pricing-page .catalog-inspector-heading svg { width: 14px; height: 14px; }
.services-pricing-page .catalog-group-heading { min-height: 38px; padding: 0 14px; border-color: #e1e5ea; background: #f7f8fa; }
.services-pricing-page .catalog-group-heading[data-admin="true"] { padding-right: 182px; }
.services-pricing-page .catalog-group-heading strong { font-size: 11px; }
.services-pricing-page .catalog-group-heading span { font-size: 9px; }
.services-pricing-page .catalog-row { border-color: #e3e7ec; }
.services-pricing-page .catalog-row.expanded { background: #f8fbff; }
.services-pricing-page .catalog-row-summary { min-height: 62px; padding: 0; }
.services-pricing-page .catalog-row-summary > * { min-width: 0; padding: 8px 13px; display: flex; align-items: center; border-right: 1px solid #e8ebef; }
.services-pricing-page .catalog-row-summary > *:last-child { border-right: 0; }
.services-pricing-page .catalog-service-main { gap: 7px; }
.services-pricing-page .catalog-disclosure { width: 20px; height: 20px; }
.services-pricing-page .catalog-service-main strong { font-size: 12px; }
.services-pricing-page .catalog-service-main small:not(.service-code) { max-width: 360px; font-size: 9px; }
.services-pricing-page .service-code { color: #087ed0; font-size: 8px; }
.services-pricing-page .catalog-cell { flex-direction: row; gap: 7px; color: #465267; font-size: 10px; }
.services-pricing-page .catalog-cell > [data-icon] { flex: 0 0 auto; color: #657288; }
.services-pricing-page .catalog-cell svg { width: 16px; height: 16px; }
.services-pricing-page .catalog-cell small { display: block; }
.services-pricing-page .catalog-price { font-size: 11px; }
.services-pricing-page .catalog-status { justify-content: center; }
.services-pricing-page .catalog-actions { justify-content: center; gap: 6px; }
.services-pricing-page .catalog-actions .icon-button { width: 31px; height: 31px; }
.services-pricing-page .catalog-admin { padding: 8px 14px; align-items: stretch; justify-content: center; gap: 5px; background: #fcfcfd; }
.services-pricing-page .catalog-admin small { display: flex; align-items: center; justify-content: space-between; gap: 9px; color: #667085; font-size: 9px; }
.services-pricing-page .catalog-admin strong { color: #182230; font-size: 9px; font-variant-numeric: tabular-nums; }

.services-pricing-page .catalog-detail,
.services-pricing-page .catalog-row[data-admin="true"] .catalog-detail { margin: 0 14px 14px; grid-template-columns: repeat(12,minmax(0,1fr)); border-color: #d8dfe8; border-radius: 7px; }
.services-pricing-page .catalog-detail section { grid-column: span 4; padding: 17px 18px; }
.services-pricing-page .catalog-detail section:nth-child(3) { border-right: 0; }
.services-pricing-page .catalog-detail section:nth-child(4),
.services-pricing-page .catalog-detail section:nth-child(5) { grid-column: span 6; border-top: 1px solid var(--line-soft); }
.services-pricing-page .catalog-detail section:nth-child(5) { border-right: 0; }
.services-pricing-page .catalog-detail h3 { margin-bottom: 10px; font-size: 11px; letter-spacing: 0; text-transform: none; }
.services-pricing-page .catalog-detail p,
.services-pricing-page .catalog-detail li { color: #344054; font-size: 10px; line-height: 1.6; }
.services-pricing-page .compatibility-list > span { padding: 8px; align-items: center; flex-direction: row; justify-content: flex-start; border-color: #dbe2ea; background: #fff; }
.services-pricing-page .compatibility-list > span > [data-icon] { width: 28px; height: 28px; padding: 5px; display: grid; place-items: center; border: 1px solid #a9dcf3; border-radius: 5px; color: #008fe0; }
.services-pricing-page .compatibility-list > span > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.services-pricing-page .compatibility-list small { color: #1e9b51; }
.services-pricing-page .catalog-live-empty { padding: 42px 20px; display: flex; align-items: center; flex-direction: column; color: #667085; text-align: center; }
.services-pricing-page .catalog-live-empty[hidden] { display: none; }
.services-pricing-page .catalog-live-empty strong { color: #182230; font-size: 13px; }
.services-pricing-page .catalog-live-empty span { margin-top: 4px; font-size: 10px; }

.services-pricing-page .pricing-command-bar { margin: 14px 0 0; padding: 0; grid-template-columns: minmax(185px,.7fr) minmax(0,3.4fr); gap: 0; border-color: #d6dde6; border-radius: 5px; background: #fff; }
.services-pricing-page .pricing-command-bar > div { padding: 14px 16px; justify-content: center; border-right: 1px solid #e1e5ea; }
.services-pricing-page .pricing-command-bar > div strong { font-size: 12px; }
.services-pricing-page .pricing-command-bar > div span { font-size: 9px; }
.services-pricing-page .pricing-command-bar ol { min-height: 74px; }
.services-pricing-page .pricing-command-bar li { position: relative; min-width: 0; padding: 10px 17px; display: grid; grid-template-columns: 22px 28px minmax(0,1fr); align-items: center; gap: 10px; border: 0; }
.services-pricing-page .pricing-command-bar li:not(:last-child)::after { content: ""; position: absolute; right: 1px; width: 8px; height: 8px; border-top: 1.5px solid #667085; border-right: 1.5px solid #667085; transform: rotate(45deg); }
.services-pricing-page .pricing-command-bar li > b { position: static; width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid #c6d4df; border-radius: 6px; background: #f4f8fa; color: #0877a1; font-size: 9px; font-weight: 800; line-height: 1; }
.services-pricing-page .pricing-command-bar li > [data-icon] { flex: 0 0 auto; width: 28px; height: 28px; margin: 0; display: grid; place-items: center; border-radius: 0; background: transparent; color: #17375e; font-size: 0; font-weight: 400; }
.services-pricing-page .pricing-command-bar li > [data-icon] svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.services-pricing-page .pricing-command-bar li strong { font-size: 9px; }
.services-pricing-page .pricing-command-bar li small { margin-top: 2px; overflow: visible; font-size: 8px; line-height: 1.35; text-overflow: clip; white-space: normal; }

@media (max-width: 1220px) {
  .services-pricing-page .catalog-tabs { gap: 0 22px; }
  .services-pricing-page .catalog-table-head[data-admin="true"],
  .services-pricing-page .catalog-row-summary[data-admin="true"] { grid-template-columns: minmax(245px,2fr) 92px 100px 106px 76px 142px 66px; }
}

@media (max-width: 940px) {
  .topbar { height: 58px; padding: 0 12px; display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 9px; }
  .topbar .menu-button { grid-column: 1; justify-self: start; }
  .topbar .mobile-brand { grid-column: 2; justify-self: center; }
  .topbar-tools { grid-column: 3; width: auto; justify-self: end; justify-content: flex-end; }
  .topbar-tools .global-search { display: none; }
  .topbar-shortcuts { display: flex; }
  .topbar-create { width: 36px; padding: 0; }
  .topbar-create > span:last-child { display: none; }
  .topbar-user { display: none; }
  .topbar.is-document-editor .topbar-context { display: none; }
  .topbar.is-document-editor .topbar-cancel { display: none; }
  .topbar-section-label { display: none; }
  .mobile-brand .binary-brand-logo { width: 31px; height: 31px; }
  .mobile-brand .app-brand-wordmark strong { font-size: 12px; }
  .mobile-brand .app-brand-wordmark small { font-size: 8px; letter-spacing: .2em; }
  .services-pricing-page { padding: 22px 18px 28px; }
  .services-pricing-page .catalog-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .services-pricing-page .catalog-search { grid-column: 1 / -1; }
  .services-pricing-page .catalog-clear { justify-content: flex-start; }
  .services-pricing-page .catalog-table-head { display: none; }
  .services-pricing-page .catalog-row-summary,
  .services-pricing-page .catalog-row-summary[data-admin="true"] { padding: 12px; grid-template-columns: minmax(0,1fr) auto; gap: 9px 14px; }
  .services-pricing-page .catalog-row-summary > * { padding: 0; border: 0; }
  .services-pricing-page .catalog-service-main { grid-column: 1 / -1; }
  .services-pricing-page .catalog-cell,
  .services-pricing-page .catalog-price,
  .services-pricing-page .catalog-status,
  .services-pricing-page .catalog-admin { min-height: 29px; display: grid; grid-template-columns: 104px minmax(0,1fr); align-items: center; gap: 9px; }
  .services-pricing-page .catalog-status { justify-content: initial; }
  .services-pricing-page .catalog-status .badge { justify-self: start; }
  .services-pricing-page .catalog-cell::before,
  .services-pricing-page .catalog-price::before,
  .services-pricing-page .catalog-status::before,
  .services-pricing-page .catalog-admin::before { content: attr(data-label); color: #667085; font-size: 8px; font-weight: 760; letter-spacing: .04em; text-transform: uppercase; }
  .services-pricing-page .catalog-cell > [data-icon] { display: none; }
  .services-pricing-page .catalog-admin { padding: 8px; background: #f8fafc; }
  .services-pricing-page .catalog-admin small { grid-column: 2; }
  .services-pricing-page .catalog-actions { grid-column: 2; grid-row: 2; }
  .services-pricing-page .catalog-detail,
  .services-pricing-page .catalog-row[data-admin="true"] .catalog-detail { margin: 0 12px 12px; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .services-pricing-page .catalog-detail section,
  .services-pricing-page .catalog-detail section:nth-child(4),
  .services-pricing-page .catalog-detail section:nth-child(5) { grid-column: auto; }
  .services-pricing-page .pricing-command-bar { grid-template-columns: 1fr; }
  .services-pricing-page .pricing-command-bar > div { border-right: 0; border-bottom: 1px solid #e1e5ea; }
}

@media (max-width: 600px) {
  .topbar { height: 58px; padding: 0 12px; grid-template-columns: 40px minmax(0,1fr) auto; }
  .topbar .icon-button.menu-button { width: 36px; height: 36px; border-color: #dde3ea; border-radius: 8px; }
  .topbar-user .avatar.small { width: 32px; height: 32px; }
  .topbar.is-document-editor .topbar-shortcuts > .icon-button { display: none; }
  .topbar.is-document-editor .topbar-save,
  .topbar.is-document-editor .topbar-issue { min-height: 36px; padding-right: 9px; padding-left: 9px; font-size: 11px; }
  .services-pricing-page { padding: 18px 12px 24px; }
  .services-pricing-page .page-head-actions { width: 100%; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .services-pricing-page .page-head-actions .btn { width: 100%; }
  .services-pricing-page .page-head-actions .btn-primary { grid-column: 1 / -1; grid-row: 1; min-width: 0; }
  .services-pricing-page .page-head-actions .btn-secondary { min-width: 0; padding: 0 9px; font-size: 11px; }
  .services-pricing-page .page-head-actions .btn-secondary [data-icon] { width: 16px; height: 16px; }
  .services-pricing-page .catalog-tabs { display: none; }
  .services-pricing-page .catalog-mobile-category { margin: 0 0 16px; display: grid; gap: 6px; }
  .services-pricing-page .catalog-mobile-category-label { color: #667085; font-size: 10px; font-weight: 720; letter-spacing: .02em; }
  .services-pricing-page .catalog-mobile-category-control { position: relative; height: 44px; display: flex; align-items: center; border: 1px solid #d6dee5; border-radius: 8px; background: #fff; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
  .services-pricing-page .catalog-mobile-category-control:focus-within { border-color: #0798bd; box-shadow: 0 0 0 3px rgba(5,170,218,.12); }
  .services-pricing-page .catalog-mobile-category-control > [data-icon] { position: absolute; left: 12px; z-index: 1; width: 18px; height: 18px; color: #087da0; pointer-events: none; }
  .services-pricing-page .catalog-mobile-category-control svg { width: 18px; height: 18px; }
  .services-pricing-page .catalog-mobile-category select { width: 100%; height: 100%; padding: 0 38px 0 40px; border: 0; outline: 0; background-color: transparent; color: #172033; font-size: 13px; font-weight: 680; }
  .services-pricing-page .catalog-mobile-category select:focus-visible { box-shadow: none; }
  .services-pricing-page .catalog-filters { grid-template-columns: 1fr; }
  .services-pricing-page .catalog-search { grid-column: auto; }
  .services-pricing-page .catalog-clear { min-height: 34px; padding: 0 10px; }
  .services-pricing-page .catalog-group-heading[data-admin="true"] { padding-right: 14px; }
  .services-pricing-page .catalog-row-summary,
  .services-pricing-page .catalog-row-summary[data-admin="true"] { grid-template-columns: minmax(0,1fr) 34px; }
  .services-pricing-page .catalog-service-main { grid-column: 1; grid-row: 1; }
  .services-pricing-page .catalog-cell,
  .services-pricing-page .catalog-price,
  .services-pricing-page .catalog-status,
  .services-pricing-page .catalog-admin { grid-column: 1 / -1; }
  .services-pricing-page .catalog-actions { grid-column: 2; grid-row: 1; }
  .services-pricing-page .catalog-detail,
  .services-pricing-page .catalog-row[data-admin="true"] .catalog-detail { grid-template-columns: 1fr; }
  .services-pricing-page .catalog-detail section { padding: 15px; border-right: 0; }
  .services-pricing-page .pricing-command-bar ol { grid-template-columns: 1fr; padding: 6px 0; }
  .services-pricing-page .pricing-command-bar li { min-height: 62px; padding: 10px 12px; grid-template-columns: 22px 28px minmax(0,1fr); }
  .services-pricing-page .pricing-command-bar li:not(:last-child)::after { display: none; }
}

.pricing-guide-upload { margin-top: 22px; padding-bottom: 22px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; border-bottom: 1px solid var(--line); }
.pricing-guide-upload .span-2 { grid-column: span 2; }
.pricing-guide-upload .form-actions { grid-column: 1 / -1; margin-top: 0; padding-top: 14px; }
.pricing-document-history { padding-top: 20px; }
.pricing-document-history h3 { margin: 0 0 10px; font-size: 13px; }
.pricing-document-actions { display: flex; align-items: center; gap: 8px; }
.pricing-builder-guide { border-color: #cbdfe6; background: #f4fafb; }
.pricing-quick-steps { grid-template-columns: repeat(4,minmax(0,1fr)); }
.pricing-quick-steps button { min-width: 0; padding: 11px; display: flex; align-items: center; justify-content: flex-start; gap: 8px; }
.pricing-quick-steps button b { flex: 0 0 auto; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #08788f; color: #fff; font-size: 10px; }
.pricing-builder-feedback { padding: 9px 12px; border-top: 1px solid #cbdfe6; color: #42616a; font-size: 10px; }
.pricing-builder-feedback[data-tone="warning"] { background: var(--warning-soft); color: var(--warning); }
.pricing-builder-feedback[data-tone="info"] { background: #eaf5f7; color: #075f6d; }
.service-path-guide { padding: 14px; }
.service-path-guide > div:first-child { margin-bottom: 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.service-path-guide > div:first-child > strong { color: #172033; font-size: 12px; }
.service-path-guide > div:first-child > span { color: #667085; font-size: 10px; }
.service-path-options { padding: 5px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; border: 1px solid #cbdfe6; border-radius: 10px; background: #f6f8fa; }
.service-path-option { min-width: 0; min-height: 42px; padding: 0 12px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 7px; background: transparent; color: #475467; text-align: center; cursor: pointer; transform: translateY(0); transition: background-color .22s ease, color .22s ease, box-shadow .22s ease, transform .22s cubic-bezier(.2,.75,.3,1); }
.service-path-option:hover { background: #e5f4f7; color: #075f73; box-shadow: inset 0 0 0 1px #c4e3e9; transform: translateY(-1px); }
.service-path-option.recommended { background: transparent; }
.service-path-option.recommended.is-selected, .service-path-option.is-selected { background: #087f99; color: #fff; box-shadow: 0 3px 9px rgba(8,127,153,.24); }
.service-path-option.is-selected:hover { background: #06748c; }
.service-path-option.is-selected strong { color: #fff; }
.service-path-option > b { display: none; }
.service-path-option > span { min-width: 0; display: block; overflow: hidden; }
.service-path-option strong { color: #344054; font-size: 11px; font-weight: 720; }
.service-path-option small { display: none; }
.service-path-guide .pricing-builder-feedback { margin: 9px 0 0; padding: 0 2px; border: 0; background: transparent; color: #526174; text-align: center; }
.service-path-guide .pricing-builder-feedback[data-tone="info"] { background: transparent; color: #075f73; }
.service-guide-dialog { box-sizing: border-box; width: min(760px,calc(100% - 32px)); max-height: calc(100svh - 32px); padding: 0; overflow: auto; border: 0; border-radius: 12px; background: #fff; color: var(--ink); box-shadow: 0 24px 70px rgba(3,20,34,.24); }
.service-guide-dialog::backdrop { background: rgba(4,17,29,.58); }
.service-guide-dialog [hidden] { display: none !important; }
.service-guide-form { padding: 24px; }
.service-guide-head { margin-bottom: 20px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.service-guide-head h2 { margin: 0 0 5px; font-size: 22px; }
.service-guide-head p { margin: 0; color: var(--muted); font-size: 12px; }
.service-guide-progress { margin: -2px 0 20px; display: grid; gap: 8px; }
.service-guide-progress > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.service-guide-progress strong { color: #075f73; font-size: 10px; font-weight: 780; letter-spacing: .035em; text-transform: uppercase; }
.service-guide-progress > div:first-child span { color: #667085; font-size: 10px; font-weight: 650; }
.service-guide-progress-track { height: 5px; overflow: hidden; border-radius: 999px; background: #e8eef1; }
.service-guide-progress-track span { width: 20%; height: 100%; display: block; border-radius: inherit; background: #087f99; transition: width .22s cubic-bezier(.2,.75,.3,1); }
.service-guide-steps { min-height: 330px; }
.service-guide-step[hidden] { display: none; }
.service-guide-step.is-active { animation: service-guide-step-enter .2s cubic-bezier(.2,.75,.3,1) both; }
.service-guide-step-head { margin-bottom: 18px; }
.service-guide-step-head > span { color: #08788f; font-size: 9px; font-weight: 800; letter-spacing: .065em; text-transform: uppercase; }
.service-guide-step-head h3 { width: fit-content; margin: 4px 0 5px; color: #172033; font-size: 18px; line-height: 1.25; }
.service-guide-step-head h3:focus { outline: none; }
.service-guide-step-head h3:focus-visible { border-radius: 4px; box-shadow: 0 0 0 3px rgba(8,145,178,.18); }
.service-guide-step-head p { margin: 0; color: #667085; font-size: 11px; }
.service-guide-step > .field { max-width: 520px; }
.service-guide-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.service-guide-extras { margin: 18px 0 0; padding: 14px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px 16px; border: 1px solid var(--line); border-radius: 8px; }
.service-guide-extras legend { padding: 0 6px; color: #344054; font-size: 11px; font-weight: 720; }
.service-guide-extras label { display: flex; align-items: center; gap: 8px; color: #475467; font-size: 11px; }
.service-guide-extras input { width: 16px; height: 16px; accent-color: #08788f; }
.service-guide-step .service-guide-extras,
.service-guide-step .service-guide-infrastructure,
.service-guide-step .service-guide-result { margin-top: 0; }
.service-guide-empty-step { min-height: 150px; padding: 28px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 5px; border: 1px dashed #cad7df; border-radius: 10px; background: #fafcfd; text-align: center; }
.service-guide-empty-step[hidden] { display: none; }
.service-guide-empty-step strong { color: #344054; font-size: 12px; }
.service-guide-empty-step span { max-width: 410px; color: #667085; font-size: 10px; }
.service-guide-result { margin-top: 18px; padding: 16px; border: 1px solid #c8e1e6; border-radius: 9px; background: #f6fbfc; }
.service-guide-result-label { color: #08788f; font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.service-guide-result h3 { margin: 4px 0 5px; font-size: 17px; }
.service-guide-result p { margin: 0; color: #526174; font-size: 11px; }
.service-guide-result ul { margin: 12px 0 0; padding: 0; display: grid; gap: 6px; list-style: none; }
.service-guide-result li { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #344054; font-size: 11px; }
.service-guide-result li::before { content: "✓"; margin-right: 7px; color: var(--success); font-weight: 800; }
.service-guide-result li span { margin-right: auto; }
.service-guide-result li b { color: #172033; font-variant-numeric: tabular-nums; }
.service-guide-included { margin-top: 9px; color: #16714a; font-size: 10px; }
.service-guide-warning { margin-top: 10px !important; padding: 9px 10px; border-radius: 6px; background: var(--warning-soft); color: var(--warning) !important; }
.service-guide-actions { margin-top: 18px; padding-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line-soft); }
.service-guide-actions > div { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.service-guide-browse { padding-inline: 4px; border-color: transparent; background: transparent; color: #08788f; }
.service-guide-browse:hover { background: #eef8fa; }
@keyframes service-guide-step-enter { from { opacity: 0; transform: translateX(6px); } to { opacity: 1; transform: translateX(0); } }
.pricing-approval-panel { margin-bottom: 16px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-left: 3px solid var(--warning); box-shadow: none; }
.pricing-approval-panel > div { display: flex; align-items: flex-start; gap: 10px; }
.pricing-approval-panel > div > span { color: var(--warning); }
.pricing-approval-panel strong { font-size: 12px; }
.pricing-approval-panel p { margin: 2px 0 0; color: var(--muted); font-size: 10px; }
.pricing-approval-approved { border-left-color: var(--success); }
.pricing-approval-approved > div > span { color: var(--success); }
.pricing-approval-rejected { border-left-color: var(--danger); }
.pricing-approval-actions { display: flex; align-items: center; gap: 8px; }
.pricing-approval-actions input { width: min(280px,26vw); height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; }

@media (max-width: 720px) {
  .pricing-guide-upload { grid-template-columns: 1fr; }
  .pricing-guide-upload .span-2 { grid-column: auto; }
  .pricing-document-history .list-row { align-items: flex-start; flex-direction: column; }
  .pricing-quick-steps { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .service-guide-fields, .service-guide-extras { grid-template-columns: 1fr; }
  .service-path-guide { padding: 12px; }
  .service-path-guide > div:first-child { align-items: flex-start; flex-direction: column; gap: 2px; }
  .service-path-guide > div:first-child > span { display: none; }
  .service-path-option { min-height: 40px; padding: 0 7px; }
  .service-guide-dialog { width: calc(100vw - 24px); max-width: calc(100vw - 24px); overflow-x: hidden; }
  .service-guide-form, .service-guide-head > div, .service-guide-fields, .service-guide-fields .field, .service-guide-result { min-width: 0; }
  .service-guide-form { padding: 18px; }
  .service-guide-fields select { width: 100%; max-width: 100%; }
  .service-guide-included { overflow-wrap: anywhere; }
  .service-guide-steps { min-height: 0; }
  .service-guide-actions { position: sticky; bottom: -18px; z-index: 2; padding-bottom: 2px; align-items: center; background: #fff; }
  .service-guide-actions > div { min-width: 0; }
  .service-guide-actions > div .btn { min-width: 94px; }
  .service-guide-browse { width: auto !important; min-width: 0; padding-inline: 3px; font-size: 10px; }
  .pricing-approval-panel, .pricing-approval-actions { align-items: stretch; flex-direction: column; }
  .pricing-approval-actions input { width: 100%; }
  .pricing-approval-actions .btn { width: 100%; }
  .service-editor-toolbar { position: static; min-height: 0; padding: 12px; align-items: stretch; flex-direction: column; gap: 12px; }
  .service-editor-safety small { white-space: normal; }
  .service-editor-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .service-editor-actions .btn { width: 100%; min-width: 0; }
}

/* Compact detail surfaces used by clients and payments. */
.profile-head { min-height: 0; margin-bottom: 16px; }
.profile-identity > div { min-width: 0; }
.contact-list dd { min-height: 21px; line-height: 1.45; }
form.form-layout {
  grid-template-columns: 1fr;
  grid-template-areas:
    "main"
    "side";
}
form.form-layout > .form-main {
  grid-area: main;
  width: auto;
  max-width: none;
}
form.form-layout > .form-side {
  grid-area: side;
  width: auto;
  max-width: none;
}
form.form-layout > .form-side .btn-ghost.btn-block {
  margin-top: 10px;
  background: transparent;
  transition: background-color .15s ease, color .15s ease;
}
form.form-layout > .form-side .btn-ghost.btn-block:hover {
  background-color: #fee2e2;
  color: #b91c1c;
}
.detail-grid > .panel { align-self: stretch; min-height: 160px; }
.detail-grid > .panel:nth-child(-n + 2) { margin-top: 20px; }
.detail-grid .empty-state.small { min-height: 94px; padding: 18px; }
.split-panels > aside.panel { align-self: start; padding: 21px; }
.split-panels > aside.panel > h2 { margin: 0 0 4px; font-size: 20px; line-height: 1.25; }
.split-panels > aside.panel > p { margin: 0; color: var(--muted); font-size: 12px; }
.split-panels > aside.panel > .stack-form { margin-top: 18px; padding: 0; }
.split-panels > aside.panel > .empty-state { min-height: 104px; margin-top: 14px; padding: 18px 10px; border-radius: 7px; background: #f8fafb; }
.split-panels > .panel > .empty-state { min-height: 132px; }
.owner-attention-panel { margin-bottom: 18px; overflow: hidden; }
.owner-attention-panel > .alert { margin: 14px; }
.owner-attention-grid { min-width: 0; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); }
.owner-attention-card { min-width: 0; min-height: 78px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-right: 1px solid var(--line-soft); color: #344054; }
.owner-attention-card:last-child { border-right: 0; }
.owner-attention-card:hover { background: #f8fafb; }
.owner-attention-card > span { min-width: 0; display: flex; flex-direction: column; }
.owner-attention-card strong { font-size: 11px; }
.owner-attention-card small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.owner-attention-card b { flex: 0 0 auto; min-width: 31px; height: 31px; padding: 0 7px; display: grid; place-items: center; border-radius: 7px; background: #e8f4f7; color: #06758f; font-size: 13px; font-variant-numeric: tabular-nums; }

/* Company Setup, client records and shared compliance workspace components. */
.company-setup-shell { min-width: 0; display: grid; gap: 18px; }
.company-boundary { min-width: 0; padding: 13px 15px; display: flex; align-items: flex-start; gap: 11px; border: 1px solid #c8dde5; border-radius: 8px; background: #f1f8fa; color: #284b58; }
.company-boundary > .nav-icon { flex: 0 0 22px; width: 22px; height: 22px; color: #087c96; }
.company-boundary strong { display: block; color: #17384a; font-size: 12px; }
.company-boundary p { margin: 2px 0 0; color: #506d78; font-size: 11px; line-height: 1.5; }
.company-tabs, .workspace-tabs { min-width: 0; padding: 4px; display: grid; grid-template-columns: repeat(auto-fit,minmax(130px,1fr)); gap: 4px; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: var(--shadow); }
.company-tabs a, .workspace-tabs a { min-width: 0; min-height: 42px; padding: 7px 9px; display: flex; align-items: center; justify-content: center; border-radius: 6px; color: #536173; font-size: 11px; font-weight: 680; line-height: 1.25; text-align: center; transition: background .15s ease,color .15s ease; }
.company-tabs a:hover, .workspace-tabs a:hover { background: #f6f9fa; color: var(--ink); }
.company-tabs a.active, .workspace-tabs a.active { background: #e8f4f7; color: #066f87; box-shadow: inset 0 0 0 1px #c4e3e9; }
.company-mobile-tab, .workspace-mobile-tab { display: none; }
.company-tab-panel { min-width: 0; display: grid; gap: 22px; }
.record-project-summary { min-width: 0; padding: 14px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.record-project-summary__item { min-width: 0; min-height: 70px; padding: 12px 14px; display: flex; align-items: flex-start; justify-content: center; flex-direction: column; gap: 6px; border: 1px solid var(--line-soft); border-radius: 8px; background: #f8fafb; }
.record-project-summary__item .label { color: #667085; font-size: 9px; font-weight: 780; letter-spacing: .055em; text-transform: uppercase; }
.record-project-summary__item strong { max-width: 100%; color: #172033; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.record-project-summary__item .badge { width: max-content; max-width: 100%; }
.company-section-block { min-width: 0; display: grid; gap: 13px; }
.company-section-block + .company-section-block { margin-top: 4px; padding-top: 22px; border-top: 1px solid var(--line); }
.company-section-heading { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.company-section-heading > div { min-width: 0; }
.company-section-heading h2 { margin: 2px 0 4px; color: #152033; font-size: 18px; font-weight: 720; line-height: 1.28; }
.company-section-heading p { max-width: 760px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.company-setup-page .form-panel > .company-section-heading { margin-bottom: 18px; }
.company-section-block > .company-section-heading { margin-bottom: 3px; }
.company-kicker { display: block; color: #087b96; font-size: 9px; font-weight: 780; letter-spacing: .07em; line-height: 1.35; text-transform: uppercase; }
.company-summary-grid { min-width: 0; display: grid; grid-template-columns: minmax(0,1.18fr) minmax(320px,.82fr); align-items: stretch; gap: 16px; }
.company-next-action, .company-known-card, .company-track-card, .company-option-card, .company-source-card, .company-record-card, .company-timeline, .company-form-directory, .company-identity-preview, .company-export-preview, .company-empty { padding: 19px; }
.company-next-action, .company-known-card { display: flex; flex-direction: column; }
.company-next-action > p { margin: 10px 0 14px; color: #465467; font-size: 12px; }
.company-next-details { margin: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.company-next-details > div, .company-identity-summary > div, .company-export-counts > div { min-width: 0; padding: 10px 11px; border-radius: 6px; background: #f7f9fb; }
.company-next-details dt, .company-identity-summary dt, .company-export-counts dt, .company-record-card dt, .company-identity-compare dt { margin: 0 0 3px; color: var(--muted); font-size: 9px; font-weight: 740; letter-spacing: .035em; text-transform: uppercase; }
.company-next-details dd, .company-identity-summary dd, .company-export-counts dd, .company-record-card dd, .company-identity-compare dd { margin: 0; color: #27364a; font-size: 11px; overflow-wrap: anywhere; }
.company-actions { margin-top: auto; }
.company-metric-row { margin: 11px 0 13px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border: 1px solid var(--line-soft); border-radius: 7px; overflow: hidden; }
.company-metric-row > div { min-width: 0; padding: 12px; display: flex; flex-direction: column; border-right: 1px solid var(--line-soft); }
.company-metric-row > div:last-child { border-right: 0; }
.company-metric-row strong { color: #142236; font-size: 20px; font-variant-numeric: tabular-nums; }
.company-metric-row span { color: var(--muted); font-size: 9px; }
.company-identity-summary { margin: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.company-known-card > .muted { margin: 12px 0 0; font-size: 10px; }
.company-status-grid, .company-option-grid, .company-source-grid, .company-track-grid, .company-two-column { min-width: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 12px; }
.company-choice-fieldset, .service-reference-picker { min-width: 0; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfd; }
.company-choice-fieldset > legend, .service-reference-picker > legend { padding: 0 7px; color: #344054; font-size: 11px; font-weight: 760; }
.company-choice-grid { gap: 10px; }
.company-choice-card { min-width: 0; min-height: 76px; padding: 13px 14px; display: flex; align-items: flex-start; gap: 11px; border: 1px solid #dfe5ea; border-radius: 8px; background: #fff; cursor: pointer; transition: border-color .16s ease,box-shadow .16s ease,background-color .16s ease,transform .16s ease; }
.company-choice-card:hover { border-color: #b8d9e0; background: #f7fbfc; transform: translateY(-1px); }
.company-choice-card:has(input:checked) { border-color: #8fcbd6; background: #eff9fb; box-shadow: 0 0 0 3px rgba(8,145,178,.09); }
.company-choice-card input { flex: 0 0 auto; margin: 3px 0 0; accent-color: var(--primary); }
.company-choice-card > span { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.company-choice-card strong { color: #1f2d41; font-size: 11px; line-height: 1.35; }
.company-choice-card small { color: #667085; font-size: 10px; line-height: 1.45; }
.service-reference-intro { margin-bottom: 12px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.service-reference-intro strong { color: #1f2d41; font-size: 12px; }
.service-reference-intro p { margin: 3px 0 0; color: #667085; font-size: 10px; line-height: 1.45; }
.service-reference-count { flex: 0 0 auto; padding: 5px 9px; border-radius: 999px; background: #e8f4f7; color: #06758f; font-size: 9px; font-weight: 780; }
.service-reference-search { height: 42px; margin-bottom: 12px; padding: 0 12px; display: flex; align-items: center; gap: 9px; border: 1px solid #d6dee5; border-radius: 8px; background: #fff; }
.service-reference-search:focus-within { border-color: #078daf; box-shadow: 0 0 0 3px rgba(5,170,218,.1); }
.service-reference-search .nav-icon { flex: 0 0 18px; width: 18px; height: 18px; color: #667085; }
.service-reference-search input { width: 100%; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: #182230; font-size: 11px; }
.service-reference-groups { display: grid; gap: 8px; }
.service-reference-group { min-width: 0; overflow: hidden; border: 1px solid #dfe5ea; border-radius: 8px; background: #fff; }
.service-reference-group[hidden] { display: none; }
.service-reference-group > summary { min-height: 48px; padding: 9px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; cursor: pointer; }
.service-reference-group > summary::-webkit-details-marker { display: none; }
.service-reference-group > summary:hover { background: #f8fafb; }
.service-reference-group > summary > span:first-child { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.service-reference-group > summary strong { color: #26364b; font-size: 11px; }
.service-reference-group > summary small { color: #667085; font-size: 9px; }
.service-reference-options { padding: 10px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; border-top: 1px solid var(--line-soft); background: #f8fafb; }
.service-reference-card { min-width: 0; min-height: 54px; padding: 9px 10px; display: flex; align-items: flex-start; gap: 9px; border: 1px solid #e2e7ec; border-radius: 7px; background: #fff; cursor: pointer; }
.service-reference-card[hidden] { display: none; }
.service-reference-card:has(input:checked) { border-color: #9bcfd8; background: #eff9fb; }
.service-reference-card input { flex: 0 0 auto; margin-top: 2px; accent-color: var(--primary); }
.service-reference-card > span { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.service-reference-card strong { color: #26364b; font-size: 10px; line-height: 1.35; overflow-wrap: anywhere; }
.service-reference-card small { color: #667085; font-size: 9px; line-height: 1.35; overflow-wrap: anywhere; }
.company-two-column.company-form-stack { grid-template-columns: minmax(0,1fr); gap: 18px; }
.company-setup-page .company-two-column:has(> form.form-panel) { grid-template-columns: minmax(0,1fr); gap: 18px; }
.company-setup-page .company-two-column:has(> form.form-panel) > .company-empty,
.company-setup-page .company-two-column:has(> form.form-panel) > .company-list,
.company-setup-page .company-two-column:has(> form.form-panel) > .company-timeline { width: 100%; }
.company-form-stack > .form-panel { width: 100%; }
.company-form-stack > .form-panel textarea { min-height: 74px; }
.company-list { min-width: 0; display: grid; gap: 9px; }
.company-status-card, .company-list-item, .company-selection-details, .company-option-card, .company-form-directory { padding: 0; overflow: hidden; }
.company-topic-backdrop { position: fixed; z-index: 1180; inset: 0; border: 0; background: rgba(15,23,42,.46); backdrop-filter: blur(3px); cursor: default; animation: company-topic-fade .16s ease both; }
body.company-topic-modal-open { overflow: hidden; }
[data-company-topic-dialog][open] { position: fixed; z-index: 1190; top: 50%; left: 50%; width: min(820px,calc(100vw - 40px)); max-height: calc(100dvh - 48px); overflow: auto; transform: translate(-50%,-50%); border-color: #b8d6dd; border-radius: 12px; box-shadow: 0 28px 80px rgba(15,23,42,.28); animation: company-topic-enter .18s cubic-bezier(.2,.75,.3,1) both; }
[data-company-topic-dialog][open] > summary { position: sticky; z-index: 2; top: 0; min-height: 62px; padding: 13px 18px 13px 46px; border-bottom: 1px solid var(--line-soft); background: #fff; }
[data-company-topic-dialog][open] > summary .badge { margin-right: 38px; }
.company-topic-close { position: absolute; z-index: 4; top: 14px; right: 16px; width: 32px; height: 32px; padding: 0; display: grid; place-items: center; border: 1px solid #dce3e8; border-radius: 7px; background: #fff; color: #5f6d7e; font-size: 21px; line-height: 1; cursor: pointer; }
.company-topic-close:hover { border-color: #b9c6d0; background: #f7f9fb; color: #172033; }
[data-company-topic-dialog][open] .company-inline-form { padding: 20px; background: #fff; }
@keyframes company-topic-enter { from { opacity: 0; transform: translate(-50%,calc(-50% + 10px)) scale(.985); } to { opacity: 1; transform: translate(-50%,-50%) scale(1); } }
@keyframes company-topic-fade { from { opacity: 0; } to { opacity: 1; } }
.company-status-card > summary, .company-list-item > summary, .company-selection-details > summary, .company-option-card > summary, .company-form-directory > summary { position: relative; min-width: 0; min-height: 52px; padding: 10px 13px 10px 42px; display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; color: #26364b; cursor: pointer; }
.company-status-card > summary::-webkit-details-marker, .company-list-item > summary::-webkit-details-marker, .company-selection-details > summary::-webkit-details-marker, .company-option-card > summary::-webkit-details-marker, .company-form-directory > summary::-webkit-details-marker { display: none; }
.company-status-card > summary::before, .company-list-item > summary::before, .company-selection-details > summary::before, .company-option-card > summary::before, .company-form-directory > summary::before { content: ""; position: absolute; left: 16px; width: 7px; height: 7px; border-right: 1.5px solid #637285; border-bottom: 1.5px solid #637285; transform: rotate(-45deg); transition: transform .15s ease; }
.company-status-card[open] > summary::before, .company-list-item[open] > summary::before, .company-selection-details[open] > summary::before, .company-option-card[open] > summary::before, .company-form-directory[open] > summary::before { transform: rotate(45deg); }
.company-status-card > summary:hover, .company-list-item > summary:hover, .company-selection-details > summary:hover, .company-option-card > summary:hover, .company-form-directory > summary:hover { background: #f8fafb; }
.company-status-card > summary > span:first-child, .company-list-item > summary > span:first-child, .company-option-card > summary > span:first-child { min-width: 0; display: flex; flex-direction: column; }
.company-status-card summary strong, .company-list-item summary strong, .company-option-card summary strong { font-size: 12px; }
.company-status-card summary small, .company-list-item summary small, .company-option-card summary small { margin-top: 2px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.company-option-card summary .nav-icon { display: none; }
.company-inline-form, .company-record-detail, .company-selection-details > :not(summary), .company-form-directory > :not(summary) { padding: 15px; border-top: 1px solid var(--line-soft); }
.company-record-detail { color: #465467; font-size: 11px; }
.company-record-detail p { margin: 0 0 7px; }
.company-record-detail p:last-child { margin-bottom: 0; }
.company-record-card { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: 10px 14px; }
.company-record-card > div:first-child { min-width: 0; display: flex; flex-direction: column; }
.company-record-card strong { color: #24334a; font-size: 12px; }
.company-record-card small { margin-top: 2px; color: var(--muted); font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; }
.company-record-card > p, .company-record-card > dl, .company-record-card > small, .company-record-card > .company-row-actions { grid-column: 1 / -1; }
.company-record-card > p { margin: 0; color: #465467; font-size: 11px; }
.company-record-card > dl { margin: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.company-record-card > dl > div { padding: 9px 10px; border-radius: 6px; background: #f8fafb; }
.company-row-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
.company-row-actions form { margin: 0; }
.company-track-card { display: flex; align-items: flex-start; gap: 13px; }
.company-track-number { flex: 0 0 31px; width: 31px; height: 31px; display: grid; place-items: center; border-radius: 7px; background: #e8f4f7; color: #06758f; font-size: 12px; font-weight: 800; }
.company-track-card h2 { margin: 0 0 4px; font-size: 14px; }
.company-track-card p, .company-source-card p { margin: 0; color: #566477; font-size: 11px; line-height: 1.5; }
.company-source-card > div { margin-bottom: 9px; display: flex; align-items: flex-start; justify-content: space-between; gap: 9px; }
.company-source-card > a { margin-top: 12px; display: inline-flex; color: #08738d; font-size: 11px; font-weight: 720; }
.company-timeline { display: grid; gap: 0; }
.company-mini-row { min-width: 0; padding: 10px 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line-soft); }
.company-mini-row:first-child { padding-top: 0; }
.company-mini-row:last-child { padding-bottom: 0; border-bottom: 0; }
.company-mini-row > div { min-width: 0; display: flex; flex-direction: column; }
.company-mini-row strong { font-size: 11px; }
.company-mini-row small, .company-mini-row span { color: var(--muted); font-size: 9px; }
.company-mini-row p { max-width: 56%; margin: 0; color: #566477; font-size: 10px; text-align: right; }
.company-impact-list { margin: 0; padding-left: 18px; color: #465467; font-size: 11px; line-height: 1.6; }
.project-document-builder { grid-template-columns: minmax(0,1fr); gap: 14px; }
.project-document-workflow { order: -1; padding: 18px 20px; }
.project-document-workflow .company-section-heading { margin-bottom: 12px; }
.project-document-workflow .company-impact-list { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; list-style: none; counter-reset: document-step; }
.project-document-workflow .company-impact-list li { min-width: 0; padding: 12px 12px 12px 42px; position: relative; display: flex; flex-direction: column; gap: 3px; border: 1px solid #e3e9ee; border-radius: 9px; background: #f8fafb; line-height: 1.4; counter-increment: document-step; }
.project-document-workflow .company-impact-list li::before { content: counter(document-step); width: 24px; height: 24px; position: absolute; top: 12px; left: 10px; display: grid; place-items: center; border-radius: 50%; background: #e6f3f6; color: #087f98; font-size: 10px; font-weight: 800; }
.project-document-workflow .company-impact-list strong { color: #243247; font-size: 11px; }
.project-document-workflow .company-impact-list span { color: #667085; font-size: 10px; }
.project-document-workflow .alert { margin-top: 12px; }
.project-document-form { width: 100%; box-sizing: border-box; }
.project-document-form > form > .form-grid { gap: 14px; }
/* Client-record workflows: guidance belongs above the task, not beside a much taller form. */
[data-client-records] .company-two-column:not(.project-document-builder):has(> .form-panel + section) { grid-template-columns: minmax(0,1fr); gap: 14px; }
[data-client-records] .company-two-column:not(.project-document-builder):has(> .form-panel + section) > .form-panel { width: 100%; }
[data-client-records] .company-two-column:not(.project-document-builder):has(> .form-panel + section) > .form-panel + section { order: -1; padding: 18px 20px; }
[data-client-records] .company-two-column:not(.project-document-builder):has(> .form-panel + section) > .form-panel + section .company-section-heading { margin-bottom: 12px; }
[data-client-records] .company-two-column:not(.project-document-builder):has(> .form-panel + section) > .form-panel + section .company-impact-list { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,220px),1fr)); gap: 10px; list-style: none; }
[data-client-records] .company-two-column:not(.project-document-builder):has(> .form-panel + section) > .form-panel + section .company-impact-list li { min-width: 0; padding: 12px; display: flex; flex-direction: column; gap: 3px; border: 1px solid #e3e9ee; border-radius: 9px; background: #f8fafb; line-height: 1.4; }
[data-client-records] .company-two-column:not(.project-document-builder):has(> .form-panel + section) > .form-panel + section .company-impact-list strong { color: #243247; font-size: 11px; }
[data-client-records] .company-two-column:not(.project-document-builder):has(> .form-panel + section) > .form-panel + section .company-impact-list span { color: #667085; font-size: 10px; }
.company-empty { min-height: 90px; display: grid; place-items: center; color: var(--muted); font-size: 11px; text-align: center; }
.company-record-picker { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,320px),1fr)); gap: 12px; }
.company-record-picker fieldset { min-width: 0; margin: 0; padding: 13px; display: grid; align-content: start; gap: 8px; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; }
.company-record-picker legend { padding: 0 5px; color: #344054; font-size: 10px; font-weight: 750; }
.company-record-picker .check-row { align-items: flex-start; padding: 7px; border-radius: 5px; background: #f8fafb; font-size: 10px; }
.company-record-picker .check-row span, .company-record-picker .muted { min-width: 0; overflow-wrap: anywhere; }
.company-record-picker fieldset:has(> .muted) { min-height: 68px; padding: 10px 13px; background: #fafbfc; }
.company-record-picker fieldset > .muted { margin: 2px 0 0; color: #667085; font-size: 10px; line-height: 1.4; }
.company-export-form { min-width: 0; overflow: hidden; }
.company-export-form .form-grid > .check-row { grid-column: 1 / -1; }
.export-sensitive-permission { min-width: 0; margin-top: 14px; padding: 13px 14px; display: flex; align-items: flex-start; gap: 11px; border: 1px solid #dbe4e9; border-radius: 8px; background: #f7fafb; cursor: pointer; }
.export-sensitive-permission:hover { border-color: #b9d6de; background: #f1f8fa; }
.export-sensitive-permission:has(input:checked) { border-color: #96cbd5; background: #edf8fa; box-shadow: 0 0 0 3px rgba(8,145,178,.08); }
.export-sensitive-permission input { flex: 0 0 auto; width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--primary); }
.export-sensitive-permission > span { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.export-sensitive-permission strong { color: #26364b; font-size: 11px; }
.export-sensitive-permission small { color: #667085; font-size: 10px; line-height: 1.45; }
.export-sensitive-permission:has(input:disabled) { cursor: not-allowed; opacity: .62; }
.company-export-counts { margin: 0 0 14px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.company-export-counts dd { font-size: 18px; font-variant-numeric: tabular-nums; font-weight: 720; }
.company-identity-compare { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.company-identity-compare article { padding: 14px; border: 1px solid var(--line-soft); border-radius: 7px; background: #f9fafb; }
.company-identity-compare h3 { margin: 0 0 10px; font-size: 13px; }
.company-identity-compare dl { margin: 0; display: grid; gap: 8px; }
.copy-field { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: stretch; gap: 7px; }
.copy-field input, .copy-field textarea { width: 100%; min-width: 0; min-height: 40px; padding: 9px 11px; border: 1px solid #d5dbe2; border-radius: 6px; outline: 0; background: #fff; color: #27364a; resize: vertical; }
.copy-field button { min-width: 92px; padding: 0 13px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: #344054; font-size: 11px; font-weight: 720; cursor: pointer; }
.copy-field button:hover { border-color: #aebac5; background: #f8fafb; }
.company-table-wrap { overflow: hidden; }
.company-table { width: 100%; border-collapse: collapse; table-layout: auto; }
.company-table th { padding: 10px 12px; border-bottom: 1px solid var(--line); background: #f8fafb; color: var(--muted); font-size: 9px; font-weight: 760; text-align: left; text-transform: uppercase; }
.company-table td { min-width: 0; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); color: #344054; font-size: 11px; vertical-align: top; overflow-wrap: anywhere; }
.company-table tr:last-child td { border-bottom: 0; }

/* Compact, expandable copy for text-heavy tables. */
.table-copy { min-width: 0; margin-top: 4px; }
.table-copy > summary { position: relative; width: max-content; max-width: 100%; margin-inline: auto; padding: 5px 22px 5px 9px; border: 1px solid #dce4e8; border-radius: 6px; background: #f7fafb; color: #08758e; font-size: 9px; font-weight: 760; line-height: 1.25; list-style: none; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.table-copy > summary::-webkit-details-marker { display: none; }
.table-copy > summary::after { content: ""; position: absolute; top: 50%; right: 9px; width: 5px; height: 5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-65%) rotate(45deg); transition: transform .15s ease; }
.table-copy[open] > summary { border-color: #b9d9e0; background: #eef8fa; }
.table-copy[open] > summary::after { transform: translateY(-35%) rotate(225deg); }
.table-copy > p { max-width: 440px; margin: 7px auto 0; padding: 9px 10px; border-left: 2px solid #0b839f; border-radius: 0 6px 6px 0; background: #f4f8fa; color: #465467; font-size: 10px; line-height: 1.55; text-align: left; overflow-wrap: anywhere; }

/* Pricing research workspace. */
.workspace-safety { margin-bottom: 16px; }
.workspace-safety strong { margin-right: 4px; }
.workspace-tabs { margin-bottom: 16px; }
.workspace-context { margin-bottom: 16px; padding: 13px 15px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.workspace-context > div { min-width: 0; display: flex; flex-direction: column; }
.workspace-context > div > strong { margin-top: 2px; font-size: 13px; }
.workspace-context > div > small { color: var(--muted); font-size: 10px; }
.workspace-context form { flex: 0 1 360px; margin: 0; }
.workspace-context .field { gap: 0; }
.pricing-audit-table .data-table td, .pricing-compare-table .data-table td { vertical-align: top; }
.pricing-audit-table .data-table td > small, .pricing-compare-table .data-table td > small { margin-top: 3px; line-height: 1.4; }
.pricing-formula-card, .pricing-decision-card { margin-bottom: 16px; }
.pricing-tool-grid { min-width: 0; margin-bottom: 16px; display: grid; grid-template-columns: minmax(0,1fr); align-items: start; gap: 16px; }
.pricing-tool-card { min-width: 0; }
.pricing-tool-card .section-heading p { max-width: 920px; }
.pricing-tool-card form { margin-top: 16px; }
.pricing-tool-advanced { padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 7px; background: #f8fafb; }
.pricing-tool-advanced > summary { color: #344054; font-size: 11px; font-weight: 720; cursor: pointer; }
.pricing-tool-advanced[open] > summary { margin-bottom: 12px; }
.pricing-fit-result, .pricing-import-result { margin-top: 16px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 7px; background: #f8fafb; }
.pricing-fit-result.is-fit, .pricing-import-result.is-valid { border-color: #b9dfc4; background: #f3faf5; }
.pricing-fit-result.is-gap, .pricing-import-result.is-invalid { border-color: #ead4a0; background: #fffaf0; }
.pricing-fit-result > strong, .pricing-import-result > strong { color: #233247; font-size: 12px; }
.pricing-fit-result p, .pricing-import-result p { margin: 4px 0 10px; color: #566477; font-size: 11px; line-height: 1.5; }
.pricing-fit-result ul, .pricing-import-result ul { margin: 8px 0 12px; padding-left: 18px; color: #465467; font-size: 10px; line-height: 1.55; }
.pricing-fit-result dl { margin: 10px 0 13px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.pricing-fit-result dl > div { padding: 9px 10px; border-radius: 6px; background: rgba(255,255,255,.72); }
.pricing-fit-result dt { color: var(--muted); font-size: 9px; font-weight: 740; text-transform: uppercase; }
.pricing-fit-result dd { margin: 3px 0 0; color: #24334a; font-size: 11px; font-weight: 700; }
.pricing-export-groups { margin-top: 16px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.pricing-export-groups > div { padding: 13px; border: 1px solid var(--line-soft); border-radius: 7px; background: #f8fafb; }
.pricing-export-groups > div > strong, .pricing-export-groups > div > span { display: block; }
.pricing-export-groups > div > strong { color: #26364b; font-size: 12px; }
.pricing-export-groups > div > span { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.pricing-export-groups .company-row-actions { margin-top: 11px; justify-content: flex-start; }
.pricing-private-export { border-style: dashed !important; }
.pricing-tool-card:has(.pricing-export-groups) { padding: 20px; }
.pricing-tool-card:has(.pricing-export-groups) .section-heading p { max-width: 980px; }
.pricing-tool-card:has(.pricing-export-groups) .form-help { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line-soft); color: #5d6b7d; }
.pricing-export-groups .btn { min-height: 38px; }
.pricing-private-export .btn { border: 1px solid #d8e0e6; background: #fff; color: #344054; }
.pricing-private-export .btn:hover { border-color: #b8c5cf; background: #f7f9fb; }
.pricing-assumptions-panel, .pricing-compare-table { overflow: hidden; }
.pricing-assumption-list, .pricing-comparison-list { padding: 16px; display: grid; gap: 12px; background: #f6f8fa; }
.pricing-assumption-card, .pricing-comparison-card { min-width: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: 0 1px 2px rgba(16,24,40,.035); }
.pricing-assumption-head, .pricing-comparison-head { margin-bottom: 12px; padding-bottom: 10px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line-soft); }
.pricing-assumption-head > div, .pricing-comparison-head > div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pricing-assumption-head strong, .pricing-comparison-head strong { color: #1d2b3f; font-size: 13px; line-height: 1.4; }
.pricing-assumption-head small, .pricing-comparison-head small { color: var(--muted); font-size: 10px; }
.pricing-assumption-fields { display: grid; grid-template-columns: minmax(110px,.7fr) minmax(110px,.7fr) minmax(90px,.55fr) minmax(190px,1fr) minmax(260px,1.45fr); align-items: start; gap: 12px; }
.pricing-assumption-card .field { min-width: 0; gap: 0; }
.pricing-assumption-card .field > span { margin-bottom: 8px; display: block; color: #475467; font-size: 9px; font-weight: 760; letter-spacing: .035em; text-transform: uppercase; }
.pricing-assumption-card input, .pricing-assumption-card select, .pricing-assumption-card textarea { width: 100%; min-width: 0; min-height: 40px; padding: 8px 10px; border: 1px solid #d5dbe2; border-radius: 7px; outline: 0; background: #fff; color: #182230; }
.pricing-assumption-card textarea { resize: vertical; }
.pricing-assumption-card input:focus, .pricing-assumption-card select:focus, .pricing-assumption-card textarea:focus { border-color: #078daf; box-shadow: 0 0 0 3px rgba(5,170,218,.11); }
.pricing-assumption-note { grid-column: 1 / -1; }
.pricing-assumption-note textarea { min-height: 62px; }
.pricing-assumption-actions { margin-top: 10px; padding-top: 10px; display: flex; justify-content: flex-end; border-top: 1px solid var(--line-soft); }
.pricing-comparison-values { margin: 0; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border: 1px solid var(--line-soft); border-radius: 8px; overflow: hidden; }
.pricing-comparison-values > div { min-width: 0; padding: 12px; background: #fafbfc; border-right: 1px solid var(--line-soft); }
.pricing-comparison-values > div:last-child { border-right: 0; }
.pricing-comparison-values dt, .pricing-comparison-reason > span { margin-bottom: 5px; color: #667085; font-size: 9px; font-weight: 760; letter-spacing: .04em; text-transform: uppercase; }
.pricing-comparison-values dd { margin: 0; color: #26364b; font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.pricing-comparison-values dd small { margin-top: 3px; display: block; color: var(--muted); font-size: 9px; }
.pricing-comparison-reason { margin-top: 12px; padding: 13px 14px; border-left: 3px solid #0b839f; border-radius: 0 7px 7px 0; background: #f3f8fa; text-align: left; }
.pricing-comparison-reason > span { display: block; }
.pricing-comparison-reason strong { display: -webkit-box; color: #26364b; font-size: 12px; line-height: 1.5; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.pricing-comparison-reason details { margin-top: 7px; }
.pricing-comparison-reason summary { width: max-content; color: #08758e; font-size: 10px; font-weight: 720; cursor: pointer; }
.pricing-comparison-reason details[open] summary { margin-bottom: 5px; }
.pricing-comparison-reason p { margin: 0; color: #5b687a; font-size: 10px; line-height: 1.55; overflow-wrap: anywhere; }
.pricing-exchange-panel { margin-bottom: 16px; }
.pricing-import-create { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.pricing-equation { margin: 14px 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.pricing-equation code { padding: 12px 13px; border: 1px solid #d6e4e9; border-radius: 6px; background: #f5fafb; color: #164d5d; font-size: 11px; overflow-wrap: anywhere; }
.economics-input-table input, .table-panel .data-table input, .table-panel .data-table select, .table-panel .data-table textarea { width: 100%; min-width: 0; min-height: 38px; padding: 8px 10px; border: 1px solid #d5dbe2; border-radius: 6px; outline: 0; background: #fff; color: #182230; }
.table-panel .data-table textarea { resize: vertical; }
.table-panel .data-table input:focus, .table-panel .data-table select:focus, .table-panel .data-table textarea:focus { border-color: #078daf; box-shadow: 0 0 0 3px rgba(5,170,218,.11); }
.pricing-edit-disclosure { position: relative; }
.pricing-edit-disclosure > summary { min-height: 34px; padding: 0 10px; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: #344054; font-size: 11px; font-weight: 720; list-style: none; cursor: pointer; }
.pricing-edit-disclosure > summary::-webkit-details-marker { display: none; }
.pricing-edit-disclosure[open] > summary { border-color: #9fc9d2; background: #f2f9fa; color: #08758e; }
.pricing-edit-disclosure > form { min-width: 260px; margin-top: 8px; padding: 12px; display: grid; gap: 9px; border: 1px solid var(--line); border-radius: 7px; background: #fbfcfd; }
.pricing-decision-summary > div { min-width: 0; padding: 13px; border: 1px solid var(--line-soft); border-radius: 7px; background: #f8fafb; }
.pricing-decision-summary p { margin: 4px 0 0; color: #344054; font-size: 11px; }
.approval-steps { margin: 18px 0; padding: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; list-style: none; }
.approval-steps li { min-width: 0; padding: 12px; display: flex; align-items: flex-start; gap: 9px; border: 1px solid var(--line); border-radius: 7px; }
.approval-steps li > b { flex: 0 0 25px; width: 25px; height: 25px; display: grid; place-items: center; border-radius: 6px; background: #eef1f4; color: #667085; font-size: 10px; }
.approval-steps li.done { border-color: #bddfc7; background: #f4fbf6; }
.approval-steps li.done > b { background: var(--success); color: #fff; }
.approval-steps li > span { min-width: 0; display: flex; flex-direction: column; }
.approval-steps strong { font-size: 11px; }
.approval-steps small { margin-top: 2px; color: var(--muted); font-size: 9px; }

@media (max-width: 1040px) {
  .owner-attention-grid { grid-template-columns: repeat(6,minmax(0,1fr)); }
  .owner-attention-card { grid-column: span 2; border-bottom: 1px solid var(--line-soft); }
  .owner-attention-card:nth-child(3) { border-right: 0; }
  .owner-attention-card:nth-last-child(2), .owner-attention-card:last-child { grid-column: span 3; border-bottom: 0; }
  .company-tabs, .workspace-tabs { display: flex; overflow-x: auto; scroll-snap-type: x proximity; }
  .company-tabs a, .workspace-tabs a { flex: 1 0 145px; scroll-snap-align: start; }
  .company-summary-grid { grid-template-columns: 1fr; }
  .record-project-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .pricing-tool-grid { grid-template-columns: 1fr; }
  .pricing-assumption-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .pricing-assumption-note { grid-column: 1 / -1; }
  .company-next-action, .company-known-card { min-height: 0; }
  .project-document-workflow .company-impact-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 720px) {
  .profile-head { gap: 16px; }
  .profile-identity { align-items: flex-start; }
  .split-panels > aside.panel { padding: 16px; }
  .company-setup-shell { gap: 14px; }
  .company-boundary { padding: 12px; }
  .company-tabs, .workspace-tabs { display: none; }
  .company-mobile-tab, .workspace-mobile-tab { margin: 0; display: flex; }
  .company-mobile-tab select, .workspace-mobile-tab select { height: 44px; }
  .company-tab-panel { gap: 18px; }
  .company-section-block + .company-section-block { padding-top: 18px; }
  .company-section-heading { flex-direction: column; gap: 8px; }
  .company-section-heading h2 { font-size: 17px; }
  .company-summary-grid, .company-status-grid, .company-option-grid, .company-source-grid, .company-track-grid, .company-two-column, .company-record-picker, .company-identity-compare { grid-template-columns: 1fr; }
  .record-project-summary { grid-template-columns: 1fr; }
  .record-project-summary__item { min-height: 66px; padding: 11px 12px; }
  .service-reference-picker, .company-choice-fieldset { padding: 13px; }
  .service-reference-intro { align-items: flex-start; flex-direction: column; gap: 8px; }
  .service-reference-options { grid-template-columns: 1fr; }
  .project-document-workflow { padding: 16px; }
  .project-document-workflow .company-impact-list { grid-template-columns: 1fr; }
  [data-company-topic-dialog][open] { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); }
  [data-company-topic-dialog][open] .company-inline-form { padding: 15px; }
  .company-next-action, .company-known-card, .company-track-card, .company-option-card, .company-source-card, .company-record-card, .company-timeline, .company-form-directory, .company-identity-preview, .company-export-preview, .company-empty { padding: 15px; }
  .company-next-details { grid-template-columns: 1fr; }
  .company-metric-row { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .company-metric-row > div { padding: 10px 8px; }
  .company-identity-summary { grid-template-columns: 1fr; }
  .company-record-card { grid-template-columns: minmax(0,1fr) auto; }
  .company-record-card > dl { grid-template-columns: 1fr; }
  .company-actions { flex-direction: column; }
  .company-mini-row { flex-direction: column; gap: 5px; }
  .company-mini-row p { max-width: none; text-align: left; }
  .company-export-counts { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .copy-field { grid-template-columns: 1fr; }
  .copy-field button { min-height: 38px; }
  .company-table, .company-table tbody, .company-table tr { display: block; width: 100%; }
  .company-table thead { display: none; }
  .company-table tr { padding: 8px 13px; border-bottom: 1px solid var(--line); }
  .company-table tr:last-child { border-bottom: 0; }
  .company-table td { width: 100%; min-height: 34px; padding: 6px 0; display: grid; grid-template-columns: minmax(96px,.65fr) minmax(0,1fr); align-items: start; gap: 10px; border: 0; text-align: right; }
  .company-table td::before { content: attr(data-label); color: var(--muted); font-size: 9px; font-weight: 750; text-align: left; text-transform: uppercase; }
  .workspace-safety { margin-bottom: 14px; }
  .workspace-context { align-items: stretch; flex-direction: column; }
  .workspace-context form { flex: 0 0 auto; width: 100%; }
  .pricing-equation, .approval-steps { grid-template-columns: 1fr; }
  .pricing-fit-result dl { grid-template-columns: 1fr; }
  .pricing-export-groups { grid-template-columns: 1fr; }
  .pricing-export-groups .company-row-actions { align-items: stretch; flex-direction: column; }
  .pricing-export-groups .company-row-actions .btn { width: 100%; }
  .pricing-edit-disclosure > form { min-width: 0; }
  .pricing-audit-table .data-table tr, .pricing-compare-table .data-table tr { padding-top: 10px; padding-bottom: 10px; }
  .pricing-assumption-list, .pricing-comparison-list { padding: 10px; }
  .pricing-assumption-card, .pricing-comparison-card { padding: 13px; }
  .pricing-assumption-fields, .pricing-comparison-values { grid-template-columns: 1fr; }
  .pricing-assumption-note { grid-column: auto; }
  .pricing-assumption-actions .btn { width: 100%; }
  .pricing-comparison-values > div { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .pricing-comparison-values > div:last-child { border-bottom: 0; }
}

@media (max-width: 430px) {
  .owner-attention-grid { grid-template-columns: 1fr; }
  .owner-attention-card, .owner-attention-card:nth-last-child(2), .owner-attention-card:last-child { grid-column: auto; border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .owner-attention-card:last-child { border-bottom: 0; }
  .company-metric-row { grid-template-columns: 1fr; }
  .company-metric-row > div { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .company-metric-row > div:last-child { border-bottom: 0; }
  .company-export-counts { grid-template-columns: 1fr; }
  .record-project-summary { grid-template-columns: 1fr; }
  .company-status-card > summary, .company-list-item > summary, .company-selection-details > summary, .company-option-card > summary, .company-form-directory > summary { align-items: flex-start; }
}

/* Keep every surface scrollable while removing visible scrollbar tracks. */
html,
body,
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* Global select system: consistent fallback plus modern customizable selects. */
select:not([multiple]) {
  color-scheme: light;
  padding-right: 32px;
  display: flex;
  align-items: center;
  appearance: none;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235b6878' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m8 10 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  cursor: pointer;
  line-height: 1.2;
  text-overflow: ellipsis;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
select:not([multiple]):hover:not(:disabled) { border-color: #aab8c4; background-color: #fbfcfd; }
select:not([multiple]):focus-visible { border-color: #078daf; outline: 0; box-shadow: 0 0 0 3px rgba(5,170,218,.13); }
select:not([multiple]):disabled { background-color: #f2f4f7; color: #98a2b3; cursor: not-allowed; opacity: 1; }
select option { background: #fff; color: #172033; }

@supports (appearance: base-select) {
  select:not([multiple]),
  ::picker(select) { appearance: base-select; }
  select:not([multiple]) { padding-right: 12px; background-image: none; }
  select:not([multiple])::picker-icon { content: ""; width: 7px; height: 7px; margin-right: 4px; border-right: 1.5px solid #667085; border-bottom: 1.5px solid #667085; rotate: 45deg; transition: rotate .16s ease; }
  select:not([multiple]):open::picker-icon { rotate: 225deg; }
  ::picker(select) { margin-top: 6px; border: 1px solid #d6dee5; border-radius: 8px; background: #fff; box-shadow: 0 14px 32px rgba(16,24,40,.14); }
  select option { padding: 10px 12px; border-radius: 5px; }
  select option:hover,
  select option:focus { background: #eef8fb; }
  select option:checked { background: #e7f6fa; color: #067c9b; font-weight: 700; }
}

/* Document workspace hierarchy: one command bar, one editor, one preview rail. */
.document-editor-route .content { max-width: none; padding: 0; }
.document-editor-route .page-head,
.document-editor-route .document-toolbar { display: none; }
.document-editor-route .document-workspace { margin: 0; }
.document-editor-route .document-split {
  align-items: start;
  grid-template-columns: minmax(0, 1.27fr) minmax(420px, 1fr);
}
.document-editor-route .document-editor { border-right: 0; }
.document-editor-intro { min-height: 70px; padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid #dfe4ea; background: #fff; }
.document-editor-identity { min-width: 0; display: flex; align-items: center; gap: 11px; }
.document-editor-identity > [data-icon] { flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #d8e8ed; border-radius: 8px; background: #f1f8fa; color: #087b97; }
.document-editor-identity svg { width: 17px; height: 17px; stroke-width: 1.8; }
.document-editor-identity h1 { margin: 0; overflow: hidden; color: #172033; font-size: 21px; font-weight: 760; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.document-editor-route .document-preview-pane {
  position: sticky;
  top: 56px;
  max-height: calc(100vh - 56px);
  max-height: calc(100svh - 56px);
  overflow-y: auto;
  border-left: 1px solid #dfe4ea;
}
.document-editor-route .preview-toolbar { top: 0; z-index: 3; padding: 4px 0; background: #eef1f4; }
.preview-toolbar-actions { display: flex; align-items: center; gap: 6px; }
.document-preview-close,
.topbar-preview-toggle { display: none; }

/* Compact service mode switcher plus aligned guided fields. */
.service-path-options { align-items: stretch; }
.service-path-option { height: 100%; }
.service-path-option strong { display: block; line-height: 1.2; }
.service-guide-fields { align-items: stretch; }
.service-guide-fields > .field { height: 100%; grid-template-rows: 36px 42px; align-content: start; }
.service-guide-fields > .field > span:first-child { min-height: 36px; display: flex; align-items: flex-end; line-height: 1.35; }
.service-guide-fields > .field > select { width: 100%; height: 42px; }

@media (max-width: 1180px) {
  .document-editor-route .document-split { display: block; }
  .document-editor-route .document-preview-pane {
    position: fixed;
    z-index: 70;
    inset: 56px 0 0 var(--sidebar);
    max-height: none;
    padding: 12px 18px 30px;
    display: none;
    overflow: auto;
    overscroll-behavior: contain;
    border-top: 0;
    border-left: 1px solid #dfe4ea;
    background: #eef1f4;
  }
  .document-preview-open { overflow: hidden; }
  .document-preview-open .document-preview-pane { display: block; }
  .topbar-preview-toggle { display: inline-flex; }
  .document-preview-close { width: 34px; height: 34px; display: grid; }
  .document-editor-route .preview-toolbar { position: sticky; top: 0; padding: 4px 0 10px; }
  .document-editor-route .invoice-paper { max-width: 794px; }
}

@media (max-width: 940px) {
  .document-editor-route .document-preview-pane { left: 0; }
}

@media (max-width: 720px) {
  .document-editor-route .content { padding-bottom: 76px; }
  .document-editor-intro { min-height: 64px; padding: 14px 16px; }
  .document-editor-identity h1 { font-size: 18px; }
  .service-path-option strong { min-height: 0; }
  .service-guide-fields > .field { grid-template-rows: auto 42px; }
  .service-guide-fields > .field > span:first-child { min-height: 0; }
  .document-editor-route .document-preview-pane { padding: 8px 10px 24px; }
  .preview-toolbar-actions .btn { display: none; }
}

@media (max-width: 520px) {
  .topbar.is-document-editor .topbar-preview-toggle { width: 36px; padding: 0; }
  .topbar.is-document-editor .topbar-preview-toggle > span:last-child { display: none; }
}

@media (forced-colors: active) {
  select:not([multiple]) { appearance: auto; background-image: none; }
}

/* Service picker clarity and interaction feedback. */
.service-picker-field-label { margin: 0 0 6px; display: block; color: #475467; font-size: 10px; font-weight: 740; letter-spacing: .025em; }
.service-picker-field-label .service-picker-search { width: 100%; margin: 5px 0 4px; font-size: 12px; font-weight: 500; letter-spacing: 0; }
.service-picker-categories { scrollbar-width: thin; }
.service-picker-option[hidden] { display: none; }
.item-mode-toggle button { transition: background-color .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease; }
.item-mode-toggle button:hover { transform: translateY(-1px); }
.item-description-field:not([hidden]) { animation: invoice-field-enter .2s cubic-bezier(.2,.75,.3,1) both; }
.service-guide-dialog[open], .custom-item-dialog[open] { animation: invoice-dialog-enter .22s cubic-bezier(.2,.75,.3,1) both; }
.service-guide-dialog[open]::backdrop, .custom-item-dialog[open]::backdrop { animation: invoice-backdrop-enter .2s ease both; }
@keyframes invoice-field-enter { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes invoice-dialog-enter { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes invoice-backdrop-enter { from { opacity: 0; } to { opacity: 1; } }

/* 2026 document, project and guided-service refinement. */
body.invoice-dialog-open,
body.service-picker-open { overflow: hidden; overscroll-behavior: none; }
.service-guide-dialog,
.custom-item-dialog,
.quick-client-dialog { overscroll-behavior: contain; scrollbar-width: none; }
.service-guide-dialog::-webkit-scrollbar,
.custom-item-dialog::-webkit-scrollbar,
.quick-client-dialog::-webkit-scrollbar,
.service-picker-options::-webkit-scrollbar,
.service-category-popover::-webkit-scrollbar,
.document-preview-pane::-webkit-scrollbar { width: 0; height: 0; }
.service-picker-options,
.service-category-popover,
.document-preview-pane { scrollbar-width: none; }

.issued-revision-notice { margin: 16px 24px 0; padding: 11px 13px; display: flex; align-items: flex-start; gap: 10px; border: 1px solid #c8e1e6; border-radius: 9px; background: #f3fafb; color: #315466; }
.issued-revision-notice strong { flex: 0 0 auto; color: #086f86; font-size: 11px; }
.issued-revision-notice span { font-size: 10px; line-height: 1.5; }

.service-guide-infrastructure { margin: 14px 0 0; padding: 14px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; border: 1px solid var(--line); border-radius: 9px; }
.service-guide-infrastructure legend { padding: 0 6px; color: #344054; font-size: 11px; font-weight: 740; }
.service-guide-infrastructure > div { min-width: 0; display: grid; gap: 8px; }
.service-guide-infrastructure strong { margin-bottom: 1px; color: #172033; font-size: 11px; }
.service-guide-infrastructure label { display: flex; align-items: center; gap: 8px; color: #526174; font-size: 10px; }
.service-guide-infrastructure input { width: 16px; height: 16px; accent-color: #087f99; }
.service-guide-extras label[hidden], .service-guide-infrastructure[hidden] { display: none; }

/* The service chooser behaves as a contained overlay, not a page-height expander. */
.service-picker-menu { position: fixed; z-index: 220; top: 50%; right: auto; bottom: auto; left: 50%; width: min(680px, calc(100vw - 48px)); height: min(76svh,720px); max-height: min(76svh,720px); overflow: hidden; transform: translate(-50%,-50%); border-radius: 14px; box-shadow: 0 28px 80px rgba(4,20,34,.28); }
.service-picker-menu.is-open { display: block; }
.service-picker-options { max-height: calc(100% - 137px); overflow-y: auto; }
.service-picker-open::after { content: ""; position: fixed; z-index: 79; inset: 0; background: rgba(4,17,29,.25); pointer-events: none; }
.service-picker-open .service-picker.is-open { position: relative; z-index: 221; }
.service-picker-open .service-picker.is-open .service-picker-menu { pointer-events: auto; }
.item-row { padding-top: 72px; }
.item-mode-toggle { top: 15px; left: 52px; }
.item-description:has(.service-picker.is-open) { position: static; }
.item-row > [data-remove-item] { top: 15px; }

/* Project detail: compact facts and grouped actions. */
.project-actionbar { min-height: 64px; margin-bottom: 16px; padding: 10px 12px; display: flex; align-items: center; justify-content: flex-start; gap: 8px; border: 1px solid #e2e8ee; border-radius: 12px; background: rgba(255,255,255,.9); box-shadow: 0 5px 18px rgba(16,24,40,.045); }
.project-action-group { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.project-action-primary { margin-left: 4px; padding-left: 12px; border-left: 1px solid #e3e8ed; }
.project-actionbar .btn { min-height: 40px; border-radius: 8px; transition: transform .18s ease,box-shadow .18s ease,background-color .18s ease; }
.project-actionbar .btn:hover { transform: translateY(-1px); }
.project-summary { min-height: 0; margin-bottom: 18px; padding: 20px; display: grid; grid-template-columns: minmax(190px,.8fr) minmax(260px,1.4fr); gap: 18px 28px; }
.project-summary-main { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 4px 10px; }
.project-summary-main .label { grid-column: 1 / -1; }
.project-summary-main strong { overflow-wrap: anywhere; font-size: 17px; }
.project-progress-summary { min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.project-progress-summary > div { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; }
.project-progress-summary strong { font-variant-numeric: tabular-nums; }
.project-summary .label,
.project-summary-facts dt { color: #667085; font-size: 9px; font-weight: 760; letter-spacing: .045em; text-transform: uppercase; }
.project-summary-facts { grid-column: 1 / -1; margin: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border-top: 1px solid var(--line-soft); }
.project-summary-facts > div { min-width: 0; padding: 14px 18px 0 0; display: flex; flex-direction: column; gap: 4px; }
.project-summary-facts dd { margin: 0; color: #172033; font-size: 15px; font-weight: 720; font-variant-numeric: tabular-nums; }

/* Projects list: compact control bar and premium, readable rows. */
.projects-filterbar { min-height: 60px; margin-bottom: 14px; padding: 9px 12px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid #e1e7ed; border-radius: 12px; background: #fff; box-shadow: 0 4px 14px rgba(16,24,40,.035); }
.projects-status-filter { display: flex; align-items: center; gap: 10px; }
.projects-status-filter label { color: #475467; font-size: 10px; font-weight: 740; }
.projects-status-filter select { width: auto; min-width: 174px; height: 40px; }
.projects-result-count { padding-right: 5px; color: #667085; font-size: 10px; font-weight: 680; }
.projects-table-panel { overflow: hidden; }
.projects-table { table-layout: fixed; }
.projects-table th:first-child { width: 22%; }
.projects-table th:nth-child(4) { width: 17%; }
.projects-table th:last-child { width: 64px; }
.projects-table tbody tr { transition: background-color .16s ease,box-shadow .16s ease; }
.projects-table tbody tr:hover { background: #f8fbfc; box-shadow: inset 3px 0 0 #1593ad; }
.projects-table td { padding-top: 16px; padding-bottom: 16px; }
.project-progress-cell { display: grid; grid-template-columns: minmax(80px,1fr) 34px; align-items: center; gap: 9px; }
.project-progress-cell small { color: #667085; text-align: right; font-variant-numeric: tabular-nums; }

/* Invoice detail reads like a centered document and never widens the page. */
.invoice-detail-page { overflow-x: hidden; }
.invoice-detail-page .document-detail-grid { grid-template-columns: minmax(0, 860px) minmax(280px,320px); justify-content: center; align-items: start; }
.invoice-detail-page .document-detail-grid > .panel { border-radius: 12px; box-shadow: 0 8px 28px rgba(16,24,40,.06); }
.invoice-detail-page .table-scroll { overflow-x: hidden; }
.invoice-detail-page .data-table { width: 100%; table-layout: fixed; }
.invoice-detail-page .data-table th:first-child { width: 36%; }
.invoice-detail-page .data-table td:first-child { overflow-wrap: anywhere; }
.invoice-detail-page .data-table th,
.invoice-detail-page .data-table td { padding-right: 12px; padding-left: 12px; }
.invoice-detail-page .detail-side { position: sticky; top: 74px; }
.invoice-detail-page .detail-side .panel { overflow: hidden; border-radius: 12px; }

.domain-form .domain-long-field { margin-top: 10px; padding-top: 16px; gap: 8px; border-top: 1px solid var(--line-soft); }
.domain-form .domain-long-field > span { margin-bottom: 2px; }
.domain-form .domain-long-field > small { margin-top: -2px; color: #667085; font-size: 10px; }

@media (max-width: 1180px) {
  .service-picker-menu { width: min(680px,calc(100vw - 48px)); }
  .invoice-detail-page .document-detail-grid { grid-template-columns: minmax(0,860px); }
  .invoice-detail-page .detail-side { width: min(860px,100%); position: static; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .invoice-detail-page .detail-side > .panel:first-child { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .issued-revision-notice { margin: 12px 16px 0; flex-direction: column; gap: 3px; }
  .service-guide-infrastructure { grid-template-columns: 1fr; }
  .custom-item-dialog.custom-item-dialog[open] { inset: 0; width: calc(100vw - 24px); max-width: calc(100vw - 24px); max-height: calc(100svh - 24px); margin: auto; }
  .service-picker-menu { top: 50%; right: auto; bottom: auto; left: 50%; width: calc(100vw - 24px); height: min(82svh,620px); max-height: min(82svh,620px); transform: translate(-50%,-50%); border-radius: 14px; }
  .service-picker-menu::before { display: none; }
  .service-picker-options { max-height: calc(min(76svh,620px) - 160px); }
  .project-actionbar { display: grid; grid-template-columns: 1fr; }
  .project-action-group { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .project-action-primary { margin-left: 0; padding-left: 0; border-left: 0; }
  .project-actionbar .btn { width: 100%; min-width: 0; }
  .project-summary { grid-template-columns: 1fr; gap: 18px; }
  .project-summary-facts { grid-column: auto; grid-template-columns: 1fr; }
  .project-summary-facts > div { padding: 11px 0; flex-direction: row; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line-soft); }
  .projects-filterbar { align-items: stretch; flex-direction: column; gap: 8px; }
  .projects-status-filter { align-items: stretch; flex-direction: column; gap: 5px; }
  .projects-status-filter select { width: 100%; }
  .projects-result-count { padding: 0; }
  .invoice-detail-page .detail-side { grid-template-columns: 1fr; }
  .invoice-detail-page .detail-side > .panel:first-child { grid-column: auto; }
  .invoice-detail-page .detail-document-head { grid-template-columns: 1fr; }
  /* Line items use the labelled mobile-card layout; a forced min-width hid every value off-screen. */
  .invoice-detail-page .table-scroll { overflow: visible; }
  .invoice-detail-page .data-table { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .project-actionbar .btn,
  .projects-table tbody tr { transition: none; }
}

/* Payments: overview, compact entry workflow, then the audit ledger. */
.payment-summary { margin-bottom: 16px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.payment-summary article { min-width: 0; padding: 15px 17px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: var(--shadow); }
.payment-summary small { color: #667085; font-size: 9px; font-weight: 760; letter-spacing: .045em; text-transform: uppercase; }
.payment-summary strong { margin-top: 5px; color: #152238; font-size: 20px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.payment-summary span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.payment-entry-panel { margin-bottom: 16px; }
.payment-entry-form { padding: 18px; display: grid; grid-template-columns: repeat(12,minmax(0,1fr)); align-items: end; gap: 14px; border-top: 1px solid var(--line-soft); }
.payment-entry-form .field { min-width: 0; }
.payment-entry-form .field > span { min-height: auto; margin-bottom: 7px; }
.payment-entry-form input, .payment-entry-form select, .payment-entry-form textarea { width: 100%; min-width: 0; }
.payment-invoice-field { grid-column: span 5; }
.payment-entry-form > .field:nth-of-type(2) { grid-column: span 2; }
.payment-entry-form > .field:nth-of-type(3) { grid-column: span 2; }
.payment-entry-form > .field:nth-of-type(4) { grid-column: span 3; }
.payment-entry-form > .field:nth-of-type(5) { grid-column: 1 / span 4; }
.payment-notes-field { grid-column: 5 / span 8; }
.payment-notes-field textarea { min-height: 42px; height: 42px; resize: vertical; }
.payment-entry-action { grid-column: 11 / span 2; display: flex; justify-content: flex-end; }
.payment-entry-action .btn { width: 100%; min-height: 42px; }
.payment-history-panel .panel-head { border-bottom: 1px solid var(--line-soft); }
.payment-table .payment-reversed { opacity: .62; text-decoration: none; }
.payment-table .payment-reversed td:not(:last-child) { color: #667085; }
.payment-row-action { width: 1%; white-space: nowrap; }
.payment-row-action form { display: inline-flex; }

/* Clients: archived records stay discoverable and recoverable. */
.client-list-tools { min-height: 58px; margin-bottom: 16px; padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid #e0e7ed; border-radius: 12px; background: rgba(255,255,255,.9); box-shadow: 0 4px 16px rgba(16,24,40,.045); }
.client-view-tabs { display: inline-flex; align-items: center; gap: 4px; }
.client-view-tabs a { min-height: 40px; padding: 0 11px; position: relative; display: inline-flex; align-items: center; gap: 8px; border: 1px solid transparent; border-radius: 9px; color: #667085; font-size: 11px; font-weight: 720; transition: border-color .18s ease,background-color .18s ease,color .18s ease,transform .18s ease; }
.client-view-tabs a:hover { border-color: #dce7eb; background: #f5fafb; color: #075f73; transform: translateY(-1px); }
.client-view-tabs a.active { border-color: #c5e4e9; background: #eaf7f9; color: #066f87; box-shadow: inset 0 0 0 1px rgba(8,127,153,.03); }
.client-view-tabs a span { min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center; border-radius: 999px; background: #edf1f4; color: #667085; font-size: 9px; font-weight: 760; font-variant-numeric: tabular-nums; transition: background-color .18s ease,color .18s ease; }
.client-view-tabs a.active span { background: #087f99; color: #fff; }
.client-list-tools .search-field { width: min(420px,45vw); }

@media (max-width: 980px) {
  .payment-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .payment-entry-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .payment-entry-form > .field:nth-of-type(n), .payment-invoice-field, .payment-notes-field { grid-column: auto; }
  .payment-invoice-field, .payment-notes-field { grid-column: 1 / -1; }
  .payment-entry-action { grid-column: 2; }
}

@media (max-width: 720px) {
  .client-list-tools { align-items: stretch; flex-direction: column; }
  .client-view-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .client-view-tabs a { padding: 0 8px; justify-content: center; }
  .client-list-tools .search-field { width: 100%; }
  .payment-summary { gap: 8px; }
  .payment-summary article { padding: 12px; }
  .payment-summary strong { font-size: 17px; }
  .payment-entry-form { padding: 14px; grid-template-columns: 1fr; gap: 12px; }
  .payment-invoice-field, .payment-notes-field, .payment-entry-action { grid-column: 1; }
  .payment-entry-action .btn { width: 100%; }
  .payment-table, .payment-table tbody, .payment-table tr { display: block; width: 100%; }
  .payment-table thead { display: none; }
  .payment-table tr { padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .payment-table td { min-height: 31px; padding: 5px 0; display: grid; grid-template-columns: minmax(90px,.7fr) minmax(0,1fr); gap: 12px; border: 0; text-align: right; }
  .payment-table td::before { content: attr(data-label); color: #667085; font-size: 9px; font-weight: 750; text-align: left; text-transform: uppercase; }
  .payment-table .payment-row-action { width: 100%; display: flex; justify-content: flex-end; }
  .payment-table .payment-row-action::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media print {
  .sidebar, .topbar, .mobile-nav, .sidebar-backdrop, .page-head, .page-actions, .dashboard-actions { display: none !important; }
  .app-main { margin: 0; }
  .content { max-width: none; padding: 0; }
  .panel { box-shadow: none; }
}

/* App-styled confirm / reason dialog. */
.app-confirm-dialog { width: min(460px, calc(100% - 32px)); }
.app-confirm-dialog .quick-client-head { margin-bottom: 14px; }
.app-confirm-dialog .quick-client-head h2 { font-size: 19px; }
.app-confirm-dialog .quick-client-head p { font-size: 13px; line-height: 1.5; }
.app-confirm-field { display: grid; gap: 6px; }
.app-confirm-field textarea { width: 100%; min-height: 84px; resize: vertical; }
.app-confirm-dialog .quick-client-close { font-size: 20px; line-height: 1; }
@media (max-width: 720px) { .app-confirm-dialog .quick-client-actions { flex-direction: column-reverse; } .app-confirm-dialog .quick-client-actions .btn { width: 100%; } }

/* ==========================================================================
   UI review fixes (Oct 2026): alignment, overflow, symmetry
   ========================================================================== */

/* Sidebar: every link fits on a 900px-tall screen, so Settings is no longer cut off. */
.nav-list { padding-top: 14px; padding-bottom: 14px; }
.nav-section + .nav-section { margin-top: 13px; }
.nav-link { min-height: 36px; }
@media (max-height: 820px) { .nav-link { min-height: 33px; } .nav-section + .nav-section { margin-top: 10px; } }

/* Dashboard KPI cards: labels and values line up across all four cards. */
.kpi-rail .kpi { align-items: flex-start; }

/* List filters: the search box was squeezed to 0px wide by the status select. */
.filter-row .search-field { flex: 1 1 320px; max-width: none; }
.filter-row > select { flex: 0 0 210px; width: 210px; }
@media (max-width: 720px) { .filter-row { flex-wrap: wrap; } .filter-row .search-field { flex-basis: 100%; } .filter-row > select { flex: 1 1 auto; width: auto; } }

/* Tables: document numbers never break over two lines; text columns read left-aligned. */
@media (min-width: 721px) { .data-table td:first-child, .data-table th:first-child { text-align: left; } }
.data-table td:first-child strong, .data-table td:first-child a { white-space: nowrap; }
@media (min-width: 721px) {
  .table-panel .data-table td:nth-child(2), .table-panel .data-table td:nth-child(3),
  .table-panel .data-table th:nth-child(2), .table-panel .data-table th:nth-child(3) { text-align: left; }
}

/* Cancelled register: one record no longer leaves an empty half-width column. */
.cancelled-register .record-grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

/* Invoice / quote editor: a long client name stays on one line instead of being cropped. */
.document-client-control select { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 34px; }
/* Line item: description box matches the catalogue picker height and top edge. */
.item-description-field > input { height: 48px; min-height: 48px; }
.item-description { align-items: start; }

/* Guided service dialog: full-width field, no tall empty area under step one. */
.service-guide-step > .field { max-width: none; }
.service-guide-steps { min-height: 220px; }

/* Invoice / quote detail: both columns end on the same line (no gap under the shorter card). */
.document-detail-grid { align-items: stretch; }
.document-detail-grid > .panel { height: 100%; }
.detail-side > .panel > h3 { margin: 0; padding: 16px 18px; border-bottom: 1px solid var(--line-soft); font-size: 15px; }
.detail-side > .panel > h3 + p { padding: 14px 18px 16px; margin: 0; }

/* Settings tabs: scroll sideways instead of cropping "Security & activity"; selected tab is a soft pill. */
.settings-nav { overflow-x: auto; scrollbar-width: none; }
.settings-nav::-webkit-scrollbar { display: none; }
.settings-nav ul { padding: 6px; gap: 4px; }
.settings-nav li { flex: 1 0 auto; }
.settings-nav li + li::before { display: none; }
.settings-nav a { min-height: 40px; padding: 0 14px; border-radius: 999px; }
.settings-nav a::after { display: none; }
.settings-nav a.active { background: rgba(8,120,143,.1); color: #075e70; box-shadow: inset 0 0 0 1px rgba(8,120,143,.18), 0 1px 2px rgba(16,24,40,.06); }

/* Services category tabs: pill for the selected category instead of an underline. */
.services-pricing-page .catalog-tabs, .catalog-tabs { gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: #fff; min-height: 0; width: fit-content; max-width: 100%; }
.services-pricing-page .catalog-tabs a, .catalog-tabs a { min-height: 36px; padding: 0 14px; border-radius: 999px; }
.services-pricing-page .catalog-tabs a.active::after, .catalog-tabs a.active::after, .catalog-tabs a::after { display: none; }
.services-pricing-page .catalog-tabs a.active, .catalog-tabs a.active { background: rgba(5,170,218,.1); color: #04779b; box-shadow: inset 0 0 0 1px rgba(5,170,218,.22); }

/* File inputs: styled button instead of the browser default. */
input[type="file"] { width: 100%; padding: 6px; border: 1px dashed #c7d1db; border-radius: 8px; background: #fafcfd; color: #475467; font-size: 12px; }
input[type="file"]::file-selector-button { margin-right: 12px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); font-weight: 650; cursor: pointer; }

/* Payments: the entry form has its own submit button. */
.payment-entry-submit { display: flex; justify-content: flex-end; grid-column: 1 / -1; }

/* Mobile: the single danger action spans the full width; status pills keep their natural size. */
@media (max-width: 720px) {
  .record-action-danger, .record-action-danger form, .record-action-danger .btn { width: 100%; grid-column: 1 / -1; }
  .data-table td .badge { justify-self: end; width: auto; }
  .catalog-tabs { width: 100%; border-radius: 12px; }
}
.payment-entry-form input, .payment-entry-form select { height: 42px; }
.payment-entry-form .payment-notes-field textarea { height: 42px; min-height: 42px; resize: vertical; }
/* Desktop tables: short values (names, numbers, dates, money) stay on one line. */
@media (min-width: 1100px) {
  .table-panel .data-table td, .payment-table td { white-space: nowrap; }
  .table-panel .data-table td:first-child { white-space: normal; }
}
.data-table td a[href*="/invoices/"], .data-table td a[href*="/quotes/"], .payment-table td strong { white-space: nowrap; }
/* Quote detail: Terms card grows so both columns end on the same line. */
.document-detail-grid > .detail-side > .panel:last-child { flex: 1 1 auto; }
/* Mobile line item header: drag handle | mode toggle | delete icon, with no overlap. */
@media (max-width: 720px) {
  .item-row .item-mode-toggle { top: 10px; left: 58px; right: 56px; width: auto; }
  .item-row > [data-remove-item], .item-row [data-remove-item] { top: 10px; right: 12px; width: 38px; height: 38px; padding: 0; justify-content: center; }
  .item-row [data-remove-item] .remove-label { display: none; }
  .item-mode-toggle button { padding: 0 8px; white-space: nowrap; }
}
@media (max-width: 720px) {
  /* Long labels wrap inside the button instead of overflowing it. */
  .record-actionbar .btn { white-space: normal; text-align: center; line-height: 1.2; }
  /* An odd last secondary action spans the row so the grid stays even. */
  .record-action-secondary > form, .record-action-secondary > .btn { grid-column: 1 / -1; }
  /* Payment history cards: every value lines up on the right edge. */
  .payment-table td { text-align: right; }
  .payment-table td > * { justify-self: end; text-align: right; }
}
