/* static/css/layoutref_board.css */
/* #13 follows the current theme in every board mode. */
html body.unified-page #qnaModal .qna-field-label,
html body.unified-page #qnaModal .qna-visibility-options { color:var(--color-text); }
html body.unified-page #qnaModal .qna-license-date { color:var(--color-text-secondary) !important; }
html body.unified-page #qnaModal .qna-list-actions {
    display:flex; justify-content:flex-end; padding:12px 18px 0; gap:8px;
}
html body.unified-page #qnaModal .qna-list-actions:has(#qnaHeaderWriteBtn[style*="display: none"]) { display:none; }
html body.unified-page #qnaModal #qnaHeaderWriteBtn { min-height:var(--control-h-md); border-radius:var(--radius-control); }

/* static/css/layoutref_notice_fiscal.css */
/* Common notice surface keeps the approved navy header. */
html body #noticePopupOverlay .notice-popup-dialog { background:var(--color-surface); color:var(--color-text); border:1px solid var(--color-border); border-radius:var(--radius-dialog,16px); }
html body #noticePopupOverlay .notice-popup-header { min-height:56px; padding:5px 16px; gap:8px; box-sizing:border-box; background:linear-gradient(135deg,#1e293b,#334155); border-color:#475569; }
html body #noticePopupOverlay .notice-popup-header h3 { color:#fff; }
html body #noticePopupOverlay .notice-popup-title,html body #noticePopupOverlay .notice-popup-content { color:var(--color-text); word-break:keep-all; overflow-wrap:break-word; }
html body #noticePopupOverlay .notice-popup-body { padding:16px; }
html body #noticePopupOverlay .notice-popup-footer { padding:8px 16px max(16px,env(safe-area-inset-bottom,0px)); gap:8px; border-color:var(--color-border); }
html body #noticePopupOverlay .notice-popup-hide-label,html body #noticePopupOverlay .notice-popup-pager { color:var(--color-text-secondary); }
html body #noticePopupOverlay .notice-popup-close { min-width:40px; min-height:40px; padding:0; color:#fff; }
html body #noticePopupOverlay .notice-popup-btn { min-height:40px; border-radius:8px; background:var(--action-primary-bg); color:var(--action-primary-fg); }
html[data-device-class="phone"] body #noticePopupOverlay .notice-popup-close { min-width:44px; min-height:44px; }
html[data-device-class="phone"] body #noticePopupOverlay .notice-popup-btn { min-height:48px; }
html body .fiscal-overlay .fiscal-dialog { border:1px solid var(--color-border); border-radius:16px; }
html body .fiscal-overlay .fiscal-dialog-header { min-height:56px; padding:5px 16px; gap:8px; box-sizing:border-box; }

html body .fiscal-dialog {background:var(--color-surface) !important;}

html body .fiscal-dialog-header {border-bottom:1px solid var(--color-border) !important;}

html body .fiscal-dialog-header h3 {color:var(--color-text) !important;}

html body .fiscal-dialog-notice {background:var(--color-surface-soft, var(--color-surface)) !important;color:var(--color-text-secondary) !important;border-bottom:1px solid var(--color-border) !important;}

html body .fiscal-notice-src {color:var(--color-text-secondary) !important;}

html body .fiscal-table thead th {color:var(--color-text-secondary) !important;border-bottom:1px solid var(--color-border) !important;}

html body .fiscal-table tbody td {border-bottom:1px solid var(--color-surface-soft, var(--color-surface)) !important;color:var(--color-text) !important;}

html body .fiscal-rate span {color:var(--action-tertiary-fg) !important;}

html body .fiscal-bar-bg {background:var(--color-border) !important;}

html body .fiscal-loading,html body .fiscal-empty {color:var(--color-text-secondary) !important;}

html body .fiscal-na {color:var(--color-text-secondary) !important;}

html body .fiscal-tabs {border-bottom:1px solid var(--color-border) !important;}

html body .fiscal-tab {color:var(--color-text-secondary) !important;}

html body .fiscal-tab:hover {color:var(--color-text) !important;}

html body .fiscal-tab.active {color:var(--action-tertiary-fg) !important;}

html body .fiscal-summary-bar {color:var(--color-text-secondary) !important;}

