/* MDL UI system · 2.38.0_06c
   One final layer for public and staff screens. Participant/report layouts keep their own rules. */
.app-frame, .mdl-site {
    --primary: #3443bd;
    --primary-dark: #293697;
    --soft: #eef0fb;
    --line: #e2e6ed;
    --muted: #526079;
    --mdl-accent: #3443bd;
    --ui-space: 24px;
    --ui-radius: 10px;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: #172033;
}
.app-frame { background: #f6f7f9; min-width: 0; }
:is(.app-frame, .mdl-site) h1 { font-weight: 700; letter-spacing: -.035em; }
.app-frame h1 { font-size: clamp(1.75rem, 2.6vw, 2.25rem); }
.app-frame h2 { font-size: 1.125rem; font-weight: 650; letter-spacing: -.02em; }
:is(.app-frame, .mdl-site) h3 { font-weight: 650; }
.app-frame .workspace { min-width: 0; padding-top: 32px; }
.app-frame .page-heading { align-items: flex-start; gap: 20px; margin-bottom: 24px; }
.app-frame .page-heading > div:first-child { min-width: 0; }
.app-frame .page-heading p { max-width: 720px; font-size: .9375rem; }
.app-frame .page-heading .eyebrow { color: var(--muted); font-size: .6875rem; letter-spacing: .08em; }
.app-frame .page-heading > :is(.button-row, .button, .mud-button-root) { flex-shrink: 0; }
.app-frame .page-heading .button-row { justify-content: flex-end; max-width: 48%; }
:is(.app-frame, .mdl-site) .card { border: 1px solid var(--line); border-radius: var(--ui-radius); box-shadow: none; }
/* Native forms and Mud buttons share the same dimensions and hierarchy. */
:is(.app-frame, .mdl-site) .button, .app-frame .portal-action.mud-button-root {
    min-height: 42px; border-radius: 7px; padding: 10px 15px; font-size: .8125rem;
    line-height: 1.4; font-weight: 600; text-transform: none; letter-spacing: normal; box-shadow: none;
}
:is(.app-frame, .mdl-site) .button.primary { background: var(--primary); color: #fff; }
:is(.app-frame, .mdl-site) .button.secondary { background: #fff; color: var(--primary-dark); border: 1px solid #cbd3e5; }
:is(.app-frame, .mdl-site) .button.ghost { background: transparent; color: var(--muted); }
:is(.app-frame, .mdl-site) .button.primary:hover { background: var(--primary-dark); }
:is(.app-frame, .mdl-site) .button.secondary:hover, :is(.app-frame, .mdl-site) .button.ghost:hover { background: var(--soft); }
:is(.app-frame, .mdl-site) .button:hover { box-shadow: none; transform: none; }
.app-frame .button.compact { min-height: 36px; padding: 7px 10px; font-size: .8125rem; }
.app-frame .portal-action.mud-button-outlined { border-color: #cbd3e5; background: #fff; }
.app-frame .portal-action .mud-button-label { gap: 8px; }
/* Disclosure navigation remains native, keyboard accessible, and bounded to the header. */
.app-frame .topbar { position: relative; z-index: 20; min-height: 76px; background: #fff; box-shadow: none; backdrop-filter: none; }
.app-frame .brand-mark { background: var(--primary); border-radius: 10px; box-shadow: none; }
.app-frame .app-nav { gap: 6px; }
.app-frame .nav-dropdown { margin: 0; padding: 0; border: 0; }
.app-frame .nav-dropdown > summary { display: flex; align-items: center; gap: 10px; min-height: 42px; border-radius: 7px; font-weight: 600; }
.app-frame .nav-dropdown:has(a.active) > summary { color: var(--primary-dark); background: var(--soft); }
.app-frame .nav-dropdown-menu { width: 264px; max-width: calc(100vw - 32px); max-height: 65vh; overflow-y: auto; border-radius: 10px; padding: 6px; box-shadow: 0 10px 30px #17203314; }
.app-frame .nav-dropdown-menu a, .app-frame .nav-menu-button { min-height: 42px; padding: 10px 12px; border-radius: 6px; font-size: .8125rem; font-weight: 600; overflow-wrap: anywhere; }
.app-frame .nav-dropdown-menu a.active { background: var(--soft); color: var(--primary-dark); box-shadow: inset 3px 0 var(--primary); }
.app-frame .account-menu { margin-left: 6px; padding-left: 8px; border-left: 1px solid var(--line); }
/* Three/six indicators use three columns; the four-item overview has its own explicit grid. */
.app-frame .commercial-kpi-grid, .app-frame .seller-summary-grid, .app-frame .specialist-overview { display: grid; gap: 16px; margin-bottom: 24px; align-items: stretch; }
.app-frame .commercial-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.app-frame .dashboard-kpis-four, .app-frame .seller-summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.app-frame .specialist-overview { grid-template-columns: 1fr 1fr 1.4fr; }
.app-frame .dashboard-metric { display: flex; flex-direction: column; min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--ui-radius); background: #fff; }
.app-frame .metric-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .8125rem; line-height: 1.5; font-weight: 600; }
.app-frame .metric-heading .mud-icon-root { flex-shrink: 0; margin-top: 2px; color: var(--primary); }
.app-frame .metric-value { display: block; margin: 14px 0 8px; font-size: clamp(1.375rem, 2.1vw, 1.875rem); font-weight: 650; letter-spacing: -.035em; line-height: 1.25; font-variant-numeric: tabular-nums; color: #172033; overflow-wrap: anywhere; }
.app-frame .dashboard-metric small { display: block; margin-top: auto; font-size: .75rem; line-height: 1.6; color: var(--muted); }
.app-frame .dashboard-overview-note { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 24px; margin-bottom: 28px; border-color: var(--line); }
.app-frame .dashboard-overview-note p { margin: 6px 0 0; font-size: .875rem; }
.app-frame .dashboard-overview-note a { flex-shrink: 0; }
.app-frame .dashboard-next-step { display: flex; align-items: flex-start; gap: 16px; min-width: 0; padding: 22px; border-color: var(--line); }
.app-frame .dashboard-next-step > .mud-icon-root { flex-shrink: 0; }
.app-frame .dashboard-next-step strong { font-size: .9375rem; font-weight: 600; }
.app-frame .dashboard-next-step p { margin: 8px 0 14px; font-size: .8125rem; }
.app-frame .dashboard-loading { height: 3px; margin-bottom: 16px; }
/* Panels: headings inside padded workbench cards must not receive a second padding. */
.app-frame .section-heading { align-items: center; gap: 16px; margin-bottom: 20px; }
.app-frame .section-heading h2 { margin-bottom: 6px; }
.app-frame .section-heading p { margin-bottom: 0; font-size: .8125rem; }
.app-frame .results-card { margin-bottom: 24px; }
.app-frame .commercial-dashboard-grid { gap: 20px; margin-bottom: 24px; align-items: stretch; }
.app-frame .commercial-dashboard-card { min-width: 0; padding: 24px; margin: 0; }
.app-frame .commercial-dashboard-card > .section-heading { padding: 0; }
.app-frame .seller-filter-card { padding: 20px 24px; margin-bottom: 24px; }
.app-frame .seller-dashboard-filter-grid .field { margin-bottom: 0; }
.app-frame .field { color: #344054; font-size: .8125rem; line-height: 1.5; font-weight: 600; }
.app-frame .field input:not([type=checkbox]):not([type=radio]), .app-frame .field select {
    min-height: 42px; border-radius: 7px; border: 1px solid #cfd6e3; background: #fff; font-size: .875rem; font-weight: 400;
}
.app-frame .field :is(input, select, textarea).invalid { border-color: #b42318; }
.app-frame .muted-note { font-size: .8125rem; line-height: 1.6; margin: 12px 0 0; }
.app-frame .pagination .muted-note { margin: 0; }
/* One scroll owner per table. All data remains in the original rows and columns. */
.app-frame .table-scroll { max-width: 100%; min-width: 0; overflow: auto; scrollbar-gutter: stable; }
.app-frame .table-scroll .dashboard-table { overflow: visible; width: 100%; border-radius: 0; background: #fff; }
.app-frame .table-scroll .dashboard-table .mud-table-container { overflow: visible; }
.app-frame .dashboard-table table { width: 100%; border-collapse: collapse; text-align: left; }
.app-frame .dashboard-table table th { padding: 13px 16px; background: #f7f8fa; color: var(--muted); font-size: .75rem; font-weight: 650; text-transform: none; letter-spacing: 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.app-frame .dashboard-table table td { padding: 14px 16px; color: #344054; font-size: .8125rem; line-height: 1.55; border-bottom: 1px solid #edf0f4; vertical-align: middle; font-variant-numeric: tabular-nums; }
.app-frame .dashboard-table table td strong { color: #172033; font-weight: 600; }
.app-frame .dashboard-table table tbody tr:hover { background: #f8f9fc; }
.app-frame .dashboard-table .table-subline { display: block; font-size: .75rem; color: var(--muted); line-height: 1.5; margin-top: 4px; }
.app-frame .dashboard-table .dashboard-empty-cell { padding: 32px 20px; text-align: center; color: var(--muted); white-space: normal; background: #fafbfc; }
.app-frame .status-pill { border-radius: 5px; padding: 4px 8px; font-size: .75rem; line-height: 1.5; font-weight: 600; }
.app-frame .status-pill.done { background: #eaf5ee; color: #196742; }
.app-frame .status-pill.inactive { background: #f1f2f5; color: var(--muted); }
.app-frame :is(.count-pill, .soft-pill) { border-radius: 6px; background: #f1f3f8; color: var(--muted); font-size: .75rem; }
/* Sales and consumption use one palette in both legends and both graph families. */
.app-frame .commercial-series-row { grid-template-columns: 44px minmax(0, 1fr) 70px; }
.app-frame .commercial-series-bars { display: grid; gap: 5px; }
.app-frame .commercial-series-bars .mud-progress-linear { height: 6px; border-radius: 3px; }
.app-frame :is(.commercial-series-date, .commercial-series-value) { font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.app-frame :is(.legend-sold, .commercial-bar.sold) { background: #3443bd; }
.app-frame :is(.legend-consumed, .commercial-bar.consumed) { background: #197a70; }
.app-frame .commercial-ranking-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
.app-frame .commercial-ranking-row > div { min-width: 0; overflow-wrap: anywhere; }
.app-frame .commercial-bar-track { min-width: 0; }
/* Administrative shortcuts form a secondary, compact navigation group. */
.app-frame .dashboard-shortcuts { margin-block: 28px; }
.app-frame .dashboard-shortcuts > .section-heading { margin-bottom: 16px; }
.app-frame .admin-menu-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 0; }
.app-frame .admin-menu-item { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 8px 12px; align-content: start; padding: 20px; min-width: 0; border: 1px solid var(--line); border-radius: var(--ui-radius); background: #fff; box-shadow: none; }
.app-frame .admin-menu-item > .mud-icon-root { color: var(--muted); width: 22px; height: 22px; grid-row: span 2; }
.app-frame .admin-menu-item strong { color: #172033; font-size: .875rem; line-height: 1.45; font-weight: 600; }
.app-frame .admin-menu-item span { font-size: .8125rem; line-height: 1.6; color: var(--muted); }
.app-frame .admin-menu-item:hover { background: #fafbfe; border-color: #adb7dc; transform: none; }
.app-frame .results-context-note { padding: 18px 22px; background: #fafbfe; }
.app-frame .results-context-note strong { font-size: .8125rem; }
.app-frame .results-context-note p { font-size: .8125rem; }
.app-frame .empty-state { margin: 16px; padding: 28px 20px; border: 1px dashed #d9dee8; border-radius: 8px; background: #fafbfc; }
.app-frame .commercial-dashboard-card .empty-state { margin: 0; }
.app-frame .empty-state h3 { font-size: 1rem; }
.app-frame .empty-state p { font-size: .875rem; }
.app-frame .app-footer { background: transparent; border-top: 1px solid var(--line); font-size: .75rem; }
/* Public pages retain native SSR forms and their editorial scale. */
.mdl-site { background: #fafbfc; }
.mdl-site .mdl-header-inner { min-height: 84px; }
.mdl-site .mdl-nav > a { min-height: 42px; border-radius: 7px; font-weight: 600; }
.mdl-site :is(.mdl-service-card, .mdl-diagnostic-card, .mdl-about-teaser, .mdl-form-card, .mdl-interest-note, .mdl-factor-grid article) { border-radius: 12px; box-shadow: none; border-color: var(--line); }
.mdl-site .mdl-service-card { padding: 28px; border-top-width: 1px; }
.mdl-site .mdl-hero h1 { letter-spacing: -.04em; }
.mdl-site .field-label { display: flex; flex-wrap: wrap; gap: 4px; align-items: baseline; }
.mdl-site .field-optional { color: var(--muted); font-size: .75rem; font-weight: 400; }
.mdl-site .mdl-consent { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 12px; align-items: start; max-width: 100%; }
.mdl-site .mdl-consent input[type=checkbox] { width: 18px; height: 18px; min-height: 18px; padding: 0; margin: 3px 0 0; accent-color: var(--primary); }
.mdl-site .mdl-consent span { min-width: 0; overflow-wrap: anywhere; }
.mdl-site .mdl-footer-domain { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
:is(.app-frame, .mdl-site) :is(a, button, summary, input, select, textarea, [tabindex]):focus-visible { outline: 3px solid #8290d5; outline-offset: 3px; }
@media (max-width: 1100px) {
    .app-frame .dashboard-kpis-four, .app-frame .seller-summary-grid, .app-frame .admin-menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .app-frame .specialist-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .app-frame .dashboard-next-step { grid-column: 1 / -1; }
    .app-frame .page-heading { flex-wrap: wrap; }
    .app-frame .page-heading .button-row { max-width: 100%; justify-content: flex-start; }
}
@media (max-width: 820px) {
    .app-frame .commercial-dashboard-grid { grid-template-columns: minmax(0, 1fr); }
    .app-frame .commercial-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .app-frame .dashboard-overview-note { align-items: flex-start; flex-direction: column; gap: 16px; }
}
@media (max-width: 760px) {
    .app-frame .page-heading { flex-direction: column; }
    .app-frame .topbar { padding: 16px 20px; gap: 12px; align-items: flex-start; }
    .app-frame .app-nav { width: 100%; gap: 4px; }
    .app-frame .account-menu { margin-left: 0; padding-left: 0; border-left: 0; }
    .app-frame .nav-dropdown-menu { left: 16px !important; right: 16px !important; width: auto; min-width: 0; max-width: none; }
}
@media (max-width: 560px) {
    .app-frame .commercial-kpi-grid, .app-frame .seller-summary-grid, .app-frame .specialist-overview, .app-frame .admin-menu-grid { grid-template-columns: minmax(0, 1fr); }
    .app-frame .dashboard-next-step { grid-column: auto; }
    .app-frame .dashboard-metric { padding: 18px 20px; }
    .app-frame .metric-value { font-size: 1.875rem; }
    .app-frame .commercial-dashboard-card { padding: 20px; }
    .app-frame .seller-filter-card { padding: 20px; }
    .portal-workspace .app-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .portal-workspace .nav-dropdown > summary { justify-content: space-between; font-size: .8125rem; padding: 10px 12px; }
    .mdl-site .mdl-service-card { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
    :is(.app-frame, .mdl-site) * { transition: none !important; }
    /* Preserve a visible static progress cue when motion is disabled. */
    .app-frame .dashboard-loading { background: #cbd3ed; }
}
@media print {
    .app-frame :is(.topbar, .app-footer, .dashboard-shortcuts, .seller-filter-card, .dashboard-loading, .portal-action, .button, .pagination) { display: none !important; }
    .app-frame { background: #fff; }
    .app-frame .table-scroll, .app-frame .admin-commercial-table { overflow: visible; max-height: none; }
    .app-frame .commercial-dashboard-grid { display: block; }
    .app-frame .commercial-dashboard-card { margin-bottom: 20px; }
    .app-frame .dashboard-metric { break-inside: avoid; }
}
/* v2.38.0_06e: temporal indicators use the same cards, type and palette. */
.app-frame .commercial-trends { margin-bottom: 28px; }
.app-frame .trend-grouping { width: 170px; margin-bottom: 0; flex-shrink: 0; }
.app-frame .trend-period { margin: -8px 0 18px; color: var(--muted); font-size: .8125rem; }
.app-frame .trend-chart-card { min-width: 0; padding: 22px; border-color: var(--line); border-radius: var(--ui-radius); }
.app-frame .trend-chart-card h3 { font-size: 1rem; margin-bottom: 6px; }
.app-frame .trend-chart-card > p { font-size: .8125rem; margin-bottom: 18px; }
.app-frame .trend-chart-scroll { width: 100%; min-width: 0; overflow-x: auto; }
.app-frame .trend-chart-canvas { width: 100%; }
.app-frame .trend-chart-canvas .mud-chart { width: 100%; }
.app-frame .trend-empty { padding: 28px 24px; border-color: var(--line); border-radius: var(--ui-radius); background: #fafbfc; }
.app-frame .trend-empty h3 { font-size: 1rem; }
.app-frame .trend-empty p { margin-bottom: 0; font-size: .875rem; }
.app-frame .trend-data-details { border: 1px solid var(--line); border-radius: var(--ui-radius); padding: 0; background: #fff; }
.app-frame .trend-data-details > summary { padding: 14px 20px; cursor: pointer; color: var(--primary-dark); font-size: .8125rem; font-weight: 600; }
.app-frame .trend-data-details > .table-scroll { border-top: 1px solid var(--line); }
.app-frame .dashboard-single-panel { grid-template-columns: minmax(0,1fr); }
.app-frame #commercial-sales { scroll-margin-top: 24px; }
/* Give the actual address room, keeping the other channels compact. */
.mdl-site .mdl-contact-section { grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: 32px; }
.mdl-site .mdl-contact-links { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: "email email email" "phone instagram linkedin"; gap: 12px; }
.mdl-site .mdl-contact-email { grid-area: email; }
.mdl-site .mdl-contact-phone { grid-area: phone; }
.mdl-site .mdl-contact-instagram { grid-area: instagram; }
.mdl-site .mdl-contact-linkedin { grid-area: linkedin; }
.mdl-site .mdl-contact-email { grid-column: 1 / -1; }
.mdl-site .mdl-contact-email strong { font-size: .9375rem; line-height: 1.5; }
.mdl-site .mdl-contact-links a { min-width: 0; min-height: 76px; padding: 16px 18px; }
.mdl-site .mdl-contact-phone, .mdl-site .mdl-contact-linkedin { min-height: 68px; }
@media (min-width: 1000px) {
    .mdl-site .mdl-contact-links { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
    .mdl-site .mdl-contact-email { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
    .app-frame .commercial-trends > .section-heading { align-items: flex-start; flex-wrap: wrap; }
    .mdl-site .mdl-contact-section { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 560px) {
    .app-frame .trend-chart-card { padding: 18px; }
    .app-frame .trend-grouping { width: 100%; }
    .mdl-site .mdl-contact-links { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "email email" "phone linkedin" "instagram instagram"; }
    .mdl-site .mdl-contact-email { grid-column: 1 / -1; padding: 16px 12px; }
    .mdl-site .mdl-contact-email strong { font-size: .8125rem; overflow-wrap: anywhere; }
    .mdl-site .mdl-contact-instagram { grid-column: 1 / -1; }
}
@media print {
    .app-frame .trend-grouping { display: none; }
    .app-frame .trend-chart-scroll { overflow: visible; }
    .app-frame .trend-chart-canvas { min-width: 0 !important; }
}

/* v2.38.0_06f — compact tier policies inside commercial tables */
.credit-price-tier-summary { display: grid; gap: 4px; min-width: 160px; font-variant-numeric: tabular-nums; }
.credit-price-tier-summary span { font-size: .875rem; line-height: 1.5; }

/* v2.38.0_06g — commercial proposals */
.commercial-subnav { margin: -8px 0 24px; flex-wrap: wrap; }
.commercial-section-title { margin-top: 28px; }
.commercial-checks { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; margin: 18px 0; }
.commercial-checks input { width: auto; }
.commercial-tax-editor { display: grid; grid-template-columns: 1.1fr .55fr .65fr 1.2fr 1.1fr 1.2fr auto; gap: 12px; align-items: end; padding: 18px 0; border-bottom: 1px solid var(--portal-border, #e1e5ed); }
.commercial-proposal-line-editor { display: grid; grid-template-columns: minmax(200px, 1.6fr) minmax(150px, 1.2fr) repeat(4, minmax(85px, .8fr)) auto; gap: 12px; align-items: end; padding: 18px 0; border-bottom: 1px solid var(--portal-border, #e1e5ed); }
.commercial-chart-scroll { overflow-x: auto; }
.commercial-document { padding: 36px; color: #263043; background: white; }
.commercial-document-header { display: flex; justify-content: space-between; gap: 24px; border-bottom: 2px solid #3443bd; padding-bottom: 22px; margin-bottom: 24px; }
.commercial-document .commercial-document-header h2 { font-size: 1.75rem; margin: 6px 0; }
.commercial-document-header p { margin: 4px 0; font-size: .875rem; }
.commercial-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; margin-bottom: 28px; }
.commercial-parties p { margin: 5px 0; font-size: .875rem; overflow-wrap: anywhere; }
.commercial-document h2 { font-size: 1.1rem; margin: 22px 0 12px; }
.commercial-document h3 { font-size: .95rem; margin: 16px 0 6px; }
.commercial-document-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.commercial-document-table th { background: #f4f6fa; text-align: left; }
.commercial-document-table td, .commercial-document-table th { padding: 12px 10px; border-bottom: 1px solid #e1e5ed; vertical-align: top; }
.commercial-document-summary { display: flex; justify-content: flex-end; margin: 22px 0; }
.commercial-document-summary dl { width: min(100%, 420px); margin: 0; }
.commercial-document-summary dl div { display: flex; justify-content: space-between; gap: 24px; padding: 8px 0; }
.commercial-document-summary dd { margin: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.commercial-total { font-weight: 700; border-top: 1px solid #e1e5ed; }
.commercial-preserve-lines, .commercial-document-terms p, .commercial-document-footer p { white-space: pre-wrap; }
.commercial-document-footer { border-top: 1px solid #e1e5ed; margin-top: 24px; padding-top: 18px; font-size: .8125rem; color: #536078; }
.commercial-draft-banner { background: #fff6df; color: #78500b; padding: 12px; }
@media (max-width: 1100px) {
  .commercial-tax-editor { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .commercial-proposal-line-editor { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .commercial-tax-editor, .commercial-proposal-line-editor { grid-template-columns: 1fr 1fr; }
  .commercial-proposal-line-editor > :first-child { grid-column: 1 / -1; }
  .commercial-document { padding: 20px 16px; }
  .commercial-document-header { flex-direction: column; }
  .commercial-parties { grid-template-columns: 1fr; gap: 16px; }
}
@media print {
  @page { size: A4; margin: 14mm; }
  .app-header, .app-footer, .no-print, #blazor-error-ui { display: none !important; }
  .workspace.page-shell { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  .proposal-print { border: 0 !important; box-shadow: none !important; padding: 0 !important; margin: 0 !important; }
  .commercial-document-header { display: flex; flex-direction: row; }
  .commercial-parties { grid-template-columns: 1fr 1fr; }
  .commercial-document .table-scroll { overflow: visible !important; }
  .commercial-document-table { min-width: 0 !important; width: 100%; font-size: 8.5pt; }
  .commercial-document-table td, .commercial-document-table th { padding: 6px 4px; overflow-wrap: anywhere; }
  .commercial-document-table thead { display: table-header-group; }
  .commercial-document-table tr, .commercial-document-summary { break-inside: avoid; }
  .commercial-document h2, .commercial-document h3 { break-after: avoid; }
  .commercial-document, .commercial-document p { color: #222 !important; }
}

/* v2.38.0_06h — independent proposal issuer identities */
.commercial-issuer-logo { display: block; max-width: 220px; max-height: 88px; width: auto; height: auto; object-fit: contain; margin-bottom: 14px; }
.commercial-logo-editor { margin: 20px 0; padding: 18px; border: 1px solid var(--line, #e1e5ed); border-radius: 12px; }
.commercial-logo-editor input[type=file] { max-width: 100%; }
.commercial-provider-credit { font-size: .75rem; color: #687388; }
@media (max-width: 640px) { .commercial-issuer-logo { max-width: 180px; max-height: 72px; } }
@media print { .commercial-issuer-logo { max-width: 48mm; max-height: 22mm; } }

/* v2.38.0_06i — commercial screens follow the established portal UI. */
.app-frame .commercial-workspace { min-width: 0; }
.app-frame .commercial-workspace > .card,
.app-frame .commercial-workspace > .seller-dashboard-grid { margin-bottom: 24px; }
.app-frame .commercial-workspace .seller-dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.app-frame .commercial-workspace .card:not(.results-card):not(.commercial-document) { padding: 24px; min-width: 0; }
.app-frame .commercial-workspace .portal-editor-card > .section-heading { padding: 0; }
.app-frame .commercial-workspace .section-heading { flex-wrap: wrap; }
.app-frame .commercial-workspace .section-heading h2 { margin: 0; }
.app-frame .commercial-workspace .section-heading p { margin-top: 6px; }
.app-frame .commercial-subnav {
    display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
    margin: 0 0 24px; padding: 8px; border: 1px solid var(--line);
    border-radius: var(--ui-radius); background: #fff;
}
.app-frame .commercial-subnav .commercial-nav-link { padding: 10px 12px; color: var(--muted); }
.app-frame .commercial-subnav .commercial-nav-link.active {
    color: var(--primary-dark); background: var(--soft); box-shadow: inset 0 -2px var(--primary);
}
.app-frame .commercial-management-links {
    display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
    flex-basis: 100%; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 8px;
}
.app-frame .commercial-nav-label { padding: 0 12px; font-size: .6875rem; color: var(--muted); font-weight: 650; letter-spacing: .04em; }
.app-frame .commercial-workspace .commercial-form-actions { margin-top: 20px; align-items: center; }
.app-frame .commercial-workspace .commercial-detail-actions { margin-bottom: 20px; }
.app-frame .commercial-workspace .portal-form-grid > .portal-action { align-self: end; justify-self: start; margin-bottom: 18px; }
.app-frame .commercial-workspace .field textarea {
    width: 100%; min-width: 0; min-height: 96px; padding: 10px 12px;
    border: 1px solid #cfd6e3; border-radius: 7px; font-family: inherit;
    background: #fff; color: #172033; font-size: .875rem; line-height: 1.5; font-weight: 400; resize: vertical;
}
.app-frame .commercial-workspace .field input[readonly] { background: #f7f8fa; color: var(--muted); font-variant-numeric: tabular-nums; }
.app-frame .commercial-workspace .field :is(input, select, textarea):focus-visible,
.app-frame .commercial-workspace :is(.table-scroll, .commercial-chart-scroll):focus-visible,
.app-frame .commercial-subnav .commercial-nav-link:focus-visible {
    outline: 2px solid var(--primary); outline-offset: 3px;
}
.app-frame .commercial-workspace .commercial-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; }
.app-frame .commercial-workspace .commercial-filter-actions { grid-column: 1 / -1; }
.app-frame .commercial-workspace .commercial-filter-grid .field { margin-bottom: 16px; }
.app-frame .commercial-workspace :is(.commercial-tax-editor, .commercial-proposal-line-editor) {
    min-width: 0; padding: 16px; margin: 0 0 16px; gap: 16px;
    border: 1px solid var(--line); border-radius: var(--ui-radius); background: #fafbfc;
}
.app-frame .commercial-workspace .commercial-tax-editor { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.app-frame .commercial-workspace .commercial-proposal-line-editor { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.app-frame .commercial-workspace .commercial-proposal-line-editor .commercial-line-wide { grid-column: span 2; }
.app-frame .commercial-workspace :is(.commercial-tax-editor, .commercial-proposal-line-editor) .field { margin: 0; }
.app-frame .commercial-workspace :is(.commercial-tax-editor, .commercial-proposal-line-editor) > .portal-action { grid-column: 1 / -1; justify-self: end; }
.app-frame .commercial-workspace .commercial-row-action { min-height: 36px; padding: 7px 10px; }
.app-frame .commercial-workspace .commercial-checks { font-size: .8125rem; color: #344054; gap: 12px 24px; }
.app-frame .commercial-workspace .commercial-checks label { display: inline-flex; align-items: center; gap: 8px; }
.app-frame .commercial-workspace .commercial-logo-editor { background: #fafbfc; border-radius: var(--ui-radius); }
.app-frame .commercial-workspace .commercial-logo-editor .field { max-width: 480px; }
.app-frame .commercial-workspace input[type=file] { width: 100%; padding: 8px; min-height: 42px; }
.app-frame .commercial-workspace input[type=file]::file-selector-button {
    font: inherit; border: 1px solid #cbd3e5; border-radius: 5px;
    padding: 6px 10px; margin-right: 10px; background: #fff; color: var(--primary-dark); cursor: pointer;
}
.app-frame .commercial-workspace .commercial-logo-editor .commercial-issuer-logo { margin-top: 16px; }
.app-frame .commercial-workspace .commercial-table table { min-width: 320px; }
.app-frame .commercial-workspace .commercial-table table:has(th:nth-child(3)) { min-width: 460px; }
.app-frame .commercial-workspace .commercial-table table:has(th:nth-child(5)) { min-width: 720px; }
.app-frame .commercial-workspace .commercial-table .table-subline { overflow-wrap: anywhere; }
.app-frame .commercial-workspace .commercial-table table td:last-child:has(.commercial-row-action) { white-space: nowrap; }
.app-frame .commercial-workspace .commercial-pagination {
    padding: 16px 24px; align-items: center; justify-content: space-between;
    border-top: 1px solid var(--line); font-size: .8125rem; color: var(--muted);
}
.app-frame .commercial-workspace .commercial-chart-empty { padding: 28px 16px; }
.commercial-document { min-width: 0; overflow-wrap: anywhere; }
.commercial-document-header > div, .commercial-parties > section { min-width: 0; }
.commercial-document-summary dl div { gap: 12px; }
.commercial-document-summary dt { min-width: 0; }
@media screen {
    .commercial-document-table { min-width: 680px; }
}
@media (max-width: 900px) {
    .app-frame .commercial-workspace :is(.commercial-filter-grid, .commercial-tax-editor, .commercial-proposal-line-editor) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .app-frame .commercial-workspace .seller-dashboard-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
    .app-frame .commercial-workspace .card:not(.results-card):not(.commercial-document) { padding: 20px 16px; }
    .app-frame .commercial-workspace :is(.commercial-filter-grid, .commercial-tax-editor, .commercial-proposal-line-editor) { grid-template-columns: minmax(0, 1fr); }
    .app-frame .commercial-workspace .commercial-proposal-line-editor .commercial-line-wide { grid-column: 1; }
    .app-frame .commercial-workspace :is(.commercial-tax-editor, .commercial-proposal-line-editor) { padding: 14px; }
    .app-frame .commercial-subnav { gap: 4px; padding: 6px; }
    .app-frame .commercial-subnav .commercial-nav-link { max-width: 100%; text-align: left; }
    .app-frame .commercial-management-links .commercial-nav-label { flex-basis: 100%; padding: 4px 12px; }
    .app-frame .commercial-workspace .commercial-form-actions > .portal-action { flex: 1 1 auto; }
    .app-frame .commercial-workspace .commercial-row-action { min-height: 42px; padding: 10px 12px; }
    .app-frame .commercial-workspace .commercial-pagination { padding: 14px 16px; gap: 12px; }
}

/* v2.38.0_06j — company collaborator intake and tabular credit ranges. */
.app-frame .company-intake-workspace :is(.company-intake-paste, .company-intake-confirm) { margin: 20px 0; }
.app-frame .company-intake-paste { border: 1px solid var(--line); border-radius: var(--ui-radius); padding: 16px; background: #fafbfc; }
.app-frame .company-intake-paste summary { cursor: pointer; color: var(--primary-dark); font-size: .875rem; font-weight: 600; }
.app-frame .company-intake-paste p { font-size: .8125rem; margin-top: 12px; }
.app-frame .company-intake-confirm { display: flex; align-items: flex-start; gap: 10px; font-size: .875rem; line-height: 1.5; color: #344054; }
.app-frame .company-intake-confirm input { flex: 0 0 18px; margin: 2px 0 0; }
.app-frame .company-intake-table table { min-width: 1550px; }
.app-frame .company-intake-table table td { padding: 10px 12px; vertical-align: top; }
.app-frame .company-intake-table table td:nth-child(3) { min-width: 250px; }
.app-frame .company-intake-table table td:nth-child(4) { min-width: 280px; }
.app-frame .company-intake-table table :is(input:not([type=checkbox]), select) {
    min-width: 150px; min-height: 42px; border-radius: 7px; border: 1px solid #cfd6e3;
    padding: 10px 12px; font: inherit; color: #172033; background: #fff;
}
.app-frame .company-intake-comparison table { min-width: 640px; }
.app-frame .company-intake-comparison td:nth-child(2) { min-width: 180px; }
.app-frame .company-intake-differences { padding-left: 18px; margin: 0; overflow-wrap: anywhere; }
.app-frame .company-intake-differences li + li { margin-top: 6px; }
.app-frame .company-intake-old { color: var(--muted); }
.app-frame .credit-price-editor-table table { min-width: 600px; }
.app-frame .credit-price-editor-table tbody th { background: #fff; }
.app-frame .credit-price-editor-table :is(input, select) { min-width: 120px; max-width: 220px; min-height: 42px; border-radius: 7px; }
.app-frame .credit-price-tier-table { min-width: 240px; background: transparent; border-radius: 0; }
.app-frame .credit-price-tier-table table { min-width: 240px; width: 100%; }
.app-frame .credit-price-tier-table table :is(td, th) { padding: 6px 8px; font-size: .75rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.app-frame .credit-price-tier-table table th { background: #f7f8fa; color: var(--muted); font-weight: 600; }
.app-frame .credit-price-tier-table table td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.app-frame .credit-price-tier-table .mud-table-container { overflow: visible; }

/* v2.38.0_06l: consistent password visibility in native and interactive forms. */
.portal-password-field { position: relative; display: block; width: 100%; min-width: 0; }
.portal-password-field > input { width: 100%; padding-right: 3.4rem; box-sizing: border-box; }
.portal-password-toggle { position: absolute; right: .3rem; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; min-width: 42px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--mud-palette-text-secondary, #64748b); cursor: pointer; }
.portal-password-toggle:hover { background: rgba(15,23,42,.06); color: var(--mud-palette-primary, #2563eb); }
.portal-password-toggle:focus-visible { outline: 2px solid var(--mud-palette-primary, #2563eb); outline-offset: 1px; }
.portal-password-toggle[hidden], .portal-password-toggle svg[hidden] { display: none; }

/* v2.38.0_06m: direct Specialist invitations use the existing portal scale. */
.specialist-invite-card { margin-bottom: 1.25rem; }
.specialist-invite-editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 160px) auto; gap: 1rem; align-items: end; }
.specialist-invite-link-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: end; margin-top: 1rem; }
.specialist-invite-link-grid input { width: 100%; min-width: 0; }
.specialist-invite-history { margin-top: 1rem; }
.specialist-invite-history summary { cursor: pointer; font-weight: 600; padding: .6rem 0; }
.specialist-invite-history .table-scroll { margin-top: .75rem; }
.specialist-registration-alert { margin-bottom: 1rem; }
.specialist-registration-section { margin-top: 1.5rem; }
.specialist-registration-workspace { width: 100%; max-width: 1080px; margin-inline: auto; }
.specialist-registration-passwords { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.specialist-registration-card { padding: clamp(1rem, 3vw, 2rem); }
.specialist-registration-completed { max-width: 720px; margin: 2rem auto; }
@media (max-width: 760px) {
 .specialist-invite-editor-grid, .specialist-invite-link-grid { grid-template-columns: minmax(0, 1fr); }
 .specialist-invite-card .section-heading { align-items: flex-start; flex-direction: column; }
 .specialist-invite-card .button-row { flex-wrap: wrap; }
 .specialist-registration-passwords { grid-template-columns: minmax(0, 1fr); }
 .specialist-registration-workspace .page-heading { flex-wrap: wrap; }
}

/* 2.38.0_06o: consistent credits cards and controls aligned with their inputs. */
.app-frame .credits-workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; min-width: 0; }
.app-frame .credits-workspace > :is(.page-heading, .card, .credit-overview-grid) { margin: 0; min-width: 0; }
.app-frame .credits-workspace .credit-overview-grid { gap: 24px; }
.app-frame .credits-workspace :is(.credit-balance-card, .credit-responsible-card, .credit-pricing-card) { padding: 24px; min-width: 0; }
.app-frame .credits-workspace .credit-pricing-card > .section-heading { padding: 0; }
.app-frame .credits-workspace .credit-responsible-card h2 { margin: 8px 0; overflow-wrap: anywhere; }
.app-frame .credits-workspace .credit-responsible-card p { margin: 0; }
.app-frame .credits-workspace .credit-balance-card .muted-note { margin: 16px 0 0; }
.app-frame :is(.specialist-invite-editor-grid, .specialist-invite-link-grid, .lead-routing) .field { margin: 0; }
.app-frame :is(.specialist-invite-editor-grid, .specialist-invite-link-grid, .lead-routing) :is(input, select) { height: 44px; box-sizing: border-box; }
.app-frame :is(.specialist-invite-editor-grid, .specialist-invite-link-grid, .lead-routing) .portal-action { min-height: 44px; box-sizing: border-box; white-space: nowrap; }
.app-frame .specialist-invite-editor-grid .button-row { margin: 0; gap: 8px; align-items: center; }
.app-frame .specialist-invite-history > .button-row { margin-top: 16px; align-items: center; }
.app-frame .credit-group-members { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; border: 1px solid var(--line); border-radius: 8px; padding: 16px; margin: 0 0 16px; max-height: 320px; overflow: auto; }
.app-frame .credit-group-members legend { font-weight: 600; padding: 0 6px; font-size: .875rem; }
.app-frame .credit-group-members label { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 44px; overflow-wrap: anywhere; }
.app-frame .credit-group-members input { flex-shrink: 0; }
.app-frame .credit-price-workspace .credit-group-actions { flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.app-frame .credit-price-workspace .portal-form-grid .field { margin-bottom: 0; }
.app-frame .credit-price-workspace .portal-form-grid { row-gap: 16px; margin-bottom: 20px; }
.app-frame .credit-price-workspace .section-heading { flex-wrap: wrap; }
.app-frame .credit-price-workspace .portal-editor-card { padding: 24px; margin-bottom: 24px; }
.app-frame .credit-price-workspace .portal-editor-card > .section-heading { padding: 0; }
.mdl-site .privacy-policy { padding: 24px; max-width: 900px; }
.mdl-site .privacy-policy h2 { margin: 24px 0 8px; font-size: 1.125rem; }
.mdl-site .privacy-policy p { margin: 0 0 12px; line-height: 1.65; overflow-wrap: anywhere; }
@media (max-width: 900px) {
    .app-frame .specialist-invite-editor-grid { grid-template-columns: minmax(0, 1fr) minmax(120px, 160px); }
    .app-frame .specialist-invite-editor-grid .button-row { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
    .app-frame .credits-workspace :is(.credit-balance-card, .credit-responsible-card, .credit-pricing-card), .app-frame .credit-price-workspace .portal-editor-card { padding: 20px 16px; }
    .app-frame .credit-group-members, .app-frame .specialist-invite-editor-grid, .app-frame .specialist-invite-link-grid { grid-template-columns: minmax(0, 1fr); }
    .app-frame .lead-routing { display: grid; grid-template-columns: minmax(0, 1fr); }
    .app-frame .lead-routing .field { min-width: 0; }
    .app-frame .specialist-invite-editor-grid .button-row { flex-wrap: wrap; }
    .app-frame .specialist-invite-editor-grid .button-row > .portal-action { flex: 1 1 110px; }
    .app-frame .specialist-invite-link-grid > .portal-action { justify-self: start; }
    .mdl-site .privacy-policy { padding: 20px 16px; }
}

.app-frame .credit-group-actions .field { margin: 0; flex: 1 1 240px; }
.app-frame .credit-group-actions { align-items: end; }
.app-frame .credit-group-actions :is(select, .portal-action) { min-height: 44px; }
.app-frame .credit-price-workspace .check-field { display: flex; align-items: center; gap: 10px; margin: 20px 0 12px; line-height: 1.5; }
.app-frame .credit-price-workspace hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.app-frame .credit-price-workspace .commercial-row-action { min-height: 36px; padding: 7px 10px; }

.app-frame .credits-workspace .results-card > .section-heading { padding: 24px 24px 0; }
.app-frame .credits-workspace .results-card .dashboard-table :is(th, td):first-child { padding-left: 24px; }
.app-frame .credits-workspace .results-card .dashboard-table :is(th, td):last-child { padding-right: 24px; }
@media (max-width: 600px) {
    .app-frame .credits-workspace .results-card > .section-heading { padding: 20px 16px 0; }
    .app-frame .credits-workspace .results-card .dashboard-table :is(th, td):first-child { padding-left: 16px; }
    .app-frame .credits-workspace .results-card .dashboard-table :is(th, td):last-child { padding-right: 16px; }
}

.app-frame :is(.specialist-invite-card, .lead-review-card) { padding: 24px; }
.app-frame :is(.specialist-invite-card, .lead-review-card) > .section-heading { padding: 0; }
@media (max-width: 600px) {
    .app-frame :is(.specialist-invite-card, .lead-review-card) { padding: 20px 16px; }
}

.app-frame .credit-price-workspace { min-width: 0; }
.app-frame .credit-price-workspace .credit-group-members input[type=checkbox] { min-height: 18px; padding: 0; }
@media (max-width: 600px) {
    .app-frame .credit-price-workspace .commercial-form-actions .portal-action { max-width: 100%; white-space: normal; }
    .app-frame .credit-price-workspace .commercial-form-actions { align-items: stretch; }
}

.app-frame :is(.credits-workspace, .credit-price-workspace, .specialist-invite-card, .lead-review-card) .section-heading > div:first-child { min-width: 0; max-width: 100%; }
.app-frame :is(.credit-price-workspace, .specialist-invite-card, .lead-review-card) :is(h2, h3) { overflow-wrap: anywhere; }
.app-frame .credit-price-workspace .check-field input[type=checkbox] { flex: 0 0 18px; }

/* 2.38.0_06p: organizational view follows the shared staff layout. */
.app-frame .organization-workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; min-width: 0; }
.app-frame .organization-workspace > :is(.page-heading, .card, .company-overview-grid, .alert) { margin: 0; min-width: 0; }
.app-frame .organization-workspace .page-heading { align-items: flex-start; }
.app-frame .organization-workspace :is(h1, h2, h3) { overflow-wrap: anywhere; }
.app-frame .organization-workspace .company-overview-grid { gap: 24px; }
.app-frame .organization-workspace .company-overview-grid > .card { padding: 24px; min-width: 0; }
.app-frame .organization-workspace .company-overview-grid h2 { margin: 8px 0 20px; font-size: 1.125rem; }
.app-frame .organization-workspace .portal-data-list { border: 0; border-radius: 0; overflow: visible; gap: 16px; }
.app-frame .organization-workspace .portal-data-list > div { padding: 0; border: 0; }
.app-frame .organization-workspace .portal-data-list dt { font-size: .75rem; font-weight: 600; color: var(--muted); text-transform: none; letter-spacing: normal; line-height: 1.5; }
.app-frame .organization-workspace .portal-data-list dd { margin: 4px 0 0; font-size: .875rem; font-weight: 500; line-height: 1.6; color: #344054; }
.app-frame .organization-workspace .organization-data-wide { grid-column: 1 / -1; }
.app-frame .organization-workspace .portal-stat-grid { gap: 12px; margin: 0; }
.app-frame .organization-workspace .portal-stat-grid > div { min-width: 0; padding: 16px; border-color: var(--line); border-radius: 8px; background: #f7f8fa; }
.app-frame .organization-workspace .portal-stat-grid strong { font-size: 1.5rem; font-weight: 650; line-height: 1.25; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.app-frame .organization-workspace .portal-stat-grid span { font-size: .75rem; font-weight: 500; line-height: 1.5; color: var(--muted); text-transform: none; letter-spacing: normal; }
.app-frame .organization-workspace .company-overview-grid .muted-note { margin: 16px 0 0; }
.app-frame .organization-workspace .section-heading { flex-wrap: wrap; align-items: flex-start; gap: 16px; }
.app-frame .organization-workspace .section-heading > div:first-child { min-width: 0; flex: 1 1 240px; }
.app-frame .organization-workspace .section-heading .count-pill { flex-shrink: 0; }
.app-frame .organization-workspace .results-card > .section-heading { padding: 24px 24px 0; }
.app-frame .organization-workspace .company-history-filters { padding: 24px; }
.app-frame .organization-workspace .company-history-filters > .section-heading { padding: 0; }
.app-frame .organization-workspace .organization-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: end; }
.app-frame .organization-workspace .organization-filter-grid .field { margin: 0; min-width: 0; }
.app-frame .organization-workspace .organization-filter-person { grid-column: span 2; }
.app-frame .organization-workspace .organization-filter-grid :is(input, select) { width: 100%; height: 44px; min-width: 0; box-sizing: border-box; }
.app-frame .organization-workspace .organization-filter-action { min-height: 44px; align-self: end; justify-self: start; }
.app-frame .organization-workspace .organization-current-table table { min-width: 920px; }
.app-frame .organization-workspace .organization-history-table table { min-width: 1120px; }
.app-frame .organization-workspace .dashboard-table :is(th, td):first-child { padding-left: 24px; }
.app-frame .organization-workspace .dashboard-table :is(th, td):last-child { padding-right: 24px; }
.app-frame .organization-workspace .dashboard-table td { overflow-wrap: anywhere; }
.app-frame .organization-workspace .dashboard-table td:first-child { min-width: 180px; }
.app-frame .organization-workspace .organization-row-action { min-height: 36px; padding: 7px 10px; white-space: nowrap; }
.app-frame .organization-workspace .row-actions { flex-wrap: nowrap; gap: 8px; }
.app-frame .organization-workspace .organization-table-note { padding: 16px 24px; margin: 0; border-top: 1px solid var(--line); }
.app-frame .organization-workspace .pagination { padding: 16px 24px; gap: 16px; flex-wrap: wrap; }
.app-frame .organization-workspace .pagination > p { margin: 0; }
.app-frame .organization-workspace .pagination .button-row { align-items: center; gap: 8px; }
.app-frame .organization-workspace .loading-card { padding: 24px; }
.app-frame .organization-workspace .loading-card p { margin: 0; }
@media (max-width: 1000px) {
    .app-frame .organization-workspace .organization-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .app-frame .organization-workspace .company-overview-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
    .app-frame .organization-workspace .company-overview-grid > .card,
    .app-frame .organization-workspace .company-history-filters,
    .app-frame .organization-workspace .loading-card { padding: 20px 16px; }
    .app-frame .organization-workspace .organization-filter-grid { grid-template-columns: minmax(0, 1fr); }
    .app-frame .organization-workspace .organization-filter-person { grid-column: auto; }
    .app-frame .organization-workspace .organization-filter-action { justify-self: stretch; }
    .app-frame .organization-workspace .results-card > .section-heading { padding: 20px 16px 0; }
    .app-frame .organization-workspace .dashboard-table :is(th, td):first-child { padding-left: 16px; }
    .app-frame .organization-workspace .dashboard-table :is(th, td):last-child { padding-right: 16px; }
    .app-frame .organization-workspace .organization-table-note,
    .app-frame .organization-workspace .pagination { padding: 16px; }
    .app-frame .organization-workspace .pagination .button-row { width: 100%; justify-content: space-between; }
    .app-frame .organization-workspace .page-heading > .portal-action { max-width: 100%; white-space: normal; }
}

/* v2.38.0_06q: consistent commercial forms, confirmations and list controls. */
.app-frame .commercial-review-workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; min-width: 0; }
.app-frame .commercial-review-workspace > :is(.card, .page-heading, .commercial-subnav, .seller-summary-grid, .seller-dashboard-grid, .alert) { margin: 0; }
.app-frame .commercial-review-workspace .portal-form-grid { gap: 16px; margin: 16px 0; align-items: end; }
.app-frame .commercial-review-workspace .portal-form-grid .field { margin: 0; min-width: 0; }
.app-frame .commercial-review-workspace .portal-form-grid > .portal-action { margin: 0; min-height: 44px; align-self: end; }
.app-frame .commercial-review-workspace .field :is(input:not([type=checkbox]), select) { min-height: 44px; min-width: 0; }
.app-frame .commercial-review-workspace .commercial-form-actions .portal-action { min-height: 44px; }
.app-frame .commercial-review-workspace .commercial-checks { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.app-frame .commercial-review-workspace .commercial-checks input { flex: 0 0 auto; }
.app-frame .commercial-review-workspace .commercial-list-filter { display: grid; grid-template-columns: minmax(0, 2fr) minmax(140px, 1fr) minmax(140px, 1fr); gap: 16px; padding: 0 24px 20px; align-items: end; }
.app-frame .commercial-review-workspace .commercial-list-filter .field { margin: 0; min-width: 0; }
.app-frame .commercial-review-workspace .commercial-list-filter:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }
.app-frame .commercial-review-workspace .commercial-confirmation { padding: 20px; margin-top: 20px; background: #f7f8fc; border: 1px solid var(--line); border-radius: var(--ui-radius); }
.app-frame .commercial-review-workspace .commercial-confirmation h2 { margin: 0 0 12px; }
.app-frame .commercial-review-workspace .commercial-edit-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
.app-frame .commercial-review-workspace .commercial-preview-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 20px; margin: 20px 0; border: 1px solid var(--line); border-radius: var(--ui-radius); background: #f7f8fc; }
.app-frame .commercial-review-workspace .commercial-preview-summary span { display: grid; gap: 4px; color: var(--muted); font-size: .8125rem; }
.app-frame .commercial-review-workspace .commercial-preview-summary strong { color: var(--ink); font-size: 1rem; font-variant-numeric: tabular-nums; }
.app-frame .commercial-review-workspace .commercial-proposal-metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.app-frame .commercial-review-workspace .commercial-table td { overflow-wrap: anywhere; }
.app-frame .commercial-review-workspace .commercial-proposal-line-editor .commercial-row-action { min-height: 44px; }
@media (max-width: 1100px) {
    .app-frame .commercial-review-workspace .commercial-proposal-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
    .app-frame .commercial-review-workspace :is(.commercial-list-filter, .commercial-preview-summary, .commercial-proposal-metrics) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .app-frame .commercial-review-workspace .commercial-list-filter > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
    .app-frame .commercial-review-workspace :is(.commercial-list-filter, .commercial-preview-summary, .commercial-proposal-metrics) { grid-template-columns: minmax(0, 1fr); }
    .app-frame .commercial-review-workspace .commercial-list-filter { padding: 0 16px 16px; }
    .app-frame .commercial-review-workspace .commercial-confirmation { padding: 16px; }
    .app-frame .commercial-review-workspace .portal-action { max-width: 100%; white-space: normal; }
}

/* v2.38.0_06r: instrument-neutral history and result exploration. */
.app-frame :is(.assessment-history-workspace, .assessment-explorer-workspace) { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; min-width: 0; }
.app-frame :is(.assessment-history-workspace, .assessment-explorer-workspace) > :is(.card, .page-heading, .specialist-overview, .alert) { margin: 0; }
.app-frame .assessment-history-workspace .page-heading .button-row { max-width: none; }
.app-frame .assessment-history-workspace .results-longitudinal-filters { gap: 16px; align-items: end; }
.app-frame .assessment-history-workspace .results-longitudinal-filters .field { margin: 0; }
.app-frame .assessment-history-workspace .results-longitudinal-filters :is(input, select, button) { min-height: 44px; }
.app-frame .assessment-history-workspace .longitudinal-results-table { min-width: 0; }
.app-frame .assessment-history-workspace .longitudinal-results-table table { min-width: 1350px; }
.app-frame .assessment-history-workspace .assessment-explore-action { min-height: 36px; padding: 7px 10px; }
.app-frame .assessment-explorer-workspace .card:not(.results-card) { padding: 24px; min-width: 0; }
.app-frame .assessment-explorer-workspace .card > .section-heading { padding: 0; margin-bottom: 20px; }
.app-frame .assessment-explorer-workspace .section-heading { flex-wrap: wrap; gap: 16px; }
.app-frame .assessment-explorer-workspace .section-heading h2 { margin: 0; }
.app-frame .assessment-explorer-workspace .explorer-mode-switch { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.app-frame .assessment-explorer-workspace .explorer-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.app-frame .assessment-explorer-workspace .explorer-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: end; }
.app-frame .assessment-explorer-workspace .explorer-field-wide { grid-column: span 2; }
.app-frame .assessment-explorer-workspace .explorer-filter-actions { grid-column: 1 / -1; margin: 0; }
.app-frame .assessment-explorer-workspace .explorer-focus-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.app-frame .assessment-explorer-workspace .field { margin: 0; min-width: 0; }
.app-frame .assessment-explorer-workspace .field :is(input, select) { min-height: 44px; min-width: 0; }
.app-frame .assessment-explorer-workspace .portal-action { min-height: 44px; }
.app-frame .assessment-explorer-workspace .explorer-focus-summary { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 20px 0; overflow-wrap: anywhere; }
.app-frame .assessment-explorer-workspace .explorer-dimension-options { display: flex; flex-wrap: wrap; gap: 12px 24px; padding: 16px 0; border-top: 1px solid var(--line); }
.app-frame .assessment-explorer-workspace .explorer-dimension-options label { display: inline-flex; align-items: center; gap: 8px; font-size: .875rem; }
.app-frame .assessment-explorer-workspace .explorer-reading { border: 1px solid var(--line); border-radius: var(--ui-radius); margin-top: 16px; padding: 16px 20px; background: #fafbfc; }
.app-frame .assessment-explorer-workspace .explorer-reading summary { cursor: pointer; font-weight: 600; color: var(--ink); line-height: 1.5; }
.app-frame .assessment-explorer-workspace .explorer-reading :is(p, li) { color: #475467; font-size: .875rem; line-height: 1.65; }
.app-frame .assessment-explorer-workspace .explorer-reading ul { padding-left: 20px; margin-bottom: 0; }
.app-frame .assessment-explorer-workspace .explorer-reading li + li { margin-top: 10px; }
.app-frame .assessment-explorer-workspace .explorer-timeline-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.app-frame .assessment-explorer-workspace .explorer-dimension-chart { border: 1px solid var(--line); border-radius: var(--ui-radius); padding: 20px; min-width: 0; }
.app-frame .assessment-explorer-workspace .explorer-chart-heading { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; align-items: center; }
.app-frame .assessment-explorer-workspace .explorer-chart-heading h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: .9375rem; }
.app-frame .assessment-explorer-workspace .explorer-chart-heading > span { color: var(--muted); font-size: .75rem; }
.app-frame .assessment-explorer-workspace .explorer-dimension-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.app-frame .assessment-explorer-workspace .explorer-timeline-svg { display: block; width: 100%; height: auto; margin-top: 12px; }
.app-frame .assessment-explorer-workspace .explorer-chart-grid { stroke: #e2e7ee; stroke-width: 1; }
.app-frame .assessment-explorer-workspace .explorer-chart-label { font: 11px system-ui, sans-serif; fill: #667085; }
.app-frame .assessment-explorer-workspace .explorer-chart-values { display: flex; flex-wrap: wrap; gap: 10px 20px; color: var(--muted); font-size: .75rem; }
.app-frame .assessment-explorer-workspace .explorer-chart-values strong { display: block; color: var(--ink); margin-top: 4px; font-size: 1rem; font-variant-numeric: tabular-nums; }
.app-frame .assessment-explorer-workspace .explorer-comparison-chart { margin: 20px 0; min-width: 0; }
.app-frame .assessment-explorer-workspace .explorer-values-table table { min-width: 620px; }
.app-frame .assessment-explorer-workspace .explorer-records-table table { min-width: 1050px; }
.app-frame .assessment-explorer-workspace .explorer-records-card > .section-heading { padding: 24px 24px 0; }
.app-frame .assessment-explorer-workspace .explorer-delta { font-weight: 600; font-variant-numeric: tabular-nums; }
.app-frame .assessment-explorer-workspace .dashboard-table td { overflow-wrap: anywhere; }
.app-frame .assessment-explorer-workspace .explorer-row-action { min-height: 36px; padding: 7px 10px; }
.app-frame .assessment-explorer-workspace .pagination { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 20px 24px; }
.app-frame .assessment-explorer-workspace :is(summary, select, input, .table-scroll):focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
@media (max-width: 1000px) {
    .app-frame .assessment-explorer-workspace .explorer-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .app-frame .assessment-explorer-workspace .explorer-field-wide { grid-column: auto; }
}
@media (max-width: 700px) {
    .app-frame .assessment-explorer-workspace :is(.explorer-timeline-panels, .explorer-focus-grid) { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
    .app-frame .assessment-explorer-workspace .card:not(.results-card) { padding: 20px 16px; }
    .app-frame .assessment-explorer-workspace .explorer-filter-grid { grid-template-columns: minmax(0, 1fr); }
    .app-frame .assessment-explorer-workspace :is(.explorer-mode-switch, .explorer-filter-actions) .portal-action { flex: 1 1 auto; }
    .app-frame .assessment-explorer-workspace .portal-action { max-width: 100%; white-space: normal; }
    .app-frame .assessment-explorer-workspace :is(.explorer-reading, .explorer-dimension-chart) { padding: 16px; }
    .app-frame .assessment-explorer-workspace .explorer-records-card > .section-heading { padding: 20px 16px 0; }
    .app-frame .assessment-explorer-workspace .pagination { padding: 16px; }
    .app-frame .assessment-explorer-workspace .explorer-row-action { min-height: 44px; }
}

.app-frame .assessment-explorer-workspace .explorer-record-values { white-space: normal; line-height: 1.6; max-width: 300px; }

/* v2.38.0_06s: scoped company portal and account management. */
.app-frame .company-portal-workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; min-width: 0; }
.app-frame .company-portal-workspace > :is(.card, .page-heading, .specialist-overview) { margin: 0; }
.app-frame .company-portal-workspace .card:not(.results-card) { padding: 24px; min-width: 0; }
.app-frame .company-portal-workspace .section-heading { padding: 0; margin-bottom: 20px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.app-frame .company-portal-workspace .section-heading h2 { margin: 0; }
.app-frame .company-portal-workspace .company-portal-overview { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; }
.app-frame .company-portal-workspace .company-portal-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: end; }
.app-frame .company-portal-workspace .company-portal-wide { grid-column: span 2; }
.app-frame .company-portal-workspace .field { margin: 0; min-width: 0; }
.app-frame .company-portal-workspace .field :is(input, select) { min-height: 44px; min-width: 0; }
.app-frame .company-portal-workspace .portal-action { min-height: 44px; }
.app-frame .company-portal-workspace .company-portal-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.app-frame .company-portal-workspace .company-portal-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.app-frame .company-portal-workspace .company-professional-contact .portal-data-list { grid-template-columns: minmax(0, 1fr); margin-top: 24px; }
.app-frame .company-portal-workspace .company-professional-contact :is(h3, dd, a) { overflow-wrap: anywhere; }
.app-frame .company-portal-workspace .company-professional-contact h3 { margin: 0 0 12px; }
.app-frame .company-portal-workspace .company-portal-confirmation { border-color: #b9c4ef; background: #fafbff; }
.app-frame .company-portal-workspace .company-portal-confirmation h2 { margin-top: 0; }
.app-frame .company-portal-workspace .results-card > .section-heading { padding: 24px 24px 0; }
.app-frame .company-portal-workspace .company-portal-list-filter { padding: 0 24px 20px; }
.app-frame .company-portal-workspace .company-portal-accounts-table table { min-width: 850px; }
.app-frame .company-portal-workspace .dashboard-table td { overflow-wrap: anywhere; }
.app-frame .company-portal-workspace .company-portal-row-action { min-height: 36px; padding: 7px 10px; }
.app-frame .company-portal-workspace .pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; }
.app-frame .company-portal-workspace :is(input, select, .table-scroll):focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
@media (max-width: 850px) {
 .app-frame .company-portal-workspace .company-portal-overview { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
 .app-frame .company-portal-workspace .card:not(.results-card) { padding: 20px 16px; }
 .app-frame .company-portal-workspace .company-portal-form-grid { grid-template-columns: minmax(0, 1fr); }
 .app-frame .company-portal-workspace .company-portal-wide { grid-column: auto; }
 .app-frame .company-portal-workspace .portal-action { max-width: 100%; white-space: normal; }
 .app-frame .company-portal-workspace .company-portal-actions .portal-action { flex: 1 1 auto; }
 .app-frame .company-portal-workspace .results-card > .section-heading { padding: 20px 16px 0; }
 .app-frame .company-portal-workspace .company-portal-list-filter { padding: 0 16px 16px; }
 .app-frame .company-portal-workspace .pagination { padding: 16px; }
 .app-frame .company-portal-workspace .company-portal-row-action { min-height: 44px; }
}

/* V3-012: competency administration, scoped to its workspace. */
.competency-workspace { display: grid; grid-template-columns: minmax(280px, .65fr) minmax(480px, 1.35fr); gap: 24px; align-items: start; }
.competency-catalog, .competency-editor { min-width: 0; }
.competency-editor fieldset { border: 1px solid var(--line); border-radius: var(--ui-radius, 10px); padding: 16px; margin: 16px 0; }
.competency-editor legend { padding: 0 8px; font-weight: 650; }
.competency-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.competency-full { grid-column: 1 / -1; }
.competency-level { display: grid; grid-template-columns: minmax(80px, .2fr) minmax(180px, 1fr) auto; align-items: end; gap: 12px; margin: 12px 0; }
.competency-requirement { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(80px, .3fr) minmax(180px, 1fr); align-items: end; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.competency-requirement button { grid-column: 1 / -1; justify-self: start; }
.competency-editor input, .competency-editor select, .competency-editor textarea { max-width: 100%; }
.competency-editor button, .competency-catalog button { min-height: 44px; }
.competency-editor .checkbox-field { display: flex; align-items: start; gap: 10px; margin: 16px 0; }
.competency-editor input[type=checkbox] { width: 20px; height: 20px; flex-shrink: 0; }
.competency-frozen-profile { margin-top: 24px; }
@media (max-width: 1100px) { .competency-workspace { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 680px) { .competency-fields, .competency-level, .competency-requirement { grid-template-columns: minmax(0, 1fr); } }

/* V3-013 competency source reports use the existing theme and print surface. */
.competency-source { margin-block: 1.5rem; padding-block: .5rem; border-top: 1px solid var(--border); }
.competency-bars { display: grid; gap: .7rem; margin-block: 1rem; }
.competency-bars meter { display: block; width: 100%; max-width: 34rem; height: 1.2rem; }
.competency-report td { vertical-align: top; white-space: normal; overflow-wrap: anywhere; }
.competency-report .table-scroll { max-height: none; }
@media print { .competency-report details > * { display: block; } .competency-report .table-scroll { overflow: visible; } .competency-source { break-inside: auto; } }

/* V3-014 — scoped Nine Box calibration */
.nb-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:1rem}.nb-prewrap{white-space:pre-wrap;overflow-wrap:anywhere}.nb-matrix td{vertical-align:top;min-width:160px;height:100px}.nb-matrix .button{display:block;margin:.35rem 0;white-space:normal}.nb-revision{border-top:1px solid var(--border,#d9dee7);padding:1rem 0}
