/* 智慧监管系统：业务页面共用样式。 */
:root {
    --ui-font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    --ui-ink: #27332e; --ui-muted: #6d7772; --ui-bg: #f5f6f7;
    --ui-line: #dce1df; --ui-soft: #f3f5f4; --ui-brand: #28634e;
    --ui-brand-hover: #20523f; --ui-brand-soft: #edf4f0;
    --green: var(--ui-brand); --primary: var(--ui-brand); --primary-dark: var(--ui-brand-hover);
    --primary-light: var(--ui-brand-soft); --ink: var(--ui-ink); --text: var(--ui-ink);
    --muted: var(--ui-muted); --text-secondary: var(--ui-muted); --text-muted: #88928c;
    --line: var(--ui-line); --border: var(--ui-line); --bg: var(--ui-bg);
    --radius: 4px; --shadow: none; --shadow-lg: 0 10px 28px #00000018;
    --sidebar-bg: #183c30; --sidebar-hover: #254b3d; --sidebar-active: #2d5b48;
    --pri: var(--ui-brand); --pri-h: var(--ui-brand-hover); --pri-soft: var(--ui-brand-soft);
    --bg1: var(--ui-bg); --bg2: var(--ui-bg); --sunken: var(--ui-soft);
    --card: #fff; --solid: #fff; --ink2: var(--ui-muted); --ink3: #7a857f;
    --line2: #edf0ee; --grad: var(--ui-brand); --grn: #28634e; --grn-soft: #edf4f0;
}
body[class*="system-"] { font: 14px/1.6 var(--ui-font); color: var(--ui-ink); background: var(--ui-bg); }
body[class*="system-"] button, body[class*="system-"] input, body[class*="system-"] select,
body[class*="system-"] textarea { font-family: var(--ui-font); font-size: 14px; }
body[class*="system-"] h1, body[class*="system-"] .page-title { font-size: 22px; font-weight: 600; letter-spacing: 0; }
body[class*="system-"] h2 { font-size: 16px; font-weight: 600; }
body[class*="system-"] h3 { font-size: 15px; font-weight: 600; }
body[class*="system-"] .card, body[class*="system-"] .stat-card, body[class*="system-"] .metric {
    background: #fff; border: 1px solid var(--ui-line); border-radius: 4px; box-shadow: none;
}
body[class*="system-"] .btn, body[class*="system-"] .report-link, body[class*="system-"] .outline {
    min-height: 34px; border-radius: 4px; box-shadow: none; font-weight: 500;
}
body[class*="system-"] input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]),
body[class*="system-"] select, body[class*="system-"] textarea {
    border: 1px solid #c9d1cc; border-radius: 4px; background: #fff; color: var(--ui-ink); box-shadow: none;
}
body[class*="system-"] input:focus, body[class*="system-"] select:focus, body[class*="system-"] textarea:focus {
    outline: 2px solid #28634e30; outline-offset: 1px; border-color: var(--ui-brand); box-shadow: none;
}
body[class*="system-"] a { color: var(--ui-brand); }
body[class*="system-"] [hidden] { display: none !important; }
body.system-agent a.report-link { display: inline-block; color: #fff; }
body[class*="system-"] table { font-size: 13px; }
body[class*="system-"] th { color: #56645b; background: #f5f7f6; font-weight: 500; }
body[class*="system-"] td, body[class*="system-"] th { border-color: var(--ui-line); }
body[class*="system-"] .badge, body[class*="system-"] .tag, body[class*="system-"] .chip, body[class*="system-"] .pill {
    border-radius: 3px; font-size: 12px; font-weight: 400;
}
body[class*="system-"] .modal, body[class*="system-"] .modal-content { border-radius: 5px; }

/* Main system navigation. */
.system-portal .app { grid-template-columns: 236px minmax(0,1fr); }
.system-portal .side { background: #183c30; padding: 24px 12px 16px; }
.system-portal .brand { font-size: 20px; padding: 0 12px 23px; }
.system-portal .brand small { font-size: 11px; }
.system-portal .nav { padding: 11px 12px; margin: 3px 0; border-radius: 4px; }
.system-portal .nav b { font-size: 14px; font-weight: 500; }
.system-portal .nav span { display: none; }
.system-portal .nav:hover { background: #254b3d; }
.system-portal .nav.on { background: #2d5b48; }
.system-portal .dot { width: 5px; height: 5px; margin-right: 9px; }
.system-portal .top { min-height: 58px; padding: 10px 24px; }
.system-portal .top>b { font-weight: 500; }
.system-portal .frame { height: calc(100vh - 58px); background: var(--ui-bg); }
.system-portal .welcome { padding: 24px; }
.system-portal .welcome h1 { margin-bottom: 8px; }
.system-portal .welcome>p { color: var(--ui-muted); font-size: 13px; margin-bottom: 20px; }
.system-portal .card { padding: 20px; }
.system-portal .section { margin-top: 24px; }
.system-portal .section h2 { margin: 0 0 12px; }
.system-portal .table th, .system-portal .table td { padding: 11px 12px; }
.system-portal .project-row.selected { background: var(--ui-brand-soft); }
.system-portal .btn, .system-portal .card button { border-radius: 4px; background: var(--ui-brand); font-weight: 500; }
.system-portal .project-select { max-width: 460px; font-size: 13px; min-width: 260px; }

/* File and scoring services. */
.system-agent header { padding: 22px 24px 16px; background: var(--ui-bg); color: var(--ui-ink); }
.system-agent header p { color: var(--ui-muted); font-size: 13px; }
.system-agent main { max-width: none; margin: 0; padding: 0 24px 28px; gap: 16px; }
.system-agent .card { padding: 20px; }
.system-agent button { border-radius: 4px; font-weight: 500; }
.system-agent .history button { border: 1px solid var(--ui-line); background: #fff; }
.system-agent #history { flex-wrap: nowrap; overflow: auto; }
.system-agent #history .history-record { flex: 0 0 340px; max-width: 100%; text-align: left; padding: 7px 12px; }
.system-agent .history-title, .system-agent .history-meta { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.system-agent .history-title { font-weight: 500; }
.system-agent .history-meta { font-size: 12px; color: var(--ui-muted); margin-top: 2px; }
.system-agent #history .history-record[aria-pressed="true"] { background: var(--ui-brand-soft); border-color: var(--ui-brand); }
.system-agent .finding { border-radius: 3px; background: #fafbfa; border-left-width: 3px; }
.system-agent .data td, .system-agent .data th { padding: 8px 10px; }

/* Keep long review evidence inside its panel instead of growing both columns. */
.system-agent:has(#result) main { grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; }
.system-agent.embedded:has(#result)>header { display: none; }
.system-agent:has(#result) main>.card { min-width: 0; }
.system-agent #result {
    min-height: 0; max-height: 65vh; max-height: 65dvh; overflow: auto;
    overscroll-behavior: contain; scrollbar-gutter: stable; overflow-wrap: anywhere;
}
.system-agent #result:focus-visible { outline: 2px solid var(--ui-brand); outline-offset: 2px; }
@media screen and (min-width:851px) and (min-height:600px) {
    body.system-agent:has(#result) {
        height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden;
    }
    .system-agent:has(#result) header { flex: 0 0 auto; }
    .system-agent:has(#result) main {
        flex: 1 1 0; min-height: 0; grid-template-rows: minmax(0,1fr) auto; align-items: stretch;
    }
    .system-agent:has(#result) main>.card:not(.wide) { min-height: 0; overflow: auto; }
    .system-agent:has(#result) main>.card:has(#result) { display: flex; flex-direction: column; overflow: hidden; }
    .system-agent:has(#result) main>.card:has(#result)>:not(#result) { flex: 0 0 auto; }
    .system-agent #result { flex: 1 1 0; max-height: none; }
    .system-agent:has(#result) main>.wide { padding: 12px 20px; }
    .system-agent:has(#result) #history { max-height: 76px; overflow: auto; overscroll-behavior: contain; }
}
@media screen and (max-width:850px) {
    .system-agent:has(#result) main { grid-template-columns: minmax(0,1fr); }
    .system-agent:has(#result) .form-grid { grid-template-columns: minmax(0,1fr); }
}
@media print {
    .system-agent #result { max-height: none; overflow: visible; }
}

/* Enterprise query forms. */
.system-enterprise .shell { max-width: none; padding: 22px 24px 28px; }
.system-enterprise .top { margin-bottom: 18px; }
.system-enterprise .eyebrow, .system-enterprise .hero-kicker, .system-enterprise .spark,
.system-enterprise .empty .icon { display: none; }
.system-enterprise h1 { margin: 0 0 5px; }
.system-enterprise .hero { background: #fff; color: var(--ui-ink); border: 1px solid var(--ui-line); border-radius: 4px; padding: 20px; box-shadow: none; }
.system-enterprise .hero h2 { font-size: 16px; margin: 0 0 7px; }
.system-enterprise .hero p, .system-enterprise .small-note { color: var(--ui-muted); }
.system-enterprise .query { max-width: none; }
.system-enterprise .query input, .system-enterprise .query textarea { padding: 10px 12px; border-radius: 4px; }
.system-enterprise .query button { background: var(--ui-brand); color: #fff; border-radius: 4px; font-weight: 500; }
.system-enterprise .query button:hover { background: var(--ui-brand-hover); }
.system-enterprise .status { color: var(--ui-brand); }
.system-enterprise .mode { border-radius: 3px; background: #fff; border-color: var(--ui-line); font-weight: 400; }
.system-enterprise .content { gap: 16px; margin-top: 16px; }
.system-enterprise .metric { padding: 16px 20px; }
.system-enterprise .metric strong { font-size: 25px; font-weight: 600; }
.system-enterprise .card { padding: 20px; }
.system-enterprise .insight { display: block; background: #f6f8f7; border: 1px solid var(--ui-line); border-radius: 4px; padding: 16px; }
.system-enterprise .pair, .system-enterprise .risk, .system-enterprise .group, .system-enterprise .graph-panel,
.system-enterprise .coverage, .system-enterprise .comparison, .system-enterprise .profile div,
.system-enterprise .signal, .system-enterprise .connector, .system-enterprise .history button { border-radius: 4px; box-shadow: none; }
.system-enterprise .history { grid-template-columns: repeat(auto-fill,minmax(260px,1fr)); }

/* Evaluation module. */
.system-collusion .page-shell { background: var(--ui-bg); }
.system-collusion.embedded .page-shell>header { display: none; }
.system-collusion .page-container { min-width: 0; max-width: none; padding: 22px 24px 28px; }
.system-collusion .collusion-demo-note { font-size: 12px; color: var(--ui-muted); margin-bottom: 18px; padding: 9px 12px; border: 1px solid var(--ui-line); background: #f7f8f7; border-radius: 4px; }
.system-collusion .page-header h1 { color: var(--ui-ink); font-size: 22px; font-weight: 600; }
.system-collusion .page-header p { font-size: 13px; color: var(--ui-muted); }
.system-collusion .panel, .system-collusion .surface, .system-collusion .workflow-steps,
.system-collusion .rule-card, .system-collusion .report-cover, .system-collusion .risk-item,
.system-collusion .category-summary-grid, .system-collusion .current-project-card,
.system-collusion .config-toolbar, .system-collusion .pick-summary { border-radius: 4px; border-color: var(--ui-line); box-shadow: none; }
.system-collusion .stat-icon, .system-collusion .heading-icon, .system-collusion .title-icon { display: none; }
.system-collusion .stats-grid { gap: 0; background: #fff; border: 1px solid var(--ui-line); border-radius: 4px; }
.system-collusion .stats-grid .stat-card { border: 0; border-right: 1px solid var(--ui-line); border-radius: 0; padding: 18px 20px; box-shadow: none; }
.system-collusion .stats-grid .stat-card:last-child { border-right: 0; }
.system-collusion .stat-value { color: var(--ui-ink); font-weight: 600; font-size: 26px; }
.system-collusion .sticky-action-bar { min-width: 0; padding: 12px 20px; margin: 0 -24px -28px; box-shadow: none; }
.system-collusion .pstatus, .system-collusion .risk-level { border-radius: 3px; font-weight: 400; }
.system-collusion .ant-table-wrapper { overflow-x: auto; }
.system-collusion .ant-table-thead>tr>th, .system-collusion .ant-table-tbody>tr>td { padding: 11px 12px; font-size: 13px; }
.system-collusion .project-task-name, .system-collusion .project-link { font-weight: 500; }
.system-collusion .ant-btn { box-shadow: none; }
.system-tender {
    --brand: var(--ui-brand); --brand-hover: var(--ui-brand-hover); --brand-soft: var(--ui-brand-soft);
    --blue: var(--ui-brand); --blue2: var(--ui-brand-hover); --panel: #fff; --soft: #f3f5f4;
}
.system-tender.embedded .sidebar, .system-tender.embedded .topbar { display: none; }
.system-tender.embedded .shell { margin-left: 0; }
.system-tender .main { padding: 0 24px 28px; }
.system-tender .sectionnav { border-bottom: 1px solid var(--ui-line); border-radius: 0; box-shadow: none; background: #fff; }
.system-tender .sectionnav button { font-size: 13px; border-radius: 0; font-weight: 400; }
.system-tender .module-context { padding: 10px 0; font-size: 12px; color: var(--ui-muted); }
.system-tender .eyebrow, .system-tender .pageheading svg, .system-tender .dropzone>svg { display: none; }
.system-tender .pageheading { margin: 16px 0 20px; }
.system-tender .card, .system-tender .steps, .system-tender .scope, .system-tender .projectbanner,
.system-tender .checkrow, .system-tender .dropzone, .system-tender .selectioninfo,
.system-tender .parse-note, .system-tender .localdetect-note { border-radius: 4px; box-shadow: none; }
.system-tender .projectbanner, .system-tender .dropzone { background: #f8faf9; }
.system-tender .dropzone { border-color: var(--ui-line); padding: 24px; }
.system-tender .step .number { box-shadow: none; }
.system-tender .stat strong { font-size: 25px; font-weight: 600; }
.system-tender .panelhead, .system-tender .panelbody { padding: 18px 20px; }
.system-tender .btn.primary { background: var(--ui-brand); border-color: var(--ui-brand); box-shadow: none; }
.system-tender .chip, .system-tender .resultitem, .system-tender .real-rule { border-radius: 4px; }
.system-agent .builtin-file { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; padding: 12px; background: #f4f7f5; border: 1px solid var(--ui-line); border-radius: 4px; }
.system-agent .builtin-file span { font-size: 12px; color: var(--ui-muted); flex: 1; }
.system-evaluation { background: var(--ui-bg); }
.system-evaluation .top { backdrop-filter: none; background: #fff; }
.system-evaluation .top-in { padding: 14px 24px; }
.system-evaluation .logo, .system-evaluation .brand small { display: none; }
.system-evaluation .brand b { font-size: 16px; font-weight: 500; }
.system-evaluation .demo-note { background: #f7f8f7; border-radius: 4px; margin-top: 14px; padding: 9px 12px; }
.system-evaluation .wrap { padding: 20px 24px 28px; gap: 16px; }
.system-evaluation .btn { height: 34px; min-height: 34px; padding: 0 13px; }
.system-evaluation .steps li, .system-evaluation .seg, .system-evaluation .seg button,
.system-evaluation .witem, .system-evaluation .quote, .system-evaluation .basis, .system-evaluation .concl,
.system-evaluation .ev, .system-evaluation .sc, .system-evaluation .cell, .system-evaluation .banner { border-radius: 4px; }
.system-evaluation .steps li.now, .system-evaluation .btn.pri { background: var(--ui-brand); }
.system-evaluation .seg button[aria-pressed=true] { box-shadow: none; }
.system-evaluation .ptab { padding: 10px 15px; }

/* Single-project collusion and assisted review use the main portal palette. */
.system-collusion-single, .system-assist-review {
    --brand: var(--ui-brand); --brand-soft: var(--ui-brand-soft);
    --pri-bg: var(--ui-brand-soft); --blue: var(--ui-brand); --blue-bg: var(--ui-brand-soft);
    --sub: var(--ui-muted); --soft: #edf0ee; --head-bg: #f5f7f6;
    min-width: 0;
}
.system-collusion-single #app, .system-assist-review .app { padding: 20px 24px 28px; max-width: none; }
.system-assist-review .page { max-width: none; }
.system-collusion-single .module-context { margin: 20px 24px 0; }
.system-collusion-single .module-context, .system-assist-review .module-context { padding: 10px 14px; margin-bottom: 16px; background: #fff;
    border: 1px solid var(--ui-line); border-left: 3px solid var(--ui-brand); border-radius: 4px;
    color: var(--ui-muted); font-size: 12px; }
.system-collusion-single .module-context>span, .system-assist-review .module-context>span { color: var(--ui-brand); font-weight: 600; }
.system-collusion-single .module-context p, .system-assist-review .module-context p { margin: 3px 0 0; }
.system-collusion-single .module-context details { margin-top: 6px; }
.system-collusion-single .module-context summary { cursor: pointer; color: var(--ui-brand); }
.system-collusion-single .example-files { display: grid; gap: 4px; margin-top: 8px; }
.system-collusion-single .brand .logo, .system-collusion-single .stat-card>.ic { display: none; }
.system-collusion-single .page-head, .system-assist-review .header { gap: 16px; }
.system-collusion-single .stat-row { gap: 0; border: 1px solid var(--ui-line); border-radius: 4px; background: #fff; }
.system-collusion-single .stat-row .stat-card { border: 0; border-right: 1px solid var(--ui-line); border-radius: 0; }
.system-collusion-single .stat-row .stat-card:last-child { border-right: 0; }
.system-collusion-single .filter-bar { flex-wrap: wrap; gap: 12px; }
.system-collusion-single .table-wrap { overflow-x: auto; }
.system-collusion-single .table-card { overflow-x: auto; }
.system-collusion-single .seg button.on { color: var(--ui-brand); background: var(--ui-brand-soft); }
.system-collusion-single .steps, .system-collusion-single .risk-card,
.system-collusion-single .rule-modal, .system-assist-review .surface,
.system-assist-review .summary-item, .system-assist-review .supplier,
.system-assist-review .cat-card, .system-assist-review .wizard-card,
.system-assist-review .steps { border-radius: 4px; box-shadow: none; border-color: var(--ui-line); }
.system-assist-review .header { padding: 16px 20px; }
.system-assist-review .stat .value { font-size: 26px; }
.system-assist-review .detail-grid { grid-template-columns: minmax(0,1fr); }
.system-assist-review .detail-grid>div:last-child { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.system-assist-review .detail-grid>div:last-child .side-card { margin-top: 0 !important; }
.system-assist-review .supplier { grid-template-columns: 1.5fr .85fr .8fr .65fr .65fr .65fr .8fr 1fr; }
.system-assist-review .log { background: var(--ui-soft); color: var(--ui-muted); border: 1px solid var(--ui-line); }
.system-assist-review .log .ok { color: var(--ui-brand); }
.system-assist-review .log .warn { color: #996317; }
.system-assist-review .tab.active { color: var(--ui-brand); border-bottom-color: var(--ui-brand); }
.system-assist-review .btn.primary, .system-collusion-single .btn.primary { color: #fff; background: var(--ui-brand); border-color: var(--ui-brand); }
@media(max-width:1050px) {
    .system-assist-review .detail-grid>div:last-child { grid-template-columns: minmax(0,1fr); }
    .system-collusion-single .stat-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .system-collusion-single .page-head { flex-wrap: wrap; }
    .system-collusion-single #app, .system-assist-review .app { padding: 16px; }
    .system-collusion-single .module-context { margin: 16px 16px 0; }
}

/* Analytics shell and all its business pages. */
.system-analytics-shell .sidebar-logo, .system-analytics-shell .icon,
.system-analytics-shell .topbar-breadcrumb, .system-analytics-shell .topbar-actions { display: none; }
.system-analytics-shell .sidebar { width: 220px; min-width: 220px; }
.system-analytics-shell .sidebar-header { min-height: 72px; }
.system-analytics-shell .sidebar-title { font-size: 17px; }
.system-analytics-shell .nav-item { padding: 10px 18px; font-size: 13px; }
.system-analytics-shell .nav-item.active { background: #2d5b48; border-left-color: #92b6a2; }
.system-analytics-shell .topbar { min-height: 48px; height: auto; padding: 8px 24px; }
.system-analytics-shell .topbar-search { margin-left: auto; }
.system-analytics-shell .topbar-search input { width: 280px; padding: 7px 10px; font-size: 13px; }
.module-tabs { display: none; }
.system-analytics-shell.embedded .sidebar, .system-analytics-shell.embedded .topbar { display: none; }
.system-analytics-shell.embedded .module-tabs {
    display: flex; align-items: center; flex-wrap: nowrap; padding: 0 24px; gap: 0 24px; flex-shrink: 0;
    background: #fff; border-bottom: 1px solid var(--ui-line);
}
.module-tabs select { margin-left: auto; min-width: 150px; height: 32px; padding: 4px 10px; font-size: 13px !important; }
.module-tabs a { display: block; padding: 12px 0 10px; color: #5c6861; font-size: 13px;
    text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; }
.module-tabs a.active { color: var(--ui-brand); border-bottom-color: var(--ui-brand); font-weight: 500; }
.system-analytics-shell .content-area { min-height: 0; }
.system-analytics { background: var(--ui-bg) !important; padding: 22px 24px 28px !important; }
.system-analytics .page-header { margin-bottom: 20px; }
.system-analytics .page-desc { color: var(--ui-muted); font-size: 13px; margin-top: 6px; }
.system-analytics .stats-row { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 0; background: #fff;
    border: 1px solid var(--ui-line); border-radius: 4px; margin-bottom: 20px; }
.system-analytics .stats-row .stat-card { display: block; border: 0; border-right: 1px solid var(--ui-line); border-radius: 0; padding: 18px 20px; }
.system-analytics .stats-row .stat-card:last-child { border-right: 0; }
.system-analytics .stat-icon { display: none; }
.system-analytics .stat-label { font-size: 13px; color: var(--ui-muted); }
.system-analytics .stat-value { font-size: 26px; line-height: 1.35; margin: 6px 0; font-weight: 600; }
.system-analytics .stat-change { font-size: 12px; color: var(--ui-muted); }
.system-analytics .card-header { padding: 14px 18px; }
.system-analytics .card-body { padding: 18px; }
.system-analytics .card-title { font-size: 15px; font-weight: 500; }
.system-analytics .btn-outline { color: var(--ui-ink); border-color: #c9d1cc; }
.system-analytics .btn-primary { background: var(--ui-brand); border-color: var(--ui-brand); }
.system-analytics .alert-info, .system-analytics .tobacco-note { background: #f4f7f5; border-color: var(--ui-line); color: #52685c; }
.system-analytics .tobacco-link, .system-analytics .report-list a { color: var(--ui-brand); }
.system-analytics .quick-links button { background: #fff; border: 1px solid var(--ui-line); color: var(--ui-ink); border-radius: 4px; padding: 14px; }
.system-analytics .quick-links button:hover { background: var(--ui-brand-soft); border-color: #a3bcae; }
.system-analytics .external-metric, .system-analytics .requirement-card, .system-analytics .source-facts div { background: #f8faf9; border-color: var(--ui-line); border-radius: 4px; }
.system-analytics .external-metric b, .system-analytics .source-facts b, .system-analytics .requirement-card h3 { color: var(--ui-ink); }
.system-analytics .source-facts div { border-left-color: #a1b9ac; }
.system-analytics .drill-path button { background: #f0f4f1; color: var(--ui-brand); border-radius: 3px; }
.system-analytics .drill-path button.active { background: var(--ui-brand); color: #fff; }
.system-analytics .badge-info { background: #edf4f0; color: #28634e; }
.system-analytics .data-table th { background: #f5f7f6; }
.system-analytics .data-table tr:hover td { background: #f8faf9; }
@media(max-width:1100px) {
    .system-analytics .stats-row .stat-card { padding: 16px; }
    .system-analytics .stat-value { font-size: 22px; }
}
@media(max-width:800px) {
    .system-portal .app { grid-template-columns: 190px minmax(0,1fr); }
    .system-portal .project-select { min-width: 0; max-width: 300px; }
    .system-analytics .stats-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .system-analytics .stats-row .stat-card { border-bottom: 1px solid var(--ui-line); }
    .system-analytics .stats-row .stat-card:nth-child(2n) { border-right: 0; }
    .system-analytics-shell.embedded .module-tabs { gap: 0 15px; padding: 0 16px; overflow-x: auto; }
    .module-tabs select { min-width: 125px; }
    .system-agent main { grid-template-columns: 1fr; padding: 0 16px 20px; }
    .system-agent header, .system-enterprise .shell, .system-evaluation .wrap { padding: 20px 16px; }
}
@media(max-width:600px) {
    .system-portal .app { display: flex; height: auto; min-height: 100%; flex-direction: column; }
    .system-portal .side { padding: 12px; }
    .system-portal .brand { padding: 0 8px 10px; }
    .system-portal .side #nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
    .system-portal .nav span, .system-portal .brand small { display: none; }
    .system-portal .top { padding: 10px 16px; }
    .system-portal .welcome { padding: 16px; }
    .system-portal .row, .system-portal .grid { grid-template-columns: 1fr; }
    .system-portal .frame { height: 80vh; }
    .system-analytics { padding: 18px 16px !important; }
    .system-analytics .grid-2, .system-analytics .grid-3 { grid-template-columns: 1fr; }
}

@media print {
    .system-assist-review .header, .system-assist-review .module-context,
    .system-assist-review .back, .system-assist-review .detail-actions,
    .system-assist-review .modal, .system-assist-review #toast { display: none !important; }
    .system-assist-review .app { padding: 0; }
    .system-assist-review .surface { break-inside: avoid; }
}