html body .fiscal-summary-bar strong {color:var(--action-tertiary-fg) !important;}

html body .fiscal-trend-item {background:var(--color-surface-soft, var(--color-surface)) !important;border:1px solid var(--color-border) !important;}

html body .fiscal-trend-year {color:var(--color-text-secondary) !important;}

html body .fiscal-trend-value {color:var(--color-text) !important;}

html body .fiscal-bar-label {color:var(--color-text) !important;}

html body .fiscal-bar-track {background:var(--color-surface-soft, var(--color-surface)) !important;}

html body .fiscal-bar-amt {color:var(--color-text) !important;}

html body .fiscal-bar-pct {color:var(--action-tertiary-fg) !important;}

html body .fiscal-bar-num {color:var(--color-text-secondary) !important;}

html body .fiscal-more {color:var(--color-text-secondary) !important;}

html body .fiscal-fund-section h4 {color:var(--color-text) !important;}

html body .fiscal-fund-hero-total {color:var(--color-text-secondary) !important;}

html body .fiscal-fund-hero-total strong {color:var(--action-tertiary-fg) !important;}

html body .fiscal-fund-card {background:var(--color-surface-soft, var(--color-surface)) !important;border:1px solid var(--color-border) !important;}

html body .fiscal-fund-card-label {color:var(--color-text-secondary) !important;}

html body .fiscal-fund-card-value {color:var(--action-tertiary-fg) !important;}

html body .fiscal-stability {color:var(--color-text-secondary) !important;background:var(--color-surface-soft, var(--color-surface)) !important;}

html body .fiscal-stability strong {color:var(--action-tertiary-fg) !important;}

html body .fiscal-asof {color:var(--color-text-secondary) !important;}

html body .fiscal-field-chip {background:var(--color-surface-soft, var(--color-surface)) !important;border:1px solid var(--color-border) !important;}

html body .fiscal-local-section {border-bottom:1px solid var(--color-border) !important;}

html body .fiscal-local-section-head span {color:var(--color-text-secondary) !important;}

html body .fiscal-local-metric > strong {color:var(--color-text) !important;}

html body .fiscal-local-metric.is-primary > strong {color:var(--action-tertiary-fg) !important;}

html body .fiscal-budget-history-legend {color:var(--color-text-secondary) !important;}

html body .fiscal-budget-history-year strong {color:var(--color-text) !important;}

html body .fiscal-budget-history-year small {color:var(--color-text-secondary) !important;}

html body .fiscal-local-progress > div strong {color:var(--action-tertiary-fg) !important;}

html body .fiscal-local-progress > i {background:var(--color-border) !important;}

html body .fiscal-local-subhead > strong {color:var(--color-text) !important;}

html body .fiscal-local-full-year > strong {color:var(--color-text) !important;}

html body .fiscal-local-sector-row {border-bottom:1px solid var(--color-border) !important;}

html body .fiscal-local-sector-label span {color:var(--color-text) !important;}

html body .fiscal-local-sector-label small {color:var(--color-text-secondary) !important;}

html body .fiscal-local-source-note {border:1px solid var(--color-border) !important;}

html body .fiscal-footnote {color:var(--color-text-secondary) !important;}

html body .fiscal-project-open {color:var(--color-text) !important;}

html body .fiscal-project-dialog {border:1px solid var(--color-border) !important;background:var(--color-surface) !important;}

html body .fiscal-project-dialog .fiscal-dialog-header small {color:var(--color-text-secondary) !important;}

html body .fiscal-project-heading {color:var(--color-text) !important;}

html body .fiscal-project-heading span {color:var(--color-text-secondary) !important;}

html body .fiscal-project-row {border-top:1px solid var(--color-border) !important;}

html body .fiscal-project-main small {color:var(--color-text-secondary) !important;}

html body .fiscal-rank-scope button.is-active {color:var(--color-text) !important;}

html body .fiscal-rank-summary strong {color:var(--color-text) !important;}

html body .fiscal-rank-summary small {color:var(--color-text-secondary) !important;}

html body .fiscal-rank-columns {border-top:1px solid var(--color-border) !important;border-bottom:1px solid var(--color-border) !important;color:var(--color-text-secondary) !important;}

html body .fiscal-rank-row {border-bottom:1px solid var(--color-border) !important;color:var(--color-text) !important;}

