@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("/assets/fonts/montserrat-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("/assets/fonts/montserrat-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Corporate identity theme. The existing stylesheet remains the dark-mode source of truth. */
html[data-theme="light"] body:not(.is-public-shop):not(.is-admin-page):not(.is-reconciliation-public) {
  color-scheme: light;
  --bg: #f7f4ed;
  --panel: #ffffff;
  --panel-2: #f3f6fa;
  --border: #d9e1eb;
  --text: #062f6b;
  --muted: #435a73;
  --gold: #d5a63a;
  --blue: #1077d4;
  --navy: #062f6b;
  --deep-navy: #031e45;
  --cream: #f7f4ed;
  --cold-gray: #8e95a3;
  --cold-gray-readable: #66758a;
  --line: rgba(6, 47, 107, .11);
  --shadow: 0 12px 30px rgba(3, 30, 69, .08);
  --danger: #c83f49;
  --warning: #b87508;
  --success: #16865b;
  --chart-grid: rgba(6, 47, 107, .13);
  --chart-muted: #52667d;
  --chart-text: #062f6b;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
}

html[data-theme="light"] body:not(.is-public-shop):not(.is-admin-page):not(.is-reconciliation-public) :is(h1, h2, h3, h4, .brand strong) {
  color: #031e45;
  font-family: "Montserrat", "Inter", "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

html[data-theme="light"] body:not(.is-public-shop):not(.is-admin-page):not(.is-reconciliation-public) h1 {
  font-weight: 700;
  line-height: 1.18;
}

html[data-theme="light"] body:not(.is-public-shop):not(.is-admin-page):not(.is-reconciliation-public) :is(h2, h3, h4) {
  font-weight: 600;
  line-height: 1.25;
}

html[data-theme="light"] body:not(.is-public-shop):not(.is-admin-page):not(.is-reconciliation-public) .brand-symbol-image-positive {
  display: block;
}

html[data-theme="light"] body:not(.is-public-shop):not(.is-admin-page):not(.is-reconciliation-public) .brand-symbol-image-negative {
  display: none;
}

html[data-theme="light"] body:not(.is-public-shop):not(.is-admin-page):not(.is-reconciliation-public) .login-brand-panel .brand-symbol-image-positive {
  display: none;
}

html[data-theme="light"] body:not(.is-public-shop):not(.is-admin-page):not(.is-reconciliation-public) .login-brand-panel .brand-symbol-image-negative {
  display: block;
}

html[data-theme="light"] .app-loading-overlay {
  background: #f7f4ed;
}

html[data-theme="light"] .app-loading-mark {
  background: #ffffff;
  border-color: rgba(213, 166, 58, .48);
  box-shadow: 0 18px 44px rgba(3, 30, 69, .14);
}

html[data-theme="light"] .app-loading-mark span {
  background: #d5a63a;
  color: #031e45;
}

html[data-theme="light"] .login-screen {
  background: #f7f4ed;
}

html[data-theme="light"] .login-brand-panel {
  background: #062f6b;
  color: #ffffff;
}

html[data-theme="light"] body:not(.is-public-shop):not(.is-admin-page):not(.is-reconciliation-public) .login-brand-panel :is(h1, h2, h3, h4) {
  color: #ffffff;
}

html[data-theme="light"] .login-brand {
  color: #ffffff;
}

html[data-theme="light"] .login-mark {
  background: #ffffff;
  border-color: rgba(213, 166, 58, .78);
  color: #062f6b;
  box-shadow: 0 10px 24px rgba(3, 30, 69, .22);
}

html[data-theme="light"] .login-hero .eyebrow {
  color: #f0c85c;
}

html[data-theme="light"] .login-hero p:last-child {
  color: #dbe8f7;
}

html[data-theme="light"] .login-metrics div {
  background: rgba(3, 30, 69, .48);
  border-color: rgba(255, 255, 255, .22);
  box-shadow: none;
}

html[data-theme="light"] .login-metrics strong {
  color: #ffffff;
}

html[data-theme="light"] .login-metrics span {
  color: #dbe8f7;
}

html[data-theme="light"] .login-form-panel {
  background: #f7f4ed;
}

html[data-theme="light"] :is(.login-card, .public-package-panel) {
  background: #ffffff;
  border-color: #d9e1eb;
  box-shadow: var(--shadow);
}

html[data-theme="light"] .login-card {
  color: #031e45;
}

html[data-theme="light"] .login-card :is(.login-subtitle, .login-footnote, .login-options) {
  color: #52667d;
}

html[data-theme="light"] .login-language-select,
html[data-theme="light"] .login-card input:not([type="checkbox"]),
html[data-theme="light"] .password-field {
  background: #ffffff;
  border-color: #c9d5e4;
  color: #031e45;
}

html[data-theme="light"] .login-language-select:focus,
html[data-theme="light"] .login-card input:not([type="checkbox"]):focus,
html[data-theme="light"] .password-field:focus-within {
  border-color: #1077d4;
  box-shadow: 0 0 0 3px rgba(16, 119, 212, .13);
}

html[data-theme="light"] .login-card input::placeholder {
  color: #718198;
  opacity: 1;
}

html[data-theme="light"] .login-card .field-label {
  color: #294968;
}

html[data-theme="light"] .login-card .password-toggle-button {
  background: #f3f6fa;
  border-left-color: #c9d5e4 !important;
  color: #294968;
}

html[data-theme="light"] .login-card .password-toggle-button:hover {
  background: #e7eef6;
  color: #062f6b;
}

html[data-theme="light"] .login-card .provider-button,
html[data-theme="light"] .login-card > .sso-button {
  background: #ffffff;
  border-color: #c9d5e4;
  color: #062f6b;
}

html[data-theme="light"] .login-card .provider-button:hover,
html[data-theme="light"] .login-card > .sso-button:hover {
  background: #f3f6fa;
  border-color: #8da5c0;
  color: #031e45;
  box-shadow: none;
}

html[data-theme="light"] .login-mode-switch {
  background: #edf2f7;
  border-color: #c9d5e4;
}

html[data-theme="light"] .login-mode-switch button {
  color: #435a73;
}

html[data-theme="light"] .login-mode-switch button.is-active {
  background: #fff4d2;
  color: #031e45;
  box-shadow: inset 0 0 0 1px rgba(213, 166, 58, .72);
}

html[data-theme="light"] .demo-account-grid {
  gap: 8px;
}

html[data-theme="light"] .demo-account {
  min-height: 56px;
  padding: 10px 14px;
  border-color: #c9d5e4;
  background: #f8fafc;
  color: #031e45;
  cursor: pointer;
}

html[data-theme="light"] .demo-account strong {
  color: #031e45;
}

html[data-theme="light"] .demo-account span {
  color: #52667d;
}

html[data-theme="light"] .demo-account:hover {
  border-color: #8da5c0;
  background: #edf3f8;
}

html[data-theme="light"] .demo-account:focus-visible {
  outline: 3px solid rgba(16, 119, 212, .2);
  outline-offset: 2px;
}

html[data-theme="light"] .demo-account.is-selected {
  border-color: #d5a63a;
  background: #fff4d2;
  box-shadow: inset 4px 0 0 #d5a63a;
}

html[data-theme="light"] .login-options button {
  color: #075da9;
}

html[data-theme="light"] .login-options input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  appearance: none;
  border: 1px solid #8da5c0;
  border-radius: 4px;
  background: #ffffff;
  cursor: pointer;
}

html[data-theme="light"] .login-options input[type="checkbox"]:checked {
  border-color: #1077d4;
  background-color: #1077d4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m3.5 8 3 3 6-7'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 14px;
}

html[data-theme="light"] .login-options input[type="checkbox"]:focus-visible {
  outline: 3px solid rgba(16, 119, 212, .2);
  outline-offset: 2px;
}

html[data-theme="light"] .login-card .login-submit {
  background: #d5a63a;
  border-color: #d5a63a;
  color: #031e45;
}

html[data-theme="light"] #loginForm > .login-footnote {
  margin: 2px 0 0;
  padding-top: 14px;
  border-top: 1px solid #e3e9f0;
  font-size: 12px;
}

