:root {
  color-scheme: light;
  --brand-ink: #102033;
  --brand-blue: #2672e3;
  --brand-teal: #13a88a;
  --brand-mist: #e7eef7;
  --brand-cloud: #f7f9fc;
  --bg: var(--brand-cloud);
  --surface: #ffffff;
  --surface-raised: #f2f6fb;
  --surface-soft: #edf3f9;
  --border: #d8e2ee;
  --border-soft: var(--brand-mist);
  --text: var(--brand-ink);
  --text-soft: #33495f;
  --text-muted: #6d7d8f;
  --green: var(--brand-teal);
  --green-bg: #e7f7f3;
  --green-text: #0d7863;
  --amber: #c98514;
  --amber-bg: #fff5df;
  --amber-text: #985f05;
  --red: #d94a43;
  --red-bg: #fff0ef;
  --red-text: #b8322d;
  --blue: var(--brand-blue);
  --blue-bg: #eaf2ff;
  --blue-text: #1f5fbd;
  --sidebar: #ffffff;
  --sidebar-text: var(--brand-ink);
  --sidebar-muted: #738397;
  --shadow: 0 1px 2px rgba(16, 32, 51, 0.06), 0 12px 34px rgba(16, 32, 51, 0.05);
  --z-overlay: 80;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #091523;
  --surface: var(--brand-ink);
  --surface-raised: #172b42;
  --surface-soft: #0d1b2a;
  --border: #29415a;
  --border-soft: #20364d;
  --text: #f7f9fc;
  --text-soft: #c9d4df;
  --text-muted: #8fa0b2;
  --green: #43cbb0;
  --green-bg: #10372f;
  --green-text: #7ce0cc;
  --amber: #e2a84d;
  --amber-bg: #372812;
  --amber-text: #f0c371;
  --red: #ef6b63;
  --red-bg: #3a191b;
  --red-text: #ff9c97;
  --blue: #6b9eff;
  --blue-bg: #12345d;
  --blue-text: #a9c8ff;
  --sidebar: #0b1724;
  --sidebar-text: #f7f9fc;
  --sidebar-muted: #8fa0b2;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.28), 0 14px 38px rgba(0, 0, 0, 0.2);
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  line-height: 1.45;
  text-rendering: optimizeLegibility;
}

button {
  font: inherit;
}

::selection {
  background: var(--brand-blue);
  color: #ffffff;
}

.nav-tabs {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 8px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  color: var(--text);
  font-size: 28px;
  font-weight: 750;
  line-height: 1.15;
}

h2 {
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.nav-tabs a,
.nav-tabs button {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 0;
  border-radius: 6px;
  color: var(--text-muted);
  background: transparent;
  text-decoration: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
}

.nav-tabs a:hover,
.nav-tabs button:hover,
.nav-tabs a.active,
.nav-tabs a.primary {
  color: var(--text);
  background: var(--surface-raised);
}

.nav-tabs a.active,
.nav-tabs a.primary {
  box-shadow: inset 0 -2px 0 var(--blue);
}

.nav-form {
  margin: 0;
}

.language-form {
  --language-control-height: 40px;
  --language-control-min-width: 126px;
  --language-popover-width: 208px;
  --language-popover-gap: 6px;
  --language-option-height: 40px;
  --language-panel-radius: 10px;
  --language-control-radius: 8px;
  --language-option-radius: 7px;
  --language-panel-padding: 6px;
  --language-focus-width: 2px;
  --language-motion-duration: 140ms;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  min-height: var(--language-control-height);
}

.language-fallback,
.language-enhanced {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.language-control,
.language-trigger {
  height: var(--language-control-height);
  min-height: var(--language-control-height);
  min-width: var(--language-control-min-width);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--language-control-radius);
  color: var(--text);
  background: var(--surface);
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
}

.language-control {
  position: relative;
  cursor: pointer;
}

.language-icon {
  display: inline-flex;
  flex: 0 0 auto;
  color: var(--text-muted);
}

.language-icon .icon {
  width: 16px;
  height: 16px;
}

.language-form select {
  appearance: none;
  height: 100%;
  min-width: 0;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.language-form select:disabled {
  cursor: wait;
  opacity: 0.65;
}

.language-submit {
  height: var(--language-control-height);
  min-height: var(--language-control-height);
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--language-control-radius);
  color: var(--text-soft);
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.language-submit:hover,
.language-trigger:hover,
.language-trigger[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--blue) 48%, var(--border));
  background: var(--surface-raised);
}

