:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --ink: #17212b;
  --muted: #6e7b87;
  --line: #dfe5e9;
  --navy: #17324d;
  --blue: #2c6bed;
  --green: #16845b;
  --amber: #b47711;
  --red: #bd3e3e;
  --shadow: 0 12px 28px rgba(24, 43, 61, 0.06);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { min-width: 1180px; margin: 0; background: var(--bg); color: var(--ink); font-size: 14px; }
body.admin-page { min-width: 0; }
.admin-page #admin-view { min-width: 1180px; }
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 238px; background: var(--navy); color: #dce8f1; padding: 25px 15px 18px; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 12px 34px; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; background: #fff; color: var(--navy); font-weight: 800; border-radius: 7px; font-size: 17px; }
.brand strong { display: block; font-size: 16px; }
.brand small { display: block; color: #91a7ba; font-size: 10px; margin-top: 3px; }
.side-label, .section-kicker, .eyebrow { font-size: 10px; letter-spacing: .12em; font-weight: 700; color: #91a7ba; }
.side-label { padding: 0 12px 10px; }
.app-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 0 8px 25px; }
.app-nav a { color: #b8c9d6; text-decoration: none; text-align: center; padding: 9px 8px; border: 1px solid #31516b; border-radius: 5px; font-size: 12px; font-weight: 650; }
.app-nav a:hover, .app-nav a.active { color: #fff; background: #2b5272; border-color: #4b708d; }
.group-nav { display: grid; gap: 4px; }
.group-nav button { border: 0; background: transparent; color: #b8c9d6; text-align: left; padding: 12px; border-radius: 6px; cursor: pointer; font: inherit; }
.group-nav button:hover, .group-nav button.active { background: #2b5272; color: #fff; }
.group-nav button.active { font-weight: 700; }
.group-nav small { display: block; color: #88a0b2; font-size: 11px; margin-top: 4px; }
.sidebar-foot { margin-top: auto; border-top: 1px solid #2b4b66; padding: 16px 12px 0; color: #8ea5b8; font-size: 11px; display: flex; align-items: center; gap: 8px; }
.live-dot { width: 7px; height: 7px; background: #36c487; border-radius: 50%; box-shadow: 0 0 0 4px rgba(54, 196, 135, .12); }
.live-dot.error { background: #e16767; box-shadow: 0 0 0 4px rgba(225, 103, 103, .12); }
.main { min-width: 0; flex: 1; padding: 30px 34px; }
.topbar { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 25px; }
.eyebrow { color: #83909a; }
.topbar h1 { margin: 7px 0 0; font-size: 26px; letter-spacing: 0; }
.top-actions { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 12px; }
.button { border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 650; padding: 9px 13px; border-radius: 5px; cursor: pointer; white-space: nowrap; }
.button:hover { border-color: #9eb1c1; background: #f9fbfc; }
.button.primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.button.primary:hover { background: #205bd0; }
.button.ghost { background: transparent; }
.button:disabled { cursor: not-allowed; opacity: .5; }
.status-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(124px, 1fr)); gap: 12px; margin-bottom: 24px; }
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: 7px; padding: 17px 18px; box-shadow: var(--shadow); }
.metric-label { color: var(--muted); font-size: 11px; font-weight: 650; }
.metric-value { font-size: 27px; font-weight: 750; margin-top: 7px; }
.metric-value.clean { color: var(--green); }
.metric-value.warn { color: var(--amber); }
.metric-value.danger { color: var(--red); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); padding: 0 0 15px; margin-bottom: 17px; }
.toolbar-title { display: flex; align-items: center; gap: 12px; }
.toolbar-title strong { font-size: 13px; color: var(--muted); font-weight: 600; }
.toolbar-actions { display: flex; gap: 8px; }
.release-panel { margin-bottom: 18px; }
.agent-panel { margin-bottom: 18px; }
.agent-summary { display: flex; align-items: baseline; gap: 10px; padding: 13px 20px; border-top: 1px solid #edf0f2; color: var(--muted); font-size: 11px; }
.agent-summary strong { color: var(--ink); font-size: 13px; }
.agent-table { min-width: 980px; }
.agent-detail { max-width: 360px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.release-gate { padding: 10px 20px; border-top: 1px solid #edf0f2; font-size: 11px; }
.gate-warning { color: var(--amber); }
.gate-ready { color: var(--green); }
.release-plan { border-top: 1px solid #edf0f2; }
.release-empty { padding: 18px 20px; }
.plan-bar { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(280px, 1.4fr) auto; align-items: end; gap: 16px; padding: 16px 20px; }
.plan-bar label { color: var(--muted); display: grid; gap: 6px; font-size: 10px; font-weight: 700; }
.plan-bar select, .dialog-form select { width: 100%; border: 1px solid var(--line); border-radius: 5px; padding: 9px 10px; color: var(--ink); background: #fff; font: inherit; }
.plan-meta { min-width: 0; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; }
.plan-meta code { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #425466; }
.plan-actions { display: flex; gap: 7px; justify-content: flex-end; }
.plan-table { min-width: 900px; }
.plan-error { color: var(--red); max-width: 260px; overflow-wrap: anywhere; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; }
.inventory-grid { align-items: start; margin-bottom: 18px; }
.selection-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; border-top: 1px solid #edf0f2; background: #f9fbfc; }
.selection-status { display: flex; align-items: baseline; gap: 9px; min-width: 190px; }
.selection-status strong { font-size: 13px; }
.selection-status span { color: var(--muted); font-size: 11px; }
.selection-actions { display: flex; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.devices-panel .table-wrap { max-height: 520px; }
.device-table { min-width: 1380px; }
.devices-panel th { position: sticky; top: 0; z-index: 1; background: var(--surface); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 7px; box-shadow: var(--shadow); }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 20px 20px 14px; }
.panel-head-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.button.compact { padding: 6px 9px; font-size: 11px; }
.panel h2 { font-size: 17px; margin: 6px 0 0; }
.panel-note { font-size: 11px; color: var(--muted); }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { text-align: left; border-top: 1px solid #edf0f2; padding: 13px 20px; vertical-align: middle; }
th { font-size: 10px; letter-spacing: .08em; color: var(--muted); font-weight: 700; text-transform: uppercase; white-space: nowrap; }
td { font-size: 12px; }
td:nth-child(4) { white-space: nowrap; }
.row-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.device-name { font-weight: 700; white-space: nowrap; }
.device-host { color: var(--muted); font-size: 11px; margin-top: 4px; }
.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 8px; font-size: 10px; font-weight: 750; letter-spacing: .03em; }
.pill.CLEAN, .pill.SUCCESS { background: #e4f5ed; color: var(--green); }
.pill.RUNNING, .pill.QUEUED, .pill.PENDING { background: #eaf0ff; color: var(--blue); }
.pill.ROLLING_BACK { background: #fff3d8; color: var(--amber); }
.pill.ROLLED_BACK { background: #edf0f2; color: #51616e; }
.pill.ROLLBACK_FAILED { background: #fde7e7; color: var(--red); }
.pill.READY, .pill.NO_CHANGE { background: #e4f5ed; color: var(--green); }
.pill.MISSING, .pill.BROKEN, .pill.NOT_CONFIGURED { background: #fde7e7; color: var(--red); }
.pill.BOOTSTRAPPING { background: #eaf0ff; color: var(--blue); }
.pill.NOT_APPLICABLE { background: #edf0f2; color: #687681; }
.pill.LATEST { background: #e4f5ed; color: var(--green); }
.pill.UPDATE_AVAILABLE, .pill.LATEST_UNKNOWN { background: #fff3d8; color: var(--amber); }
.pill.ONLINE { background: #e4f5ed; color: var(--green); }
.pill.DISABLED { background: #edf0f2; color: #687681; }
.pill.DRIFTED { background: #fff3d8; color: var(--amber); }
.pill.OFFLINE, .pill.FAILED, .pill.ERROR, .pill.BLOCKED, .pill.SKIPPED { background: #fde7e7; color: var(--red); }
.pill.RECORDING, .pill.IDLE { background: #e4f5ed; color: var(--green); }
.pill.FINALIZING, .pill.STALE { background: #fff3d8; color: var(--amber); }
.pill.STOPPED { background: #edf0f2; color: #687681; }
.pill.HOST_KEY_REQUIRED, .pill.HOST_KEY_MISMATCH, .pill.AUTH_FAILED, .pill.DNS_FAILED, .pill.SSH_ERROR, .pill.DEPENDENCY_MISSING { background: #fff3d8; color: var(--amber); }
.pill.UNMANAGED, .pill.UNKNOWN, .pill.EXCLUDED { background: #edf0f2; color: #687681; }
.ssh-detail { color: var(--amber); font-size: 10px; line-height: 1.35; margin-top: 4px; max-width: 210px; overflow-wrap: anywhere; }
.role { color: var(--muted); font-size: 11px; }
.artifact, .artifact-cell { font-family: ui-monospace, monospace; font-size: 10px; color: #51616e; }
.artifact { max-width: 135px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.artifact-cell { display: grid; gap: 3px; min-width: 106px; }
.artifact-cell code { color: #354958; font-size: 10px; font-weight: 700; white-space: nowrap; }
.artifact-cell small { color: var(--muted); font-size: 9px; white-space: nowrap; }
.jobs-panel { min-height: 400px; max-height: 680px; display: flex; flex-direction: column; overflow: hidden; }
.jobs { min-height: 0; padding: 0 20px 20px; display: grid; gap: 10px; overflow: auto; }
.job { border-top: 1px solid #edf0f2; padding-top: 12px; }
.job:first-child { border-top: 0; }
.job-head { display: flex; justify-content: space-between; gap: 10px; }
.job-action { font-weight: 700; font-size: 12px; }
.job-time { font-size: 10px; color: var(--muted); }
.job-progress { margin-top: 9px; }
.job-progress-meta { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.job-progress-meta span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-progress-meta strong { color: var(--blue); font-size: 10px; }
.progress-track { height: 6px; margin-top: 5px; overflow: hidden; background: #e8edf1; border-radius: 999px; }
.progress-track span { display: block; height: 100%; min-width: 0; background: var(--blue); border-radius: inherit; transition: width .25s ease; }
.job-detail { font-size: 11px; color: var(--muted); margin-top: 6px; line-height: 1.5; word-break: break-word; }
.empty { color: var(--muted); font-size: 12px; padding: 15px 0; }
.storage-panel { margin-bottom: 18px; }
.storage-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid #edf0f2; }
.storage-metric { display: grid; gap: 5px; padding: 16px 20px; border-right: 1px solid #edf0f2; border-bottom: 1px solid #edf0f2; }
.storage-metric:nth-child(3n) { border-right: 0; }
.storage-metric span { color: var(--muted); font-size: 10px; font-weight: 700; }
.storage-metric strong { font-size: 21px; }
.storage-metric small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.storage-recovery { padding: 4px 20px 14px; }
.recovery-head, .recovery-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid #edf0f2; }
.recovery-head { color: var(--muted); font-size: 10px; }
.recovery-row:last-child { border-bottom: 0; }
.recovery-row > div { min-width: 0; display: grid; gap: 4px; }
.recovery-row code { overflow: hidden; text-overflow: ellipsis; color: #425466; }
.recovery-row small { color: var(--muted); font-size: 10px; }
.cleanup-dialog { width: min(680px, calc(100vw - 32px)); }
.cleanup-dialog-summary { display: flex; align-items: baseline; gap: 9px; color: var(--muted); font-size: 11px; }
.cleanup-dialog-summary strong { color: var(--ink); font-size: 16px; }
.cleanup-items { max-height: 420px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; }
.cleanup-items > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 5px 10px; padding: 10px 12px; border-bottom: 1px solid #edf0f2; }
.cleanup-items > div:last-child { border-bottom: 0; }
.cleanup-items code { overflow-wrap: anywhere; font-size: 11px; }
.cleanup-items small { grid-column: 2; color: var(--muted); font-size: 10px; }
.cleanup-category { color: var(--muted); font-size: 10px; font-weight: 700; }
.deployment-progress-dialog { width: min(1040px, calc(100vw - 48px)); max-width: none; max-height: calc(100vh - 32px); overflow: hidden; }
.deployment-progress-shell { max-height: calc(100vh - 32px); box-sizing: border-box; padding: 22px; display: grid; gap: 16px; overflow: auto; }
.deployment-progress-meta { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(220px, 1.4fr) 120px auto; align-items: center; gap: 16px; padding: 12px 14px; background: #f7f9fb; border: 1px solid var(--line); border-radius: 6px; }
.deployment-progress-meta > div { min-width: 0; display: grid; gap: 4px; }
.deployment-progress-meta span:not(.pill) { color: var(--muted); font-size: 10px; font-weight: 700; }
.deployment-progress-meta code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #425466; }
.deployment-progress-meta strong { font-size: 12px; font-variant-numeric: tabular-nums; }
.deployment-overall { padding: 2px 0; }
.deployment-overall-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.deployment-overall-head > div { min-width: 0; display: grid; gap: 4px; }
.deployment-overall-head strong { font-size: 15px; }
.deployment-overall-head span { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.deployment-overall-head b { color: var(--blue); font-size: 17px; white-space: nowrap; }
.deployment-overall-track { height: 9px; margin-top: 10px; }
.deployment-overall small { display: block; color: var(--muted); font-size: 10px; margin-top: 6px; }
.progress-track.indeterminate span { width: 35% !important; animation: deployment-indeterminate 1.25s ease-in-out infinite; }
@keyframes deployment-indeterminate { from { transform: translateX(-110%); } to { transform: translateX(300%); } }
.deployment-section { border-top: 1px solid var(--line); padding-top: 14px; min-width: 0; }
.deployment-section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 9px; }
.deployment-section-head strong { font-size: 12px; }
.deployment-section-head span { color: var(--muted); font-size: 10px; }
.deployment-targets-wrap { max-height: 300px; border: 1px solid var(--line); border-radius: 6px; }
.deployment-targets { min-width: 850px; }
.deployment-targets th, .deployment-targets td { padding: 10px 12px; }
.deployment-targets td:nth-child(4) { min-width: 240px; white-space: normal; }
.deployment-targets td:nth-child(4) strong, .deployment-targets td:nth-child(4) small { display: block; }
.deployment-targets td:nth-child(4) small { color: var(--muted); margin-top: 4px; line-height: 1.35; }
.deployment-targets .target-error { color: var(--red); overflow-wrap: anywhere; }
.rollback-note { display: block; color: var(--muted); font-size: 9px; margin-top: 4px; }
.target-progress { width: 130px; }
.target-progress-value { color: var(--muted); font-size: 10px; text-align: right; }
.deployment-events-section { min-height: 0; }
.deployment-events { height: 190px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; background: #f9fbfc; }
.deployment-event { display: grid; grid-template-columns: 72px 110px 130px minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 8px 11px; border-bottom: 1px solid #e8edf1; font-size: 10px; }
.deployment-event:last-child { border-bottom: 0; }
.deployment-event time { color: var(--muted); font-variant-numeric: tabular-nums; }
.deployment-event strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deployment-event span { color: #425466; }
.deployment-event p { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.icon-button { border: 0; background: transparent; color: var(--muted); font-size: 20px; cursor: pointer; line-height: 1; }
dialog { width: min(460px, calc(100vw - 32px)); border: 1px solid var(--line); border-radius: 7px; padding: 0; color: var(--ink); box-shadow: 0 22px 70px rgba(23, 50, 77, .22); }
dialog::backdrop { background: rgba(23, 33, 43, .42); }
.dialog-form { padding: 22px; display: grid; gap: 15px; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.dialog-head h2 { font-size: 18px; margin: 6px 0 0; }
.dialog-form label { color: var(--muted); display: grid; gap: 7px; font-size: 11px; font-weight: 650; }
.dialog-form input:not([type="checkbox"]) { width: 100%; border: 1px solid var(--line); border-radius: 5px; padding: 10px 11px; color: var(--ink); font: inherit; }
.dialog-form input:focus, .dialog-form select:focus, .plan-bar select:focus { border-color: var(--blue); outline: 2px solid rgba(44, 107, 237, .12); }
.dialog-form .check-field { display: flex; align-items: center; gap: 8px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.toast { position: fixed; right: 24px; bottom: 22px; background: #17212b; color: #fff; padding: 12px 15px; border-radius: 5px; opacity: 0; transform: translateY(8px); transition: .2s; pointer-events: none; font-size: 12px; }
.toast.show { opacity: 1; transform: translateY(0); }
.admin-login-view { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #e9eef2; }
.admin-login-panel { width: min(400px, 100%); display: grid; gap: 24px; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; box-shadow: var(--shadow); }
.admin-login-brand { display: flex; align-items: center; gap: 11px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.admin-login-brand .brand-mark { background: var(--navy); color: #fff; }
.admin-login-brand strong, .admin-login-brand small { display: block; }
.admin-login-brand strong { font-size: 16px; }
.admin-login-brand small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.admin-login-panel h1 { margin: 7px 0 0; font-size: 24px; letter-spacing: 0; }
.admin-login-form { display: grid; gap: 15px; }
.admin-login-form label { display: grid; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 650; }
.admin-login-form input { width: 100%; border: 1px solid var(--line); border-radius: 5px; padding: 11px; color: var(--ink); background: #fff; font: inherit; }
.admin-login-form input:focus { border-color: var(--blue); outline: 2px solid rgba(44, 107, 237, .12); }
.admin-login-form .button { min-height: 40px; }
.admin-login-error { min-height: 18px; margin: -3px 0 0; color: var(--red); font-size: 11px; }
.admin-monitor-link { color: var(--blue); font-size: 12px; text-align: center; text-decoration: none; }
.admin-monitor-link:hover { text-decoration: underline; }
.hidden { display: none !important; }
.monitor-toolbar { min-height: 50px; }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; background: #e9eef2; padding: 3px; }
.segmented button { border: 0; border-radius: 4px; background: transparent; color: var(--muted); padding: 8px 13px; font: inherit; font-size: 12px; font-weight: 650; cursor: pointer; }
.segmented button.active { color: var(--ink); background: #fff; box-shadow: 0 1px 3px rgba(23, 50, 77, .12); }
.monitor-warning { color: var(--amber); font-size: 11px; max-width: 60%; text-align: right; overflow-wrap: anywhere; }
.monitor-view { margin-bottom: 20px; }
.statistics-heading { display: flex; justify-content: space-between; align-items: flex-end; margin: 4px 0 15px; }
.statistics-heading h2 { margin: 6px 0 0; font-size: 17px; }
.statistics-kpis { margin-bottom: 16px; }
.statistics-grid { display: grid; gap: 16px; }
.statistics-panel { min-width: 0; }
.statistics-panel h3 { margin: 5px 0 0; font-size: 14px; }
.machine-bar-chart { display: grid; gap: 13px; padding: 4px 20px 20px; }
.machine-bar-row { display: grid; grid-template-columns: minmax(150px, 230px) minmax(120px, 1fr) 92px; align-items: center; gap: 13px; min-height: 38px; }
.machine-bar-label { min-width: 0; display: grid; gap: 4px; }
.machine-bar-label strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.machine-bar-label span { color: var(--muted); font-size: 10px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.machine-bar-track { height: 10px; background: #e8edf1; border-radius: 3px; overflow: hidden; }
.machine-bar-track span { display: block; height: 100%; min-width: 0; background: var(--blue); border-radius: inherit; }
.machine-bar-value { color: var(--ink); font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.machine-bars-empty { padding: 18px 20px 22px; }
.statistics-chart-wrap { padding: 6px 18px 14px; overflow: hidden; }
.statistics-chart { display: block; width: 100%; min-width: 520px; height: auto; overflow: visible; }
.statistics-grid-line { stroke: #e7edf1; stroke-width: 1; }
.statistics-axis { stroke: #b9c4cc; stroke-width: 1; }
.statistics-axis-label { fill: #778692; font-size: 10px; font-variant-numeric: tabular-nums; }
.statistics-line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.statistics-total { stroke: var(--blue); }
.statistics-effective { stroke: var(--green); stroke-dasharray: 6 4; }
.statistics-point { stroke-width: 2; stroke: #fff; }
.statistics-point.statistics-total { fill: var(--blue); }
.statistics-point.statistics-effective { fill: var(--green); }
.statistics-empty { fill: var(--muted); font-size: 12px; }
.statistics-table { min-width: 760px; }
.statistics-table td { font-variant-numeric: tabular-nums; }
.statistics-partial { background: #fffaf0; }
.anomaly-heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.anomaly-range button { padding: 6px 10px; }
.anomaly-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .8fr); gap: 16px; }
.anomaly-panel { min-width: 0; }
.anomaly-panel h3 { margin: 5px 0 0; font-size: 14px; }
.anomaly-trend-panel { grid-row: span 2; }
.anomaly-machine-panel { grid-column: 1 / -1; }
.anomaly-latest-error-panel { grid-column: 1 / -1; }
.monitor-table.anomaly-table { min-width: 440px; }
.anomaly-error-reason { min-width: 280px; white-space: normal; }
.anomaly-trend-wrap { padding: 6px 18px 14px; overflow-x: auto; }
.anomaly-trend-chart { display: block; width: 100%; min-width: 520px; height: auto; overflow: visible; }
.anomaly-line-error { stroke: var(--red); }
.anomaly-line-rejected { stroke: var(--amber); }
.anomaly-line-failure { stroke: var(--blue); }
.statistics-point.anomaly-line-error { fill: var(--red); }
.statistics-point.anomaly-line-rejected { fill: var(--amber); }
.statistics-point.anomaly-line-failure { fill: var(--blue); }
.monitor-table { min-width: 1120px; }
.collection-table { min-width: 1180px; }
.collection-table td:nth-child(4) { min-width: 190px; white-space: normal; }
.collection-timer { display: inline-block; min-width: 66px; font-variant-numeric: tabular-nums; }
.metric-inline { font-weight: 700; }
.metric-inline.clean { color: var(--green); }
.metric-inline.warn { color: var(--amber); }
.metric-inline.danger { color: var(--red); }
.compact-progress { width: 130px; height: 5px; background: #e8edf1; border-radius: 999px; overflow: hidden; margin-bottom: 5px; }
.compact-progress span { display: block; height: 100%; background: var(--blue); border-radius: inherit; }
.monitor-table small { color: var(--muted); font-size: 10px; white-space: nowrap; }
.curve-heading { display: flex; justify-content: space-between; align-items: flex-end; margin: 4px 0 15px; }
.curve-heading h2 { margin: 6px 0 0; font-size: 17px; }
.curve-grid { display: grid; grid-template-columns: repeat(2, minmax(360px, 1fr)); gap: 16px; }
.curve-card { min-width: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; box-shadow: var(--shadow); }
.curve-media { position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; background: #edf1f4; overflow: hidden; }
.curve-media img { width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .18s ease; }
.curve-media.loaded img { opacity: 1; }
.curve-loading { position: absolute; color: var(--muted); font-size: 11px; }
.curve-media.loaded .curve-loading { display: none; }
.curve-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 14px 16px; }
.curve-meta strong { display: block; font-size: 12px; overflow-wrap: anywhere; }
.curve-meta span { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; white-space: nowrap; }
.curve-empty { padding: 30px; }
.detail-dialog { width: min(760px, calc(100vw - 80px)); }
.detail-list dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.detail-list dl div { padding: 11px 13px; border-bottom: 1px solid var(--line); }
.detail-list dt { color: var(--muted); font-size: 10px; }
.detail-list dd { margin: 5px 0 0; font-size: 12px; overflow-wrap: anywhere; }
.detail-items { max-height: 430px; overflow: auto; display: grid; gap: 10px; }
.detail-items > div { border: 1px solid var(--line); border-radius: 6px; padding: 12px; }
.detail-items pre { margin: 9px 0 0; color: #425466; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 11px; }