html[data-theme="light"] .app-shell,
html[data-theme="light"] .workspace {
  background: #f7f4ed;
}

html[data-theme="light"] .sidebar {
  background: #ffffff;
  border-right-color: #d9e1eb;
  box-shadow: 8px 0 26px rgba(3, 30, 69, .035);
}

html[data-theme="light"] .brand {
  border-bottom-color: rgba(6, 47, 107, .12);
}

html[data-theme="light"] .brand-mark {
  background: #ffffff;
  border-color: rgba(213, 166, 58, .72);
  color: #062f6b;
}

html[data-theme="light"] .nav-group {
  color: #57708f;
}

html[data-theme="light"] .eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #062f6b;
  font-weight: 700;
}

html[data-theme="light"] .eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  flex: 0 0 auto;
  background: #d5a63a;
}

html[data-theme="light"] .nav-item {
  color: #314e72;
}

html[data-theme="light"] .nav-icon {
  color: #1077d4;
}

html[data-theme="light"] .nav-item:hover {
  background: #f3f6fa;
  border-color: #d9e1eb;
}

html[data-theme="light"] .nav-item.is-active {
  background: #eaf3fc;
  border-color: rgba(16, 119, 212, .24);
  color: #062f6b;
  box-shadow: inset 3px 0 0 #d5a63a;
}

html[data-theme="light"] .sidebar-footer {
  border-top-color: #d9e1eb;
}

html[data-theme="light"] .mode-toggle span {
  background: #dce5ef;
  border-color: #c7d3e1;
}

html[data-theme="light"] .mode-toggle span::after {
  right: 19px;
  background: #1077d4;
}

.mode-toggle span::after {
  transition: right .16s ease, background-color .16s ease;
}

html[data-theme="light"] .topbar {
  border-bottom-color: rgba(6, 47, 107, .12);
}

html[data-theme="light"] :is(.search-wrap, .company-search-field, .heatmap-search) {
  background: #ffffff;
  border-color: #d9e1eb;
}

html[data-theme="light"] :is(input, select, textarea),
html[data-theme="light"] :is(.settings-form-grid input, .settings-form-grid select, .note-form textarea, .template-preview textarea) {
  background: #ffffff;
  border-color: #cfd9e5;
  color: #062f6b;
}

html[data-theme="light"] :is(input, textarea)::placeholder {
  color: #7b8797;
}

html[data-theme="light"] :is(input, select, textarea):focus {
  border-color: #1077d4;
  box-shadow: 0 0 0 3px rgba(16, 119, 212, .12);
}

html[data-theme="light"] :is(.search-results, .row-action-menu) {
  background: #ffffff;
  border-color: #d9e1eb;
  box-shadow: var(--shadow);
}