.language-trigger {
  justify-content: flex-start;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.language-trigger:disabled,
.language-form[data-language-state="loading"] .language-option {
  cursor: wait;
}

.language-current {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.language-chevron {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  margin: -4px 1px 0 0;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  color: var(--text-muted);
  pointer-events: none;
  transform: rotate(45deg);
  transition: transform var(--language-motion-duration) ease-out;
}

.language-trigger[aria-expanded="true"] .language-chevron {
  transform: rotate(225deg);
}

.language-form--enhanced .language-fallback {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.language-popover {
  --language-popover-width: 208px;
  --language-popover-gap: 6px;
  --language-option-height: 40px;
  --language-panel-radius: 10px;
  --language-option-radius: 7px;
  --language-panel-padding: 6px;
  --language-focus-width: 2px;
  --language-motion-duration: 140ms;
  position: fixed;
  z-index: var(--z-overlay);
  width: var(--language-popover-width);
  max-height: min(248px, calc(100vh - 24px));
  max-height: min(248px, calc(100dvh - 24px));
  padding: var(--language-panel-padding);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--language-panel-radius);
  background: var(--surface);
  box-shadow: 0 18px 48px rgba(16, 32, 51, 0.18), 0 3px 10px rgba(16, 32, 51, 0.10);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity var(--language-motion-duration) ease-out, transform var(--language-motion-duration) ease-out;
}

html[data-theme="dark"] .language-popover,
[data-theme="dark"] .language-popover {
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.20), 0 1px 2px rgba(0, 0, 0, 0.28);
}

.language-popover[data-language-overlay="true"] {
  opacity: 1;
  transform: translateY(0);
}

.language-popover[data-placement="top"] {
  transform: translateY(-4px);
}

.language-popover[data-placement="top"][data-language-overlay="true"] {
  transform: translateY(0);
}

.language-listbox {
  max-height: inherit;
  overflow-y: auto;
}

.language-option {
  min-height: var(--language-option-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--language-option-radius);
  color: var(--text);
  background: transparent;
  font-size: 13px;
  font-weight: 550;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}

.language-option:hover,
.language-option:focus-visible {
  outline: none;
  background: var(--surface-raised);
}

.language-option[aria-selected="true"] {
  color: var(--blue-text);
  background: var(--blue-bg);
  font-weight: 700;
}

.language-option[aria-selected="true"]:focus-visible {
  box-shadow: inset 0 0 0 var(--language-focus-width) var(--blue);
}

.language-option-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.language-option-check {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: currentColor;
  opacity: 0;
}

.language-option-check::before {
  content: "✓";
  display: block;
  font-size: 15px;
  line-height: 16px;
  text-align: center;
}

.language-option[aria-selected="true"] .language-option-check {
  opacity: 1;
}

.user-chip {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.user-chip span {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 650;
}

.user-chip strong {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  text-transform: uppercase;
}

.icon-button {
  min-width: 36px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-soft);
  background: var(--surface-raised);
  cursor: pointer;
}

.icon-button:hover {
  color: var(--text);
  background: #282a30;
}

.text-button {
  padding: 0 12px;
  font-size: 13px;
  font-weight: 650;
}

main {
  padding-bottom: 12px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.summary-grid-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric {
  min-height: 94px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.metric-value {
  color: var(--text);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.metric-label {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 13px;
}

.metric-ok {
  border-top: 3px solid var(--green);
}

.metric-warn {
  border-top: 3px solid var(--amber);
}

.metric-critical {
  border-top: 3px solid var(--red);
}

.grid {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel {
  min-width: 0;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.panel-title {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-raised);
}

.button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid #39739d;
  border-radius: 6px;
  color: #ffffff;
  background: #27618a;
  font-family: inherit;
  font-size: 13px;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: #2f719f;
}

.button-secondary {
  border-color: var(--border);
  color: var(--text-soft);
  background: var(--surface-soft);
}

.button-secondary:hover {
  color: var(--text);
  background: var(--surface);
}

.button-danger {
  border-color: var(--red);
  color: #ffffff;
  background: var(--red);
}

.button-danger:hover {
  border-color: var(--red-text);
  background: var(--red-text);
}

.button-danger-ghost {
  border-color: color-mix(in srgb, var(--red) 52%, var(--border));
  color: var(--red-text);
  background: var(--red-bg);
}

.button-danger-ghost:hover {
  border-color: var(--red);
  color: var(--red-text);
  background: color-mix(in srgb, var(--red-bg) 82%, var(--red) 18%);
}

.button-small {
  min-height: 32px;
  padding: 0 11px;
  white-space: nowrap;
}

.button-icon-only {
  width: 34px;
  min-width: 34px;
  padding: 0;
}

.button-icon-only .icon {
  width: 16px;
  height: 16px;
}

.message-stack {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.message {
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-soft);
  background: var(--surface);
  font-size: 14px;
}

.message-success {
  border-color: #285f3a;
  color: var(--green-text);
  background: var(--green-bg);
}

.message-error {
  border-color: #693037;
  color: var(--red-text);
  background: var(--red-bg);
}

.count-pill {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 700;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  scrollbar-color: #686d76 var(--surface-soft);
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  table-layout: auto;
}

th,
td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
  overflow-wrap: normal;
}

th {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
  text-transform: uppercase;
}

td {
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.35;
}

tbody tr:hover {
  background: var(--surface-soft);
}

tr:last-child td {
  border-bottom: 0;
}

.num {
  text-align: right;
}

.strong {
  color: var(--text);
  font-weight: 750;
}

.status {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--blue-text);
  background: var(--blue-bg);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.status-icon,
.status-icon .icon {
  width: 14px;
  height: 14px;
  display: inline-block;
  flex: 0 0 auto;
}

.status-ok {
  color: var(--green-text);
  background: var(--green-bg);
}

.status-warn {
  color: var(--amber-text);
  background: var(--amber-bg);
}

.status-danger {
  color: var(--red-text);
  background: var(--red-bg);
}

.status-income {
  color: var(--green-text);
  background: var(--green-bg);
}

.status-expense {
  color: var(--red-text);
  background: var(--red-bg);
}

.status-founder-expense {
  color: var(--amber-text);
  background: var(--amber-bg);
}

.status-transfer {
  color: var(--blue-text);
  background: var(--blue-bg);
}

.status-reimbursement {
  color: #8fd8d0;
  background: #12332f;
}

.status-neutral {
  color: var(--text-soft);
  background: var(--surface-raised);
}

.auth-shell {
  min-height: 56vh;
  display: grid;
  place-items: start center;
  padding-top: clamp(20px, 7vh, 72px);
}

.auth-panel,
.form-panel {
  width: min(860px, 100%);
}

.auth-panel {
  max-width: 420px;
  padding: 26px;
}

.company-selection-shell {
  min-height: 56vh;
  display: grid;
  place-items: start center;
  padding-top: clamp(20px, 6vh, 64px);
}

.company-selection-panel {
  width: min(720px, 100%);
  padding: clamp(20px, 3vw, 32px);
}

.company-selection-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 24px;
}

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

.company-selection-heading h2 {
  font-size: clamp(24px, 3vw, 32px);
}

.company-selection-heading p {
  max-width: 560px;
  margin-top: 8px;
  color: var(--text-muted);
  line-height: 1.55;
}

.company-selection-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--blue-text);
  background: var(--blue-bg);
}

.company-selection-mark .icon {
  width: 22px;
  height: 22px;
}

.company-selection-list {
  display: grid;
  gap: 10px;
}

.company-selection-choice {
  width: 100%;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  background: var(--surface-raised);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.company-selection-choice:hover,
.company-selection-choice:focus-visible {
  border-color: var(--blue);
  background: var(--blue-bg);
}

.company-selection-choice-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.company-selection-choice-copy strong {
  font-size: 15px;
}

.company-selection-choice-copy small {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-selection-action {
  flex: 0 0 auto;
  color: var(--blue-text);
  font-size: 13px;
  font-weight: 750;
}

.form-stack {
  display: grid;
  gap: 14px;
  padding: 0;
}

.login-brand {
  display: grid;
  gap: 12px;
  margin-bottom: 28px;
}

.login-brand .brand-logo {
  width: min(222px, 78vw);
}

.login-brand p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 550;
}

.login-heading {
  margin-bottom: 22px;
}

.login-heading h2 {
  font-size: 28px;
  line-height: 1.15;
}

.passwordless-heading p {
  margin: 10px 0 0;
  color: var(--text-muted);
  line-height: 1.55;
}

.passwordless-primary {
  width: 100%;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.passwordless-security-note {
  margin: 16px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.passwordless-back {
  display: block;
  margin-top: 18px;
  color: var(--blue-text);
  font-size: 13px;
  font-weight: 650;
  text-align: center;
}

.passwordless-code-input {
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.28em;
  text-align: center;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
}

.full-width {
  grid-column: 1 / -1;
}

.field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 650;
}

.field-check {
  min-height: 42px;
  align-items: center;
  flex-direction: row;
  gap: 9px;
}

.input {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: none;
  color: var(--text);
  background: var(--surface-soft);
  font: inherit;
  font-weight: 500;
}

select.input {
  color: var(--text);
}

textarea.input {
  min-height: 92px;
  resize: vertical;
}

input[type="checkbox"].input {
  width: 17px;
  min-height: 17px;
  accent-color: var(--blue);
}

.input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(100, 168, 216, 0.14);
}

.custom-picker-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0;
}