html body .fiscal-hint {color:var(--color-text-secondary) !important;}

/* Local-government metrics and child views also had fixed dark surfaces. */
html body :is(.fiscal-overlay,.fiscal-project-overlay) {
    --fiscal-positive-fg:#166534;
    --fiscal-negative-fg:#b91c1c;
    --fiscal-warning-fg:#92400e;
    --fiscal-budget-track-bg:#dbeafe;
}
html[data-theme="dark"] body :is(.fiscal-overlay,.fiscal-project-overlay) {
    --fiscal-positive-fg:#86efac;
    --fiscal-negative-fg:#fca5a5;
    --fiscal-warning-fg:#fbbf24;
    --fiscal-budget-track-bg:#213754;
}
html body :is(.fiscal-local-metric,.fiscal-local-full-year,.fiscal-local-source-note,.fiscal-project-open,.fiscal-project-summary span,.fiscal-project-pagination button,.fiscal-rank-tools select,.fiscal-rank-tools input,.fiscal-rank-scope button),
html body .fiscal-project-tools :is(select,input),html body .fiscal-project-filters select {
    background:var(--color-surface-soft,var(--color-surface)) !important;
    border-color:var(--color-border) !important;
}
html body :is(.fiscal-local-section-head strong,.fiscal-project-summary strong,.fiscal-project-main strong,.fiscal-rank-name strong),
html body .fiscal-project-tools :is(select,input),html body .fiscal-project-filters select,html body .fiscal-rank-tools :is(select,input),html body .fiscal-project-pagination button {
    color:var(--color-text) !important;
}
html body :is(.fiscal-dialog-close,.fiscal-budget-history-ratio,.fiscal-local-caption,.fiscal-local-asof,.fiscal-local-source-note,.fiscal-local-subhead > span,.fiscal-local-reference-row > span,.fiscal-project-summary span,.fiscal-project-amounts,.fiscal-project-pagination span,.fiscal-rank-summary,.fiscal-rank-empty),
html body .fiscal-local-metric > :is(span,small),html body .fiscal-local-full-year > :is(span,small),html body .fiscal-local-reference > p,
html body .fiscal-budget-history-visual > small,html body .fiscal-local-progress > div,html body .fiscal-project-amounts small,
html body :is(.fiscal-rank-position,.fiscal-rank-peer) small,html body .fiscal-rank-tools input::placeholder {
    color:var(--color-text-secondary) !important;
}
html body :is(.fiscal-year,.fiscal-field-chip,.fiscal-local-rank-trigger > i,.fiscal-local-reference-row > strong,.fiscal-project-open small,.fiscal-project-open i,.fiscal-rank-position,.fiscal-rank-rate),
html body .fiscal-budget-history-visual > div strong,html body .fiscal-local-sector-values strong,html body .fiscal-local-period-comparison .fiscal-local-caption b {
    color:var(--action-tertiary-fg) !important;
}
html body .fiscal-resolved {background:var(--color-surface-soft,var(--color-surface)) !important;color:var(--action-tertiary-fg) !important;}
html body .fiscal-local-metric.is-up > strong,html body .fiscal-budget-history-visual > div span,
html body .fiscal-local-sector-values span,html body .fiscal-rank-peer,html body .fiscal-rank-row.is-peer-top .fiscal-rank-peer strong {color:var(--fiscal-positive-fg) !important;}
html body .fiscal-local-metric.is-down > strong {color:var(--fiscal-negative-fg) !important;}
html body :is(.fiscal-notice-warn,.fiscal-supp),html body .fiscal-rank-summary .is-current strong,
html body .fiscal-rank-row.is-top .fiscal-rank-position,html body .fiscal-rank-name small {color:var(--fiscal-warning-fg) !important;}
html body .fiscal-local-subhead {border-color:var(--color-border) !important;}
html body .fiscal-local-rank-trigger:hover,html body .fiscal-local-rank-trigger:focus-visible,
html body .fiscal-rank-scope button.is-active {background:var(--color-surface-soft,var(--color-surface)) !important;border-color:var(--action-tertiary-fg) !important;}
html body .fiscal-budget-history-visual > i,html body .fiscal-project-rate i {background:var(--color-border) !important;}
html body .fiscal-budget-history-visual > i > em,html body .fiscal-local-sector-track {background:var(--fiscal-budget-track-bg) !important;}