html[data-theme="light"] #screen-dashboard .onboarding-steps button {
  background: #ffffff;
  border-color: #cfd9e5;
  color: #062f6b;
  box-shadow: 0 3px 10px rgba(3, 30, 69, .05);
}

html[data-theme="light"] #screen-dashboard .onboarding-steps button:hover {
  background: #f3f6fa;
  border-color: #d5a63a;
}

html[data-theme="light"] #screen-dashboard .onboarding-steps strong {
  background: #d5a63a;
  color: #031e45;
}

html[data-theme="light"] #screen-dashboard .kpi-card {
  min-height: 184px;
  overflow: hidden;
  grid-template-rows: auto auto auto 58px;
}

html[data-theme="light"] #screen-dashboard .kpi-card canvas {
  display: block;
  width: 100% !important;
  height: 58px !important;
  max-height: 58px;
  align-self: end;
}

html[data-theme="light"] :is(.icon-button, .tenant-pill, .profile-pill, .range-button, .ghost-button, .table-action-button, .pagination button) {
  background: #ffffff;
  border-color: #d9e1eb;
  color: #062f6b;
}

html[data-theme="light"] :is(.primary-button, .export-button) {
  background: #d5a63a;
  border-color: #d5a63a;
  color: #031e45;
}

html[data-theme="light"] :is(.primary-button, .export-button):hover {
  background: #c8972e;
  border-color: #c8972e;
}

html[data-theme="light"] #screen-portfolio .portfolio-scenario-bar,
html[data-theme="light"] #screen-portfolio .portfolio-kpi-card {
  background: #ffffff;
  border-color: #d9e1eb;
}

html[data-theme="light"] #screen-portfolio .segmented-control {
  background: #edf3f8;
  border-color: #cfd9e5;
}

html[data-theme="light"] #screen-portfolio .segmented-control button {
  color: #52667d;
  font-weight: 600;
}

html[data-theme="light"] #screen-portfolio .segmented-control button:is(.is-active, :hover, :focus-visible) {
  background: #fff5d9;
  border-color: #d5a63a;
  color: #031e45;
}

html[data-theme="light"] #screen-portfolio .portfolio-scenario-bar > strong,
html[data-theme="light"] #screen-portfolio .portfolio-kpi-card strong {
  color: #031e45;
}

html[data-theme="light"] #screen-portfolio .portfolio-kpi-card > span,
html[data-theme="light"] #screen-portfolio .portfolio-kpi-card strong small,
html[data-theme="light"] #screen-portfolio .scenario-adjustments label {
  color: #435a73;
}

html[data-theme="light"] #screen-portfolio .scenario-adjustments input {
  background: #ffffff;
  border-color: #cfd9e5;
  color: #062f6b;
}

html[data-theme="light"] #screen-risk .detail-kpi-card strong {
  color: #031e45;
}

html[data-theme="light"] #screen-risk .detail-kpi-card :is(span, small),
html[data-theme="light"] #screen-risk .post-onboarding-head p,
html[data-theme="light"] #screen-risk .post-onboarding-steps small {
  color: #435a73;
}

html[data-theme="light"] #screen-risk :is(
  .risk-financial-kpi-group-head h3,
  .risk-financial-kpi-card strong,
  .risk-snapshot-grid strong,
  .risk-payment-grid strong
) {
  color: #031e45;
}

html[data-theme="light"] #screen-risk :is(
  .risk-financial-kpi-group-head p,
  .risk-financial-kpi-group-head > span,
  .risk-financial-kpi-card span,
  .risk-financial-kpi-card small,
  .risk-snapshot-grid span,
  .risk-snapshot-grid small,
  .risk-payment-grid span,
  .risk-payment-grid small,
  .risk-payment-kpi-hints span
) {
  color: #435a73;
}

html[data-theme="light"] #screen-risk :is(.risk-financial-kpi-card, .risk-snapshot-grid article, .risk-payment-grid article) {
  background: #ffffff;
  border-color: #d9e1eb;
}

html[data-theme="light"] #screen-risk .risk-financial-kpi-group + .risk-financial-kpi-group {
  border-top-color: #d9e1eb;
}

html[data-theme="light"] #screen-risk .risk-payment-kpi-hints span {
  background: #fffaf0;
  border-color: #ead9af;
}

html[data-theme="light"] #screen-risk .risk-payment-kpi-hints b {
  color: #031e45;
}

html[data-theme="light"] #screen-risk .post-onboarding-steps article {
  background: #f3f6fa;
  border-color: #d9e1eb;
}

html[data-theme="light"] #screen-risk .post-onboarding-steps b {
  color: #031e45;
}

html[data-theme="light"] #screen-risk .post-onboarding-steps article.muted i,
html[data-theme="light"] #screen-risk .post-onboarding-panel .status-pill.muted {
  background: #edf3f8;
  border-color: #cfd9e5;
  color: #52667d;
}

html[data-theme="light"] #screen-risk .post-onboarding-panel.is-loading .post-onboarding-steps :is(i, b, small) {
  background: linear-gradient(90deg, #e6edf5, #f7f9fc, #e6edf5);
  background-size: 220% 100%;
}

html[data-theme="light"] #screen-invitations .badge.neutral {
  background: #edf3f8;
  border-color: #cfd9e5;
  color: #435a73;
}

html[data-theme="light"] :is(.kpi-card, .panel, .report-tile, .pricing-card, .company-list-panel, .post-onboarding-panel) {
  background: #ffffff;
  border-color: #d9e1eb;
  box-shadow: var(--shadow);
}