.custom-picker,
.custom-combobox {
  position: relative;
  width: 100%;
  color: var(--text);
  font-size: 13px;
  font-weight: 550;
}

.custom-picker-panel[hidden],
.custom-combobox-panel[hidden],
.picker-create-panel[hidden],
.picker-create-errors[hidden],
.custom-picker-empty[hidden],
.custom-picker-option[hidden],
.custom-picker-create[hidden] {
  display: none !important;
}

.custom-picker-trigger {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  background: var(--surface-soft);
  text-align: left;
  cursor: pointer;
}

.custom-picker-trigger:hover {
  border-color: color-mix(in srgb, var(--blue) 48%, var(--border));
  background: var(--surface-raised);
}

.custom-picker-trigger:focus-visible,
.custom-picker[data-picker-open="true"] > .custom-picker-trigger,
.custom-picker-trigger.is-invalid {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(100, 168, 216, 0.14);
}

.custom-picker-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-picker-chevron {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 150ms ease;
}

.custom-picker[data-picker-open="true"] > .custom-picker-trigger .custom-picker-chevron {
  transform: translateY(2px) rotate(225deg);
}

.custom-picker-panel,
.custom-combobox-panel {
  position: absolute;
  z-index: var(--z-overlay);
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  min-width: min(320px, 88vw);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 16px);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 18px 48px rgba(16, 32, 51, 0.18), 0 3px 10px rgba(16, 32, 51, 0.1);
}

.custom-picker-panel {
  overflow: hidden;
}

.custom-combobox-panel {
  overflow: hidden;
}

.custom-picker-search {
  flex: 0 0 auto;
  padding: 9px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface);
}

.custom-picker-search .input {
  min-height: 38px;
  background: var(--surface-soft);
}

.custom-picker-options,
.custom-combobox-options {
  min-height: 0;
  flex: 1 1 auto;
  max-height: none;
  overflow-y: auto;
  padding: 6px;
}

.custom-picker-option {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  color: var(--text);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.custom-picker-option:hover,
.custom-picker-option:focus-visible {
  outline: none;
  background: var(--surface-raised);
}

.custom-picker-option.is-selected {
  color: var(--blue-text);
  background: var(--blue-bg);
  font-weight: 700;
}

.custom-picker-option-check {
  color: var(--blue-text);
  opacity: 0;
}

.custom-picker-option.is-selected .custom-picker-option-check {
  opacity: 1;
}

.custom-picker-empty {
  flex: 0 0 auto;
  padding: 18px 14px;
  color: var(--text-muted);
  text-align: center;
}

.custom-picker-footer {
  min-height: 0;
  flex: 0 0 auto;
  overflow: hidden;
  padding: 6px;
  border-top: 1px solid var(--border-soft);
  background: var(--surface);
}

.custom-picker-panel[data-picker-state="create"] > .custom-picker-footer {
  flex: 1 1 auto;
}

.custom-picker-create {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  color: var(--blue-text);
  background: transparent;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.custom-picker-create:hover,
.custom-picker-create:focus-visible {
  outline: none;
  background: var(--blue-bg);
}

.picker-create-panel {
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  display: grid;
  gap: 11px;
  padding: 8px;
}

.picker-create-field {
  display: grid;
  gap: 6px;
}

.picker-create-field label {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

.counterparty-create-panel > label {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

.picker-create-field .custom-picker-options {
  max-height: 160px;
}

.picker-create-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 7px;
  padding-top: 2px;
  background: var(--surface);
}

.picker-create-actions .button {
  width: auto;
  grid-column: auto;
}

.picker-create-errors {
  padding: 8px 10px;
  border-radius: 7px;
  color: var(--red-text);
  background: var(--red-bg);
  font-size: 12px;
}

.custom-combobox > .input {
  padding-right: 36px;
}

.custom-combobox::after {
  content: "";
  position: absolute;
  top: 15px;
  right: 14px;
  width: 7px;
  height: 7px;
  pointer-events: none;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
}

.custom-combobox-panel {
  min-width: 0;
}

.custom-combobox-panel[data-combobox-state="create"] > .counterparty-create-panel {
  min-height: 0;
  flex: 1 1 auto;
}

.custom-combobox-create {
  margin: 0;
  border-top: 1px solid var(--border-soft);
  border-radius: 0;
}

.form-actions {
  display: flex;
  justify-content: flex-start;
}

.field-error,
.form-errors {
  color: var(--red-text);
  font-size: 12px;
  font-weight: 650;
}

.form-errors {
  padding: 10px 12px;
  border: 1px solid #693037;
  border-radius: 8px;
  background: var(--red-bg);
}

.form-errors ul {
  margin: 0;
  padding-left: 18px;
}

.panel-subtitle {
  margin: 3px 0 0;
  color: var(--text-muted);
  font-size: 12px;
}

.operation-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.operation-actions,
.default-account-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.default-account-form {
  min-width: 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 650;
}

.default-account-form select {
  width: min(280px, 36vw);
  min-height: 38px;
}

.default-account-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-soft);
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 700;
}

.quick-entry-form {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: end;
  gap: 12px;
  padding: 16px;
}

.quick-amount {
  grid-column: span 2;
}

.quick-account {
  grid-column: span 3;
}

.quick-date,
.quick-category {
  grid-column: span 2;
}

.quick-counterparty {
  grid-column: span 3;
}

.quick-note {
  grid-column: span 10;
}

.quick-field {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 650;
}

.quick-field small {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
}

.quick-entry-form .input {
  min-height: 42px;
}

.quick-submit {
  grid-column: span 2;
  min-width: 116px;
  min-height: 42px;
}

.button:disabled {
  border-color: var(--border);
  color: var(--text-muted);
  background: var(--surface-raised);
  cursor: not-allowed;
  opacity: 0.65;
}

.operations-table {
  min-width: 1180px;
}

.operations-table .action-column {
  width: 110px;
  min-width: 110px;
  position: sticky;
  right: 0;
  z-index: 1;
  padding-right: 12px;
  padding-left: 12px;
  text-align: right;
  background: var(--surface);
  box-shadow: -10px 0 14px -16px color-mix(in srgb, var(--text) 45%, transparent);
}

.operations-table thead .action-column {
  z-index: 2;
  background: var(--surface-raised);
}

.operations-table tbody tr:hover .action-column {
  background: var(--surface-soft);
}

.operations-table .description-cell {
  min-width: 220px;
  max-width: 420px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.row-meta {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
}

.transaction-form-shell {
  width: min(920px, 100%);
  margin: 0 auto;
}

.kind-switch {
  display: inline-flex;
  gap: 3px;
  margin-bottom: 12px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.kind-switch a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.kind-switch a:hover,
.kind-switch a.active {
  color: var(--text);
  background: var(--surface-raised);
}

.kind-switch a.active {
  box-shadow: inset 0 -2px 0 var(--blue);
}

.simple-operation-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 20px;
}

.field small {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
}

.operation-details {
  padding-top: 4px;
  border-top: 1px solid var(--border-soft);
}

.details-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.65fr) minmax(280px, 1.35fr);
  gap: 16px;
  padding-top: 16px;
}

