:root { color-scheme: light; }
* { box-sizing: border-box; letter-spacing: 0; }
body { margin: 0; background: #fff; color: #252c29; font-size: 16px; }
.app-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 24px; background: #f4f7f5; border-bottom: 1px solid #dce3de; }
h1 { font-size: 24px; font-weight: 650; margin: 0; }
h2 { font-size: 20px; font-weight: 600; margin: 0; }
.header-account,.button-group,.section-heading,.list-heading,.list-title,.patch-footer,.dialog-header,.dialog-footer { display: flex; align-items: center; gap: 10px; }
.section-heading,.list-heading,.patch-footer,.dialog-header { justify-content: space-between; }
.header-account { font-size: 14px; }
.workspace { padding: 24px; }
.top-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; padding-bottom: 24px; border-bottom: 1px solid #dce3de; }
.section-heading { margin-bottom: 14px; min-height: 40px; }
.image-frame { height: 215px; background: #f8faf9; border: 1px solid #dce3de; display: flex; align-items: center; justify-content: center; overflow: hidden; color: #69726d; }
.image-frame img { width: 100%; height: 100%; object-fit: contain; }
[hidden] { display: none !important; }
.patch-section textarea { height: 215px; resize: vertical; }
.patch-footer { margin-top: 10px; flex-wrap: wrap; }
.save-status { font-size: 14px; color: #69726d; margin: 8px 0 0; }
.save-status.success { color: #157443; }
.save-status.warning { color: #976207; }
.save-status.error { color: #b02a37; }
.list-section { margin-top: 24px; }
.list-heading { gap: 18px; flex-wrap: wrap; margin-bottom: 16px; }
.list-title { flex-wrap: wrap; }
.record-count { color: #157443; background: #e8f3ec; padding: 3px 9px; border-radius: 4px; font-size: 14px; }
.list-title .save-status { margin: 0; }
.button-group { flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; border-radius: 5px; font-size: 15px; white-space: normal; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.icon-button { width: 40px; height: 40px; min-width: 40px; padding: 8px; }
.table-container { width: 100%; overflow-x: auto; }
#serverTable { min-width: 1480px; font-size: 14px; margin-bottom: 0; }
.table thead th { background: #303b35; color: #fff; font-weight: 500; white-space: nowrap; vertical-align: middle; }
.table td { vertical-align: middle; }
#serverTable td { min-width: 92px; max-width: 300px; white-space: pre-wrap; overflow-wrap: anywhere; }
#serverTable td:nth-child(1) { min-width: 132px; white-space: nowrap; }
#serverTable td:nth-child(2),#serverTable td:nth-child(10) { min-width: 180px; }
#serverTable td:nth-child(3) { min-width: 140px; }
#serverTable td:nth-child(4) { min-width: 175px; }
#serverTable td:nth-child(5) { min-width: 150px; white-space: nowrap; }
#serverTable td:nth-child(8) { min-width: 200px; }
#serverTable .row-actions { display: flex; gap: 6px; min-width: 90px; }
#serverTable .status-select { font-size: 14px; width: 170px; background-color: #fff; color: #252c29; }
.status-upgrading > td { background: #fff8e1; }
.status-rebooting > td { background: #eaf7fb; }
.status-updated > td { background: #eef9f0; }
.status-waiting_update > td { background: #fffbea; }
.status-waiting_reboot > td { background: #fff1f2; }
.status-user_paused > td,.status-hk_it_takeover > td { background: #f1f3f5; }
.empty-state { padding: 48px 16px; text-align: center; color: #69726d; background: #f8faf9; }
.alert { white-space: pre-wrap; overflow-wrap: anywhere; }
#previewError { white-space: pre-wrap; }
.app-dialog { width: min(760px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid #dce3de; border-radius: 6px; overflow: auto; }
.wide-dialog { width: min(1000px, calc(100vw - 24px)); }
.app-dialog::backdrop { background: #0007; }
.dialog-header { padding: 16px 20px; border-bottom: 1px solid #dce3de; position: sticky; top: 0; background: #fff; z-index: 1; }
.dialog-body { padding: 20px; }
.dialog-footer { padding: 14px 20px; border-top: 1px solid #dce3de; justify-content: flex-end; position: sticky; bottom: 0; background: #fff; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.form-label { font-size: 15px; }
.role-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; max-height: 190px; overflow: auto; padding-right: 4px; }
.role-list label { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.role-field { grid-column: 1 / -1; }
.role-custom-input { margin-top: 10px; }
.editable-select-control { position:relative; }
.editable-select-control .form-control { padding-right:72px; background:#fff; cursor:pointer; }
.editable-select-clear { position:absolute; top:1px; right:39px; bottom:1px; width:30px; border:0; background:transparent; color:#69726d; }
.editable-select-row { display:flex; align-items:center; }
.editable-select-search { margin-bottom:4px; }
.editable-select-remove { flex:none; border:0; background:transparent; color:#69726d; padding:6px 10px; }
.role-add { margin-top:6px; }
.role-dropdown summary { cursor:pointer; }
.role-menu { border:1px solid #d6dedb; border-radius:5px; padding:8px; margin-top:4px; background:#fff; }
.role-menu .role-custom-input { margin-top:0; }
.role-menu .role-list { margin-top:8px; }
.editable-select-toggle { position:absolute; top:1px; right:1px; bottom:1px; width:38px; border:0; border-left:1px solid #d6dedb; border-radius:0 5px 5px 0; background:#f7faf8; color:#245c49; }
.editable-select-toggle:hover { background:#eaf3ef; }
.editable-select-chevron { display:block; font-size:16px; line-height:1; }
.editable-select-menu { position:absolute; z-index:20; top:calc(100% + 4px); left:0; right:0; max-height:220px; overflow:auto; padding:4px; border:1px solid #b9c8c2; border-radius:6px; background:#fff; box-shadow:0 8px 24px #1d32252b; }
.editable-select-option { display:block; width:100%; padding:8px 10px; border:0; border-radius:4px; background:#fff; color:#24312b; font-size:13px; text-align:left; }
.editable-select-option:hover,.editable-select-option:focus { outline:0; background:#eaf3ef; }
.editable-select-empty { margin:0; padding:8px 10px; color:#69726d; font-size:13px; }
.required-label::after { content: ' *'; color: #b02a37; }
.preview-table { max-height: 360px; }
.preview-table table { min-width: 650px; }
.preview-options { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }
.preview-options label { display: flex; align-items: center; gap: 8px; }
.history-table { min-width: 620px; font-size: 14px; }
.login-page { min-height: 100dvh; display: grid; place-items: center; background: #f4f7f5; padding: 20px; }
.login-panel { width: min(420px,100%); padding: 32px; background: #fff; border: 1px solid #dce3de; border-radius: 6px; }
.login-panel h1 { font-size: 24px; margin-bottom: 28px; }
@media (max-width: 760px) {
  .app-header { padding: 14px 16px; align-items: flex-start; }
  .app-header h1 { font-size: 20px; max-width: 210px; }
  .header-account { gap: 5px; max-width: 140px; overflow-wrap: anywhere; }
  .workspace { padding: 16px; }
  .top-grid { grid-template-columns: 1fr; gap: 24px; }
  .image-frame { height: 180px; }
  .patch-section textarea { height: 155px; }
  .toolbar { gap: 7px; }
  .form-grid { grid-template-columns: 1fr; }
  .dialog-header,.dialog-body,.dialog-footer { padding: 14px; }
  .role-list { grid-template-columns: 1fr; }
  .login-panel { padding: 24px; }
}

/* Desktop maintenance workspace. */
:root { --ops-ink:#17283d; --ops-muted:#657286; --ops-line:#dce2e9; --ops-blue:#2456c7; }
body:not(.login-page) { background:#f4f5f7; color:var(--ops-ink); font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif; }
.app-header { background:#17283d; color:#fff; padding:18px 30px; border:0; min-height:92px; }
.brand-lockup { display:flex; align-items:center; gap:14px; }
.brand-mark { display:grid; place-items:center; width:42px; height:42px; font:700 24px ui-monospace,monospace; border:1px solid #7793b8; border-radius:8px; color:#afcaff; }
.app-header h1 { font-size:22px; letter-spacing:.02em; }
.app-header .eyebrow { color:#a9bcd8; margin-bottom:3px; font-size:10px; }
.app-header .btn { color:#dce6f5; border-color:#59718d; }
.workspace { max-width:1920px; margin:0 auto; padding:22px 28px 40px; }
.list-section { margin-top:0; }
.list-heading { margin-bottom:16px; }
.btn-primary { background:var(--ops-blue); border-color:var(--ops-blue); }
.btn-success { background:#1b6c55; border-color:#1b6c55; }
.btn { border-radius:6px; min-height:38px; font-size:14px; }
.toolbar { gap:8px; }
.eyebrow { font:600 11px/1.5 ui-monospace,monospace; letter-spacing:.14em; color:#6c7c91; margin:0 0 5px; }
.muted { color:var(--ops-muted); font-size:13px; }
.maintenance-heading { display:flex; justify-content:space-between; gap:20px; align-items:center; padding:16px 0 18px; }
.maintenance-heading h2 { font-size:25px; font-weight:650; margin-bottom:8px; }
.maintenance-heading p:last-child { margin:0; }
.batch-picker { width:230px; font-size:13px; min-height:38px; }
.status-strip { display:grid; grid-template-columns:repeat(9,minmax(88px,1fr)); gap:8px; margin:0 0 18px; }
.status-card { display:flex; flex-direction:column; align-items:flex-start; gap:8px; min-height:96px; padding:14px 13px; border:1px solid var(--ops-line); background:#fff; border-radius:7px; color:var(--ops-ink); text-align:left; }
.status-card strong { font:600 28px/1 ui-monospace,monospace; }
.status-label { font-size:12px; white-space:nowrap; }
.status-card:hover { border-color:#8da7d7; background:#fafcff; }
.status-card.selected { border-color:var(--ops-blue); box-shadow:inset 0 -3px 0 var(--ops-blue); }
.status-card.tone-progress strong { color:#19728b; }
.status-card.tone-warning strong { color:#92611a; }
.status-card.tone-success strong { color:#167050; }
.context-note { font-size:13px; border-left:3px solid #839ab9; background:#eaf0f7; padding:10px 13px; color:#475b76; margin-bottom:16px; }
.filter-bar { display:flex; gap:9px; padding:15px; background:#fff; border:1px solid var(--ops-line); border-radius:8px 8px 0 0; }
.filter-bar .form-control,.filter-bar .form-select { min-height:38px; font-size:13px; }
.filter-bar .search-input { min-width:220px; flex:2; }
.filter-bar .form-select { width:180px; min-width:130px; flex:1; }
.selection-bar { display:flex; align-items:center; gap:14px; min-height:53px; background:#fff; padding:8px 16px; border-left:1px solid var(--ops-line); border-right:1px solid var(--ops-line); }
.selection-count { font-size:12px; color:#3e5d89; border-left:1px solid var(--ops-line); padding-left:14px; }
.text-button,.name-button,.patch-button { background:none; border:0; color:var(--ops-blue); font-size:13px; padding:4px 2px; text-align:left; }
.text-button:hover,.name-button:hover,.patch-button:hover { text-decoration:underline; }
.text-button:disabled { opacity:.5; cursor:default; }
.name-button { font:600 13px ui-monospace,"Microsoft YaHei",monospace; }
.name-cell { display:flex; align-items:center; gap:6px; min-width:0; }
.name-cell .name-button { min-width:0; max-width:150px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.copy-name-button { flex:none; padding:3px 7px; border:1px solid #b8c5c0; border-radius:4px; background:#fff; color:#245c49; font-size:12px; line-height:1.2; }
.copy-name-button:hover { border-color:#245c49; background:#f3f8f6; }
.danger-text { color:#a63845; }
.column-settings { margin-left:auto; position:relative; font-size:13px; }
.column-settings summary { cursor:pointer; padding:6px 10px; color:#475c79; }
.column-menu { position:absolute; top:36px; right:0; width:210px; z-index:20; background:#fff; border:1px solid var(--ops-line); box-shadow:0 10px 28px #17283d1c; padding:12px; border-radius:8px; display:grid; gap:7px; }
.column-menu label { display:flex; align-items:center; gap:8px; }
.ops-table-frame { overflow:auto; border:1px solid var(--ops-line); border-radius:0 0 8px 8px; background:#fff; max-height:calc(100vh - 380px); min-height:190px; }
.ops-table { width:100%; border-collapse:separate; border-spacing:0; min-width:1120px; font-size:13px; }
.ops-table th { position:sticky; top:0; z-index:3; text-align:left; background:#e9edf3; color:#45566e; font-size:12px; font-weight:600; padding:12px; border-bottom:1px solid #ced7e2; white-space:nowrap; }
.ops-table td { padding:13px 12px; border-bottom:1px solid #e8ecf1; vertical-align:middle; background:#fff; max-width:280px; overflow-wrap:anywhere; }
.ops-table tbody tr:hover td { background:#e5f3e9; }
.ops-table .sticky-name { position:sticky; left:36px; z-index:2; min-width:220px; border-right:1px solid #e8ecf1; }
.ops-table th.sticky-name { z-index:4; }
.ops-table th:first-child,.ops-table td:first-child { position:sticky; left:0; z-index:2; width:36px; min-width:36px; padding-right:5px; }
.ops-table th:first-child { z-index:4; }
.ops-table .cell-serverIP { font-family:ui-monospace,monospace; white-space:nowrap; min-width:130px; }
.ops-table .cell-status { min-width:145px; }
.ops-table .cell-osPlatform { min-width:170px; max-width:210px; }
.ops-table .cell-patches { min-width:150px; max-width:260px; }
.ops-table .cell-serverRole { min-width:130px; }
.ops-table .cell-probe { min-width:125px; }
.ops-table .status-select { padding:6px 25px 6px 9px; font-size:12px; min-width:130px; border-radius:5px; }
.ops-table .row-actions { white-space:nowrap; min-width:130px; }
.ops-table .row-actions .text-button { margin-right:7px; }
.state-badge { display:inline-flex; padding:5px 9px; border-radius:4px; font-size:12px; }
.state-badge.tone-success,.status-select.tone-success { background-color:#edf7f1; color:#1a6b4e; border-color:#c6e3d2; }
.state-badge.tone-warning,.status-select.tone-warning { background-color:#fff8e9; color:#8b5c1a; border-color:#eddcb7; }
.state-badge.tone-progress,.status-select.tone-progress { background-color:#eaf5f8; color:#16677d; border-color:#b9dce6; }
.review-label,.verified-label { display:block; font-size:11px; line-height:1.5; margin-top:4px; }
.review-label { color:#946016; }
.verified-label { color:#227051; }
.workspace-empty { padding:50px; color:var(--ops-muted); text-align:center; font-size:14px; }
.reference-panel { margin-top:24px; background:#fff; padding:15px 18px; border:1px solid var(--ops-line); border-radius:8px; }
.topology-dialog { width:min(1500px,96vw); max-width:none; height:92vh; max-height:92vh; padding:0; }
.topology-toolbar { display:flex; align-items:center; gap:10px; padding:14px 20px 5px; }
.topology-toolbar .form-select { width:180px; }
.topology-summary { margin:5px 20px 10px; color:#526673; }
.topology-scroll { height:calc(100% - 145px); overflow:auto; margin:0 20px 20px; border:1px solid #cbd7e3; background-color:#fbfdff; background-image:linear-gradient(#e4ebf2 1px,transparent 1px),linear-gradient(90deg,#e4ebf2 1px,transparent 1px); background-size:40px 40px; }
.topology-canvas { padding:28px; min-width:850px; }
.topology-group { display:grid; grid-template-columns:340px minmax(350px,1fr); gap:130px; margin-bottom:36px; }
.topology-host-column { display:flex; align-items:center; position:relative; }
.topology-host-column:has(+ .topology-vms .topology-branch)::after { content:''; position:absolute; left:100%; width:65px; border-top:3px solid #397b6b; }
.topology-vms { display:flex; flex-direction:column; gap:14px; position:relative; }
.topology-vms:has(.topology-branch:nth-child(2))::before { content:''; position:absolute; left:-65px; top:43px; bottom:43px; border-left:3px solid #397b6b; }
.topology-branch { position:relative; min-height:86px; }
.topology-branch::before { content:''; position:absolute; left:-65px; width:65px; top:50%; border-top:3px solid #397b6b; }
.topology-branch::after { content:''; position:absolute; left:-11px; top:calc(50% - 7px); border-left:11px solid #397b6b; border-top:7px solid transparent; border-bottom:7px solid transparent; }
.topology-card { text-align:left; border:1px solid #8db8a8; border-radius:5px; display:flex; flex-direction:column; gap:5px; padding:12px 18px; width:100%; min-height:86px; background:#e8f4ef; color:#1f4439; }
.topology-card strong { font-size:19px; overflow-wrap:anywhere; }
.topology-card small, .topology-card span { font-size:13px; }
.topology-card:hover { box-shadow:0 0 0 3px #94c8b8; }
.topology-host { background:#253d4a; border-color:#253d4a; color:#fff; min-height:120px; justify-content:center; }
.topology-host small { color:#b8d9ce; }
.topology-no-vms { color:#526673; align-self:center; }
.topology-unmatched { background:#fff9e8; border:1px solid #e1c786; padding:18px; margin-top:20px; }
.topology-unmatched h3 { font-size:18px; }
.topology-unmatched-row { display:grid; grid-template-columns:minmax(250px,500px) 1fr; align-items:center; gap:20px; margin-top:10px; }
.topology-empty { padding:20px; color:#526673; }
.reference-panel>summary { font-size:13px; color:#526680; cursor:pointer; }
.reference-panel .top-grid { padding-top:18px; border:0; padding-bottom:0; }
.reference-panel h2 { font-size:16px; }
.data-tools { display:flex; justify-content:flex-end; margin:0 0 0 auto; font-size:13px; }
.data-tools summary { text-align:right; cursor:pointer; color:#657286; padding:6px 3px; }
.data-tools .button-group { padding:10px 0; justify-content:flex-end; }
.batch-targets { border:1px solid var(--ops-line); border-radius:6px; max-height:330px; overflow:auto; }
.batch-targets label { display:flex; gap:10px; align-items:center; padding:10px 12px; border-bottom:1px solid #edf0f4; font-size:13px; }
.batch-targets label small { color:var(--ops-muted); margin-left:auto; }
.batch-target-actions { display:flex; gap:15px; margin:12px 0; font-size:13px; align-items:center; }
.patch-diff { white-space:pre-wrap; max-height:180px; overflow:auto; font:12px/1.8 ui-monospace,"Microsoft YaHei",monospace; background:#f4f6f9; padding:12px; margin-top:15px; border-radius:6px; }
.check-label { display:flex; gap:8px; margin-top:14px; font-size:13px; align-items:flex-start; }
.check-label input { margin-top:3px; }
.asset-details { display:grid; grid-template-columns:140px 1fr; font-size:14px; gap:12px; }
.asset-details dt { color:var(--ops-muted); font-weight:500; }
.asset-details dd { white-space:pre-wrap; overflow-wrap:anywhere; margin:0; }
.details-dialog { margin-right:24px; width:min(660px,80vw); }
.detail-subheading { font-size:17px; border-top:1px solid var(--ops-line); padding-top:18px; margin-top:22px; }
.app-header { min-height:74px; padding-top:12px; padding-bottom:12px; }
.workspace { padding-top:16px; }
.workspace>.alert { padding:10px 14px; font-size:13px; margin-bottom:12px; }
.list-heading { margin-bottom:2px; }
.maintenance-heading { padding:12px 0 15px; }
.maintenance-heading h2 { font-size:23px; margin-bottom:4px; }
.status-card { min-height:80px; padding:11px 12px; gap:7px; }
.status-card strong { font-size:25px; }
.filter-bar { padding:10px 13px; }
.selection-bar { min-height:45px; }
.data-tools { display:block; position:relative; margin:0; }
.data-tools summary { padding:9px 7px; }
.data-tools>.button-group { position:absolute; right:0; top:37px; width:290px; padding:14px; z-index:30; background:#fff; border:1px solid var(--ops-line); border-radius:8px; box-shadow:0 10px 30px #17283d26; }
.ops-table .cell-location { min-width:70px; white-space:nowrap; }
.ops-table .sticky-name { min-width:220px; width:220px; max-width:220px; }
.ops-table .sticky-status { position:sticky; left:216px; z-index:2; border-right:1px solid #e8ecf1; }
.ops-table th.sticky-status { z-index:4; }
.ops-table .row-actions { position:sticky; right:0; z-index:2; border-left:1px solid #e8ecf1; }
.ops-table .actions-head { right:0; z-index:5; }
.observer-inline { margin:-4px 0 16px; }
.observer-bar { display:flex; align-items:center; justify-content:space-between; gap:12px; border:1px solid #dce4ed; background:#eef2f7; padding:10px 13px; border-radius:6px; }
.observer-status { display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:12px; }
.observer-status strong { font-size:12px; font-weight:600; }
.observer-status .muted { font-size:11px; }
.observer-dot { width:7px; height:7px; border-radius:50%; background:#8290a1; }
.observer-dot.online { background:#24865a; }
.observer-bar .btn { font-size:12px; min-height:30px; padding:5px 9px; }
.probe-recovered { color:#116d4c; font-size:12px; font-weight:600; }
.observer-error { color:#935e18; font-size:12px; margin:7px 0 0; }
.probe-event { padding:15px 0; border-bottom:1px solid var(--ops-line); position:relative; }
.probe-event p { margin:7px 0; font-size:14px; }
.probe-event .btn { position:absolute; right:0; top:20px; font-size:12px; }
.ops-table .cell-vmHostName { min-width:140px; }
:focus-visible { outline:3px solid #5b88de; outline-offset:3px; }
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { animation-duration:.01ms!important; transition-duration:.01ms!important; } }