html[data-theme="light"] :is(.kpi-card strong, .file-batch-summary-head strong, .file-count-grid strong, .company-initials) {
  color: #031e45;
}

html[data-theme="light"] :is(.legend-item, .benchmark-row, .stack-item, .driver-card, .settings-line, .toggle-row, .risk-list-item, .metric-row div) {
  background: #f3f6fa;
  border-color: #d9e1eb;
}

html[data-theme="light"] :is(.table-wrap, .company-list-panel) {
  border-color: #d9e1eb;
}

html[data-theme="light"] :is(th, .company-list-table th, .billing-table th) {
  background: #edf3f8;
  color: #49617f;
}

html[data-theme="light"] :is(td, .company-list-table td) {
  background: #ffffff;
  color: #173d6c;
  border-bottom-color: rgba(6, 47, 107, .1);
}

html[data-theme="light"] tbody tr:hover td {
  background: #f4f8fc;
}

html[data-theme="light"] .company-list-table tr.is-selected td {
  background: #fff9e9;
}

html[data-theme="light"] #screen-companies :is(.company-list-name strong, .exposure-cell strong, .updated-cell strong, .forecast-cell strong) {
  color: #062f6b;
}

html[data-theme="light"] #screen-companies :is(.company-list-name small, .exposure-cell small, .updated-cell small, .selected-count, .company-table-footer, .muted) {
  color: #52667d;
}

html[data-theme="light"] #screen-companies .company-list-table tr.is-selected :is(strong, small) {
  color: #031e45;
}

html[data-theme="light"] #screen-companies .forecast-cell span {
  background: #d9e1eb;
}

html[data-theme="light"] #screen-companies .row-menu-button {
  color: #52667d;
}

html[data-theme="light"] #screen-companies .row-menu-button:hover {
  background: #edf3f8;
  color: #062f6b;
}

html[data-theme="light"] #screen-companies .row-action-menu button {
  color: #173d6c;
}

html[data-theme="light"] #screen-companies .row-action-menu button:hover,
html[data-theme="light"] #screen-companies .row-action-menu button:focus-visible {
  background: #edf3f8;
  color: #031e45;
}

html[data-theme="light"] #screen-companies .company-table-footer select {
  background: #ffffff;
  border-color: #cfd9e5;
  color: #062f6b;
}

html[data-theme="light"] :is(.company-row-icon, .company-initials) {
  background: #eaf3fc;
  border-color: #cfe1f4;
  color: #062f6b;
}

html[data-theme="light"] :is(.file-ingestion-panel, .file-upload-card, .file-batch-card, .file-preview-card, .file-batches-card, .file-count-grid div) {
  background: #ffffff;
  border-color: #d9e1eb;
}

html[data-theme="light"] :is(.incremental-upload-progress, .file-batch-row, .file-status-pill) {
  background: #f3f6fa;
  border-color: #d9e1eb;
  color: #173d6c;
}

html[data-theme="light"] :is(.incremental-progress-bar, .risk-center-metric-grid.is-loading span, .risk-center-metric-grid.is-loading strong, .risk-center-metric-grid.is-loading small) {
  background: #dfe7f0;
}

html[data-theme="light"] :is(.audit-report-head, .audit-report-panel, .audit-report-kpi, .audit-detail-card, .audit-finding-detail.is-empty) {
  background: #ffffff;
  border-color: #d9e1eb;
  box-shadow: var(--shadow);
}

html[data-theme="light"] :is(.audit-report-scope, .audit-report-control-list article, .audit-detail-list div, .audit-inline-value-grid div, .noncompliance-tag) {
  background: #f3f6fa;
  border-color: #d9e1eb;
}

html[data-theme="light"] :is(.heatmap-side-card, .heatmap-main-panel) {
  background: #ffffff;
  border-color: #d9e1eb;
  box-shadow: var(--shadow);
}

html[data-theme="light"] .heatmap-risk-row i {
  background: #dfe7f0;
}

html[data-theme="light"] :is(.package-card, .billing-facu-card, .package-compare-card, .locked-feature-card, .billing-subscription-card, .billing-sub-card, .billing-cancel-card) {
  background: #ffffff;
  border-color: #d9e1eb;
  box-shadow: var(--shadow);
}

html[data-theme="light"] :is(.entitlement-list div, .facu-usage-list div, .facu-pack-card, .payment-method-card em, .bank-mini) {
  background: #f3f6fa;
  border-color: #d9e1eb;
  color: #173d6c;
}

html[data-theme="light"] :is(.settings-form-grid label, .contract-scroll) {
  color: #405b7b;
}

html[data-theme="light"] .settings-summary-line {
  background: #f3f6fa;
  border-color: #d9e1eb;
}

html[data-theme="light"] .settings-avatar {
  background: #fff9e9;
  border-color: rgba(213, 166, 58, .65);
  color: #062f6b;
}

html[data-theme="light"] :is(.password-strength i, .login-card .password-strength span, .reset-code-timer span) {
  background: #dfe7f0;
}

.settings-appearance {
  display: grid;
  gap: 12px;
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
}

.settings-appearance > div:first-child {
  display: grid;
  gap: 4px;
}

.settings-appearance > div:first-child > span {
  color: var(--muted);
  font-size: 12px;
}

.theme-segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #09090a;
}

.theme-segmented-control label {
  min-width: 0;
  cursor: pointer;
}

.theme-segmented-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.theme-segmented-control label > span {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
}