.simple-operation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 20px 20px;
}

.row-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 6px;
}

.transaction-status-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.transaction-status-filters a {
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  background: var(--surface);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.transaction-status-filters a.active {
  border-color: var(--blue);
  color: var(--blue-text);
  background: var(--blue-bg);
}

.transaction-lifecycle-shell {
  max-width: 760px;
}

.transaction-lifecycle-confirm {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  padding: clamp(20px, 4vw, 34px);
  overflow: visible;
}

.transaction-lifecycle-confirm h2,
.transaction-lifecycle-confirm p {
  margin: 0;
}

.transaction-lifecycle-confirm form,
.transaction-confirm-summary {
  grid-column: 1 / -1;
}

.destructive-confirmation-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--red-text);
  background: var(--red-bg);
  font-size: 22px;
  font-weight: 850;
}

.transaction-confirm-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--border);
}

.transaction-confirm-summary > div {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  background: var(--surface-raised);
}

.transaction-confirm-summary span {
  color: var(--text-muted);
  font-size: 12px;
}

.transaction-confirm-summary strong {
  overflow-wrap: anywhere;
}

.transaction-lifecycle-confirm .simple-operation-actions {
  padding: 0;
}

@media (max-width: 620px) {
  .transaction-lifecycle-confirm {
    grid-template-columns: 1fr;
  }

  .destructive-confirmation-icon {
    width: 38px;
    height: 38px;
  }

  .transaction-lifecycle-confirm form,
  .transaction-confirm-summary {
    grid-column: 1;
  }

  .transaction-confirm-summary {
    grid-template-columns: 1fr;
  }

  .transaction-lifecycle-confirm .simple-operation-actions .button {
    width: 100%;
  }
}

.panel table {
  display: table;
}

.compact-table table {
  min-width: 0;
  table-layout: fixed;
}

.compact-table th,
.compact-table td {
  white-space: normal;
  overflow-wrap: anywhere;
}

.compact-table .num {
  white-space: nowrap;
}

.table-wrap::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}

.table-wrap::-webkit-scrollbar-track {
  background: var(--surface-soft);
}

.table-wrap::-webkit-scrollbar-thumb {
  border: 3px solid var(--surface-soft);
  border-radius: 999px;
  background: #686d76;
}

.table-wrap::-webkit-scrollbar-thumb:hover {
  background: #8b929d;
}

@media (max-width: 1400px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    align-items: flex-start;
    justify-content: flex-start;
  }
}

