:root {
  font-family: -apple-system, BlinkMacSystemFont, Inter, "Segoe UI", sans-serif;
  color: #19222e;
  background: #f2f4f8;
  --ink: #19222e;
  --muted: #546276;
  --line: #dfe5ee;
  --accent: #005cbe;
  --surface: #fff;
  --budget: #eef5ff;
  --actual: #eaf7ef;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, .table:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.shell { display: grid; min-height: 100dvh; grid-template-columns: 235px minmax(0,1fr); }
aside { background: #fbfcfe; border-right: 1px solid var(--line); padding: 26px 15px 16px; display: flex; flex-direction: column; }
.brand { display: flex; gap: 12px; align-items: center; margin: 2px 7px 26px; text-decoration: none; color: var(--ink); font-weight: 750; }
.brand > span { flex: none; display: grid; place-items: center; width: 40px; height: 40px; background: linear-gradient(145deg,#284465,#151f34); color: white; border-radius: 13px; box-shadow: 0 4px 10px #14274429; }
small { display: block; font-size: .78rem; line-height: 1.45; color: var(--muted); font-weight: 500; }
.dashboard-brand { flex-direction: column; align-items: flex-start; gap: 8px; }
.dashboard-brand img { display: block; width: 132px; height: auto; border-radius: 7px; }
.brand small { display: block; margin-top: 2px; }
nav { display: grid; gap: 3px; }
nav a { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 8px 11px; border-radius: 10px; text-decoration: none; color: #3f4b5e; font-weight: 560; font-size: .86rem; }
nav a:hover { background: #f0f3f8; }
nav a[aria-current=page] { background: #eaf2ff; color: #0054ad; font-weight: 720; }
nav svg { width: 18px; height: 18px; flex: none; }
footer { margin-top: auto; padding: 18px 10px 3px; color: var(--muted); font-size: .76rem; display: flex; justify-content: space-between; }
#menuToggle,.mobile-dock { display: none; }
main { width: 100%; min-width: 0; max-width: 1580px; margin-inline: auto; padding: 0 clamp(17px,3vw,44px) 44px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 76px; border-bottom: 1px solid var(--line); }
.filters,.actions,.period-picker { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filters label { display: grid; gap: 3px; min-width: 0; font-size: .72rem; color: var(--muted); font-weight: 680; }
.filters select { padding-block: 6px; font-size: .83rem; }
#status:not(:empty) { padding: 12px 14px; margin-top: 12px; border-radius: 12px; background: var(--budget); }
.heading { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 14px; margin: 28px 0 20px; }
h1 { margin: 0 0 8px; font-size: clamp(2rem,4vw,3.25rem); letter-spacing: -.055em; line-height: 1.02; font-weight: 760; overflow-wrap: anywhere; }
h2 { margin: 0 0 6px; font-size: 1.13rem; letter-spacing: -.025em; }
p { margin: 0; line-height: 1.55; color: var(--muted); }
.heading p,.card>p { max-width: 78ch; }
.grid,.stack { display: grid; gap: 15px; }
.split { grid-template-columns: minmax(0,1.25fr) minmax(0,1fr); margin-block: 15px; }
.metrics { grid-template-columns: repeat(4,minmax(0,1fr)); margin: 16px 0; }
.card { min-width: 0; border: 1px solid #e3e8f0; background: var(--surface); border-radius: 21px; padding: clamp(15px,2vw,22px); box-shadow: 0 3px 12px #223b6208; }
#content>.card+.card,#content>.card+.stack { margin-top: 15px; }
.command { position: relative; display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 20px; padding: clamp(24px,4.5vw,50px); margin: 22px 0 15px; border-radius: 26px; color: #fff; background: radial-gradient(ellipse at 100% 0,#346caa 0%,transparent 68%),linear-gradient(125deg,#14243d,#1d385b); box-shadow: 0 9px 24px #152e5624; }
.command h1 { max-width: 21ch; }
.command small,.command p { color: #e3edff; }
.command small { margin-bottom: 11px; font-weight: 700; }
.command .primary { background: #cde6ff; color: #123c63; border-color: #cde6ff; }
.metric-link { display: block; text-decoration: none; color: inherit; }
.metric-link:hover { border-color: #a2bee1; box-shadow: 0 6px 18px #23457213; }
.metric strong { display: block; margin: 7px 0 3px; font-size: clamp(1.2rem,2.5vw,1.9rem); letter-spacing: -.045em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.direction-launch { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 15px; }
.direction-launch a { border-top: 3px solid #5183c7; padding: 14px; }
.direction-launch a:nth-child(2) { border-top-color: #398475; }
.direction-launch a:nth-child(3) { border-top-color: #7960af; }
.direction-launch a:nth-child(4) { border-top-color: #a96637; }
.direction-launch strong { display: block; margin-bottom: 4px; }
button,.button { display: inline-flex; align-items: center; justify-content: center; min-height: 37px; padding: 7px 13px; border: 1px solid #d6dfec; background: #fff; color: #153351; border-radius: 10px; text-decoration: none; cursor: pointer; font-size: .83rem; font-weight: 670; text-align: center; }
.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button:hover,.button:hover { filter: brightness(.96); }
button:disabled { opacity: .5; cursor: wait; }
.text { color: var(--accent); border-color: transparent; background: #edf4ff; min-height: 31px; padding: 5px 9px; }
.danger { color: #a22632; }
button+button { margin-left: 4px; }
select,input,textarea { width: 100%; min-width: 0; min-height: 35px; padding: 7px 9px; border: 1px solid #c9d4e2; border-radius: 9px; color: var(--ink); background: #fff; }
textarea { min-height: 88px; resize: vertical; }
.actions select { width: auto; }
.tag { display: inline-block; padding: 4px 8px; border-radius: 999px; background: #e8f3fc; color: #174b7c; font-size: .73rem; font-weight: 680; }
.demo,.tag.warn { background: #fff1d7; color: #754900; }
.positive { color: #176448; }
.negative { color: #a52632; }
.muted { color: var(--muted); }

/* Financial statements, editable sheets and registers */
.table { overflow: auto; max-width: 100%; margin-top: 12px; border: 1px solid var(--line); border-radius: 13px; scrollbar-color: #acb9cc #eef2f7; }
table { width: 100%; border-spacing: 0; font-size: .84rem; white-space: nowrap; }
td,th { padding: 10px 11px; text-align: left; vertical-align: middle; border-bottom: 1px solid #e7ecf3; }
thead th { background: #edf1f7; color: #3c4a60; font-weight: 730; }
tbody tr { --row: #fff; }
tbody tr:nth-child(even) { --row: #f8fafc; }
tbody tr:hover { --row: #f1f5fb; }
tbody tr.rollup { --row: #eaf1fc; font-weight: 730; }
tbody tr.category { --row: #e4ebf5; color: #203853; font-weight: 750; }
tbody td,tbody th { background: var(--row); }
tbody th { font-weight: inherit; }
tbody tr:last-child>* { border-bottom: 0; }
.table tr>*:first-child { position: sticky; left: 0; z-index: 1; border-right: 1px solid #dfe6f0; }
.table thead tr>*:first-child { z-index: 2; }
.table tbody tr>*:first-child { white-space: normal; min-width: 112px; max-width: 230px; overflow-wrap: anywhere; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.budget-col { background: var(--budget); }
.actual-col { background: var(--actual); }
.rollup .budget-col { background: #dceaff; }
.rollup .actual-col { background: #dbefe3; }
.report-table,#salesForm .table { max-height: min(66vh,620px); }
.report-table thead,#salesForm thead { position: sticky; top: 0; z-index: 3; }
.report-table thead tr:first-child th:not(:first-child) { text-align: center; }
.report-table thead tr:nth-child(2)>th:first-child { position: static; }
.report-table input,#salesForm input,#kpiForm input { width: 102px; min-height: 34px; text-align: right; font-variant-numeric: tabular-nums; }
.report-amount { position: relative; display: inline-block; }
.report-table .report-amount input { padding-inline-end: 1.65em; appearance: textfield; }
.report-amount input::-webkit-inner-spin-button,
.report-amount input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.report-currency {
  position: absolute;
  inset-inline-end: .55em;
  inset-block-start: 50%;
  transform: translateY(-50%);
  color: #526176;
  pointer-events: none;
}
.report-table input[data-annual] { font-weight: 730; }
.report-table :is(td,th):focus-within,#salesForm td:focus-within,#kpiForm td:focus-within { box-shadow: inset 0 0 0 2px #679ddd; }
.report-actions { margin-block: 12px 0; }
.report-actions label,.direction-filters label { display: flex; gap: 7px; align-items: center; color: var(--muted); font-size: .85rem; }
.report-actions [role=status] { color: var(--muted); font-size: .83rem; }
.direction-filters { margin-bottom: 13px; }

.list { display: grid; margin-top: 9px; }
.entry { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.entry:last-child { border-bottom: 0; }
.entry p { white-space: pre-wrap; overflow-wrap: anywhere; }
.entry strong,.initiative h3 { overflow-wrap: anywhere; }
.notice,.error { padding: 10px 13px; border-radius: 10px; margin-top: 12px; }
.notice { background: #fff4df; border-left: 3px solid #b57a29; }
.error { background: #ffebed; color: #8f2431; }
.budget-shortcuts,.strategy-summary,.finance-tools,.initiative-grid,.cash-net { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,160px),1fr)); gap: 10px; margin: 12px 0 0; }
.budget-shortcuts>div,.strategy-summary>div,.finance-tools a,.cash-net>div { padding: 11px; border-radius: 12px; background: #f1f5fa; }
.budget-shortcuts>div,.finance-tools a { display: grid; gap: 6px; }
.finance-tools a { text-decoration: none; }
.strategy-summary strong { display: block; margin-top: 5px; }
.initiative-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,245px),1fr)); }
.initiative { padding: 12px; min-width: 0; border: 1px solid var(--line); border-radius: 14px; }
.initiative h3 { margin: 5px 0; }
.progress-label { display: grid; gap: 4px; margin-block: 8px; font-size: .85rem; }
progress { width: 100%; accent-color: var(--accent); }
.cash-net dt { color: var(--muted); font-size: .78rem; }
.cash-net dd { margin: 4px 0 0; font-size: 1.15rem; font-weight: 740; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.chart { display: block; width: 100%; height: auto; margin: 10px 0 4px; }
.chart text { fill: #536379; font-size: 11px; }
.chart .axis { stroke: #c7d5e6; }
.chart .line { fill: none; stroke: #0066cc; stroke-width: 3; }
.chart .area { fill: #e7f1fe; }
.chart-wrap { overflow: auto; }
.chart-wrap>.chart { min-width: 430px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 7px 15px; margin-block: 6px; color: var(--muted); font-size: .8rem; }
.chart-legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; background: #0066cc; }
.chart-legend .series-1::before { background: #597786; }
.chart-legend .series-2::before { background: #a45416; }
.chart-legend .series-3::before { background: #25764d; }
.chart a:hover rect,.chart a:focus rect { opacity: .72; }
dialog { width: min(570px,calc(100% - 26px)); max-height: 88dvh; border: 1px solid var(--line); border-radius: 21px; padding: 22px; color: var(--ink); box-shadow: 0 18px 72px #11274140; }
dialog::backdrop { background: #111f3766; backdrop-filter: blur(5px); }
.form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 14px; }
.form label { display: grid; gap: 4px; align-content: start; font-size: .82rem; font-weight: 640; }
.form .wide,.form .actions { grid-column: 1/-1; }
.form .actions { justify-content: flex-end; }
@media(min-width:761px) {
  aside { position: sticky; top: 0; align-self: start; height: 100dvh; overflow: auto; }
}
@media(max-width:1100px) {
  .metrics,.direction-launch { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .top { flex-wrap: wrap; padding-block: 10px; }
}
@media(max-width:760px) {
  .shell { display: block; }
  aside { flex-flow: row wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 14px; border: 0; border-bottom: 1px solid var(--line); }
  .brand { margin: 0; }
  .dashboard-brand { flex-direction: row; align-items: center; flex: 1 1 190px; }
  .dashboard-brand img { width: 78px; flex: none; }
  .brand span { width: 36px; height: 36px; }
  #menuToggle { display: inline-flex; gap: 4px; }
  #sectionNav,footer { display: none; }
  #sectionNav.expanded { display: grid; width: 100%; }
  main { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .top { gap: 5px; min-height: auto; }
  .filters { width: 100%; display: grid; grid-template-columns: minmax(0,1fr); gap: 5px; }
  .filters #mode { justify-self: start; }
  .period-picker { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .filters select,.form input,.form select,.form textarea,.direction-filters select { font-size: 16px; }
  .heading { margin: 21px 0 15px; align-items: flex-start; }
  .card { border-radius: 17px; }
  .split { grid-template-columns: 1fr; }
  .entry { flex-wrap: wrap; }
  .mobile-dock { display: grid; position: fixed; z-index: 5; bottom: 0; left: 0; right: 0; grid-template-columns: repeat(4,1fr); gap: 3px; padding: 4px 8px calc(4px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fcfdfff2; backdrop-filter: blur(15px); }
  .mobile-dock a { display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 46px; padding: 4px; font-size: .72rem; }
  button,.button { min-height: 44px; }
  .table tbody tr>*:first-child { min-width: 94px; max-width: 126px; }
  .report-table input,#salesForm input,#kpiForm input { width: 92px; min-height: 42px; font-size: 16px; }
}
@media(max-width:390px) { .form { grid-template-columns: 1fr; } .metrics,.direction-launch { gap: 8px; } .metric { padding: 11px; } }
.report-import-toolbar { display:flex; justify-content:flex-end; margin-top:12px; }
.sheet-toolbar{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin-top:12px}
.sheet-switch{display:inline-flex;gap:3px;padding:3px;border-radius:12px;background:#eef2f7}
.sheet-switch button{border-color:transparent;background:transparent;min-height:34px}
.sheet-switch button[aria-pressed=true]{background:#fff;color:var(--accent);box-shadow:0 1px 4px #19385a26}
.form-details{padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#f8fafe}
.form-details summary{cursor:pointer;font-size:.85rem;font-weight:650;color:var(--accent)}
.form-details .form{margin-top:12px}
@media(max-width:760px){.sheet-switch button{min-height:44px}}
.report-table tr.category { --row: #f2f5fa; }
.report-table tr.category > th { padding-block: 7px; }
.category-label { display: block; white-space: nowrap; font-size: .8rem; }
.category-actions { display: flex; align-items: center; gap: 5px; margin-top: 3px; }
.category-actions .text { min-height: 26px; padding: 2px 7px; white-space: nowrap; font-size: .75rem; background: #fff; border-color: #dce6f4; }
.category-actions button+button { margin-left: 0; }
.category-actions .percent-rule { min-width: 28px; }
@media (max-width: 760px) {
  .category-actions .text { min-height: 36px; }
  .category-actions .percent-rule { min-width: 36px; }
}
.rule-name {
  min-height: 0;
  max-width: 100%;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--accent);
  font-size: inherit;
  text-align: left;
  overflow-wrap: anywhere;
}
.rule-name:hover { text-decoration: underline; }
@media (max-width: 760px) { .rule-name { min-height: 32px; } }
.budget-simple{max-height:none}
.budget-simple input[data-annual]{width:min(100%,145px)}
.budget-simple .budget-month-detail>td{position:static;padding:12px;border-right:0}
.budget-months{display:grid;grid-template-columns:repeat(auto-fit,minmax(90px,1fr));gap:8px}
.budget-months label{display:grid;gap:4px;color:var(--muted);font-size:.77rem}
.budget-months input{width:100%}
.budget-row-title{display:flex;align-items:center;gap:7px;min-width:0}
.budget-grip{flex:none;width:28px;min-height:32px;padding:0;border:0;background:transparent;color:var(--muted);font-size:1.12rem;cursor:grab;touch-action:none;user-select:none}
.budget-grip:active{cursor:grabbing}
.budget-dragging>*{opacity:.65}
.budget-drop-target>*{box-shadow:inset 0 2px 0 var(--accent)}
@media(max-width:760px){.budget-grip{width:32px;min-height:44px}}
.budget-delete-list{display:grid;gap:5px;max-height:43dvh;overflow:auto}
.form .budget-delete-choice{display:flex;align-items:center;gap:10px;padding:8px 10px;border:1px solid var(--line);border-radius:10px;cursor:pointer}
.budget-delete-choice input{width:19px;min-height:19px;flex:none;accent-color:var(--accent)}
.command-review{margin-block:15px}
.command-alert{align-items:center}
.command-alert strong{display:block;margin:2px 0}
.command-alert .text{flex-shrink:0}
@media(max-width:420px){.command-alert{align-items:flex-start}}
.budget-unified{max-height:min(68vh,650px)}
.budget-unified tbody th:first-child{min-width:145px}
.budget-unified input[data-annual]{width:102px}
.budget-unified .rule-name{text-decoration:underline;text-decoration-color:#a5c4e7;text-underline-offset:3px}
#content>.form-details{margin-top:15px}
.copy-years{display:grid;grid-template-columns:repeat(auto-fit,minmax(88px,1fr));gap:6px;max-height:35dvh;overflow:auto}

.economy-sheet { --name-column: clamp(245px,25vw,320px); }
.economy-sheet thead tr:first-child > th:first-child,
.economy-sheet tbody tr > th:first-child {
  width: var(--name-column);
  min-width: var(--name-column);
  max-width: var(--name-column);
}
.economy-sheet .budget-row-title { gap: 6px; flex-wrap: nowrap; }
.economy-sheet .budget-grip { width: 24px; color: #66768a; }
.economy-sheet .rule-name {
  display: block;
  min-width: 0;
  line-height: 1.25;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  text-wrap: pretty;
  text-decoration: none;
  font-weight: 650;
}
.economy-sheet .rule-name:hover,
.economy-sheet .rule-name:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
.economy-sheet tbody tr:not(.category) > th:first-child:focus-within { box-shadow: none; }
@media(max-width:760px){
  .economy-sheet { --name-column: clamp(152px,47vw,210px); }
  .economy-sheet tbody tr > th:first-child { padding-inline: 8px; }
  .economy-sheet .budget-row-title { gap: 5px; }
  .economy-sheet .budget-grip { width: 26px; }
}

/* Conto economico */
.economy-sheet {
  margin-top: 16px;
  border: 1px solid #e2e7ef;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px #1529470b;
}
.economy-sheet thead th {
  background: #f5f7fa;
  color: #435168;
  font-size: .76rem;
  letter-spacing: .015em;
}
.economy-sheet tbody tr { --row: #fff; }
.economy-sheet tbody tr:nth-child(even) { --row: #fafbfd; }
.economy-sheet tbody tr.category { --row: #f2f5fa; }
.economy-sheet tbody tr.rollup { --row: #eaf1fc; }
.economy-sheet .budget-col { background: #f2f7ff; }
.economy-sheet .actual-col { background: #edf8f2; }
.economy-sheet .rollup .budget-col { background: #e4eeff; }
.economy-sheet .rollup .actual-col { background: #e1f2e8; }
.economy-sheet tbody tr.category th { color: #253750; }
.economy-sheet .category-label { font-size: .84rem; }
.economy-sheet .category-actions { margin-top: 5px; }
.economy-sheet .budget-grip { color: #536276; font-size: 1rem; }
.economy-sheet .rule-name { color: #174a82; font-weight: 650; }
.economy-sheet .rule-name:hover { color: var(--accent); }
.economy-sheet input[type=number] {
  border-color: #dbe5f0;
  border-radius: 8px;
  background: #ffffffd9;
}
.economy-sheet input[type=number]:focus-visible { background: #fff; }
.economy-sheet td.num { color: #24354c; }
.economy-sheet tbody tr.rollup th,
.economy-sheet tbody tr.rollup td { font-weight: 730; }
@media(max-width:760px){
  .economy-sheet { border-radius: 13px; }
  .economy-sheet .rule-name { font-size: .83rem; }
  .economy-sheet td.num { padding-inline: 8px; }
}
.context-controls{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;min-width:0}
.context-picker{position:relative;min-width:0;max-width:100%}
.context-picker summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid #dce6f1;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: .86rem;
  font-weight: 690;
  list-style: none;
  cursor: pointer;
  box-shadow: 0 2px 8px #1e3a5f0b;
}
.context-picker summary::-webkit-details-marker { display: none; }
.context-picker summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.context-picker[open] summary { background: #edf5ff; border-color: #c8dcf6; }
.context-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--accent); }
.context-chevron, .context-menu label::after {
  width: 7px;
  height: 7px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  color: #526a84;
}
.context-chevron { flex: none; margin-inline: 2px 1px; }
.context-picker[open] .context-chevron { transform: translateY(2px) rotate(225deg); }
#contextLabel { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.context-menu {
  position: absolute;
  z-index: 12;
  inset-block-start: calc(100% + 10px);
  inset-inline-end: 0;
  display: grid;
  gap: 12px;
  width: min(320px,calc(100vw - 34px));
  padding: 15px;
  border: 1px solid #dce5ef;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 16px 40px #172d4c23,0 3px 8px #172d4c0a;
}
.context-menu label {
  position: relative;
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 680;
}
.context-menu label::after { position: absolute; inset-inline-end: 14px; bottom: 20px; content: ''; pointer-events: none; }
.context-menu select {
  appearance: none;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px 31px 8px 12px;
  border: 1px solid #e3eaf4;
  border-radius: 11px;
  background: #f4f7fb;
  color: var(--ink);
  font-weight: 650;
  text-overflow: ellipsis;
  cursor: pointer;
}
.context-menu select:hover { border-color: #c8daee; }
.context-period { display: grid; grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); gap: 10px; }
.context-period select { font-variant-numeric: tabular-nums; }
.context-controls { margin-inline-start: auto; }
@media(max-width:760px) {
  .context-controls { position: relative; }
  .context-picker { position: static; }
  .context-menu select { font-size: 16px; }
}
.help-menu-icon{display:grid;place-items:center;width:18px;height:18px;border:1.6px solid currentColor;border-radius:50%;font-size:.75rem;font-weight:740}
.portal-permissions{display:grid;gap:9px;min-width:0;border:1px solid var(--line);border-radius:12px;padding:12px}
.portal-permissions legend{font-weight:680}
.form .portal-permissions>label{display:flex;align-items:center;gap:8px}
.portal-permissions input[type=radio]{width:18px;min-height:18px;accent-color:var(--accent)}

.help-trigger,#closeHelp {
  display: inline-grid;
  place-items: center;
  width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 50%;
  font-size: 1.15rem;
  font-weight: 720;
}
#helpDialog {
  width: min(520px,calc(100% - 24px));
  padding: clamp(16px,4vw,28px);
}
#helpDialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
#helpDialog h2 { margin: 0; }
#closeHelp { flex: none; }
.help-page { max-width: 640px; }
.help-composer { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 10px; }
.help-label { display: grid; gap: 6px; }
.help-label textarea { width: 100%; font-size: 16px; border-radius: 14px; resize: vertical; }
.help-composer button,.help-examples button { min-height: 44px; }
.help-examples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.help-examples button { border-radius: 22px; text-align: left; }
.help-answer:not(:empty) {
  margin-top: 16px;
  padding: 14px 16px;
  background: #eef4fc;
  border-radius: 14px;
  line-height: 1.55;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.help-answer a { display: block; width: fit-content; margin-top: 10px; font-weight: 650; }

.contract-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 12px 0 16px;
  padding: clamp(20px,4vw,36px);
  border: 1px solid #dbe6f7;
  border-radius: 26px;
  background: linear-gradient(135deg,#fff 20%,#eaf2ff);
}
.contract-hero h1 { margin: 0; letter-spacing: -.045em; }
.contract-hero p { margin: 7px 0 0; color: var(--muted); }
.contract-kpis { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 20px; }
.contract-metric,.contract-item { border: 1px solid var(--line); background: var(--surface); border-radius: 20px; }
.contract-metric { padding: 16px; }
.contract-metric strong { display: block; margin: 5px 0; font-size: clamp(1.12rem,2.3vw,1.8rem); font-variant-numeric: tabular-nums; line-height: 1.2; }
.contract-filters { display: flex; flex-wrap: wrap; gap: 4px; width: fit-content; padding: 4px; background: #e7edf6; border-radius: 14px; }
.contract-filters button { min-height: 42px; background: transparent; border: 0; }
.contract-filters button[aria-pressed="true"] { color: var(--accent); background: #fff; box-shadow: 0 1px 5px #19345618; }
.contract-filters span { margin-left: 4px; font-variant-numeric: tabular-nums; }
.contract-list { display: grid; gap: 10px; margin-top: 12px; }
.contract-item { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,2fr); gap: 12px 20px; padding: 18px; }
.contract-identity { min-width: 0; overflow-wrap: anywhere; }
.contract-identity h3 { margin: 6px 0 3px; }
.contract-identity p { margin: 0 0 4px; color: var(--muted); }
.contract-item dl { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin: 0; align-content: center; }
.contract-item dt { color: var(--muted); font-size: .78rem; }
.contract-item dd { margin: 4px 0 0; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.contract-actions { grid-column: 1/-1; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.contract-actions button,.contract-hero button { min-height: 44px; }
.contract-pill { display: inline-flex; padding: 4px 9px; border-radius: 20px; font-size: .76rem; font-weight: 700; background: #edf1f7; color: #394b63; }
.contract-pill.active,.contract-pill.lifetime { background: #e7f6ed; color: #146041; }
.contract-pill.due { background: #fff0d3; color: #704708; }
.contract-pill.expired { background: #fce9e9; color: #962b37; }
.contract-notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; text-decoration: none; padding: 15px 18px; margin: 0 0 14px; border: 1px solid #f1d8a5; border-radius: 16px; background: #fff8e9; color: #704708; }
.contract-notice span { font-weight: 650; }
@media(max-width:950px) {
  .contract-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .contract-item { grid-template-columns: 1fr; }
}
@media(max-width:560px) {
  .contract-hero { flex-direction: column; align-items: flex-start; }
  .contract-item dl { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .contract-kpis { gap: 8px; }
  .contract-metric { padding: 12px; overflow-wrap: anywhere; }
  .contract-actions { justify-content: flex-start; }
}

/* Financial bands keep their colour across numeric columns and the pinned label. */
.tone-revenue { --band: #d7f1e4; --subtotal: #eaf8f0; --band-ink: #175940; --band-edge: #2c8c63; }
.tone-variable { --band: #ffeacc; --subtotal: #fff4e3; --band-ink: #704309; --band-edge: #ac661a; }
.tone-fixed { --band: #f4e3f7; --subtotal: #faf0fc; --band-ink: #62416d; --band-edge: #90649d; }
.tone-stock { --band: #d5eef0; --subtotal: #eaf8f8; --band-ink: #225b62; --band-edge: #42838b; }
.tone-costs { --subtotal: #fce7eb; --band-ink: #7b374a; --band-edge: #ac5d72; }
.tone-opening { --subtotal: #eaf0f7; --band-ink: #3e526c; --band-edge: #69809a; }
.tone-margin { --subtotal: #dceafb; --band-ink: #204b7c; --band-edge: #477db9; }
.tone-result { --subtotal: #e4def9; --band-ink: #432d76; --band-edge: #7455ae; }
.tone-bep { --subtotal: #f1ebdb; --band-ink: #60502b; --band-edge: #8b7548; }

.table tbody tr.report-tone.category { --row: var(--band); }
.table tbody tr.report-tone.rollup { --row: var(--subtotal); }
.table tbody tr.report-tone > * {
  background: var(--row);
  font-weight: 730;
}
.table tbody tr.report-tone > :first-child {
  color: var(--band-ink);
  box-shadow: inset 4px 0 var(--band-edge);
}
.table tbody tr.report-tone:is(.tone-margin,.tone-result) > * { border-top: 1px solid var(--band-edge); }

.revenue-picker { min-width: 0; margin: 0; border: 1px solid var(--line); border-radius: 14px; padding: 8px; }
.revenue-picker legend { padding: 0 5px; font-size: .85rem; font-weight: 650; }
.form .revenue-picker label { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 9px; border-radius: 9px; cursor: pointer; overflow-wrap: anywhere; }
.revenue-picker label:has(input:checked) { background: #eaf2ff; }
.revenue-picker input { flex: none; width: 18px; height: 18px; accent-color: var(--accent); }
.revenue-options { max-height: 210px; max-height: min(210px,30dvh); overflow-y: auto; border-top: 1px solid var(--line); }

.economy-sheet thead .annual-total { background: #dce9fb; color: #204b7c; }
.economy-sheet tbody td.annual-total { background: #edf4ff; font-weight: 690; }
.economy-sheet tbody tr.report-tone td.annual-total { background: var(--row); font-weight: 730; }
.report-table .annual-start { border-inline-start: 2px solid #8baad3; }

.mobile-dock { grid-template-columns: repeat(var(--dock-items,4),1fr); }
.module-profile,.module-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.module-profile { margin-bottom:14px; }
.module-profile label { font-weight:700; }
.module-profile select { width:min(100%,360px); min-height:44px; font-size:16px; }
.module-toolbar { padding-block:8px; }
.module-fieldset { border:0; padding:0; margin:0 0 18px; min-width:0; }
.module-fieldset legend { font-weight:730; padding:0; margin-bottom:8px; }
.module-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr)); gap:10px; }
.module-link { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:58px; padding:12px 14px; border:1px solid var(--line); border-radius:14px; background:#fff; font-weight:640; text-decoration:none; }
.module-list { display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.module-fieldset .module-toggle,
.module-settings-panel .module-toggle {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  align-content: center;
  gap: 14px;
  min-height: 54px;
  padding: 10px 16px;
  color: var(--ink);
  font-size: .9rem;
  font-weight: 650;
  line-height: 1.25;
  cursor: pointer;
}
.module-toggle + .module-toggle { border-top: 1px solid var(--line); }
.module-toggle:hover { background: #f7faff; }
.module-toggle input { position: absolute; inset-inline-end: 16px; width: 42px; height: 26px; margin: 0; opacity: 0; }
.module-switch-track {
  position: relative;
  display: block;
  width: 42px;
  height: 26px;
  border: 1px solid #a0adbc;
  border-radius: 99px;
  background: #dce3ec;
}
.module-switch-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px #19222e3b;
}
.module-toggle input:checked + .module-switch-track { background: var(--accent); border-color: var(--accent); }
.module-toggle input:checked + .module-switch-track::after { transform: translateX(16px); }
.module-toggle input:focus-visible + .module-switch-track { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (forced-colors: active) {
  .module-switch-track { forced-color-adjust: none; color: CanvasText; border-color: CanvasText; background: Canvas; }
  .module-switch-track::after { background: currentColor; }
  .module-toggle input:checked + .module-switch-track { color: HighlightText; border-color: Highlight; background: Highlight; }
  .module-toggle input:focus-visible + .module-switch-track { outline-color: Highlight; }
}
.module-toolbar button { min-height:44px; }

.plan-inputs { display:grid; gap:12px; margin-top:12px; }
.plan-inputs textarea,.form textarea[name="text"] { width:100%; resize:vertical; font-size:16px; }
.ksi-candidate { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 12px; min-width:0; margin:0; padding:10px 12px; border:1px solid var(--line); border-radius:14px; }
.ksi-candidate legend { font-weight:660; }
.form .ksi-check { display:flex; align-items:center; gap:8px; grid-column:1/-1; min-height:36px; }
@media(max-width:390px) { .ksi-candidate { grid-template-columns:1fr; } }

.guided-plan { display:grid; gap:8px; }
.guided-plan-heading { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:8px; }
.guided-plan-heading h3 { margin:0; }
.guided-plan-heading span,.guided-module summary small { color:var(--muted); font-size:.8rem; font-variant-numeric:tabular-nums; }
.guided-module summary small { display:inline-block; margin-inline-start:8px; }
.guided-module:not([open]) { padding-block:10px; }
.guided-module textarea { min-height:68px; }

.overview-masthead {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: clamp(16px,2.5vw,24px) 0 24px;
  padding: clamp(15px,2.4vw,28px);
  border: 1px solid #e0e7f0;
  border-radius: 25px;
  background: radial-gradient(ellipse at 98% 0%,#e6f0ff 0%,transparent 65%), linear-gradient(135deg,#fff 26%,#f6f9fe);
  box-shadow: 0 6px 22px #192f510a;
}
.overview-masthead::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: repeating-radial-gradient(ellipse at 104% -65%,transparent 0 22px,#708eb211 23px 24px,transparent 25px 41px);
  mask-image: linear-gradient(260deg,#000 0%,transparent 55%);
  pointer-events: none;
  content: '';
}
.overview-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; }
.overview-heading h1 { margin: 0; font-size: clamp(1.8rem,3.7vw,2.8rem); letter-spacing: -.045em; }
.overview-masthead + .card, .overview-masthead ~ .command-dashboard { margin-top: 18px; }
.command-dashboard { gap:22px; }
.command-section-head { display:flex; align-items:flex-end; justify-content:space-between; flex-wrap:wrap; gap:8px; margin-bottom:10px; }
.command-section-head h2 { margin:0; letter-spacing:-.025em; }
.command-section-head p { margin:4px 0 0; color:var(--muted); font-size:.85rem; }
.command-financial-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.command-financial {
  --metric-ink: #315a85;
  --metric-accent: #739dc8;
  min-width: 0;
  padding: clamp(15px,2vw,22px);
  border-radius: 20px;
  background: linear-gradient(165deg,#fff 50%,#f8fbff);
  box-shadow: 0 4px 14px #203b5e0a;
}
.command-financial[data-metric=margin] { --metric-ink:#236759; --metric-accent:#6fafa1; }
.command-financial[data-metric=ebitda] { --metric-ink:#62538b; --metric-accent:#a08cc5; }
.command-figure h3 { display:flex; align-items:center; gap:8px; }
.command-figure h3::before { content:''; flex:none; width:7px; height:7px; border-radius:50%; background:var(--metric-accent); }
.command-figure-label { margin:12px 0 3px; color:var(--metric-ink); font-weight:680; }
.command-section-head .button { border-radius:999px; gap:6px; background:#f8fbff; }

.command-financial h3 { margin:0 0 8px; font-size:1rem; }
.command-financial strong { display:block; margin:2px 0; font-size:clamp(1.25rem,2.55vw,2rem); letter-spacing:-.035em; font-variant-numeric:tabular-nums; line-height:1.18; overflow-wrap:anywhere; }
.command-financial dl { display:grid; gap:8px; margin:11px 0 0; padding-top:9px; border-top:1px solid var(--line); }
.command-financial dl div { display:flex; justify-content:space-between; flex-wrap:wrap; gap:4px 12px; }
.command-financial dt { color:var(--muted); font-size:.8rem; }
.command-financial dd { margin:0; font-weight:680; text-align:right; font-variant-numeric:tabular-nums; }
.command-margin { font-size:.77rem; color:var(--muted); }
.command-cash { background:linear-gradient(160deg,#fff 40%,#edf6ff); border-color:#d9e7f7; }
.command-indicator-counts { display:flex; flex-wrap:wrap; gap:5px; }
.command-indicators { padding:0; list-style:none; margin:10px 0 14px; }
.command-indicators li { display:flex; justify-content:space-between; gap:10px; padding:9px 0; border-bottom:1px solid var(--line); }
.command-indicators li>div:last-child { text-align:right; }
@media(max-width:760px){.command-financial-grid{grid-template-columns:1fr}}

#sectionNav { gap:10px; }
#sectionNav { gap: 5px; }
.workspace-nav-group { min-width: 0; }
.workspace-nav-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 8px 11px;
  border-radius: 10px;
  color: #3f4b5e;
  cursor: pointer;
  font-size: .86rem;
  font-weight: 680;
  list-style: none;
}
.workspace-nav-group > summary::-webkit-details-marker { display: none; }
.workspace-nav-group > summary::after { content: '›'; font-size: 1.15rem; line-height: 1; }
.workspace-nav-group[open] > summary::after { transform: rotate(90deg); }
.workspace-nav-group > summary:hover { background: #f0f3f8; }
.workspace-nav-group.current > summary { color: var(--accent); }
.workspace-nav-group > div { display: grid; gap: 2px; margin: 2px 0 6px 12px; border-inline-start: 1px solid var(--line); padding-inline-start: 6px; }
#sectionNav .workspace-nav-group a { min-height: 40px; gap: 7px; }
#sectionNav .workspace-nav-group a:not(:has(svg)) { padding-inline-start: 12px; }
.workspace-section-nav {
  display: flex;
  gap: 4px;
  margin-top: 14px;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #eaf0f7;
  scrollbar-width: thin;
}
.workspace-section-nav a { flex: 0 0 auto; white-space: nowrap; min-height: 36px; }
.workspace-section-nav a[aria-current=page] { background: #fff; box-shadow: 0 1px 4px #15335314; }
.workspace-stages {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,210px),1fr));
  gap: 10px;
  margin: clamp(13px,2vw,22px) 0 0;
}
.workspace-stage {
  --stage-ink: #17558f;
  --stage-accent: #77a9de;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #e0e8f2;
  border-radius: 16px;
  background: #fffffff2;
  box-shadow: 0 2px 7px #243e5d07;
}
.workspace-stage[data-stage=manage] { --stage-ink:#1f6355; --stage-accent:#64ab98; }
.workspace-stage[data-stage=review] { --stage-ink:#665197; --stage-accent:#a08cce; }
.workspace-stage h2 { display: flex; align-items: center; gap: 8px; margin: 1px 5px 6px; font-size: .92rem; }
.workspace-stage h2::before { content: ''; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--stage-accent); }
.workspace-stage > div { display: flex; flex-wrap: wrap; gap: 4px; }
.workspace-stage a { min-height: 32px; padding: 5px 8px; gap: 6px; font-size: .77rem; color: var(--stage-ink); background: #f5f7fa; }
.workspace-stage a:hover, .workspace-stage a:focus-visible { background:#eaf0f6; }
.workspace-extra > summary { cursor: pointer; font-weight: 680; }
@media(max-width:760px) {
  #sectionNav.expanded { max-height: min(66dvh,600px); overflow-y: auto; }
  .workspace-section-nav a, .workspace-stage a { min-height: 44px; }
  .workspace-stages { grid-template-columns: 1fr; gap: 6px; }
  .workspace-stage { padding: 8px; }
  .workspace-stage a { min-height: 44px; }
  .overview-masthead { border-radius: 19px; }
}



.sales-switch { display:flex; gap:4px; align-self:end; padding:4px; border:1px solid #e0e9f7; border-radius:13px; background:#f0f5fc; }
.sales-switch button { flex:1; min-height:40px; padding:7px 9px; border-color:transparent; background:transparent; }
.sales-switch button[aria-pressed="true"] { color:#1259a0; border-color:#d5e4f6; background:#fff; box-shadow:0 1px 3px #16447312; font-weight:700; }
.sales-entry-preview { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; background:#f5f9ff; border:1px solid #e0eaf7; border-radius:14px; padding:12px; }
.sales-entry-preview strong { display:block; margin-top:4px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
@media(max-width:390px){.sales-entry-preview{grid-template-columns:1fr 1fr}.sales-entry-preview>div:first-child{grid-column:1/-1}}

.command-budget-meter { display:block; width:min(100%,105px); height:7px; margin:5px 0 0 auto; accent-color:#2769b1; }
.command-financial dd small { margin-top:2px; }

.economy-vat { display:grid; gap:8px; margin:0; min-width:0; padding:9px 11px; border:1px solid var(--line); border-radius:12px; }
.economy-vat legend { padding-inline:5px; font-weight:650; }
.economy-vat-switch { display:flex; flex-wrap:wrap; gap:6px; }
.form .economy-vat-switch label { display:flex; align-items:center; min-height:42px; gap:6px; padding:4px 9px; border:1px solid var(--line); border-radius:9px; cursor:pointer; }
.economy-vat-switch label:has(input:checked) { background:#eaf2ff; color:#0054ad; border-color:#b8d2f3; }
.economy-vat-switch input { accent-color:var(--accent); }

.budget-vat-badge { display:inline-grid; place-items:center; flex:none; margin-inline-start:auto; width:22px; height:22px; border-radius:50%; background:#edf3fb; color:#45617f; font-size:.57rem; font-weight:750; line-height:1; }

.economy-toolbar { gap:10px 16px; margin:14px 0 4px; }
.economy-navigation,.economy-actions { display:flex; align-items:center; gap:6px; flex-wrap:wrap; max-width:100%; }
.economy-navigation { padding:4px; background:#f1f5fa; border:1px solid #e1e8f2; border-radius:14px; }
.economy-toolbar :is(select,button) { min-height:42px; border-radius:10px; font-size:.82rem; font-weight:650; }
.economy-month-control { position:relative; display:inline-flex; }
.economy-month-control::after { position:absolute; inset-inline-end:13px; top:calc(50% - 5px); width:6px; height:6px; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:rotate(45deg); color:#466181; content:""; pointer-events:none; }
.economy-month-control select { appearance:none; width:auto; min-width:125px; padding-inline:11px 29px; background:#fff; border-color:#dce6f3; box-shadow:0 1px 2px #172b4a0b; cursor:pointer; }
.economy-toolbar .economy-totals { background:transparent; border-color:transparent; }
.economy-toolbar .economy-totals:hover { background:#e6eef8; }
.economy-toolbar { align-items:center; gap:10px 14px; }
.economy-actions { margin-inline-start:auto; justify-content:flex-end; }
.economy-toolbar .economy-upload { background:#eff6ff; border-color:#d5e5fa; color:#14548e; }
.economy-toolbar .economy-delete { background:transparent; border-color:transparent; }
.economy-toolbar .economy-delete:hover { background:#fff0f0; }
@media(max-width:760px){
  .economy-toolbar :is(select,button) { min-height:44px; }
  .economy-month-control select { font-size:16px; }
  .economy-actions { gap:6px 4px; }
}

.portal-entry-mode .shell { display:block; }
.portal-entry-mode :is(aside,.mobile-dock,.top) { display:none; }
.portal-entry { max-width:480px; margin:clamp(24px,10vh,104px) auto; padding:clamp(18px,5vw,34px); }
.portal-entry .brand { margin:0 0 20px; }
.portal-entry h1 { margin:0 0 12px; }
.portal-entry .form .actions button { min-height:44px; }
#portalInviteResult label { min-width:0; flex:1 1 240px; }

.form .portal-same-contact { display:flex; align-items:center; gap:8px; min-height:40px; }
.portal-same-contact input { accent-color:var(--accent); }

.portal-directory-head,.portal-directory-profile { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px 14px; }
.portal-directory-head h2 { margin:0 0 4px; overflow-wrap:anywhere; }
.portal-directory-list { list-style:none; padding:0; margin:12px 0 0; }
.portal-directory-profile { border-top:1px solid var(--line); padding:10px 0; }
.portal-directory-profile:last-child { padding-bottom:0; }
.portal-directory-profile .actions { gap:5px; }
@media(max-width:760px){.portal-directory-head button,.portal-directory-profile button { min-height:40px; }}

.inventory-sheet { display: grid; gap: 16px; }
.inventory-sheet section { display: grid; gap: 12px; }
.inventory-sheet input { min-height: 42px; width: 132px; padding-inline-end: 1.65em; text-align: right; font-variant-numeric: tabular-nums; }
.inventory-sheet table { min-width: 490px; }
.inventory-opening { display: grid; justify-items: start; gap: 5px; }
.inventory-sheet details[open] { display: grid; gap: 12px; }
.inventory-sheet summary { cursor: pointer; color: var(--blue); font-weight: 650; }

.workspace-quick-actions {
  position: fixed;
  z-index: 20;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: #fffffff5;
  box-shadow: 0 8px 26px #18304c24;
}
.workspace-quick-actions button {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  min-width: 64px;
  min-height: 55px;
  padding: 6px 9px;
  border-radius: 15px;
  font-size: 11px;
  line-height: 1.15;
  font-weight: 700;
}
.workspace-chat-icon {
  position: relative;
  width: 18px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 50%;
}
.workspace-chat-icon::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 5px;
  height: 5px;
  transform: skew(-22deg);
  border-inline-start: 2px solid currentColor;
  border-block-end: 2px solid currentColor;
  background: var(--blue, #005bb9);
}
.workspace-idea-icon {
  position: relative;
  width: 14px;
  height: 15px;
  margin-bottom: 1px;
  border: 2px solid currentColor;
  border-radius: 50% 50% 42% 42%;
}
.workspace-idea-icon::after {
  content: '';
  position: absolute;
  inset-inline: 2px;
  bottom: -5px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}
.workspace-feedback-button { background: white; }
body:has(.workspace-quick-actions) main { padding-bottom: 94px; }
.feedback-inbox article { padding: 12px 0; border-bottom: 1px solid var(--line); }
.feedback-inbox small { display: block; margin-top: 4px; }
.feedback-inbox p { white-space: pre-wrap; overflow-wrap: anywhere; }
.workspace-messages { width: min(440px, calc(100vw - 24px)); max-height: min(650px, 85dvh); border: 1px solid var(--line); border-radius: 22px; padding: 18px; overflow: auto; }
.workspace-messages::backdrop { background: #15253955; }
.workspace-messages header { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.workspace-messages header h2, .workspace-messages header p { margin: 0 0 4px; }
.workspace-messages ol { list-style: none; margin: 12px 0; padding: 4px; display: flex; flex-direction: column; gap: 8px; min-height: 80px; max-height: 36dvh; overflow: auto; }
.workspace-messages li { align-self: flex-start; max-width: 85%; border-radius: 14px; background: #f1f4f8; padding: 8px 12px; overflow-wrap: anywhere; }
.workspace-messages li.mine { align-self: flex-end; background: #e8f2ff; }
.workspace-messages li div { white-space: pre-wrap; }
.workspace-messages form, .workspace-messages form label { display: grid; gap: 8px; }
.workspace-messages form button { justify-self: end; }
.workspace-messages textarea { width: 100%; resize: vertical; }
@media (max-width: 760px) {
  .workspace-quick-actions { right: max(10px, env(safe-area-inset-right)); bottom: calc(68px + env(safe-area-inset-bottom)); }
  body:has(.workspace-quick-actions) main { padding-bottom: calc(148px + env(safe-area-inset-bottom)); }
  .inventory-sheet input, .workspace-messages textarea { font-size: 16px; }
}

.company-setup-step:not([hidden]) { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.company-setup-step > h3, .company-setup-step > p, .company-setup-step > fieldset { grid-column: 1 / -1; margin: 0; }
.company-setup-step > button { justify-self: start; }
@media (max-width: 520px) {
  .company-setup-step:not([hidden]) { grid-template-columns: minmax(0,1fr); }
}

.service-budget-totals { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 0; }
.service-budget-totals div, .service-budget-month { padding: 13px; border: 1px solid var(--line); background: #f7faff; border-radius: 14px; }
.service-budget-totals dd { margin: 4px 0 0; font-size: clamp(1.05rem, 3vw, 1.6rem); font-weight: 750; }
.service-budget-calendar { display: grid; grid-template-columns: repeat(auto-fit,minmax(135px,1fr)); gap: 8px; }
.service-budget-month { display: grid; gap: 4px; }
.service-budget-month span { font-size: .83rem; color: #526176; }
.service-budget-matrix th.num, .service-budget-matrix td.num { min-width: 110px; }
.service-budget-matrix tr > :first-child { min-width: clamp(140px,24vw,205px); max-width: 235px; overflow-wrap: anywhere; }
.service-budget-matrix .service-budget-value { display: block; margin-top: .25rem; color: #526176; font-size: .78rem; font-weight: 500; }

.warehouse-tabs { display:flex; flex-wrap:wrap; gap:4px; padding:4px; width:fit-content; max-width:100%; border-radius:14px; background:#eaf0f7; margin-bottom:14px; }
.warehouse-tabs button { background:transparent; border-color:transparent; border-radius:10px; }
.warehouse-tabs button[aria-pressed=true] { color:var(--accent); background:#fff; box-shadow:0 1px 5px #172b4a18; }
.warehouse-filter { display:inline-grid; gap:4px; min-width:min(220px,100%); margin-bottom:14px; font-size:.8rem; font-weight:650; }
.warehouse-metrics { margin-top:0; }
.warehouse-metrics .metric h2 { font-size:.95rem; }
.warehouse-metrics .metric > .muted { font-size:.8rem; }
.warehouse-panels .tag.warehouse-good { background:#e9f8ed; color:#21623a; }
.warehouse-panels .tag.warehouse-risk { background:#fff0ee; color:#a13429; }
.warehouse-disclosure > summary { cursor:pointer; font-weight:700; }
.warehouse-disclosure[open] > summary { margin-bottom:12px; }
.warehouse-disclosure p + p, .warehouse-disclosure .inventory-sheet { margin-top:8px; }
.warehouse-quadrants article { padding:13px; border:1px solid var(--line); border-radius:14px; background:#f7faff; }
.warehouse-quadrants article:nth-child(4) { background:#fff7f2; }
.warehouse-quadrants h3 { margin:0 0 3px; }
.warehouse-quadrants strong { display:block; margin:8px 0 4px; }
.warehouse-checklist > div { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:10px; padding:9px 0; border-top:1px solid var(--line); }
.warehouse-checklist > div:first-child { border-top:0; }
@media (max-width: 520px) {
  .warehouse-tabs { width:100%; }
  .warehouse-tabs button { flex:1 1 auto; }
  .warehouse-filter select { font-size:16px; }
  .warehouse-checklist > div { grid-template-columns:1fr auto; }
  .warehouse-checklist .tag { grid-column:1 / -1; justify-self:start; }
}

dialog:has(.pdf-import-table) { width:min(1120px,calc(100% - 20px)); }
.form .pdf-import-check { display:flex; align-items:center; gap:8px; min-height:36px; }
.pdf-import-check input, .pdf-import-table input[type=checkbox] { width:18px; height:18px; min-height:18px; accent-color:var(--accent); }
.pdf-import-table .table { max-height:47vh; }
.pdf-import-table thead { position:sticky; top:0; z-index:2; }
.pdf-import-table select { min-width:155px; }
.pdf-import-table tr > :first-child { min-width:0; width:1%; padding-inline:10px; text-align:center; }
.pdf-import-table .pdf-import-label {
  display:block;
  width:clamp(180px,35vw,340px);
  min-height:44px;
  resize:none;
  overflow:hidden;
  overflow-wrap:anywhere;
  white-space:pre-wrap;
}
@media (max-width:760px) { .pdf-import-table .pdf-import-label { font-size:16px; } }
.pdf-import-table td.num { min-width:110px; white-space:nowrap; font-variant-numeric:tabular-nums; }
.pdf-import-table td.num span:not(:first-child) { display:block; margin-top:4px; }

/* Touch layouts */
@media (max-width: 760px) {
  main { padding-inline: clamp(10px,3.5vw,20px); }
  .shell, main, #content, .heading > div, .form > *, .entry > div { min-width: 0; }
  h1 { font-size: clamp(1.8rem,7vw,2.4rem); }
  .heading { gap: 12px; }
  .heading > .actions { width: 100%; justify-content: flex-end; }
  .heading button, .heading .button { max-width: 100%; }
  button, .button, summary, input, select, textarea { touch-action: manipulation; }
  input:not([type=checkbox]):not([type=radio]), select, textarea { font-size: 16px; }
  input[type=file] { width: 100%; min-width: 0; overflow: hidden; }
  .form input, .form select, .form textarea { max-width: 100%; min-width: 0; }
  dialog {
    width: calc(100% - 16px);
    max-width: 640px;
    max-height: calc(100dvh - 24px);
    padding: 18px;
    border-radius: 21px;
    overscroll-behavior: contain;
    scroll-padding-block: 18px 90px;
  }
  dialog h2 { font-size: 1.2rem; overflow-wrap: anywhere; }
  dialog .form > .actions {
    position: sticky;
    bottom: -18px;
    padding: 12px 0 max(12px,env(safe-area-inset-bottom));
    margin-top: 4px;
    background: #fffffffa;
    border-top: 1px solid var(--line);
    z-index: 5;
  }
  dialog .actions button { flex: 1 1 auto; }
  .table { overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
  .report-table, #salesForm .table { max-height: min(64dvh,620px); }
  .report-table .report-amount input { width: 112px; min-height: 44px; }
  .economy-sheet { --name-column: clamp(128px,38vw,180px); }
  .report-table:not(.economy-sheet) tr > :first-child { min-width: 125px; max-width: 165px; }
  .report-table thead tr:nth-child(2) > :first-child { min-width: 0; max-width: none; }
  .budget-row-title .budget-grip { min-width: 28px; min-height: 44px; }
  .economy-toolbar { align-items: stretch; }
  .economy-navigation { width: 100%; justify-content: space-between; }
  .economy-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; margin: 0; gap: 6px; }
  .economy-actions button { width: 100%; font-size: .79rem; padding: 9px; }
  .economy-actions .economy-upload, .economy-actions .primary { grid-column: 1 / -1; }
  .report-import-toolbar > button { width: 100%; }
  .module-toolbar { align-items: stretch; }
  .module-toolbar .actions { width: 100%; }
  .module-toolbar .actions button { flex: 1 1 auto; }
  .module-toolbar .actions button[type=submit] { flex-basis: 100%; }
  .module-profile { display: grid; grid-template-columns: minmax(0,1fr); }
  .module-profile select { width: 100%; }
  .portal-directory-head { align-items: stretch; }
  .portal-directory-head h2, .portal-directory-profile strong { overflow-wrap: anywhere; }
  .portal-directory-head .actions, .portal-directory-profile .actions { width: 100%; }
  .portal-directory-profile .actions button { flex: 1 1 auto; }
  .workspace-section-nav { max-width: 100%; }
  .service-budget-matrix tr > :first-child { min-width: 125px; max-width: 160px; }
  .pdf-import-table .pdf-import-label { width: min(58vw,260px); min-width: 170px; }
  .workspace-messages { max-height: calc(100dvh - 24px); }
  .workspace-messages form { position: sticky; bottom: -18px; padding-block: 10px; background: #fff; }
  .workspace-messages textarea { max-height: 24dvh; }
  body.mobile-editing .mobile-dock, body.mobile-editing .workspace-quick-actions { display: none; }
  .top { padding-block: 10px; }
  .context-controls { max-width: 100%; }
  .context-picker { flex: 1 1 auto; }
  .context-picker summary { min-width: 0; }
}
@media (max-width: 520px) {
  dialog .form { grid-template-columns: minmax(0,1fr); }
  .sales-entry-preview { grid-template-columns: minmax(0,1fr); gap: 8px; }
  .sales-entry-preview > div { min-width: 0; }
  .ksi-candidate { grid-template-columns: minmax(0,1fr); }
  .budget-months { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .dashboard-brand small { font-size: .68rem; max-width: 25ch; }
  .dashboard-brand { gap: 8px; }
  .dashboard-brand img { width: 62px; }
  .service-budget-totals { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 350px) {
  .economy-actions { grid-template-columns: minmax(0,1fr); }
  .economy-sheet { --name-column: 118px; }
  .budget-months { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
/* Cash settlements: a quiet secondary action in the sheet, a focused editor. */
.report-table .cash-settlement-link { display:block; margin:7px 0 0 auto; border:0; background:#edf4ff; color:#0561bd; border-radius:9px; padding:6px 9px; font-size:11px; font-weight:600; line-height:1.3; white-space:normal; }
.cash-settlement-link:hover { background:#deebff; }
.report-table .cash-settlement-delete { background:transparent; color:#a02134; }
.report-table .cash-settlement-delete:hover { background:#faedf0; }
.cash-settlement-state { display:block; margin-top:6px; font-size:11px; font-weight:500; }
.cash-settlement-state.is-paid { color:#24805f; }
.cash-settlement-state.is-partial, .cash-residual-note small { color:#9a6518; }
.cash-residual-note { border-top:1px solid #e5eaf1; margin-top:8px; padding-top:7px; }
.cash-settlement-heading h3 { margin:0 0 5px; font-size:20px; letter-spacing:-.4px; }
.cash-settlement-heading p { margin:0; font-size:13px; color:var(--muted); }
.cash-settlement-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:4px 0 12px; }
.cash-settlement-summary > div { background:#f4f7fb; border:1px solid #e8edf4; border-radius:15px; padding:15px 12px; min-width:0; }
.cash-settlement-summary > div:last-child { background:#edf5ff; border-color:#dfebfa; }
.cash-settlement-summary dt { font-size:12px; color:var(--muted); margin-bottom:7px; }
.cash-settlement-summary dd { margin:0; font-size:clamp(16px,3vw,22px); font-weight:650; letter-spacing:-.5px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.cash-payment-history,.cash-payment-new,.cash-payment-plan { padding:16px 0; border-top:1px solid #e8edf3; }
.cash-payment-history h3,.cash-payment-new h3,.cash-payment-plan h3 { margin:0 0 12px; font-size:15px; letter-spacing:-.2px; }
.cash-payment-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto; gap:12px; margin-bottom:12px; align-items:end; }
.cash-payment-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.cash-payment-remove { display:flex; gap:5px; align-items:center; min-height:44px; font-size:12px!important; color:#a04444; }
.cash-payment-remove input { width:17px!important; min-height:17px; height:17px; }
.cash-plan-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:10px; }
.cash-plan-heading h3 { margin:0; }
.cash-plan-heading button { padding:7px 10px; background:#f2f6fc; border:0; font-size:12px; }
.cash-instalment { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) 30px; gap:12px; align-items:end; margin-bottom:10px; }
.cash-instalment button { width:30px; padding:0; height:40px; border:0; color:#a04444; background:transparent; }
.cash-instalment input[readonly] { background:#f4f7fb; color:#42536c; }
.cash-settlement-confirmation { margin:0; font-size:13px; color:var(--muted); }
.cash-settlement-totals { display:flex; flex-wrap:wrap; gap:24px; margin:14px 0 18px; }
.cash-settlement-totals dt { color:var(--muted); font-size:13px; margin-bottom:5px; }
.cash-settlement-totals dd { margin:0; font-size:24px; font-weight:650; letter-spacing:-.5px; }
.cash-residual-list { list-style:none; padding:0; margin:0; }
.cash-residual-list li { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:15px 0; border-top:1px solid #e8edf3; }
.cash-residual-list li > div { min-width:0; }
.cash-residual-list li > div:last-child { text-align:right; flex-shrink:0; }
.cash-residual-list strong { display:block; font-size:14px; }
.cash-residual-list small { display:block; margin-top:5px; color:var(--muted); font-size:12px; }
.cash-residual-list .cash-settlement-link { border:0; background:#edf4ff; color:#0561bd; padding:7px 10px; margin-top:7px; font-size:12px; }
@media(max-width:600px) {
  .cash-payment-row { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .cash-payment-remove { grid-column:1/-1; min-height:28px; }
  .cash-payment-fields { grid-template-columns:minmax(0,1fr); }
  .cash-plan-heading { align-items:flex-start; flex-direction:column; }
  .cash-settlement-summary { gap:5px; }
  .cash-settlement-summary > div { padding:12px 8px; border-radius:12px; }
  .cash-settlement-summary dt { font-size:11px; }
  .cash-residual-list li { gap:12px; }
  .report-table .cash-settlement-link { min-height:36px; }
}
.trade-tabs { display:flex; gap:5px; padding:5px; background:#e9eef5; width:fit-content; max-width:100%; border-radius:16px; margin:0 0 28px; overflow:auto; }
.trade-tabs button { border:0; background:transparent; color:#52617a; padding:11px 17px; white-space:nowrap; border-radius:12px; font-size:14px; }
.trade-tabs .is-selected { color:#075aba; background:white; box-shadow:0 2px 8px #1b36551a; }
.trade-toolbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:15px; margin:24px 0; }
.trade-toolbar .contract-filters { margin:0; }
.trade-search { font-size:12px; color:var(--muted); min-width:220px; }
.trade-search input { margin-top:5px; background:#fff; }
.trade-orders { display:grid; gap:18px; }
.trade-order { padding:24px; }
.trade-order > header { display:flex; align-items:start; justify-content:space-between; gap:15px; }
.trade-order header small { color:var(--muted); font-size:12px; }
.trade-order header h2 { font-size:21px; letter-spacing:-.5px; margin:7px 0 5px; }
.trade-order header p { margin:0; font-size:14px; }
.trade-order-totals { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; margin:22px 0; }
.trade-order-totals dt { font-size:12px; color:var(--muted); margin-bottom:7px; }
.trade-order-totals dd { margin:0; font-size:22px; font-weight:650; font-variant-numeric:tabular-nums; letter-spacing:-.5px; }
.trade-order-totals > div:last-child dd { color:#0861b6; }
.trade-order details { border-top:1px solid #e9edf3; padding-top:15px; }
.trade-order summary { cursor:pointer; font-weight:600; font-size:13px; color:#425570; padding:6px 0; }
.trade-order footer { display:flex; gap:9px; flex-wrap:wrap; margin-top:20px; }
.trade-order footer button { padding:8px 12px; font-size:12px; }
.trade-items-summary { list-style:none; padding:0; margin:16px 0; }
.trade-items-summary li { display:flex; justify-content:space-between; gap:15px; border-bottom:1px solid #eff2f6; padding:10px 0; font-size:13px; }
.trade-items-summary small { font-size:12px; font-weight:400; color:var(--muted); }
.trade-order .table { margin-top:15px; }
.trade-order td { font-size:13px; }
.trade-order .cash-settlement-link { border:0; background:#edf5ff; color:#075aba; font-size:12px; padding:8px 11px; }
.trade-status { white-space:nowrap; color:#536985; font-size:12px; }
.trade-status.is-late { color:#b3363e; font-weight:600; }
.trade-empty { padding:36px; }
.trade-step { font-size:13px; color:var(--muted); margin-top:0; }
.trade-products { border-block:1px solid #e7edf4; padding:18px 0; margin:8px 0; }
.trade-item-editor { display:grid; grid-template-columns:minmax(120px,2fr) minmax(65px,.7fr) minmax(100px,1fr) minmax(60px,.7fr) 22px; gap:10px; margin-bottom:12px; align-items:end; }
.trade-item-editor label { font-size:11px; }
.trade-item-editor button { background:transparent; border:0; color:#a64a50; padding:0; height:40px; }
.trade-editor-total { font-weight:600; font-size:13px; color:#315173; }
.trade-payment-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; padding:16px; border-radius:16px; background:#f4f7fb; }
.trade-payment-options[hidden] { display:none; }
.trade-plan-rows { display:grid; gap:13px; max-height:54dvh; overflow:auto; padding:2px; }
.trade-plan-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:12px; padding:15px; border:1px solid #e5ebf2; border-radius:15px; background:#fafcff; }
.trade-plan-row strong,.trade-plan-row label:last-child { grid-column:1/-1; }
.trade-plan-row strong { font-size:13px; }
.module-toggle.module-subsection span:first-child { padding-left:20px; font-size:14px; color:#52637e; }
.cash-source-party { display:block; color:#52637e; font-size:11px; margin-top:6px; }
@media(max-width:650px) {
  .trade-tabs { width:100%; box-sizing:border-box; margin-bottom:20px; }
  .trade-tabs button { padding:11px 12px; font-size:12px; }
  .trade-order { padding:18px; }
  .trade-order-totals { gap:12px; }
  .trade-order-totals dd { font-size:17px; overflow-wrap:anywhere; }
  .trade-item-editor { grid-template-columns:repeat(3,minmax(0,1fr)); background:#f5f8fc; padding:12px; border-radius:12px; }
  .trade-item-name { grid-column:1/-1; }
  .trade-payment-options { grid-template-columns:1fr; }
  .trade-toolbar .contract-filters { width:100%; overflow:auto; flex-wrap:nowrap; }
  .trade-search { width:100%; }
}
.trade-plan-shortcuts { display:flex; gap:9px; flex-wrap:wrap; }
.trade-plan-shortcuts button { font-size:12px; padding:9px 12px; background:#f0f5fc; border-color:#e1eaf6; color:#205b9f; }
.cash-settlement-state.is-cancelled { color:#7a8697; }
.contract-service-hint { display:block; margin-top:6px; color:var(--muted); font-size:11px; font-weight:400; line-height:1.45; }
.trade-form-intro { color:var(--muted); font-size:13px; margin:-3px 0 5px; }
.trade-simple-section { border-top:1px solid #e7edf4; padding:18px 0 2px; margin:4px 0; }
.trade-simple-section h3 { font-size:15px; margin:0 0 12px; letter-spacing:-.2px; }
.trade-simple-section.trade-products { border-bottom:0; }
.trade-payment-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.trade-horizon { grid-column:1/-1; font-size:12px; color:#52637e; }
.trade-horizon summary { cursor:pointer; padding:3px 0; }
.trade-horizon label { margin-top:12px; }
.trade-horizon p { margin:8px 0 0; font-size:12px; line-height:1.5; }
.form .trade-cash-switch { display:grid; grid-template-columns:minmax(0,1fr) 44px; gap:16px; align-items:center; position:relative; padding:16px; border:1px solid #e2e9f2; border-radius:16px; background:#f6f9fd; cursor:pointer; }
.trade-cash-switch strong { display:block; font-size:14px; letter-spacing:-.2px; }
.trade-cash-switch small { display:block; font-size:12px; color:#61718a; font-weight:400; line-height:1.5; margin-top:4px; }
.trade-cash-switch input[type=checkbox] { position:absolute; width:1px; height:1px; min-height:0; opacity:0; }
.trade-switch-track { width:44px; height:26px; background:#c9d2df; border-radius:20px; position:relative; transition:background .18s; }
.trade-switch-track:before { content:''; position:absolute; left:3px; top:3px; width:20px; height:20px; border-radius:50%; background:white; box-shadow:0 1px 4px #172f4f25; transition:transform .18s; }
.trade-cash-switch input:checked+.trade-switch-track { background:#0768cc; }
.trade-cash-switch input:checked+.trade-switch-track:before { transform:translateX(18px); }
.trade-cash-switch input:focus-visible+.trade-switch-track { outline:3px solid #8cbdf5; outline-offset:3px; }
.trade-cash-options { display:grid; grid-template-columns:1fr 1fr; gap:14px; padding:0 4px 8px; }
.trade-cash-options[hidden] { display:none; }
.trade-optional,.trade-preview { border:1px solid #e6ecf3; border-radius:14px; padding:12px 14px; }
.trade-optional summary,.trade-preview summary { font-size:12px; font-weight:600; color:#52637e; cursor:pointer; }
.trade-optional[open]>.trade-payment-grid { margin-top:15px; }
.trade-preview [data-simple-plan] { max-height:285px; overflow:auto; margin-top:12px; }
.trade-preview .trade-plan-row { margin-bottom:9px; }
.trade-connection-impact { font-size:13px; line-height:1.6; color:#52637e; background:#f5f8fc; padding:14px; border-radius:12px; }
.trade-link-state { display:inline-block; margin-top:7px; font-size:11px!important; color:#5b728e!important; }
@media(max-width:600px) {
  .trade-payment-grid,.trade-cash-options { grid-template-columns:1fr; }
  .trade-simple-section .trade-item-editor { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .trade-form-intro { font-size:12px; }
  .trade-preview [data-simple-plan] { max-height:38dvh; }
}
/* Unified customer workspace */
.customer-workspace { max-width:1600px; margin-inline:auto; }
.customer-page-tabs { margin-bottom:24px; }
.customer-heading { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:12px 0 30px; }
.customer-eyebrow { color:#74849a; font-size:10px; letter-spacing:1.8px; font-weight:700; }
.customer-heading h1 { font-size:clamp(28px,3.1vw,42px); line-height:1.12; letter-spacing:-1.6px; margin:10px 0 12px; }
.customer-heading p { margin:0; color:var(--muted); font-size:14px; line-height:1.6; }
.customer-main-actions { display:flex; gap:10px; flex-shrink:0; }
.customer-main-actions button { font-size:13px; padding:12px 17px; border-radius:13px; }
.customer-kpis { gap:14px; }
.customer-kpis .contract-metric { border-radius:20px; padding:22px; box-shadow:0 4px 18px #172e4a03; }
.customer-kpis .contract-metric strong { font-size:clamp(22px,2.4vw,32px); letter-spacing:-1px; font-variant-numeric:tabular-nums; }
.customer-kpis .contract-metric small { font-size:12px; }
.customer-kpis .customer-attention strong { color:#b34b29; }
.customer-toolbar { align-items:end; margin:28px 0 20px; gap:18px; }
.customer-toolbar .contract-filters { background:#e9eef5; padding:4px; border-radius:13px; max-width:100%; overflow-x:auto; flex-wrap:nowrap; }
.customer-toolbar .contract-filters button { white-space:nowrap; font-size:12px; padding:10px 13px; border-radius:10px; }
.customer-toolbar .trade-search { min-width:220px; max-width:100%; }
.customer-toolbar .trade-search span { font-size:11px; color:var(--muted); }
.customer-toolbar input { border-radius:12px; font-size:13px; padding:10px 13px; }
.customer-accounts { display:grid; gap:22px; }
.customer-account { background:white; border:1px solid #e0e7ef; border-radius:24px; box-shadow:0 6px 24px #1a345504; overflow:hidden; min-width:0; }
.customer-account-heading { display:flex; align-items:center; gap:13px; padding:22px 26px; border-bottom:1px solid #edf0f5; }
.customer-monogram { width:42px; height:42px; display:grid; place-items:center; flex-shrink:0; border-radius:14px; background:linear-gradient(145deg,#e7f0ff,#f3f7fd); color:#356399; font-size:20px; font-weight:650; }
.customer-account-heading h2 { margin:0; font-size:20px; letter-spacing:-.5px; overflow-wrap:anywhere; }
.customer-account-heading p { margin:5px 0 0; font-size:12px; color:var(--muted); }
.customer-count { margin-left:auto; font-size:11px; color:var(--muted); white-space:nowrap; }
.customer-account-body { padding:0 26px; }
.customer-contract { padding:22px 0; }
.customer-contract + .customer-contract { border-top:1px solid #e8edf4; }
.customer-contract header { display:flex; justify-content:space-between; align-items:start; gap:15px; }
.customer-contract header small { font-size:10px; text-transform:uppercase; letter-spacing:1px; color:var(--muted); }
.customer-contract h3 { margin:5px 0 0; font-size:16px; letter-spacing:-.2px; overflow-wrap:anywhere; }
.customer-contract-facts { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin:20px 0; }
.customer-contract-facts dt { font-size:11px; color:var(--muted); }
.customer-contract-facts dd { margin:7px 0 0; font-size:14px; font-weight:600; }
.customer-contract footer { display:flex; flex-wrap:wrap; gap:8px; }
.customer-contract footer button { font-size:12px; padding:8px 12px; }
.customer-account .trade-order { margin:0; padding:23px 0; border:0; border-radius:0; box-shadow:none; border-top:1px solid #e8edf4; }
.customer-account .trade-order header h2,.customer-account .trade-order header > div > small:first-child { display:none; }
.customer-account .trade-order header p { font-weight:650; font-size:15px; }
.customer-account .trade-order-totals { border-radius:15px; padding:18px; background:#f6f8fc; gap:14px; }
.customer-account .trade-order-totals dd { font-size:22px; }
.customer-account .trade-order details .table { max-width:100%; overflow:auto; }
.customer-account .trade-order summary { color:#075aba; }
.customer-account .trade-order > footer button { min-height:34px; }
@media(max-width:1000px){
 .customer-heading { align-items:start; flex-direction:column; gap:18px; }
 .customer-contract-facts { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:600px){
 .customer-heading { padding:4px 0 22px; }
 .customer-heading h1 { font-size:30px; letter-spacing:-1px; }
 .customer-main-actions { width:100%; flex-wrap:wrap; }
 .customer-main-actions button { flex:1; white-space:nowrap; }
 .customer-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
 .customer-kpis .contract-metric { padding:16px; border-radius:17px; min-width:0; }
 .customer-kpis .contract-metric strong { font-size:23px; overflow-wrap:anywhere; }
 .customer-toolbar .trade-search { width:100%; }
 .customer-account { border-radius:20px; }
 .customer-account-heading { padding:18px; flex-wrap:wrap; gap:10px; }
 .customer-account-heading h2 { font-size:18px; }
 .customer-account-heading > div:nth-child(2) { flex:1; min-width:0; }
 .customer-count { width:100%; margin-left:52px; }
 .customer-account-body { padding:0 18px; }
 .customer-contract header { flex-direction:column-reverse; gap:10px; }
 .customer-contract-facts { gap:18px 12px; }
 .customer-contract-facts dd { font-size:13px; overflow-wrap:anywhere; }
 .customer-account .trade-order-totals { padding:13px; gap:9px; }
 .customer-account .trade-order-totals dd { font-size:17px; }
 .customer-account .trade-order > footer { gap:6px; }
}
.customer-contract footer,.customer-account .trade-order footer { justify-content:flex-end; }
.customer-contact { margin:7px 0 0; color:var(--muted); font-size:12px; }

.customer-correction-actions { padding:0 0 22px; display:flex; justify-content:flex-end; }
.customer-correction-actions button { font-size:12px; }
.table-pdf-toolbar { display:flex; justify-content:flex-end; margin:8px 0; }
.table-pdf-toolbar button { padding:8px 14px; font-size:12px; border-radius:12px; }

.form > .table-pdf-toolbar { grid-column:1/-1; }

.feedback-inbox .feedback-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.feedback-inbox [data-feedback-results] { margin-top: 12px; }

.overview-control-banner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(16px, 2.5vw, 28px);
  border: 1px solid #d5e3f4;
  border-radius: 18px;
  background: linear-gradient(112deg, #fff 12%, #edf5ff 100%);
}
.overview-control-banner::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: 9%;
  top: -78px;
  width: 248px;
  height: 248px;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 17px, #83a9d922 18px 19px);
  pointer-events: none;
}

/* Racing palette for the application frame. */
:root {
  background: #ebecef;
  --racing-graphite: #191b20;
  --racing-red: #d72535;
}
body {
  background: radial-gradient(ellipse at 100% 0%, #e1e3e9, transparent 65%), #ebecef;
}
.shell > aside {
  background: linear-gradient(158deg, #292c33, var(--racing-graphite) 62%);
  border-color: #363941;
  box-shadow: inset 0 3px var(--racing-red);
}
.dashboard-brand, .dashboard-brand small,
#sectionNav a, .workspace-nav-group > summary, .mobile-dock a {
  color: #edf0f5;
}
.dashboard-brand img { background: transparent; mix-blend-mode: screen; }
.shell > aside footer { color: #b9c0cc; }
.workspace-nav-group > div { border-color: #515662; }
#sectionNav a:hover, .workspace-nav-group > summary:hover, .mobile-dock a:hover {
  background: #343842;
}
#sectionNav a[aria-current="page"], .mobile-dock a[aria-current="page"] {
  background: #432a31;
  color: #fff;
  box-shadow: inset 3px 0 #f45b68;
}
.workspace-nav-group.current > summary { color: #ff9ca5; }
:is(#sectionNav, .mobile-dock) a:focus-visible, .workspace-nav-group > summary:focus-visible {
  outline-color: #ff9ca5;
}
.mobile-dock {
  background: var(--racing-graphite);
  border-color: #3c404a;
}
.overview-masthead {
  background: linear-gradient(140deg, #fafafb, #e9ebef);
  border-color: #d8dbe2;
}
.overview-control-banner {
  color: #fff;
  border-color: #343842;
  border-inline-start: 4px solid var(--racing-red);
  background: repeating-linear-gradient(133deg, #ffffff08 0 1px, transparent 1px 9px),
    linear-gradient(105deg, #22242a 40%, #3b2931 100%);
}
.overview-control-banner::before { content: none; }
.customer-accounts { gap: 8px; }
.customer-account { border-radius: 14px; }
.customer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, auto) auto;
  gap: 10px 16px;
  align-items: center;
  padding: 8px 14px;
}
.customer-row-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 4px 6px;
  border-color: transparent;
  background: transparent;
  text-align: left;
}
.customer-row-name { min-width: 0; overflow-wrap: anywhere; }
.customer-row-chevron { font-size: 1.2rem; color: var(--muted); }
.customer-row-stats { display: flex; gap: clamp(10px, 2vw, 26px); }
.customer-row-stat { font-variant-numeric: tabular-nums; white-space: nowrap; }
.customer-row-stat strong { font-size: .86rem; }
.customer-row-stat.is-late strong, .customer-row-delete { color: #a02134; }
.customer-row + .customer-account-body { border-top: 1px solid var(--line); }
@media (max-width: 780px) {
  .customer-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; }
  .customer-row-stats { grid-column: 1/-1; grid-row: 2; padding-inline: 8px; flex-wrap: wrap; }
  .customer-row-stats:empty { display: none; }
}

.customer-row-toggle { justify-content: flex-start; }
.customer-row-stats { justify-self: end; justify-content: flex-end; }
.customer-row-delete { justify-self: end; }
@media (max-width: 780px) {
  .customer-row-stats { width: 100%; padding-inline: 0; }
}

.customer-create-modes { display:flex; gap:8px; margin:0 0 16px; }
.customer-create-modes button[aria-pressed="true"] { color:white; background:var(--accent); border-color:var(--accent); }

.customer-schedule-link { display:grid; justify-items:start; padding:4px 8px; background:#f4f7fc; border:1px solid #dfe5ee; }
.customer-schedule-link strong { text-decoration:underline; text-underline-offset:2px; }
.customer-quick-schedule { padding-block:14px; }
.customer-quick-schedule h3 { margin:0 0 10px; }

.customer-row {
  grid-template-columns: minmax(0,1fr) auto 124px;
  gap: 8px 18px;
  padding: 9px 16px;
}
.customer-row-stats {
  display:grid;
  grid-template-columns: 7.5rem 7rem 7.25rem 9.5rem;
  align-items:center;
  gap: 8px 14px;
}
.customer-row-stat { min-width:0; line-height:1.3; white-space:normal; }
.customer-row-stat:last-child { grid-column: -2 / -1; }
.customer-row-stat small { font-size:.72rem; }
.customer-row-toggle { align-self:stretch; }
.customer-row-name strong { font-weight:650; }
.customer-schedule-link {
  height:48px;
  width:100%;
  grid-column:1;
  margin:0;
  align-content:center;
  gap:2px;
  position:relative;
  padding:5px 21px 5px 8px;
  border-radius:9px;
  border-color:transparent;
  background:#f2f4f7;
  text-align:left;
}
.customer-schedule-link::after {
  content:'›';
  position:absolute;
  right:8px;
  top:50%;
  transform:translateY(-50%);
  color:var(--muted);
}
.customer-schedule-link[aria-expanded="true"]::after { transform:translateY(-50%) rotate(90deg); }
.customer-schedule-link:hover,.customer-schedule-link[aria-expanded="true"] { background:#e9edf3; }
.customer-schedule-link strong { text-decoration:none; }
.customer-row .customer-row-delete {
  background:transparent;
  border-color:transparent;
  font-size:.76rem;
  font-weight:600;
}
.customer-row .customer-row-delete:hover { background:#fff0f2; }
@media (max-width: 900px) {
  .customer-row { grid-template-columns:minmax(0,1fr) auto; gap:4px 8px; }
  .customer-row-stats { grid-column:1/-1; grid-row:2; width:100%; grid-template-columns:repeat(4,minmax(0,1fr)); }
  .customer-row-stats:empty { display:none; }
}
@media (max-width: 560px) {
  .customer-row { padding-inline:9px; }
  .customer-row-stats { grid-template-columns:repeat(2,minmax(0,1fr)); width:100%; gap:6px; }
  .customer-row-stat strong { font-size:.76rem; }
}

.ksi-review-table { overflow-x:auto; }
.ksi-review-table :is(th,td) { min-width:110px; vertical-align:top; }
.ksi-review-table td:nth-child(2),.ksi-review-table td:last-child { min-width:180px; }

.cycle-task-list { list-style:none; margin:8px 0 0; padding:0; }
.cycle-task-list li { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:12px 0; }
.cycle-task-list li + li { border-top:1px solid var(--line); }
.cycle-task-list li > div { min-width:0; overflow-wrap:anywhere; }
.cycle-task-list button { flex-shrink:0; max-width:48%; }
.ksi-review-card,.cycle-step-fields { min-width:0; padding:14px; border:1px solid var(--line); border-radius:14px; }
.ksi-review-card header { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:10px; }
.ksi-review-card header label,.cycle-step-fields label:has(input[type="checkbox"]) { display:flex; align-items:center; gap:8px; }
.ksi-review-card .form { margin:10px 0; }
.cycle-step,.cycle-step-fields legend { font-weight:650; }
.cycle-step-fields > p { margin-bottom:10px; }
#cycleDepartments > .card { margin-top:12px; box-shadow:none; }

.management-signals h2 { margin:0 0 12px; }
.management-signals > details + details { margin-top:10px; }
.management-signal-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,235px),1fr)); gap:12px; }
.management-signal header { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; }
.management-signal h3 { margin:0; font-size:1rem; }
.signal-status { display:inline-flex; align-items:center; gap:6px; color:var(--muted); font-size:.75rem; font-weight:650; }
.signal-status i { width:8px; height:8px; border-radius:50%; background:#7a8595; flex:none; }
[data-tone="good"] .signal-status i { background:#238957; }
[data-tone="warn"] .signal-status i { background:#c37b13; }
[data-tone="risk"] .signal-status i { background:#c93243; }
.management-signal .signal-main { margin:12px 0 2px; font-size:clamp(1.25rem,2.5vw,1.75rem); font-weight:730; color:var(--ink); font-variant-numeric:tabular-nums; }
.management-signal p:not(.signal-main) { margin:8px 0; }

.management-signal { display:flex; flex-direction:column; gap:8px; }
.signal-body { flex:1; }
.signal-actions > button.text {
  display:inline-flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  min-height:44px;
  width:100%;
  padding:9px 13px;
  border-radius:10px;
  border:1px solid #dce5f0;
  background:#f5f8fc;
  color:#164578;
  text-align:left;
}
.signal-actions > button.text::after { content:'›'; font-size:1.2rem; line-height:1; }
.signal-actions > button.text:hover { background:#e8f0fa; border-color:#c5d7eb; }
[data-tone="risk"] .signal-actions > button.text { background:#fff0f2; border-color:#f4d5db; color:#892537; }
.signal-method summary { width:fit-content; cursor:pointer; color:var(--muted); font-size:.77rem; padding:4px 0; }
.signal-method p { font-size:.82rem; }
.signal-status { flex:none; padding:4px 7px; border-radius:999px; background:#f1f4f8; }
.management-signal header { flex-wrap:wrap; }

.learning-toolbar { display:flex; align-items:end; justify-content:space-between; flex-wrap:wrap; gap:12px; margin-bottom:16px; }
.learning-toolbar label { display:grid; gap:6px; flex:1 1 240px; max-width:460px; }
.learning-group h2 { margin:0 0 8px; }
.learning-lesson + .learning-lesson { border-top:1px solid var(--line); }
.learning-lesson summary { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 4px; cursor:pointer; }
.learning-lesson summary::-webkit-details-marker { display:none; }
.learning-arrow { color:var(--muted); font-size:1.3rem; }
.learning-lesson[open] .learning-arrow { transform:rotate(90deg); }
.learning-body { padding:4px 4px 16px; }
.learning-body ol { margin:10px 0 16px; padding-inline-start:24px; }
.learning-body li { padding:5px 0 5px 3px; line-height:1.5; }
.module-guide { white-space:nowrap; }

.control-center {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1rem;
  margin-top: .75rem;
}
.control-panel { display: flex; flex-direction: column; gap: .9rem; min-width: 0; }
.control-panel h3 { margin: 0 0 .25rem; }
.control-panel small { color: inherit; opacity: .82; }
.control-panel dl { margin: 0; }
.control-panel dl > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .5rem;
  padding: .65rem 0;
  border-top: 1px solid rgba(110, 130, 156, .22);
}
.control-panel dd { margin: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.control-panel dd small { display: block; font-weight: 500; }
.control-panel .button { align-self: flex-end; margin-top: auto; }

.service-budget-detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
}
.service-budget-detail-head h2 { margin: 0; }
.service-budget-detail-head p { margin: .35rem 0 0; color: #526176; }
.service-budget-export .table-pdf-toolbar { margin: 0; }
.service-budget-export:empty { display: none; }
.service-budget-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1rem;
  margin: 1rem 0 .65rem;
  font-size: .82rem;
  color: #526176;
}
.service-budget-legend strong { color: #254568; }
.service-budget-matrix th.num, .service-budget-matrix td.num { min-width: 92px; white-space: nowrap; }
.service-budget-matrix :is(th, td) { padding: .65rem .8rem; }
.service-budget-matrix thead th { font-size: .8rem; }
.service-budget-matrix td { font-variant-numeric: tabular-nums; }
.service-budget-matrix td:first-child { font-size: .88rem; }
.service-budget-name { display: block; font-weight: 650; }
.service-budget-matrix .service-budget-count {
  display: inline-block;
  padding: .12rem .4rem;
  border-radius: 6px;
  background: #eaf1fb;
  color: #254568;
  font-size: .95rem;
  font-weight: 750;
}
.service-budget-matrix .service-budget-count span { font-size: .7rem; font-weight: 600; }
.service-budget-matrix .service-budget-missing { color: #657487; background: transparent; font-weight: 400; }
.service-budget-matrix tr > :last-child { background: #edf4fd; }
.service-budget-matrix tr.rollup > * { background: #e7effb; border-top: 1px solid #c5d5ed; }
@media (max-width: 560px) {
  .service-budget-matrix :is(th, td) { padding: .55rem .6rem; }
  .service-budget-matrix tr > :first-child { width: 125px; max-width: 125px; }
}

.custom-brand body {
  background: radial-gradient(ellipse at 100% 0%,color-mix(in srgb,var(--brand-color) 14%,#f4f5f8),transparent 68%),#ebecef;
}
.custom-brand {
  --racing-red: var(--brand-color);
  --racing-graphite: color-mix(in srgb,var(--brand-color) 16%,#17191e);
}
.custom-brand .shell > aside {
  background: linear-gradient(158deg,color-mix(in srgb,var(--brand-color) 24%,#262830),var(--racing-graphite) 70%);
}
.custom-brand .dashboard-brand img { mix-blend-mode: normal; object-fit: contain; max-height: 90px; }
.custom-brand .dashboard-brand { overflow-wrap: anywhere; }
.custom-brand .overview-control-banner {
  background: linear-gradient(105deg,#22242a 35%,color-mix(in srgb,var(--brand-color) 34%,#1d1f26));
}
.custom-brand .command { background: linear-gradient(125deg,#1d2028,color-mix(in srgb,var(--brand-color) 40%,#1d2028)); }
.custom-brand :is(#sectionNav,.mobile-dock) a[aria-current="page"] {
  background: color-mix(in srgb,var(--brand-color) 24%,#22242a);
  box-shadow: inset 3px 0 var(--brand-color);
}
.custom-brand .workspace-nav-group.current > summary {
  color: color-mix(in srgb,var(--brand-color) 23%,white);
}
.custom-brand :is(#sectionNav,.mobile-dock) a:focus-visible,
.custom-brand .workspace-nav-group > summary:focus-visible {
  outline-color: color-mix(in srgb,var(--brand-color) 23%,white);
}
#brandingForm input[type="color"] { width: 5rem; min-height: 40px; padding: 4px; cursor: pointer; }

.customer-schedule-link.is-current, .customer-schedule-link.is-current small { color:#17603f; }
.customer-schedule-link.is-current { background:#e7f5ed; }
.customer-schedule-link.is-current:hover, .customer-schedule-link.is-current[aria-expanded="true"] { background:#d7eddf; }

/* Clienti, contratti e incassi */
.customer-dashboard {
  --customer-line: #e3e8ef;
  --customer-ink: #172a40;
  --customer-muted: #506176;
}
.customer-dashboard .customer-heading {
  border: 1px solid var(--customer-line);
  border-radius: 22px;
  background: linear-gradient(120deg,#fff 32%,#eef4fa);
  padding: clamp(17px,3vw,32px);
  margin: 0 0 16px;
}
.customer-dashboard .customer-heading h1 {
  color: var(--customer-ink);
  margin: 0 0 6px;
  font-size: clamp(22px,3vw,36px);
  letter-spacing: -.035em;
}
.customer-dashboard .customer-heading p { color:var(--customer-muted); }
.customer-dashboard .customer-main-actions button { min-height:44px; white-space:nowrap; }
.customer-dashboard .customer-kpis { gap:12px; }
.customer-dashboard .contract-metric {
  --metric-accent:#426b9d;
  background: #fff;
  border: 1px solid var(--customer-line);
  border-radius:18px;
  padding:clamp(12px,1.8vw,22px);
  box-shadow:0 3px 12px #172e4a06;
}
.customer-dashboard .contract-metric::before {
  content:"";
  display:block;
  width:26px;
  height:3px;
  border-radius:3px;
  margin-bottom:12px;
  background:var(--metric-accent);
}
.customer-dashboard .contract-metric:nth-child(2) { --metric-accent:#23805d; }
.customer-dashboard .contract-metric.customer-attention { --metric-accent:#ad304a; background:#fff9fa; }
.customer-dashboard .customer-attention strong { color:#a02134; }
.customer-dashboard .contract-metric small { color:var(--customer-muted); }
.customer-dashboard .contract-metric strong { margin-block:6px; color:var(--customer-ink); }
.customer-dashboard .contract-metric.customer-attention strong { color:#a02134; }
.customer-dashboard .customer-toolbar {
  display:flex;
  flex-wrap:wrap;
  justify-content:space-between;
  align-items:end;
  border:1px solid var(--customer-line);
  border-radius:16px;
  padding:10px 12px;
  gap:10px 16px;
  margin:20px 0 14px;
  background:#fff;
}
.customer-dashboard .contract-filters { background:#f0f3f7; gap:2px; }
.customer-dashboard .contract-filters button { min-height:39px; }
.customer-dashboard .contract-filters .is-selected { color:#0759a8; }
.customer-dashboard .trade-search { flex:1 1 220px; min-width:0; max-width:350px; }
.customer-dashboard .trade-search input { min-height:44px; background:#f9fbfd; }
.customer-dashboard .customer-list {
  overflow:hidden;
  background:#fff;
  border:1px solid var(--customer-line);
  border-radius:18px;
  box-shadow:0 3px 12px #172e4a06;
}
.customer-list-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:13px 17px;
  border-bottom:1px solid var(--customer-line);
  background:#f8fafc;
}
.customer-list-header h2 { margin:0; font-size:.96rem; color:#172a40; }
.customer-list-header span { color:#506176; font-size:.8rem; }
.customer-dashboard .customer-accounts { gap:0; }
.customer-dashboard .customer-account {
  background:#fff;
  border:0;
  border-radius:0;
  box-shadow:none;
}
.customer-dashboard .customer-account + .customer-account { border-top:1px solid var(--customer-line); }
.customer-dashboard .customer-row { padding-block:10px; transition:background-color .15s ease; }
.customer-dashboard .customer-row:hover, .customer-dashboard .customer-row:focus-within { background:#f8fbfe; }
.customer-dashboard .customer-row-name strong { color:var(--customer-ink); }
.customer-dashboard .customer-row-name small,
.customer-dashboard .customer-row-stat small { color:var(--customer-muted); }
.customer-dashboard .customer-row-stat strong { letter-spacing:-.015em; overflow-wrap:anywhere; }
.customer-dashboard .customer-schedule-link.is-late { background:#faedf0; color:#a02134; }
.customer-dashboard .customer-schedule-link.is-late:hover,
.customer-dashboard .customer-schedule-link.is-late[aria-expanded="true"] { background:#f5dfe5; }
.customer-dashboard .customer-schedule-link.is-late small { color:#8f243a; }
.customer-dashboard .customer-schedule-link.is-current small { color:#17603f; }
.customer-dashboard .customer-row-delete { padding-inline:8px; }
.customer-dashboard .customer-account-body { background:#f8fafc; }
.customer-dashboard :is(button,input):focus-visible { outline:2px solid #2168ad; outline-offset:2px; }
@media (max-width:560px) {
  .customer-dashboard .customer-toolbar { align-items:stretch; }
  .customer-dashboard .trade-search { max-width:none; }
  .customer-dashboard .customer-list-header { padding-inline:12px; }
  .customer-dashboard .customer-row-stats { padding:0 5px; }
  .customer-dashboard .customer-row-stat:not(button) { padding-inline:7px; }
}

.analysis-chart-pair { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,25rem),1fr)); gap: 1rem; margin-top: 1rem; }
.analysis-chart-pair section { min-width: 0; padding: 1rem; border: 1px solid var(--line); border-radius: 14px; }
.analysis-chart-pair h3 { margin: 0 0 .5rem; font-size: .95rem; }

.report-table .tone-inventory-result > * { background: #e8f5ef; color: #17513d; }
@media(min-width:1200px) { #commandEconomyHeading + p { max-width: 75ch; } .command-block[aria-labelledby="commandEconomyHeading"] .command-financial-grid { grid-template-columns:repeat(4,minmax(0,1fr)); } }

.budget-vat-action { margin-inline-start:auto; flex:none; min-height:26px; padding:3px 7px; border-radius:8px; background:#edf3fb; color:#24527d; font-size:.68rem; font-weight:700; white-space:nowrap; }

.workshop-dashboard { display: grid; gap: 1rem; min-width: 0; }
.workshop-dashboard .heading { margin: 0; }
.workshop-layout { display: grid; grid-template-columns: minmax(19rem,1fr) minmax(0,1.45fr); gap: 1rem; align-items: start; }
.workshop-editor, .workshop-output, .workshop-results { display: grid; gap: .9rem; min-width: 0; }
.workshop-section, .workshop-comparison { margin: 0; border-radius: 1.1rem; box-shadow: 0 5px 20px #1426390d; }
.workshop-section[hidden] { display: none; }
.workshop-section header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; }
.workshop-section h2, .workshop-output-header h2, .workshop-comparison h2 { margin: 0; }
.workshop-section header small { color: #335d80; font-weight: 650; font-variant-numeric: tabular-nums; }
.workshop-section p, .workshop-comparison p { margin: .45rem 0 0; }
.workshop-section p:empty, .workshop-footer p:empty { display: none; }
.workshop-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; margin-top: .85rem; }
.workshop-fields label { display: grid; gap: .28rem; align-content: end; }
.workshop-fields input { width: 100%; min-width: 0; min-height: 2.65rem; border-radius: .65rem; }
.workshop-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  justify-self: end;
  max-width: 100%;
  gap: .7rem 1rem;
  padding: .65rem .75rem;
  border: 1px solid var(--workshop-line);
  border-radius: var(--workshop-radius);
  background: #f7fafd;
}
.workshop-footer p { margin: 0; color: var(--workshop-muted); font-size: .875rem; }
.workshop-footer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .55rem;
}
.workshop-output-header {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: .25rem .6rem;
}
.workshop-output-header .workshop-switch { justify-self: end; }
.workshop-output-header p { grid-column: 1 / -1; margin: 0; }
.workshop-switch { display: flex; gap: .2rem; padding: .2rem; background: #e9eff6; border-radius: .7rem; }
.workshop-switch button { min-height: 2.4rem; border: 0; background: transparent; color: #294361; border-radius: .5rem; }
.workshop-switch button[aria-pressed="true"] { background: #fff; color: #13467a; box-shadow: 0 2px 8px #18324e1a; }
.workshop-hero { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: clamp(1rem,3vw,2rem); border-radius: 1.25rem; background: radial-gradient(ellipse at top right,#315878,transparent 65%),#13243b; color: #fff; }
.workshop-hero h3, .workshop-hero p, .workshop-hero dl { color: #e0edf9; margin: 0; }
.workshop-hero strong { display: block; font-size: clamp(1.9rem,4vw,3.4rem); letter-spacing: -.05em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.workshop-hero-rate { display: grid; gap: .45rem; }
.workshop-hero-rate dd { margin: 0; font-weight: 750; color: #fff; }
.workshop-limit { color: #972f35; }
.workshop-performance { padding: 1rem; border-radius: 1.1rem; color: #f5f8fc; background: linear-gradient(125deg,#101827,#24364b); }
.workshop-performance h3 { color: #f5f8fc; margin: 0 0 .7rem; }
.workshop-chart-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; }
.workshop-chart-grid article { padding: .75rem; border-radius: .75rem; background: #101a2a; border: 1px solid #354558; }
.workshop-chart-grid h4, .workshop-chart-grid p { margin: 0; color: #e3effc; }
.workshop-chart-grid p { font-size: .8rem; margin-top: .25rem; }
.workshop-chart-row { margin: .6rem 0; }
.workshop-chart-row > div:first-child { display: flex; justify-content: space-between; gap: .5rem; }
.workshop-chart-row strong { text-align: right; font-variant-numeric: tabular-nums; }
.workshop-track { position: relative; height: .48rem; margin-top: .25rem; border-radius: .24rem; background: #334258; }
.workshop-track span, .workshop-track i { position: absolute; inset-block: 0; left: 0; border-radius: inherit; }
.workshop-track i { width: 2px; inset-block: -.15rem; transform: translateX(-1px); background: #fff; }
.workshop-track .loss { background: #ff8790; }
.workshop-track .goal { background: #bbed51; }
.workshop-track .neutral { background: #dbe5ee; }
.workshop-track .current { background: #80bfff; }
.workshop-comparison .table { margin-top: .7rem; }
.workshop-comparison th, .workshop-comparison td { padding: .55rem; }
.workshop-comparison td:last-child { font-weight: 700; }
@media(max-width:1000px) { .workshop-layout { grid-template-columns: minmax(0,1fr); } }
@media(max-width:540px) {
  .workshop-fields, .workshop-chart-grid { grid-template-columns: minmax(0,1fr); }
}

.workshop-dashboard {
  --workshop-ink: #17283d;
  --workshop-muted: #4c6076;
  --workshop-line: #dce5ef;
  --workshop-radius: 18px;
  gap: 1.2rem;
}
.workshop-dashboard .heading h1 { letter-spacing: -.045em; }
.workshop-layout { gap: clamp(1rem, 2.2vw, 1.65rem); }
.workshop-editor, .workshop-output, .workshop-results { gap: 1rem; }
.workshop-section, .workshop-comparison {
  border: 1px solid var(--workshop-line);
  border-radius: var(--workshop-radius);
  box-shadow: 0 4px 16px #1528400a;
  padding: clamp(1rem, 1.6vw, 1.35rem);
}
.workshop-section h2, .workshop-output-header h2, .workshop-comparison h2 {
  color: var(--workshop-ink);
  letter-spacing: -.025em;
}
.workshop-section header small:not(:empty) {
  padding: .27rem .55rem;
  border-radius: 7px;
  background: #edf4fb;
  color: #284c72;
}
.workshop-section p:not(.workshop-limit), .workshop-output-header .muted, .workshop-comparison .muted {
  color: var(--workshop-muted);
}
.workshop-fields label { color: var(--workshop-ink); font-size: .875rem; }
.workshop-fields input {
  min-height: 44px;
  border: 1px solid #c6d3e1;
  background: #f9fbfd;
  font-variant-numeric: tabular-nums;
}
.workshop-fields input:focus { background: #fff; }
.workshop-dashboard :is(input,button,[tabindex]):focus-visible { outline: 2px solid #2266ad; outline-offset: 2px; }
.workshop-switch { flex: none; border: 1px solid var(--workshop-line); }
.workshop-switch button { min-height: 44px; min-width: 68px; }
.workshop-footer-actions button {
  min-height: 44px;
  min-width: 8rem;
  max-width: 100%;
  margin: 0;
  padding: .55rem .75rem;
  border-radius: 10px;
  font-weight: 650;
  text-align: center;
}
.workshop-hero {
  border-radius: var(--workshop-radius);
  background: radial-gradient(ellipse at 95% 0%,#264b6c,transparent 66%), #13243b;
  box-shadow: 0 9px 24px #14263922;
}
.workshop-hero > div { min-width: 0; }
.workshop-hero > div > strong { line-height: 1.12; margin-block: .25em; }
.workshop-hero .workshop-hero-result { display: flex; align-items: baseline; flex-wrap: wrap; gap: .25rem .5rem; }
.workshop-hero-result strong { display: inline; font-size: 1.04rem; letter-spacing: 0; color: #d8f397; }
.workshop-hero-rate { grid-template-columns: repeat(auto-fit,minmax(min(100%,7.5rem),1fr)); flex: 1 1 100%; border-top: 1px solid #ffffff38; padding-top: .75rem; }
.workshop-hero-rate dt { font-size: .875rem; }
.workshop-hero-rate dd { font-size: 1.12rem; font-variant-numeric: tabular-nums; }
.workshop-performance { border-radius: var(--workshop-radius); padding: clamp(1rem,1.6vw,1.3rem); }
.workshop-chart-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,13.5rem),1fr)); }
.workshop-chart-grid article { min-width: 0; }
.workshop-chart-row strong { color: #f5f8fc; }
.workshop-track { height: .55rem; }
.workshop-comparison .table { border: 1px solid var(--workshop-line); border-radius: 12px; }
.workshop-comparison :is(th,td) { padding: .65rem .6rem; font-variant-numeric: tabular-nums; }
.workshop-comparison thead th { background: #edf3f9; color: #274562; }
.workshop-comparison tbody th { text-align: left; font-weight: 550; }
.workshop-comparison :is(th,td):last-child { background: #f0f6fe; }
.workshop-comparison .workshop-total :is(th,td) { background: #eaf1f8; font-weight: 720; color: var(--workshop-ink); }
.workshop-comparison .workshop-supplement th { color: #37597c; }
.workshop-negative { color: #a02037; }
@media(max-width:540px) {
  .workshop-comparison :is(th,td) { padding: .5rem; }
  .workshop-comparison .table th:first-child { min-width: 8.5rem; }
}

.workshop-footer .workshop-delete {
  border-color: #e6cbd0;
  color: #a02037;
}
.workshop-footer .workshop-delete:hover { background: #fff1f3; }

.workshop-revenue-sheet .table { overflow: visible; max-height: none; margin-top: 1rem; }
.workshop-revenue-sheet table { width: 100%; table-layout: fixed; white-space: normal; }
.workshop-revenue-sheet .report-table thead,
.workshop-revenue-sheet .report-table tr > :first-child { position: static; }
.workshop-revenue-sheet .report-table tr > :first-child { width: 17%; min-width: 0; max-width: none; }
.workshop-revenue-sheet thead th:first-child { border-start-start-radius: 12px; }
.workshop-revenue-sheet thead th:last-child { border-start-end-radius: 12px; }
.workshop-revenue-sheet tfoot th:first-child { border-end-start-radius: 12px; }
.workshop-revenue-sheet tfoot td:last-child { border-end-end-radius: 12px; }
.workshop-revenue-sheet :is(th,td) { padding: .4rem clamp(.2rem,1vw,.65rem); overflow-wrap: anywhere; }
.workshop-revenue-sheet thead tr:first-child th.num { text-align: right; }
.workshop-revenue-sheet .workshop-result-col { width: 24%; border-inline-start: 1px solid #dbe5f1; font-variant-numeric: tabular-nums; }
.workshop-revenue-sheet .report-amount { width: 100%; max-width: 7rem; }
.workshop-revenue-sheet .report-amount input { width: 100%; min-width: 0; }
.workshop-revenue-sheet td small { display: block; margin-top: .18rem; color: #4c6076; font-size: .75rem; }
.workshop-revenue-sheet td small[hidden] { display: none; }
.workshop-revenue-sheet tfoot { font-weight: 730; }
.workshop-revenue-sheet tfoot :is(th,td) { border-top: 2px solid #b3c7df; background: #eaf1fc; }
.workshop-revenue-sheet tfoot .budget-col { background: #dceaff; }
.workshop-revenue-sheet tfoot .actual-col { background: #dbefe3; }
.workshop-revenue-sheet .actions { justify-content: flex-end; align-items: center; }
@media(max-width:540px) {
  .workshop-revenue-sheet table { font-size: .78rem; }
  .workshop-revenue-sheet .report-amount input { padding-inline-start: .2em; }
}

.workshop-table-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 28rem), 1fr));
  align-items: start;
  gap: clamp(1rem, 2.2vw, 1.65rem);
}
.workshop-table-pair > .card {
  min-width: 0;
  margin: 0;
  padding: clamp(1rem, 1.6vw, 1.35rem);
}
.workshop-table-pair h2 { margin: 0; }

.workshop-dashboard { --workshop-grid-gap: clamp(1rem, 2.2vw, 1.65rem); }
.workshop-layout, .workshop-table-pair { gap: var(--workshop-grid-gap); }
.workshop-table-pair > .card {
  border: 1px solid var(--workshop-line);
  border-radius: var(--workshop-radius);
  box-shadow: 0 5px 20px #1426390d;
}
.workshop-revenue-sheet .table, .workshop-comparison .table { margin-top: .8rem; }
.workshop-revenue-sheet p, .workshop-comparison p { line-height: 1.45; }
.workshop-chart-section header { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; }
.workshop-chart-section header h2 { margin: 0; }
.workshop-chart-plan { margin-top: 1rem; }
@media(min-width:1001px) {
  .workshop-layout, .workshop-table-pair {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}

.workshop-labor-reference { margin-top: 1rem; padding-top: .75rem; border-top: 1px solid var(--workshop-line); }
.workshop-labor-reference summary { color: var(--workshop-ink); font-weight: 650; cursor: pointer; }

.workshop-hero-loss strong { color: #ffb5bc; }

.workshop-capacity-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5rem), 1fr));
  gap: .65rem;
  margin: .9rem 0;
}
.workshop-capacity-metrics > div {
  min-width: 0;
  padding: .85rem;
  border: 1px solid var(--workshop-line);
  border-radius: 13px;
  background: #f5f8fc;
}
.workshop-capacity-metrics dt { color: var(--workshop-ink); font-size: .875rem; font-weight: 650; }
.workshop-capacity-metrics dd {
  margin: .25rem 0;
  color: var(--workshop-ink);
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
.workshop-capacity-metrics small { display: block; color: var(--workshop-muted); line-height: 1.35; }

.workshop-utilization { display: grid; gap: .25rem; align-content: start; color: var(--workshop-ink); }
.workshop-utilization > span { font-weight: 650; font-size: .875rem; }
.workshop-utilization output { font-size: 1.25rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.workshop-utilization small { color: var(--workshop-muted); }


.workshop-profit-state {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .55rem;
  padding: .8rem 1rem;
  margin-top: .9rem;
  border-radius: 12px;
  background: #edf3fa;
  color: #284c72;
}
.workshop-profit-state[data-tone="win"] { background: #e9f6ee; color: #17643e; }
.workshop-profit-state[data-tone="loss"] { background: #fbecef; color: #92263b; }
.workshop-profit-state small { display: block; margin-top: .15rem; color: inherit; }
.workshop-profit-state output { font-weight: 750; font-size: 1.25rem; font-variant-numeric: tabular-nums; }

.workshop-action-plan { min-width: 0; border: 1px solid var(--workshop-line); border-radius: var(--workshop-radius); }
.workshop-action-plan h3, .workshop-action-plan h4 { margin: 0; color: var(--workshop-ink); }
.workshop-action-plan p { margin: .5rem 0 0; color: var(--workshop-muted); }
.workshop-action-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,13rem),1fr)); gap: .65rem; margin-top: .85rem; }
.workshop-action-grid > div { padding: .8rem; border-radius: 12px; background: #f2f6fa; border: 1px solid var(--workshop-line); }
.workshop-action-grid h4 { font-size: .875rem; }
.workshop-action-grid strong { display: block; margin-top: .3rem; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.workshop-action-grid p { font-size: .875rem; line-height: 1.4; }

.workshop-layout > .workshop-output-header { grid-column: 1 / -1; }

.workshop-dashboard [tabindex="-1"] { scroll-margin-top: 1rem; }
.workshop-table-pair { grid-template-columns: minmax(0,1fr); }
.workshop-table-pair > .card { display: flex; flex-direction: column; }
.workshop-table-pair > .card > .table { margin-top: .8rem; }
.workshop-revenue-notes { margin-top: .9rem; }
.workshop-revenue-notes p { margin: 0; }
.workshop-revenue-notes p + p { margin-top: .35rem; }
#workshopRevenueStatus:empty { display: none; }
.workshop-revenue-actions { margin-top: .85rem; gap: .55rem; }
.workshop-revenue-actions .table-pdf-toolbar { margin: 0; }
.workshop-revenue-actions button {
  min-height: 44px;
  font-size: .875rem;
  padding: .55rem .8rem;
}
@media(min-width:1001px) {
  .workshop-table-pair { grid-template-columns: repeat(2,minmax(0,1fr)); align-items: stretch; }
}

.workshop-simple-result > div {
  flex: 1 1 13rem;
  min-width: 0;
  container-type: inline-size;
}
.workshop-simple-result > div > strong {
  font-size: clamp(1.15rem, 10cqi, 1.95rem);
  white-space: nowrap;
  overflow-wrap: normal;
}
.workshop-simple-result .workshop-profit-summary {
  padding: .85rem 1rem;
  border: 1px solid #ffffff36;
  border-radius: 12px;
  background: #ffffff12;
}
.workshop-profit-summary > strong { color: #d8f397; }
.workshop-profit-summary.workshop-hero-loss > strong { color: #ffb5bc; }
.workshop-profit-summary .workshop-profit-equation { margin-top: .35rem; font-size: .875rem; }
.workshop-simple-break-even { margin: 0; border: 1px solid var(--workshop-line); border-radius: var(--workshop-radius); }
.workshop-simple-break-even h3, .workshop-simple-break-even dl { margin: 0; }
.workshop-simple-break-even dl { margin-top: .7rem; }
.workshop-daily-link { display: block; margin-inline-start: auto; font-size: .78rem; }
.workshop-daily-table { max-height: min(52vh, 30rem); overflow: auto; }
.workshop-daily-table input { min-width: 3.5rem; width: 100%; }
.workshop-daily-table th, .workshop-daily-table td { padding: .4rem; }

.decision-details { display: flex; flex-wrap: wrap; gap: .75rem 2rem; margin: 0 0 1rem; }
.decision-details dt { color: #4c6076; font-size: .85rem; }
.decision-details dd { margin: .25rem 0 0; font-weight: 650; }
.decision-expected { white-space: pre-wrap; }

.subscription-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1rem; }
.subscription-grid > .card { min-width: 0; }
.subscription-price { margin: .5rem 0 1rem; }
.subscription-price strong { font-size: 1.65rem; font-variant-numeric: tabular-nums; }
.subscription-modules { columns: 12rem; padding-inline-start: 1.2rem; }
.subscription-modules li { break-inside: avoid; margin-bottom: .3rem; }

.profile-menu-actions:not([hidden]) { display: grid; gap: .5rem; padding-block-start: .75rem; border-top: 1px solid #dce6f2; }
.profile-menu-actions .button, .profile-menu-actions button { width: 100%; justify-content: space-between; text-align: start; }
.profile-menu-actions small { color: #4c6076; }

.module-settings-panel {
  --module-control-surface: #f5f7fa;
  display: grid;
  gap: 1.15rem;
  padding: clamp(1rem, 2.5vw, 1.75rem);
}
.module-settings-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(13rem, 19rem);
  align-items: center;
  gap: .85rem 2rem;
}
.module-settings-heading h2 { margin: 0; text-wrap: balance; }
.module-settings-picker { display: grid; gap: .35rem; font-size: .875rem; font-weight: 650; color: #46576c; }
.module-settings-picker select {
  appearance: none;
  min-height: 46px;
  width: 100%;
  min-width: 0;
  padding: .55rem 2.15rem .55rem .8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: linear-gradient(45deg, transparent 50%, #50637a 50%) right 17px center / 5px 5px no-repeat,
    linear-gradient(135deg, #50637a 50%, transparent 50%) right 12px center / 5px 5px no-repeat,
    var(--module-control-surface);
  font-size: 1rem;
  cursor: pointer;
}
.module-settings-picker select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.module-settings-panel .module-list { background: var(--module-control-surface); }
.module-settings-panel .module-toggle { min-height: 58px; }
.module-settings-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .75rem; }
.module-settings-footer p { margin: 0 auto 0 0; font-size: .875rem; }
.module-settings-footer p:empty, .module-settings-panel #moduleSaveStatus:empty { display: none; }
.module-settings-footer button { min-height: 44px; }

@media (max-width: 640px) {
  .module-settings-heading { grid-template-columns: minmax(0, 1fr); }
  .module-settings-footer button { width: 100%; }
}
@media (forced-colors: active) {
  .module-settings-picker select { appearance: auto; background: Canvas; color: CanvasText; }
  .module-settings-panel .module-toggle:hover { background: Canvas; }
}

.subscription-intro { max-width: 46rem; margin-block: .5rem 1.3rem; }
.subscription-intro h2 { font-size: clamp(1.5rem, 3vw, 2.35rem); line-height: 1.1; letter-spacing: -.035em; margin: 0 0 .55rem; text-wrap: balance; }
.subscription-intro p { margin: .5rem 0; color: #46576c; }
.subscription-intro .subscription-tax { font-size: .875rem; font-weight: 650; }
.subscription-grid > .subscription-offer { display: flex; flex-direction: column; padding: clamp(1rem, 2.2vw, 1.6rem); }
.subscription-grid > .subscription-featured { border: 1px solid #9cbcec; background: linear-gradient(155deg, #f2f7ff, #fff 56%); }
.subscription-offer-heading { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem .65rem; }
.subscription-offer-heading h3 { margin: 0; font-size: 1.2rem; }
.subscription-offer .subscription-price { color: var(--ink); margin: .75rem 0 .55rem; white-space: nowrap; }
.subscription-offer .subscription-price strong { font-size: clamp(1.65rem, 2.7vw, 2.5rem); letter-spacing: -.045em; }
.subscription-benefit { min-height: 3rem; margin: 0 0 .8rem; color: #46576c; }
.subscription-features { display: grid; gap: .75rem; padding: .9rem 0 0; margin: 0 0 1rem; border-top: 1px solid var(--line); list-style: none; }
.subscription-features li { display: grid; gap: .1rem; }
.subscription-features li span { color: #46576c; font-size: .9rem; line-height: 1.4; }
.subscription-cta { margin-top: auto; }
.subscription-cta button { width: 100%; min-height: 44px; }
.subscription-request-note { color: #46576c; font-size: .9rem; margin-top: .8rem; }

.subscription-intro {
  max-width: none;
  padding: clamp(1.4rem, 4.5vw, 3.1rem);
  border-radius: clamp(18px, 3vw, 28px);
  color: #fff;
  background: radial-gradient(ellipse at 100% 0, #253f61 0, transparent 62%), #101e31;
}
.subscription-intro h2 { max-width: 20ch; font-size: clamp(1.8rem, 4.1vw, 3.45rem); color: #fff; }
.subscription-intro p { max-width: 56ch; color: #e2edf9; }
.subscription-intro .subscription-tax { margin-top: 1.2rem; color: #c5dcf7; }
.subscription-grid > .subscription-offer {
  border: 1px solid var(--offer-border);
  border-block-start: 4px solid var(--offer-accent);
  background: linear-gradient(165deg, var(--offer-tint), #fff 47%);
}
.subscription-tone-0 { --offer-accent: #185eae; --offer-tint: #edf5ff; --offer-border: #c9dff9; }
.subscription-tone-1 { --offer-accent: #087b55; --offer-tint: #eaf8f2; --offer-border: #b1ddca; }
.subscription-tone-2 { --offer-accent: #6b43b1; --offer-tint: #f4edff; --offer-border: #e0cff8; }
.subscription-offer .subscription-price strong, .subscription-offer .tag { color: var(--offer-accent); }
.subscription-offer .tag { background: var(--offer-tint); border: 1px solid var(--offer-border); }
.subscription-offer .subscription-benefit { font-size: 1.05rem; line-height: 1.35; font-weight: 675; color: var(--ink); }
.subscription-featured .subscription-cta .primary { background: #08734f; border-color: #08734f; color: #fff; }
.subscription-featured .subscription-cta .primary:hover { background: #065f42; border-color: #065f42; }

.advisor-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: .75rem; }
.advisor-metrics div { padding: .85rem; border-radius: 12px; background: #f1f5fa; }
.advisor-metrics dt { color: #46576c; font-size: .875rem; }
.advisor-metrics dd { margin: .35rem 0 0; font-size: 1.2rem; font-weight: 700; }
.advisor-priorities { display: grid; gap: .8rem; padding-inline-start: 1.5rem; }
.advisor-priorities h3, .advisor-priorities p { margin: .3rem 0; }
.advisor-company summary { padding: .45rem 0; cursor: pointer; }
.advisor-plan-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.advisor-brief { width: 100%; min-height: 13rem; }

.advisor-chat-log:not(:empty) { display: grid; gap: .7rem; max-height: 28rem; overflow-y: auto; padding: .65rem 0; }
.advisor-message { max-width: min(100%, 46rem); justify-self: start; border-radius: 14px; padding: .75rem 1rem; background: #f1f5fa; overflow-wrap: anywhere; }
.advisor-message[data-role="user"] { justify-self: end; background: #e7f1ff; }
.advisor-message p { white-space: pre-wrap; margin: .3rem 0 0; }
.advisor-chat-prompts { margin: .65rem 0 1rem; row-gap: .5rem; }
#advisorChat textarea { width: 100%; margin: .25rem 0 .6rem; }

#usedBikeForm { display: grid; gap: 1rem; margin-bottom: 1rem; }
#usedBikeForm .card { margin: 0; min-width: 0; }
.used-bike-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
  margin-block: 1rem;
}
#usedBikeForm label { display: grid; gap: .35rem; align-content: end; font-weight: 600; }
#usedBikeForm :is(input, select, textarea) {
  width: 100%;
  min-width: 0;
  min-height: 2.7rem;
  padding: .55rem .7rem;
  background: #f5f7fa;
}
#usedBikeForm summary { cursor: pointer; font-weight: 700; }
#usedBikeForm summary::marker { color: #005bbb; }
#usedBikeCosts > summary, .used-bike-goals > summary { font-size: 1.12rem; }
.used-bike-notes { grid-column: 1 / -1; }
.used-bike-goals { border-top: 1px solid #dce4ed; padding-top: 1rem; margin-top: 1rem; }
.used-bike-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .8rem;
  padding: .75rem 0;
  border-top: 1px solid #e0e6ef;
}
.used-bike-line strong { text-align: right; }
.used-bike-cost {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(6.5rem, 9rem) auto;
  align-items: end;
  gap: .55rem;
  margin-block: .9rem;
}
#usedBikeForm .used-bike-remove { border-radius: 100%; min-height: 2.7rem; min-width: 2.7rem; padding: 0; font-size: 1.2rem; }
#addUsedBikeCost { margin-top: .25rem; }
.used-bike-outcome-heading, .used-bike-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
}
.used-bike-outcome-heading h2 { margin: 0; }
.used-bike-footer p { margin: 0; }
.used-bike-actions { margin-left: auto; justify-content: flex-end; }
.used-bike-row-actions { flex-wrap: wrap; }
@media (max-width: 460px) {
  .used-bike-fields { grid-template-columns: minmax(0, 1fr); }
  .used-bike-cost { grid-template-columns: minmax(0, 1fr) 6rem auto; }
  #usedBikePreview .table :is(th, td) { white-space: normal; padding-inline: .35rem; }
}

.used-bike-cost-total { margin-top: 1rem; font-weight: 700; }

#usedBikeForm #usedBikeCosts { margin-top: 1rem; }
#usedBikeForm #usedBikeCosts .used-bike-cost { grid-template-columns: minmax(0, 1fr) minmax(5rem, 7rem) auto; }
#usedBikePurchaseSummary { border-radius: .85rem; background: #edf4fd; padding: .15rem .9rem; }
#usedBikePurchaseSummary > :first-child { border-top: 0; font-weight: 700; }

.used-bike-sale-heading { margin-top: 1rem; }

.used-bike-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(17rem, 1fr);
  align-items: start;
  gap: 1rem;
}
.used-bike-editor-stack { display: grid; gap: 1rem; }
.used-bike-sidebar { position: sticky; top: 1rem; }
#usedBikeForm .used-bike-summary { background: #f8fbff; border-color: #cbdcf0; }
.used-bike-summary h2 { margin-bottom: 1rem; }
.used-bike-summary p { font-size: .9rem; }
#usedBikePurchaseSummary > :first-child strong { font-size: clamp(1rem, 1.8vw, 1.45rem); color: #174c82; }
.used-bike-calculation summary { font-weight: 700; }
.used-bike-calculation[open] summary { margin-bottom: 1rem; }
.used-bike-archive-card { scroll-margin-top: 1rem; }
.used-bike-archive {
  margin: 0;
  padding: 0;
  list-style: none;
}
.used-bike-archive li {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(8rem, 1fr) minmax(6rem, 1fr) auto;
  align-items: center;
  gap: .8rem;
  padding: .85rem 0;
  border-top: 1px solid #dce4ed;
}
.used-bike-archive small { display: block; color: #50627a; margin-top: .2rem; }
.used-bike-archive-money { text-align: right; }
.used-bike-archive-actions { justify-self: end; }
#usedBikeArchivePreview {
  width: min(46rem, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  border: 1px solid #dce4ed;
  border-radius: 1.25rem;
  padding: clamp(1rem, 3vw, 1.6rem);
}
#usedBikeArchivePreview::backdrop { background: rgb(15 31 54 / .52); }
.used-bike-preview-meta, .used-bike-preview-finance { margin-top: 1rem; }
.used-bike-preview-actions { margin-top: 1rem; justify-content: space-between; }
@media (max-width: 900px) {
  .used-bike-workspace { grid-template-columns: minmax(0, 1fr); }
  .used-bike-sidebar { position: static; }
}
@media (max-width: 600px) {
  .used-bike-archive li { grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; }
  .used-bike-archive-money { text-align: left; }
  .used-bike-archive li > :nth-child(2) { text-align: right; }
}

.used-bike-result { display: grid; gap: .35rem; background: #edf4fd; border-radius: .85rem; padding: 1rem; margin-bottom: .8rem; }
.used-bike-result strong { font-size: 1.6rem; }
.used-bike-result small, .used-bike-cost-breakdown { color: #50627a; }
.used-bike-cost-breakdown { margin: -.3rem 0 .7rem; }
.used-bike-market { border-top: 1px solid #dce4ed; padding-top: .8rem; }

.used-bike-goal-hint { margin-bottom: 0; }
.used-bike-goal-fields { align-items: end; }
.used-bike-acquisition { border-top: 1px solid #dce4ed; padding-top: .9rem; }


.used-bike-step[hidden] { display: none; }
#usedBikeQuickStep .used-bike-footer { margin-top: 1rem; justify-content: flex-end; }
#usedBikeDetailsStep > .used-bike-footer { margin-top: 1rem; }
#usedBikeDetailsStep > .used-bike-calculation { margin-top: 1rem; }
#usedBikeQuickStep h2, #usedBikeDetailsStep h2 { scroll-margin-top: 1rem; }

.used-bike-tabs {
  display: flex;
  gap: .25rem;
  padding: .25rem;
  width: fit-content;
  max-width: 100%;
  background: #e9edf3;
  border-radius: .95rem;
}
.used-bike-tabs button {
  border: 0;
  border-radius: .72rem;
  background: transparent;
  color: #455670;
}
.used-bike-tabs button[aria-current="step"] {
  background: #fff;
  color: #14365c;
  box-shadow: 0 1px 4px #152c4721;
}
.used-bike-quick-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
  margin-top: .85rem;
}
.used-bike-quick-result {
  display: grid;
  gap: .85rem;
  padding: clamp(1rem, 2vw, 1.5rem);
  border: 1px solid #dbe5f1;
  border-radius: 1.15rem;
  background: #f6f9fd;
}
.used-bike-quick-result h3 { margin: 0; }
.used-bike-quick-result #usedBikePurchaseSummary { padding: .2rem .85rem; }
.used-bike-quick-result #usedBikePurchaseSummary > :first-child { flex-wrap: wrap; }
.used-bike-quick-result #usedBikePurchaseSummary > :first-child strong {
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 900px) {
  .used-bike-quick-layout { grid-template-columns: minmax(0, 1fr); }
}

.used-bike-quick-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .65rem; }
#usedBikeForm .used-bike-quick-header h2 { margin: 0; }
#usedBikeMarginToggle { min-height: 2.5rem; font-size: .9rem; }
#usedBikeForm .used-bike-pricing {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  align-items: end;
  margin-bottom: .5rem;
}
.used-bike-margin-control { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: .55rem; }
.used-bike-margin-units { display: flex; gap: .5rem; align-items: center; min-height: 2.5rem; }
#usedBikeForm .used-bike-margin-units label { display: flex; gap: .25rem; align-items: center; white-space: nowrap; }
#usedBikeForm .used-bike-margin-units input { width: 1rem; height: 1rem; min-height: 0; margin: 0; padding: 0; accent-color: #005bbb; }
@media (max-width: 650px) {
  #usedBikeForm .used-bike-pricing { grid-template-columns: minmax(0,1fr); }
}

.used-bike-tabs { flex-wrap: wrap; }
#usedBikeCustomerStep > .used-bike-footer,
#usedBikeCustomerStep > .used-bike-calculation { margin-top: 1rem; }
#usedBikeConditionPrint { display: none; }
@media print {
  body:has(> #usedBikeConditionPrint) > :not(#usedBikeConditionPrint) { display: none !important; }
  body:has(> #usedBikeConditionPrint) { display: block !important; background: white !important; }
  body > #usedBikeConditionPrint {
    display: block !important;
    color: #17202b;
    font: 11pt/1.4 system-ui, sans-serif;
  }
  #usedBikeConditionPrint header { position: static; display: block; padding: 0 0 1rem; border-bottom: 1px solid #bbb; }
  #usedBikeConditionPrint h1 { margin: .3rem 0; font-size: 26pt; }
  #usedBikeConditionPrint h2 { margin: 0; font-size: 16pt; }
  #usedBikeConditionPrint dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: .65rem; }
  #usedBikeConditionPrint dt { font-weight: 700; }
  #usedBikeConditionPrint dd { margin: 0; overflow-wrap: anywhere; }
  #usedBikeConditionPrint table { width: 100%; min-width: 0; border-collapse: collapse; }
  #usedBikeConditionPrint :is(th, td) { position: static; text-align: left; white-space: normal; }
  #usedBikeConditionPrint :is(th, td):last-child { text-align: right; }
  #usedBikeConditionPrint tr, #usedBikeConditionPrint .used-bike-line { break-inside: avoid; }
}

.used-bike-inspection { border: 0; padding: 0; margin: 1rem 0; min-width: 0; }
.used-bike-inspection legend { padding: 0; font-weight: 700; }
.used-bike-inspection-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(9rem, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: .6rem;
  padding-block: .55rem;
  border-bottom: 1px solid #dce4ed;
}
@media (max-width: 640px) {
  .used-bike-inspection-row { grid-template-columns: 1fr 1fr; }
  .used-bike-inspection-row input { grid-column: 1 / -1; }
}
@media print {
  #usedBikeConditionPrint h3 { background: #edf1f5; padding: .25rem .45rem; break-after: avoid; }
  #usedBikeConditionPrint .used-bike-print-legend { display: flex; flex-wrap: wrap; gap: .25rem .8rem; font-size: 9pt; }
  #usedBikeConditionPrint .used-bike-print-inspection :is(th, td) { border: 1px solid #aeb6bf; padding: .2rem .35rem; font-size: 9pt; }
  #usedBikeConditionPrint .used-bike-print-inspection th[scope="row"] { font-weight: 500; }
  #usedBikeConditionPrint .inspection-mark { text-align: center; width: 1.5rem; }
  #usedBikeConditionPrint .used-bike-print-inspection :is(th, td):last-child { width: 33%; text-align: left; overflow-wrap: anywhere; }
  #usedBikeConditionPrint footer { margin-top: 1.2rem; break-inside: avoid; }
}

.used-bike-workshop-view :is(.used-bike-tabs,#usedBikeQuickStep,#usedBikeCustomerStep,#usedBikeContinueCustomer,#usedBikePrintCondition) { display: none !important; }
.used-bike-workshop-view .used-bike-workspace { grid-template-columns: minmax(0,1fr); }
#usedBikeCheckupCosts:not(:empty) { margin-bottom: 1rem; }

.used-bike-archive-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .45rem; }
.used-bike-archive-actions .used-bike-delete {
  color: #a12631;
  background: #fff2f3;
  border: 1px solid #f0d4d8;
  font-weight: 650;
}
.used-bike-archive-actions .used-bike-delete:hover { background: #ffe4e7; border-color: #d99da5; }
.used-bike-archive-actions .used-bike-delete:focus-visible { outline: 2px solid #a12631; outline-offset: 2px; }

.used-bike-priced-inspection .used-bike-inspection-row {
  grid-template-columns: repeat(3, minmax(0,1fr));
}
.used-bike-priced-inspection .used-bike-inspection-row > span { grid-column: 1 / -1; font-weight: 650; }
.used-bike-priced-inspection .used-bike-inspection-row input { grid-column: auto; }
@media (min-width: 1250px) {
  .used-bike-workshop-view .used-bike-priced-inspection .used-bike-inspection-row {
    grid-template-columns: minmax(0,1fr) repeat(3, minmax(0,1fr));
  }
  .used-bike-workshop-view .used-bike-priced-inspection .used-bike-inspection-row > span { grid-column: auto; }
}

#usedBikeForm #usedBikeCosts .used-bike-cost {
  grid-template-columns: repeat(3, minmax(0,1fr)) auto;
  gap: .55rem;
}
.used-bike-category-name { grid-column: 1 / -1; }
@media (max-width: 480px) {
  #usedBikeForm #usedBikeCosts .used-bike-cost { grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto; }
  .used-bike-cost label:has([name="costNote"]) { grid-column: 1 / -1; grid-row: 3; }
}

#usedBikeForm #usedBikeCosts :is(.used-bike-inspection-row, .used-bike-cost) :is(input, select) {
  box-sizing: border-box;
  height: 2.85rem;
  min-height: 2.85rem;
  font-size: 1rem;
}
#usedBikeForm #usedBikeCosts :is(.used-bike-inspection-row, .used-bike-cost) select {
  appearance: none;
  padding-inline-end: 1.65rem;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right .83rem center, right .53rem center;
  background-size: .3rem .3rem;
  background-repeat: no-repeat;
  text-overflow: ellipsis;
}
@media (forced-colors: active) {
  #usedBikeForm #usedBikeCosts :is(.used-bike-inspection-row, .used-bike-cost) select {
    appearance: auto;
    background-image: none;
  }
}

.used-bike-quick-layout { grid-template-areas: "pricing decision" "checks decision"; }
.used-bike-quick-inputs { grid-area: pricing; }
.used-bike-quick-result { grid-area: decision; }
.used-bike-quick-checks { grid-area: checks; min-width: 0; }
#usedBikeForm .used-bike-pricing { margin-top: 0; gap: .6rem; }
#usedBikeForm .used-bike-pricing label { font-size: .86rem; }
#usedBikeForm .used-bike-pricing input[type="number"] { height: 2.5rem; min-height: 2.5rem; padding-block: .35rem; }
@media (max-width: 900px) {
  .used-bike-quick-layout { grid-template-areas: "pricing" "decision" "checks"; }
}

.top.top-with-banner {
  min-height: 0;
  padding-block: 0;
  border-bottom: 0;
}
.top-with-banner .context-controls { padding: 0; }
.overview-masthead {
  overflow: visible;
  padding: 0;
  z-index: 2;
}
.overview-masthead .overview-control-banner {
  --banner-inset: clamp(12px, 2vw, 28px);
  position: relative;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: clamp(14rem, 26vw, 28rem);
  padding: clamp(1.2rem, 3vw, 3rem);
  border: 0;
  border-radius: inherit;
  background: linear-gradient(90deg,#101827c7 0%,#1018278c 35%,transparent 58%),
    #0d0c0f url('/cockpit-banner.webp') center top / cover no-repeat;
  color: #fff;
}
.overview-masthead .context-picker {
  position: absolute;
  inset-block-start: var(--banner-inset);
  inset-inline-end: var(--banner-inset);
  max-width: calc(100% - 2 * var(--banner-inset));
  z-index: 3;
}
.overview-masthead .context-menu {
  width: min(320px, calc(100vw - 56px));
  max-height: calc(100dvh - 7rem);
  overflow-y: auto;
}
.overview-masthead .overview-control-banner h1 { max-width: 43%; text-wrap: balance; }
@media (max-width: 760px) {
  .overview-masthead .overview-control-banner {
    justify-content: flex-end;
    min-height: clamp(14rem,55vw,20rem);
    padding-top: 5rem;
    background: linear-gradient(0deg,#100f12eb 0%,#100f1255 34%,transparent 62%),
      #0d0c0f url('/cockpit-banner.webp') right top / cover no-repeat;
  }
  .overview-masthead .overview-control-banner h1 { max-width: 100%; font-size: clamp(1.35rem,5vw,2rem); }
}

/* Use the same dimensions off screen to fit the complete report before printing. */
#usedBikeConditionPrint.used-bike-condition-a4 {
  position: fixed;
  inset: 0 auto auto -10000px;
  visibility: hidden;
  display: flex !important;
  flex-direction: column;
  gap: 2mm;
  width: 210mm;
  height: 296mm;
  padding: 10mm;
  color: #17202b;
  background: white;
  font: 9pt/1.24 system-ui, sans-serif;
}
.used-bike-condition-a4 .used-bike-print-body { flex: 1; min-height: 0; }
.used-bike-condition-a4 .used-bike-print-content {
  zoom: var(--used-bike-print-scale, 1);
  width: calc(100% / var(--used-bike-print-scale, 1));
  overflow-wrap: anywhere;
  display: flow-root;
}
#usedBikeConditionPrint.used-bike-condition-a4 header {
  position: static;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4mm;
  padding: 0 0 2mm;
  border-bottom: 1px solid #aeb6bf;
}
.used-bike-condition-a4 .used-bike-print-shop { display: flex; align-items: center; gap: 3mm; }
.used-bike-condition-a4 .used-bike-print-shop img { width: 32mm; height: 16mm; object-fit: contain; }
.used-bike-condition-a4 .used-bike-print-shop strong { font-size: 12pt; }
.used-bike-condition-a4 .used-bike-print-shop p { margin: .75mm 0 0; }
.used-bike-condition-a4 .used-bike-print-date { margin: 0; white-space: nowrap; }
#usedBikeConditionPrint.used-bike-condition-a4 h1 { margin: 2.5mm 0 0; font-size: 21pt; }
#usedBikeConditionPrint.used-bike-condition-a4 h2 { margin: 0 0 2mm; font-size: 13pt; }
#usedBikeConditionPrint.used-bike-condition-a4 dl {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 1.5mm 3mm;
  margin: 0 0 2mm;
}
.used-bike-condition-a4 dt { font-weight: 700; }
.used-bike-condition-a4 dd { margin: 0; }
#usedBikeConditionPrint.used-bike-condition-a4 h3 {
  margin: 2.5mm 0 1mm;
  padding: 1mm 0;
  border-bottom: 1px solid #aeb6bf;
  background: none;
  font-size: 10pt;
}
#usedBikeConditionPrint.used-bike-condition-a4 .used-bike-print-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .8mm 2.5mm;
  margin: 0 0 1.5mm;
  font-size: 7.5pt;
}
#usedBikeConditionPrint.used-bike-condition-a4 table { width: 100%; min-width: 0; border-collapse: collapse; }
#usedBikeConditionPrint.used-bike-condition-a4 :is(th,td) {
  position: static;
  padding: .6mm 1mm;
  font-size: inherit;
  white-space: normal;
  text-align: left;
  border-bottom: 1px solid #d5dbe2;
}
#usedBikeConditionPrint.used-bike-condition-a4 .inspection-mark { text-align: center; width: 6mm; }
#usedBikeConditionPrint.used-bike-condition-a4 .used-bike-print-inspection :is(th,td):last-child { width: 33%; }
#usedBikeConditionPrint.used-bike-condition-a4 table:not(.used-bike-print-inspection) :last-child:is(th,td) { text-align: right; }
#usedBikeConditionPrint.used-bike-condition-a4 .used-bike-line { padding: 1mm 0; }
.used-bike-condition-a4 .used-bike-print-signatures { display: flex; justify-content: space-between; gap: 3mm; margin-top: 3mm; }
#usedBikeConditionPrint.used-bike-condition-a4 footer {
  display: block;
  margin: 0;
  padding: 1.5mm 0 0;
  border-top: 1px solid #d5dbe2;
  text-align: right;
  color: #657181;
  font-size: 7pt;
}
@page used-bike-condition { size: A4 portrait; margin: 0; }
@media print {
  #usedBikeConditionPrint.used-bike-condition-a4 {
    page: used-bike-condition;
    position: static;
    visibility: visible;
  }
}

.budget-scenario-options { display:grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,210px),1fr)); gap:12px; margin:12px 0; }
.budget-scenario-option { display:grid; align-content:start; gap:9px; min-width:0; padding:14px; border:1px solid var(--line); border-radius:15px; }
.budget-scenario-option legend { padding-inline:5px; font-weight:720; }
.budget-scenario-option label { display:grid; gap:4px; font-size:.88rem; }
.budget-scenario-option input { width:100%; min-width:0; }
.budget-scenario-option button { justify-self:start; margin-top:4px; }
.budget-scenario-option [data-budget-quantity]:not([hidden]) { display:grid; gap:8px; }
.budget-scenario-option label small { color:var(--muted); }
.budget-scenario-option [data-budget-mode] {
  width: 100%;
  min-width: 0;
  height: 30px;
  min-height: 30px;
  padding: 2px 8px;
}

.portal-install { margin-top: 1rem; padding-top: .85rem; border-top: 1px solid var(--line); }
.portal-install summary { cursor: pointer; font-weight: 680; }
.portal-install p { margin: .65rem 0 0; font-size: .88rem; }