.theme-segmented-control i {
  color: currentColor;
  font-size: 17px;
  font-style: normal;
}

.theme-segmented-control b {
  font-size: 13px;
}

.theme-segmented-control input:checked + span {
  border-color: rgba(212, 175, 55, .35);
  background: rgba(212, 175, 55, .14);
  color: var(--gold);
}

.theme-segmented-control input:focus-visible + span {
  outline: 3px solid rgba(16, 119, 212, .2);
  outline-offset: 1px;
}

html[data-theme="light"] .theme-segmented-control {
  background: #e8eef5;
  border-color: #d1dce8;
}

html[data-theme="light"] .theme-segmented-control input:checked + span {
  background: #ffffff;
  border-color: rgba(16, 119, 212, .28);
  color: #062f6b;
  box-shadow: 0 2px 7px rgba(3, 30, 69, .08);
}

html[data-theme="light"] :is(.detail-drawer, .credit-bureau-dialog-panel) {
  background: #ffffff;
  border-color: #d9e1eb;
  color: #062f6b;
  box-shadow: 0 24px 70px rgba(3, 30, 69, .2);
}

html[data-theme="light"] :is(.credit-bureau-dialog-company, .credit-bureau-stepper li > span, .credit-bureau-document-preview, .credit-bureau-privacy-note, .credit-bureau-inline-error) {
  background: #f3f6fa;
  border-color: #d9e1eb;
  color: #405b7b;
}

html[data-theme="light"] .credit-bureau-dialog-head :is(h2, p),
html[data-theme="light"] .credit-bureau-dialog-company strong,
html[data-theme="light"] .credit-bureau-processing > h3,
html[data-theme="light"] .credit-bureau-processing-meta strong,
html[data-theme="light"] .credit-bureau-file-zone,
html[data-theme="light"] .credit-bureau-document-preview-head strong,
html[data-theme="light"] .credit-bureau-consent strong,
html[data-theme="light"] .credit-bureau-privacy-note strong,
html[data-theme="light"] .credit-bureau-result-grid strong,
html[data-theme="light"] .credit-bureau-result-detail strong {
  color: #031e45;
}

html[data-theme="light"] .credit-bureau-dialog-head p,
html[data-theme="light"] .credit-bureau-processing > p:not(.credit-bureau-inline-error),
html[data-theme="light"] .credit-bureau-processing-meta,
html[data-theme="light"] .credit-bureau-processing-stages,
html[data-theme="light"] .credit-bureau-document-preview-head small,
html[data-theme="light"] .credit-bureau-file-zone small,
html[data-theme="light"] .credit-bureau-consent small,
html[data-theme="light"] :is(.credit-bureau-result-grid, .credit-bureau-result-detail) span,
html[data-theme="light"] .credit-bureau-validation ul {
  color: #52667d;
}

html[data-theme="light"] .credit-bureau-dialog-close,
html[data-theme="light"] :is(.credit-bureau-result-grid > div, .credit-bureau-result-detail, .credit-bureau-consent, .credit-bureau-document-preview-head) {
  color: #062f6b;
  background: #ffffff;
  border-color: #d9e1eb;
}

html[data-theme="light"] .credit-bureau-stepper li {
  color: #66758a;
}

html[data-theme="light"] .credit-bureau-stepper li:is(.is-current, .is-complete) {
  color: #062f6b;
}

html[data-theme="light"] .credit-bureau-stepper li:is(.is-current, .is-complete) > span {
  color: #031e45;
  background: #d5a63a;
  border-color: #d5a63a;
}

html[data-theme="light"] .credit-bureau-file-zone {
  background: #fffbf1;
  border-color: rgba(213, 166, 58, .58);
}

html[data-theme="light"] .credit-bureau-processing-track {
  background: #e8eef5;
  border-color: #d1dce8;
}

html[data-theme="light"] .credit-bureau-processing-stages span {
  border-color: #d1dce8;
}

html[data-theme="light"] .credit-bureau-result-status {
  color: #16704d;
  background: #eefaf4;
  border-color: #9bd9bb;
}

html[data-theme="light"] .credit-bureau-result-status.is-review,
html[data-theme="light"] .credit-bureau-validation {
  color: #805600;
  background: #fff8e7;
  border-color: #e6c66f;
}

html[data-theme="light"] .credit-bureau-validation > strong {
  color: #805600;
}

html[data-theme="light"] .credit-bureau-privacy-note.is-success {
  color: #16704d;
  background: #eefaf4;
  border-color: #9bd9bb;
}

html[data-theme="light"] .credit-bureau-inline-error {
  color: #a72f3a;
  background: #fff1f2;
  border-color: #e8a5ab;
}

html[data-theme="light"] :is(.risk-center-metric-grid article, .risk-center-list, .risk-factor-detail-list article, .credit-readiness-summary article, .credit-readiness-section-grid article, .credit-readiness-row, .credit-readiness-missing article, .credit-application-metrics article, .credit-payment-cards article, .credit-application-improvements article, .credit-bank-card, .credit-risk-commentary-grid section) {
  background: #ffffff;
  border-color: #d9e1eb;
}

html[data-theme="light"] .credit-risk-workspace :is(
  .credit-risk-page-head h2,
  .credit-risk-subject-copy h3,
  .credit-risk-score-copy h3,
  .credit-risk-section-head h3,
  .credit-risk-commentary-head h3,
  .credit-risk-empty-detail,
  .credit-risk-empty-detail strong,
  .credit-risk-kpi-grid strong,
  .credit-risk-special-value strong,
  .credit-risk-horizontal-chart strong,
  .credit-risk-section-scores strong,
  .credit-risk-source-grid strong,
  .credit-risk-list-card li strong,
  .credit-risk-table-wrap td
) {
  color: #031e45;
}