/* Institution fiscal content shares the surrounding dialog theme. */
html body .fiscal-overlay .institution-fiscal-view {color:var(--color-text) !important;}
html body .fiscal-overlay .institution-fiscal-identity {border:1px solid var(--color-border) !important;background:var(--color-surface-soft, var(--color-surface)) !important;}
html body .fiscal-overlay .institution-fiscal-identity p {color:var(--color-text-secondary) !important;}
html body .fiscal-overlay .institution-fiscal-type {border:1px solid var(--color-border) !important;background:var(--color-surface-soft, var(--color-surface)) !important;color:var(--action-tertiary-fg) !important;}
html body .fiscal-overlay .institution-fiscal-identity label {color:var(--color-text-secondary) !important;}
html body .fiscal-overlay .institution-fiscal-identity select {border:1px solid var(--color-border) !important;background:var(--color-surface-soft, var(--color-surface)) !important;color:var(--color-text) !important;}
html body .fiscal-overlay .institution-fiscal-back {border:1px solid var(--color-border) !important;background:var(--color-surface-soft, var(--color-surface)) !important;color:var(--action-tertiary-fg) !important;}
html body .fiscal-overlay .institution-fiscal-candidate-guide {border:1px solid var(--color-border) !important;background:var(--color-surface-soft, var(--color-surface)) !important;color:var(--color-text) !important;}
html body .fiscal-overlay .institution-fiscal-candidate-guide span {color:var(--color-text-secondary) !important;}
html body .fiscal-overlay .institution-fiscal-candidate {border:1px solid var(--color-border) !important;background:var(--color-surface-soft, var(--color-surface)) !important;color:var(--color-text) !important;}
html body .fiscal-overlay .institution-fiscal-candidate:hover,html body .fiscal-overlay .institution-fiscal-candidate:focus-visible {border-color:var(--color-border) !important;background:var(--color-surface-soft, var(--color-surface)) !important;}
html body .fiscal-overlay .institution-fiscal-candidate-head small {border:1px solid var(--color-border) !important;color:var(--action-tertiary-fg) !important;}
html body .fiscal-overlay .institution-fiscal-candidate-context {color:var(--color-text-secondary) !important;}
html body .fiscal-overlay .institution-fiscal-candidate-sources > span {border:1px solid var(--color-border) !important;color:var(--color-text-secondary) !important;}
html body .fiscal-overlay .institution-fiscal-candidate-action {color:var(--action-tertiary-fg) !important;}
html body .fiscal-overlay .institution-fiscal-section {border:1px solid var(--color-border) !important;background:var(--color-surface-soft, var(--color-surface)) !important;}
html body .fiscal-overlay .institution-fiscal-section-head span {color:var(--color-text-secondary) !important;}
html body .fiscal-overlay .institution-fiscal-metric {border:1px solid var(--color-border) !important;background:var(--color-surface-soft, var(--color-surface)) !important;}
html body .fiscal-overlay .institution-fiscal-metric > span,html body .fiscal-overlay .institution-fiscal-metric > small {color:var(--color-text-secondary) !important;}
html body .fiscal-overlay .institution-fiscal-metric > strong {color:var(--action-tertiary-fg) !important;}
html body .fiscal-overlay .institution-fiscal-metric > small {color:var(--color-text-secondary) !important;}
html body .fiscal-overlay .institution-fiscal-source {border-top:1px solid var(--color-border) !important;}
html body .fiscal-overlay .institution-fiscal-source > div span {border:1px solid var(--color-border) !important;color:var(--color-text-secondary) !important;}
html body .fiscal-overlay .institution-fiscal-source-key strong {color:var(--color-text) !important;}
html body .fiscal-overlay .institution-fiscal-source-key small {color:var(--color-text-secondary) !important;}
html body .fiscal-overlay .institution-fiscal-source p {color:var(--color-text-secondary) !important;}
html body .fiscal-overlay .institution-fiscal-error,html body .fiscal-overlay .institution-fiscal-empty {color:var(--color-text-secondary) !important;}
html body .fiscal-overlay .institution-fiscal-error strong {color:var(--color-danger, #b91c1c) !important;}

