/* Titanor UI 3 — base visual aprovada para o beta. */
:root {
  --ink: #102033;
  --muted: #65748a;
  --paper: #f4f7fb;
  --card: #ffffff;
  --brand: #246fe5;
  --accent: #246fe5;
  --line: #dce5f0;
  --surface: var(--card);
  --text: var(--ink);
  --surface-soft: #eef3f9;
  --surface-hover: #e8eff8;
  --success: #218f50;
  --info: #176a9f;
  --warning: #a85f00;
  --danger: #cf4545;
  --action-primary: #246fe5;
  --action-primary-hover: #1d5fc7;
  --action-danger: #b4232f;
  --on-action: #ffffff;
  --state-success-text: #176b3b;
  --state-success-surface: #dff3e6;
  --state-info-text: #155a8a;
  --state-info-surface: #dfefff;
  --state-warning-text: #754700;
  --state-warning-surface: #fff0cc;
  --state-danger-text: #9d2027;
  --state-danger-surface: #fde7e7;
  --purple: #7957d5;
  --sidebar: #0a1729;
  --sidebar-strong: #07101d;
  --sidebar-text: #d9e5f3;
  --sidebar-muted: #8da0b8;
  --radius-sm: 9px;
  --radius-md: 13px;
  --radius-lg: 18px;
  --control-target: 44px;
  --shadow-soft: 0 12px 34px rgba(23, 52, 88, .08);
}

.owner-event-list { border-top: 1px solid var(--line); }
.owner-event { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 2px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.owner-event:hover { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.owner-event time { color: var(--muted); font-size: .72rem; font-weight: 700; }
.owner-event-copy { display: grid; gap: 2px; min-width: 0; }
.owner-event-copy small { color: var(--brand); font-size: .67rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.owner-event-copy strong { overflow-wrap: anywhere; font-size: .86rem; }
.owner-event-copy span { overflow-wrap: anywhere; color: var(--muted); font-size: .75rem; }
.owner-event > b { color: var(--brand); font-size: .75rem; }
.owner-investigation { margin-top: 18px; }
.owner-investigation > summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 2px; border-block: 1px solid var(--line); cursor: pointer; list-style: none; }
.owner-investigation > summary::-webkit-details-marker { display: none; }
.owner-investigation > summary span { display: grid; gap: 3px; }
.owner-investigation > summary strong { font-size: 1rem; }
.owner-investigation > summary small { color: var(--muted); }
.owner-investigation > summary b { color: var(--brand); font-size: 1.25rem; transition: transform .18s ease; }
.owner-investigation[open] > summary b { transform: rotate(45deg); }
.owner-investigation-body { padding-top: 18px; }

/* Meu ritmo: registro pessoal, sem semântica de ponto ou desempenho. */
.rhythm-layout { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(19rem,.65fr); gap: 1rem; align-items: start; }
.rhythm-stack { display: grid; gap: 1rem; }
.rhythm-actions { display: grid; grid-template-columns: minmax(10rem,.7fr) minmax(14rem,1.3fr) auto; gap: .75rem; align-items: end; }
.rhythm-kpis { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .75rem; }
.rhythm-kpi { padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-soft); }
.rhythm-kpi strong { display: block; font-size: clamp(1.35rem,2.3vw,2rem); line-height: 1.1; }
.rhythm-kpi small, .rhythm-session small, .rhythm-deadline small { display: block; color: var(--muted); margin-top: .35rem; }
.rhythm-active { border-color: color-mix(in srgb,var(--accent) 50%,var(--line)); background: color-mix(in srgb,var(--accent) 7%,var(--card)); }
.rhythm-active-head, .rhythm-section-head, .rhythm-session, .rhythm-deadline { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.rhythm-finish { display: grid; grid-template-columns: minmax(12rem,1fr) auto; gap: .75rem; align-items: end; margin-top: 1rem; }
.rhythm-bars { display: grid; gap: .9rem; }
.rhythm-bar-head { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .35rem; }
.rhythm-bar-track { height: .45rem; background: var(--surface-soft); border-radius: 999px; overflow: hidden; }
.rhythm-bar-fill { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.rhythm-list { display: grid; gap: 0; }
.rhythm-session, .rhythm-deadline { padding: .85rem 0; border-bottom: 1px solid var(--line); }
.rhythm-session:last-child, .rhythm-deadline:last-child { border-bottom: 0; }
.rhythm-session-note { max-width: 42rem; }
.rhythm-date { white-space: nowrap; text-align: right; }
.rhythm-late { color: var(--danger); }
.rhythm-checkin { display: grid; gap: .8rem; }
.rhythm-checkin .field-grid { grid-template-columns: minmax(8rem,.55fr) minmax(12rem,1.45fr); }
.rhythm-privacy { font-size: .9rem; padding: .85rem 1rem; border-left: 3px solid var(--accent); background: var(--surface-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.rhythm-checkin-simple { margin-bottom: 1rem; }
.rhythm-day-context { margin-top: 1rem; }
.rhythm-day-context > summary { min-height: 44px; display: flex; align-items: center; width: fit-content; color: var(--brand); cursor: pointer; font-size: .84rem; font-weight: 700; }
.rhythm-day-context[open] > summary { margin-bottom: .75rem; }
.rhythm-day-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.rhythm-day-actions .rhythm-action-disclosure { margin-top: 0; }
.rhythm-finish-hint { color: var(--muted); font-size: .85rem; }
.rhythm-day-finished { border-color: color-mix(in srgb,var(--success) 45%,var(--line)); }
.rhythm-checkin-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; margin-top: 1rem; }
.rhythm-glance { min-width: 0; padding-right: 1rem; border-right: 1px solid var(--line); }
.rhythm-glance:last-child { padding-right: 0; border-right: 0; }
.rhythm-glance > strong { display: block; margin-bottom: .55rem; }
.rhythm-glance > a { display: grid; grid-template-columns: auto minmax(0,1fr); gap: .35rem .65rem; align-items: baseline; padding: .45rem 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.rhythm-glance > a:last-child { border-bottom: 0; }
.rhythm-glance > a time, .rhythm-glance > a small { color: var(--accent); font-size: .8rem; font-weight: 700; }
.rhythm-glance > small { display: block; color: var(--muted); padding: .45rem 0; }
.rhythm-main-layout { margin-top: 1rem; }
.rhythm-now { display: grid; gap: 1.1rem; }
.rhythm-search { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .75rem; align-items: end; margin-top: 1rem; }
.rhythm-search label { min-width: 0; }
.rhythm-match-list { display: grid; gap: .65rem; margin-top: 1rem; }
.rhythm-match-list > form { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-soft); }
.rhythm-match-list > form span { min-width: 0; }
.rhythm-match-list > form strong, .rhythm-match-list > form small { display: block; }
.rhythm-match-list > form small { color: var(--muted); margin-top: .2rem; }
.rhythm-current-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: .85rem; }
.rhythm-action-disclosure { margin-top: .85rem; }
.rhythm-current-actions .rhythm-action-disclosure { margin-top: 0; }
.rhythm-action-disclosure > summary { list-style: none; width: fit-content; cursor: pointer; }
.rhythm-action-disclosure > summary::-webkit-details-marker { display: none; }
.rhythm-pause-form, .rhythm-action-disclosure .rhythm-search, .rhythm-action-disclosure .rhythm-finish { margin-top: .75rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-soft); }
.rhythm-pause-form { display: grid; gap: .85rem; }
.rhythm-pause-form fieldset { border: 0; padding: 0; margin: 0; }
.rhythm-pause-form legend { font-weight: 700; margin-bottom: .5rem; }
.rhythm-pause-form #id_pause_kind { display: flex; flex-wrap: wrap; gap: .5rem; }
.rhythm-pause-form #id_pause_kind > div label { display: flex; align-items: center; gap: .4rem; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 999px; background: var(--card); cursor: pointer; }
.rhythm-paused-note { display: grid; gap: .2rem; margin: 1rem 0; padding: .85rem 1rem; border-radius: var(--radius-md); background: var(--surface-soft); }
.rhythm-paused-note small { color: var(--muted); }
.rhythm-timeline { list-style: none; display: grid; gap: 0; margin: 1rem 0 0; padding: 0; }
.rhythm-timeline li { display: grid; grid-template-columns: 3.4rem 1rem minmax(0,1fr); gap: .6rem; align-items: start; min-height: 3.25rem; }
.rhythm-timeline time { color: var(--muted); font-size: .8rem; padding-top: .1rem; }
.rhythm-timeline-dot { position: relative; width: .65rem; height: .65rem; margin-top: .2rem; border: 2px solid var(--accent); border-radius: 50%; background: var(--card); }
.rhythm-timeline-dot::after { content: ""; position: absolute; top: .7rem; left: 50%; width: 1px; height: 2.25rem; background: var(--line); }
.rhythm-timeline li:last-child .rhythm-timeline-dot::after { display: none; }
.rhythm-timeline li div { display: grid; gap: .12rem; }
.rhythm-timeline li small { color: var(--muted); }
.rhythm-day-kpis { grid-template-columns: repeat(4,minmax(0,1fr)); }
.rhythm-week-nav { display: flex; gap: .5rem; }
.rhythm-week-nav a { display: grid; min-width: 2.25rem; min-height: 2.25rem; padding: 0 .65rem; place-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.rhythm-bars { margin-top: 1.1rem; }
.rhythm-next > time, .rhythm-next > strong, .rhythm-next > small { display: block; }
.rhythm-next > time { color: var(--accent); font-weight: 700; margin-top: .8rem; }
.rhythm-next > strong { font-size: 1.1rem; margin-top: .3rem; }
.rhythm-next > small { color: var(--muted); margin-top: .3rem; }

@media (max-width: 900px) {
  .commission-overview { grid-template-columns: 1fr; }
  .rhythm-layout, .rhythm-actions, .rhythm-finish, .rhythm-kpis, .rhythm-checkin .field-grid, .rhythm-checkin-grid { grid-template-columns: 1fr; }
  .rhythm-glance { padding: 0 0 .8rem; border-right: 0; border-bottom: 1px solid var(--line); }
  .rhythm-glance:last-child { padding-bottom: 0; border-bottom: 0; }
}

@media (max-width: 760px) {
  .commission-rule-row header { align-items: stretch; flex-direction: column; }
  .commission-rule-row header .badge { align-self: flex-start; }
  .commission-rule-actions { justify-content: stretch; }
  .commission-rule-actions .button { flex: 1 1 auto; text-align: center; }
  .commission-delete-summary > div { grid-template-columns: 1fr; gap: 3px; }
  .commission-delete-actions { align-items: stretch; flex-direction: column-reverse; }
  .commission-delete-actions > * { width: 100%; text-align: center; }
  .owner-event { grid-template-columns: 44px minmax(0, 1fr); }
  .owner-event > b { display: none; }
  .rhythm-search { grid-template-columns: 1fr; }
  .rhythm-match-list > form { align-items: stretch; flex-direction: column; }
  .rhythm-match-list > form button { width: 100%; }
  .rhythm-current-actions, .rhythm-current-actions details, .rhythm-current-actions summary { width: 100%; }
  .rhythm-current-actions summary { justify-content: center; }
  .rhythm-day-actions, .rhythm-day-actions > form, .rhythm-day-actions > details, .rhythm-day-actions summary { width: 100%; }
  .rhythm-day-actions button, .rhythm-day-actions summary { justify-content: center; text-align: center; }
  .rhythm-pause-form #id_pause_kind { display: grid; grid-template-columns: 1fr 1fr; }
  .rhythm-active-head, .rhythm-section-head { align-items: stretch; }
}

/* Venda individual: três entradas claras, uma única base comercial. */
.sale-mode-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: stretch; margin: 0 0 22px; }
.sale-mode-intro { display: grid; grid-column: 1 / -1; align-content: center; gap: 5px; padding: 8px 4px 2px; }
.sale-mode-intro :is(p, h2) { margin: 0; }
.sale-mode-card { display: grid; align-content: start; gap: 7px; min-height: 154px; padding: 18px; color: var(--ink); text-decoration: none; }
.sale-mode-card > span { width: fit-content; padding: 4px 8px; color: var(--brand); background: color-mix(in srgb, var(--brand) 11%, transparent); border-radius: 999px; font-size: .7rem; font-weight: 700; text-transform: uppercase; }
.sale-mode-card > strong { font-size: 1.12rem; }
.sale-mode-card > small { color: var(--muted); line-height: 1.5; }
.sale-mode-card > b { margin-top: auto; color: var(--brand); font-size: .8rem; }
.sale-mode-card:hover { border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); transform: translateY(-1px); }
.quick-checkout-form { max-width: 1120px; }
.quick-checkout-form .quick-checkout-client { padding-bottom: 18px; }
.quick-checkout-form .solo-sale-item { padding: 12px 14px; }
.quick-checkout-form .solo-sale-item-values { grid-template-columns: minmax(82px, .36fr) minmax(130px, .64fr) minmax(145px, .72fr) minmax(140px, .7fr); }
.quick-checkout-form .solo-sale-item-details > summary { font-size: .72rem; }
.quick-checkout-payment > label { width: min(100%, 330px); display: grid; gap: 7px; color: var(--ink); font-size: .82rem; font-weight: 650; }

@media (max-width: 980px) {
  .sale-mode-grid { grid-template-columns: 1fr 1fr; }
  .sale-mode-intro { grid-column: 1 / -1; }
  .sale-mode-card:last-child { grid-column: 1 / -1; min-height: 132px; }
}
@media (max-width: 620px) {
  .sale-mode-grid { grid-template-columns: 1fr; }
  .sale-mode-intro { grid-column: auto; }
  .sale-mode-card, .sale-mode-card:last-child { grid-column: auto; min-height: 136px; }
}

/* Configuração única para identidade e documentos emitidos. */
.document-settings-form { display: grid; gap: 14px; max-width: 980px; }
.document-settings-section { display: grid; gap: 18px; }
.document-settings-section > header { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; }
.document-settings-section > header > span { display: grid; place-items: center; width: 30px; aspect-ratio: 1; border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--line)); border-radius: 9px; color: var(--accent); font-weight: 750; }
.document-settings-section > header h2,
.document-settings-section > header p { margin: 0; }
.document-settings-section > header p { margin-top: 3px; color: var(--muted); font-size: .84rem; }
.document-settings-section .field-wide { grid-column: 1 / -1; }
.document-option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.document-option-grid label { display: flex; gap: 10px; align-items: flex-start; min-width: 0; min-height: 44px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); color: var(--ink); cursor: pointer; }
.document-option-grid label > input[type="checkbox"] {
  display: inline-block;
  flex: 0 0 18px;
  width: 18px;
  min-width: 18px;
  max-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 1px 0 0;
  padding: 0;
  accent-color: var(--brand);
}
.document-option-grid label > span { flex: 1 1 auto; min-width: 0; line-height: 1.4; overflow-wrap: anywhere; }
.document-settings-actions { position: sticky; bottom: 10px; z-index: 3; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--card) 94%, transparent); box-shadow: 0 10px 28px rgba(0, 0, 0, .18); }

@media (max-width: 760px) {
  .document-option-grid { grid-template-columns: 1fr; }
  .document-settings-section > header { grid-template-columns: 30px minmax(0, 1fr); }
  .document-settings-actions { align-items: stretch; flex-direction: column-reverse; }
  .document-settings-actions .button,
  .document-settings-actions button { width: 100%; }
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f0f1f3;
  --muted: #a7adb7;
  --paper: #000000;
  --card: #0c0d10;
  --brand: #5b9cff;
  --accent: #5b9cff;
  --line: #292c31;
  --surface-soft: #14161a;
  --surface-hover: #1b1e23;
  --success: #58d483;
  --info: #82ccff;
  --warning: #ffc168;
  --danger: #ff6b6b;
  --state-success-text: #8be3aa;
  --state-success-surface: #143925;
  --state-info-text: #9bdcff;
  --state-info-surface: #102f46;
  --state-warning-text: #ffd28c;
  --state-warning-surface: #3a2b11;
  --state-danger-text: #ff9b9f;
  --state-danger-surface: #3c1d21;
  --purple: #aa82ff;
  --sidebar: #0a111d;
  --sidebar-strong: #070c14;
  --sidebar-text: #e2ebf6;
  --sidebar-muted: #8ea0b7;
  --shadow-soft: none;
}