@media (max-width: 1200px) {
  .quick-entry-form {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .quick-amount,
  .quick-date,
  .quick-category,
  .quick-counterparty {
    grid-column: span 2;
  }

  .quick-account {
    grid-column: span 4;
  }

  .quick-note {
    grid-column: span 5;
  }

  .quick-submit {
    grid-column: span 1;
    min-width: 0;
  }
}

@media (max-width: 900px) {
  .app-shell {
    padding-right: 16px;
    padding-left: 16px;
  }

  .topbar-actions {
    flex-wrap: wrap;
  }

  .nav-tabs {
    align-self: stretch;
    flex-wrap: wrap;
  }

  .language-form {
    flex-wrap: nowrap;
  }

  main {
    width: 100%;
  }

  .grid.two {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .operation-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .default-account-form {
    flex-wrap: wrap;
  }

  .default-account-form select {
    width: min(100%, 420px);
  }

  .quick-entry-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-amount,
  .quick-account,
  .quick-date,
  .quick-category,
  .quick-counterparty {
    grid-column: span 1;
  }

  .quick-note {
    grid-column: 1 / -1;
  }

  .quick-submit {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (max-width: 520px) {
  .metric-value {
    font-size: 22px;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .operation-actions,
  .quick-entry-form,
  .simple-operation-form,
  .details-grid {
    grid-template-columns: 1fr;
  }

  .operation-actions {
    display: grid;
  }

  .kind-switch {
    width: 100%;
  }

  .kind-switch a {
    flex: 1;
    justify-content: center;
    padding: 0 8px;
  }

  .quick-amount,
  .quick-account,
  .quick-date,
  .quick-category,
  .quick-counterparty,
  .quick-note,
  .quick-submit {
    grid-column: 1;
  }
}

.marketplace-overview {
  align-items: stretch;
}

.marketplace-intro {
  display: flex;
  flex-direction: column;
}

.marketplace-copy {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 16px;
}

.marketplace-copy p {
  margin: 0;
}

.configuration-warning {
  color: var(--amber-text);
}

.marketplace-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.marketplace-actions form {
  margin: 0;
}

.marketplace-classification-form {
  display: grid;
  gap: 8px;
  min-width: 220px;
  margin-top: 10px;
}

.marketplace-classification-form label {
  display: grid;
  gap: 5px;
}

.marketplace-classification-form .checkbox-line {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-soft);
  font-size: 12px;
}

/* VendaScope workspace shell and marketplace reporting */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-frame {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
}

.app-frame-public {
  display: block;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 100vh;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 18px 14px 14px;
  border-right: 1px solid var(--border);
  background: var(--sidebar);
}

.brand {
  min-height: 58px;
  display: grid;
  justify-items: start;
  gap: 5px;
  padding: 4px 8px 16px;
  color: var(--sidebar-text);
  text-decoration: none;
}

.brand-logo {
  width: 164px;
  display: inline-grid;
  align-items: center;
}

.brand-logo img {
  width: 100%;
  height: auto;
  display: block;
  grid-area: 1 / 1;
}

.brand-logo-dark {
  display: none !important;
}

[data-theme="dark"] .brand-logo-light {
  display: none;
}

[data-theme="dark"] .brand-logo-dark {
  display: block !important;
}

.sidebar-nav {
  display: grid;
  gap: 14px;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 0 16px;
}

.nav-group {
  display: grid;
  gap: 3px;
}

.nav-group + .nav-group {
  padding-top: 13px;
  border-top: 1px solid var(--border-soft);
}

.nav-group-title {
  padding: 0 10px 6px;
  color: var(--sidebar-muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-nav a {
  min-height: 39px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--sidebar-muted);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  transition: color 120ms ease, background 120ms ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: var(--sidebar-text);
  background: var(--surface-raised);
}

.sidebar-nav a.active {
  box-shadow: inset 3px 0 0 var(--blue);
}

.nav-icon {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: inherit;
}

.nav-icon .icon {
  width: 18px;
  height: 18px;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding: 14px 6px 0;
  border-top: 1px solid var(--border-soft);
}

.sidebar-footer form {
  margin: 0;
}

.sidebar-user {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--sidebar-text);
}

.sidebar-user strong,
.sidebar-user small {
  display: block;
  max-width: 115px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user strong {
  font-size: 12px;
}

.sidebar-user small {
  color: var(--sidebar-muted);
  font-size: 10px;
}

.avatar {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--blue-text);
  background: var(--blue-bg);
  font-size: 12px;
  font-weight: 800;
}

.avatar-small {
  width: 25px;
  height: 25px;
  font-size: 10px;
}

.sidebar-logout,
.theme-form button,
.link-button {
  border: 0;
  color: var(--text-muted);
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.sidebar-logout {
  width: 32px;
  height: 32px;
  border-radius: 7px;
}

.sidebar-logout .icon,
.theme-form button .icon {
  display: block;
  width: 16px;
  height: 16px;
}

.sidebar-logout:hover,
.theme-form button:hover {
  color: var(--text);
  background: var(--surface-raised);
}

.app-shell {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 18px;
  padding: 10px clamp(18px, 2.4vw, 36px);
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(14px);
}

.topbar-title {
  min-width: 0;
}

.topbar-title .eyebrow {
  margin-bottom: 1px;
  font-size: 10px;
}

.topbar-title h1 {
  font-size: 18px;
  font-weight: 730;
}

.topbar-actions {
  width: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
}

.theme-form {
  --shell-control-height: 40px;
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.theme-form button {
  width: 38px;
  height: var(--shell-control-height);
  min-height: var(--shell-control-height);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-soft);
  background: var(--surface);
  font-size: 17px;
}

.company-form {
  --shell-control-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  min-width: 0;
}

.company-control {
  height: var(--shell-control-height);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  font-size: 12px;
  font-weight: 650;
}

.company-control {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
}

.company-icon {
  display: inline-flex;
  color: var(--text-soft);
}

.company-control select {
  max-width: 180px;
  min-width: 0;
  border: 0;
  appearance: none;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.company-chevron {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  color: var(--text-soft);
  pointer-events: none;
}

.user-chip {
  padding: 0 8px 0 5px;
  background: var(--surface);
}

.page-content {
  width: min(1680px, 100%);
  margin: 0 auto;
  padding: 24px clamp(18px, 2.4vw, 36px) 40px;
}

.panel,
.metric,
.notice-card,
.readiness-card,
.settings-card,
.overview-links a {
  box-shadow: var(--shadow);
}

.panel,
.metric {
  border-radius: 10px;
}

.panel-title {
  background: var(--surface);
}

.report-metrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.summary-grid-four.report-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.report-metrics .metric {
  min-height: 116px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.report-metrics .metric-label {
  order: 0;
  margin: 0;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.report-metrics .metric-value {
  order: 1;
  font-size: clamp(20px, 1.55vw, 28px);
}

.metric-accent-blue { border-top: 3px solid var(--blue); }
.metric-accent-green { border-top: 3px solid var(--green); }
.metric-accent-amber { border-top: 3px solid var(--amber); }
.metric-accent-red { border-top: 3px solid var(--red); }

.text-success { color: var(--green-text) !important; }
.text-danger { color: var(--red-text) !important; }

.data-status {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  padding: 0 13px;
  border: 1px solid var(--amber);
  border-radius: 8px;
  color: var(--amber-text);
  background: var(--amber-bg);
  font-size: 12px;
}

.data-status-ok {
  border-color: var(--green);
  color: var(--green-text);
  background: var(--green-bg);
}

.data-status a {
  margin-left: auto;
  color: inherit;
  font-weight: 750;
  text-decoration: none;
}

.status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
}

.report-grid-main {
  grid-template-columns: minmax(0, 1.8fr) minmax(310px, 0.7fr);
}

.chart-panel {
  min-height: 390px;
}

.bar-chart {
  display: grid;
  gap: 13px;
  padding: 20px 18px 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: 54px minmax(80px, 1fr) 105px minmax(60px, 0.55fr) 105px;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 11px;
}

.bar-row time {
  color: var(--text-muted);
}

.bar-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.bar {
  height: 100%;
  display: block;
  border-radius: inherit;
}

.bar-revenue { background: var(--blue); }
.bar-profit { background: var(--green); }
.bar-negative { background: var(--red); }

.chart-value {
  color: var(--text-soft);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.chart-legend {
  display: flex;
  gap: 18px;
  padding: 8px 18px 18px;
  color: var(--text-muted);
  font-size: 11px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.legend-blue { background: var(--blue); }
.legend-green { background: var(--green); }

.report-toolbar,
.overview-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.report-summary {
  color: var(--text-muted);
  font-size: 13px;
}

.report-summary strong {
  color: var(--text);
  font-size: 18px;
}

.filter-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.filter-form label {
  display: grid;
  gap: 5px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.filter-form select,
.filter-form input {
  height: 36px;
  min-width: 170px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  outline: 0;
  color: var(--text);
  background: var(--surface);
  font: inherit;
  font-size: 12px;
  text-transform: none;
}

.filter-form input {
  min-width: 245px;
}

.filter-form select:focus,
.filter-form input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 18%, transparent);
}

.notice-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
  padding: 13px 15px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  color: var(--blue-text);
  background: var(--blue-bg);
  font-size: 12px;
}

.notice-card strong {
  flex: 0 0 auto;
}

.notice-warn {
  border-color: var(--amber);
  color: var(--amber-text);
  background: var(--amber-bg);
}

.report-table {
  min-width: 980px;
}

.sku-table {
  min-width: 1320px;
}

.sku-table th:first-child,
.sku-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface);
}

.sku-table th:first-child {
  z-index: 2;
  background: var(--surface-raised);
}

.sku-table td:first-child {
  box-shadow: 8px 0 12px -12px var(--text-muted);
}

.sku-coverage-cell {
  min-width: 240px;
  white-space: normal;
}

.table-link {
  color: var(--blue-text);
  text-decoration: none;
}

.table-link:hover {
  text-decoration: underline;
}

.mono {
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.empty-state {
  min-height: 110px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 20px;
  color: var(--text-muted);
  text-align: center;
}

.empty-state-icon,
.empty-state-icon .icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  color: var(--text-muted);
}

.readiness-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px;
  border: 1px dashed var(--amber);
  border-radius: 10px;
  color: var(--text-soft);
  background: var(--amber-bg);
}

.readiness-card p {
  max-width: 840px;
  margin: 4px 0 0;
  color: var(--amber-text);
  font-size: 12px;
}

.readiness-card-panel {
  min-height: 160px;
  margin-bottom: 16px;
}

.sync-retry-form {
  margin-top: 6px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.settings-card {
  min-height: 190px;
  display: grid;
  grid-template-columns: 38px 1fr;
  grid-template-rows: 1fr auto;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.settings-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--blue-text);
  background: var(--blue-bg);
}

.settings-icon .icon {
  width: 20px;
  height: 20px;
}

.settings-card h2 {
  margin-bottom: 6px;
}

.settings-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
}

.settings-card small {
  display: block;
  margin-top: 10px;
  color: var(--text-muted);
  font-weight: 700;
}

.settings-card > a,
.settings-card > form,
.settings-card > .status {
  grid-column: 2;
  justify-self: start;
}

.settings-card > a,
.link-button {
  padding: 0;
  color: var(--blue-text);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.settings-card-muted {
  opacity: 0.78;
}

.overview-heading {
  align-items: center;
}

.overview-heading > div:first-child {
  display: grid;
  gap: 3px;
}

.overview-heading strong {
  font-size: 14px;
}

.overview-actions {
  display: flex;
  gap: 8px;
}

.overview-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.overview-links a {
  min-height: 104px;
  display: grid;
  grid-template-columns: 32px 1fr;
  align-content: center;
  gap: 3px 10px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  background: var(--surface);
  text-decoration: none;
}

.overview-links a:hover {
  border-color: var(--blue);
}

.overview-links a > span {
  grid-row: span 2;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--blue-text);
  background: var(--blue-bg);
  font-weight: 800;
}

.overview-links small {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.dashboard-hero {
  margin-bottom: 10px;
}

.dashboard-hero strong {
  font-size: 17px;
}

.dashboard-source-status {
  margin-bottom: 16px;
}

.dashboard-source-status .status {
  margin-left: auto;
}

.cabinet-metrics .metric {
  min-height: 142px;
}

.metric-meta {
  min-height: 16px;
  order: 2;
  color: var(--text-muted);
  font-size: 11px;
}

.metric-link {
  order: 3;
  align-self: flex-start;
  color: var(--blue-text);
  font-size: 11px;
  font-weight: 750;
  text-decoration: none;
}

.metric-link:hover {
  text-decoration: underline;
}

.dashboard-overview-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
  margin-bottom: 16px;
}

.dashboard-readiness,
.dashboard-accounts {
  min-width: 0;
}

.dashboard-readiness-copy {
  display: grid;
  gap: 7px;
  padding: 17px 18px 15px;
}

.dashboard-readiness-copy strong {
  color: var(--text);
  font-size: 14px;
}

.dashboard-readiness-copy p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.dashboard-readiness-copy .button {
  justify-self: start;
  margin-top: 2px;
}

.dashboard-report-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 18px 18px;
}

.dashboard-report-links a {
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-soft);
  text-decoration: none;
}

.dashboard-report-links a:hover {
  border-color: var(--blue);
  background: var(--surface);
}

.dashboard-report-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--blue-text);
  background: var(--blue-bg);
}

