[hidden] { display: none !important; }
.portal-wrap { width: min(1440px, calc(100% - 64px)); margin-inline: auto; }
.portal-header { border-bottom: 1px solid var(--line); }
.portal-bar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.portal-header .brand { width: fit-content; }
.portal-link { color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid currentColor; padding: 1px 0; font-weight: 500; }
.portal-link:hover, .portal-footer a:hover { color: var(--red); }
.portal-gate { display: grid; grid-template-columns: 1.25fr 1fr; margin: clamp(52px, 11vh, 110px) auto; max-width: 1000px; border: 1px solid var(--ink); min-height: 340px; }
.gate-intro, .gate-actions { padding: clamp(24px, 5vw, 62px); }
.gate-intro { background: var(--ink); color: var(--paper); }
.gate-intro .overline { color: #E8A59E; }
.gate-intro .portal-link { color: var(--paper); display: inline-block; margin-top: 24px; }
.gate-intro h1, .workspace-head h1 { font: 400 clamp(34px, 5vw, 61px)/1.06 var(--display); letter-spacing: -.035em; margin: 12px 0 14px; }
.gate-intro p:not(.overline), .gate-actions p:not(.overline) { max-width: 38ch; margin: 0; }
.gate-actions { background: var(--tile); }
.gate-actions h2 { font: 400 30px/1.15 var(--display); margin: 10px 0 12px; }
.gate-actions .portal-status { margin-top: 12px !important; color: var(--muted); min-height: 1.55em; font-size: 14px; }
.portal-button { margin-top: 24px; padding: 11px 17px; color: var(--paper); background: var(--ink); border: 1px solid var(--ink); font-weight: 500; min-height: 44px; }
.portal-button:enabled:hover { background: var(--red); border-color: var(--red); }
.portal-button:disabled { opacity: .6; cursor: wait; }
.workspace-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; padding: 32px 0 20px; }
.workspace-head h1 { margin-bottom: 0; font-size: clamp(34px, 4vw, 51px); }
.workspace-caption { text-align: right; }
.workspace-caption p, .portal-footer { color: var(--muted); font: 400 11px/1.45 var(--mono); }
.workspace-caption p { margin: 7px 0 0; }
.portal-tag { border: 1px solid var(--line); font: 500 10px var(--mono); letter-spacing: .05em; text-transform: uppercase; padding: 5px 7px; display: inline-block; }
.portal-footer { display: flex; justify-content: space-between; padding: 14px 0 28px; margin-top: 24px; border-top: 1px solid var(--line); }
@media (max-width: 720px) {
  .portal-wrap { width: calc(100% - 32px); }
  .portal-gate { grid-template-columns: 1fr; margin: 28px 0; }
  .workspace-head { align-items: start; flex-direction: column; padding-top: 24px; }
  .workspace-caption { text-align: left; }
}
#accessForm, .mfa-actions { display: grid; gap: 6px; margin-top: 16px; }
#accessForm label, .mfa-actions label { font-weight: 500; font-size: 14px; }
#accessForm input, .mfa-actions input, .mfa-actions select { font: inherit; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 2px; padding: 8px 10px; min-height: 42px; margin-bottom: 5px; min-width: 0; }
#accessForm .portal-button, .mfa-actions .portal-button { margin-top: 3px; }
#accessForm .portal-link, .mfa-actions .portal-link { justify-self: start; font-size: 14px; }
.mfa-actions [hidden], .mfa-actions[hidden] { display: none !important; }
.mfa-actions label input, .mfa-actions label select { display: block; width: 100%; }
#mfaEmailActions { display: grid; gap: 8px; justify-items: start; }


.production-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-block: 16px;
}

.production-filters label {
  display: grid;
  gap: 4px;
  min-width: min(100%, 180px);
}

.production-filters select, .production-range input {
  font: inherit;
  width: 100%;
  padding: 8px;
}

.production-range {
  display: flex; flex: 1 0 100%; flex-wrap: wrap; align-items: end; gap: 8px 16px;
  margin: 0; min-width: 0; border: 1px solid var(--line); padding: 8px 12px 12px;
}
.production-range p { flex-basis: 100%; }
.production-filters > button { align-self: end; }