html[data-theme="light"] .credit-risk-workspace :is(
  .credit-risk-page-head p,
  .credit-risk-subject-copy p,
  .credit-risk-score-copy p,
  .credit-risk-section-head p,
  .credit-risk-commentary-head p,
  .credit-risk-empty-detail p,
  .credit-risk-chart-note,
  .credit-risk-disclaimer,
  .credit-risk-kpi-grid span,
  .credit-risk-kpi-grid small,
  .credit-risk-section-scores span,
  .credit-risk-section-scores small,
  .credit-risk-source-grid span,
  .credit-risk-list-card li small
) {
  color: #435a73;
}

html[data-theme="light"] .credit-risk-workspace :is(
  .credit-risk-kicker,
  .credit-risk-section-head > span,
  .credit-risk-score-value strong,
  .credit-risk-score-copy > div > span,
  .credit-risk-kpi-grid article.is-gold strong
) {
  color: #8a6200;
}

html[data-theme="light"] .credit-risk-workspace .credit-risk-kpi-grid strong.is-missing {
  color: #52667d;
}

html[data-theme="light"] .credit-risk-workspace .credit-risk-kpi-grid article.is-alert strong {
  color: #b42336;
}

html[data-theme="light"] .credit-risk-workspace :is(
  .credit-risk-progress,
  .credit-risk-horizontal-chart i,
  .credit-risk-section-scores i
) {
  background: #dfe7f0;
}

html[data-theme="light"] .credit-risk-workspace .credit-risk-bucket-chart {
  background-image: linear-gradient(to bottom, rgba(6, 47, 107, .1) 1px, transparent 1px);
}

html[data-theme="light"] .credit-risk-workspace .credit-risk-table-wrap :is(th, td) {
  border-color: #d9e1eb;
}

html[data-theme="light"] .credit-risk-workspace .credit-risk-list-card li {
  border-color: rgba(6, 47, 107, .1);
}

html[data-theme="light"] .credit-risk-workspace .credit-risk-list-card .credit-risk-empty-detail.compact {
  min-height: 104px;
  background: #f7f9fc;
  border-radius: 4px;
}

html[data-theme="light"] :is(
  #screen-risk .risk-financial-kpi-grid.is-loading .risk-financial-kpi-card i,
  #screen-risk .risk-financial-kpi-grid.is-loading .risk-financial-kpi-card b,
  #screen-risk .risk-financial-kpi-grid.is-loading .risk-financial-kpi-card em,
  #screen-risk .risk-payment-grid.is-loading article i,
  #screen-risk .risk-payment-grid.is-loading article b,
  #screen-risk .risk-payment-grid.is-loading article em,
  #screen-risk .risk-factor-detail-list.is-loading article i,
  #screen-risk .risk-factor-detail-list.is-loading article b,
  #screen-risk .risk-factor-detail-list.is-loading article em,
  #screen-risk .credit-risk-subject-skeleton i,
  #screen-risk .credit-risk-subject-skeleton b,
  #screen-risk .credit-risk-subject-skeleton span,
  #screen-risk .credit-risk-workspace.is-loading .credit-risk-kpi-grid span,
  #screen-risk .credit-risk-workspace.is-loading .credit-risk-kpi-grid strong,
  #screen-risk .credit-risk-workspace.is-loading .credit-risk-kpi-grid small,
  #screen-risk .credit-risk-loading-panels article,
  .skeleton-line
) {
  background: linear-gradient(90deg, #e5edf5, #f7f9fc, #e5edf5);
  background-size: 220% 100%;
}

html[data-theme="light"] #screen-risk .risk-center-metric-grid.is-loading article {
  background: linear-gradient(90deg, #f3f6fa, #ffffff, #f3f6fa);
}

html[data-theme="light"] :is(.risk-subtabs, .credit-risk-mode, .segmented-control) {
  background: #e8eef5;
  border-color: #d1dce8;
}

html[data-theme="light"] #screen-v2-command :is(.v2-command-head, .panel, .list-row, .audit-native-signal, .ai-action-row, .trust-data-card, .network-health-grid > div, .network-search, .network-icon-button, .network-request-button, .network-back-button, .network-profile-editor input, .network-profile-editor textarea, .network-suggestion-row, .network-round-action, .chart-box, .mini-chart, .heatmap, .cfo-action-tile, .cfo-period-select, .cfo-expense-menu-list, .tenant-key-input textarea, .sector-update-row select) {
  background: #ffffff;
  border-color: #d9e1eb;
  color: #062f6b;
  box-shadow: none;
}

html[data-theme="light"] #screen-v2-command .audit-native-hero {
  border-color: #d9e1eb;
  border-left: 4px solid #d5a63a;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(3, 30, 69, .08);
}

html[data-theme="light"] #screen-v2-command .audit-native-hero h2 {
  color: #031e45;
}

html[data-theme="light"] #screen-v2-command .audit-native-hero .muted {
  color: #435a73;
}

html[data-theme="light"] #screen-v2-command :is(.cfo-view-all-button, .cfo-expense-menu-button, .cfo-system-list .list-row, .market-ai-card .list-row) {
  background: #f3f6fa;
  border-color: #d9e1eb;
  color: #405b7b;
}

