/* Hallmark · shape: app screen · genre: modern-minimal · theme: brand · redesign: full
 * paper: warm ivory · accent: terracotta · display: system · body: system
 * nav: original application shell · signature: policy and project ledger · states: loading empty error full
 * axes: warm/system/terracotta · posture: compact · contrast: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R4 V4 · weakest: nested surfaces, replace decoration with rules and spacing */
/* Hallmark · dropped: warning navigation and legacy warning route, retired by the user; reworded: report and decomposition labels to business names */
/* Hallmark · answered F7: shared controls and application panels deliberately use one radius; hierarchy comes from neutral sidebar, open stat rows and bordered editing surfaces */
@import url("./tokens.css?v=20261103-workspace2");

html, body { overflow-x: clip; }
html { scroll-padding-top: 64px; scrollbar-color: var(--sg-border-strong) var(--sg-bg); }
body { color: var(--sg-text); background: var(--sg-bg); font-family: var(--sg-font); font-size: 14px; line-height: 1.55; }
::selection { background: var(--sg-selected); color: var(--sg-text); }
input, textarea { caret-color: var(--sg-accent); }
:where(button, a, input, textarea, select, summary, [role="button"], [role="tab"], [role="menuitem"], [tabindex]):focus-visible {
  outline: 2px solid var(--sg-accent) !important;
  outline-offset: 2px;
  transition: none !important;
}
:where(button, input, textarea, select):disabled { cursor: not-allowed; opacity: 0.55; }
:where(button, [role="button"]):not(:disabled):active { filter: brightness(0.94); }
h1, h2, h3 { min-width: 0; overflow-wrap: break-word; }
h1, h2 { text-wrap: balance; }
.smartgov-app-shell { color: var(--sg-text); font-family: var(--sg-font); }
.smartgov-app-shell.gov-layout,
.smartgov-app-shell .gov-body-shell,
.smartgov-app-shell .gov-main-layout { background: var(--sg-bg); min-width: 0; }
.smartgov-app-shell .gov-sider.gov-sider-dark.ant-layout-sider {
  position: sticky; top: 0; height: 100dvh; overflow-y: auto;
  background: var(--sg-sidebar); border-right: 1px solid var(--sg-border); box-shadow: none;
}
.smartgov-app-shell .gov-sider-brand {
  margin: 0 16px 8px; padding: 20px 0 16px; gap: 8px;
  background: var(--sg-transparent); border-radius: 0; border-bottom: 1px solid var(--sg-border); color: var(--sg-text);
}
.smartgov-app-shell .gov-sider-brand-icon {
  width: 28px; height: 32px; flex-shrink: 0; border-radius: 0;
  background: var(--sg-transparent); color: var(--sg-accent); font-size: 22px;
}
.smartgov-app-shell .gov-sider-brand-title { color: var(--sg-text); font-size: 14px; font-weight: 600; line-height: 1.5; }
.smartgov-app-shell .gov-sider-brand-subtitle { color: var(--sg-muted); font-size: 12px; margin-top: 2px; }
.smartgov-app-shell .gov-side-menu.ant-menu { background: var(--sg-sidebar); padding: 0 12px 20px; }
.smartgov-app-shell .gov-side-menu .ant-menu-item,
.smartgov-app-shell .gov-side-menu .ant-menu-submenu-title {
  margin: 2px 0; width: 100%; height: 40px; line-height: 40px; border-radius: 4px;
  color: var(--sg-text); font-size: 13px; font-weight: 400; letter-spacing: 0; background-image: none;
}
.smartgov-app-shell .gov-side-menu .ant-menu-item .anticon,
.smartgov-app-shell .gov-side-menu .ant-menu-submenu-title .anticon,
.smartgov-app-shell .gov-side-menu .ant-menu-submenu-arrow { color: var(--sg-muted); font-size: 16px; }
.smartgov-app-shell .gov-side-menu .ant-menu-sub.ant-menu-inline { background: var(--sg-sidebar); }
.smartgov-app-shell .gov-side-menu .ant-menu-sub .ant-menu-item { margin: 1px 0; padding-left: 44px !important; font-size: 13px; }
.smartgov-app-shell .gov-side-menu .ant-menu-submenu-open > .ant-menu-submenu-title { color: var(--sg-text); }
.smartgov-app-shell .gov-side-menu .ant-menu-item:hover,
.smartgov-app-shell .gov-side-menu .ant-menu-submenu-title:hover { background: var(--sg-subtle); color: var(--sg-text); }
.smartgov-app-shell .gov-side-menu .ant-menu-item-selected,
.smartgov-app-shell .gov-side-menu .gov-menu-home.ant-menu-item-selected {
  background: var(--sg-selected); color: var(--sg-accent); font-weight: 500; box-shadow: none;
}
.smartgov-app-shell .gov-side-menu .ant-menu-item-selected .anticon,
.smartgov-app-shell .gov-side-menu .gov-menu-home.ant-menu-item-selected .anticon { color: var(--sg-accent); }
.smartgov-app-shell .gov-side-menu .ant-menu-item-selected::after { display: none; }
.smartgov-app-shell .gov-header.gov-header-toolbar {
  height: 56px; line-height: normal; padding: 0 24px; gap: 16px;
  background: var(--sg-surface); border-bottom: 1px solid var(--sg-border); box-shadow: none;
}
.smartgov-app-shell .gov-header-breadcrumb { font-size: 13px; min-width: 0; gap: 12px; }
.smartgov-app-shell .gov-header-home, .smartgov-app-shell .gov-header-divider { color: var(--sg-muted); }
.smartgov-app-shell .gov-header-current { color: var(--sg-text); font-size: 14px; font-weight: 600; }
.smartgov-app-shell .gov-header-user { color: var(--sg-muted); }
.gov-user-trigger { min-height: 36px; color: var(--sg-text); border-radius: var(--sg-radius); }
.gov-user-trigger:hover { background: var(--sg-subtle); }
.gov-user-trigger em { color: var(--sg-muted); }
.smartgov-app-shell .gov-main.gov-main-with-sider {
  padding: 24px; max-width: 100%; min-width: 0; background: var(--sg-bg); overflow-x: clip;
}
.smartgov-app-shell .gov-main > * { max-width: var(--sg-max-width); margin-inline: auto; min-width: 0; }
.smartgov-app-shell .gov-main:has(#smartgov-harness-host) { padding: 0; }
.smartgov-app-shell .gov-main > #smartgov-harness-host { max-width: none; margin: 0; }
.smartgov-app-shell .gov-title { padding-left: 0; color: var(--sg-text); font-weight: 600; font-size: 20px; }
.smartgov-app-shell .gov-title::before,
.policy-review-group-title::before,
.policy-review-source-title::before { display: none; }
.smartgov-app-shell :is(.policy-overview-heading,.apply-project-heading,.page-heading-row,.system-page-toolbar,.report-workbench-heading,.report-toolbar) h1 {
  font-size: 22px; line-height: 1.4; font-weight: 600; color: var(--sg-text); letter-spacing: 0;
}
.smartgov-app-shell :is(.policy-overview-heading,.apply-project-heading,.page-heading-row,.system-page-toolbar,.report-workbench-heading,.report-toolbar) p {
  color: var(--sg-muted) !important; font-size: 13px; line-height: 1.6; margin-top: 8px;
}
.smartgov-app-shell :is(.policy-overview-heading,.apply-project-heading,.page-heading-row,.system-page-toolbar,.report-workbench-heading) { margin-bottom: 4px; gap: 16px; }
.smartgov-app-shell :is(.ant-card,.policy-review-sidebar,.permission-section,.template-file-filters,.report-panel,.report-related-panel) {
  background: var(--sg-surface); border-color: var(--sg-border); border-radius: var(--sg-radius-panel); box-shadow: none;
}
.smartgov-app-shell .ant-card .ant-card { border-radius: 0; border: 0; border-top: 1px solid var(--sg-border); box-shadow: none; }
.smartgov-app-shell .ant-card-head { border-bottom-color: var(--sg-border); color: var(--sg-text); padding: 0 20px; }
.smartgov-app-shell .ant-card-head-title { font-size: 16px; font-weight: 600; letter-spacing: 0; }
.smartgov-app-shell .ant-card-body { min-width: 0; }
.smartgov-app-shell .ant-table-wrapper,
.smartgov-app-shell .ant-table-container { min-width: 0; max-width: 100%; }
.smartgov-app-shell .ant-table-content { overflow-x: auto; }
.smartgov-app-shell .ant-table-thead > tr > th {
  padding: 12px 16px; background: var(--sg-subtle) !important; color: var(--sg-muted);
  font-size: 13px; font-weight: 500; letter-spacing: 0; white-space: nowrap; border-bottom-color: var(--sg-border);
}
.smartgov-app-shell .ant-table-tbody > tr > td { padding: 12px 16px; font-size: 13px; border-bottom-color: var(--sg-border); }
.smartgov-app-shell .ant-table-tbody > tr:hover > td { background: var(--sg-sidebar); }
.smartgov-app-shell .ant-table-thead > tr > th::before { display: none; }
.smartgov-app-shell .ant-table-wrapper .ant-table-bordered .ant-table-cell { border-inline-end: 0; }
.smartgov-app-shell .ant-table-wrapper .ant-table-bordered .ant-table-container { border-inline-start: 0; }
.smartgov-app-shell .ant-table-cell .ant-btn-link { height: auto; padding: 4px; }
.smartgov-app-shell .ant-pagination { margin-top: 20px; }
.smartgov-app-shell .ant-pagination-item-active { border-color: var(--sg-border); background: var(--sg-selected); }
.smartgov-app-shell .ant-statistic-title { color: var(--sg-muted) !important; font-size: 13px; }
.smartgov-app-shell .ant-statistic-content { color: var(--sg-text); font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.smartgov-app-shell .ant-statistic-content-prefix { display: none; }
.smartgov-app-shell :is(.ant-btn,.ant-input,.ant-input-affix-wrapper,.ant-input-number,.ant-select-selector,.ant-picker) { border-radius: var(--sg-radius); box-shadow: none; font-family: var(--sg-font); }
.smartgov-app-shell .ant-btn { font-size: 13px; font-weight: 500; }
.smartgov-app-shell .ant-btn-default { color: var(--sg-text); border-color: var(--sg-border-strong); background: var(--sg-surface); }
.smartgov-app-shell .ant-btn-primary { background: var(--sg-accent); border-color: var(--sg-accent); color: var(--sg-surface); box-shadow: none; }
.smartgov-app-shell .ant-btn-primary:not(:disabled):hover { background: var(--sg-accent-hover); border-color: var(--sg-accent-hover); }
.smartgov-app-shell .ant-btn-link { color: var(--sg-accent); }
.smartgov-app-shell :is(.ant-input,.ant-input-affix-wrapper,.ant-input-number,.ant-select-selector,.ant-picker) { border-color: var(--sg-control-border); }
.smartgov-app-shell :is(.ant-input,.ant-input-number-input,.ant-select-selection-item,.ant-picker-input input) { font-size: 14px; }
.smartgov-app-shell .ant-input::placeholder,
.smartgov-app-shell .ant-select-selection-placeholder { color: var(--sg-muted); }
.smartgov-app-shell .ant-form-item-label > label { color: var(--sg-muted); font-size: 13px; }
.smartgov-app-shell .ant-tabs-tab { font-size: 14px; }
.smartgov-app-shell .ant-tabs-tab-active .ant-tabs-tab-btn { color: var(--sg-accent); text-shadow: none; }
.smartgov-app-shell .ant-tabs-ink-bar { background: var(--sg-accent); }
.smartgov-app-shell .ant-tabs-nav::before { border-bottom-color: var(--sg-border); }
.smartgov-app-shell :is(.gov-tabs,.report-tabs) .ant-tabs-tab { padding: 12px 16px; }
.smartgov-app-shell .ant-tag { border-radius: 3px; font-weight: 400; }
.smartgov-app-shell :is(.ant-tag-blue,.ant-tag-geekblue,.ant-tag-purple,.ant-tag-processing) { color: var(--sg-accent); background: var(--sg-selected); border-color: var(--sg-selected); }
.smartgov-app-shell :is(.ant-tag-green,.ant-tag-success) { color: var(--sg-success); background: var(--sg-success-bg); border-color: var(--sg-success-bg); }
.smartgov-app-shell :is(.ant-tag-orange,.ant-tag-warning,.ant-tag-gold) { color: var(--sg-warning) !important; background: var(--sg-warning-bg) !important; border-color: var(--sg-warning-bg) !important; }
.smartgov-app-shell :is(.ant-tag-red,.ant-tag-error) { color: var(--sg-danger); background: var(--sg-danger-bg); border-color: var(--sg-danger-bg); }
.smartgov-app-shell :is(.policy-review-sidebar,.permission-section,.template-file-filters,.apply-list-summary,.apply-quality-summary) { background: var(--sg-subtle); }
.smartgov-app-shell :is(.policy-review-group-title,.policy-review-source-title) { padding-left: 0; color: var(--sg-text); font-size: 14px; }
.smartgov-app-shell :is(.policy-review-region-item,.policy-review-source-item,.apply-region-item,.apply-year-item) { color: var(--sg-muted); border-color: var(--sg-border); border-radius: var(--sg-radius); }
.smartgov-app-shell :is(.policy-review-region-item,.policy-review-source-item,.apply-region-item,.apply-year-item).active { color: var(--sg-accent); background: var(--sg-selected); border-color: var(--sg-selected); }
.smartgov-app-shell .apply-list-summary > span { color: var(--sg-muted) !important; }
.smartgov-app-shell .apply-list-summary b { color: var(--sg-text); font-variant-numeric: tabular-nums; }
.smartgov-app-shell .permission-group { border: 0; border-bottom: 1px solid var(--sg-border); border-radius: 0; background: var(--sg-transparent); }
.smartgov-app-shell :is(.report-kpi,.report-policy-card,.report-profile-summary,.report-evidence-brief,.report-threshold) { background: var(--sg-surface); border-color: var(--sg-border); border-radius: var(--sg-radius); box-shadow: none; }
.smartgov-app-shell :is(.report-kpi-icon,.report-accent-bar,.report-eyebrow,.report-history-dot) { display: none; }

.decompose-progress-indeterminate {
  position: relative;
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #eee7df;
}

.decompose-progress-indeterminate span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 34%;
  border-radius: inherit;
  background: linear-gradient(90deg, #b86a3d, #dca57d, #b86a3d);
}

.decompose-progress-indeterminate.is-running span {
  animation: smartgov-decompose-indeterminate 1.6s ease-in-out infinite;
}

.decompose-progress-indeterminate.is-complete span {
  width: 100%;
  background: #3f8f64;
  animation: none;
}

.decompose-progress-indeterminate.is-failed span {
  width: 100%;
  background: #c84f48;
  animation: none;
}

@keyframes smartgov-decompose-indeterminate {
  0% { transform: translateX(-110%); }
  55% { transform: translateX(115%); }
  100% { transform: translateX(300%); }
}
.smartgov-app-shell .report-kpi { padding: 12px 0; border: 0; border-bottom: 1px solid var(--sg-border); }
.smartgov-app-shell .report-kpi strong { color: var(--sg-text); font-size: 24px; }
.smartgov-app-shell .report-bar-fill { background: var(--sg-accent); }
.smartgov-app-shell .report-policy-card h2 { color: var(--sg-text); font-size: 22px; }
.smartgov-app-shell .report-toolbar { padding: 0 0 16px; }
.smartgov-app-shell .report-workbench { gap: var(--sg-gap); margin: 0; padding: 0; background: var(--sg-transparent); min-height: 0; }
.smartgov-app-shell .report-top-stats { display: flex; gap: 0; margin-bottom: 20px; border-block: 1px solid var(--sg-border); background: var(--sg-surface); }
.smartgov-app-shell .report-stat-card { flex: 1; min-height: 88px; padding: 20px; border: 0; border-radius: 0; background: var(--sg-transparent); }
.smartgov-app-shell .report-stat-card + .report-stat-card { border-left: 1px solid var(--sg-border); }
.smartgov-app-shell .report-stat-icon { display: none; }
.smartgov-app-shell .report-stat-card > div > span { font-size: 13px; color: var(--sg-muted); }
.smartgov-app-shell .report-stat-card b { font-size: 26px; color: var(--sg-text); font-variant-numeric: tabular-nums; }
.smartgov-app-shell .report-stat-card b em { color: var(--sg-muted); }
.smartgov-app-shell .report-process-card { padding: 20px 0; border: 0; border-top: 1px solid var(--sg-border); border-radius: 0; background: var(--sg-transparent); gap: 24px; }
.smartgov-app-shell .report-process-step .process-icon,
.smartgov-app-shell .report-process-step > .anticon { display: none; }
.smartgov-app-shell .report-process-step > b,
.smartgov-app-shell .report-process-step:nth-child(2) > b,
.smartgov-app-shell .report-process-step:nth-child(3) > b { font-size: 14px; font-weight: 400; color: var(--sg-muted); }
.smartgov-app-shell .report-process-step h3 { font-size: 14px; font-weight: 500; color: var(--sg-text); }
.smartgov-app-shell .report-process-step p { color: var(--sg-muted); font-size: 12px; }
.smartgov-app-shell :is(.policy-source-card,.policy-source-group,.home-shortcut,.metric-card) { box-shadow: none; background-image: none; }
.smartgov-app-shell .policy-source-card:hover { transform: none; box-shadow: none; border-color: var(--sg-border-strong); }
.smartgov-app-shell .policy-source-grid { display: flex; flex-direction: column; gap: 0; }
.smartgov-app-shell .policy-source-card {
  display: grid; grid-template-columns: 72px minmax(0, 1fr) 104px 188px; gap: 4px 20px;
  min-height: 96px; padding: 16px 0; border: 0; border-bottom: 1px solid var(--sg-border); border-radius: 0;
  background: var(--sg-surface); color: var(--sg-text); transition: background-color 120ms ease;
}
.smartgov-app-shell .policy-source-card:hover { background: var(--sg-sidebar); }
.smartgov-app-shell .policy-source-card-top { grid-column: 1; grid-row: 1 / 3; justify-content: flex-start; align-self: center; }
.smartgov-app-shell .policy-source-card-mark { display: none; }
.smartgov-app-shell .policy-source-card h3 { grid-column: 2; grid-row: 1; align-self: end; color: var(--sg-text); font-size: 15px; font-weight: 500; }
.smartgov-app-shell .policy-source-card p { grid-column: 2; grid-row: 2; color: var(--sg-muted); }
.smartgov-app-shell .policy-source-card-stats { grid-column: 3; grid-row: 1 / 3; align-self: center; margin: 0; }
.smartgov-app-shell .policy-source-card-stats strong { font-size: 22px; color: var(--sg-text); }
.smartgov-app-shell .policy-source-card-stats span { color: var(--sg-muted); }
.smartgov-app-shell .policy-source-card-foot { grid-column: 4; grid-row: 1 / 3; flex-direction: column; align-items: flex-start; align-self: center; gap: 4px; padding: 0; margin: 0; border: 0; color: var(--sg-muted); font-size: 12px; }
.smartgov-app-shell .policy-source-card-foot b { color: var(--sg-accent); font-size: 13px; font-weight: 500; }
.smartgov-app-shell .policy-source-directory-heading p { color: var(--sg-muted); }
.smartgov-app-shell :is(.smartgov-quality-banner,.ant-alert-warning) { background: var(--sg-warning-bg); border-color: var(--sg-border); color: var(--sg-warning); border-radius: var(--sg-radius); }
.smartgov-app-shell .smartgov-quality-banner-icon { background: var(--sg-transparent); color: var(--sg-warning); border-radius: 0; }
.smartgov-app-shell .smartgov-quality-toggle { border-color: var(--sg-border-strong); color: var(--sg-text); background: var(--sg-surface); border-radius: var(--sg-radius); }
.smartgov-app-shell :is([class*="-hero"],[class*="-banner"]):not(.lc-hero):not(.lc-banner) { background-image: none; box-shadow: none; }
.smartgov-app-shell :is(.page-heading-row,.apply-project-heading,.report-workbench-heading) .ant-tag { font-size: 12px; }
.smartgov-app-shell :is(.multi-heading,.innovation-heading,.acceptance-heading) h1 { color: var(--sg-text); font-size: 22px; font-weight: 600; }
.smartgov-app-shell :is(.multi-stats,.rd-allocation-stats) { gap: 0; background: var(--sg-surface); border-block: 1px solid var(--sg-border); }
.smartgov-app-shell :is(.multi-stats,.rd-allocation-stats) .ant-card,
.smartgov-app-shell .multi-stats .ant-card.multi-stat-warning { border: 0; border-right: 1px solid var(--sg-border); border-radius: 0; background: var(--sg-transparent); }
.smartgov-app-shell .multi-stats .ant-card:last-child { border-right: 0; }
.smartgov-app-shell .multi-stats .ant-card-body > .anticon { display: none; }
.smartgov-app-shell .multi-stats .ant-card-body { padding: 20px; }
.smartgov-app-shell .multi-stats .ant-statistic-content { color: var(--sg-text); }
.smartgov-app-shell .multi-chart { background-image: none; border-bottom: 1px solid var(--sg-border); }
.smartgov-app-shell .multi-bar-fill { background: var(--sg-accent); border-radius: 2px 2px 0 0; box-shadow: none; transition: none; }
.smartgov-app-shell .multi-bar-fill.current { background: var(--sg-success); }
.smartgov-app-shell :is(.multi-detail-meta,.rd-personnel-actionbar,.rd-allocation-note) { background: var(--sg-subtle); border-color: var(--sg-border); border-radius: var(--sg-radius); }
.smartgov-app-shell .project-matrix-page .matrix-shell { border-radius: var(--sg-radius-panel); box-shadow: none; }
.smartgov-app-shell :is(.acceptance-basic-left h3,.acceptance-progress-panel h3,.acceptance-subtitle) { padding-left: 0; color: var(--sg-text); }
.smartgov-app-shell :is(.acceptance-basic-left h3,.acceptance-progress-panel h3,.acceptance-subtitle)::before { display: none; }
.smartgov-app-shell .report-upload-dragger.ant-upload-wrapper .ant-upload-drag { height: 200px; min-height: 200px; background: var(--sg-subtle); border-color: var(--sg-border-strong); border-radius: var(--sg-radius); }
.smartgov-app-shell .report-upload-dragger .ant-upload-drag-icon .anticon { color: var(--sg-muted); font-size: 32px; }
.smartgov-app-shell .report-upload-dragger .ant-upload-text { font-size: 16px !important; color: var(--sg-text) !important; }
.smartgov-app-shell .report-upload-dragger .ant-upload-hint { color: var(--sg-muted) !important; }
.smartgov-app-shell .report-type-buttons .ant-btn.active { background: var(--sg-selected); color: var(--sg-accent); border-color: var(--sg-border-strong); box-shadow: none; }
.smartgov-app-shell :is(.report-theme-input.ant-input,.report-action-buttons .ant-btn) { height: 40px; border-radius: var(--sg-radius); font-size: 14px; }
.smartgov-app-shell .report-panel { padding: 20px; min-height: 360px; }
.smartgov-app-shell .report-panel-head h2 { color: var(--sg-text); font-size: 16px; }
.smartgov-app-shell .report-panel-head p { color: var(--sg-muted); font-size: 13px; }
.ai-cute-emoji, .ai-cute-dots { display: none; }
.ai-cute-loading, .ai-cute-text { color: var(--sg-muted); letter-spacing: 0; font-size: 14px; font-weight: 400; }
.ant-message-notice-content.ai-cute-message,
.ai-cute-message .ant-message-notice-content,
.ant-message-notice-content { background: var(--sg-surface); border: 1px solid var(--sg-border); border-radius: var(--sg-radius); box-shadow: none; }
.ai-big-caption { color: var(--sg-muted); border: 1px solid var(--sg-border); background: var(--sg-surface); box-shadow: none; border-radius: var(--sg-radius); }
.ant-modal-content, .ant-drawer-content, .ant-select-dropdown, .ant-dropdown-menu { border: 1px solid var(--sg-border); box-shadow: none !important; }
.ant-modal-content, .ant-select-dropdown, .ant-dropdown-menu { border-radius: var(--sg-radius-panel) !important; }
.ant-modal-title, .ant-drawer-title { color: var(--sg-text); }
.ant-empty-description { color: var(--sg-muted); }
.auth-loading-screen { background: var(--sg-bg); color: var(--sg-muted); }

.login-page {
  display: grid; grid-template-columns: 1fr; align-content: center; justify-items: center;
  min-height: 100dvh; padding: 40px 20px; background: var(--sg-bg); gap: 24px;
}
.login-brand-panel { padding: 0; min-height: auto; width: min(400px, 100%); background: var(--sg-transparent); color: var(--sg-text); }
.login-brand-panel::after, .login-brand-lines { display: none; }
.login-brand-mark { display: none; }
.login-brand-panel h1 { margin-top: 0; font-size: 24px; font-weight: 600; letter-spacing: 0; }
.login-brand-panel p { margin-top: 8px; color: var(--sg-muted); font-size: 13px; letter-spacing: 0; }
.login-form-panel { width: min(400px, 100%); padding: 0; background: var(--sg-transparent); }
.login-form-box { padding: 28px; border: 1px solid var(--sg-border); border-radius: var(--sg-radius-panel); background: var(--sg-surface); box-shadow: none; }
.login-form-title h2 { color: var(--sg-text); font-size: 20px; font-weight: 600; }
.login-form-title p { color: var(--sg-muted); font-size: 13px; }
.login-form-box .ant-input-affix-wrapper { height: 44px; padding: 4px 12px; border-color: var(--sg-control-border); border-radius: var(--sg-radius); }
.login-form-box .ant-input-affix-wrapper > input.ant-input { min-height: 32px; font-size: 16px; }
.login-form-box .ant-btn { height: 44px; margin-top: 4px; border-radius: var(--sg-radius); }
.login-hint { padding: 12px; color: var(--sg-muted); background: var(--sg-subtle); font-size: 12px; line-height: 1.7; border-radius: var(--sg-radius); }
.login-hint b { color: var(--sg-text); }
.system-account-name { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; }
.system-account-name > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.system-account-count { color: var(--sg-text); font-variant-numeric: tabular-nums; }
.system-project-count { color: var(--sg-accent); font-size: 15px; font-variant-numeric: tabular-nums; }
.system-account-status { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.system-account-status small { color: var(--sg-muted); font-size: 11px; line-height: 1.4; }
.smartgov-app-shell .ant-tag.account-role-tag { color: #315777; background: #edf3f8; border-color: #cedbe6; }
.account-form-section { grid-column: 1 / -1; margin: 4px 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--sg-border); font-size: 15px; }

/* Keep the actions of an editing form in view while its fields scroll. */
.ant-modal-wrap .ant-modal:has(.ant-form):has(.ant-modal-footer) { top: 20px; padding-bottom: 0; }
.ant-modal-content:has(.ant-form):has(.ant-modal-footer) {
  display: flex; flex-direction: column; box-sizing: border-box; max-height: calc(100dvh - 40px);
}
.ant-modal-content:has(.ant-form):has(.ant-modal-footer) > .ant-modal-body {
  min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable;
}
.ant-modal-content:has(.ant-form) > :is(.ant-modal-header, .ant-modal-footer) { flex: none; }
.system-support-overview {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  margin: 16px 0 0; padding: 14px 16px; border: 1px solid var(--sg-border);
  border-radius: var(--sg-radius); background: var(--sg-subtle);
}
.system-support-overview-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.system-support-overview-copy b { color: var(--sg-text); font-size: 14px; font-weight: 600; }
.system-support-overview-copy span { color: var(--sg-muted); font-size: 12px; line-height: 1.6; }
.system-support-metrics { display: flex; align-items: stretch; flex-shrink: 0; }
.system-support-metrics > span {
  min-width: 92px; padding: 0 14px; color: var(--sg-muted); font-size: 12px;
  text-align: center; border-left: 1px solid var(--sg-border);
}
.system-support-metrics > span:first-child { border-left: 0; }
.system-support-metrics strong {
  display: block; color: var(--sg-text); font-size: 20px; line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.system-institution-details {
  display: flex; flex-direction: column; gap: 10px;
  padding: 8px 16px 16px 48px; background: var(--sg-sidebar);
}
.system-member-group { min-width: 0; }
.system-member-group h4 {
  display: flex; align-items: center; gap: 8px; margin: 0 0 8px;
  color: var(--sg-muted); font-size: 12px; font-weight: 500;
}
.system-member-group h4 span {
  min-width: 22px; padding: 1px 6px; color: var(--sg-text);
  text-align: center; background: var(--sg-surface); border: 1px solid var(--sg-border);
  border-radius: 999px; font-variant-numeric: tabular-nums;
}
.system-member-list { display: flex; flex-direction: column; gap: 1px; }
.system-member-item {
  display: grid; grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) auto;
  align-items: center; gap: 10px; min-height: 42px; padding: 8px 10px;
  background: var(--sg-surface); border-bottom: 1px solid var(--sg-border);
}
.system-member-item:first-child { border-radius: var(--sg-radius) var(--sg-radius) 0 0; }
.system-member-item:last-child { border-bottom: 0; border-radius: 0 0 var(--sg-radius) var(--sg-radius); }
.system-member-item b { color: var(--sg-text); font-size: 13px; font-weight: 500; }
.system-member-item > span { color: var(--sg-muted); font-size: 12px; }
.system-member-item small { color: var(--sg-muted); font-size: 11px; }
.system-technician-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.system-technician-heading h4 {
  display: flex; align-items: center; gap: 8px; margin: 0;
  color: var(--sg-muted); font-size: 12px; font-weight: 500;
}
.system-technician-heading h4 span {
  min-width: 22px; padding: 1px 6px; color: var(--sg-text);
  text-align: center; background: var(--sg-surface); border: 1px solid var(--sg-border);
  border-radius: 999px;
}
.system-technician-heading p { margin: 0; color: var(--sg-muted); font-size: 11px; }
.system-technician-list { display: flex; flex-direction: column; gap: 8px; }
.system-technician-item {
  background: var(--sg-surface); border: 1px solid var(--sg-border); border-radius: var(--sg-radius);
}
.system-technician-item > summary {
  display: flex; align-items: center; gap: 10px; min-height: 42px;
  padding: 8px 12px; cursor: pointer; list-style: none;
}
.system-technician-item > summary::-webkit-details-marker { display: none; }
.system-technician-item > summary::after {
  content: "展开"; margin-left: auto; color: var(--sg-muted); font-size: 12px;
}
.system-technician-item[open] > summary::after { content: "收起"; }
.system-technician-item > summary b { color: var(--sg-text); font-size: 13px; font-weight: 500; }
.system-technician-item > summary span { color: var(--sg-muted); font-size: 12px; }
.system-technician-item > summary em { color: var(--sg-accent); font-size: 12px; font-style: normal; }
.system-technician-actions {
  display: flex; flex-wrap: wrap; gap: 2px 12px; padding: 0 12px 8px 32px;
}
.system-enterprise-list {
  display: flex; flex-direction: column; gap: 1px;
  padding: 8px 12px 12px 32px; border-top: 1px solid var(--sg-border);
}
.system-enterprise-item {
  display: flex; justify-content: space-between; gap: 16px; padding: 8px 10px;
  color: var(--sg-text); background: var(--sg-subtle);
}
.system-enterprise-item b { font-size: 12px; font-weight: 500; }
.system-enterprise-item span { color: var(--sg-muted); font-size: 12px; }
.system-enterprise-list p, .system-enterprise-empty {
  margin: 0; padding: 8px 0; color: var(--sg-muted); font-size: 12px;
}
.system-contract-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.system-contract-cell small { color: var(--sg-muted); font-size: 11px; line-height: 1.35; }
.system-inline-contract-picker { display: flex; align-items: center; min-height: 34px; }
.system-inline-contract-picker .ant-picker { width: 238px !important; }
.system-muted-text { color: var(--sg-muted); font-size: 12px; }
.system-contract-form-note {
  display: flex; align-items: center; gap: 8px; min-height: 34px;
  padding: 0 11px; border: 1px solid var(--sg-border); border-radius: var(--sg-radius);
  background: var(--sg-subtle); color: var(--sg-muted); font-size: 12px;
}
.system-org-map {
  margin-top: 16px; overflow: hidden; border: 1px solid var(--sg-border);
  border-radius: calc(var(--sg-radius) + 2px); background: var(--sg-surface);
}
.system-org-map-heading {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 24px;
  padding: 18px 20px; border-bottom: 1px solid var(--sg-border);
  background: linear-gradient(135deg, rgba(111, 91, 69, .06), rgba(111, 91, 69, 0) 62%);
}
.system-org-map-heading h2 { margin: 0; color: var(--sg-text); font-size: 16px; font-weight: 600; }
.system-org-map-heading p { margin: 5px 0 0; color: var(--sg-muted); font-size: 12px; line-height: 1.6; }
.system-org-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.system-org-legend span {
  padding: 3px 8px; border-radius: 999px; color: var(--sg-muted); font-size: 11px;
  background: var(--sg-subtle); border: 1px solid var(--sg-border);
}
.system-org-institutions { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 20px; }
.system-org-institution {
  border: 1px solid var(--sg-border); border-radius: var(--sg-radius);
  background: var(--sg-surface);
}
.system-org-institution > summary,
.system-org-technician > summary {
  display: grid; grid-template-columns: auto minmax(190px, 1.4fr) minmax(150px, .8fr) auto auto;
  align-items: center; gap: 14px; min-height: 58px; padding: 10px 16px;
  cursor: pointer; list-style: none;
}
.system-org-technician > summary {
  grid-template-columns: auto minmax(180px, 1fr) auto auto auto;
  min-height: 52px; padding: 9px 13px;
}
.system-org-institution > summary::-webkit-details-marker,
.system-org-technician > summary::-webkit-details-marker { display: none; }
.system-org-institution > summary::after,
.system-org-technician > summary::after {
  content: "+"; grid-column: -2 / -1; grid-row: 1; justify-self: end;
  display: grid; place-items: center;
  width: 24px; height: 24px; border: 1px solid var(--sg-border); border-radius: 50%;
  color: var(--sg-muted); font-size: 15px; font-weight: 400; background: var(--sg-subtle);
}
.system-org-institution[open] > summary::after,
.system-org-technician[open] > summary::after { content: "−"; }
.system-org-node-mark {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 46px; height: 23px; padding: 0 8px; border-radius: 999px;
  font-size: 10px; line-height: 1; letter-spacing: .02em;
}
.system-org-node-mark.is-institution { color: #6b553a; background: #f2eadd; }
.system-org-node-mark.is-technician { color: #476369; background: #e7eff0; }
.system-org-node-mark.is-enterprise { color: #5c5b55; background: #ecebe6; }
.system-org-node-title { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.system-org-node-title b {
  overflow: hidden; color: var(--sg-text); font-size: 13px; font-weight: 600;
  text-overflow: ellipsis; white-space: nowrap;
}
.system-org-node-title small { color: var(--sg-muted); font-size: 11px; }
.system-org-contract { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.system-org-contract small { color: var(--sg-muted); font-size: 10px; }
.system-org-inherited {
  color: var(--sg-muted); font-size: 11px; white-space: nowrap;
}
.system-org-stats { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.system-org-stats span {
  min-width: 58px; padding: 3px 7px; border-radius: 6px; color: var(--sg-text);
  background: var(--sg-subtle); font-size: 11px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.system-org-technician-list {
  position: relative; display: flex; flex-direction: column; gap: 8px;
  margin: 0 14px 14px 36px; padding: 10px 0 0 20px; border-top: 1px solid var(--sg-border);
}
.system-org-technician-list::before {
  content: ""; position: absolute; top: 10px; bottom: 20px; left: 7px;
  width: 1px; background: color-mix(in srgb, var(--sg-border) 78%, transparent);
}
.system-org-technician {
  position: relative; border: 1px solid var(--sg-border); border-radius: var(--sg-radius);
  background: color-mix(in srgb, var(--sg-subtle) 58%, var(--sg-surface));
}
.system-org-technician::before {
  content: ""; position: absolute; top: 26px; left: -14px; width: 13px;
  height: 1px; background: var(--sg-border);
}
.system-org-enterprise-list {
  position: relative; display: flex; flex-direction: column; gap: 5px;
  margin: 0 12px 12px 27px; padding: 9px 0 0 18px; border-top: 1px solid var(--sg-border);
}
.system-org-enterprise-list::before {
  content: ""; position: absolute; top: 9px; bottom: 14px; left: 5px;
  width: 1px; background: var(--sg-border);
}
.system-org-enterprise {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: 10px; min-height: 38px; padding: 5px 10px;
  border-radius: 7px; background: var(--sg-surface);
}
.system-org-enterprise::before {
  content: ""; position: absolute; top: 19px; left: -13px; width: 12px;
  height: 1px; background: var(--sg-border);
}
.system-org-enterprise b {
  overflow: hidden; color: var(--sg-text); font-size: 12px; font-weight: 500;
  text-overflow: ellipsis; white-space: nowrap;
}
.system-org-project-count {
  color: var(--sg-accent); font-size: 11px; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.system-org-empty { margin: 0; padding: 12px; color: var(--sg-muted); font-size: 12px; }
.system-org-empty-state {
  margin: 16px; padding: 28px; border: 1px dashed var(--sg-border); border-radius: var(--sg-radius);
  color: var(--sg-muted); font-size: 13px; text-align: center; background: var(--sg-subtle);
}
.system-dept-maintenance {
  margin-top: 14px; border: 1px solid var(--sg-border); border-radius: var(--sg-radius);
  background: var(--sg-surface);
}
.system-dept-maintenance > summary {
  display: flex; align-items: center; gap: 10px; padding: 13px 16px;
  cursor: pointer; list-style: none;
}
.system-dept-maintenance > summary::-webkit-details-marker { display: none; }
.system-dept-maintenance > summary::after {
  content: "展开"; margin-left: auto; color: var(--sg-muted); font-size: 11px;
}
.system-dept-maintenance[open] > summary::after { content: "收起"; }
.system-dept-maintenance > summary b { color: var(--sg-text); font-size: 13px; font-weight: 600; }
.system-dept-maintenance > summary span { color: var(--sg-muted); font-size: 11px; }
.system-dept-maintenance > .ant-table-wrapper { padding: 0 16px 16px; }
.system-page,
.system-page-card,
.system-page-card > .ant-card-body {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.system-page-card { overflow: hidden; }
.system-page-card .ant-table-wrapper,
.system-page-card .ant-table-container {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.system-page-card .ant-table-content {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 1023px) {
  .smartgov-app-shell .gov-sider.gov-sider-dark.ant-layout-sider {
    position: fixed; height: 100dvh; background: var(--sg-sidebar); box-shadow: none;
  }
  .smartgov-app-shell .gov-mobile-nav-backdrop { background: var(--sg-backdrop); }
  .smartgov-app-shell .gov-mobile-nav-toggle {
    width: 40px; height: 40px; border: 0; color: var(--sg-text); background: var(--sg-transparent); border-radius: var(--sg-radius);
  }
  .smartgov-app-shell .gov-header.gov-header-toolbar { padding: 0 12px; height: 56px; }
  .smartgov-app-shell .gov-main.gov-main-with-sider { padding: 16px; max-width: 100%; overflow-x: clip; }
  .smartgov-app-shell .gov-main:has(#smartgov-harness-host) { padding: 0; }
  .smartgov-app-shell .gov-side-menu :is(.ant-menu-item,.ant-menu-submenu-title) { height: 44px; line-height: 44px; font-size: 14px; }
  .smartgov-app-shell :is(.policy-overview-filter-form,.template-file-filters) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .smartgov-app-shell .policy-source-card { grid-template-columns: 56px minmax(0, 1fr) 80px; gap: 4px 12px; }
  .smartgov-app-shell .policy-source-card-foot { grid-column: 2 / 4; grid-row: 3; flex-direction: row; gap: 12px; }
}
@media (max-width: 640px) {
  .smartgov-app-shell .gov-main.gov-main-with-sider { padding: 12px; }
  .smartgov-app-shell .gov-main:has(#smartgov-harness-host) { padding: 0; }
  .smartgov-app-shell .gov-header-user { display: inline-flex; }
  .smartgov-app-shell .gov-header-user > :not(.ant-dropdown-trigger) { display: none; }
  .smartgov-app-shell .gov-user-trigger { max-width: 126px; min-height: 40px; }
  .smartgov-app-shell .gov-user-trigger em { display: none; }
  .smartgov-app-shell .gov-user-trigger span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .smartgov-app-shell .gov-header-breadcrumb { gap: 8px; }
  .smartgov-app-shell :is(.policy-overview-heading,.apply-project-heading,.page-heading-row,.system-page-toolbar,.report-workbench-heading) { flex-wrap: wrap; }
  .smartgov-app-shell :is(.ant-card-body,.system-page-card > .ant-card-body) { padding: 16px; }
  .smartgov-app-shell :is(.ant-input,.ant-input-number-input,.ant-select-selection-item,.ant-picker-input input) { font-size: 16px; }
  .smartgov-app-shell :is(.policy-overview-filter-form,.template-file-filters,.system-form-grid,.permission-group) { grid-template-columns: minmax(0, 1fr); }
  .smartgov-app-shell :is(.ant-form-inline,.ant-space) { flex-wrap: wrap; }
  .smartgov-app-shell .ant-table-thead > tr > th { font-size: 13px; }
  .smartgov-app-shell .policy-source-card { grid-template-columns: minmax(0, 1fr) 72px; gap: 8px; padding: 16px 0; }
  .smartgov-app-shell .policy-source-card-top { grid-column: 1; grid-row: 1; }
  .smartgov-app-shell .policy-source-card h3 { grid-column: 1 / 3; grid-row: 2; white-space: normal; }
  .smartgov-app-shell .policy-source-card p { grid-column: 1 / 3; grid-row: 3; }
  .smartgov-app-shell .policy-source-card-stats { grid-column: 2; grid-row: 1; justify-self: end; }
  .smartgov-app-shell .policy-source-card-foot { grid-column: 1 / 3; grid-row: 4; justify-content: space-between; }
  .login-page { padding: 28px 20px; }
  .login-brand-panel h1 { font-size: 22px; }
  .login-form-box { padding: 24px; }
  .system-support-overview { align-items: stretch; flex-direction: column; gap: 12px; }
  .system-support-metrics { justify-content: space-between; }
  .system-support-metrics > span { flex: 1; min-width: 0; padding: 0 8px; }
  .system-institution-details { padding: 10px 12px 14px; }
  .system-member-item { grid-template-columns: minmax(0, 1fr) auto; }
  .system-member-item small { grid-column: 1 / -1; }
  .system-technician-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  .system-technician-item > summary { align-items: flex-start; flex-wrap: wrap; }
  .system-technician-item > summary::after { flex-basis: 100%; margin-left: 0; }
  .system-enterprise-list { padding-left: 12px; }
  .system-enterprise-item { align-items: flex-start; flex-direction: column; gap: 3px; }
  .system-technician-actions { padding-left: 12px; }
  .system-org-map-heading { align-items: flex-start; flex-direction: column; gap: 10px; padding: 16px; }
  .system-org-legend { justify-content: flex-start; }
  .system-org-institutions { padding: 12px; }
  .system-org-institution > summary,
  .system-org-technician > summary {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 9px; padding: 10px 12px;
  }
  .system-org-institution > summary::after,
  .system-org-technician > summary::after {
    grid-column: 3; grid-row: 1;
  }
  .system-org-institution > summary .system-org-contract,
  .system-org-institution > summary .system-org-stats,
  .system-org-technician > summary .system-org-inherited,
  .system-org-technician > summary .system-org-stats {
    grid-column: 2 / -1; justify-content: flex-start;
  }
  .system-org-technician-list { margin: 0 9px 10px 22px; padding-left: 16px; }
  .system-org-enterprise-list { margin-left: 13px; padding-left: 15px; }
  .system-org-enterprise { grid-template-columns: auto minmax(0, 1fr); }
  .system-org-project-count { grid-column: 2; }
  .system-dept-maintenance > summary { align-items: flex-start; flex-direction: column; }
  .system-dept-maintenance > summary::after { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* Shared controls also apply to body-mounted modal, drawer and select portals. */
body :is(.ant-btn,.ant-input,.ant-input-affix-wrapper,.ant-input-number,.ant-select-selector,.ant-picker) { font-family: var(--sg-font); border-radius: var(--sg-radius); }
body .ant-btn-primary:not(:disabled):not(.ant-btn-dangerous) { background: var(--sg-accent); border-color: var(--sg-accent); color: var(--sg-surface); box-shadow: none; }
body .ant-btn-primary:not(:disabled):not(.ant-btn-dangerous):hover { background: var(--sg-accent-hover); border-color: var(--sg-accent-hover); }
body .ant-btn-link:not(:disabled):not(.ant-btn-dangerous) { color: var(--sg-accent); }
body .ant-btn-link:not(:disabled):not(.ant-btn-dangerous):hover { color: var(--sg-accent-hover); }
body .ant-btn-primary.ant-btn-dangerous:not(:disabled) { background: var(--sg-danger); border-color: var(--sg-danger); color: var(--sg-surface); }
body .ant-btn-link.ant-btn-dangerous:not(:disabled) { color: var(--sg-danger); }
body .ant-btn.ant-btn-default.ant-btn-dangerous:not(:disabled) { color: var(--sg-danger); border-color: var(--sg-danger); }
body .ant-btn.ant-btn-default.ant-btn-dangerous:not(:disabled):hover { background: var(--sg-danger-bg); }
body .ant-btn-primary:disabled { color: var(--sg-faint); background: var(--sg-subtle); border-color: var(--sg-border); }
body .ant-pagination-item-active { background: var(--sg-selected); border-color: var(--sg-accent); }
body .ant-pagination-item-active a,
body .ant-tabs-tab-active .ant-tabs-tab-btn { color: var(--sg-accent); }
body .ant-tabs-ink-bar { background: var(--sg-accent); }
body .ant-checkbox-checked:not(.ant-checkbox-disabled) .ant-checkbox-inner { background: var(--sg-accent); border-color: var(--sg-accent); }
body .ant-checkbox-indeterminate:not(.ant-checkbox-disabled) .ant-checkbox-inner::after { background: var(--sg-accent); }
body .ant-radio-checked:not(.ant-radio-disabled) .ant-radio-inner { border-color: var(--sg-accent); background: var(--sg-accent); }
body .ant-select-item-option-selected:not(.ant-select-item-option-disabled) { color: var(--sg-text); background: var(--sg-selected); }
body .ant-select-item-option-selected .ant-select-item-option-state { color: var(--sg-accent); }
body :is(.ant-tag-blue,.ant-tag-geekblue,.ant-tag-purple,.ant-tag-processing) { color: var(--sg-accent); background: var(--sg-selected); border-color: var(--sg-selected); }
body :is(.ant-tag-green,.ant-tag-success) { color: var(--sg-success); background: var(--sg-success-bg); border-color: var(--sg-success-bg); }
body :is(.ant-tag-red,.ant-tag-error) { color: var(--sg-danger); background: var(--sg-danger-bg); border-color: var(--sg-danger-bg); }
body :is(.ant-tag-orange,.ant-tag-warning,.ant-tag-gold) { color: var(--sg-warning); background: var(--sg-warning-bg); border-color: var(--sg-warning-bg); }
body :is(.ant-modal-content,.ant-modal-header,.ant-drawer-content,.ant-drawer-header,.ant-select-dropdown,.ant-dropdown-menu) { background: var(--sg-surface); color: var(--sg-text); }

/* Shared by individual generation requests, proposal jobs and the workbench. */
body :is(.ai-big-overlay, .sg-job-overlay, .ai-task-fish-overlay) {
  --sg-generation-assistant-size: min(248px, 40vw, 45vh);
  position: fixed !important;
  top: max(64px, env(safe-area-inset-top)) !important;
  right: max(22px, env(safe-area-inset-right)) !important;
  bottom: auto !important;
  left: auto !important;
  display: block !important;
  width: var(--sg-generation-assistant-size) !important;
  height: var(--sg-generation-assistant-size) !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  pointer-events: none !important;
}
body .ai-big-overlay { transform: translateY(-10px) !important; }
body .ai-big-overlay.show { transform: translateY(0) !important; }
body .ai-big-overlay .ai-big-fish-frame { display: contents !important; }
body .sg-job-overlay { z-index: 10050 !important; }
body .ai-big-overlay .ai-big-fish,
body .sg-job-overlay__fish,
body .ai-task-fish-overlay img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: contain !important;
  filter: drop-shadow(0 8px 14px rgb(30 75 110 / 16%)) !important;
}
body .ai-big-overlay .ai-big-caption,
body .sg-job-overlay__body { display: none !important; }
body:has(.ai-big-overlay.show) .sg-job-overlay { visibility: hidden; }
@media (max-width: 720px) {
  body :is(.ai-big-overlay, .sg-job-overlay, .ai-task-fish-overlay) {
    --sg-generation-assistant-size: min(176px, 40vw, 45vh);
    top: max(58px, env(safe-area-inset-top)) !important;
    right: max(10px, env(safe-area-inset-right)) !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  body .ai-big-overlay .ai-big-fish,
  body .sg-job-overlay__fish,
  body .ai-task-fish-overlay img {
    opacity: 0 !important;
    animation: none !important;
  }
  body :is(.ai-big-overlay, .sg-job-overlay, .ai-task-fish-overlay)::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("/assets/generation-assistant-still.png") center / contain no-repeat;
  }
  body .ai-big-overlay,
  body .ai-big-overlay.show,
  body .ai-task-fish-overlay {
    transform: none !important;
    transition: none !important;
  }
}

/* Size the project cards to the workspace so wide tables scroll inside them. */
.gov-page-approved-project .approved-page {
  grid-template-columns: minmax(0, 1fr);
}
.approved-task-cell-button {
  display: block;
  width: 100%;
  min-height: 26px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  cursor: text;
}
.approved-task-cell-button:hover:not(:disabled),
.approved-task-cell-button:focus-visible {
  outline: 1px dashed currentColor;
  outline-offset: 2px;
}
.approved-task-cell-editor {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.approved-task-cell-editor [role="alert"] {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #a33428;
  font-size: 12px;
}
.report-citation .policy-article-text.is-collapsed {
  display: none;
}
.report-beginner-guide {
  display: grid;
  gap: 12px;
  line-height: 1.65;
}
.report-beginner-guide p, .report-beginner-guide ol, .report-beginner-guide ul {
  margin: 0;
}
.report-beginner-guide ol, .report-beginner-guide ul {
  padding-left: 1.6em;
}
.report-beginner-guide ol {
  list-style-type: decimal;
}
.report-beginner-guide li + li {
  margin-top: 3px;
}
.report-guide-logic, .report-evidence-details summary {
  font-size: 12px;
  color: var(--sg-muted);
}
.report-evidence-details summary {
  cursor: pointer;
}
.report-fit-brief {
  display: grid;
  gap: 2px;
}
.report-fit-brief small, .report-evidence-details[open] .report-why {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.65;
}
.report-evidence-details[open] .report-why {
  margin-top: 6px;
}
.report-citation .policy-article-text p {
  white-space: pre-line;
}
.report-citation .report-article-index {
  padding-inline-start: 1.4em;
}
@media print {
  .report-citation .policy-article-text.is-collapsed {
    display: block !important;
  }
  .report-cited-clauses,
  .report-cited-clauses > .ant-card-body {
    break-inside: auto !important;
    page-break-inside: auto !important;
  }
}