.production-group { margin-block: 20px; }

.production-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  gap: 12px;
}

.production-card {
  border: 1px solid #deddd6;
  border-radius: 8px;
  padding: 14px;
}

.production-card h4, .production-card p { margin: 0; }
.production-card p { font-size: .9em; margin-top: 4px; }
.production-card strong { font-size: 1.35rem; }

.production-history {
  border: 1px solid #deddd6;
  border-radius: 8px;
  padding: 14px;
}

.production-history label { display: grid; gap: 5px; }
.production-history select { font: inherit; max-width: 100%; padding: 8px; }
.production-history svg { display: block; width: 100%; max-height: 220px; margin-block: 12px; }
.history-baseline { stroke: #9c9b94; }
.history-value { fill: #234e43; }
.history-partial { fill: #a4c8bb; }
.production-history-data ul { columns: 2 180px; }

.production-panel-visuals { display: grid; gap: 14px; }
.production-table-wrap { overflow: auto; max-width: 100%; }
.production-table { border-collapse: collapse; width: 100%; }
.production-table th, .production-table td { padding: 8px; text-align: left; border-bottom: 1px solid #ddd; }
.production-table th { background: #f1f3f6; }
#clientParameters, #adminParameters { margin-block: 8px; }
#clientParameters textarea, #adminParameters textarea { width: 100%; font-family: monospace; }
.production-filters [hidden] { display: none; }

/* Grid children must shrink before the table's own horizontal scroll applies. */
.production-panel-visuals, .production-group, .production-graph, .production-grid, .production-card,
#productionReport, #workspace { min-width: 0; max-width: 100%; }
.production-group, .production-card { overflow-wrap: anywhere; }
.production-table-wrap { min-width: 0; width: 100%; }

.production-chart-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px 16px; }
.production-chart-dialog { width: calc(100vw - 2rem); max-width: none; max-height: 92vh; overflow: auto; background: var(--tile); color: var(--ink); border: 1px solid var(--line); }
.production-chart-dialog::backdrop { background: rgb(0 0 0 / .45); }
.production-actions { border-left: 3px solid var(--red); padding: 0 12px; margin-block: 14px; }
.production-graph [role="button"] { cursor: pointer; }
.production-graph [role="button"]:focus-visible { outline: 2px solid var(--ink); }

.production-table .heat-level-1 { background: #f7efdc; color: #27221c; }
.production-table .heat-level-2 { background: #f0dfb4; color: #27221c; }
.production-table .heat-level-3 { background: #e5c682; color: #27221c; }
.production-table .heat-level-4 { background: #d99f54; color: #27221c; }
.production-simulation output { font-weight: 600; }

.production-body-map { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
.production-body-map svg { width: min(100%, 200px); }
.production-body-map [role="button"] { cursor: pointer; }
.production-body-map [aria-pressed="true"] { color: var(--red); font-weight: 600; }

/* Live dashboards use the same viewer structure and visual hierarchy as the commercial report. */
.production-viewer .rv-bar { min-height: 46px; height: auto; padding-block: 8px; }
.production-viewer .rv-body { grid-template-columns: 218px minmax(0, 1fr); }
.production-viewer .rv-pages { padding-left: 26px; }
.production-viewer .rv-panel-btn { line-height: 1.3; }
.production-viewer .production-filters { margin: 0; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.production-viewer .production-filters > button { margin-top: 0; min-height: 38px; padding-block: 6px; font-size: 13px; }
@media (min-width: 761px) {
  .production-has-navigation [data-mobile-module], .production-has-navigation [data-panel-filter] { display: none; }
}
.production-viewer .production-filters label { font: 400 10px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .05em; }
.production-viewer .production-filters select, .production-viewer .production-filters input { font: 400 13px var(--sans); text-transform: none; letter-spacing: normal; }
.production-viewer [role="status"] { padding: 4px 18px; font: 400 11px/1.5 var(--mono); color: var(--muted); }
.production-viewer [role="status"]:empty { display: none; }
.production-canvas { min-height: 420px; }
.production-panel { min-width: 0; }
.production-panel-heading { margin-bottom: 14px; }
.production-panel-heading > h3 { font: 400 28px/1.2 var(--display); letter-spacing: -.025em; }
.production-panel-heading > p { margin-block: 5px 10px; color: var(--muted); font-size: 13px; }
.production-panel-heading > h4 { margin-block: 12px 6px; font-size: 13px; font-weight: 500; }
.production-panel .production-grid { margin-top: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 156px), 1fr)); }
.production-panel .production-card, .production-tile, .production-panel > .production-group {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--tile);
  padding: 14px 16px;
}
.production-panel .production-card h4 {
  color: var(--muted);
  font: 400 10px/1.5 var(--mono);
  text-transform: uppercase;
  letter-spacing: .055em;
}
.production-panel .production-card strong {
  display: block;
  margin-top: 7px;
  font: 500 clamp(18px, 2vw, 26px)/1.3 var(--mono);
  overflow-wrap: anywhere;
}
.production-panel .production-card p { font-size: 12px; color: var(--muted); }
.production-panel-visuals { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; }
.production-tile { min-width: 0; grid-column: 1 / -1; }
@media (min-width: 1121px) {
  .production-tile[data-span="5"] { grid-column: span 5; }
  .production-tile[data-span="6"] { grid-column: span 6; }
  .production-tile[data-span="7"] { grid-column: span 7; }
}
.production-chart-heading h4 { font-size: 14px; font-weight: 500; }
.production-chart-heading .portal-link { font-size: 12px; }
.production-chart { min-width: 0; width: 100%; height: 254px; }
.production-graph > p, .production-chart-data { color: var(--muted); font-size: 12px; }
.production-chart-data { margin-top: 6px; }
.production-chart-data summary, .production-panel > details > summary { cursor: pointer; }
.production-panel .production-table { font-size: 13px; }
.production-panel .production-table th { background: transparent; font: 400 10px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .035em; border-bottom-color: var(--ink); }
.production-panel .production-table td { border-color: var(--line); }
.production-panel .production-table .production-number { text-align: right; font: 400 12px/1.4 var(--mono); white-space: nowrap; }
.production-panel .production-table tbody tr:last-child td { border-bottom: 0; }
.production-chart-dialog { max-width: 1280px; }
.production-chart-dialog .production-chart { height: min(62vh, 630px); }
.production-panel .production-actions { padding: 14px 16px; background: var(--tile); }
.production-panel-visuals .production-actions { margin: 0; border-left: 2px solid var(--red); }
.production-panel .production-actions ul, .production-panel > .production-group ul { list-style: disc; padding-left: 19px; }
@media (max-width: 1120px) {
  .production-viewer .rv-body { grid-template-columns: 175px minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .production-viewer .rv-body { display: block; }
  .production-viewer .rv-nav { display: none; }
  .production-viewer .production-filters, .production-canvas { padding: 12px; }
  .production-panel-heading > h3 { font-size: 23px; }
  .production-viewer .rv-crumb { flex-wrap: wrap; gap: 3px 8px; }
  .production-viewer .rv-panel { white-space: normal; }
  .production-tile { padding: 12px; }
}

.production-coverage > summary { font-size: 14px; }
.production-coverage > summary strong { font-weight: 600; }
.coverage-badge {
  display: inline-block;
  margin-left: 10px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--muted);
  font: 400 11px/1.4 var(--mono);
}
.coverage-badge[data-incomplete="true"] { border-color: var(--warn-bg); background: var(--warn-bg); color: var(--warn-text); }
.coverage-section { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.coverage-section h4 { margin-bottom: 4px; font-size: 14px; font-weight: 600; }
.coverage-section p { margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.coverage-section .coverage-note { color: var(--ink); }
.coverage-section .production-table th, .coverage-section .production-table td { white-space: normal; }
.coverage-section .production-table td:first-child { min-width: 9em; }
.coverage-history { margin-top: 12px; }
.coverage-history > summary { cursor: pointer; font-size: 13px; }
.coverage-history[open] > summary { margin-bottom: 6px; }

.production-nav-toggle {
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 1px solid #91999c;
  border-radius: 4px;
  background: transparent;
  color: var(--paper);
  font-size: 12px;
}
.production-nav-toggle:hover { background: rgba(255,255,255,.1); }
.production-nav-collapsed .production-viewer .rv-body { grid-template-columns: minmax(0, 1fr); }
.production-nav-collapsed .production-filters [data-mobile-module],
.production-nav-collapsed .production-filters [data-panel-filter]:not([hidden]) { display: grid; }
.production-panel .production-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 182px), 1fr)); }
.production-panel .production-card .production-kpi-value {
  max-inline-size: 100%;
  font-size: clamp(16px, 1.5vw, 24px);
  font-variant-numeric: tabular-nums;
  white-space: normal;
  overflow-wrap: anywhere;
}
.production-kpi-status { margin-top: 8px; }
.production-kpi-status .production-status { width: fit-content; max-width: 100%; white-space: normal; }
.production-tile > details > summary { cursor: pointer; font-size: 13px; }
.production-tile > details[open] > summary { margin-bottom: 8px; }
@media (max-width: 760px) { .production-nav-toggle { display: none; } }
.indicator-rule-group { min-width: 0; }
.indicator-rule-group > p { font-size: 13px; margin-bottom: 8px; color: var(--muted); }
.indicator-rule { padding-block: 10px; margin-block: 6px; border-top: 1px solid var(--line); }
.indicator-rule > button { align-self: end; justify-self: start; }

.production-viewer .rv-bar { align-items: center; }
.production-viewer .rv-crumb { flex: 1; }
.production-viewer .production-filters { align-items: end; gap: 10px 14px; }
.production-viewer .production-filters > label { flex: 1 1 150px; min-width: 0; max-width: 100%; }
.production-viewer .production-filters select, .production-viewer .production-range input { min-width: 0; max-width: 100%; }
.production-panel .production-card { display: flex; flex-direction: column; gap: 0; }
.production-panel .production-card h4 { min-height: 3em; }
.production-panel .production-card .production-kpi-value { line-height: 1.3; letter-spacing: -.035em; font-size: clamp(18px, 1.8vw, 26px); }
.production-kpi-value small { margin-left: 5px; font: 400 12px/1.3 var(--mono); letter-spacing: 0; }
.production-kpi-status { margin-top: auto; padding-top: 9px; }
.production-panel .production-card .production-status svg { flex: 0 0 13px; }
.production-panel .production-card > p { margin-top: 7px; }
.production-chart-data summary { padding: 4px 0; }
.production-table-wrap:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.production-table thead th { vertical-align: bottom; }
.production-panel .production-table td { vertical-align: top; }
@media (max-width: 760px) {
  .production-viewer .production-filters > label { flex-basis: 140px; }
  .production-viewer .production-range > label { flex: 1 1 140px; min-width: 0; }
  .production-viewer .production-filters > button { flex: 1 1 100%; }
}

.production-fap-ruler { padding: 12px 6px 18px; }
.production-fap-ruler > p { font: 400 13px var(--mono); margin: 8px 0 30px; }
.production-fap-track { height: 10px; display: flex; position: relative; margin-inline: 4px; }
.production-fap-band:first-child { flex: 1; background: #b9cbbf; }
.production-fap-band:nth-child(2) { flex: 2; background: #d9b8b2; }
.production-fap-neutral { position: absolute; left: 33.333333%; top: -7px; height: 24px; border-left: 2px solid var(--ink); }
.production-fap-marker { position: absolute; top: -4px; width: 18px; height: 18px; background: var(--tile); border: 4px solid var(--ink); border-radius: 50%; transform: translateX(-50%); }
.production-fap-labels { position: relative; margin-top: 13px; height: 30px; font: 400 10px var(--mono); color: var(--muted); }
.production-fap-labels > span { position: absolute; top: 0; }
.production-fap-labels > span:first-child { left: 0; }
.production-fap-labels > span:nth-child(2) { left: 33.333333%; transform: translateX(-50%); }
.production-fap-labels > span:last-child { right: 0; }
.production-panel .production-table th.production-number { text-align: right; font: 400 10px/1.4 var(--mono); }