html { background: var(--paper); }
body { min-width: 320px; background: var(--paper); color: var(--ink); font-family: "Segoe UI Variable Text", "Segoe UI", Inter, ui-sans-serif, system-ui, sans-serif; font-size: 16px; line-height: 1.5; text-rendering: optimizeLegibility; }
h1, h2, h3 { line-height: 1.2; }
a { color: var(--brand); }
button, input, select, textarea { font: inherit; }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.app-shell svg, .icon-button svg, .account-summary svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Marca provisória: o estudo do elmo será feito apenas no encerramento visual. */
.brand { gap: 10px; font-weight: 600; letter-spacing: 0; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; color: #fff; background: var(--brand); font-size: .95rem; font-weight: 800; }
.brand-word { color: inherit; font-size: 1.02rem; font-weight: 800; letter-spacing: .025em; }
.brand-word > span { color: var(--brand); }

/* Estrutura interna: módulos à esquerda, ferramentas do módulo no topo. */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0, 1fr); background: var(--paper); transition: grid-template-columns .2s ease; }
.app-sidebar { position: sticky; z-index: 40; top: 0; display: flex; min-width: 0; height: 100vh; flex-direction: column; overflow-y: auto; padding: 16px 12px 13px; color: var(--sidebar-text); background: linear-gradient(180deg, var(--sidebar-strong), var(--sidebar)); border-right: 1px solid rgba(141, 160, 184, .14); }
.sidebar-head { min-height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 8px 14px; }
.app-brand { color: #fff; }
.icon-button.sidebar-close { display: none; }
.icon-button.sidebar-collapse { width: var(--control-target); height: var(--control-target); border-color: rgba(141, 160, 184, .17); color: var(--sidebar-muted); background: transparent; }
.icon-button.sidebar-collapse:hover { color: var(--sidebar-text); background: rgba(91, 156, 255, .09); }
.app-nav { display: grid; gap: 4px; }
.app-nav-label { padding: 15px 11px 7px; color: var(--sidebar-muted); font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.app-nav-label-secondary { margin-top: 8px; }
.app-nav-link { min-height: var(--control-target); display: flex; align-items: center; gap: 12px; padding: 9px 11px; border-radius: 10px; color: var(--sidebar-muted); text-decoration: none; font-size: .92rem; font-weight: 600; transition: color .15s ease, background .15s ease, transform .15s ease; }
.app-nav-link:hover { color: var(--sidebar-text); background: rgba(91, 156, 255, .09); transform: translateX(1px); }
.app-nav-link.active { color: #f8fbff; background: rgba(91, 156, 255, .15); box-shadow: inset 3px 0 0 var(--brand); }
.app-nav-link.active svg { color: var(--brand); }
.app-nav-link svg { flex: 0 0 auto; }
.account-avatar { display: grid; place-items: center; border-radius: 10px; color: #fff; background: linear-gradient(145deg, var(--brand), #735dd7); font-size: .78rem; font-weight: 800; }
.app-nav-scrim { display: none; }

.app-workspace { min-width: 0; min-height: 100vh; display: flex; flex-direction: column; overflow-x: clip; background: radial-gradient(circle at 78% -10%, color-mix(in srgb, var(--brand) 6%, transparent), transparent 33%), var(--paper); }
.app-topbar { position: sticky; z-index: 28; top: 0; min-height: 64px; display: grid; grid-template-columns: minmax(180px, 1fr) auto; align-items: center; gap: 18px; padding: 9px 24px; background: color-mix(in srgb, var(--card) 88%, transparent); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.icon-button.nav-toggle { display: none; }
.app-location { display: grid; min-width: 0; gap: 2px; }
.app-location strong { font-size: .98rem; }
.app-location small { color: var(--muted); font-size: .78rem; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-topbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.icon-button { width: var(--control-target); height: var(--control-target); display: inline-grid; flex: 0 0 auto; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: var(--surface-soft); text-decoration: none; }
.icon-button:hover { color: var(--ink); background: var(--surface-hover); }
.command-trigger { min-height: var(--control-target); display: inline-flex; align-items: center; gap: 8px; padding: 7px 9px 7px 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: var(--surface-soft); font-size: .78rem; font-weight: 700; white-space: nowrap; }
.command-trigger:hover { color: var(--ink); background: var(--surface-hover); }
.command-trigger svg { width: 16px; height: 16px; }
.command-trigger kbd, .command-palette kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 25px; min-height: 23px; padding: 2px 6px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: var(--card); box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--line) 80%, transparent); font-family: inherit; font-size: .66rem; font-weight: 750; line-height: 1; }
.dev-badge { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 999px; padding: 7px 11px; font-size: .72rem; font-weight: 700; }
.dev-badge { color: var(--info); background: color-mix(in srgb, var(--info) 14%, transparent); }
.account-menu { position: relative; }
.account-summary { min-height: var(--control-target); display: flex; align-items: center; gap: 8px; padding: 3px 7px 3px 4px; border-radius: 11px; cursor: pointer; list-style: none; color: var(--ink); }
.account-summary::-webkit-details-marker { display: none; }
.account-summary:hover, .account-menu[open] .account-summary { background: var(--surface-soft); }
.account-avatar { width: 34px; height: 34px; border-radius: 50%; }
.account-identity { display: grid; min-width: 0; max-width: 210px; gap: 1px; text-align: left; }
.account-identity strong, .account-identity small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-identity strong { color: var(--ink); font-size: .8rem; font-weight: 750; }
.account-identity small { color: var(--muted); font-size: .68rem; font-weight: 550; }
.account-popover { position: absolute; z-index: 60; top: calc(100% + 9px); right: 0; width: 230px; display: grid; overflow: hidden; padding: 7px; border: 1px solid var(--line); border-radius: 13px; background: var(--card); box-shadow: 0 20px 60px rgba(0, 7, 18, .30); }
.account-popover-head { display: grid; gap: 3px; padding: 10px; border-bottom: 1px solid var(--line); margin-bottom: 5px; }
.account-popover-head small { color: var(--muted); }
.account-popover a, .account-popover button { width: 100%; display: block; padding: 10px; border-radius: 8px; color: var(--ink); background: transparent; text-align: left; text-decoration: none; font-weight: 600; }
.account-popover a:hover, .account-popover button:hover { background: var(--surface-soft); }
.account-popover form { margin: 0; padding-top: 5px; border-top: 1px solid var(--line); }

/* Acesso rÃ¡pido: navegaÃ§Ã£o global sem tirar o foco da tarefa atual. */
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
body.command-lock { overflow: hidden; }
.command-palette { width: min(660px, calc(100% - 32px)); max-width: none; max-height: min(720px, calc(100dvh - 64px)); margin: auto; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; color: var(--ink); background: var(--card); box-shadow: 0 32px 100px rgba(0, 7, 18, .42); }
.command-palette::backdrop { background: rgba(2, 8, 18, .68); backdrop-filter: blur(5px); }
.command-palette[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.command-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; min-height: 64px; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--line); }
.command-head > svg { width: 20px; height: 20px; color: var(--muted); }
.command-head input { width: 100%; min-width: 0; padding: 10px 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 1rem; }
.command-head input::placeholder { color: var(--muted); opacity: .86; }
.command-head button { min-width: var(--control-target); min-height: var(--control-target); padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--surface-soft); font-size: .7rem; font-weight: 750; }
.command-head button:hover { color: var(--ink); background: var(--surface-hover); }
.command-body { min-height: 0; overflow-y: auto; padding: 11px; overscroll-behavior: contain; }
.command-body > p:first-child { margin: 5px 8px 8px; color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.command-body nav { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.command-body nav a { min-width: 0; display: flex; align-items: center; gap: 11px; padding: 11px; border: 1px solid transparent; border-radius: 10px; color: var(--ink); text-decoration: none; }
.command-body nav a[hidden] { display: none; }
.command-body nav a:hover, .command-body nav a.is-active { color: var(--ink); background: var(--surface-soft); border-color: color-mix(in srgb, var(--brand) 22%, var(--line)); }
.command-body nav a.is-active { box-shadow: inset 3px 0 0 var(--brand); }
.command-body nav a > svg { width: 19px; height: 19px; flex: 0 0 auto; color: var(--brand); }
.command-body nav a > span { min-width: 0; display: grid; gap: 2px; }
.command-body nav strong, .command-body nav small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.command-body nav strong { font-size: .84rem; }
.command-body nav small { color: var(--muted); font-size: .72rem; }
.command-empty { margin: 36px 12px; color: var(--muted); text-align: center; }
.command-palette footer { display: flex; align-items: center; gap: 18px; min-height: 48px; padding: 9px 18px; border-top: 1px solid var(--line); color: var(--muted); background: var(--surface-soft); font-size: .7rem; }
.command-palette footer span { display: inline-flex; align-items: center; gap: 4px; }
.command-palette :focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.app-workspace .section-nav { position: sticky; z-index: 27; top: 64px; min-height: 54px; display: flex; align-items: center; padding: 7px 24px; gap: 5px; background: color-mix(in srgb, var(--card) 86%, transparent); border-color: var(--line); backdrop-filter: blur(16px); }
.section-nav-context { flex: 0 0 auto; margin-right: 5px; padding-right: 13px; border-right: 1px solid var(--line); color: var(--muted); font-size: .68rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.app-workspace .section-nav a { min-height: var(--control-target); display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: 9px; color: var(--muted); font-size: .84rem; font-weight: 650; white-space: nowrap; }
.app-workspace .section-nav a svg { width: 16px; height: 16px; }
.app-workspace .section-nav a:hover { color: var(--ink); background: var(--surface-soft); box-shadow: none; }
.app-workspace .section-nav a.active { color: var(--ink); background: color-mix(in srgb, var(--brand) 14%, var(--surface-soft)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 24%, transparent); }
.app-workspace .section-nav a.active svg { color: var(--brand); }
html[data-theme="dark"] .app-workspace .section-nav { background: color-mix(in srgb, var(--card) 72%, var(--paper)); border-color: var(--line); }
html[data-theme="dark"] .app-workspace .section-nav a:hover,
html[data-theme="dark"] .app-workspace .section-nav a.active { color: var(--ink); background: color-mix(in srgb, var(--brand) 14%, var(--surface-soft)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 24%, transparent); }

.app-workspace > .page { width: min(1260px, calc(100% - 48px)); margin: 32px auto 50px; }
.app-workspace > .messages { width: min(1260px, calc(100% - 48px)); margin: 18px auto -12px; }
.messages { display: grid; gap: 8px; }
.page-heading { align-items: flex-start; margin-bottom: 24px; }
.page-heading h1 { margin: .15rem 0 .4rem; font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1.08; letter-spacing: -.035em; }
.page-heading .muted { max-width: 760px; margin-bottom: 0; }
.eyebrow { color: var(--brand); font-size: .75rem; letter-spacing: .11em; }
.muted { color: var(--muted); line-height: 1.5; }

/* Superfícies e componentes compartilhados */
.panel, .table-wrap, .form-card, .movement-card, .quote-card, .fiscal-item, .metric-grid article, .owner-metrics article, .stock-metrics > a, .operation-grid a, .summary-card, .module-card, .cash-awareness {
  background: linear-gradient(180deg, color-mix(in srgb, var(--card) 96%, #fff), var(--card));
  border-color: var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}
.panel, .form-card, .movement-card { padding: 20px; }
.metric-grid, .owner-metrics, .stock-metrics { gap: 14px; }
.metric-grid article, .owner-metrics article, .stock-metrics > a { min-height: 118px; padding: 18px; border-radius: var(--radius-md); }
.metric-grid strong, .owner-metrics strong, .stock-metrics strong { font-size: clamp(1.6rem, 3vw, 2.05rem); letter-spacing: -.03em; }
.summary-card-grid { gap: 14px; }
.summary-card { min-height: 185px; gap: 14px; padding: 18px; border-top: 1px solid var(--line); }
.summary-card-stock { border-left: 3px solid var(--success); }
.summary-card-sales, .summary-card-quotes { border-left: 3px solid var(--brand); }
.summary-card-services, .summary-card-technicians, .summary-card-team { border-left: 3px solid var(--info); }
.summary-card-finance { border-left: 3px solid var(--success); }
.summary-card-metrics > span, .quick-links a, .dashboard-action-grid a, .operation-grid a, .item-row, .advanced-fields, .compact-scan, .today-punches > span, .punch-list span, .owner-note, .small-button, .calendar-toolbar a, .attendance-state {
  color: var(--ink);
  background: var(--surface-soft);
  border-color: var(--line);
}
html[data-theme="dark"] :is(.summary-card-metrics > span, .quick-links a, .dashboard-action-grid a, .operation-grid a, .item-row, .advanced-fields, .compact-scan, .today-punches > span, .punch-list span, .owner-note, .small-button, .calendar-toolbar a, .attendance-state) {
  color: var(--ink);
  background: var(--surface-soft);
  border-color: var(--line);
}
.quick-links a:hover, .dashboard-action-grid a:hover, .operation-grid a:hover { color: var(--ink); background: var(--surface-hover); border-color: color-mix(in srgb, var(--brand) 38%, var(--line)); }

/* Configurações: uma camada visual, grupos claros e ações em linhas inteiras. */
.settings-page-heading { margin-bottom: 18px; }
.settings-hub { display: grid; gap: 16px; max-width: 1040px; }
.settings-section { display: grid; grid-template-columns: minmax(220px, .72fr) minmax(0, 1.45fr); gap: 26px; padding: 0; overflow: hidden; }
.settings-section > header { padding: 24px; border-right: 1px solid var(--line); }
.settings-section > header h2,
.settings-section > header p { margin: 0; }
.settings-section > header > p { margin-top: 10px; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.settings-action-list { display: grid; align-content: start; padding: 10px 16px; }
.settings-action-list a { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 62px; padding: 11px 8px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.settings-action-list a:last-child { border-bottom: 0; }
.settings-action-list a:hover { color: var(--ink); }
.settings-action-list a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 8px; }
.settings-action-list a span { display: grid; gap: 3px; min-width: 0; }
.settings-action-list a strong { font-size: .94rem; }
.settings-action-list a small { color: var(--muted); font-size: .78rem; line-height: 1.4; font-weight: 450; }
.settings-action-list a b { color: var(--accent); font-size: 1.1rem; font-weight: 650; }
.settings-account-section { grid-template-columns: minmax(220px, .72fr) minmax(180px, .62fr) minmax(0, 1fr); }
.settings-account-summary { display: grid; align-content: center; gap: 12px; margin: 0; padding: 20px 4px; }
.settings-account-summary div { min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.settings-account-summary dt { color: var(--muted); font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; }
.settings-account-summary dd { margin: 5px 0 0; overflow-wrap: anywhere; font-size: .82rem; font-weight: 700; }
.storage-overview { display: grid; gap: 20px; max-width: 880px; }
.storage-overview .section-heading { margin: 0; }
.storage-overview .section-heading > strong { color: var(--accent); font-size: 1.35rem; }
.storage-meter { height: 10px; overflow: hidden; border-radius: 999px; background: var(--surface-soft); border: 1px solid var(--line); }
.storage-meter > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.storage-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.storage-summary > div { min-width: 0; padding: 14px; background: var(--card); }
.storage-summary dt,
.storage-category-list dt { color: var(--muted); font-size: .74rem; }
.storage-summary dd { margin: 4px 0 0; font-size: 1.05rem; font-weight: 750; }
.storage-category-list { display: grid; margin: 0; }
.storage-category-list > div { display: flex; justify-content: space-between; gap: 18px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.storage-category-list > div:last-child { border-bottom: 0; }
.storage-category-list dd { margin: 0; text-align: right; font-weight: 700; }
.storage-overview .callout { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-soft); }
.storage-overview .callout strong,
.storage-overview .callout p { margin: 0; }
.storage-overview .callout p { margin-top: 4px; color: var(--muted); font-size: .84rem; }
.storage-overview .callout.warning { border-color: color-mix(in srgb, var(--warning) 42%, var(--line)); }
.storage-overview .callout.danger { border-color: color-mix(in srgb, var(--danger) 48%, var(--line)); }
.attachment-card > a { display: grid; gap: 6px; color: inherit; text-decoration: none; }
.attachment-card > details { padding-top: 8px; border-top: 1px solid var(--line); }
.attachment-card > details form,
.inline-details form { display: grid; gap: 8px; margin-top: 8px; }
.inline-details { display: inline-block; }
.inline-details > summary { display: inline; color: var(--accent); cursor: pointer; }
@media (max-width: 880px) {
  .settings-section,
  .settings-account-section { grid-template-columns: 1fr; gap: 0; }
  .settings-section > header { padding: 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  .settings-account-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 16px 20px 4px; }
}
@media (max-width: 520px) {
  .settings-page-heading .muted { max-width: 34ch; }
  .settings-section > header { padding: 17px; }
  .settings-action-list { padding: 6px 12px; }
  .settings-action-list a { min-height: 60px; padding: 10px 4px; }
  .settings-action-list a small { font-size: .76rem; }
  .settings-account-summary { grid-template-columns: 1fr; padding: 14px 16px 2px; }
  .storage-summary { grid-template-columns: 1fr; }
  .storage-summary > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 12px 14px; }
  .storage-summary dd { margin: 0; font-size: .95rem; }
}
.summary-card-heading > a, .module-overview-heading a { color: var(--brand); }

button, .button { min-height: var(--control-target); border-radius: var(--radius-sm); font-weight: 700; }
.primary,
html[data-theme="dark"] .primary { color: var(--on-action); background: var(--action-primary); }
.primary:hover { background: var(--action-primary-hover); }
.secondary { color: var(--ink); background: var(--surface-soft); border: 1px solid var(--line); }
html[data-theme="dark"] button.secondary,
html[data-theme="dark"] a.secondary { color: var(--ink); background: var(--surface-soft); border-color: var(--line); }
.secondary:hover { background: var(--surface-hover); }
.ghost { color: var(--ink); background: transparent; border-color: var(--line); }
.heading-actions { gap: 9px; }

input:not([type="checkbox"]):not([type="radio"]):not([type="color"]), select, textarea, .form-control {
  min-height: var(--control-target);
  color: var(--ink);
  background: color-mix(in srgb, var(--surface-soft) 76%, var(--card));
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  caret-color: var(--brand);
}
html[data-theme="dark"] :is(input:not([type="checkbox"]):not([type="radio"]):not([type="color"]), select, textarea, .form-control) {
  color: var(--ink);
  background: color-mix(in srgb, var(--surface-soft) 76%, var(--card));
  border-color: var(--line);
  caret-color: var(--brand);
}
input:focus, select:focus, textarea:focus, .form-control:focus { outline: 2px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 1px; border-color: var(--brand); }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 82%, transparent); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); }
option { color: var(--ink); background: var(--card); }
.form-grid { gap: 14px; }
.form-stack { display: grid; gap: 16px; }
.canonical-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.field-group { min-width: 0; display: grid; align-content: start; gap: 7px; }
.field-group > label { color: var(--ink); font-weight: 700; }
.field-group > small:not(.field-error) { color: var(--muted); line-height: 1.4; }
.field-group.has-error :is(input, select, textarea) { border-color: var(--state-danger-text); }
.form-error-summary { display: grid; gap: 8px; padding: 13px 15px; border: 1px solid color-mix(in srgb, var(--state-danger-text) 42%, var(--line)); border-radius: 11px; color: var(--state-danger-text); background: var(--state-danger-surface); }
.form-error-summary:focus { outline: 3px solid color-mix(in srgb, var(--state-danger-text) 28%, transparent); outline-offset: 2px; }
.form-error-summary ul { display: grid; gap: 4px; margin: 0; padding-left: 20px; }
.form-error-summary a { color: inherit; }
.filter-bar, .search-bar, .product-filters, .owner-period {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.commercial-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
.commercial-tabs a {
  min-width: 0;
  min-height: var(--control-target);
  display: inline-flex;
  align-items: center;
  overflow-wrap: anywhere;
  white-space: normal;
}

/* Veículos do cliente: linhas compactas no desktop e cartões legíveis no celular. */
.customer-vehicles { margin: 20px 0; }
.vehicle-compact-list { display: grid; margin-top: 16px; }
.vehicle-row { display: grid; grid-template-columns: minmax(190px, 1.3fr) minmax(90px, .55fr) minmax(76px, .42fr) minmax(105px, .55fr) auto; gap: 16px; align-items: center; min-width: 0; padding: 13px 0; border-bottom: 1px solid var(--line); }
.vehicle-row:last-child { border-bottom: 0; }
.vehicle-row > div { display: grid; gap: 3px; min-width: 0; }
.vehicle-row small,
.vehicle-detail-grid span { color: var(--muted); font-size: .73rem; }
.vehicle-row strong { overflow-wrap: anywhere; font-size: .88rem; }
.vehicle-row-main .badge { width: max-content; margin-top: 4px; }
.vehicle-row-actions { display: flex !important; flex-wrap: wrap; justify-content: flex-end; gap: 6px 12px !important; }
.vehicle-row-actions a { white-space: nowrap; color: var(--brand); font-size: .8rem; font-weight: 750; text-decoration: none; }
.vehicle-form { max-width: 900px; }
.vehicle-more-fields { margin-top: 16px; }

.vehicle-form .vehicle-active-toggle {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  width: max-content;
}

.vehicle-form .vehicle-active-toggle span { margin: 0; }

.vehicle-form .vehicle-active-toggle input[type="checkbox"] {
  flex: 0 0 auto;
  height: 1.25rem;
  margin: 0;
  width: 1.25rem;
}
.vehicle-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-bottom: 20px; padding: 0; overflow: hidden; }
.vehicle-detail-grid > div { display: grid; gap: 5px; min-width: 0; padding: 17px 19px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.vehicle-detail-grid > div:nth-child(3n) { border-right: 0; }
.vehicle-detail-grid > div:last-child { border-bottom: 0; }
.vehicle-detail-grid strong { overflow-wrap: anywhere; }
.vehicle-history-placeholder { margin-top: 20px; }
.vehicle-history-placeholder h2,
.vehicle-history-placeholder p { margin-bottom: 0; }
@media (max-width: 900px) {
  .vehicle-row { grid-template-columns: minmax(180px, 1fr) repeat(3, minmax(76px, auto)); }
  .vehicle-row-actions { grid-column: 1 / -1; justify-content: flex-start; padding-top: 8px; border-top: 1px solid var(--line); }
  .vehicle-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vehicle-detail-grid > div:nth-child(3n) { border-right: 1px solid var(--line); }
  .vehicle-detail-grid > div:nth-child(2n) { border-right: 0; }
  .vehicle-detail-grid > div:nth-last-child(-n + 2) { border-bottom: 0; }
}
@media (max-width: 600px) {
  .vehicle-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 15px 0; }
  .vehicle-row-main,
  .vehicle-row-actions { grid-column: 1 / -1; }
  .vehicle-detail-grid { grid-template-columns: 1fr; }
  .vehicle-detail-grid > div,
  .vehicle-detail-grid > div:nth-child(2n),
  .vehicle-detail-grid > div:nth-child(3n) { border-right: 0; border-bottom: 1px solid var(--line); }
  .vehicle-detail-grid > div:last-child { border-bottom: 0; }
  .customer-vehicles .module-overview-heading { align-items: flex-start; flex-direction: column; }
  .customer-vehicles .heading-actions { width: 100%; }
  .customer-vehicles .heading-actions .button { width: 100%; }
}

@media (max-width: 700px) {
  .canonical-form-grid { grid-template-columns: 1fr; }
}

.table-wrap { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
table { color: var(--ink); }
th { color: var(--muted); font-size: .75rem; line-height: 1.35; letter-spacing: .045em; text-transform: uppercase; }
th, td { padding: 12px 11px; border-color: var(--line); }
tbody tr:hover { background: color-mix(in srgb, var(--surface-hover) 60%, transparent); }
td a { color: var(--brand); }

/* A lista de produtos precisa ser lida rapidamente, sem peso ou sublinhado em excesso. */
.product-table table { font-family: "Segoe UI Variable Text", "Segoe UI", ui-sans-serif, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.product-table th { font-size: .69rem; font-weight: 650; letter-spacing: .055em; }
.product-table td { font-size: .91rem; line-height: 1.46; vertical-align: top; }
.product-table td > strong { font-weight: 450; letter-spacing: .005em; }
.product-table td > span > strong { font-weight: 450; letter-spacing: .005em; }
.product-table .product-cell-main { display: grid; gap: 3px; }
.product-table .product-cell-main a { width: fit-content; color: var(--ink); text-decoration: none; text-underline-offset: 3px; }
.product-table .product-cell-main a strong { font-size: .94rem; font-weight: 450; line-height: 1.4; }
.product-table .product-cell-main a:hover { color: var(--brand-strong); }
.product-table .product-cell-main small { color: var(--muted); font-size: .73rem; font-weight: 450; letter-spacing: .01em; }
.product-table .badge { font-size: .72rem; font-weight: 500; }
.product-table .button { font-weight: 500; }

/* Fechamento da venda: total visível e extras discretos, sem caixas gigantes. */
.sales-items-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.sales-items-footer .add-quote-item { min-height: 44px; padding-inline: 15px; font-weight: 600; }
.sales-form-card .quote-live-total { display: grid; justify-items: end; gap: 2px; min-width: 190px; margin: 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.sales-form-card .quote-live-total span { color: var(--muted); font-size: .72rem; font-weight: 600; letter-spacing: .035em; text-transform: uppercase; }
.sales-form-card .quote-live-total strong { color: var(--ink); font-size: clamp(1.45rem, 3vw, 1.85rem); font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.sales-form-card .sales-more { margin: 22px 0 0; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.sales-more > summary { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 17px; cursor: pointer; list-style: none; }
.sales-more > summary::-webkit-details-marker { display: none; }
.sales-more > summary > span { display: grid; gap: 2px; }
.sales-more > summary strong { color: var(--ink); font-size: .92rem; font-weight: 600; }
.sales-more > summary small { color: var(--muted); font-size: .76rem; font-weight: 450; }
.sales-more > summary::after { content: "+"; width: 28px; height: 28px; display: grid; place-items: center; flex: 0 0 28px; border-radius: 8px; color: var(--brand); background: color-mix(in srgb, var(--brand) 11%, var(--card)); font-size: 1.15rem; font-weight: 500; transition: transform .18s ease; }
.sales-more[open] > summary { border-bottom: 1px solid var(--line); }
.sales-more[open] > summary::after { transform: rotate(45deg); }
.sales-more-content { padding: 17px; }
.sales-more-content > p { margin: 0 0 16px; color: var(--muted); font-size: .82rem; }
.sales-extra-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(190px, .65fr); gap: 15px 18px; align-items: start; }
.sales-extra-field { min-width: 0; display: grid; gap: 7px; align-content: start; color: var(--ink); font-size: .84rem; font-weight: 600; }
.sales-extra-field small { color: var(--muted); font-size: .72rem; font-weight: 450; line-height: 1.45; }
.sales-extra-field :is(textarea, input) { width: 100%; }
.sales-extra-field textarea { min-height: 78px; max-height: 180px; resize: vertical; }
.sales-money-input { width: min(100%, 230px); min-height: 46px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.sales-money-input:focus-within { outline: 2px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 1px; border-color: var(--brand); }
.sales-money-input b { padding-left: 13px; color: var(--muted); font-size: .78rem; font-weight: 550; }
.sales-form-card .sales-money-input input:not([type="checkbox"]):not([type="radio"]) { min-height: 44px; padding-left: 8px; border: 0; border-radius: 0; outline: 0; background: transparent; box-shadow: none; }

@media (max-width: 720px) {
  .sales-items-footer { align-items: stretch; flex-direction: column; }
  .sales-items-footer .add-quote-item { width: 100%; }
  .sales-form-card .quote-live-total { width: 100%; justify-items: start; }
  .sales-extra-grid { grid-template-columns: 1fr; }
  .sales-money-input { width: 100%; }
}
.badge, .status, .state-off { border-radius: 999px; font-weight: 750; }
.badge.success, .state-working, .service-order-service_done, .service-order-completed, .quote-approved, .commercial-completed, .payment-pago, .service-finished-notice { color: var(--state-success-text); background: var(--state-success-surface); }
.badge.warning, .state-break, .service-order-in_progress, .quote-in_progress, .commercial-confirmed, .commercial-preparing, .payment-parcial { color: var(--state-warning-text); background: var(--state-warning-surface); }
.badge.danger, .state-incomplete, .service-order-canceled, .priority-high, .priority-urgent, .quote-rejected, .quote-expired, .commercial-canceled, .alert { color: var(--state-danger-text); background: var(--state-danger-surface); }
.service-order-open, .service-order-scheduled, .quote-sent, .commercial-ready { color: var(--brand); background: color-mix(in srgb, var(--brand) 15%, transparent); }
.service-order-waiting, .service-order-incomplete, .quote-incomplete { color: var(--warning); background: color-mix(in srgb, var(--warning) 15%, transparent); }
.message { border: 1px solid transparent; }
.message.success { color: var(--state-success-text); background: var(--state-success-surface); border-color: color-mix(in srgb, var(--state-success-text) 34%, var(--line)); }
.message.error { color: var(--state-danger-text); background: var(--state-danger-surface); border-color: color-mix(in srgb, var(--state-danger-text) 34%, var(--line)); }
.message.warning { color: var(--state-warning-text); background: var(--state-warning-surface); border-color: color-mix(in srgb, var(--state-warning-text) 34%, var(--line)); }
.message.info { color: var(--state-info-text); background: var(--state-info-surface); border-color: color-mix(in srgb, var(--state-info-text) 34%, var(--line)); }

.metric-alert, .owner-warning, .metric-warning, .compact-alert, .internal-note, .operational-notice, .dev-notice { color: var(--warning) !important; background: color-mix(in srgb, var(--warning) 13%, var(--card)) !important; border-color: color-mix(in srgb, var(--warning) 35%, var(--line)) !important; }
.cash-awareness { background: var(--card); }
.cash-awareness-open { background: color-mix(in srgb, var(--success) 7%, var(--card)); border-left-color: var(--success); }
.cash-status-badge { color: var(--muted); background: var(--surface-soft); }
.cash-awareness-open .cash-status-badge { color: var(--success); background: color-mix(in srgb, var(--success) 15%, transparent); }
.cash-in { color: var(--success); }
.cash-out, .activity-danger { color: var(--danger); }
.cash-warning { color: var(--warning); }

/* Olho do Dono — resumo primeiro, profundidade sob demanda. */
.owner-heading-v3 { align-items: flex-end; }
.owner-kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 12px; margin: 18px 0; }
.owner-kpi { min-width: 0; min-height: 132px; display: flex; flex-direction: column; gap: 8px; padding: 17px; border: 1px solid var(--line); border-radius: var(--radius-md); color: var(--ink); background: var(--card); box-shadow: var(--shadow-soft); text-decoration: none; transition: transform .15s ease, border-color .15s ease; }
.owner-kpi:hover { color: var(--ink); border-color: color-mix(in srgb, var(--brand) 48%, var(--line)); transform: translateY(-2px); }
.owner-kpi > span { color: var(--muted); font-size: .81rem; }
.owner-kpi > strong { margin-top: auto; font-size: clamp(1.55rem, 2.5vw, 2.1rem); line-height: 1; letter-spacing: -.04em; overflow-wrap: anywhere; }
.owner-kpi > small { color: var(--muted); font-size: .81rem; line-height: 1.45; }
.owner-kpi-warning { border-left: 3px solid var(--warning); }
.owner-kpi-danger { border-left: 3px solid var(--danger); }
.owner-v3-main { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(290px, .7fr); gap: 16px; margin-top: 16px; }
.owner-v3-main .owner-chart-panel { margin: 0; }
.owner-bar-track, .goal-track { background: var(--surface-soft) !important; }
.owner-attention-panel { display: flex; flex-direction: column; }
.owner-attention-count { min-width: 34px; height: 34px; display: grid; place-items: center; border-radius: 999px; color: var(--warning); background: color-mix(in srgb, var(--warning) 15%, transparent); font-weight: 800; }
.owner-attention-list { display: grid; margin-top: 8px; }
.owner-attention-list > a { display: flex; align-items: center; justify-content: space-between; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.owner-attention-list > a > span { display: grid; gap: 3px; }
.owner-attention-list > a small { color: var(--muted); line-height: 1.35; }
.owner-attention-list > a b { min-width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: var(--warning); background: color-mix(in srgb, var(--warning) 15%, transparent); }
.owner-clear-state { padding: 24px 0; }
.owner-clear-state p { color: var(--muted); margin-bottom: 0; }
.owner-actions-v3 { margin-top: auto; padding-top: 15px; }
.owner-actions-v3 > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); cursor: pointer; list-style: none; color: var(--brand); font-weight: 700; }
.owner-actions-v3 > summary::-webkit-details-marker { display: none; }
.owner-actions-v3 > summary b, .owner-detail-section > summary > b { transition: transform .18s ease; }
.owner-actions-v3[open] > summary b, .owner-detail-section[open] > summary > b { transform: rotate(45deg); }
.owner-actions-v3 > div { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; padding-top: 12px; }
.owner-actions-v3 a { padding: 9px; border-radius: 8px; color: var(--ink); background: var(--surface-soft); text-decoration: none; font-size: .82rem; font-weight: 650; }
.owner-actions-v3 a:hover { background: var(--surface-hover); }
.owner-v3-secondary { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(0, 1.2fr); gap: 16px; margin-top: 16px; }
.owner-v3-secondary .panel { margin: 0; }
.owner-ranking-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 16px; }
.owner-ranking-columns h3 { margin: 0 0 8px; color: var(--muted); font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; }
.owner-ranking-columns p { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); }
.owner-ranking-columns p > span { display: grid; min-width: 0; gap: 2px; }
.owner-ranking-columns p small { color: var(--muted); }
.owner-ranking-columns p strong { flex: 0 0 auto; font-size: .85rem; }
.owner-detail-section { margin-top: 16px; }
.owner-detail-section > summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; cursor: pointer; list-style: none; }
.owner-detail-section > summary::-webkit-details-marker { display: none; }
.owner-detail-section > summary > span { display: grid; gap: 4px; }
.owner-detail-section > summary p { margin: 0; }
.owner-detail-section > summary strong { font-size: 1.12rem; }
.owner-detail-section > summary small { color: var(--muted); }
.owner-detail-section > summary > b { min-width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--brand); background: var(--surface-soft); }
.owner-detail-section[open] > summary { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.owner-detail-section .employee-grid { margin-top: 18px; }
.owner-detail-link { margin-top: 16px; }
.owner-responsible-note { margin: 18px 0 0; padding: 13px; border-radius: 9px; color: var(--muted); background: var(--surface-soft); font-size: .84rem; }

.commission-overview { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 18px; }
.commission-overview > section { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-soft); }
.commission-overview h3 { margin: 0; }
.commission-estimate-list, .commission-rule-list { display: grid; gap: 10px; margin-top: 14px; }
.commission-estimate-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.commission-estimate-row:last-child { border-bottom: 0; }
.commission-estimate-row > span { min-width: 0; display: grid; gap: 4px; }
.commission-estimate-row small { color: var(--muted); }
.commission-estimate-row > strong { flex: 0 0 auto; font-size: 1.1rem; }
.commission-rule-row { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--card); }
.commission-rule-row header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.commission-rule-row header > div { min-width: 0; display: grid; gap: 3px; }
.commission-rule-row header small, .commission-rule-row > p { color: var(--muted); }
.commission-rule-row > p { margin: 0; font-size: .78rem; }
.commission-rule-note { padding-top: 9px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.commission-rule-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 2px; }
.commission-rule-actions .button { min-height: var(--control-target); padding: 8px 12px; }
.button-danger, .button-danger:hover { color: var(--on-action); background: var(--action-danger); border-color: var(--action-danger); }
.button-danger-quiet { color: var(--danger) !important; border-color: color-mix(in srgb, var(--danger) 45%, var(--line)) !important; }
.button-danger-quiet:hover { background: color-mix(in srgb, var(--danger) 12%, transparent) !important; }
.commission-delete-card { max-width: 720px; display: grid; gap: 18px; }
.commission-delete-card h2 { margin: 10px 0 4px; }
.commission-delete-card p { margin: 0; color: var(--muted); }
.commission-delete-summary { display: grid; gap: 0; margin: 0; }
.commission-delete-summary > div { display: grid; grid-template-columns: minmax(130px, .7fr) minmax(0, 1.3fr); gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.commission-delete-summary dt { color: var(--muted); }
.commission-delete-summary dd { margin: 0; font-weight: 700; }
.commission-delete-actions { margin-top: 0; }

/* PainÃ©is de decisÃ£o: contexto, exceÃ§Ã£o e aÃ§Ã£o antes de volume visual. */
.decision-heading { align-items: flex-end; }
.decision-strip { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 18px 0; padding: 16px 0; border-block: 1px solid var(--line); }
.decision-strip-title { display: flex; align-items: center; gap: 12px; min-width: 260px; }
.decision-strip-title > div { display: grid; gap: 3px; }
.decision-strip-title small { color: var(--muted); }
.status-dot { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 5px color-mix(in srgb, var(--success) 13%, transparent); }
.status-dot.is-warning { background: var(--warning); box-shadow: 0 0 0 5px color-mix(in srgb, var(--warning) 13%, transparent); }
.decision-strip-links { display: flex; align-items: stretch; justify-content: flex-end; gap: 8px; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.decision-strip-links a { min-width: 150px; display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 9px; color: var(--ink); background: var(--surface-soft); text-decoration: none; font-size: .79rem; }
.decision-strip-links a:hover { background: var(--surface-hover); }
.decision-strip-links b { color: var(--warning); font-size: 1.15rem; }
.period-inline { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin: 14px 0; color: var(--muted); font-size: .78rem; }
.period-inline label { display: contents; }
.period-inline input { width: 142px; min-height: var(--control-target); }
.period-inline button { min-height: var(--control-target); }
.decision-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 20px 0; border-block: 1px solid var(--line); }
.decision-metrics > a { min-width: 0; display: grid; gap: 6px; padding: 18px; color: var(--ink); text-decoration: none; }
.decision-metrics > a + a { border-left: 1px solid var(--line); }
.decision-metrics > a:hover { background: var(--surface-soft); }
.decision-metrics span, .decision-metrics small { color: var(--muted); }
.decision-metrics span { font-size: .78rem; font-weight: 700; }
.decision-metrics strong { font-size: clamp(1.35rem, 2.5vw, 2rem); line-height: 1.08; letter-spacing: -.035em; overflow-wrap: anywhere; }
.decision-metrics small { line-height: 1.42; }
.text-danger { color: var(--danger) !important; }
.work-path { margin: 18px 0; }
.work-path-steps { display: grid; grid-template-columns: 1fr 22px 1fr 22px 1fr 22px 1fr 22px 1fr; align-items: center; margin-top: 18px; }
.work-path-steps > a { min-width: 0; display: grid; grid-template-columns: 28px 1fr; gap: 2px 9px; align-items: center; padding: 11px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.work-path-steps > a:hover { background: var(--surface-soft); }
.work-path-steps > a span { grid-row: 1 / 3; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--brand); font-size: .75rem; font-weight: 800; }
.work-path-steps strong { overflow-wrap: anywhere; font-size: 1.05rem; }
.work-path-steps small { color: var(--muted); }
.work-path-steps > i { height: 1px; background: var(--line); }
.decision-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(290px, .8fr); gap: 16px; margin: 16px 0; }
.decision-layout > .panel, .quiet-grid > .panel, .owner-insight-layout > .panel, .owner-decision-board > .panel { margin: 0; }
.quiet-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 16px 0; }
.line-chart-shell { min-width: 0; margin-top: 18px; }
.line-chart-shell svg { display: block; width: 100%; height: auto; max-height: 260px; overflow: visible; }
.line-chart-shell line { stroke: var(--line); stroke-width: 1; }
.line-chart-shell polyline { fill: none; stroke: var(--brand); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.line-chart-labels { display: flex; justify-content: space-between; gap: 4px; margin-top: 6px; color: var(--muted); font-size: .68rem; }
.data-table-toggle { margin-top: 12px; border-top: 1px solid var(--line); }
.data-table-toggle summary { padding: 12px 0 3px; cursor: pointer; color: var(--brand); font-size: .8rem; font-weight: 700; }
.data-table-toggle > p { color: var(--muted); font-size: .75rem; }
.compact-data-table { display: grid; grid-template-columns: 1fr auto; gap: 0 18px; margin-top: 8px; }
.compact-data-table > * { padding: 7px 0; border-bottom: 1px solid var(--line); }
.compact-data-table span { color: var(--muted); }
.now-panel .solo-agenda-list { max-height: 390px; overflow: auto; }
.calm-summary { display: grid; align-content: start; gap: 12px; }
.calm-summary > strong { font-size: clamp(2.4rem, 5vw, 4rem); letter-spacing: -.06em; }
.calm-summary > p { max-width: 48ch; margin: 0; color: var(--muted); }
.calm-summary > a { margin-top: auto; color: var(--brand); text-decoration: none; font-weight: 700; }
.responsible-reading { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; line-height: 1.5; }

/* Meu negócio Solo: leitura operacional estável sem alterar os painéis empresariais. */
.solo-business-dashboard { min-width: 0; }
.solo-business-dashboard .decision-strip-links a,
.solo-business-dashboard .work-path-steps > a,
.solo-business-dashboard .solo-agenda-list a,
.solo-business-dashboard .solo-quote-list a { min-height: var(--control-target); }
.solo-business-dashboard .module-overview-heading > a,
.solo-business-dashboard .calm-summary > a { min-height: var(--control-target); display: inline-flex; align-items: center; }
.solo-business-dashboard .data-table-toggle summary { min-height: var(--control-target); box-sizing: border-box; padding-block: 13px; }
.solo-business-dashboard .solo-agenda-list a,
.solo-business-dashboard .solo-quote-list a,
.solo-business-dashboard .solo-agenda-list a > span,
.solo-business-dashboard .solo-quote-list a > span { min-width: 0; }
.solo-business-dashboard .solo-agenda-list :is(strong, small),
.solo-business-dashboard .solo-quote-list :is(strong, small, b) { overflow-wrap: anywhere; }
.solo-business-dashboard .solo-quote-list a > b { text-align: right; }
.solo-trend-empty { display: grid; justify-items: center; gap: 6px; padding-block: 26px 8px; }
.solo-trend-empty p { max-width: 42ch; margin: 0; }

/* Olho do Dono usa a mesma arquitetura visual do painel Meu negócio. */
.owner-standard-heading { margin-bottom: 0; }
.owner-standard-heading > div:first-child { max-width: 780px; }
.owner-standard-heading .heading-actions { flex-wrap: wrap; justify-content: flex-end; }
.owner-decision-strip { margin-top: 18px; }
.owner-decision-link > span { min-width: 0; display: grid; gap: 2px; }
.owner-decision-link small { color: var(--muted); font-size: .67rem; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.owner-decision-link.danger b { color: var(--danger); }
.owner-standard-summary { margin-top: 24px; }
.owner-summary-heading { margin-bottom: 8px; }
.owner-summary-heading h2 { margin: 0; }
.owner-summary-heading p { margin: 4px 0 0; }
.owner-work-path { margin-block: 18px 16px; }
.owner-standard-layout { align-items: stretch; }
.owner-standard-layout > .panel { min-height: 100%; }
.owner-standard-events { max-height: 390px; overflow-y: auto; scrollbar-width: thin; }
.owner-standard-secondary { align-items: stretch; }
.owner-standard-secondary > .panel { min-height: 100%; }
.owner-company-pulse .compact-data-table a { padding: 7px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-align: right; text-decoration: none; }
.owner-company-pulse .compact-data-table a:hover { color: var(--brand); }
.owner-standard-deep-dive { display: grid; gap: 16px; margin-top: 24px; }
.owner-deep-dive-heading { margin-bottom: 2px; }
.owner-deep-dive-heading h2 { margin: 0; }
.owner-deep-dive-heading p { margin: 4px 0 0; }
.owner-standard-deep-dive > .owner-investigation { margin: 0; }
.owner-standard-deep-dive > .owner-investigation > summary { padding: 0; border: 0; }
.owner-standard-deep-dive > .owner-investigation[open] > summary { padding-bottom: 16px; border-bottom: 1px solid var(--line); }

.owner-heading-v4 { align-items: flex-end; }
.owner-decision-board { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .7fr); gap: 16px; margin: 18px 0; }
.decision-list { display: grid; margin-top: 8px; }
.decision-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.decision-item > span { display: grid; gap: 4px; }
.decision-item small { color: var(--muted); font-weight: 500; }
.decision-item > strong { min-width: 72px; display: grid; justify-items: end; color: var(--brand); font-size: 1.35rem; }
.decision-item > strong small { font-size: .7rem; }
.decision-item.warning > strong { color: var(--warning); }
.decision-item.danger > strong { color: var(--danger); }
.next-seven-days { display: grid; align-content: start; gap: 16px; }
.next-seven-days > div:first-child { display: grid; gap: 5px; }
.next-seven-days > strong { font-size: clamp(2rem, 4vw, 3.3rem); letter-spacing: -.055em; }
.next-seven-days > p { margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.next-seven-days > a { margin-top: auto; color: var(--brand); text-decoration: none; font-weight: 700; }
.flow-comparison { display: grid; grid-template-columns: 1fr 1fr; border-block: 1px solid var(--line); }
.flow-comparison > span { display: grid; gap: 3px; padding: 12px 0; }
.flow-comparison > span + span { padding-left: 14px; border-left: 1px solid var(--line); }
.flow-comparison small { color: var(--muted); }
.balanced-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 20px 0; border-block: 1px solid var(--line); }
.balanced-summary > a { min-width: 0; display: grid; gap: 4px; padding: 18px; color: var(--ink); text-decoration: none; }
.balanced-summary > a + a { border-left: 1px solid var(--line); }
.balanced-summary > a:hover { background: var(--surface-soft); }
.balanced-summary strong { font-size: clamp(1.55rem, 3vw, 2.2rem); letter-spacing: -.04em; overflow-wrap: anywhere; }
.balanced-summary p { margin: 0; font-size: .87rem; }
.customer-account-summary > div { min-width: 0; display: grid; align-content: start; gap: 6px; padding: 18px; }
.customer-account-summary strong { display: block; font-size: clamp(1.4rem, 2vw, 1.9rem); white-space: nowrap; }
.customer-account-receipt > .form-error-summary { grid-column: 1 / -1; }
.balanced-summary small { color: var(--muted); line-height: 1.4; }
.summary-axis { color: var(--brand); font-size: .68rem; font-weight: 800; letter-spacing: .08em; }
.owner-insight-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(310px, .7fr); gap: 16px; margin: 16px 0; }
.owner-goals-v4 { min-width: 0; }
.owner-context-grid { align-items: start; }
.people-context .employee-card { box-shadow: none; }
.stock-action-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .7fr); gap: 16px; margin: 16px 0; }
.stock-action-layout > .panel { margin: 0; }
.stock-priority-table { display: grid; margin-top: 12px; }
.stock-priority-table > a { display: grid; grid-template-columns: minmax(160px, 1.6fr) repeat(3, minmax(95px, .55fr)) 18px; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.stock-priority-table > a:hover { background: var(--surface-soft); }
.stock-priority-table > a > span { min-width: 0; display: grid; gap: 3px; }
.stock-priority-table small { color: var(--muted); font-size: .73rem; }
.stock-priority-table strong { overflow-wrap: anywhere; font-size: .84rem; }
.stock-priority-table > a > span:first-child strong { font-size: .9rem; }
.stock-priority-table > a > b { color: var(--brand); }
.stock-today-list { display: flex; flex-direction: column; }
.stock-today-actions { display: grid; gap: 5px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.stock-today-actions a { padding: 8px 9px; border-radius: 8px; color: var(--ink); background: var(--surface-soft); text-decoration: none; font-size: .8rem; font-weight: 700; }
.stock-today-actions a:hover { background: var(--surface-hover); }
.stock-today-list .activity-row > b { color: var(--brand); font-size: .75rem; }

/* Base do Titanor — ajuda geral e referência interna do produto. */
.knowledge-heading { align-items: flex-end; }
.knowledge-search { margin-bottom: 16px; }
.knowledge-search > label { display: block; margin-bottom: 8px; font-weight: 750; }
.knowledge-search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }
.knowledge-search-row input { width: 100%; }
.knowledge-search > p { margin: 8px 0 0; font-size: .82rem; }
.knowledge-layout { display: grid; grid-template-columns: 224px minmax(0, 1fr); gap: 16px; align-items: start; }
.knowledge-index { position: sticky; top: 134px; display: grid; gap: 13px; padding: 16px; }
.knowledge-index > strong { font-size: .82rem; letter-spacing: .05em; text-transform: uppercase; }
.knowledge-index nav { display: grid; gap: 3px; }
.knowledge-index nav a { padding: 8px 9px; border-radius: 8px; color: var(--muted); font-size: .84rem; font-weight: 650; text-decoration: none; }
.knowledge-index nav a:hover { color: var(--ink); background: var(--surface-soft); }
.knowledge-context { display: grid; gap: 3px; padding: 12px 9px 0; border-top: 1px solid var(--line); }
.knowledge-context span, .knowledge-context small { color: var(--muted); font-size: .75rem; }
.knowledge-context strong { overflow-wrap: anywhere; font-size: .82rem; }
.knowledge-content { display: grid; gap: 16px; min-width: 0; }
.knowledge-section { scroll-margin-top: 140px; }
.knowledge-section > h2 { margin: .2rem 0 .7rem; font-size: clamp(1.35rem, 2.2vw, 1.8rem); letter-spacing: -.025em; }
.knowledge-section > p:not(.eyebrow) { color: var(--muted); }
.knowledge-principles, .knowledge-discipline-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.knowledge-principles article, .knowledge-discipline-grid article { display: grid; gap: 5px; min-height: 106px; padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.knowledge-principles span, .knowledge-discipline-grid span { color: var(--muted); font-size: .84rem; line-height: 1.45; }
.knowledge-flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
.knowledge-flow > div { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 3px 9px; padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.knowledge-flow b { grid-row: 1 / 3; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: var(--brand); background: color-mix(in srgb, var(--brand) 15%, transparent); }
.knowledge-flow span { color: var(--muted); font-size: .82rem; line-height: 1.42; }
.knowledge-section details { border-top: 1px solid var(--line); }
.knowledge-section details:last-child { border-bottom: 1px solid var(--line); }
.knowledge-section summary { padding: 13px 2px; cursor: pointer; color: var(--ink); font-weight: 700; }
.knowledge-section details > p, .knowledge-section details > ul { margin: 0; padding: 0 2px 14px; color: var(--muted); }
.knowledge-section details > ul { padding-left: 22px; }
.knowledge-module-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.knowledge-module-grid article { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 11px; padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.knowledge-module-grid article > div { display: grid; gap: 4px; }
.knowledge-module-grid p { margin: 0; color: var(--muted); font-size: .84rem; }
.knowledge-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; font-size: .72rem; font-weight: 800; }
.knowledge-blue { color: var(--brand); background: color-mix(in srgb, var(--brand) 15%, transparent); }
.knowledge-cyan { color: var(--info); background: color-mix(in srgb, var(--info) 15%, transparent); }
.knowledge-orange { color: var(--warning); background: color-mix(in srgb, var(--warning) 15%, transparent); }
.knowledge-purple { color: var(--purple); background: color-mix(in srgb, var(--purple) 15%, transparent); }
.knowledge-green { color: var(--success); background: color-mix(in srgb, var(--success) 15%, transparent); }
.knowledge-slate { color: var(--muted); background: color-mix(in srgb, var(--muted) 13%, transparent); }
.knowledge-role-list { display: grid; margin-top: 14px; }
.knowledge-role-list p { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; margin: 0; padding: 11px 0; border-bottom: 1px solid var(--line); }
.knowledge-role-list span { color: var(--muted); }
.knowledge-note { margin: 16px 0 0; padding: 13px; border-radius: 9px; background: var(--surface-soft); font-size: .84rem; }
.knowledge-rules { display: grid; gap: 0; padding: 0; margin: 12px 0 0; list-style: none; counter-reset: rule; }
.knowledge-rules li { counter-increment: rule; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 2px 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.knowledge-rules li::before { content: counter(rule); grid-row: 1 / 3; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--brand); background: color-mix(in srgb, var(--brand) 13%, transparent); font-size: .75rem; font-weight: 800; }
.knowledge-rules span { color: var(--muted); font-size: .84rem; }
.knowledge-security-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.knowledge-security-grid article { padding: 15px; border-left: 3px solid var(--success); border-radius: 9px; background: var(--surface-soft); }
.knowledge-security-grid p { margin: 5px 0 0; color: var(--muted); font-size: .84rem; }
.knowledge-internal { border-color: color-mix(in srgb, var(--warning) 28%, var(--line)); }
.knowledge-discipline-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 17px; }
.knowledge-tech-list { display: grid; margin: 14px 0 18px; }
.knowledge-tech-list > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.knowledge-tech-list dt { font-weight: 750; }
.knowledge-tech-list dd { margin: 0; color: var(--muted); }
.knowledge-checklists { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.knowledge-empty { margin: 0; color: var(--muted); }

/* Central de Suporte — orientação por tarefa, contato e melhoria contínua. */
.support-center { display: grid; gap: 18px; min-width: 0; }
.support-heading { margin-bottom: 0; }
.support-heading > div { max-width: 790px; }
.support-heading h1 { max-width: 760px; }
.support-heading p:last-child { max-width: 720px; color: var(--muted); }
.support-search-card { display: grid; grid-template-columns: minmax(250px, .72fr) minmax(340px, 1.28fr); gap: 18px 28px; align-items: end; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.support-search-card h2, .support-section h2, .support-suggestion h2 { margin: .18rem 0 .45rem; font-size: clamp(1.3rem, 2.2vw, 1.75rem); letter-spacing: -.025em; }
.support-search-card p { margin: 0; color: var(--muted); }
.support-search-control { min-height: 50px; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 0 8px 0 15px; border: 1px solid var(--line); border-radius: 11px; background: var(--card); }
.support-search-control:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent); }
.support-search-control svg { width: 20px; height: 20px; color: var(--muted); fill: none; stroke: currentColor; stroke-width: 1.8; }
.support-search-control input { min-width: 0; height: 48px; padding: 0; border: 0; background: transparent; box-shadow: none; }
.support-search-control input:focus { outline: 0; box-shadow: none; }
.support-search-control .button { min-height: 36px; padding: 7px 10px; }
.support-search-card > small { grid-column: 2; margin-top: -12px; color: var(--muted); }
.support-contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.support-contact-card { min-width: 0; min-height: 82px; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 13px; align-items: center; padding: 16px; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; background: var(--card); text-decoration: none; }
.support-contact-card > span:nth-child(2) { min-width: 0; display: grid; gap: 3px; }
.support-contact-card strong, .support-contact-card small { overflow-wrap: anywhere; }
.support-contact-card small { color: var(--muted); }
.support-contact-primary:hover { border-color: color-mix(in srgb, var(--success) 60%, var(--line)); background: color-mix(in srgb, var(--success) 7%, var(--card)); }
.support-contact-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; color: var(--brand); background: color-mix(in srgb, var(--brand) 13%, transparent); font-size: .72rem; font-weight: 850; }
.support-contact-primary .support-contact-icon { color: var(--success); background: color-mix(in srgb, var(--success) 14%, transparent); }
.support-no-results { margin: 0; padding: 16px; color: var(--muted); border: 1px dashed var(--line); border-radius: 11px; }
.support-section { min-width: 0; padding-top: 8px; }
.support-section-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, .55fr); gap: 20px; align-items: end; margin-bottom: 14px; }
.support-section-heading > p { margin: 0 0 .45rem; color: var(--muted); }
.support-question-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.support-question-list details { min-width: 0; align-self: start; border: 1px solid var(--line); border-radius: 11px; background: var(--card); }
.support-question-list summary { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; cursor: pointer; font-weight: 720; list-style: none; }
.support-question-list summary::-webkit-details-marker { display: none; }
.support-question-list summary::after { content: "+"; flex: 0 0 auto; color: var(--brand); font-size: 1.15rem; }
.support-question-list details[open] summary::after { content: "−"; }
.support-question-list details > div { padding: 0 16px 16px; }
.support-question-list p { margin: 0 0 10px; color: var(--muted); line-height: 1.52; }
.support-question-list a { font-size: .84rem; font-weight: 750; }
.support-guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.support-guide-grid > a { min-width: 0; min-height: 188px; display: flex; flex-direction: column; gap: 7px; padding: 17px; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; background: var(--card); text-decoration: none; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.support-guide-grid > a:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand) 42%, var(--line)); background: var(--surface-soft); }
.support-guide-grid > a > span { color: var(--brand); font-size: .7rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.support-guide-grid strong { overflow-wrap: anywhere; font-size: .98rem; line-height: 1.35; }
.support-guide-grid p { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.48; }
.support-guide-grid small { display: flex; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; color: var(--ink); font-weight: 720; }
.support-suggestion { display: grid; grid-template-columns: minmax(260px, .75fr) minmax(360px, 1.25fr); gap: 24px; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.support-suggestion-copy p:not(.eyebrow) { color: var(--muted); }
.support-suggestion-copy small { display: block; color: var(--muted); line-height: 1.45; }
.support-suggestion-form { display: grid; gap: 10px; }
.support-suggestion-form label { font-weight: 750; }
.support-suggestion-form textarea { width: 100%; min-height: 132px; resize: vertical; }
.support-suggestion-form .button { justify-self: end; }

/* Guia de uma tarefa. */
.knowledge-article { min-width: 0; }
.knowledge-breadcrumb { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; color: var(--muted); font-size: .82rem; }
.knowledge-article-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(230px, .36fr); gap: 24px; align-items: end; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.knowledge-article-heading h1 { max-width: 820px; margin: .22rem 0 .65rem; font-size: clamp(2rem, 4.2vw, 3.35rem); line-height: 1.04; letter-spacing: -.045em; }
.knowledge-article-heading p:last-child { max-width: 740px; margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.58; }
.knowledge-article-meta { display: grid; gap: 10px; margin: 0; }
.knowledge-article-meta > div { display: grid; gap: 3px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.knowledge-article-meta dt { color: var(--muted); font-size: .72rem; text-transform: uppercase; }
.knowledge-article-meta dd { margin: 0; font-size: .86rem; font-weight: 700; }
.knowledge-article-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 28px; align-items: start; padding-top: 24px; }
.knowledge-article-index { position: sticky; top: 130px; display: grid; gap: 4px; }
.knowledge-article-index strong { margin-bottom: 8px; font-size: .8rem; text-transform: uppercase; }
.knowledge-article-index a { padding: 8px 9px; color: var(--muted); border-radius: 8px; font-size: .82rem; text-decoration: none; }
.knowledge-article-index a:hover { color: var(--ink); background: var(--surface-soft); }
.knowledge-article-body { min-width: 0; display: grid; gap: 14px; }
.knowledge-task-section { padding: 20px; border: 1px solid var(--line); border-radius: 13px; background: var(--card); scroll-margin-top: 130px; }
.knowledge-task-section h2 { margin: .18rem 0 .75rem; font-size: clamp(1.25rem, 2vw, 1.65rem); }
.knowledge-task-section > p:not(.eyebrow), .knowledge-task-section li { color: var(--muted); line-height: 1.52; }
.knowledge-task-section ul { display: grid; gap: 8px; margin-bottom: 0; padding-left: 20px; }
.knowledge-task-steps { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; counter-reset: task-step; }
.knowledge-task-steps li { counter-increment: task-step; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.knowledge-task-steps li:last-child { border-bottom: 0; }
.knowledge-task-steps li::before { content: counter(task-step); width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--brand); background: color-mix(in srgb, var(--brand) 13%, transparent); font-weight: 800; }
.knowledge-task-steps p { margin: 4px 0 0; color: var(--muted); }
.knowledge-task-result { border-left: 4px solid var(--success); }
.knowledge-task-mobile { border-left: 4px solid var(--brand); }
.knowledge-troubleshooting details { border-top: 1px solid var(--line); }
.knowledge-troubleshooting summary { padding: 13px 2px; cursor: pointer; font-weight: 720; }
.knowledge-troubleshooting p { margin: 0; padding: 0 2px 13px; color: var(--muted); }
.knowledge-related-guides { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.knowledge-related-guides a { display: grid; gap: 4px; padding: 13px; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; text-decoration: none; }
.knowledge-related-guides span { color: var(--muted); font-size: .8rem; }
.knowledge-help-footer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 20px; border-radius: 13px; background: var(--surface-soft); }
.knowledge-help-footer > div { display: grid; gap: 4px; }
.knowledge-help-footer span { color: var(--muted); font-size: .84rem; }

/* Página pública: clara, honesta e centrada no produto real. */
.app-public { color-scheme: light; --ink: #0f1d31; --muted: #5f6f83; --paper: #f7f9fc; --card: #ffffff; --brand: #246fe5; --accent: #246fe5; --line: #dce5f0; --surface-soft: #eff4fa; --surface-hover: #e8eff8; background: var(--paper); }
.app-public > .page { width: 100%; max-width: none; margin: 0; overflow: hidden; }
.public-topbar { position: sticky; z-index: 80; top: 0; height: 70px; padding: 0 max(24px, calc((100vw - 1300px) / 2)); color: var(--ink); background: rgba(255, 255, 255, .88); border-bottom: 1px solid rgba(220, 229, 240, .88); backdrop-filter: blur(18px); }
.public-topbar .brand, .public-topbar .public-nav a { color: var(--ink); }
.public-topbar .public-nav { gap: 20px; }
.public-topbar .public-nav-link,
.public-topbar .public-login { min-height: var(--control-target); display: inline-flex; align-items: center; }
.public-topbar .public-nav-link { color: var(--muted) !important; font-size: .84rem; font-weight: 650; }
.public-topbar .public-nav-link:hover, .public-topbar .public-login:hover { color: var(--brand) !important; }
.public-topbar .public-login { font-size: .86rem; }
.public-topbar .public-cta { min-height: var(--control-target); display: inline-flex; align-items: center; padding: 8px 14px; color: var(--on-action); background: var(--brand); }
.public-footer { background: #081526; }

.landing-v4 { color: var(--ink); background: var(--paper); }
.landing-v4 svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.landing-v4-hero, .landing-v4-section, .landing-proof-strip, .landing-v4-cta { width: min(1300px, calc(100% - 48px)); margin-inline: auto; }
.landing-v4-hero { min-height: 690px; display: grid; grid-template-columns: minmax(420px, .86fr) minmax(560px, 1.14fr); align-items: center; gap: clamp(44px, 6vw, 88px); padding: 74px 0 64px; }
.landing-v4-copy { position: relative; z-index: 2; }
.landing-v4-copy h1 { max-width: 690px; margin: .3rem 0 1.35rem; color: var(--ink); font-size: clamp(3.2rem, 5.4vw, 5.3rem); line-height: .98; letter-spacing: -.055em; }
.landing-v4-copy h1 span { color: var(--brand); }
.landing-v4-lead { max-width: 660px; margin: 0; color: var(--muted); font-size: clamp(1.05rem, 1.45vw, 1.22rem); line-height: 1.62; }
.landing-v4-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 27px; }
.landing-v4-actions .button { min-height: 48px; display: inline-flex; align-items: center; padding: 11px 18px; }
.landing-v4-secondary { color: var(--ink); background: #fff; border: 1px solid var(--line); }
.landing-v4-secondary:hover { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); background: #fff; }
.landing-v4-beta { margin: 13px 0 0; color: var(--muted); font-size: .82rem; }
.landing-v4-hero::before { content: ""; position: absolute; z-index: 0; top: 74px; right: 0; width: min(52vw, 820px); height: 620px; pointer-events: none; background: radial-gradient(circle, rgba(36, 111, 229, .12), transparent 67%); }

.landing-app-window { min-width: 0; margin: 0; overflow: hidden; border: 1px solid #d6e0ec; border-radius: 16px; background: #fff; box-shadow: 0 24px 70px rgba(30, 59, 98, .14); }
.landing-app-window-hero { position: relative; z-index: 2; transform: perspective(1400px) rotateY(-2deg) rotateX(1deg); }
.landing-window-bar { height: 38px; display: flex; align-items: center; gap: 6px; padding: 0 12px; color: #728096; background: #f4f7fb; border-bottom: 1px solid #e1e8f1; font-size: .68rem; }
.landing-window-bar > span { width: 8px; height: 8px; border-radius: 50%; background: #ccd6e3; }
.landing-window-bar > b { margin-left: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.landing-app-window img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top left; background: #08111d; }
.landing-app-window > figcaption { display: grid; gap: 2px; padding: 12px 15px; color: var(--muted); font-size: .78rem; }
.landing-app-window > figcaption strong { color: var(--ink); font-size: .9rem; }
.landing-app-window-hero > figcaption { display: block; padding: 12px 15px; }

.landing-proof-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 10px 35px rgba(30, 59, 98, .06); }
.landing-proof-strip > span { display: grid; gap: 2px; min-width: 0; padding: 17px 20px; }
.landing-proof-strip > span + span { border-left: 1px solid var(--line); }
.landing-proof-strip b { font-size: .84rem; }
.landing-proof-strip small { color: var(--muted); font-size: .76rem; }

.landing-v4-section { padding: 110px 0; }
.landing-v4-section + .landing-v4-section { border-top: 1px solid var(--line); }
.landing-v4-heading { max-width: 790px; }
.landing-v4-heading h2, .landing-v4-cta h2 { margin: .25rem 0 .85rem; font-size: clamp(2.3rem, 4.3vw, 4.15rem); line-height: 1.02; letter-spacing: -.047em; }
.landing-v4-heading > p:not(.eyebrow), .landing-v4-heading-row > p, .landing-v4-heading-row > div:last-child { color: var(--muted); font-size: 1.02rem; line-height: 1.65; }
.landing-module-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-top: 38px; }
.landing-module-grid article { min-height: 194px; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: #fff; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.landing-module-grid article:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--brand) 28%, var(--line)); box-shadow: 0 16px 45px rgba(30, 59, 98, .08); }
.landing-module-grid article > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; color: var(--brand); background: color-mix(in srgb, var(--brand) 11%, #fff); }
.landing-module-grid h3 { margin: 22px 0 7px; font-size: 1.08rem; }
.landing-module-grid p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.55; }

.landing-v4-flow { width: 100%; max-width: none; padding-inline: max(24px, calc((100vw - 1300px) / 2)); background: #eef4fc; }
.landing-step-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin: 38px 0 28px; padding: 0; list-style: none; }
.landing-step-grid li { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; padding: 22px; border: 1px solid #d7e4f4; border-radius: 14px; background: rgba(255, 255, 255, .76); }
.landing-step-grid li > b { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: var(--brand); font-size: .85rem; }
.landing-step-grid li > div { display: grid; gap: 5px; }
.landing-step-grid span { color: var(--muted); font-size: .86rem; line-height: 1.5; }
.landing-connected-flow { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 9px; padding-top: 10px; }
.landing-connected-flow span { padding: 10px 14px; border: 1px solid #d7e4f4; border-radius: 999px; background: #fff; font-size: .84rem; font-weight: 700; }
.landing-connected-flow b { color: var(--brand); }

.landing-v4-heading-row { max-width: none; display: grid; grid-template-columns: minmax(340px, .95fr) minmax(340px, .65fr); align-items: end; justify-content: space-between; gap: 70px; }
.landing-v4-heading-row > p, .landing-v4-heading-row > div:last-child { margin-bottom: .7rem; }
.landing-screen-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 40px; }
.landing-screen-featured { grid-column: 1 / -1; }
.landing-screen-featured img { aspect-ratio: 16 / 7.4; }
.landing-v4-screens .landing-app-window { box-shadow: 0 14px 45px rgba(30, 59, 98, .09); }

.landing-mobile-showcase { overflow: visible; }
.landing-device-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(220px, .66fr) minmax(205px, .6fr); gap: clamp(20px, 3vw, 42px); align-items: end; margin-top: 48px; padding: 46px clamp(18px, 4vw, 54px) 28px; border: 1px solid #dce5f0; border-radius: 24px; background: linear-gradient(145deg, #eef4fb, #fff 62%); }
.landing-device { min-width: 0; margin: 0; }
.landing-device-shell { position: relative; margin-inline: auto; overflow: hidden; border: 8px solid #101a28; background: #08111d; box-shadow: 0 24px 58px rgba(21, 45, 75, .2); }
.landing-device-shell img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; background: #08111d; }
.landing-device-camera { position: absolute; z-index: 2; top: 6px; left: 50%; width: 42px; height: 5px; border-radius: 999px; background: rgba(4, 9, 15, .88); transform: translateX(-50%); }
.landing-device-tablet .landing-device-shell { width: min(100%, 720px); aspect-ratio: 1180 / 820; border-width: 11px; border-radius: 27px; }
.landing-device-phone .landing-device-shell { width: min(100%, 270px); aspect-ratio: 390 / 790; border-radius: 31px; }
.landing-device-fold .landing-device-shell { width: min(100%, 238px); aspect-ratio: 344 / 790; border-radius: 28px; }
.landing-device figcaption { display: grid; gap: 3px; margin-top: 15px; text-align: center; }
.landing-device figcaption strong { color: var(--ink); font-size: .9rem; }
.landing-device figcaption span { color: var(--muted); font-size: .78rem; line-height: 1.45; }

.landing-audience-v4 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 36px; }
.landing-audience-v4 article { padding: clamp(24px, 4vw, 42px); border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.landing-audience-v4 article:last-child { color: #fff; background: #0d1b2e; border-color: #0d1b2e; }
.landing-audience-v4 article > span { color: var(--brand); font-size: .72rem; font-weight: 800; letter-spacing: .12em; }
.landing-audience-v4 h3 { margin: 12px 0 10px; font-size: clamp(1.55rem, 3vw, 2.35rem); letter-spacing: -.03em; }
.landing-audience-v4 p { color: var(--muted); line-height: 1.62; }
.landing-audience-v4 article:last-child p, .landing-audience-v4 article:last-child li { color: #aebbd0; }
.landing-audience-v4 ul { display: grid; gap: 8px; margin: 22px 0 0; padding-left: 20px; color: var(--muted); }

.landing-security { width: 100%; max-width: none; padding-inline: max(24px, calc((100vw - 1300px) / 2)); background: #0b1727; color: #f5f8fc; }
.landing-security .eyebrow { color: #78b2ff; }
.landing-security .landing-v4-heading > p:not(.eyebrow) { color: #aebbd0; }
.landing-security-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 36px; }
.landing-security-grid article { padding: 21px; border: 1px solid #273950; border-radius: 13px; background: #111f32; }
.landing-security-grid p { margin: 8px 0 0; color: #aebbd0; font-size: .85rem; line-height: 1.52; }

.landing-about { border-top: 0 !important; }
.landing-about .landing-v4-heading-row > div:last-child p { margin: 0 0 14px; }
.landing-values-v4 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 38px; }
.landing-values-v4 > span { display: grid; gap: 4px; padding: 20px; border-left: 3px solid var(--brand); border-radius: 10px; background: #fff; }
.landing-values-v4 small { color: var(--muted); }

.landing-v4-cta { margin-bottom: 110px; padding: 64px clamp(24px, 6vw, 82px); border-radius: 22px; color: #fff; background: linear-gradient(135deg, #0d1b2e, #12345f); box-shadow: 0 25px 70px rgba(18, 52, 95, .18); }
.landing-v4-cta .eyebrow { color: #82b9ff; }
.landing-v4-cta h2 { max-width: 850px; }
.landing-v4-cta > p:not(.eyebrow) { max-width: 720px; color: #b7c5d8; font-size: 1rem; line-height: 1.65; }
.landing-v4-cta > div { display: flex; align-items: center; gap: 18px; margin-top: 25px; }
.landing-v4-cta > div > a:not(.button) { color: #fff; font-weight: 700; }

/* Tela sem empresa ativa: login, recuperação e modo desenvolvedor. */
.app-authenticated:not(.app-has-company) > .page { width: min(1180px, 92vw); }
.app-authenticated:not(.app-has-company) .public-topbar { color: #fff; background: var(--sidebar-strong); }
.app-authenticated:not(.app-has-company) .public-topbar .brand { color: #fff; }

/* A lateral pode virar uma barra de ícones sem tirar espaço da tarefa. */
@media (min-width: 961px) {
  body.nav-compact .app-shell { grid-template-columns: 76px minmax(0, 1fr); }
  body.nav-compact .app-sidebar { padding-inline: 9px; }
  body.nav-compact .sidebar-head { flex-direction: column; gap: 10px; padding-inline: 0; }
  body.nav-compact .brand-word,
  body.nav-compact .app-nav-label,
  body.nav-compact .app-nav-link > span { display: none; }
  body.nav-compact .app-brand { justify-content: center; }
  body.nav-compact .app-nav { gap: 7px; padding-top: 8px; }
  body.nav-compact .app-nav-link { min-height: 44px; justify-content: center; padding: 10px; }
  body.nav-compact .app-nav-link.active { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 28%, transparent); }
  body.nav-compact .sidebar-collapse svg { transform: rotate(180deg); }
}

@media (max-width: 1180px) {
  .app-topbar { padding-inline: 20px; }
  .app-workspace .section-nav { padding-inline: 20px; }
  .app-workspace > .page, .app-workspace > .messages { width: min(100% - 36px, 1260px); }
  .owner-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .decision-metrics, .balanced-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .decision-metrics > a:nth-child(3), .balanced-summary > a:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .decision-metrics > a:nth-child(4), .balanced-summary > a:nth-child(4) { border-top: 1px solid var(--line); }
  .landing-v4-hero { grid-template-columns: minmax(380px, .85fr) minmax(500px, 1.15fr); gap: 38px; }
  .public-topbar .public-nav { gap: 13px; }
  .public-topbar .public-nav-link { font-size: .78rem; }
}

@media (max-width: 960px) {
  .app-shell { display: block; min-height: 100vh; }
  .app-sidebar { position: fixed; inset: 0 auto 0 0; width: min(290px, 86vw); min-height: 100%; visibility: hidden; transform: translateX(-105%); transition: transform .2s ease, visibility 0s linear .2s; box-shadow: 22px 0 60px rgba(0, 7, 18, .38); }
  .app-workspace .section-nav { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--brand) 55%, var(--line)) transparent; }
  .app-workspace .section-nav::-webkit-scrollbar { display: block; height: 5px; }
  .app-workspace .section-nav::-webkit-scrollbar-thumb { border-radius: 999px; background: color-mix(in srgb, var(--brand) 55%, var(--line)); }
  .app-workspace .section-nav::-webkit-scrollbar-track { background: transparent; }
  .nav-open .app-sidebar { visibility: visible; transform: translateX(0); transition-delay: 0s; }
  .icon-button.sidebar-close { display: grid; color: var(--sidebar-muted); background: transparent; border-color: rgba(141, 160, 184, .2); }
  .icon-button.sidebar-collapse { display: none; }
  .app-nav-scrim { position: fixed; z-index: 30; inset: 0; display: block; padding: 0; border: 0; border-radius: 0; background: rgba(0, 7, 18, .65); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  .app-nav-scrim[hidden] { display: none; }
  .nav-open .app-nav-scrim { opacity: 1; pointer-events: auto; }
  body.nav-lock { overflow: hidden; }
  .app-topbar { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .icon-button.nav-toggle { display: grid; }
  .owner-v3-main, .owner-v3-secondary { grid-template-columns: 1fr; }
  .decision-layout, .owner-decision-board, .owner-insight-layout { grid-template-columns: 1fr; }
  .stock-action-layout { grid-template-columns: 1fr; }
  .knowledge-layout { grid-template-columns: 1fr; }
  .knowledge-index { position: static; }
  .knowledge-index nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .support-guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .knowledge-article-layout { grid-template-columns: 1fr; }
  .knowledge-article-index { position: static; display: flex; gap: 7px; overflow-x: auto; padding-bottom: 4px; }
  .knowledge-article-index strong { display: none; }
  .knowledge-article-index a { flex: 0 0 auto; background: var(--surface-soft); }
  .landing-v4-hero { min-height: auto; grid-template-columns: 1fr; gap: 42px; padding: 70px 0; }
  .landing-v4-hero::before { top: 300px; width: 100vw; }
  .landing-app-window-hero { transform: none; }
  .landing-proof-strip { grid-template-columns: 1fr 1fr; }
  .landing-proof-strip > span:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .landing-proof-strip > span:nth-child(4) { border-top: 1px solid var(--line); }
  .landing-module-grid { grid-template-columns: 1fr 1fr; }
  .landing-step-grid { grid-template-columns: 1fr; }
  .landing-v4-heading-row { grid-template-columns: 1fr; align-items: start; gap: 12px; }
  .landing-device-grid { grid-template-columns: minmax(0, 1.2fr) minmax(190px, .7fr); }
  .landing-device-tablet { grid-column: 1 / -1; }
  .landing-device-tablet .landing-device-shell { max-width: 720px; }
  .landing-security-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .app-topbar { min-height: 62px; gap: 9px; padding: 8px 12px; }
  .app-location small, .dev-badge, .account-identity, .account-summary > svg { display: none; }
  .app-location strong { font-size: .88rem; }
  .app-workspace .section-nav { top: 62px; min-height: 48px; padding: 5px 12px; overflow-x: auto; }
  .section-nav-context { display: none; }
  .app-workspace .section-nav a { min-height: var(--control-target); display: inline-flex; align-items: center; }
  .app-workspace > .page { width: calc(100% - 24px); margin: 22px auto 40px; }
  .app-workspace > .messages { width: calc(100% - 24px); margin-top: 12px; }
  .page-heading { gap: 14px; }
  .page-heading h1 { font-size: clamp(1.8rem, 9vw, 2.3rem); }
  .decision-heading, .owner-heading-v4 { align-items: stretch; }
  .owner-standard-heading .heading-actions { width: 100%; justify-content: stretch; }
  .owner-standard-heading .heading-actions > * { flex: 1 1 12rem; }
  .decision-strip { align-items: stretch; flex-direction: column; gap: 12px; }
  .decision-strip-links { justify-content: flex-start; }
  .period-inline { display: grid; grid-template-columns: auto 1fr; justify-content: stretch; }
  .period-inline input { width: 100%; }
  .period-inline > span:nth-of-type(2) { grid-column: 1; }
  .period-inline button { grid-column: 1 / -1; }
  .work-path { overflow: hidden; }
  .work-path-steps { width: 760px; overflow: visible; }
  .work-path::after { content: "Deslize para acompanhar as etapas →"; display: block; margin-top: 10px; color: var(--muted); font-size: .72rem; }
  .work-path-steps { overflow-x: auto; }
  .solo-business-dashboard .solo-work-path { overflow: visible; }
  .solo-business-dashboard .solo-work-path::after { content: none; }
  .solo-business-dashboard .solo-work-path .work-path-steps { width: auto; grid-template-columns: minmax(0, 1fr); gap: 0; overflow: visible; }
  .solo-business-dashboard .solo-work-path .work-path-steps > a { width: 100%; padding-block: 8px; }
  .solo-business-dashboard .solo-work-path .work-path-steps > i { width: 1px; height: 10px; margin-left: 25px; }
  .quiet-grid { grid-template-columns: 1fr; }
  .line-chart-labels span:nth-child(even) { display: none; }
  .stock-priority-table > a { grid-template-columns: minmax(0, 1fr) auto; gap: 7px 14px; }
  .stock-priority-table > a > span:first-child { grid-column: 1 / -1; }
  .stock-priority-table > a > span:nth-child(4), .stock-priority-table > a > b { display: none; }
  .panel, .form-card, .movement-card { padding: 17px; }
  .metric-grid article, .owner-metrics article, .stock-metrics > a { min-height: 102px; padding: 16px; }
  .account-popover { position: fixed; top: 62px; right: 10px; width: min(280px, calc(100vw - 20px)); }
  .command-trigger { width: 40px; justify-content: center; padding: 0; }
  .command-trigger > span, .command-trigger > kbd { display: none; }
  .command-palette { width: calc(100% - 16px); max-height: calc(100dvh - 24px); border-radius: 15px; }
  .command-body nav { grid-template-columns: 1fr; }
  .command-palette footer { gap: 10px; overflow-x: auto; white-space: nowrap; }
  .owner-heading-v3 { align-items: stretch; }
  .owner-kpi-grid { grid-template-columns: 1fr 1fr; }
  .owner-kpi { min-height: 118px; }
  .owner-ranking-columns, .owner-management-v3 { grid-template-columns: 1fr; }
  .knowledge-heading { align-items: stretch; }
  .knowledge-heading .button { width: 100%; }
  .knowledge-index { gap: 9px; padding: 14px; overflow: hidden; }
  .knowledge-index nav { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 3px; scrollbar-width: none; }
  .knowledge-index nav::-webkit-scrollbar { display: none; }
  .knowledge-index nav a { flex: 0 0 auto; background: var(--surface-soft); }
  .knowledge-context { display: none; }
  .knowledge-principles, .knowledge-flow, .knowledge-discipline-grid, .knowledge-checklists { grid-template-columns: 1fr; }
  .knowledge-module-grid, .knowledge-security-grid { grid-template-columns: 1fr; }
  .knowledge-role-list p, .knowledge-tech-list > div { grid-template-columns: 1fr; gap: 4px; }
  :is(.service-order-table, .commercial-table, .cash-table, .product-table, .product-history-table, .movement-table, .purchase-table, .report-stock-table) tr {
    color: var(--ink);
    background: var(--card);
    border-color: var(--line);
  }
  :is(.service-order-table, .commercial-table, .cash-table, .product-table, .product-history-table, .movement-table, .purchase-table, .report-stock-table) td {
    color: var(--ink);
    border-color: var(--line);
  }
  .public-topbar { height: 64px; padding-inline: 16px; }
  .public-topbar .public-nav { gap: 8px; }
  .public-topbar .public-nav-link { display: none; }
  .public-topbar .public-login { display: inline-flex; }
  .app-public > .page { width: min(100% - 32px, 1280px); }
  .app-public > .page { width: 100%; }
  .landing-v4-hero, .landing-v4-section, .landing-proof-strip, .landing-v4-cta { width: min(100% - 32px, 1300px); }
  .landing-v4-hero { padding: 50px 0 56px; }
  .landing-v4-copy h1 { font-size: clamp(2.75rem, 13vw, 4.2rem); }
  .landing-v4-section { padding: 76px 0; }
  .landing-v4-flow, .landing-security { width: 100%; padding-inline: 16px; }
  .landing-module-grid, .landing-screen-grid, .landing-audience-v4, .landing-values-v4 { grid-template-columns: 1fr; }
  .landing-device-grid { grid-template-columns: 1fr 1fr; gap: 28px 16px; padding: 28px 16px 22px; }
  .landing-device-tablet { grid-column: 1 / -1; }
  .landing-device-phone .landing-device-shell { max-width: 245px; }
  .landing-device-fold .landing-device-shell { max-width: 215px; }
  .landing-screen-featured { grid-column: auto; }
  .landing-screen-featured img { aspect-ratio: 16 / 9; }
  .landing-v4-cta { margin-bottom: 72px; padding: 42px 24px; }

}

@media (max-width: 520px) {
  .app-topbar-actions > .dev-badge { display: none; }
  .page-heading .heading-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .heading-actions .button { width: 100%; }
  .metric-grid, .owner-metrics, .stock-metrics, .summary-card-grid { grid-template-columns: 1fr; }
  .decision-metrics, .balanced-summary { grid-template-columns: 1fr; }
  .decision-metrics > a + a, .balanced-summary > a + a { border-left: 0; border-top: 1px solid var(--line); }
  .decision-metrics > a { padding-inline: 4px; }
  .solo-business-dashboard .solo-agenda-list a { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .solo-business-dashboard .solo-agenda-list time { grid-column: 1 / -1; }
  .balanced-summary > a { padding-inline: 4px; }
  .decision-item { align-items: flex-start; }
  .decision-item > strong { min-width: 56px; }
  .flow-comparison { grid-template-columns: 1fr; }
  .flow-comparison > span + span { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .owner-kpi-grid { grid-template-columns: 1fr; }
  .owner-kpi { min-height: 0; }
  .owner-actions-v3 > div { grid-template-columns: 1fr; }
  .owner-management-v3 > div > p, .owner-management-v3 > div:last-child > p { grid-template-columns: 1fr; }
  .metric-grid article, .owner-metrics article, .stock-metrics > a { min-height: 0; }
  .knowledge-search-row { grid-template-columns: 1fr; }
  .public-topbar .brand-word { font-size: .9rem; }
  .public-topbar .public-nav { gap: 6px; }
  .public-topbar .public-login {
    min-height: var(--control-target);
    display: inline-flex;
    align-items: center;
    padding-inline: 6px;
    font-size: .76rem;
  }
  .public-topbar .public-cta { padding-inline: 10px; font-size: .74rem; }
  .landing-v4-actions { display: grid; }
  .landing-v4-actions .button { justify-content: center; width: 100%; }
  .landing-proof-strip { grid-template-columns: 1fr; }
  .landing-proof-strip > span + span { border-left: 0; border-top: 1px solid var(--line); }
  .landing-device-grid { display: grid; grid-template-columns: 1fr; }
  .landing-device-tablet, .landing-device-phone, .landing-device-fold { grid-column: auto; }
  .landing-device-tablet .landing-device-shell { width: 100%; aspect-ratio: 1180 / 820; border-radius: 24px; }
  .landing-device-phone .landing-device-shell,
  .landing-device-fold .landing-device-shell { width: min(76vw, 260px); }
  .landing-module-grid, .landing-security-grid { grid-template-columns: 1fr; }
  .landing-module-grid article { min-height: 0; }
  .landing-connected-flow { justify-content: flex-start; }
  .landing-connected-flow b { display: none; }
  .landing-v4-cta > div { align-items: stretch; flex-direction: column; }
  .landing-v4-cta > div .button { justify-content: center; }
}

@media (max-width: 360px) {
  .app-public .public-topbar { padding-inline: 12px; }
  .public-topbar .brand-word { display: none; }
}

/* Em tablets, produtos viram cartões em duas colunas em vez de uma tabela apertada. */
@media (min-width: 761px) and (max-width: 960px) {
  .product-table { overflow: visible; border: 0; background: transparent; box-shadow: none; }
  .product-table table { display: block; width: 100%; table-layout: auto; }
  .product-table thead { display: none; }
  .product-table tbody { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; width: 100%; }
  .product-table tr { display: block; min-width: 0; margin: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
  .product-table td { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 12px; width: 100%; padding: 9px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
  .product-table td::before { content: attr(data-label); color: var(--muted); font-size: .68rem; font-weight: 650; line-height: 1.35; text-transform: uppercase; letter-spacing: .04em; }
  .product-table td:last-child { border-bottom: 0; }
  .product-table .badge { justify-self: start; }
  .product-table .product-row-action { display: block; padding-top: 13px; }
  .product-table .product-row-action::before { display: none; }
  .product-table .product-row-action .button { width: 100%; min-height: 44px; }
}

/* Atendimento de veículo: usa a mesma fundação visual de Vendas, sem criar um módulo paralelo. */
.vehicle-service-heading,
.vehicle-service-form { width: min(100%, 1040px); margin-inline: auto; }
.vehicle-service-form { padding: clamp(18px, 3vw, 28px); }
.vehicle-service-form [hidden] { display: none !important; }
.vehicle-service-form .sales-form-section { padding: 25px 0; border-bottom: 1px solid var(--line); }
.vehicle-service-form .sales-form-section:first-of-type { padding-top: 0; }
.vehicle-service-form .sales-form-section:last-of-type { border-bottom: 0; }
.vehicle-mode-options > .form-control { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 0 0 16px; padding: 0; border: 0; background: transparent; }
.vehicle-mode-options > .form-control > div { min-width: 0; }
.vehicle-mode-options label { min-height: var(--control-target); display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); cursor: pointer; }
.vehicle-mode-options input { width: 18px; height: 18px; margin: 0; }
.vehicle-inline-form { margin-bottom: 16px; padding: 16px 0 0; border-top: 1px solid var(--line); }
.vehicle-active-toggle { display: flex !important; align-items: center; gap: 9px; }
.vehicle-active-toggle > span { order: 2; }
.vehicle-active-toggle input { width: 18px; height: 18px; margin: 0; }
.vehicle-service-evidence { margin-top: 16px; }
.vehicle-customer-quick-entry { grid-template-columns: minmax(118px, .34fr) minmax(190px, 1fr) auto; }
.vehicle-service-result-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 400px); gap: 22px; align-items: start; }
.vehicle-service-result .solo-sale-calculation { padding: 15px 17px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-soft); }
.vehicle-attendance-list { display: grid; gap: 10px; }
.vehicle-attendance-list article { display: grid; grid-template-columns: .7fr minmax(170px, 1.6fr) .9fr .8fr .9fr auto; gap: 13px; align-items: center; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-soft); }
.vehicle-attendance-list article > div { min-width: 0; display: grid; gap: 3px; }
.vehicle-attendance-list small { color: var(--muted); font-size: .67rem; letter-spacing: .035em; text-transform: uppercase; }
.vehicle-attendance-list strong { overflow-wrap: anywhere; font-size: .83rem; }
.vehicle-attendance-list article > a { white-space: nowrap; font-size: .78rem; font-weight: 650; }

@media (max-width: 760px) {
  .vehicle-service-heading { margin-bottom: 16px; }
  .vehicle-service-form { margin-inline: -10px; width: auto; padding: 17px 14px 12px; border-radius: 14px; }
  .vehicle-service-form .sales-form-section { padding: 22px 0; }
  .vehicle-customer-quick-entry,
  .vehicle-service-result-grid { grid-template-columns: 1fr; }
  .vehicle-customer-quick-entry > * { width: 100%; }
  .vehicle-mode-options label { width: 100%; }
  .vehicle-service-form .solo-sale-actions { display: grid; grid-template-columns: 1fr; position: sticky; z-index: 6; bottom: 0; margin: 18px -14px -12px; padding: 12px 14px; background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(10px); }
  .vehicle-service-form .solo-sale-actions > * { width: 100%; min-height: 48px; }
  .vehicle-attendance-list article { grid-template-columns: 1fr 1fr; gap: 12px 14px; }
  .vehicle-attendance-list article > div:nth-child(2),
  .vehicle-attendance-list article > a { grid-column: 1 / -1; }
  .vehicle-attendance-list article > a { min-height: var(--control-target); display: inline-flex; align-items: center; }
}

@media print {
  .app-sidebar, .app-topbar, .app-nav-scrim, .section-nav, .command-palette { display: none !important; }
  .app-shell { display: block; }
  .app-workspace > .page { width: 100%; margin: 0; }
}

/* Estoque simples: menos escolha por tela, histórico completo sob demanda. */
.report-main { scroll-margin-top: 140px; }

.inventory-product-filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 11px;
  align-items: stretch;
  margin-bottom: 18px;
  padding: 16px;
}

.inventory-filter-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.inventory-product-filters label {
  min-width: 0;
  display: grid;
  gap: 6px;
  font-weight: 650;
}

.inventory-filter-main > button {
  min-width: 92px;
  min-height: 44px;
}

.inventory-filter-more {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.inventory-filter-more > summary,
.movement-secondary-actions > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  cursor: pointer;
  color: var(--brand);
  font-size: .84rem;
  font-weight: 650;
}

.inventory-filter-more > summary small {
  color: var(--muted);
  font-size: .74rem;
  font-weight: 450;
}

.inventory-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin-top: 12px;
}

.inventory-filter-clear {
  min-height: 44px;
  white-space: nowrap;
}

.inventory-primary-operations {
  margin-bottom: 12px;
}

.operation-grid a > .operation-icon {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 12%, var(--surface-soft));
}

.operation-grid .operation-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.movement-secondary-actions {
  margin: 0 0 30px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--card) 78%, var(--paper));
}

.movement-secondary-actions > summary {
  width: 100%;
  min-height: 52px;
  color: var(--ink);
}

.report-secondary-actions .heading-actions {
  padding: 0 0 16px;
}

.inventory-secondary-operations {
  margin: 0 0 16px;
}

.history-heading {
  align-items: start;
  justify-content: start;
}

.history-heading h2,
.history-heading p {
  margin: 0;
}

.history-heading > div {
  display: grid;
  gap: 5px;
}

.history-heading p {
  margin-top: 5px;
}

.movement-product-summary,
.inventory-item-summary {
  display: grid;
  gap: 3px;
}

.movement-product-summary .table-item,
.inventory-item-summary .table-item {
  margin: 0;
}

.movement-product-summary .table-item:nth-of-type(n + 3),
.inventory-item-summary .table-item:nth-of-type(n + 3) {
  display: none;
}

.movement-product-summary > small,
.inventory-item-summary > small {
  margin-top: 2px !important;
}

.movement-card .inline-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
}

/* Entre celular e desktop, as listas cabem como tabela e evitam cartões gigantes. */
@media (min-width: 761px) {
  .inventory-summary-table.table-ergonomic.table-cards-wide {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--card);
    box-shadow: var(--shadow-soft);
  }

  .inventory-summary-table.table-cards-wide .titanor-table {
    display: table;
    width: 100%;
    min-width: 680px !important;
  }

  .inventory-summary-table.table-cards-wide .titanor-table thead {
    display: table-header-group;
  }

  .inventory-summary-table.table-cards-wide .titanor-table tbody {
    display: table-row-group;
  }

  .inventory-summary-table.table-cards-wide .titanor-table tr {
    display: table-row;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .inventory-summary-table.table-cards-wide .titanor-table td {
    position: static;
    display: table-cell;
    width: auto;
    min-width: 0;
    min-height: 0;
    padding: 13px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    white-space: normal;
    overflow-wrap: break-word;
  }

  .inventory-summary-table.table-cards-wide .titanor-table td::before {
    display: none;
  }

  .inventory-summary-table.table-cards-wide .titanor-table td.table-col-action {
    min-height: 0;
    padding: 13px 12px;
    text-align: right;
  }

  .inventory-summary-table.table-cards-wide .titanor-table td.table-col-id,
  .inventory-summary-table.table-cards-wide .titanor-table td.table-col-details {
    white-space: nowrap;
    overflow-wrap: normal;
  }

  .inventory-summary-table.table-cards-wide .titanor-table .table-col-details {
    min-width: 118px;
  }

  .inventory-summary-table.table-cards-wide .titanor-table td.table-empty-cell {
    padding: 20px;
  }
}

/*
 * CRUD Final — tabelas continuam tabelas em qualquer largura.
 * A prioridade calculada pelo shell reduz colunas progressivamente e preserva
 * a ação "Ver detalhes", sem criar uma apresentação paralela em cartões.
 */
@media (max-width: 1180px) {
  .table-wrap.table-ergonomic,
  .table-wrap.table-ergonomic.table-cards-wide {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--card);
    box-shadow: var(--shadow-soft);
  }

  .table-ergonomic .titanor-table,
  .table-ergonomic .titanor-table thead,
  .table-ergonomic .titanor-table tbody {
    display: table;
    width: 100%;
    min-width: 0 !important;
  }

  .table-ergonomic .titanor-table thead { display: table-header-group; }
  .table-ergonomic .titanor-table tbody { display: table-row-group; }
  .table-ergonomic .titanor-table tr {
    display: table-row;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .table-ergonomic .titanor-table :is(th, td) {
    position: static;
    display: table-cell;
    width: auto;
    min-width: 0;
    max-width: none;
    padding: 11px 10px;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .table-ergonomic .titanor-table td::before { display: none; }
  .table-ergonomic .titanor-table .table-priority-5 { display: none; }
  .table-ergonomic .titanor-table .table-col-action { text-align: right; }
  .table-ergonomic .titanor-table .table-col-details {
    width: 112px;
    min-width: 112px;
  }
  .table-ergonomic .titanor-table .table-details-trigger {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 960px) {
  .table-ergonomic .titanor-table :is(.table-priority-4, .table-priority-5) {
    display: none;
  }
}

@media (max-width: 760px) {
  .table-wrap.table-ergonomic,
  .table-wrap.table-ergonomic.table-cards-wide {
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--card);
    box-shadow: var(--shadow-soft);
  }

  .table-ergonomic .titanor-table,
  .table-ergonomic .titanor-table thead,
  .table-ergonomic .titanor-table tbody,
  .table-ergonomic .titanor-table tr {
    display: revert;
    width: auto;
    min-width: 0 !important;
  }

  .table-ergonomic .titanor-table {
    display: table;
    width: 100%;
    table-layout: fixed !important;
  }
  .table-ergonomic .titanor-table thead { display: table-header-group; }
  .table-ergonomic .titanor-table tbody { display: table-row-group; }
  .table-ergonomic .titanor-table tr { display: table-row; }

  .table-ergonomic .titanor-table :is(th, td) {
    display: table-cell;
    width: auto;
    min-width: 0;
    min-height: 0;
    padding: 10px 8px;
    border-radius: 0;
    text-align: left;
    overflow-wrap: anywhere;
  }

  .table-ergonomic .titanor-table :is(.table-priority-3, .table-priority-4, .table-priority-5) {
    display: none;
  }

  .table-ergonomic .titanor-table .table-col-action {
    min-height: 0;
    padding: 10px 8px;
    text-align: right;
  }

  .table-ergonomic .titanor-table .table-col-details {
    width: 106px;
    min-width: 106px;
  }

  .table-ergonomic .titanor-table .table-col-action :is(a.button, button),
  .table-ergonomic .titanor-table .table-details-trigger {
    width: 100%;
    min-width: 0;
  }

  .table-ergonomic .titanor-table td.table-empty-cell {
    display: table-cell;
    padding: 18px 10px;
  }

  .table-ergonomic .titanor-key-value-table,
  .table-ergonomic .titanor-key-value-table tbody,
  .table-ergonomic .titanor-key-value-table tr {
    display: table;
    width: 100%;
  }
  .table-ergonomic .titanor-key-value-table tbody { display: table-row-group; }
  .table-ergonomic .titanor-key-value-table tr { display: table-row; }
  .table-ergonomic .titanor-key-value-table :is(th, td) {
    display: table-cell;
    width: 50%;
    padding: 9px 8px;
  }
}

@media (max-width: 520px) {
  .table-ergonomic .titanor-table .table-priority-2 { display: none; }
  .table-ergonomic .titanor-table .table-col-details {
    width: 104px;
    min-width: 104px;
  }
  .table-ergonomic .titanor-table :is(th, td) { padding-inline: 7px; }
}

@media (max-width: 960px) {
  .inventory-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inventory-filter-clear {
    justify-self: start;
  }
}

@media (max-width: 760px) {
  .inventory-filter-main {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .inventory-filter-main > button {
    min-width: 78px;
    padding-inline: 12px;
  }

  .inventory-filter-more > summary {
    width: 100%;
    justify-content: space-between;
  }

  .inventory-filter-more > summary small {
    text-align: right;
  }

  .inventory-filter-grid {
    grid-template-columns: 1fr;
  }

  .inventory-filter-clear {
    width: 100%;
    justify-content: center;
  }

  .inventory-primary-operations,
  .inventory-secondary-operations {
    grid-template-columns: 1fr;
  }

  .movement-card .inline-search {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .movement-card .inline-search .camera-scan-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .inventory-summary-table .titanor-table tr {
    padding: 10px 13px;
  }

  .inventory-summary-table .titanor-table td {
    min-height: 35px;
    padding: 7px 0 7px 92px;
  }

  .inventory-summary-table .titanor-table td.table-col-compact,
  .inventory-summary-table .titanor-table td.table-col-date,
  .inventory-summary-table .titanor-table td.table-col-id,
  .inventory-summary-table .titanor-table td.table-col-number,
  .inventory-summary-table .titanor-table td.table-col-state,
  .inventory-summary-table .titanor-table td.table-col-details {
    width: 100%;
    min-width: 0;
    max-width: none;
    white-space: normal;
  }

  .inventory-summary-table .titanor-table td::before {
    top: 8px;
    width: 80px;
  }

  .product-table .product-alert-normal {
    display: none !important;
  }
}

/* Venda solo — conversa curta, conferência antes da gravação e toque confortável. */
.solo-sale-heading { max-width: 1040px; margin-inline: auto; }
.solo-sale-form { max-width: 1040px; margin-inline: auto; padding: clamp(18px, 3vw, 28px); }
.solo-sale-form .sales-form-section { padding: 26px 0; }
.solo-sale-form .sales-form-section:first-of-type { padding-top: 0; }
.solo-sale-section-heading { display: flex; align-items: center; gap: 12px; margin: 0 0 15px !important; }
.solo-sale-section-heading > div { display: grid; gap: 2px; }
.solo-sale-section-heading :is(.eyebrow, h2) { margin: 0; }
.solo-sale-section-heading h2 { font-size: 1.15rem; line-height: 1.25; }
.solo-sale-main-field { width: min(100%, 720px); display: grid; gap: 7px; color: var(--ink); font-size: .88rem; font-weight: 650; }
.solo-sale-main-field input { min-height: 50px !important; padding-inline: 14px; font-size: 1rem; }
.solo-sale-main-field small, .solo-sale-section-help { color: var(--muted); font-size: .78rem; font-weight: 450; line-height: 1.45; }
.solo-sale-secondary-link { display: inline-flex; margin-top: 10px; color: var(--brand); font-size: .79rem; font-weight: 650; }
.solo-sale-section-help { max-width: 680px; margin: -5px 0 16px; }
.solo-sale-items { display: grid; gap: 12px; }
.solo-sale-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 13px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--card);
}
.solo-sale-item > :not([hidden]) { min-width: 0; grid-column: 1 / -1; }
.solo-sale-item.sales-item-row .solo-sale-item-primary > *,
.solo-sale-item.sales-item-row .solo-sale-item-values > *,
.solo-sale-item.sales-item-row .solo-sale-item-details > div > * { grid-column: auto; }
.solo-sale-item .solo-sale-line-total .line-total { grid-column: auto; justify-self: auto; }
.solo-sale-item[hidden] { display: none; }
.solo-sale-item label { min-width: 0; display: grid; gap: 6px; color: var(--ink); font-size: .78rem; font-weight: 650; }
.solo-sale-item-primary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.solo-sale-item-primary input { min-height: 48px !important; font-size: .96rem; }
.remove-sale-item { min-height: 44px; padding: 9px 11px; color: var(--muted); background: transparent; border: 1px solid var(--line); font-size: .78rem; font-weight: 600; }
.remove-sale-item:hover { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 42%, var(--line)); background: color-mix(in srgb, var(--danger) 7%, var(--card)); }
.remove-sale-item > span { font-size: 1.15rem; line-height: .7; }
.solo-sale-item-values { display: grid; grid-template-columns: minmax(90px, .45fr) minmax(130px, .7fr) minmax(150px, .8fr) minmax(150px, 1fr); gap: 12px; align-items: end; }
.solo-sale-item-values input { min-height: 44px; }
.solo-sale-discount-control { min-width: 0; display: grid; grid-template-columns: 62px minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.solo-sale-discount-control:focus-within { outline: 2px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 1px; border-color: var(--brand); }
.solo-sale-discount-control :is(select, input) { width: 100%; min-width: 0; min-height: 44px; border: 0 !important; border-radius: 0 !important; outline: 0 !important; background: transparent !important; box-shadow: none !important; }
.solo-sale-discount-control select { padding-inline: 10px 4px; color: var(--ink); border-right: 1px solid var(--line) !important; font-weight: 650; }
.solo-sale-discount-control input { padding-inline: 10px !important; font-variant-numeric: tabular-nums; }
.solo-sale-line-total { min-height: 44px; display: grid; align-content: center; justify-items: end; gap: 2px; padding: 6px 11px; border-left: 1px solid var(--line); }
.solo-sale-line-total span { color: var(--muted); font-size: .68rem; letter-spacing: .035em; text-transform: uppercase; }
.solo-sale-line-total strong { color: var(--ink); font-size: 1.08rem; font-variant-numeric: tabular-nums; }
.solo-sale-item-details { border-top: 1px solid var(--line); }
.solo-sale-item-details > summary { padding-top: 11px; cursor: pointer; color: var(--brand); font-size: .76rem; font-weight: 650; list-style-position: inside; }
.solo-sale-item-details > div { display: grid; grid-template-columns: minmax(150px, .55fr) minmax(220px, 1.4fr) minmax(90px, .4fr); gap: 12px; padding-top: 13px; }
.solo-sale-item.sales-item-row .solo-sale-item-details > div > .service-save-action { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.service-save-action .button { min-height: var(--control-target); }
.service-save-state { color: var(--muted); font-size: .74rem; }
.solo-sale-summary { width: min(100%, 470px); display: grid; gap: 13px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.solo-sale-order-discount { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(170px, 220px); gap: 8px 14px; align-items: center; color: var(--ink); font-size: .78rem; font-weight: 650; }
.solo-sale-order-discount > .field-error { grid-column: 1 / -1; }
.solo-sale-calculation, .solo-sale-review-calculation { display: grid; gap: 7px; margin: 0; font-variant-numeric: tabular-nums; }
.solo-sale-calculation > div, .solo-sale-review-calculation > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.solo-sale-calculation :is(dt, dd), .solo-sale-review-calculation :is(dt, dd) { margin: 0; }
.solo-sale-calculation dt, .solo-sale-review-calculation dt { color: var(--muted); font-size: .74rem; }
.solo-sale-calculation dd, .solo-sale-review-calculation dd { color: var(--ink); font-size: .91rem; font-weight: 650; }
.solo-sale-calculation .solo-sale-final-total, .solo-sale-review-total { margin-top: 3px; padding-top: 9px; border-top: 1px solid var(--line); }
.solo-sale-calculation .solo-sale-final-total dt, .solo-sale-review-total dt { color: var(--ink); font-size: .78rem; font-weight: 650; }
.solo-sale-calculation .solo-sale-final-total dd, .solo-sale-review-total dd { font-size: clamp(1.45rem, 3vw, 1.8rem); line-height: 1.1; }
.solo-sale-form .sales-items-footer .add-quote-item { white-space: nowrap; }
.solo-sale-fulfillment-grid { display: grid; grid-template-columns: minmax(180px, 280px) minmax(180px, 280px); gap: 14px; }
.solo-sale-fulfillment-grid > label { display: grid; gap: 7px; color: var(--ink); font-size: .82rem; font-weight: 650; }
.solo-sale-fulfillment-grid small { color: var(--muted); font-size: .72rem; font-weight: 450; }
.solo-sale-fulfillment-grid [hidden] { display: none; }
.solo-sale-consequence { margin: 18px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.solo-sale-actions { align-items: center; padding-top: 18px; border-top: 1px solid var(--line); }
.solo-sale-actions .primary { min-width: 180px; }
.solo-sale-dialog { width: min(560px, calc(100% - 28px)); max-height: min(780px, calc(100vh - 28px)); padding: 0; overflow: hidden; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: 0 24px 80px #0007; }
.solo-sale-dialog::backdrop { background: #07101dcc; backdrop-filter: blur(2px); }
.solo-sale-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 19px 20px; border-bottom: 1px solid var(--line); }
.solo-sale-dialog-head :is(p, h2) { margin: 0; }
.solo-sale-dialog-close { min-width: var(--control-target); min-height: var(--control-target); padding: 0; color: var(--muted); background: transparent; border: 1px solid var(--line); font-size: 1.35rem; }
.solo-sale-dialog-body { display: grid; gap: 18px; max-height: calc(100vh - 220px); padding: 20px; overflow-y: auto; }
.solo-sale-dialog-body :is(h3, p) { margin: 0; }
.solo-sale-dialog-body > p { color: var(--muted); font-size: .8rem; line-height: 1.5; }
.solo-sale-dialog-body .solo-sale-review-choice { padding: 11px 12px; color: var(--ink); background: var(--surface-soft); border-left: 3px solid var(--brand); border-radius: var(--radius-sm); }
.solo-sale-review-choice strong { display: block; margin-bottom: 2px; }
.solo-sale-review-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; }
.solo-sale-review-facts > div { display: grid; gap: 3px; padding: 11px; background: var(--surface-soft); border-radius: var(--radius-sm); }
.solo-sale-review-facts dt { color: var(--muted); font-size: .7rem; text-transform: uppercase; }
.solo-sale-review-facts dd { margin: 0; font-weight: 650; }
.solo-sale-review-items { display: grid; gap: 8px; margin: 9px 0 0; padding: 0; list-style: none; }
.solo-sale-review-items li { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .84rem; }
.solo-sale-review-total { display: flex; align-items: end; justify-content: space-between; gap: 15px; padding-top: 14px; border-top: 1px solid var(--line); }
.solo-sale-review-total span { color: var(--muted); }
.solo-sale-review-total strong { font-size: 1.65rem; font-variant-numeric: tabular-nums; }
.solo-sale-dialog-actions { display: grid; grid-template-columns: auto auto auto; justify-content: end; gap: 9px; padding: 15px 20px; border-top: 1px solid var(--line); background: var(--surface-soft); }
.commercial-progress-simple { grid-template-columns: repeat(3, 1fr); max-width: 760px; margin-inline: auto; }

@media (max-width: 820px) {
  .solo-sale-form .sales-items-footer { align-items: stretch; flex-direction: column; }
  .solo-sale-form .sales-items-footer .add-quote-item { width: fit-content; }
  .solo-sale-form .solo-sale-summary { width: 100%; }
}

@media (max-width: 760px) {
  .commercial-progress-simple strong { display: block; }
}

@media (max-width: 720px) {
  .solo-sale-heading { margin-bottom: 16px; }
  .solo-sale-heading h1 { font-size: 1.85rem; }
  .solo-sale-form { margin-inline: -10px; padding: 17px 14px 12px; border-radius: 14px; }
  .solo-sale-form .sales-form-section { padding: 22px 0; }
  .solo-sale-item { padding: 13px; }
  .solo-sale-item-primary { grid-template-columns: minmax(0, 1fr); }
  .remove-sale-item { width: fit-content; min-height: 44px; justify-self: end; }
  .solo-sale-item-values { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
  .quick-checkout-form .solo-sale-item-values { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
  .solo-sale-discount-field { grid-column: 1 / -1 !important; }
  .solo-sale-line-total { grid-column: 1 / -1; min-height: 52px; justify-items: start; padding: 8px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .solo-sale-summary { width: 100%; }
  .solo-sale-order-discount { grid-template-columns: 1fr; }
  .solo-sale-item-details > div, .solo-sale-fulfillment-grid { grid-template-columns: 1fr; }
  .solo-sale-actions { position: sticky; z-index: 6; bottom: 0; margin: 18px -14px -12px; padding: 12px 14px; background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(10px); }
  .solo-sale-actions > * { min-height: 48px; }
  .solo-sale-dialog-body { max-height: calc(100vh - 210px); }
  .solo-sale-review-facts { grid-template-columns: 1fr; }
  .solo-sale-dialog-actions { display: grid; grid-template-columns: 1fr; }
  .solo-sale-dialog-actions > * { width: 100%; min-height: 48px; }
}

@media (max-width: 900px) and (min-width: 721px) {
  .solo-sale-dialog-actions { grid-template-columns: 1fr 1fr; }
  .solo-sale-dialog-actions > :first-child { grid-column: 1 / -1; }
}

/* Developer workbench */
.dev-workbench-heading { align-items: end; }
.dev-workbench-heading h1 { max-width: 760px; }
.dev-workbench-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dev-workbench-summary .summary-card { min-height: 132px; justify-content: space-between; border-top: 1px solid var(--line); }
.dev-workbench-summary .summary-card strong { font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1; }
.dev-workbench-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin: 18px 0; }
.dev-support-active { display: flex; align-items: center; justify-content: space-between; gap: 24px; border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.dev-support-active > div:first-child { display: grid; gap: 6px; }
.dev-support-active :is(h2, p) { margin: 0; }
.dev-beta-card, .dev-attention-card { min-height: 260px; }
.dev-beta-card .page-heading { align-items: start; margin-bottom: 24px; }
.dev-beta-track { height: 12px; overflow: hidden; margin: 10px 0 16px; border-radius: 99px; background: var(--surface-soft); border: 1px solid var(--line); }
.dev-beta-track span { display: block; height: 100%; min-width: 2px; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--success)); }
.dev-attention-list, .dev-feedback-list, .dev-history-list { display: grid; gap: 10px; }
.dev-attention-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 13px 14px; border: 1px solid var(--line); border-left: 3px solid var(--muted); border-radius: 11px; background: var(--surface-soft); }
.dev-attention-item.warning { border-left-color: var(--warning); }
.dev-attention-item.danger { border-left-color: var(--danger); }
.dev-attention-item > span, .dev-attention-empty { display: grid; gap: 4px; }
.dev-attention-item small, .dev-attention-empty small { color: var(--muted); }
.dev-attention-item b { font-size: 1.4rem; }
.dev-attention-empty { min-height: 130px; place-content: center; padding: 18px; border: 1px dashed var(--line); border-radius: 12px; text-align: center; }
.dev-company-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.dev-company-card { display: grid; gap: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.dev-company-card header { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; align-items: center; }
.dev-company-card header > span:last-child { display: grid; min-width: 0; gap: 3px; }
.dev-company-card header :is(strong, small) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dev-company-card header small { color: var(--muted); }
.dev-company-avatar { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; color: #fff; background: linear-gradient(145deg, var(--brand), #735dd7); font-weight: 850; }
.dev-company-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.dev-company-facts span { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.dev-company-facts b { font-size: 1.1rem; }
.dev-company-facts small { color: var(--muted); }
.dev-company-card form { align-content: end; }
.dev-feedback-item { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.dev-feedback-item header { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.dev-feedback-item header > span:first-child { display: grid; gap: 3px; }
.dev-feedback-item header small, .dev-feedback-item > small { color: var(--muted); }
.dev-feedback-item p { margin: 0; line-height: 1.5; }
.dev-feedback-item .quick-links { justify-content: flex-start; }
.dev-feedback-item button { min-height: var(--control-target); }
.dev-technical-details { margin-top: 18px; }
.dev-technical-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; cursor: pointer; list-style: none; }
.dev-technical-details > summary::-webkit-details-marker { display: none; }
.dev-technical-details > summary span { display: grid; gap: 4px; }
.dev-technical-details > summary small { color: var(--muted); }
.dev-technical-details[open] > summary { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.dev-technical-grid { display: grid; grid-template-columns: minmax(280px, .75fr) minmax(0, 1.25fr); gap: 26px; padding-top: 20px; }
.dev-parameter-list { display: grid; gap: 0; margin: 0; }
.dev-parameter-list div { display: grid; grid-template-columns: minmax(120px, .8fr) minmax(0, 1.2fr); gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.dev-parameter-list dt { color: var(--muted); }
.dev-parameter-list dd { margin: 0; text-align: right; }
.dev-history-list p { display: flex; align-items: start; justify-content: space-between; gap: 14px; margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); }
.dev-history-list p span { display: grid; gap: 3px; }
.dev-history-list p small { color: var(--muted); }
.dev-history-list time { color: var(--muted); white-space: nowrap; }
.dev-history-item { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.dev-history-item > span { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.dev-history-item small { color: var(--muted); }

.central-navigation { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.central-navigation a { min-height: 44px; display: inline-flex; align-items: center; padding: 9px 14px; color: var(--muted); border: 1px solid var(--line); border-radius: 10px; text-decoration: none; }
.central-navigation a[aria-current="page"] { color: var(--ink); border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); background: color-mix(in srgb, var(--brand) 12%, var(--card)); }
.central-account-workspace { display: grid; gap: 18px; }
.central-account-filters { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(190px, .35fr) auto; gap: 12px; align-items: end; }
.central-account-filters label { display: grid; gap: 7px; min-width: 0; }
.central-account-filters button { min-height: var(--control-target); }
.central-account-table-wrap { width: 100%; max-width: 100%; overflow: visible; }
.central-account-table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.central-account-table th, .central-account-table td { padding: 13px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; overflow-wrap: anywhere; }
.central-account-table th { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.central-account-table th:first-child { width: 24%; }
.central-account-table th:nth-child(2) { width: 20%; }
.central-account-table th:nth-child(3) { width: 16%; }
.central-account-table th:nth-child(4) { width: 16%; }
.central-account-table th:nth-child(5) { width: 8%; }
.central-account-table th:last-child { width: 16%; text-align: right; }
.central-account-table td:last-child { text-align: right; }
.central-account-table td > :is(strong, small) { display: block; min-width: 0; }
.central-account-table td > small { margin-top: 4px; color: var(--muted); }
.central-account-table td .button { width: 100%; min-width: 0; justify-content: center; white-space: normal; }
.central-account-table .empty { min-height: 120px; display: grid; place-content: center; gap: 4px; text-align: center; }
.central-account-table .empty small { color: var(--muted); }
.central-account-detail-page, .central-action-page { display: grid; gap: 20px; }
.central-account-facts dl, .central-action-summary dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 18px 0 0; }
.central-account-facts dl div, .central-action-summary dl div { min-width: 0; padding: 12px 0; border-bottom: 1px solid var(--line); }
.central-account-facts dt, .central-action-summary dt { color: var(--muted); font-size: .84rem; }
.central-account-facts dd, .central-action-summary dd { margin: 4px 0 0; overflow-wrap: anywhere; }
.central-account-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.central-account-action-grid > a { min-height: 116px; display: grid; align-content: center; gap: 7px; padding: 16px; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; background: var(--card); text-decoration: none; }
.central-account-action-grid > a span { color: var(--muted); line-height: 1.45; }
.central-account-action-grid > a.is-danger { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.central-action-summary { max-width: 760px; }
.central-action-form { width: min(760px, 100%); display: grid; gap: 10px; }
.central-action-form textarea { width: 100%; }
.central-action-form .checkbox-row { margin-top: 8px; }
.dev-company-card.is-archived { opacity: .82; border-style: dashed; }
.central-security-attention { margin-bottom: 18px; }

@media (max-width: 1050px) {
  .dev-workbench-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dev-workbench-grid, .dev-technical-grid { grid-template-columns: 1fr; }
  .central-account-table th:nth-child(4), .central-account-table td:nth-child(4),
  .central-account-table th:nth-child(5), .central-account-table td:nth-child(5) { display: none; }
  .central-account-table th:first-child { width: 30%; }
  .central-account-table th:nth-child(2) { width: 26%; }
  .central-account-table th:nth-child(3) { width: 20%; }
  .central-account-table th:last-child { width: 24%; }
}

@media (max-width: 700px) {
  .dev-workbench-heading, .dev-support-active { align-items: stretch; flex-direction: column; }
  .dev-workbench-summary, .dev-company-grid { grid-template-columns: 1fr; }
  .dev-workbench-summary .summary-card { min-height: 112px; }
  .dev-company-card { padding: 14px; }
  .dev-technical-details > summary, .dev-feedback-item header { align-items: flex-start; flex-direction: column; }
  .dev-parameter-list div { grid-template-columns: 1fr; gap: 4px; }
  .dev-parameter-list dd { text-align: left; }
  .central-navigation a { flex: 1 1 calc(50% - 8px); justify-content: center; text-align: center; }
  .central-account-filters { grid-template-columns: 1fr; }
  .central-account-filters button { width: 100%; }
  .central-account-table th:nth-child(2), .central-account-table td:nth-child(2),
  .central-account-table th:nth-child(3), .central-account-table td:nth-child(3) { display: none; }
  .central-account-table th:first-child { width: 62%; }
  .central-account-table th:last-child { width: 38%; }
  .central-account-table th, .central-account-table td { padding: 12px 8px; }
  .central-account-facts dl, .central-action-summary dl, .central-account-action-grid { grid-template-columns: 1fr; }
  .central-account-action-grid > a { min-height: 104px; }
  .central-action-form .canonical-actions { grid-template-columns: 1fr; }
  .central-action-form .canonical-actions > * { width: 100%; }
}

/* Public legal pages and signup consent */
.signup-legal-consent { grid-template-columns: 22px minmax(0, 1fr); align-items: start; gap: 10px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
body.app-authenticated .recurring-legal-consent a { text-decoration: underline; text-underline-offset: .16em; }
.signup-legal-consent input { width: 18px; height: 18px; margin-top: 2px; }
.signup-legal-consent > span { line-height: 1.45; }
.access-checkbox-field .signup-legal-consent a { color: var(--access-ink); text-decoration: underline; text-underline-offset: .16em; }
.signup-legal-consent .field-error { grid-column: 2; }
.legal-document { width: min(820px, calc(100% - 32px)); display: grid; gap: 0; margin: 42px auto 80px; color: var(--ink); }
.legal-document > header { padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.legal-document .eyebrow { color: var(--muted); }
.legal-document a:not(.btn) { color: var(--ink); text-decoration: underline; text-underline-offset: .18em; }
.legal-document > header h1 { max-width: 700px; margin: 6px 0 12px; font-size: clamp(2.2rem, 6vw, 4.4rem); line-height: 1.02; }
.legal-document > header > p:last-child, .legal-document section p, .legal-document footer p { color: var(--muted); line-height: 1.7; }
.legal-document section { display: grid; gap: 8px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.legal-document section h2 { margin: 0; font-size: 1.05rem; }
.legal-document section p { margin: 0; }
.legal-document footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 28px; }
.legal-document footer p { margin: 0; }
@media (max-width: 650px) {
  .legal-document { width: min(100% - 24px, 820px); margin-top: 24px; }
  .legal-document footer { align-items: stretch; flex-direction: column; }
  .legal-document footer a { text-align: center; }
}

/* Access and onboarding shell: one calm surface, independent from app state. */
.access-page {
  --access-paper: #f4f7fb;
  --access-card: #ffffff;
  --access-ink: #102035;
  --access-muted: #5b6b80;
  --access-line: #dbe4ef;
  --access-soft: #edf3fa;
  min-width: 0;
  min-height: 100dvh;
  color: var(--access-ink);
  background: var(--access-paper);
}
.access-page > .page { width: 100%; max-width: none; margin: 0; overflow: visible; }
.skip-link { position: fixed; z-index: 200; top: 10px; left: 10px; min-height: var(--control-target); display: inline-flex; align-items: center; padding: 9px 13px; border-radius: 9px; color: var(--on-action); background: var(--action-primary); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.access-shell { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; }
.access-shell.has-messages { grid-template-rows: auto auto 1fr auto; }
.access-shell > .messages { width: min(100% - 40px, 900px); margin: 18px auto 0; }
.access-header,
.access-footer { width: min(100% - 40px, 1180px); margin-inline: auto; }
.access-header { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--access-line); }
.access-brand { min-height: var(--control-target); display: inline-flex; align-items: center; gap: 10px; color: var(--access-ink); font-size: 1rem; font-weight: 850; letter-spacing: .02em; text-decoration: none; }
.access-brand .brand-mark { width: 36px; height: 36px; color: #fff; background: var(--action-primary); border-radius: 10px; }
.access-header-action { min-height: var(--control-target); display: inline-flex; align-items: center; color: var(--access-muted); font-size: .9rem; font-weight: 700; }
.access-main { width: min(100% - 40px, 1180px); display: grid; place-items: start center; align-content: center; margin-inline: auto; padding-block: clamp(30px, 7vw, 76px); }
.access-card { width: min(100%, 520px); margin: 0; padding: clamp(28px, 5vw, 46px); border: 1px solid var(--access-line); border-radius: 20px; background: var(--access-card); box-shadow: 0 22px 64px rgba(24, 45, 75, .08); }
.access-card-wide { width: min(100%, 900px); }
.access-card-onboarding { width: min(100%, 1120px); }
.access-card .eyebrow { margin-bottom: 13px; color: var(--action-primary); font-size: .74rem; }
.access-card h1 { max-width: 17ch; margin: 0; color: var(--access-ink); font-size: clamp(2.2rem, 6vw, 3.65rem); line-height: 1.02; letter-spacing: -.04em; }
.access-card-wide h1,
.access-card-onboarding h1 { max-width: 22ch; }
.access-card > .muted,
.access-intro > .muted { max-width: 62ch; margin: 16px 0 0; color: var(--access-muted); font-size: .98rem; line-height: 1.65; }
.access-form { display: grid; gap: 18px; margin-top: 30px; }
.access-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.access-field { min-width: 0; display: grid; align-content: start; gap: 7px; color: var(--access-ink, var(--ink)); font-weight: 720; }
.access-field-wide,
.access-field.field-wide { grid-column: 1 / -1; }
.access-field :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea),
.access-form > :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) { width: 100%; min-height: var(--control-target); padding: 12px 13px; border: 1px solid var(--access-line, var(--line)); border-radius: 10px; color: var(--access-ink, var(--ink)); background: var(--access-soft, var(--surface-strong)); font: inherit; font-weight: 400; }
.access-field :is(input, select, textarea):focus-visible { outline: 3px solid color-mix(in srgb, var(--action-primary) 28%, transparent); outline-offset: 1px; border-color: var(--action-primary); }
.access-field :is(input, select, textarea)[aria-invalid="true"] { border-color: var(--danger); }
.access-help { color: var(--access-muted, var(--muted)); font-size: .82rem; font-weight: 500; line-height: 1.5; }
.access-error { color: var(--state-danger-text); font-size: .84rem; font-weight: 650; line-height: 1.45; }
.access-alert { margin-top: 22px; padding: 13px 14px; border: 1px solid color-mix(in srgb, var(--state-danger-text) 38%, var(--access-line)); border-radius: 10px; color: var(--state-danger-text); background: var(--state-danger-surface); line-height: 1.5; }
.access-checkbox-field .signup-legal-consent { display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: start; gap: 8px; min-height: var(--control-target); padding: 14px; border: 1px solid var(--access-line); border-radius: 11px; background: var(--access-soft); }
.access-checkbox-field input.access-checkbox { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--action-primary); }
.access-checkbox-field .signup-legal-consent > span { color: var(--access-ink); font-size: .9rem; font-weight: 550; line-height: 1.5; }
.access-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.access-actions > :is(button, .button) { min-height: var(--control-target); }
.access-actions .primary { min-width: 180px; }
.access-card:not(.access-card-wide):not(.access-card-onboarding) .access-actions .primary { width: 100%; }
.access-card .setup-link { color: var(--access-muted); line-height: 1.5; }
.access-links { display: grid; gap: 10px; margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--access-line); color: var(--access-muted); text-align: center; line-height: 1.5; }
.access-preview { margin: 24px 0 0; padding: 16px; border: 1px solid var(--access-line); border-radius: 12px; background: var(--access-soft); }
.access-error-summary { margin: 22px 0 0; border: 1px solid color-mix(in srgb, var(--state-danger-text) 38%, var(--access-line)); color: var(--state-danger-text); background: var(--state-danger-surface); }
.access-error-summary p { margin: 0; }
.access-error-summary a { display: inline-flex; align-items: center; min-height: 44px; color: inherit; text-decoration: underline; text-underline-offset: .16em; }
.access-error-summary:focus,
.access-error-summary a:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
.access-preview code,
.access-preview strong,
.access-identifier { overflow-wrap: anywhere; word-break: break-word; }
.access-footer { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 16px; border-top: 1px solid var(--access-line); color: var(--access-muted); font-size: .82rem; }
.access-footer nav { display: flex; flex-wrap: wrap; gap: 14px; }
.access-footer a { color: inherit; }

html[data-theme="dark"] .access-page {
  --access-paper: #090e16;
  --access-card: #111a28;
  --access-ink: #f4f7fb;
  --access-muted: #adbacd;
  --access-line: #2a394d;
  --access-soft: #172234;
  color-scheme: dark;
}
html[data-theme="dark"] .access-card { box-shadow: none; }
html[data-theme="dark"] .access-card .eyebrow { color: #79adff; }

@media (max-width: 700px) {
  .access-header,
  .access-main,
  .access-footer { width: min(100% - 28px, 1180px); }
  .access-shell > .messages { width: min(100% - 28px, 900px); margin-top: 14px; }
  .access-header { min-height: 66px; }
  .access-header-action { font-size: .82rem; }
  .access-main { align-content: start; padding-block: 24px 38px; }
  .access-card { padding: 28px 22px; border-radius: 16px; }
  .access-card h1 { font-size: clamp(2rem, 11vw, 3rem); }
  .access-form-grid { grid-template-columns: 1fr; }
  .access-field-wide { grid-column: auto; }
  .access-actions { align-items: stretch; flex-direction: column-reverse; }
  .access-actions > :is(button, .button) { width: 100%; }
  .access-footer { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 360px) {
  .access-main { width: calc(100% - 16px); }
  .access-card { padding-inline: 16px; }
  .access-page .access-card .access-field select { padding-inline: 10px; }
}

/* Public landing v5 - one visual language, built around clarity and action. */
.landing-v5 {
  --lv5-ink: #0b1728;
  --lv5-muted: #526174;
  --lv5-line: #dbe3ec;
  --lv5-paper: #f5f7fa;
  --lv5-blue: #1769e0;
  --lv5-blue-deep: #0c4fb5;
  --lv5-blue-soft: #eaf2ff;
  --lv5-night: #081321;
  color: var(--lv5-ink);
  background: #fff;
  font-size: 16px;
  overflow: clip;
}

.app-public .page:has(.landing-v5) {
  width: 100%;
  max-width: none;
  padding: 0;
}

.app-public .public-topbar {
  min-height: 72px;
  padding-inline: max(28px, calc((100vw - 1380px) / 2));
  border-bottom: 1px solid #e3e9f0;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(18px);
}

.app-public .public-topbar .brand-word,
.app-public .public-nav a { color: #102035; }
.app-public .public-topbar .public-cta { color: #fff; }
.app-public .public-nav-guide { color: var(--lv5-blue) !important; }

.landing-v5 .eyebrow {
  margin: 0 0 17px;
  color: var(--lv5-blue);
  font-size: .72rem;
  font-weight: 760;
  letter-spacing: .18em;
  line-height: 1.4;
}

.landing-v5 h1,
.landing-v5 h2,
.landing-v5 h3,
.landing-v5 p { margin-top: 0; }
.landing-v5 h1,
.landing-v5 h2 { letter-spacing: -.045em; }
.landing-v5 h2 { font-size: clamp(2.25rem, 4.4vw, 4.65rem); line-height: .99; }
.landing-v5 p { line-height: 1.68; }
.landing-v5 a { text-underline-offset: 4px; }
.landing-v5 .button { min-height: 48px; border-radius: 4px; padding-inline: 20px; }
.landing-v5 .button.primary { border-color: var(--lv5-blue); background: var(--lv5-blue); color: #fff; }
.landing-v5 .button.primary:hover { border-color: var(--lv5-blue-deep); background: var(--lv5-blue-deep); }

.landing-v5-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(430px, .9fr) minmax(520px, 1.1fr);
  gap: clamp(42px, 5vw, 82px);
  align-items: center;
  width: min(1380px, calc(100% - 64px));
  min-height: 720px;
  margin: 0 auto;
  padding: 76px 0 96px;
}

.landing-v5-hero::before {
  position: absolute;
  z-index: 0;
  right: -29vw;
  top: 7%;
  width: 68vw;
  height: 92%;
  border-radius: 52% 0 0 46% / 32% 0 0 68%;
  background: linear-gradient(145deg, #edf4ff 0%, #f9fbff 73%);
  content: "";
}

.landing-v5-hero-copy,
.landing-v5-hero-stage { position: relative; z-index: 1; }
.landing-v5-hero h1 {
  max-width: 720px;
  margin-bottom: 28px;
  font-size: clamp(3.5rem, 4.8vw, 5.6rem);
  line-height: .93;
}
.landing-v5-hero h1 span { color: var(--lv5-blue); }
.landing-v5-lead { max-width: 640px; margin-bottom: 30px; color: var(--lv5-muted); font-size: clamp(1.05rem, 1.3vw, 1.22rem); }
.landing-v5-actions { display: flex; flex-wrap: wrap; gap: 11px; }
.landing-v5-secondary { border-color: #bdc9d7 !important; background: transparent !important; color: var(--lv5-ink) !important; }
.landing-v5-access-counter { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; align-items: center; max-width: 470px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--lv5-line); }
.landing-v5-access-counter > div:first-child { display: flex; gap: 10px; align-items: center; }
.landing-v5-access-counter strong { color: var(--lv5-blue); font-size: 2.4rem; line-height: .85; letter-spacing: -.07em; }
.landing-v5-access-counter span { color: #536479; font-size: .67rem; font-weight: 700; letter-spacing: .08em; line-height: 1.2; text-transform: uppercase; }
.landing-v5-access-counter p { grid-column: 1 / -1; margin: 1px 0 0; color: #6b7888; font-size: .82rem; line-height: 1.45; }
.landing-v5-access-counter p b { color: #34465c; }

.landing-v5-hero-stage { min-width: 0; padding: 36px 0 42px 24px; }
.landing-v5-product-frame {
  overflow: hidden;
  margin: 0;
  border: 1px solid #cad5e2;
  border-radius: 14px;
  background: #0b1524;
  box-shadow: 0 32px 80px rgba(22, 45, 76, .18), 0 3px 12px rgba(22, 45, 76, .08);
}
.landing-v5-frame-bar {
  display: flex;
  gap: 7px;
  align-items: center;
  min-height: 38px;
  padding: 0 15px;
  color: #75859a;
  background: #f4f7fa;
  font-size: .68rem;
  letter-spacing: .04em;
}
.landing-v5-frame-bar span { width: 7px; height: 7px; border-radius: 50%; background: #bac5d1; }
.landing-v5-frame-bar b { margin-left: auto; font-weight: 650; }
.landing-v5-product-frame img { display: block; width: 100%; height: auto; aspect-ratio: 1280 / 812; object-fit: cover; }
.landing-v5-product-frame img.is-mobile-shot { aspect-ratio: 390 / 844; object-fit: cover; }
.landing-v5-signal {
  position: absolute;
  display: grid;
  gap: 2px;
  width: min(235px, 35%);
  padding: 14px 16px;
  border: 1px solid #d1dce8;
  border-radius: 5px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 16px 36px rgba(24, 51, 85, .12);
}
.landing-v5-signal b { color: var(--lv5-blue); font-size: .75rem; }
.landing-v5-signal span { color: #34455b; font-size: .78rem; line-height: 1.35; }
.landing-v5-signal-one { left: -10px; bottom: 0; }
.landing-v5-signal-two { right: -16px; top: 5px; }

.landing-v5-proof {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(1380px, calc(100% - 64px));
  margin: 0 auto;
  border-block: 1px solid var(--lv5-line);
}
.landing-v5-proof span { padding: 22px 18px; color: #3c4b5f; text-align: center; font-size: .87rem; }
.landing-v5-proof b,
.landing-v5-proof small { display: block; }
.landing-v5-proof b { margin-bottom: 4px; color: var(--lv5-ink); }
.landing-v5-proof small { color: var(--lv5-muted); line-height: 1.35; }
.landing-v5-proof span + span { border-left: 1px solid var(--lv5-line); }

.landing-v5-section { width: min(1240px, calc(100% - 64px)); margin: 0 auto; padding: 138px 0; }
.landing-v5-section-heading { max-width: 920px; }
.landing-v5-section-heading > p:last-child { max-width: 760px; color: var(--lv5-muted); font-size: 1.05rem; }
.landing-v5-heading-split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 80px; max-width: none; align-items: end; }
.landing-v5-heading-split > p:last-child { margin-bottom: 9px; }

.landing-v5-pain { padding-bottom: 130px; }
.landing-v5-day { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr); gap: 70px; margin-top: 70px; }
.landing-v5-day-events { position: relative; display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.landing-v5-day-events::before { position: absolute; left: 91px; top: 16px; bottom: 16px; width: 1px; background: #b8c8dc; content: ""; }
.landing-v5-event { position: relative; display: grid; grid-template-columns: 70px 1fr; gap: 48px; padding: 5px 0 40px; }
.landing-v5-event:last-child { padding-bottom: 5px; }
.landing-v5-event::before { position: absolute; left: 86px; top: 13px; width: 11px; height: 11px; border: 3px solid #fff; border-radius: 50%; background: var(--lv5-blue); box-shadow: 0 0 0 1px var(--lv5-blue); content: ""; }
.landing-v5-event time { color: var(--lv5-blue); font-size: .82rem; font-weight: 760; }
.landing-v5-event b { display: block; margin-bottom: 7px; font-size: 1.05rem; }
.landing-v5-event p { margin-bottom: 0; color: var(--lv5-muted); }
.landing-v5-day-answer { align-self: end; padding: 34px 0 34px 34px; border-left: 4px solid var(--lv5-blue); }
.landing-v5-day-answer strong { display: block; margin-bottom: 10px; font-size: 1.4rem; line-height: 1.15; }
.landing-v5-day-answer p { margin: 0; color: var(--lv5-muted); }

.landing-v5-product { width: 100%; max-width: none; padding-inline: max(32px, calc((100vw - 1240px) / 2)); color: #f6f9ff; background: var(--lv5-night); }
.landing-v5-product .eyebrow { color: #74a9ff; }
.landing-v5-product .landing-v5-section-heading > p:last-child { color: #aebdce; }
.landing-v5-gallery { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; margin-top: 64px; }
.landing-v5-gallery-tabs { display: flex; flex-direction: column; gap: 5px; }
.landing-v5-gallery-tabs button {
  min-height: 54px;
  padding: 0 16px;
  border: 0;
  border-left: 2px solid #25364b;
  border-radius: 0;
  color: #aab8ca;
  background: transparent;
  text-align: left;
  font-weight: 620;
}
.landing-v5-gallery-tabs button:hover { color: #fff; background: #0e2037; }
.landing-v5-gallery-tabs button.is-active { border-left-color: #5b9aff; color: #fff; background: #102641; }
.landing-v5-gallery-stage { min-width: 0; }
.landing-v5-gallery-frame { border-color: #26384d; box-shadow: 0 42px 100px rgba(0, 0, 0, .36); }
.landing-v5-gallery-frame figcaption { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px 20px; align-items: start; padding: 16px 20px; color: #9daec2; background: #0d1b2d; font-size: .84rem; }
.landing-v5-gallery-frame figcaption strong { color: #fff; }
.landing-v5-gallery-frame figcaption a { color: #8ab8ff; white-space: nowrap; }
.landing-v5-gallery-copy { margin: 16px 0 0; color: #9dacbd; font-size: .9rem; }
.landing-v5-module-line { display: grid; grid-template-columns: repeat(6, 1fr); margin-top: 58px; border-block: 1px solid #25364a; }
.landing-v5-module-line span { padding: 18px 8px; color: #8ea0b6; text-align: center; font-size: .82rem; }
.landing-v5-module-line span + span { border-left: 1px solid #25364a; }
.landing-v5-module-line svg { display: block; width: 20px; height: 20px; margin: 0 auto 8px; color: #70a7ff; fill: none; stroke: currentColor; stroke-width: 1.6; }
.landing-v5-module-line b { display: block; }
.landing-v5-current { margin-top: 84px; }
.landing-v5-current-heading { display: grid; grid-template-columns: .6fr 1.4fr; gap: 48px; align-items: end; margin-bottom: 30px; }
.landing-v5-current-heading h3 { max-width: 760px; margin: 0; font-size: clamp(1.75rem, 3vw, 2.8rem); letter-spacing: -.035em; }
.landing-v5-current-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid #25364a; border-left: 1px solid #25364a; }
.landing-v5-current-grid article { min-height: 190px; padding: 27px 24px; border-right: 1px solid #25364a; border-bottom: 1px solid #25364a; }
.landing-v5-current-grid b { display: block; margin-bottom: 10px; color: #fff; }
.landing-v5-current-grid p { margin: 0; color: #9daec2; font-size: .88rem; line-height: 1.55; }
.landing-v5-theme-showcase { display: grid; grid-template-columns: minmax(220px, .34fr) minmax(0, 1fr); gap: 42px; align-items: center; margin-top: 84px; }
.landing-v5-theme-copy h3 { margin: 0 0 14px; color: #fff; font-size: clamp(1.7rem, 2.6vw, 2.6rem); letter-spacing: -.035em; }
.landing-v5-theme-copy p:last-child { margin: 0; color: #9daec2; line-height: 1.6; }
.landing-v5-theme-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.landing-v5-theme-grid .landing-v5-product-frame { min-width: 0; border-color: #26384d; box-shadow: 0 24px 60px rgba(0, 0, 0, .28); }

.landing-v5-how-layout { display: grid; grid-template-columns: 1.15fr .85fr; gap: 88px; margin-top: 65px; }
.landing-v5-steps { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; counter-reset: landing-step; }
.landing-v5-steps li { position: relative; padding: 9px 0 34px 72px; border-left: 1px solid #cbd7e5; counter-increment: landing-step; }
.landing-v5-steps li:last-child { padding-bottom: 9px; }
.landing-v5-steps li::before { position: absolute; left: -19px; top: 0; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #aabbd0; border-radius: 50%; color: var(--lv5-blue); background: #fff; font-size: .8rem; font-weight: 750; content: counter(landing-step, decimal-leading-zero); }
.landing-v5-steps strong { display: block; margin-bottom: 5px; font-size: 1.05rem; }
.landing-v5-steps p,
.landing-v5-steps li span { display: block; margin: 0; color: var(--lv5-muted); line-height: 1.55; }
.landing-v5-guide { padding: 38px; border: 1px solid #b9cce5; border-radius: 5px; background: linear-gradient(145deg, #edf4ff, #f9fbff); }
.landing-v5-guide-mark { display: inline-grid; place-items: center; width: 48px; height: 48px; margin-bottom: 32px; border-radius: 50%; color: #fff; background: var(--lv5-blue); font-size: .74rem; font-weight: 760; }
.landing-v5-guide h3 { margin-bottom: 12px; font-size: 1.7rem; letter-spacing: -.03em; }
.landing-v5-guide p { color: var(--lv5-muted); }
.landing-v5-flow { display: grid; grid-template-columns: repeat(6, 1fr); align-items: center; margin-top: 92px; border-block: 1px solid var(--lv5-line); }
.landing-v5-flow span { position: relative; padding: 24px 18px; color: #3e4e61; text-align: center; font-size: .83rem; }
.landing-v5-flow span:not(:last-child)::after { position: absolute; right: -5px; color: var(--lv5-blue); content: "→"; }

.landing-v5-mobile { width: 100%; max-width: none; padding-inline: max(32px, calc((100vw - 1240px) / 2)); background: var(--lv5-blue-soft); }
.landing-v5-devices { position: relative; display: grid; grid-template-columns: repeat(4, minmax(190px, 250px)); gap: 24px; align-items: end; justify-content: center; margin-top: 70px; }
.landing-v5-device { margin: 0; }
.landing-v5-device > div { overflow: hidden; border: 8px solid #102035; border-radius: 20px; background: #102035; box-shadow: 0 34px 70px rgba(32, 69, 117, .18); }
.landing-v5-device-phone > div { border-width: 7px; border-radius: 30px; }
.landing-v5-device-fold > div { border-width: 6px; border-radius: 24px; }
.landing-v5-device img { display: block; width: 100%; height: auto; aspect-ratio: 390 / 844; object-fit: cover; }
.landing-v5-device figcaption { margin-top: 13px; color: #5e6e81; text-align: center; font-size: .78rem; }
.landing-v5-device figcaption strong,
.landing-v5-device figcaption small { display: block; }
.landing-v5-device figcaption small { margin-top: 3px; color: #718196; }

.landing-v5-audience-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 60px; border: 1px solid var(--lv5-line); background: var(--lv5-line); }
.landing-v5-audience-grid article { min-height: 340px; padding: 42px 36px; background: #fff; }
.landing-v5-audience-grid article:last-child { color: #fff; background: var(--lv5-ink); }
.landing-v5-audience-grid span { display: inline-block; margin-bottom: 66px; color: var(--lv5-blue); font-size: .74rem; font-weight: 760; letter-spacing: .12em; }
.landing-v5-audience-grid article:last-child span { color: #82b4ff; }
.landing-v5-audience-grid h3 { font-size: 1.65rem; letter-spacing: -.03em; }
.landing-v5-audience-grid p { color: var(--lv5-muted); }
.landing-v5-audience-grid article:last-child p { color: #b9c4d2; }
.landing-v5-audience-grid ul { display: grid; gap: 8px; margin: 24px 0 0; padding: 0; list-style: none; }
.landing-v5-audience-grid li { position: relative; padding-left: 16px; color: var(--lv5-muted); font-size: .86rem; }
.landing-v5-audience-grid article:last-child li { color: #c2cedc; }
.landing-v5-audience-grid li::before { position: absolute; left: 0; color: var(--lv5-blue); content: "—"; }

.landing-v5-security { color: #eff5ff; background: var(--lv5-night); }
.landing-v5-security-inner { width: min(1240px, calc(100% - 64px)); margin: 0 auto; padding: 138px 0; }
.landing-v5-security .eyebrow { color: #7db0ff; }
.landing-v5-security .landing-v5-section-heading > p:last-child { color: #aab9ca; }
.landing-v5-security-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 60px; border: 1px solid #273a50; }
.landing-v5-security-grid article { min-height: 190px; padding: 29px; border-right: 1px solid #273a50; border-bottom: 1px solid #273a50; }
.landing-v5-security-grid article:nth-child(3n) { border-right: 0; }
.landing-v5-security-grid article:nth-last-child(-n + 3) { border-bottom: 0; }
.landing-v5-security-grid b { display: block; margin-bottom: 10px; color: #fff; }
.landing-v5-security-grid p { margin: 0; color: #9fafc2; font-size: .91rem; }
.landing-v5-security-basis { margin-top: 28px; border-top: 1px solid #273a50; border-bottom: 1px solid #273a50; }
.landing-v5-security-basis summary { padding: 20px 0; color: #dce7f7; cursor: pointer; font-weight: 650; }
.landing-v5-security-basis div { display: flex; flex-wrap: wrap; gap: 20px; padding: 0 0 22px; }
.landing-v5-security-basis a { color: #86b5ff; }
.landing-v5-security-basis p { margin: 0; color: #aebdd0; }
.landing-v5-security-basis p:first-child { flex: 1 1 520px; }
.landing-v5-security-basis p:last-child { display: flex; flex: 1 1 360px; flex-wrap: wrap; gap: 12px 20px; }
.landing-v5-security-status { margin: 24px 0 0; padding-left: 18px; border-left: 3px solid #4f95ff; color: #aebdd0; }
.landing-v5-security-status strong { color: #fff; }

.landing-v5-about { display: grid; grid-template-columns: .42fr 1fr; gap: 92px; align-items: start; }
.landing-v5-about-mark { position: sticky; top: 110px; color: #d5e0ec; line-height: .82; }
.landing-v5-about-mark span { display: block; font-size: clamp(4.8rem, 10vw, 9rem); font-weight: 800; letter-spacing: -.09em; }
.landing-v5-about-mark b { color: var(--lv5-blue); font-size: 1.15rem; letter-spacing: .5em; }
.landing-v5-about-copy h2 { max-width: 800px; }
.landing-v5-about-copy > p { max-width: 760px; color: var(--lv5-muted); font-size: 1.03rem; }
.landing-v5-values { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 54px; border-top: 1px solid var(--lv5-line); }
.landing-v5-values span { padding: 22px 18px 0 0; }
.landing-v5-values b,
.landing-v5-values small { display: block; }
.landing-v5-values small { margin-top: 5px; color: var(--lv5-muted); line-height: 1.45; }

.landing-v5-faq { display: grid; grid-template-columns: .7fr 1fr; gap: 100px; padding-top: 30px; }
.landing-v5-faq-list { border-top: 1px solid var(--lv5-line); }
.landing-v5-faq-list details { border-bottom: 1px solid var(--lv5-line); }
.landing-v5-faq-list summary { padding: 23px 38px 23px 0; color: var(--lv5-ink); cursor: pointer; font-size: 1rem; font-weight: 670; }
.landing-v5-faq-list p { margin: 0; padding: 0 35px 24px 0; color: var(--lv5-muted); }

.landing-v5-cta { display: grid; grid-template-columns: 1fr auto; gap: 80px; align-items: end; width: min(1380px, calc(100% - 64px)); margin: 0 auto 72px; padding: 74px; color: #fff; background: var(--lv5-blue); }
.landing-v5-cta .eyebrow { color: #dbe9ff; }
.landing-v5-cta h2 { max-width: 880px; margin-bottom: 16px; }
.landing-v5-cta p:last-child { max-width: 760px; margin-bottom: 0; color: #d9e8ff; }
.landing-v5-cta-actions { display: grid; gap: 12px; min-width: 230px; text-align: center; }
.landing-v5-cta .button.primary { border-color: #fff; background: #fff; color: var(--lv5-blue-deep); }
.landing-v5-cta-actions > a:not(.button) { color: #fff; font-size: .88rem; }
.landing-v5-cta-actions > small { color: #d9e8ff; font-size: .76rem; }

.app-public .public-footer {
  padding-inline: max(32px, calc((100vw - 1380px) / 2));
  color: #aab8c8;
  background: #081321;
}
.app-public .public-footer .brand-word,
.app-public .public-footer a { color: #eaf1fa; }

.landing-js .landing-v5 [data-landing-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.landing-js .landing-v5 [data-landing-reveal].is-visible { opacity: 1; transform: none; }

@media (max-width: 1180px) {
  .landing-v5-hero { grid-template-columns: 1fr; min-height: auto; }
  .landing-v5-hero::before { right: -35vw; top: 35%; width: 110vw; height: 65%; }
  .landing-v5-hero-copy { max-width: 820px; }
  .landing-v5-hero-stage { padding-left: 0; }
  .landing-v5-hero h1 { font-size: clamp(3.65rem, 8vw, 6.5rem); }
  .landing-v5-day { grid-template-columns: 1fr .55fr; }
}

@media (max-width: 960px) {
  .app-public .public-nav-link { display: none; }
  .app-public .public-nav-guide { display: inline-flex; }
  .landing-v5-heading-split,
  .landing-v5-day,
  .landing-v5-how-layout,
  .landing-v5-about,
  .landing-v5-faq { grid-template-columns: 1fr; gap: 48px; }
  .landing-v5-gallery { grid-template-columns: 1fr; }
  .landing-v5-gallery-tabs { flex-direction: row; overflow-x: auto; padding-bottom: 7px; }
  .landing-v5-gallery-tabs button { min-width: 130px; border-left: 0; border-bottom: 2px solid #25364b; text-align: center; }
  .landing-v5-gallery-tabs button.is-active { border-bottom-color: #5b9aff; }
  .landing-v5-current-heading { grid-template-columns: 1fr; gap: 10px; }
  .landing-v5-current-grid { grid-template-columns: 1fr 1fr; }
  .landing-v5-theme-showcase { grid-template-columns: 1fr; }
  .landing-v5-audience-grid { grid-template-columns: 1fr; }
  .landing-v5-audience-grid article { min-height: 260px; }
  .landing-v5-audience-grid span { margin-bottom: 32px; }
  .landing-v5-security-grid { grid-template-columns: 1fr 1fr; }
  .landing-v5-security-grid article:nth-child(3n) { border-right: 1px solid #273a50; }
  .landing-v5-security-grid article:nth-child(2n) { border-right: 0; }
  .landing-v5-security-grid article:nth-last-child(-n + 3) { border-bottom: 1px solid #273a50; }
  .landing-v5-security-grid article:nth-last-child(-n + 2) { border-bottom: 0; }
  .landing-v5-about-mark { position: static; }
  .landing-v5-cta { grid-template-columns: 1fr; padding: 54px; }
  .landing-v5-cta-actions { justify-self: start; }
}

@media (max-width: 720px) {
  .app-public .public-topbar { min-height: 64px; padding-inline: 18px; }
  .app-public .public-nav-guide { display: none; }
  .app-public .public-login { padding-inline: 8px; }
  .app-public .public-cta { min-height: var(--control-target); padding-inline: 13px; font-size: .78rem; }
  .landing-v5 { font-size: 15px; }
  .landing-v5-hero,
  .landing-v5-proof,
  .landing-v5-section,
  .landing-v5-security-inner,
  .landing-v5-cta { width: min(100% - 36px, 1240px); }
  .landing-v5-hero { gap: 38px; padding: 58px 0 70px; }
  .landing-v5-hero::before { right: -80vw; top: 39%; width: 180vw; height: 62%; }
  .landing-v5-hero h1 { font-size: clamp(2.85rem, 13.5vw, 4.65rem); }
  .landing-v5-lead { font-size: 1rem; }
  .landing-v5-actions { display: grid; }
  .landing-v5-actions .button { width: 100%; justify-content: center; }
  .landing-v5-hero-stage { padding: 8px 0 55px; }
  .landing-v5-product-frame-hero { border-radius: 8px; }
  .landing-v5-frame-bar { min-height: 32px; }
  .landing-v5-signal { width: 65%; padding: 11px 12px; }
  .landing-v5-signal-one { left: 10px; }
  .landing-v5-signal-two { top: -18px; right: 8px; }
  .landing-v5-proof { grid-template-columns: 1fr 1fr; }
  .landing-v5-proof span:nth-child(3) { border-left: 0; border-top: 1px solid var(--lv5-line); }
  .landing-v5-proof span:nth-child(4) { border-top: 1px solid var(--lv5-line); }
  .landing-v5-section { padding: 92px 0; }
  .landing-v5 h2 { font-size: clamp(2.45rem, 12vw, 4rem); }
  .landing-v5-day { margin-top: 50px; }
  .landing-v5-event { grid-template-columns: 48px 1fr; gap: 34px; }
  .landing-v5-day-events::before { left: 65px; }
  .landing-v5-event::before { left: 60px; }
  .landing-v5-day-answer { padding: 24px 0 24px 24px; }
  .landing-v5-product,
  .landing-v5-mobile { width: 100%; padding-inline: 18px; }
  .landing-v5-gallery { margin-top: 42px; }
  .landing-v5-gallery-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; }
  .landing-v5-gallery-tabs button { min-width: 0; padding-inline: 8px; }
  .landing-v5-gallery-tabs button:not([data-mobile-src]) { display: none; }
  .landing-v5-gallery-frame:has(img.is-mobile-shot) { width: min(100%, 330px); margin-inline: auto; }
  .landing-v5-gallery-frame figcaption { grid-template-columns: 1fr; }
  .landing-v5-gallery-frame figcaption a { justify-self: start; }
  .landing-v5-module-line { grid-template-columns: repeat(3, 1fr); }
  .landing-v5-module-line span:nth-child(4) { border-left: 0; border-top: 1px solid #25364a; }
  .landing-v5-module-line span:nth-child(5),
  .landing-v5-module-line span:nth-child(6) { border-top: 1px solid #25364a; }
  .landing-v5-current { margin-top: 64px; }
  .landing-v5-current-grid { grid-template-columns: 1fr; }
  .landing-v5-current-grid article { min-height: 0; }
  .landing-v5-theme-showcase { margin-top: 64px; }
  .landing-v5-theme-grid { grid-template-columns: 1fr; }
  .landing-v5-guide { padding: 28px 24px; }
  .landing-v5-flow { grid-template-columns: 1fr 1fr; margin-top: 64px; }
  .landing-v5-flow span { border-bottom: 1px solid var(--lv5-line); }
  .landing-v5-flow span:not(:last-child)::after { display: none; }
  .landing-v5-devices { grid-template-columns: repeat(4, minmax(210px, 76vw)); justify-content: start; gap: 18px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; }
  .landing-v5-device { scroll-snap-align: start; }
  .landing-v5-device > div { border-width: 5px; border-radius: 12px; }
  .landing-v5-device-phone > div,
  .landing-v5-device-fold > div { border-width: 4px; border-radius: 18px; }
  .landing-v5-audience-grid article { min-height: 0; padding: 34px 28px; }
  .landing-v5-security-grid { grid-template-columns: 1fr; }
  .landing-v5-security-grid article,
  .landing-v5-security-grid article:nth-child(2n),
  .landing-v5-security-grid article:nth-child(3n),
  .landing-v5-security-grid article:nth-last-child(-n + 2) { min-height: 0; border-right: 0; border-bottom: 1px solid #273a50; }
  .landing-v5-security-grid article:last-child { border-bottom: 0; }
  .landing-v5-security-basis div { display: grid; }
  .landing-v5-values { grid-template-columns: 1fr; }
  .landing-v5-values span { padding-bottom: 16px; }
  .landing-v5-faq { padding-top: 0; }
  .landing-v5-cta { margin-bottom: 36px; padding: 42px 26px; }
  .landing-v5-cta-actions { width: 100%; min-width: 0; }
  .landing-v5-cta-actions .button { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .landing-js .landing-v5 [data-landing-reveal] { opacity: 1; transform: none; transition: none; }
  .landing-v5 * { scroll-behavior: auto !important; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
.signup-conversation { max-width: 860px; }
.signup-human-grid .field-wide { grid-column: 1 / -1; }
.signup-human-grid .password-help { line-height: 1.45; }

.onboarding-discovery { width: min(1120px, 94vw); max-width: none; }
.onboarding-intro { max-width: 850px; margin-bottom: 24px; }
.onboarding-intro h1 { margin: 7px 0 12px; font-size: clamp(2.15rem, 5vw, 3.65rem); line-height: 1.04; letter-spacing: -.035em; }
.onboarding-step,
.onboarding-recommendation,
.onboarding-learning { padding: 22px; border: 1px solid var(--line); border-radius: 16px; }
.onboarding-step-heading { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 17px; }
.onboarding-step-heading > span { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; color: var(--brand); background: color-mix(in srgb, var(--brand) 13%, var(--surface-soft)); font-size: .78rem; font-weight: 750; }
.onboarding-step-heading h2,
.onboarding-learning h2 { margin: 0 0 5px; font-size: 1.15rem; }
.onboarding-step-heading p,
.onboarding-learning p { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.5; }
.discovery-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 0; padding: 0; border: 0; }
.profile-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.work-style-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.discovery-choice,
.discovery-check,
.recommended-module,
.future-feature { position: relative; display: flex; align-items: flex-start; gap: 11px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--card); cursor: pointer; }
.discovery-choice input,
.discovery-check input,
.recommended-module input,
.future-feature input { width: 18px; height: 18px; flex: 0 0 auto; margin: 1px 0 0; accent-color: var(--brand); }
.discovery-choice > span,
.recommended-module > span { display: grid; gap: 4px; min-width: 0; }
.discovery-choice strong,
.recommended-module strong { color: var(--ink); font-size: .84rem; line-height: 1.35; }
.discovery-choice small,
.recommended-module small { color: var(--muted); font-size: .72rem; line-height: 1.45; }
.discovery-choice:has(input:checked),
.discovery-check:has(input:checked),
.recommended-module.is-selected,
.future-feature:has(input:checked) { border-color: color-mix(in srgb, var(--brand) 66%, var(--line)); background: color-mix(in srgb, var(--brand) 7%, var(--card)); }
.discovery-check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; border: 0; }
.discovery-check { align-items: center; color: var(--ink); font-size: .8rem; line-height: 1.4; }
.recommendation-button { margin-top: 16px; }
.onboarding-recommendation { background: color-mix(in srgb, var(--brand) 4%, var(--card)); }
.recommendation-heading { align-items: center; }
.recommended-module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 0 0 10px; padding: 0; border: 0; }
.recommended-module { padding-right: 72px; opacity: .66; }
.recommended-module.is-selected { opacity: 1; }
.recommended-module { cursor: default; }
.discovery-choice small,
.recommended-module small { font-size: .8rem; }
.recommended-module > b { position: absolute; top: 11px; right: 11px; display: none; padding: 3px 6px; border-radius: 999px; color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent); font-size: .72rem; }
.recommended-module.is-selected > b { display: block; }
.onboarding-learning { display: grid; gap: 17px; }
.future-feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; border: 0; }
.future-feature { align-items: center; color: var(--ink); font-size: .79rem; }
.future-feature > span { display: grid; gap: 3px; }
.future-feature small { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.onboarding-notes { display: grid; gap: 7px; }
.onboarding-notes > span { color: var(--ink); font-size: .82rem; font-weight: 650; }
.onboarding-submit { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; border-radius: 14px; background: var(--sidebar-strong); color: var(--sidebar-text); }
.onboarding-submit p { display: grid; gap: 3px; margin: 0; }
.onboarding-submit span { color: var(--sidebar-muted); font-size: .82rem; }
.onboarding-submit button { flex: 0 0 auto; }

.product-discovery-panel { display: grid; gap: 18px; }
.discovery-insights-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.discovery-insights-grid > article { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.discovery-insights-grid h3 { margin: 0 0 11px; font-size: .9rem; }
.discovery-ranking { display: grid; gap: 1px; }
.discovery-ranking p { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; margin: 0; padding: 8px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 68%, transparent); font-size: .76rem; }
.discovery-ranking p:last-child { border-bottom: 0; }
.discovery-ranking span { color: var(--muted); line-height: 1.35; }
.discovery-ranking strong { color: var(--ink); }
.discovery-responses { border-top: 1px solid var(--line); padding-top: 14px; }
.discovery-responses > summary { cursor: pointer; color: var(--ink); font-size: .82rem; font-weight: 650; }
.discovery-responses > .table-wrap { margin-top: 12px; }
.discovery-note-list { display: grid; gap: 8px; margin-top: 12px; }
.discovery-note-list blockquote { margin: 0; padding: 12px 14px; border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--surface-soft); }
.discovery-note-list blockquote p { margin: 0; color: var(--ink); line-height: 1.45; }
.discovery-note-list blockquote footer { margin-top: 5px; color: var(--muted); font-size: .74rem; }

@media (max-width: 760px) {
  .signup-human-grid .field-wide { grid-column: auto; }
  .onboarding-discovery { width: calc(100% - 20px); }
  .onboarding-step,
  .onboarding-recommendation,
  .onboarding-learning { padding: 16px; }
  .discovery-choice-grid,
  .profile-choice-grid,
  .work-style-grid,
  .discovery-check-grid,
  .recommended-module-grid,
  .future-feature-grid,
  .discovery-insights-grid { grid-template-columns: 1fr; }
  .onboarding-submit { align-items: stretch; flex-direction: column; }
  .onboarding-submit button { width: 100%; }
}

/* Suporte nunca pode parecer um acesso comum à empresa. */
.support-mode-banner {
  align-items: center;
  background: color-mix(in srgb, var(--warning, #f4b740) 13%, var(--surface, #101c2d));
  border: 1px solid color-mix(in srgb, var(--warning, #f4b740) 52%, transparent);
  border-radius: 14px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin: 14px clamp(16px, 3vw, 34px) 0;
  padding: 12px 14px;
}
.support-mode-banner span { display: grid; gap: 2px; }
.support-mode-banner strong { color: var(--text, #f5f7fb); }
.support-mode-banner small { color: var(--muted, #aeb9c8); }
@media (max-width: 680px) {
  .support-mode-banner { align-items: stretch; flex-direction: column; }
  .support-mode-banner .button { justify-content: center; width: 100%; }
}

/* Contas precisam continuar legíveis sem rolagem lateral no celular. */
@media (max-width: 760px) {
  .account-table, .permission-table { overflow: visible; border: 0; background: transparent; box-shadow: none; }
  :is(.account-table, .permission-table) :is(table, tbody, tr, td) { display: block; width: 100%; }
  :is(.account-table, .permission-table) thead { display: none; }
  :is(.account-table, .permission-table) tr { margin: 0 0 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--card); }
  :is(.account-table, .permission-table) td { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); white-space: normal; overflow-wrap: anywhere; }
  :is(.account-table, .permission-table) td::before { content: attr(data-label); color: var(--muted); font-size: .7rem; font-weight: 850; line-height: 1.35; text-transform: uppercase; letter-spacing: .04em; }
  :is(.account-table, .permission-table) td:last-child { border-bottom: 0; }
  .account-table code { min-width: 0; font-size: .75rem; overflow-wrap: anywhere; word-break: break-word; }
  .account-table td[data-label="Ações"] { gap: 9px; }
  .account-table td[data-label="Ações"] :is(a, form, button) { min-width: 0; }
  :is(.account-table, .permission-table) td.empty { display: block; }
  :is(.account-table, .permission-table) td.empty::before { display: none; }
}

/* Tabelas do Titanor: a largura acompanha a função da informação, não a posição. */
.app-topbar .command-trigger {
  width: auto;
  min-width: var(--control-target);
  justify-content: center;
}

.table-wrap.table-ergonomic {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--muted) 40%, transparent) transparent;
}

.table-wrap .titanor-table {
  width: 100%;
  min-width: 100%;
  table-layout: auto !important;
  border-collapse: collapse;
  color: var(--ink);
  font-family: "Segoe UI Variable Text", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  font-size: .9rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.45;
}

.table-wrap .titanor-table th {
  padding: 10px 12px;
  color: var(--muted);
  font-size: .69rem;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: normal;
  overflow-wrap: normal;
  word-break: keep-all;
  hyphens: none;
}

.table-wrap .titanor-table td {
  padding: 13px 12px;
  vertical-align: middle;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

.table-wrap .titanor-table td > strong,
.table-wrap .titanor-table td > a > strong {
  font-weight: 550;
}

.table-wrap .titanor-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: .73rem;
  line-height: 1.35;
}

.table-wrap .titanor-table :is(.table-col-id, .table-col-date, .table-col-number, .table-col-money, .table-col-state, .table-col-compact, .table-col-action) {
  width: 1%;
}

.table-wrap .titanor-table .table-col-id {
  min-width: 76px;
  max-width: 150px;
  white-space: nowrap;
  font-size: .84rem;
}

.table-wrap .titanor-table .table-col-id :is(strong, code, a) {
  font-size: inherit;
  font-weight: 450;
}

.table-wrap .titanor-table .table-col-date {
  min-width: 108px;
  white-space: nowrap;
}

.table-wrap .titanor-table .table-col-number {
  min-width: 88px;
  text-align: right;
  white-space: nowrap;
}

.table-wrap .titanor-table .table-col-money {
  min-width: 118px;
  text-align: right;
  white-space: nowrap;
}

.table-wrap .titanor-table .table-col-state {
  min-width: 118px;
  white-space: nowrap;
}

.table-wrap .titanor-table .table-col-state .badge {
  max-width: 100%;
  white-space: normal;
  line-height: 1.2;
}

.table-wrap .titanor-table .table-col-compact {
  min-width: 92px;
}

.table-wrap .titanor-table .table-col-primary {
  min-width: 160px;
}

.table-wrap .titanor-table .table-col-secondary {
  min-width: 118px;
}

.table-wrap .titanor-table .table-col-action {
  min-width: 68px;
  text-align: right;
  white-space: nowrap;
}

.table-wrap .titanor-table .table-col-action-wide {
  min-width: 190px;
  white-space: normal;
}

.table-wrap.cash-table .titanor-table .table-col-action-wide {
  min-width: 230px;
}

.table-wrap .titanor-table .table-col-action :is(a, button, summary) {
  font-size: .82rem;
}

.table-wrap .titanor-table th.table-col-number,
.table-wrap .titanor-table th.table-col-money,
.table-wrap .titanor-table th.table-col-action {
  text-align: right;
}

.table-wrap .titanor-table tr:last-child > td {
  border-bottom: 0;
}

.table-wrap .titanor-table td.table-empty-cell {
  width: auto;
  text-align: center;
}

.table-wrap .titanor-table .table-summary-hidden {
  display: none !important;
}

.table-wrap .titanor-table .table-col-details {
  min-width: 104px;
  text-align: right;
  white-space: nowrap;
}

.table-details-trigger {
  min-height: var(--control-target);
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line));
  border-radius: 9px;
  background: transparent;
  color: var(--accent-strong, var(--accent));
  font: inherit;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
}

.table-details-trigger:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}

.table-details-trigger:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 32%, transparent);
  outline-offset: 2px;
}

.table-state-indicator {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: .72rem;
  font-weight: 800;
  line-height: 1;
}

.table-state-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.table-state-indicator.is-success { color: var(--state-success-text); background: var(--state-success-surface); }
.table-state-indicator.is-info { color: var(--state-info-text); background: var(--state-info-surface); }
.table-state-indicator.is-warning { color: var(--state-warning-text); background: var(--state-warning-surface); }
.table-state-indicator.is-danger { color: var(--state-danger-text); background: var(--state-danger-surface); }
.table-state-indicator.is-neutral { color: var(--muted); background: color-mix(in srgb, var(--muted) 10%, transparent); }

.service-attachments .section-heading {
  margin: 0 0 18px;
  padding: 0;
  border-top: 0;
}

.service-attachments .section-heading > div {
  display: grid;
  align-items: start;
  gap: 4px;
}

.service-attachments .section-heading :is(h2, p) { margin: 0; }

.table-details-dialog {
  width: min(660px, calc(100vw - 32px));
  max-height: min(760px, calc(100dvh - 32px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 28px 80px rgb(0 0 0 / 42%);
}

.table-details-dialog::backdrop {
  background: rgb(2 8 18 / 70%);
  backdrop-filter: blur(3px);
}

.table-details-card {
  display: grid;
  max-height: min(760px, calc(100dvh - 32px));
  overflow: auto;
}

.table-details-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 94%, transparent);
  backdrop-filter: blur(12px);
}

.table-details-header h2 {
  max-width: 48ch;
  margin: 5px 0 0;
  font-size: 1.15rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.table-details-header h2:focus { outline: 0; }
.table-details-close { flex: 0 0 auto; min-height: var(--control-target); }

.table-details-list {
  display: grid;
  grid-template-columns: minmax(120px, .75fr) minmax(0, 1.7fr);
  margin: 0;
  padding: 8px 22px 18px;
}

.table-details-list dt,
.table-details-list dd {
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}

.table-details-list dt {
  padding-right: 18px;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 650;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.table-details-list dd {
  color: var(--ink);
  font-size: .9rem;
  overflow-wrap: anywhere;
}

.table-details-actions {
  padding: 0 22px 22px;
}

.table-details-actions h3 {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: .72rem;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.table-details-actions > div {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
}

.table-details-action-label {
  flex: 0 0 100%;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 650;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.table-details-actions form { min-width: min(100%, 210px); }

.customer-contact-value {
  display: grid;
  justify-items: start;
  gap: 7px;
}

.contact-shortcut {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-target);
  padding: 5px 9px;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line));
  border-radius: 8px;
  color: var(--accent-strong, var(--accent));
  font-size: .76rem;
  font-weight: 600;
  text-decoration: none;
}

/* Standalone system states: must not depend on authenticated context. */
.system-state-page {
  --paper: #f4f7fb;
  --card: #ffffff;
  --surface-soft: #edf2f8;
  --ink: #132033;
  --muted: #5c6b7d;
  --line: #d7e0ea;
  --system-state-accent-text: #246fe5;
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}
.system-state-shell { width: min(100%, 1180px); min-height: 100vh; margin: 0 auto; padding: clamp(18px, 4vw, 42px); }
.system-state-header { min-height: var(--control-target); display: flex; align-items: center; }
.system-state-brand { min-height: var(--control-target); display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 850; letter-spacing: .02em; text-decoration: none; }
.system-state-brand-mark { width: 36px; height: 36px; display: grid; place-items: center; color: #fff; background: var(--action-primary); border-radius: 10px; }
.system-state-main { min-height: calc(100vh - 128px); display: grid; place-items: center; padding-block: 30px; }
.system-state-card { width: min(100%, 620px); padding: clamp(28px, 6vw, 58px); background: var(--card); border: 1px solid var(--line); border-radius: clamp(14px, 2vw, 22px); box-shadow: 0 24px 70px rgba(26, 45, 74, .1); }
.system-state-eyebrow { margin: 0 0 14px; color: var(--system-state-accent-text); font-size: .76rem; font-weight: 850; letter-spacing: .12em; }
.system-state-card h1 { max-width: 15ch; margin: 0; font-size: clamp(2rem, 7vw, 3.7rem); line-height: 1.02; letter-spacing: -.045em; }
.system-state-message { max-width: 52ch; margin: 20px 0 28px; color: var(--muted); font-size: 1rem; line-height: 1.65; }
.system-state-action { width: fit-content; min-height: var(--control-target); display: inline-flex; align-items: center; justify-content: center; padding-inline: 18px; text-decoration: none; }
.system-state-code { margin: 22px 0 0; color: var(--muted); font-size: .74rem; font-variant-numeric: tabular-nums; }

@media (prefers-color-scheme: dark) {
  .system-state-page {
    --paper: #000000;
    --card: #0c0d10;
    --surface-soft: #14161a;
    --ink: #f0f1f3;
    --muted: #a7adb7;
    --line: #292c31;
    --system-state-accent-text: #79adff;
    color-scheme: dark;
  }
  .system-state-card { box-shadow: 0 24px 70px rgba(0, 0, 0, .22); }
}

@media (max-width: 520px) {
  .system-state-shell { padding: 18px; }
  .system-state-main { min-height: calc(100vh - 88px); padding-block: 18px; }
  .system-state-card { padding: 28px 22px; }
  .system-state-action { width: 100%; }
}

.contact-shortcut:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}

@media (max-width: 560px) {
  .table-details-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); border-radius: 15px; }
  .table-details-card { max-height: calc(100dvh - 20px); }
  .table-details-header { align-items: center; padding: 16px; }
  .table-details-header .eyebrow { display: none; }
  .table-details-header h2 { margin: 0; font-size: 1rem; }
  .table-details-list { grid-template-columns: 1fr; padding: 4px 16px 14px; }
  .table-details-list dt { padding: 12px 0 2px; border-bottom: 0; }
  .table-details-list dd { padding: 0 0 12px; }
  .table-details-actions { padding: 0 16px 18px; }
  .table-details-actions > div { display: grid; grid-template-columns: 1fr; }
  .table-details-actions :is(a, button, form) { width: 100%; }
}

.table-wrap .titanor-key-value-table th {
  width: min(42%, 340px);
  color: var(--ink);
  font-size: .82rem;
  letter-spacing: 0;
  text-transform: none;
}

.table-wrap .titanor-key-value-table td {
  color: var(--muted);
}

/* Listas largas viram cartões antes de o conteúdo começar a se espremer. */
@media (max-width: 1180px) {
  .table-wrap.table-ergonomic.table-cards-wide {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .quote-list-table.table-ergonomic .titanor-table td { width: 100%; }

  .table-cards-wide .titanor-table,
  .table-cards-wide .titanor-table tbody {
    display: block;
    width: 100%;
    min-width: 0 !important;
  }

  .table-cards-wide .titanor-table thead {
    display: none;
  }

  .table-cards-wide .titanor-table tbody {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .table-cards-wide .titanor-table tr {
    display: block;
    min-width: 0;
    padding: 13px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--card);
  }

  .table-cards-wide .titanor-table td {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 9px 0 9px 108px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .table-wrap.table-ergonomic.cash-table.table-cards-wide .titanor-table td {
    width: 100%;
    min-width: 0;
    max-width: none;
    white-space: normal;
  }

  .service-order-table.table-ergonomic.table-cards-wide .titanor-table td {
    width: 100%;
    min-width: 0;
    max-width: none;
    white-space: normal;
  }

  .service-items-table.table-ergonomic.table-cards-wide .titanor-table td {
    width: 100%;
    min-width: 0;
    max-width: none;
    white-space: normal;
  }

  .review-materials .table-wrap.table-ergonomic.table-cards-wide .titanor-table td {
    width: 100%;
    min-width: 0;
    max-width: none;
    white-space: normal;
  }

  .table-cards-wide .titanor-table td::before {
    content: attr(data-label);
    position: absolute;
    top: 10px;
    left: 0;
    width: 96px;
    color: var(--muted);
    font-size: .67rem;
    font-weight: 650;
    line-height: 1.3;
    letter-spacing: .04em;
    text-transform: uppercase;
  }

  .table-cards-wide .titanor-table td:last-child {
    border-bottom: 0;
  }

  .table-cards-wide .titanor-table td.table-col-action {
    min-height: 0;
    padding: 11px 0 2px;
    text-align: right;
  }

  .table-cards-wide .titanor-table td.table-col-action::before,
  .table-cards-wide .titanor-table td.table-empty-cell::before {
    display: none;
  }

  .table-cards-wide .titanor-table td.table-empty-cell {
    padding: 18px 4px;
    border-bottom: 0;
  }
}

@media (min-width: 761px) and (max-width: 1050px) {
  .sales-item-row .sales-unit,
  .sales-item-row .sales-quantity { grid-column: span 2; }
  .sales-item-row .sales-price,
  .sales-item-row .sales-discount { grid-column: span 4; }
  .sales-item-row .stock-checkbox { grid-column: span 6; }
  .sales-item-row .line-total { grid-column: span 3; justify-self: end; }
  .sales-item-row .delete-field { grid-column: span 3; }
}

/* No celular, qualquer tabela vira uma sequência legível de registros. */
@media (max-width: 760px) {
  .table-wrap.table-ergonomic {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .table-ergonomic .titanor-table,
  .table-ergonomic .titanor-table tbody {
    display: block;
    width: 100%;
    min-width: 0 !important;
  }

  .table-ergonomic .titanor-table thead {
    display: none;
  }

  .table-ergonomic .titanor-table tbody {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .table-ergonomic .titanor-table tr {
    display: block;
    min-width: 0;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--card);
  }

  .table-ergonomic .titanor-table td {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 39px;
    padding: 9px 0 9px 102px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .table-ergonomic .titanor-table td::before {
    content: attr(data-label);
    position: absolute;
    top: 10px;
    left: 0;
    width: 90px;
    color: var(--muted);
    font-size: .66rem;
    font-weight: 650;
    line-height: 1.3;
    letter-spacing: .04em;
    text-transform: uppercase;
  }

  .table-ergonomic .titanor-table td:last-child {
    border-bottom: 0;
  }

  .table-ergonomic .titanor-table td.table-col-action {
    min-height: 0;
    padding: 11px 0 2px;
    text-align: left;
  }

  .table-ergonomic .titanor-table td.table-col-action::before,
  .table-ergonomic .titanor-table td.table-empty-cell::before {
    display: none;
  }

  .table-ergonomic .titanor-table td.table-col-action :is(a.button, button) {
    width: 100%;
    min-height: var(--control-target);
    justify-content: center;
  }

  .table-ergonomic .titanor-table .inventory-row-action.table-summary-hidden {
    display: block !important;
    width: 100%;
    min-width: 0;
  }

  .table-ergonomic .titanor-table .movement-row-actions.table-summary-hidden {
    display: grid !important;
    width: 100%;
    min-width: 0;
  }

  .table-ergonomic .titanor-table .movement-row-actions.table-summary-hidden > .inline-details > summary {
    display: flex;
    align-items: center;
    min-height: var(--control-target);
  }

  .table-ergonomic .titanor-table td.table-empty-cell {
    padding: 18px 4px;
    border-bottom: 0;
  }

  .table-ergonomic .titanor-key-value-table tbody {
    gap: 10px;
  }

  .table-ergonomic .titanor-key-value-table tr {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .table-ergonomic .titanor-key-value-table th,
  .table-ergonomic .titanor-key-value-table td {
    display: block;
    width: 100%;
    min-height: 0;
    padding: 4px 0;
    border: 0;
    text-align: left;
  }

  .table-ergonomic .titanor-key-value-table td::before {
    display: none;
  }
}

@media print {
  .table-wrap.table-ergonomic { overflow: visible; border: 1px solid var(--line); }
  .table-ergonomic .titanor-table { display: table; }
  .table-ergonomic .titanor-table thead { display: table-header-group; }
  .table-ergonomic .titanor-table tbody { display: table-row-group; }
  .table-ergonomic .titanor-table tr { display: table-row; padding: 0; border: 0; }
  .table-ergonomic .titanor-table td { display: table-cell; width: auto; min-height: 0; padding: 7px; }
  .table-ergonomic .titanor-table td::before { display: none; }
  .table-wrap.table-ergonomic .titanor-table :is(th, td).table-summary-hidden:not(.table-col-action) { display: table-cell !important; }
  .table-wrap.table-ergonomic .titanor-table :is(th, td).table-col-action { display: none !important; }
  .table-details-dialog { display: none !important; }
  .table-state-indicator { display: none !important; }
  .table-state-text {
    position: static !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    clip-path: none !important;
    white-space: normal !important;
  }
}
/* Revisão do dia: uma única fila para dúvidas reais de vendas, serviços e estoque. */
.day-review-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.day-review-summary > div { display: grid; gap: .2rem; padding: 1rem 1.2rem; border-right: 1px solid var(--line); }
.day-review-summary > div:last-child { border-right: 0; }
.day-review-summary strong { font-size: 1.2rem; }
.day-review-summary span { color: var(--muted); font-size: .84rem; }
.day-review-summary .needs-attention { background: color-mix(in srgb, var(--warning) 10%, transparent); }
.day-review-card { display: grid; gap: 1rem; }
.day-review-reason { display: grid; gap: .3rem; margin: 0; padding: .9rem 1rem; border-left: 3px solid var(--warning); background: var(--surface-soft); }
.day-review-reason span { color: var(--muted); }
.day-review-form { display: grid; grid-template-columns: minmax(14rem, 2fr) minmax(8rem, .7fr) auto; gap: .75rem; align-items: end; }
.day-review-form label, .day-review-ignore label { display: grid; gap: .35rem; }
.day-review-actions, .day-review-alternatives { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; }
.day-review-actions form, .day-review-alternatives form { margin: 0; }
.day-review-actions details, .day-review-alternatives details { flex: 1 1 20rem; }
.day-review-actions summary, .day-review-alternatives summary { cursor: pointer; color: var(--accent); }
.day-review-ignore { display: grid; grid-template-columns: minmax(14rem, 1fr) auto; gap: .75rem; align-items: end; margin-top: .75rem; }
@media (max-width: 760px) {
  .day-review-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .day-review-summary > div { align-content: start; padding: .85rem .7rem; border-right: 1px solid var(--line); text-align: center; }
  .day-review-summary > div:last-child { border-right: 0; }
  .day-review-summary strong { font-size: 1.15rem; }
  .day-review-summary span { font-size: .72rem; line-height: 1.35; }
  .day-review-form, .day-review-ignore { grid-template-columns: 1fr; }
  .day-review-form button, .day-review-ignore button, .day-review-actions form, .day-review-actions button,
  .day-review-alternatives form, .day-review-alternatives button { width: 100%; }
}

/* Orçamentos: ações explícitas e leitura compacta sem perder informação. */
.quote-item-row.sales-item-row .sales-price,
.quote-item-row.sales-item-row .sales-discount { grid-column: span 2; }
.quote-item-row.sales-item-row > .quote-remove-item {
  grid-column: span 2;
  align-self: center;
  justify-self: stretch;
}
.quote-item-row.sales-item-row > .line-total {
  grid-column: span 2;
  align-self: center;
  justify-self: end;
}
.customer-form-card .checkbox-row { min-height: var(--control-target); gap: 10px; cursor: pointer; }

@media (min-width: 761px) and (max-width: 1050px) {
  .quote-item-row.sales-item-row .sales-price,
  .quote-item-row.sales-item-row .sales-discount { grid-column: span 4; }
  .quote-item-row.sales-item-row > .quote-remove-item,
  .quote-item-row.sales-item-row > .line-total { grid-column: span 6; }
}

@media (max-width: 760px) {
  .quote-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .quote-metrics article {
    min-width: 0;
    min-height: 72px;
    align-content: start;
    gap: 3px;
    padding: 10px 11px;
  }
  .quote-metrics strong { font-size: 1.25rem; }
  .quote-metrics span {
    min-width: 0;
    font-size: .7rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }
  .quote-item-row.sales-item-row > .quote-remove-item {
    width: fit-content;
    justify-self: end;
  }
}

/*
 * CRUD Final — contrato de precedência.
 * As regras legadas acima ainda reconhecem a classe histórica
 * `table-cards-wide`, mas esta camada final garante uma única tabela
 * semântica em todas as larguras. A adaptação ocorre por prioridade de
 * colunas, nunca por uma segunda apresentação em cartões.
 */
@media (max-width: 1180px) {
  body.app-authenticated .table-wrap.table-ergonomic,
  body.app-authenticated .table-wrap.table-ergonomic.table-cards-wide {
    max-width: 100%;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--card);
    box-shadow: var(--shadow-soft);
  }

  body.app-authenticated .table-ergonomic .titanor-table {
    display: table;
    width: 100%;
    min-width: 0 !important;
    table-layout: fixed !important;
  }
  body.app-authenticated .table-ergonomic .titanor-table thead { display: table-header-group; }
  body.app-authenticated .table-ergonomic .titanor-table tbody { display: table-row-group; }
  body.app-authenticated .table-ergonomic .titanor-table tr {
    display: table-row;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  body.app-authenticated .table-ergonomic .titanor-table :is(th, td) {
    position: static;
    display: table-cell;
    width: auto;
    min-width: 0;
    max-width: none;
    min-height: 0;
    padding: 11px 10px;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
  }
  body.app-authenticated .table-ergonomic .titanor-table td::before { display: none; content: none; }
  body.app-authenticated .table-ergonomic .titanor-table .table-priority-5 { display: none; }
  body.app-authenticated .table-ergonomic .titanor-table .table-col-action { text-align: right; }
  body.app-authenticated .table-ergonomic .titanor-table .table-col-details {
    width: 112px;
    min-width: 112px;
  }
  body.app-authenticated .table-ergonomic .titanor-table .table-action-inline {
    width: min(28%, 240px);
  }
  body.app-authenticated .table-ergonomic .titanor-table td.table-action-inline form {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
  }
  body.app-authenticated .table-ergonomic .titanor-table td.table-action-inline :is(input, select) {
    min-width: 0;
    max-width: 100%;
  }
  body.app-authenticated .table-ergonomic .titanor-table .table-details-trigger {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 960px) {
  body.app-authenticated .table-ergonomic .titanor-table :is(.table-priority-4, .table-priority-5) {
    display: none;
  }
}

@media (max-width: 760px) {
  body.app-authenticated .table-ergonomic .titanor-table :is(.table-priority-3, .table-priority-4, .table-priority-5) {
    display: none;
  }
  body.app-authenticated .table-ergonomic .titanor-table :is(th, td) { padding: 10px 8px; }
  body.app-authenticated .table-ergonomic .titanor-table .table-col-details {
    width: 106px;
    min-width: 106px;
  }
  body.app-authenticated .table-ergonomic .titanor-table .table-col-action :is(a.button, button),
  body.app-authenticated .table-ergonomic .titanor-table .table-details-trigger {
    min-height: var(--control-target);
  }
  body.app-authenticated .table-ergonomic .titanor-key-value-table,
  body.app-authenticated .table-ergonomic .titanor-key-value-table tbody,
  body.app-authenticated .table-ergonomic .titanor-key-value-table tr {
    display: table;
    width: 100%;
  }
  body.app-authenticated .table-ergonomic .titanor-key-value-table tbody { display: table-row-group; }
  body.app-authenticated .table-ergonomic .titanor-key-value-table tr { display: table-row; }
  body.app-authenticated .table-ergonomic .titanor-key-value-table :is(th, td) {
    display: table-cell;
    width: 50%;
  }
}

@media (max-width: 520px) {
  body.app-authenticated .table-ergonomic .titanor-table .table-priority-2 { display: none; }
  body.app-authenticated .table-ergonomic .titanor-table :is(th, td) { padding-inline: 7px; }
  body.app-authenticated .table-ergonomic .titanor-table .table-col-details {
    width: 98px;
    min-width: 98px;
  }
  body.app-authenticated .table-ergonomic .titanor-table .table-action-inline {
    width: 38%;
  }
}

/* Detalhes operacionais: formulários compartilhados encolhem sem empurrar ações. */
.operational-detail-page {
  display: contents;
}

body.app-authenticated :is(.collaboration-panel, .collaboration-actions),
body.app-authenticated :is(.collaboration-panel, .collaboration-actions) > *,
body.app-authenticated :is(.collaboration-panel, .collaboration-actions) .compact-fields,
body.app-authenticated :is(.collaboration-panel, .collaboration-actions) .compact-fields > * {
  min-width: 0;
  max-width: 100%;
}

body.app-authenticated :is(.collaboration-panel, .collaboration-actions) .compact-fields :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
  select,
  textarea
) {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 760px) {
  body.app-authenticated .operational-detail-page .module-overview-heading {
    min-width: 0;
    flex-wrap: wrap;
  }

  body.app-authenticated .operational-detail-page .module-overview-heading > * {
    min-width: 0;
    max-width: 100%;
  }

  body.app-authenticated .operational-detail-page .module-overview-heading > :is(a.button, .canonical-actions) {
    width: 100%;
  }

  body.app-authenticated .operational-detail-page .module-overview-heading .button,
  body.app-authenticated .operational-detail-page .table-priority-responsive .titanor-table td.table-col-details .table-details-trigger {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  body.app-authenticated .collaboration-actions,
  body.app-authenticated :is(.collaboration-panel, .collaboration-actions) .compact-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  body.app-authenticated :is(.collaboration-panel, .collaboration-actions) .compact-fields > button {
    width: 100%;
  }

  body.app-authenticated .message.review-warning {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  body.app-authenticated .message.review-warning > * {
    grid-column: 1;
    min-width: 0;
    max-width: 100%;
  }

  body.app-authenticated .message.review-warning .button {
    grid-row: auto;
    width: 100%;
  }
}

@media (max-width: 760px) {
  .support-center { gap: 16px; }
  .support-search-card,
  .support-suggestion,
  .knowledge-article-heading { grid-template-columns: minmax(0, 1fr); }
  .support-search-card { padding: 17px; }
  .support-search-card > small { grid-column: 1; margin-top: -7px; }
  .support-contact-grid,
  .support-question-list,
  .support-guide-grid,
  .knowledge-related-guides { grid-template-columns: minmax(0, 1fr); }
  .support-section-heading { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .support-guide-grid > a { min-height: 0; }
  .support-suggestion { padding: 17px; }
  .support-suggestion-form .button { width: 100%; justify-content: center; }
  .knowledge-article-heading { align-items: start; }
  .knowledge-article-meta { grid-template-columns: 1fr 1fr; }
  .knowledge-task-section { padding: 17px; }
  .knowledge-help-footer { grid-template-columns: minmax(0, 1fr); }
  .knowledge-help-footer .button { width: 100%; }
}

@media (max-width: 420px) {
  .support-search-control { grid-template-columns: 20px minmax(0, 1fr); padding-right: 12px; }
  .support-search-control .button { grid-column: 1 / -1; width: 100%; margin-bottom: 8px; }
  .support-contact-card { grid-template-columns: 38px minmax(0, 1fr) auto; padding: 14px; }
  .support-contact-icon { width: 38px; height: 38px; }
  .knowledge-article-meta { grid-template-columns: minmax(0, 1fr); }
  .knowledge-task-steps li { grid-template-columns: 32px minmax(0, 1fr); gap: 10px; }
  .knowledge-task-steps li::before { width: 32px; height: 32px; }
}

.member-access-surface .section-heading > div {
  display: block;
  min-width: 0;
}

.personal-email-surface { overflow-wrap: anywhere; }

html[data-theme="light"] main:has(.personal-email-surface, .member-access-surface, .account-table, .audit-event-table, .session-table) {
  --muted: #5c6b80;
  --brand: #1f65d5;
  --accent: #1f65d5;
  --accent-strong: #1f65d5;
}

.session-table .session-device-name { display: block; }
@media (max-width: 520px) {
  body.app-authenticated .session-table.table-ergonomic .titanor-table .table-action-inline { width: 100px; }
  body.app-authenticated .session-table.table-ergonomic .titanor-table .table-col-details { width: 88px; min-width: 88px; }
  .session-table .table-action-inline .button { padding-inline: 6px; overflow-wrap: normal; }
  .session-table .session-device-name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
  }
}

.account-table .titanor-table th:nth-child(2) { width: 24%; }
.account-table td,
.account-table td code,
.audit-event-table td,
.audit-event-table td small {
  white-space: normal;
  overflow-wrap: anywhere;
}
.account-table td[data-label="Ações"] .button {
  min-height: 44px;
  white-space: normal;
  margin-block: 2px;
}

/* Empty lists keep their guidance, without a compressed row of column titles. */
.table-priority-responsive table:has(> tbody > tr:only-child > .table-empty-cell) > thead {
  display: none;
}

.quote-list-table td[data-label="Orçamento"] > small {
  display: block;
}

.finance-core-entries td[data-label="Ações"] > a {
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin-block: 4px;
  white-space: normal;
}

[data-v1-canonical-page="sales"] .canonical-work-row > span > small {
  display: block;
}

body.app-authenticated .central-account-workspace .pagination > a {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.break-long-reference { overflow-wrap: anywhere; }