html[data-theme="light"] :is(.chart-tooltip, .toast) {
  background: #031e45;
  border-color: rgba(213, 166, 58, .72);
  color: #ffffff;
  box-shadow: 0 14px 34px rgba(3, 30, 69, .24);
}

/* Module-specific surfaces that use fixed dark colors in the default theme. */
html[data-theme="light"] .trade-registry-page .audit-dashboard-head,
html[data-theme="light"] .trade-registry-page .audit-dashboard-section {
  border-color: #d9e1eb;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(3, 30, 69, .08);
  backdrop-filter: none;
}

html[data-theme="light"] .trade-registry-page .audit-dashboard-head {
  border-left: 4px solid #d5a63a;
}

html[data-theme="light"] .trade-registry-page .audit-scope-card,
html[data-theme="light"] .trade-registry-page .audit-kpi-card,
html[data-theme="light"] .trade-registry-page :is(.session-status-card, .manual-login-steps li) {
  border-color: #d9e1eb;
  background: #f3f6fa;
  color: #062f6b;
  box-shadow: none;
  backdrop-filter: none;
}

html[data-theme="light"] .trade-registry-page .trade-registry-form input {
  border-color: #cfd9e5;
  background: #ffffff;
  color: #062f6b;
}

html[data-theme="light"] .trade-registry-page .trade-registry-login-form {
  border-color: #d9e1eb;
  background: #ffffff;
}

html[data-theme="light"] .alert-filter-bar {
  border-color: #d9e1eb;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(3, 30, 69, .06);
}

html[data-theme="light"] .alert-filter-bar :is(input, select) {
  border-color: #cfd9e5;
  background: #f8fafc;
  color: #062f6b;
}

html[data-theme="light"] .alert-card {
  box-shadow: 0 8px 22px rgba(3, 30, 69, .055);
}

html[data-theme="light"] :is(.alert-card-description, .alert-card small) {
  color: #435a73;
}

html[data-theme="light"] .audit-dashboard-page :is(
  .audit-dashboard-head,
  .audit-kpi,
  .audit-dashboard-section,
  .audit-priority-section,
  .audit-chart-card,
  .audit-compliance-card
) {
  border-color: #d9e1eb;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(3, 30, 69, .08);
  backdrop-filter: none;
}

html[data-theme="light"] .audit-dashboard-page .audit-dashboard-head {
  border-left: 4px solid #d5a63a;
}

html[data-theme="light"] .audit-dashboard-page .audit-scope-card,
html[data-theme="light"] .audit-dashboard-page :is(.audit-signal-card, .audit-priority-alert) {
  border-color: #d9e1eb;
  background: #f3f6fa;
  color: #062f6b;
  backdrop-filter: none;
}

html[data-theme="light"] .audit-dashboard-page .audit-kpi::after {
  display: none;
}

html[data-theme="light"] .audit-dashboard-page .audit-kpi strong {
  color: #031e45;
}

html[data-theme="light"] .audit-dashboard-page .audit-kpi.red strong {
  color: #b42336;
}

html[data-theme="light"] .audit-dashboard-page :is(.audit-mini-progress, .audit-html-grid) {
  background: #dce5ef;
}

html[data-theme="light"] .audit-dashboard-page .audit-range-toggle {
  border-color: #d1dce8;
  background: #e8eef5;
}

html[data-theme="light"] .audit-dashboard-page .audit-range-toggle button.is-active {
  border-color: rgba(16, 119, 212, .28);
  background: #ffffff;
  color: #062f6b;
}

html[data-theme="light"] .audit-dashboard-page :is(.audit-priority-alert small, .audit-chart-card h3) {
  color: #52667d;
}

html[data-theme="light"] #screen-v2-command :is(.kpi-value, .cfo-action-tile strong, .ai-board-item strong) {
  color: #031e45;
}

html[data-theme="light"] #screen-v2-command .cfo-action-tile.red {
  border-color: rgba(200, 63, 73, .3);
  background: #fff3f4;
}

html[data-theme="light"] #screen-v2-command .cfo-action-tile.gold {
  border-color: rgba(213, 166, 58, .38);
  background: #fffaf0;
}

html[data-theme="light"] #screen-v2-command .cfo-score-card .card-body {
  background: #ffffff;
}

html[data-theme="light"] #screen-v2-command .cfo-gauge text {
  fill: #031e45 !important;
}

html[data-theme="light"] #screen-v2-command .cfo-gauge text tspan {
  fill: #52667d !important;
}

html[data-theme="light"] #screen-v2-command :is(.line-grid, .cfo-chart-card .line-grid) {
  stroke: rgba(6, 47, 107, .16);
}

html[data-theme="light"] #screen-v2-command .axis-label {
  fill: #52667d;
}

html[data-theme="light"] #screen-v2-command :is(.cfo-period-select, .cfo-expense-menu-list, .cfo-plan-button) {
  border-color: #cfd9e5;
  background: #ffffff;
  color: #062f6b;
}

html[data-theme="light"] .incremental-ledger-card {
  border-color: rgba(213, 166, 58, .48);
  background: #fffaf0;
}

html[data-theme="light"] .incremental-ledger-form :is(select, input[type="date"], input[type="text"], input[type="file"], input:not([type])) {
  border-color: #c8d5e4;
  background: #ffffff;
  color: #062f6b;
}

html[data-theme="light"] .incremental-ledger-form input[type="file"] {
  padding: 4px;
}