.dashboard-report-icon .icon {
  width: 17px;
  height: 17px;
}

.dashboard-report-links strong,
.dashboard-report-links small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-report-links strong {
  font-size: 12px;
}

.dashboard-report-links small {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 10px;
}

.dashboard-report-links b {
  color: var(--blue-text);
  font-size: 15px;
  font-weight: 700;
  text-align: right;
}

.dashboard-accounts .panel-title {
  align-items: flex-start;
}

.dashboard-accounts .panel-title .button {
  flex: 0 0 auto;
}

.dashboard-recent {
  margin-bottom: 16px;
}

.auth-page .topbar-title {
  display: none;
}

.auth-page .topbar {
  justify-content: flex-end;
  border-bottom: 0;
  background: transparent;
  backdrop-filter: none;
}

.auth-page .page-content {
  padding-top: 0;
}

@media (max-width: 1240px) {
  .report-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-overview-grid {
    grid-template-columns: 1fr;
  }

  .summary-grid-four.report-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-grid-main {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .app-frame {
    display: block;
  }

  .sidebar {
    position: relative;
    height: auto;
    padding: 9px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .brand {
    min-height: 42px;
    padding: 0 5px 8px;
  }

  .brand-logo {
    width: 148px;
  }

  .sidebar-nav {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    padding: 2px 0;
    scrollbar-width: none;
  }

  .sidebar-nav::-webkit-scrollbar { display: none; }

  .nav-group {
    display: flex;
    gap: 4px;
  }

  .nav-group + .nav-group {
    padding: 0 0 0 8px;
    border-top: 0;
    border-left: 1px solid var(--border-soft);
  }

  .nav-group-title,
  .sidebar-footer {
    display: none;
  }

  .sidebar-nav a {
    min-height: 34px;
    flex: 0 0 auto;
    padding: 0 9px;
    font-size: 11px;
  }

  .sidebar-nav a.active {
    box-shadow: inset 0 -2px 0 var(--blue);
  }

  .nav-icon {
    width: 16px;
    height: 16px;
  }

  .topbar {
    position: relative;
    min-height: 60px;
    padding: 9px 15px;
  }

  .topbar-title h1 {
    font-size: 16px;
  }

  .page-content {
    padding: 18px 15px 30px;
  }

  .report-toolbar,
  .overview-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-form {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .filter-form label {
    flex: 1 1 180px;
  }

  .filter-form select,
  .filter-form input {
    width: 100%;
    min-width: 0;
  }

  .bar-row {
    grid-template-columns: 46px minmax(70px, 1fr) 94px;
  }

  .bar-row .bar-track:nth-of-type(2),
  .bar-row .chart-value:last-child {
    display: none;
  }
}

@media (max-width: 620px) {
  .report-metrics,
  .settings-grid,
  .overview-links {
    grid-template-columns: 1fr;
  }

  .summary-grid-four {
    grid-template-columns: 1fr;
  }

  .summary-grid-four.report-metrics {
    grid-template-columns: 1fr;
  }

  .data-status {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 13px;
  }

  .data-status a {
    margin-left: 0;
  }

  .notice-card,
  .readiness-card {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-card {
    min-height: 160px;
  }

  .overview-actions {
    flex-wrap: wrap;
  }

  .dashboard-source-status {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
    padding: 11px 13px;
  }

  .dashboard-source-status .status {
    margin-left: 0;
  }

  .dashboard-report-links {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 901px) and (max-width: 1400px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* VendaScope UI: keep the full navigation in the sidebar and use compact details
   controls on narrow screens, without requiring a JavaScript menu layer. */
.mobile-nav,
.user-menu {
  display: none;
}

.sidebar-nav a:focus-visible,
.mobile-nav summary:focus-visible,
.mobile-nav-links a:focus-visible,
.user-menu summary:focus-visible,
.user-menu-panel button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .sidebar-nav {
    display: none;
  }

  .topbar-actions {
    position: static;
    align-items: center;
    flex-wrap: nowrap;
  }

  .language-form {
    flex-wrap: nowrap;
  }

  .company-form {
    --shell-control-height: 44px;
  }

  .mobile-nav,
  .user-menu {
    display: block;
    position: relative;
  }

  .mobile-nav {
    position: static;
  }

  .mobile-nav summary,
  .user-menu-trigger {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-soft);
    background: var(--surface);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
  }

  .mobile-nav summary::-webkit-details-marker,
  .user-menu summary::-webkit-details-marker {
    display: none;
  }

  .mobile-nav summary::marker,
  .user-menu summary::marker {
    content: "";
  }

  .mobile-nav summary:hover,
  .user-menu-trigger:hover,
  .mobile-nav[open] summary,
  .user-menu[open] .user-menu-trigger {
    color: var(--text);
    background: var(--surface-raised);
  }

  .mobile-nav-trigger-icon,
  .mobile-nav-trigger-icon .icon {
    display: block;
    width: 17px;
    height: 17px;
  }

  .mobile-nav-panel,
  .user-menu-panel {
    position: absolute;
    top: calc(100% + 8px);
    z-index: 30;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .mobile-nav-panel {
    left: 15px;
    width: min(320px, calc(100vw - 30px));
    max-height: min(70vh, 520px);
    overflow-y: auto;
    padding: 8px;
  }

  .mobile-nav-links {
    display: grid;
    gap: 8px;
    padding: 0;
  }

  .mobile-nav-links .nav-group {
    display: grid;
    gap: 3px;
  }

  .mobile-nav-links .nav-group + .nav-group {
    padding-top: 9px;
    border-top: 1px solid var(--border-soft);
  }

  .mobile-nav-links .nav-group-title {
    padding: 3px 9px 5px;
  }

  .mobile-nav-links a {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 9px;
    border-radius: 7px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 650;
    text-decoration: none;
  }

  .mobile-nav-links a:hover,
  .mobile-nav-links a.active {
    color: var(--text);
    background: var(--surface-raised);
  }

  .mobile-nav-links a.active {
    box-shadow: inset 3px 0 0 var(--blue);
  }

  .mobile-nav-links .nav-icon {
    width: 20px;
    height: 20px;
  }

  .user-menu-trigger {
    padding: 0 8px 0 5px;
  }

  .user-menu-name {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .user-menu-panel {
    right: 0;
    width: min(220px, calc(100vw - 30px));
    padding: 12px;
  }

  .user-menu-panel strong,
  .user-menu-panel small {
    display: block;
  }

  .user-menu-panel strong {
    color: var(--text);
    font-size: 13px;
  }

  .user-menu-panel small {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 11px;
  }

  .user-menu-panel form {
    margin: 11px 0 0;
    padding-top: 10px;
    border-top: 1px solid var(--border-soft);
  }

  .user-menu-panel button {
    width: 100%;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 8px;
    border: 0;
    border-radius: 6px;
    color: var(--text-soft);
    background: transparent;
    font-size: 12px;
    font-weight: 650;
    text-align: left;
    cursor: pointer;
  }

  .user-menu-panel button:hover {
    color: var(--text);
    background: var(--surface-raised);
  }

  .user-menu-panel button .icon {
    width: 16px;
    height: 16px;
  }
}

@media (max-width: 520px) {
  .company-form {
    flex: 1 1 96px;
    max-width: 130px;
  }

  .company-control {
    width: 100%;
  }

  .company-control select {
    width: 100%;
    max-width: 84px;
  }

  .company-icon {
    display: none;
  }

  .language-form {
    align-items: flex-start;
  }

  .language-fallback {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 520px) {
  .topbar-title .eyebrow {
    display: none;
  }

  .topbar-actions {
    gap: 6px;
  }

  .mobile-nav summary,
  .user-menu-trigger {
    padding-right: 8px;
    padding-left: 8px;
  }

  .mobile-nav summary > span:last-child,
  .user-menu-name {
    display: none;
  }
}

/* VendaScope UX: keep keyboard focus visible across the whole shell, not only on
   navigation links and menu controls. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

/* Server-rendered pages do not need a loading animation, but existing hover
   and transition affordances must respect the user's motion preference. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 900px) {
  /* Keep primary controls comfortably tappable on phones and small tablets. */
  .button,
  .button-small,
  .icon-button,
  .theme-form button,
  .language-form select,
  .language-submit,
  .language-trigger,
  .mobile-nav summary,
  .user-menu-trigger,
  .mobile-nav-links a,
  .user-menu-panel button,
  .sidebar-logout {
    min-height: 44px;
  }

  .icon-button,
  .sidebar-logout {
    min-width: 44px;
  }

  .language-form {
    --language-control-height: 44px;
    --language-control-min-width: 112px;
    --language-option-height: 44px;
    min-height: 44px;
  }

  .language-popover {
    --language-option-height: 44px;
    width: min(var(--language-popover-width), calc(100vw - 24px));
  }

  .theme-form {
    --shell-control-height: 44px;
  }
}

/* Public acquisition surface: minimum-price calculator. */
.public-site {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 2%, rgba(38, 114, 227, 0.11), transparent 31rem),
    radial-gradient(circle at 88% 12%, rgba(19, 168, 138, 0.1), transparent 28rem),
    var(--brand-cloud);
}

.public-header,
.public-main,
.public-footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.public-header {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(216, 226, 238, 0.9);
}

.public-brand {
  display: inline-flex;
  align-items: center;
}

.public-brand .brand-logo {
  width: 174px;
}

.public-header-actions,
.public-language-switcher {
  display: flex;
  align-items: center;
}

.public-header-actions {
  gap: 14px;
}

.public-language-switcher {
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.82);
}

.public-language-switcher a {
  min-width: 38px;
  min-height: 34px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.public-language-switcher a:hover,
.public-language-switcher a[aria-current="page"] {
  color: var(--brand-ink);
  background: var(--surface);
  box-shadow: 0 1px 5px rgba(16, 32, 51, 0.09);
}

.public-login {
  min-height: 42px;
  padding-inline: 17px;
  background: rgba(255, 255, 255, 0.82);
}

.public-main {
  padding: clamp(48px, 7vw, 88px) 0 68px;
}

.calculator-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: 34px;
}

.calculator-hero > div {
  max-width: 790px;
}

.calculator-eyebrow {
  margin: 0 0 11px;
  color: var(--brand-teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.calculator-hero h1 {
  max-width: 760px;
  font-size: clamp(35px, 5vw, 58px);
  font-weight: 790;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.calculator-lead {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--text-soft);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.55;
}

.calculator-scenario-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid rgba(19, 168, 138, 0.34);
  border-radius: 999px;
  color: var(--green-text);
  background: rgba(231, 247, 243, 0.86);
  font-size: 12px;
  font-weight: 750;
}

.calculator-scenario-badge::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-teal);
  content: "";
}

.calculator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
  align-items: start;
  gap: 20px;
}

.calculator-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(207, 220, 234, 0.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 22px 70px rgba(16, 32, 51, 0.09);
}

.calculator-result-panel {
  position: sticky;
  top: 20px;
}

.calculator-panel-heading {
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-soft);
}

.calculator-panel-heading h2 {
  font-size: 18px;
}

.calculator-panel-heading p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.calculator-step {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 10px;
  color: #ffffff;
  background: var(--brand-ink);
  font-size: 13px;
  font-weight: 800;
}

.calculator-form {
  display: grid;
  gap: 24px;
  padding: 24px;
}

.calculator-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.calculator-fieldset legend {
  width: 100%;
  margin-bottom: 14px;
  color: var(--brand-ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.calculator-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px 14px;
}

.calculator-form .field {
  gap: 6px;
  color: var(--brand-ink);
}

.calculator-form .field label {
  min-height: 19px;
}

.calculator-form .field small {
  min-height: 31px;
  line-height: 1.4;
}

.calculator-input-affix {
  position: relative;
}

.calculator-input-affix > span {
  position: absolute;
  top: 50%;
  left: 12px;
  z-index: 1;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 750;
  pointer-events: none;
  transform: translateY(-50%);
}

.calculator-input-affix .input {
  min-height: 48px;
  padding-left: 40px;
  border-radius: 9px;
  background: #fbfcfe;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.calculator-input-percent .input {
  padding-right: 36px;
  padding-left: 12px;
}

.calculator-input-percent > span {
  right: 13px;
  left: auto;
}

.calculator-error-summary {
  padding: 13px 15px;
  border: 1px solid rgba(217, 74, 67, 0.35);
  border-radius: 10px;
  color: var(--red-text);
  background: var(--red-bg);
  font-size: 13px;
}

.calculator-error-summary ul {
  margin: 5px 0 0;
  padding-left: 18px;
}

.calculator-submit {
  min-height: 50px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-blue), #1d65d1);
  box-shadow: 0 10px 25px rgba(38, 114, 227, 0.22);
  font-size: 14px;
}

.calculator-submit:hover {
  background: linear-gradient(135deg, #347fe9, var(--brand-blue));
}

.calculator-privacy {
  margin: -12px 0 0;
  color: var(--text-muted);
  font-size: 11px;
  text-align: center;
}

.calculator-result-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 24px 24px 0;
  padding: 11px 13px;
  border-radius: 9px;
  font-size: 12px;
}

.calculator-result-state strong {
  font-size: 13px;
}

.calculator-state-profit {
  color: var(--green-text);
  background: var(--green-bg);
}

.calculator-state-loss {
  color: var(--red-text);
  background: var(--red-bg);
}

.calculator-state-break_even {
  color: var(--amber-text);
  background: var(--amber-bg);
}

.calculator-primary-result {
  display: grid;
  justify-items: center;
  padding: 30px 24px 28px;
  text-align: center;
}

.calculator-primary-result > span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.calculator-primary-result strong {
  margin: 5px 0 2px;
  color: var(--brand-ink);
  font-size: clamp(35px, 4.5vw, 52px);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.calculator-primary-result small {
  color: var(--text-muted);
  font-size: 11px;
}

.calculator-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0 24px 22px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: 11px;
  background: var(--border-soft);
}

.calculator-result-grid > div {
  min-height: 88px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 14px;
  background: #fbfcfe;
}

.calculator-result-grid span {
  color: var(--text-muted);
  font-size: 11px;
}

.calculator-result-grid strong {
  color: var(--brand-ink);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.calculator-loss-note,
.calculator-assumptions,
.calculator-disclaimer {
  margin-right: 24px;
  margin-left: 24px;
}

.calculator-loss-note {
  padding: 11px 13px;
  border-radius: 9px;
  color: var(--red-text);
  background: var(--red-bg);
  font-size: 12px;
}

.calculator-assumptions {
  margin-bottom: 22px;
  padding: 15px;
  border-left: 3px solid var(--brand-teal);
  border-radius: 0 9px 9px 0;
  background: var(--green-bg);
}

.calculator-assumptions h3 {
  margin: 0 0 7px;
  color: var(--green-text);
  font-size: 13px;
}

.calculator-assumptions p {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 11px;
}

.calculator-empty-state {
  min-height: 360px;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 48px;
  text-align: center;
}

.calculator-empty-state > span {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 24px;
  color: var(--brand-blue);
  background: var(--blue-bg);
  font-size: 22px;
  font-weight: 850;
}

.calculator-empty-state h3 {
  margin: 0;
  color: var(--brand-ink);
  font-size: 18px;
}

.calculator-empty-state p {
  max-width: 280px;
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.calculator-methodology {
  margin: 0 24px 20px;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-soft);
  font-size: 11px;
}

.calculator-methodology summary {
  padding: 12px 0;
  color: var(--brand-ink);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.calculator-methodology p {
  margin: 4px 0;
}

.calculator-methodology dl {
  display: grid;
  gap: 5px;
  margin: 12px 0 0;
}

.calculator-methodology dl div {
  display: grid;
  grid-template-columns: minmax(100px, 0.75fr) minmax(0, 1.25fr);
  gap: 10px;
}

.calculator-methodology dt {
  color: var(--text-muted);
}

.calculator-methodology dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.calculator-disclaimer {
  margin-bottom: 24px;
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.5;
}

.public-footer {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
}

.public-footer span:first-child {
  color: var(--brand-ink);
  font-weight: 800;
}

@media (max-width: 900px) {
  .calculator-hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
  }

  .calculator-layout {
    grid-template-columns: 1fr;
  }

  .calculator-result-panel {
    position: static;
  }
}

@media (max-width: 620px) {
  .public-header,
  .public-main,
  .public-footer {
    width: min(100% - 24px, 1180px);
  }

  .public-header {
    min-height: 68px;
    gap: 12px;
  }

  .public-brand .brand-logo {
    width: 136px;
  }

  .public-header-actions {
    gap: 7px;
  }

  .public-language-switcher a {
    min-width: 32px;
  }

  .public-login {
    display: none;
  }

  .public-main {
    padding-top: 38px;
  }

  .calculator-hero h1 {
    font-size: 38px;
  }

  .calculator-fields,
  .calculator-result-grid {
    grid-template-columns: 1fr;
  }

  .calculator-panel-heading,
  .calculator-form {
    padding-right: 18px;
    padding-left: 18px;
  }

  .calculator-result-state,
  .calculator-result-grid,
  .calculator-loss-note,
  .calculator-assumptions,
  .calculator-methodology,
  .calculator-disclaimer {
    margin-right: 18px;
    margin-left: 18px;
  }

  .calculator-form .field small {
    min-height: 0;
  }

  .public-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
  }
}
