:root{color-scheme:light;--bg:#f3f6fb;--panel:#fff;--raised:#f5f7fb;--text:#1b293f;--muted:#62718a;--line:#dfe6ef;--primary:#285bd6;--soft:#eaf0ff;--danger:#bd354a;--warning:#996014;--success:#12734e;--terminal:#111b2d;--radius:12px;--sidebar:232px;font:14px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text)}a{color:var(--primary);text-decoration:none}a:hover{text-decoration:underline}button,input,select,textarea{font:inherit}a:focus-visible,button:focus-visible,summary:focus-visible{outline:3px solid #285bd65c;outline-offset:3px}h1,h2,h3{line-height:1.35;font-weight:650;letter-spacing:-.03em}h1{font-size:28px;margin:0 0 10px}h2{font-size:18px}h3{font-size:15px}p{margin:0 0 14px}small{font-size:12px}.muted{color:var(--muted)}.block{display:block}[hidden]{display:none!important}.eyebrow{display:block;font-size:10px;font-weight:700;letter-spacing:1.6px;color:var(--primary);margin-bottom:9px}code,pre,textarea{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}code{font-size:.92em}pre{white-space:pre-wrap;overflow-wrap:anywhere}svg{max-width:100%}.fingerprint,.notes{overflow-wrap:anywhere}.notes{white-space:pre-wrap}
.skip-link{position:fixed;top:-100px;left:16px;z-index:2000;padding:12px;background:var(--panel);border:1px solid var(--primary);border-radius:8px}.skip-link:focus{top:10px}
.sidebar{position:fixed;inset:0 auto 0 0;width:var(--sidebar);background:var(--panel);border-right:1px solid var(--line);display:flex;flex-direction:column;z-index:40}.brand{display:flex;align-items:center;gap:11px;padding:25px 22px 22px;color:var(--text);font-size:19px;font-weight:700;letter-spacing:-.5px}.brand:hover{text-decoration:none}.brand-mark{display:grid;place-items:center;width:36px;height:36px;border-radius:10px;background:var(--primary);color:#fff;font:600 18px/1 ui-monospace,monospace;flex-shrink:0}.brand small{display:block;color:var(--muted);font-size:10px;font-weight:400;letter-spacing:.6px;margin-top:3px}.side-nav{padding:3px 14px 14px;overflow-y:auto}.nav-group+.nav-group{margin-top:18px}.nav-label{color:var(--muted);font-size:10px;letter-spacing:1.3px;margin:0 12px 7px}.side-nav a{display:flex;align-items:center;gap:12px;padding:9px 12px;border-radius:7px;color:var(--muted);margin:2px 0;min-height:39px;font-size:13px}.side-nav a:hover{background:var(--raised);color:var(--text);text-decoration:none}.side-nav a[aria-current=page]{background:var(--soft);color:var(--primary);font-weight:650}.side-nav svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.sidebar-footer{padding:20px 24px;margin-top:auto;border-top:1px solid var(--line);font-size:11px;color:var(--muted)}.sidebar-footer small{display:block;font-size:10px;margin-top:5px}.status-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--primary);margin-right:7px}
.topbar{height:72px;margin-left:var(--sidebar);background:var(--panel);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 32px}.topbar-title,.topbar-account{display:flex;align-items:center;gap:14px;min-width:0}.topbar-title{font-size:12px}.topbar-title strong{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.breadcrumb-divider{color:#b0bdcf}.avatar{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:var(--soft);color:var(--primary);font-size:12px;font-weight:700}.account-name{font-size:12px;line-height:1.4;max-width:160px;overflow-wrap:anywhere}.account-name small{display:block;color:var(--muted);font-size:10px}.topbar .link-button{font-size:12px;color:var(--muted);padding:6px 0 6px 14px;border-left:1px solid var(--line);border-radius:0;background:none}#nav-toggle{display:none}
.container{max-width:1600px;margin:0 auto;padding:32px;min-width:0}.app-page .container{margin-left:var(--sidebar);min-height:calc(100vh - 124px);max-width:none}.container:focus{outline:none}.app-footer{margin-left:var(--sidebar);display:flex;justify-content:space-between;gap:12px;padding:16px 32px;color:var(--muted);font-size:11px;border-top:1px solid var(--line)}.embedded-page .container{padding:20px;margin:0;max-width:none}.page-heading{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-bottom:26px}.page-heading h1{margin:0 0 8px}.page-heading p{margin:0;font-size:13px;max-width:800px}.heading-actions,.actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px}.actions{margin-top:10px}.actions.stacked{align-items:flex-start;flex-direction:column}.actions form{margin:0}.inline{display:inline}.inline-form{display:inline-flex;margin:0}.panel{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:24px;box-shadow:0 2px 3px #1b293f03}.panel h2:first-child,.panel h3:first-child{margin-top:0}.panel+.panel{margin-top:20px}.grid{display:grid;gap:20px;align-items:start}.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.grid>.panel{margin-top:0;min-width:0}
button,.button{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:1px solid transparent;border-radius:7px;padding:9px 15px;min-height:38px;background:var(--primary);color:#fff;font-size:13px;font-weight:600;line-height:1.4;cursor:pointer;transition:background .15s,border-color .15s}.button:hover,button:hover{background:#204cb6;text-decoration:none}.button.secondary,button.secondary{background:var(--panel);border-color:var(--line);color:var(--text)}.button.secondary:hover,button.secondary:hover{background:var(--raised);border-color:#b9c8dc}.button.danger,button.danger{background:#fff0f2;color:var(--danger);border-color:#f3cbd2}.button.danger:hover,button.danger:hover{background:#ffe2e8}.link-button{background:none;color:var(--primary);padding:0;min-height:0;font-weight:500}.link-button:hover{background:none;text-decoration:underline}button:disabled,.button[aria-disabled=true]{opacity:.48;cursor:not-allowed;pointer-events:none}.button.small,button.small{padding:6px 12px;min-height:32px;font-size:12px}.connection-actions{display:flex;gap:7px;align-items:center;white-space:nowrap}.connection-actions form{margin:0}
label{display:block;font-size:13px;font-weight:550;margin-bottom:18px}input,select,textarea{display:block;width:100%;min-width:0;margin-top:7px;padding:10px 12px;border:1px solid #cbd6e4;border-radius:7px;background:var(--panel);color:var(--text);font-size:13px;line-height:1.4}input::placeholder,textarea::placeholder{color:#8391a6}input:focus,select:focus,textarea:focus{outline:3px solid #285bd61a;border-color:var(--primary)}textarea{font-size:12px;line-height:1.6;resize:vertical}input[type=checkbox],input[type=radio]{accent-color:var(--primary)}.check{display:flex;gap:10px;align-items:flex-start;font-weight:400}.check input{width:auto;margin-top:4px;flex-shrink:0}fieldset{border:1px solid var(--line);border-radius:9px;margin:0 0 20px;padding:18px}legend{padding:0 7px;font-weight:600}details{margin:12px 0}details summary{cursor:pointer;color:var(--primary);font-weight:500;margin-bottom:12px}details:not([open]) summary{margin-bottom:0}dl{display:grid;grid-template-columns:130px minmax(0,1fr);gap:10px 16px;margin:18px 0;font-size:13px}dt{color:var(--muted)}dd{margin:0;overflow-wrap:anywhere}
.notice{padding:12px 16px;border-radius:8px;margin:0 0 20px;background:var(--soft);border:1px solid #d4dfff;font-size:13px;overflow-wrap:anywhere}.notice p:last-child{margin-bottom:0}.notice.error{background:#fff2f4;border-color:#f3cbd2;color:var(--danger)}.notice.warning{background:#fff9eb;border-color:#efe0ba;color:var(--warning)}.notice.success{background:#eefaf4;border-color:#c7e6d5;color:var(--success)}.workspace-notice{padding:12px 16px;border:1px solid #d4dfff;background:var(--soft);border-radius:8px;margin:0 0 20px;font-size:12px}.workspace-notice p{margin-bottom:0}
.table-wrap{overflow:auto;max-width:100%;background:var(--panel);border:1px solid var(--line);border-radius:var(--radius)}table{width:100%;border-collapse:collapse;font-size:13px}th,td{text-align:left;padding:16px 18px;border-bottom:1px solid var(--line);vertical-align:middle}th{font-size:11px;font-weight:600;color:var(--muted);background:#f8fafd;white-space:nowrap}td{overflow-wrap:anywhere}tbody tr:last-child td{border-bottom:0}tbody tr:hover{background:#f8faff}td small{font-size:11px;color:var(--muted);margin-top:5px}.host-name{font-weight:650;color:var(--text)}.host-address{white-space:nowrap}.table-caption{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:20px 0 12px;font-size:12px;color:var(--muted)}.table-caption strong{color:var(--text);font-size:14px;font-weight:600}.badge{display:inline-flex;align-items:center;gap:5px;border-radius:6px;padding:3px 8px;font-size:11px;font-weight:550;background:#edf1f6;color:var(--muted);white-space:nowrap}.badge.trusted,.badge.active,.badge.ok,.badge.succeeded,.badge.completed{background:#eaf7ef;color:var(--success)}.badge.queued{background:var(--soft);color:var(--primary)}.badge.draft,.badge.pending,.badge.stale,.badge.running,.badge.cancel_requested,.badge.partial{background:#fff5df;color:var(--warning)}.badge.error,.badge.failed,.badge.timed_out,.badge.blocked,.badge.command_failed{background:#fdeef1;color:var(--danger)}.badge.unknown,.badge.disabled,.badge.canceled,.badge.cancelled{background:#edf1f6;color:var(--muted)}.tag{display:inline-block;margin:2px 5px 2px 0;border-radius:5px;padding:2px 7px;background:var(--soft);color:var(--primary);font-size:11px}.empty{text-align:center;padding:60px 24px;color:var(--muted)}.empty h2{color:var(--text);margin-top:0}
.filter-bar,.task-history-filter{display:flex;align-items:flex-end;flex-wrap:wrap;gap:12px;margin-bottom:20px}.task-history-filter{padding:18px;background:var(--panel);border:1px solid var(--line);border-radius:var(--radius)}.task-history-filter label{margin:0;flex:1;min-width:135px;font-size:11px;color:var(--muted)}.task-history-filter input,.task-history-filter select{font-size:12px}.filter-bar label{min-width:240px;margin:0}.pagination{display:flex;gap:20px;align-items:center;justify-content:center;margin:24px 0;font-size:12px;color:var(--muted)}.table-check{display:flex;align-items:center;gap:8px;margin:0}.table-check input,.retention-confirm input{width:auto;display:inline-block;margin-right:8px}.retention-confirm{margin:20px 0}.delete-group{margin-top:16px}
.metric-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.metric-grid>div,.summary-grid>a{display:block;padding:20px;border:1px solid var(--line);border-radius:10px;background:var(--panel);color:var(--text)}.metric-grid span{display:block;color:var(--muted);font-size:12px;margin-bottom:8px}.metric-grid strong{overflow-wrap:anywhere}.summary-grid{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:24px}.summary-grid strong{font-size:32px;line-height:1.2;font-weight:650;letter-spacing:-1px;font-variant-numeric:tabular-nums}.summary-grid>a:hover{border-color:#adc2f2;text-decoration:none;background:#fafcff}.summary-grid>a:first-child{background:var(--primary);color:#fff;border-color:var(--primary)}.summary-grid>a:first-child span{color:#dce6ff}.snapshot{margin-top:20px}.quick-links{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:24px}.quick-link{display:block;padding:22px;border:1px solid var(--line);background:var(--panel);border-radius:var(--radius);color:var(--text)}.quick-link:hover{border-color:#adc2f2;text-decoration:none}.quick-link strong{display:block;font-size:14px;margin-bottom:6px}.quick-link small{color:var(--muted)}.trend-chart{display:block;width:100%;height:auto;max-height:230px}.chart-line{fill:none;stroke:var(--primary);stroke-width:2}.chart-dot{fill:var(--primary)}.chart-axis{stroke:#a4b1c5;stroke-width:1}.chart-grid{stroke:var(--line);stroke-width:1}.trend-chart text{fill:var(--muted);font-size:12px}.empty-chart{padding:25px;background:var(--raised);color:var(--muted);border-radius:8px}
.task-form-section{margin-bottom:20px}.template-picker,.host-picker{display:grid;gap:12px}.template-picker{grid-template-columns:repeat(3,minmax(0,1fr))}.host-picker{grid-template-columns:repeat(2,minmax(0,1fr))}.template-choice,.host-choice{display:flex;gap:12px;margin:0;padding:16px;border:1px solid var(--line);border-radius:9px;font-weight:400;cursor:pointer}.template-choice:has(input:checked),.host-choice:has(input:checked){border-color:var(--primary);background:var(--soft)}.template-choice input,.host-choice input{width:auto;margin:4px 0 0;flex:0 0 auto}.template-choice>span,.host-choice>span{min-width:0}.template-choice strong,.template-choice small,.template-choice>span>span,.host-choice strong,.host-choice small{display:block}.template-choice small,.host-choice small{margin:3px 0 8px;color:var(--muted)}.task-summary{margin-bottom:20px}.task-target-list{display:grid;gap:20px}.task-target-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.task-target-heading h2,.task-target-heading p{margin-top:0}.target-result{margin-bottom:20px}.task-error{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}.task-output{border-radius:8px;overflow:hidden;border:1px solid #2d3d59;background:var(--terminal);color:#dfe8fa}.output-chunk{border-bottom:1px solid #2d3d59}.output-chunk:last-child{border-bottom:0}.output-chunk.stderr{background:#2d1b2a}.output-meta{padding:6px 12px;background:#19263d;color:#9daec9;font:11px/1.4 ui-monospace,monospace}.output-chunk.stderr .output-meta{color:#ffadbd}.output-chunk pre{margin:0;padding:12px;font-size:12px;line-height:1.6}.task-events{margin-top:20px}.task-stream-state{min-height:24px;margin-bottom:10px;text-align:right}.audit-details{max-width:36rem;margin:0;font:11px/1.5 ui-monospace,monospace}
dialog{width:calc(100% - 32px);max-width:720px;max-height:85vh;overflow:auto;border:1px solid var(--line);border-radius:14px;padding:28px;background:var(--panel);color:var(--text);box-shadow:0 24px 80px #1b293f2b}dialog::backdrop{background:#111b2d80;backdrop-filter:blur(3px)}dialog pre{max-height:35vh;overflow:auto}.connection-bar{display:flex;align-items:center;justify-content:space-between;gap:20px}.connection-bar p{margin:4px 0 0;font-size:12px}.connection-bar button{flex-shrink:0}
.login-page{min-height:100vh;background:var(--bg)}.login-page .container.narrow{max-width:1040px;padding:48px 24px;margin:8vh auto}.login-layout{display:grid;grid-template-columns:1.1fr 1fr;overflow:hidden;border:1px solid var(--line);border-radius:18px;background:var(--panel);box-shadow:0 16px 60px #1b293f0b}.login-story{background:var(--soft);padding:44px;display:flex;flex-direction:column;justify-content:space-between;min-height:540px}.login-story .brand{padding:0}.login-story h1{font-size:34px;line-height:1.5;margin:50px 0 16px}.login-story p{color:var(--muted);font-size:13px}.login-motif{display:grid;gap:12px;margin:28px 0}.login-motif span{display:flex;align-items:center;gap:10px;padding:14px;border:1px solid #d5e0f8;border-radius:8px;background:#ffffff9c;font-size:12px}.login-motif code{color:var(--primary)}.login-panel{border:0;border-radius:0;box-shadow:none;padding:52px 40px;display:flex;flex-direction:column;justify-content:center}.login-panel h2{font-size:25px;margin-bottom:8px}.login-panel form{margin-top:20px}.login-panel button{width:100%;margin-top:6px}.login-footnote{color:var(--muted);font-size:11px;margin:22px 0 0}
@media(max-width:1200px){:root{--sidebar:208px}.container{padding:26px}.topbar{padding:0 26px}.summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.brand{padding-left:18px}.template-picker,.host-picker{grid-template-columns:1fr}}
@media(max-width:900px){.sidebar{visibility:hidden;transform:translateX(-100%);width:232px;box-shadow:16px 0 40px #1b293f18}.nav-open .sidebar{visibility:visible;transform:none}.topbar{margin-left:0;padding:0 20px;height:64px}.app-page .container,.app-footer{margin-left:0}#nav-toggle{display:inline-flex;background:var(--soft);color:var(--primary);width:36px;min-height:34px;padding:5px}.nav-open #nav-toggle{position:relative;z-index:45;margin-left:224px}.topbar-title{gap:10px}.grid.two{grid-template-columns:1fr}.login-story{padding:30px}.login-panel{padding:36px}.quick-links{gap:10px}.quick-link{padding:16px}}
@media(max-width:600px){.container,.embedded-page .container{padding:20px 16px}.page-heading{align-items:flex-start;flex-direction:column;gap:14px;margin-bottom:20px}h1{font-size:24px}.page-heading p{font-size:12px}.panel{padding:18px}.topbar-account{gap:8px}.account-name{display:none}.topbar-title>.muted,.breadcrumb-divider{display:none}.app-footer{padding:16px;flex-wrap:wrap}.app-footer span{font-size:10px}.filter-bar{align-items:stretch;flex-direction:column}.filter-bar label{min-width:0}.task-history-filter{padding:14px;gap:10px}.task-history-filter label{min-width:calc(50% - 10px)}.metric-grid,.quick-links{grid-template-columns:1fr}.summary-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.summary-grid>a,.summary-grid>div{padding:15px}.summary-grid strong{font-size:28px}.summary-grid span{font-size:11px}.task-target-heading,.connection-bar{flex-direction:column;align-items:stretch}.task-stream-state{text-align:left}dl{grid-template-columns:1fr;gap:3px}dd{margin-bottom:10px}th,td{padding:12px}.login-page .container.narrow{padding:20px 16px;margin:3vh auto}.login-layout{display:block}.login-story{min-height:0;padding:24px}.login-story h1,.login-story>div:not(:first-child),.login-story>p{display:none}.login-panel{padding:28px 24px}.login-panel h2{font-size:23px}.pagination{gap:12px}dialog{padding:20px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
@media(max-width:600px){.host-table,.host-table tbody{display:block}.host-table thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.host-table tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:18px;border-bottom:1px solid var(--line)}.host-table tbody tr:last-child{border-bottom:0}.host-table td{padding:0;border:0;min-width:0}.host-table td:first-child,.host-table td:nth-child(2),.host-table td:last-child{grid-column:1/-1}.host-table td[data-label]:before{content:attr(data-label);display:block;font-size:10px;color:var(--muted);margin-bottom:5px}.host-table .host-name{font-size:15px}.host-table .connection-actions{padding-top:8px}.host-table .connection-actions form{flex:1}.host-table .connection-actions button{width:100%}}
@media(pointer:coarse){button,.button,.side-nav a{min-height:44px}}

/* OpsConsole adapter for the embedded Mazer v2.3.1 visual system. */
:root {
  color-scheme: light;
  --bg: #f2f7ff;
  --panel: #fff;
  --raised: #f6f8fc;
  --text: #25396f;
  --muted: #7c8db5;
  --line: #e7eaf3;
  --primary: #435ebe;
  --soft: #edf1ff;
  --danger: #dc3545;
  --warning: #b76e00;
  --success: #198754;
  --terminal: #101727;
  --radius: 11px;
  --sidebar: 272px;
  --topbar: 68px;
  --bs-primary: #435ebe;
  --bs-body-color: #607080;
  --bs-body-bg: #f2f7ff;
  font: 14px/1.6 "Nunito", "PingFang SC", "Microsoft YaHei", sans-serif;
}

html,
body { min-height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
}

h1,
h2,
h3 { color: var(--text); font-weight: 700; }

h1 { font-size: 2rem; letter-spacing: -.025em; }
a { color: var(--primary); }

.sidebar.sidebar-wrapper {
  inset: 0 auto 0 0;
  width: var(--sidebar);
  height: 100vh;
  background: var(--panel);
  border: 0;
  box-shadow: 0 0 24px rgba(37, 57, 111, .08);
  overflow: hidden;
  transition: transform .25s ease, visibility .25s ease;
  z-index: 70;
}

.sidebar .sidebar-header {
  padding: 1.4rem 1.55rem .85rem;
  flex: 0 0 auto;
}

.brand {
  gap: .8rem;
  color: var(--text);
  font-size: 1.28rem;
  font-weight: 700;
}

.sidebar .brand { padding: 0; }
.brand:hover { color: var(--text); }

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--primary);
  box-shadow: 0 5px 12px rgba(67, 94, 190, .24);
  font-size: 18px;
}

.brand small {
  margin-top: 0;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .02em;
}

.side-nav.sidebar-menu {
  min-height: 0;
  padding: .1rem 1rem .8rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  flex: 1 1 auto;
}

.sidebar-wrapper .side-nav .menu {
  margin: 0;
  padding: 0;
  list-style: none;
  font-weight: 600;
}

.sidebar-wrapper .side-nav .menu .sidebar-title {
  margin: .75rem .7rem .25rem;
  padding: 0;
  color: var(--text);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.4;
}

.sidebar-wrapper .side-nav .menu .sidebar-item { margin: .16rem 0; }

.sidebar-wrapper .side-nav .menu .sidebar-link {
  min-height: 36px;
  margin: 0;
  padding: .48rem .75rem;
  gap: .85rem;
  border-radius: .55rem;
  color: var(--text);
  font-size: .95rem;
  line-height: 1.35;
  transition: background-color .15s ease, color .15s ease, transform .15s ease;
}

.sidebar-wrapper .side-nav .menu .sidebar-link span { margin-left: 0; }

.sidebar-wrapper .side-nav .menu .sidebar-link svg {
  width: 19px;
  height: 19px;
  color: var(--muted);
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

.sidebar-wrapper .side-nav .menu .sidebar-link:hover {
  background: #f0f1f5;
  color: var(--primary);
  text-decoration: none;
  transform: translateX(1px);
}

.sidebar-wrapper .side-nav .menu .sidebar-item.active > .sidebar-link {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 5px 12px rgba(67, 94, 190, .24);
}

.sidebar-wrapper .side-nav .menu .sidebar-item.active > .sidebar-link span,
.sidebar-wrapper .side-nav .menu .sidebar-item.active > .sidebar-link svg { color: #fff; }

.sidebar-footer {
  padding: .75rem 1.55rem .9rem;
  border-top: 1px solid var(--line);
  background: #fbfcff;
  flex: 0 0 auto;
  font-size: .76rem;
}

.status-dot { background: #57caeb; box-shadow: 0 0 0 3px rgba(87, 202, 235, .15); }

.topbar {
  height: var(--topbar);
  margin-left: var(--sidebar);
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .96);
  border: 0;
  box-shadow: 0 1px 0 rgba(37, 57, 111, .06);
  backdrop-filter: blur(12px);
}

.topbar-brand,
.topbar-context { display: flex; align-items: center; min-width: 0; }
.topbar-brand { gap: 1rem; }
.topbar-context { flex-direction: column; align-items: flex-start; line-height: 1.25; }
.topbar-context strong { color: var(--text); font-size: .95rem; }
.topbar-context span { color: var(--muted); font-size: .74rem; }
.topbar-mobile-brand { display: none; padding: 0; }

.topbar-account { gap: .85rem; }
.topbar .avatar {
  width: 36px;
  height: 36px;
  background: #e8ebff;
  color: var(--primary);
  font-size: .9rem;
}

.topbar .account-name { color: var(--text); font-size: .82rem; }
.topbar .account-name small { color: var(--muted); }
.topbar .link-button { color: var(--muted); }
#nav-toggle { display: none; }

.app-page .container {
  min-height: calc(100vh - var(--topbar) - 55px);
  margin-left: var(--sidebar);
  padding: 2rem;
  width: calc(100% - var(--sidebar));
  max-width: none;
}

.app-footer {
  margin-left: var(--sidebar);
  padding: 1rem 2rem 1.4rem;
  border: 0;
  color: var(--muted);
}

.page-heading { margin-bottom: 1.75rem; }
.page-heading h1 { margin-bottom: .35rem; }
.page-heading p { color: var(--muted); }
.eyebrow { color: var(--primary); font-size: .72rem; letter-spacing: .09em; }
.page-breadcrumb { margin: 0 0 .75rem; color: var(--muted); font-size: .8rem; }
.workbench-heading .page-heading { margin-bottom: 1.45rem; }
.workbench-heading h1 { font-size: 2rem; margin-bottom: .35rem; }
.workbench-heading .page-heading p { font-size: .95rem; }

.panel,
.table-wrap,
.task-history-filter,
.host-list-card,
.quick-link,
.metric-grid > div,
.summary-grid > a {
  border-color: transparent;
  border-radius: var(--radius);
  box-shadow: 0 2px 6px rgba(67, 94, 190, .08);
}

.panel { padding: 1.55rem; }
.table-wrap { overflow: auto; }
th { background: #f6f8fc; color: var(--muted); }
tbody tr:hover { background: #f8faff; }

button,
.button {
  border-radius: .5rem;
  background: var(--primary);
  box-shadow: 0 2px 5px rgba(67, 94, 190, .2);
}

button:hover,
.button:hover { background: #3950a2; }

.button.secondary,
button.secondary {
  background: #fff;
  border-color: #dce2f1;
  color: var(--text);
  box-shadow: none;
}

.link-button,
.link-button:hover { box-shadow: none; }

input,
select,
textarea {
  border-color: #dce2f1;
  border-radius: .5rem;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 .2rem rgba(67, 94, 190, .14);
  outline: 0;
}

.notice { border: 0; box-shadow: 0 2px 6px rgba(67, 94, 190, .06); }
.badge { border-radius: 999px; }

.inventory-tools {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.inventory-filter { margin: .35rem 0 0; min-width: 0; flex: 1; }
.inventory-filter summary { color: var(--muted); font-size: .82rem; }
.inventory-filter .task-history-filter { margin: 1rem 0 0; }

.host-list-card { background: var(--panel); overflow: hidden; }
.host-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  padding: .9rem 1.25rem;
  border-bottom: 1px solid var(--line);
}

.host-list-heading h2 { margin: 0; font-size: 1rem; }
.host-list-heading > span { color: var(--muted); font-size: .78rem; }
.workbench-host {
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr) auto 100px;
  align-items: center;
  gap: .85rem;
  min-height: 62px;
  padding: .7rem 1.25rem;
  border-bottom: 1px solid var(--line);
  transition: background-color .15s ease;
}

.workbench-host:last-child { border-bottom: 0; }
.workbench-host:hover { background: #fbfcff; }
.workbench-host.is-selected { background: var(--soft); }
.host-icon {
  width: 22px;
  height: 24px;
  color: var(--muted);
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.workbench-host-identity { min-width: 0; line-height: 1.4; }
.workbench-host .host-name { color: var(--text); font-size: .98rem; font-weight: 700; }
.workbench-host .host-address { margin: .08rem 0 0; color: var(--muted); font-size: .78rem; white-space: normal; }
.host-groups { display: flex; flex-wrap: wrap; gap: .1rem .5rem; margin-top: .12rem; font-size: .68rem; }
.host-health { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.host-health > span { margin-right: .25rem; font-size: .58rem; }
.host-health.ok { color: var(--success); }
.host-health.stale { color: var(--warning); }
.host-health.error { color: var(--danger); }
.workbench-host .connection-actions { justify-content: flex-end; gap: .35rem; font-size: .86rem; }
.workbench-host .connection-actions button { min-height: 32px; padding: .2rem .15rem; font-size: .86rem; font-weight: 600; }
.host-inline-workspace { margin-top: 1.25rem; }
.workbench-footnote { margin-top: 1rem; color: var(--muted); font-size: .75rem; }
.host-quick-actions { margin: 0 0 1.5rem; }

.summary-grid > a:first-child {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 5px 12px rgba(67, 94, 190, .24);
}

.login-page {
  background: radial-gradient(circle at top left, #e4edff 0, var(--bg) 38%, #f8faff 100%);
}

.login-page .container.narrow { max-width: 980px; }
.login-layout {
  border: 0;
  border-radius: 1rem;
  box-shadow: 0 16px 50px rgba(37, 57, 111, .13);
}

.login-story {
  min-height: 520px;
  background: linear-gradient(145deg, #435ebe 0%, #526ed3 62%, #57caeb 145%);
  color: #fff;
}

.login-story .brand,
.login-story h1 { color: #fff; }
.login-story .brand-mark { background: #fff; color: var(--primary); box-shadow: none; }
.login-story .brand small,
.login-story p { color: #e7ebff; }
.login-story .login-motif span { background: rgba(255, 255, 255, .11); border-color: rgba(255, 255, 255, .2); }
.login-story .login-motif code { color: #fff; }
.login-panel { padding: 3.5rem 3rem; }

@media (min-width: 1200px) and (max-height: 760px) {
  .sidebar-footer { display: none; }
}

@media (max-width: 1199px) {
  .sidebar.sidebar-wrapper {
    width: var(--sidebar);
    visibility: hidden;
    transform: translateX(-100%);
    box-shadow: 12px 0 38px rgba(37, 57, 111, .18);
  }

  .nav-open .sidebar.sidebar-wrapper { visibility: visible; transform: translateX(0); }
  body.nav-open { overflow: hidden; }
  body.nav-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(16, 23, 39, .38);
  }

  .topbar,
  .app-page .container,
  .app-footer { margin-left: 0; }

  .app-page .container { width: 100%; }

  #nav-toggle {
    display: inline-flex;
    width: 38px;
    min-height: 38px;
    padding: 0;
    background: var(--soft);
    color: var(--primary);
    box-shadow: none;
  }

  .nav-open #nav-toggle { margin-left: 0; }
  .topbar-context { display: none; }
  .topbar-mobile-brand { display: flex; font-size: 1.05rem; }
  .topbar-mobile-brand .brand-mark { display: none; }
  .app-page .container { padding: 1.7rem 1.5rem; }
}

@media (max-width: 600px) {
  :root { --topbar: 62px; --sidebar: 260px; }
  .topbar { padding: 0 1rem; }
  .topbar-account { gap: .55rem; }
  .topbar .avatar { width: 32px; height: 32px; }
  .topbar .link-button { padding-left: 0; border: 0; }
  .app-page .container,
  .embedded-page .container { padding: 1.25rem 1rem; }
  .workbench-heading h1 { font-size: 1.7rem; }
  .workbench-heading .page-heading p { font-size: .86rem; }
  .page-breadcrumb { margin-bottom: .55rem; }
  .host-list-heading { padding: .75rem 1rem; }
  .workbench-host {
    grid-template-columns: 20px minmax(0, 1fr) auto;
    gap: 0 .65rem;
    min-height: 59px;
    padding: .6rem 1rem;
  }

  .host-icon { width: 20px; grid-row: 1 / 3; }
  .workbench-host .host-health { grid-row: 2; grid-column: 2; margin-top: .1rem; font-size: .72rem; }
  .workbench-host .connection-actions { grid-row: 1 / 3; grid-column: 3; gap: .2rem; }
  .workbench-host .connection-actions button { font-size: .78rem; }
  .workbench-host .host-name { font-size: .92rem; }
  .workbench-host .host-address { font-size: .72rem; }
  .inventory-tools > .button { min-height: 32px; padding: .4rem .6rem; font-size: .75rem; }
  .inventory-filter summary { font-size: .76rem; }
  .login-panel { padding: 2rem 1.5rem; }
}

@media (pointer: coarse) {
  .sidebar-wrapper .side-nav .menu .sidebar-link,
  .workbench-host .connection-actions button { min-height: 44px; }
}

/* File replacement deployment flow. */
.file-replacement-state.active,
.replacement-run-summary .badge.active,
.replacement-targets .badge.active { background: var(--soft); color: var(--primary); }
.replacement-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.replacement-section-heading h2,
.replacement-section-heading p { margin: 0; }
.replacement-section-heading p { margin-top: .3rem; }
.replacement-fields label { min-width: 0; }
.replacement-hosts { padding: 0; overflow: hidden; }
.replacement-hosts legend { margin-left: 1rem; }
.replacement-host-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--raised);
  font-size: .82rem;
}
.replacement-host-toolbar .check { margin: 0; }
.replacement-host-search {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-width: min(320px, 100%);
  margin: 0;
  white-space: nowrap;
}
.replacement-host-search input { min-height: 34px; margin: 0; padding: .35rem .6rem; }
.replacement-host-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: .65rem;
  max-height: 340px;
  overflow: auto;
  padding: 1rem;
}
.replacement-host {
  align-items: center;
  min-width: 0;
  margin: 0;
  padding: .7rem .8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.replacement-host:has(input:checked) { border-color: #aebff1; background: var(--soft); }
.replacement-host span { min-width: 0; }
.replacement-host strong,
.replacement-host small { display: block; overflow-wrap: anywhere; }
.replacement-host small { margin-top: .2rem; color: var(--muted); }
.replacement-host-hint { margin: 0; padding: 0 1rem 1rem; font-size: .78rem; }
.replacement-create .notice p:last-child { margin-bottom: 0; }
.replacement-targets { display: grid; gap: 1rem; margin-top: 1rem; }
.replacement-targets .panel { margin-top: 0; }
.replacement-evidence dd { min-width: 0; }
.replacement-target pre { max-height: 300px; overflow: auto; padding: 1rem; border-radius: 8px; background: var(--terminal); color: #d8e1f0; }

@media (max-width: 700px) {
  .replacement-fields { grid-template-columns: 1fr; }
  .replacement-host-toolbar { align-items: flex-start; flex-direction: column; }
  .replacement-host-search { align-items: flex-start; flex-direction: column; width: 100%; }
  .replacement-host-search input { width: 100%; }
  .replacement-host-grid { grid-template-columns: 1fr; max-height: 420px; }
}