html[data-theme="light"] .incremental-ledger-form input[type="file"]::file-selector-button {
  min-height: 30px;
  margin-right: 10px;
  border: 0;
  border-right: 1px solid #c8d5e4;
  border-radius: 5px;
  background: #eaf3fc;
  color: #062f6b;
  font-weight: 700;
  cursor: pointer;
}

html[data-theme="light"] .incremental-upload-progress {
  border-color: #d9e1eb;
  background: #f3f6fa;
}

html[data-theme="light"] :is(.field-label, .form-grid label, .template-preview label) {
  color: #435a73;
}

html[data-theme="light"] .file-drop-zone strong {
  color: #173d6c;
}

html[data-theme="light"] .org-access-section h3 {
  color: #031e45;
}

html[data-theme="light"] .checkbox-grid label {
  border-color: #cfd9e5;
  background: #f3f6fa;
  color: #173d6c;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

html[data-theme="light"] .checkbox-grid label:has(input:checked) {
  border-color: rgba(16, 119, 212, .48);
  background: #eaf3fc;
  box-shadow: inset 3px 0 0 #1077d4;
}

html[data-theme="light"] :is(.checkbox-grid, .incremental-ledger-engines, .toggle-row, .file-strict-toggle) input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin: 0;
  appearance: none;
  border: 1px solid #9eafc2;
  border-radius: 5px;
  background: #ffffff center / 12px 12px no-repeat;
  cursor: pointer;
}

html[data-theme="light"] :is(.checkbox-grid, .incremental-ledger-engines, .toggle-row, .file-strict-toggle) input[type="checkbox"]:checked {
  border-color: #1077d4;
  background-color: #1077d4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.2' d='m3.2 8.2 3 3.1 6.7-7'/%3E%3C/svg%3E");
}

html[data-theme="light"] :is(.checkbox-grid, .incremental-ledger-engines, .toggle-row, .file-strict-toggle) input[type="checkbox"]:focus-visible {
  outline: 3px solid rgba(16, 119, 212, .2);
  outline-offset: 2px;
}

html[data-theme="light"] :is(.checkbox-grid, .incremental-ledger-engines, .toggle-row, .file-strict-toggle) input[type="checkbox"]:disabled {
  border-color: #c9d2dd;
  background-color: #e5eaf0;
  cursor: not-allowed;
}

html[data-theme="light"] #orgCompanyChecks {
  opacity: 1 !important;
}

html[data-theme="light"] #orgCompanyChecks label:has(input:disabled) {
  background: #eef1f5;
  color: #5d6d80;
  cursor: not-allowed;
}

html[data-theme="light"] .org-access-pill {
  background: #e6f2fb;
  color: #24527f;
}

html[data-theme="light"] .billing-hero {
  border-bottom-color: #d9e1eb;
  border-left: 4px solid #d5a63a;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(3, 30, 69, .055);
}

html[data-theme="light"] .billing-hero :is(h1, p) {
  color: #031e45;
}

html[data-theme="light"] :is(.billing-facu-card, .package-compare-card, .locked-feature-card, .admin-billing-card) :is(span, small, p) {
  color: #526274;
}

html[data-theme="light"] :is(.billing-facu-card, .package-compare-card, .locked-feature-card, .admin-billing-card) strong,
html[data-theme="light"] .billing-card-head h2 {
  color: #031e45;
}

html[data-theme="light"] .entitlement-chip-grid span {
  border-color: #9ed9bd;
  background: #edf9f3;
  color: #126943;
}

html[data-theme="light"] .entitlement-chip-grid span.is-locked {
  border-color: #efb3ba;
  background: #fff2f3;
  color: #9d2833;
}

html[data-theme="light"] .entitlement-chip-grid b,
html[data-theme="light"] :is(.entitlement-list, .facu-usage-list, .facu-pack-grid) span {
  color: #526274;
}

@media (max-width: 820px) {
  html[data-theme="light"] .login-brand-panel {
    padding: 24px 18px 28px;
    gap: 20px;
  }

  html[data-theme="light"] .login-hero h1 {
    margin-bottom: 12px;
    font-size: 34px;
    line-height: 1.08;
  }

  html[data-theme="light"] .login-hero p:last-child {
    font-size: 15px;
    line-height: 1.55;
  }

  html[data-theme="light"] .login-metrics {
    display: none;
  }
}

@media (max-width: 520px) {
  html[data-theme="light"] .social-auth-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 980px) {
  html[data-theme="light"] .org-access-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-theme="light"] :is(.org-user-form-panel, .org-user-list-panel) {
    min-width: 0;
  }
}

@media (max-width: 720px) {
  html[data-theme="light"] .topbar-actions {
    min-width: 0;
    margin-left: auto;
  }

  html[data-theme="light"] .topbar-actions :is(.role-switcher, .tenant-pill) {
    display: none;
  }

  .theme-segmented-control {
    grid-template-columns: 1fr;
  }

  html[data-theme="light"] .trade-registry-page,
  html[data-theme="light"] .trade-registry-page .audit-dashboard-section,
  html[data-theme="light"] .trade-registry-page .audit-table-wrap {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  html[data-theme="light"] .trade-registry-page .audit-table-wrap {
    display: block;
    overflow-x: auto;
  }

  html[data-theme="light"] .checkbox-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-theme="light"] .billing-hero {
    margin: 0 0 24px;
    padding: 16px;
    align-items: stretch;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mode-toggle span::after,
  .theme-segmented-control label > span {
    transition: none;
  }
}
