:root {
  color-scheme: dark;
  --bg: #07111f;
  --panel: rgba(15, 29, 48, 0.82);
  --panel-strong: #101f34;
  --line: rgba(148, 178, 217, 0.16);
  --text: #f4f7fb;
  --muted: #91a2b9;
  --teal: #46dfba;
  --teal-dark: #0c755f;
  --blue: #63a5ff;
  --amber: #ffca72;
  --red: #ff7f83;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, rgba(41, 119, 177, 0.18), transparent 34%),
    linear-gradient(145deg, #07111f 0%, #091522 48%, #07101b 100%);
  color: var(--text);
  font-family: "Segoe UI", "Microsoft YaHei UI", system-ui, sans-serif;
  overflow-x: hidden;
}

button, a { font: inherit; }

.ambient {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  opacity: 0.22;
}

.ambient-one { width: 420px; height: 420px; background: #1e82a8; right: -180px; top: 22%; }
.ambient-two { width: 360px; height: 360px; background: #116b58; left: -190px; bottom: -100px; }

.shell { width: min(1220px, calc(100% - 40px)); margin: 0 auto; padding: 42px 0 30px; position: relative; }

.topbar { display: flex; justify-content: space-between; gap: 32px; align-items: flex-end; margin-bottom: 28px; }
.eyebrow { color: var(--teal); font-size: 12px; font-weight: 700; letter-spacing: 0.16em; display: flex; align-items: center; gap: 9px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 18px var(--teal); }
h1 { margin: 9px 0 6px; font-size: clamp(30px, 4vw, 46px); letter-spacing: -0.04em; }
.subtitle { margin: 0; color: var(--muted); font-size: 15px; }

.top-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.button { border: 1px solid var(--line); border-radius: 12px; min-height: 42px; padding: 0 17px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; color: var(--text); cursor: pointer; transition: 160ms ease; }
.button:hover { transform: translateY(-1px); border-color: rgba(99, 165, 255, 0.48); }
.button.primary { background: linear-gradient(135deg, #188a72, #136a82); border-color: rgba(70, 223, 186, 0.42); box-shadow: 0 10px 28px rgba(20, 122, 108, 0.24); }
.button.secondary { background: rgba(18, 34, 55, 0.75); }
.button:disabled { opacity: 0.58; cursor: wait; transform: none; }
.refresh-icon { font-size: 20px; line-height: 1; }
.spinning { animation: spin 0.8s linear infinite; }

.workspace-tabs { display: inline-flex; gap: 4px; margin-bottom: 18px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: rgba(8, 19, 32, 0.72); }
.workspace-tab { border: 0; border-radius: 8px; padding: 9px 16px; color: var(--muted); background: transparent; cursor: pointer; font-weight: 650; font-size: 13px; }
.workspace-tab.active { color: var(--text); background: #172a43; box-shadow: 0 5px 14px rgba(0, 0, 0, 0.18); }
.workspace-view { display: none; }
.workspace-view.active { display: block; }

.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.summary-card { min-height: 130px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: var(--shadow); backdrop-filter: blur(18px); display: flex; flex-direction: column; }
.summary-card strong { font-size: 34px; line-height: 1; margin: 13px 0 10px; letter-spacing: -0.04em; }
.summary-label { color: #bfd0e5; font-size: 13px; font-weight: 650; }
.summary-foot { color: var(--muted); font-size: 12px; margin-top: auto; }
.good-card strong { color: var(--teal); }
.warning-card strong { color: var(--amber); }

.notice { margin: 18px 0 30px; border: 1px solid rgba(255, 202, 114, 0.24); background: rgba(93, 65, 20, 0.22); border-radius: 15px; padding: 15px 18px; display: flex; gap: 13px; align-items: center; }
.notice-icon { width: 31px; height: 31px; flex: 0 0 31px; border-radius: 9px; display: grid; place-items: center; color: #30220c; background: var(--amber); font-weight: 900; }
.notice strong { font-size: 13px; }
.notice p { margin: 4px 0 0; color: #cdbf9f; font-size: 13px; }

.monitor-strip { margin: -14px 0 30px; padding: 14px 18px; border: 1px solid rgba(70, 223, 186, 0.18); border-radius: 15px; background: rgba(11, 48, 48, 0.28); display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.monitor-state { display: flex; align-items: center; gap: 12px; }
.monitor-state div { display: flex; flex-direction: column; gap: 3px; }
.monitor-state strong { font-size: 13px; }
.monitor-state span, .monitor-meta span { color: var(--muted); font-size: 11px; }
.monitor-pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 6px rgba(70, 223, 186, 0.08), 0 0 18px rgba(70, 223, 186, 0.7); }
.monitor-meta { text-align: right; display: flex; flex-direction: column; gap: 2px; }
.monitor-meta strong { color: var(--teal); font-size: 15px; }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.section-head h2 { margin: 0 0 5px; font-size: 22px; }
.section-head p, .legend { margin: 0; color: var(--muted); font-size: 12px; }
.legend { display: flex; align-items: center; gap: 7px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }

.node-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; min-height: 260px; }
.node-card { border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(155deg, rgba(18, 35, 57, 0.96), rgba(12, 24, 40, 0.9)); padding: 20px; box-shadow: var(--shadow); }
.node-card.is-error { border-color: rgba(255, 127, 131, 0.35); }
.node-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.node-title-row { display: flex; align-items: center; gap: 10px; }
.node-title-row h3 { margin: 0; font-size: 18px; }
.provider { display: inline-flex; border-radius: 7px; padding: 4px 8px; background: rgba(99, 165, 255, 0.12); color: #9bc5ff; font-size: 11px; font-weight: 700; }
.status-pill { border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.status-pill.ok { color: var(--teal); background: rgba(70, 223, 186, 0.1); }
.status-pill.error { color: var(--red); background: rgba(255, 127, 131, 0.1); }
.trust { margin: 8px 0 17px; color: var(--muted); font-size: 12px; }

.ip-box { display: grid; grid-template-columns: 1fr auto; gap: 15px; padding: 14px; border-radius: 13px; background: rgba(5, 13, 23, 0.55); border: 1px solid rgba(148, 178, 217, 0.1); }
.ip-label { display: block; color: var(--muted); font-size: 11px; margin-bottom: 5px; }
.ip-value { font-family: "Cascadia Mono", Consolas, monospace; font-size: 17px; letter-spacing: -0.02em; }
.port-block { text-align: right; }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 14px 0 10px; }
.metric { padding: 11px 12px; border-radius: 11px; background: rgba(8, 18, 31, 0.48); }
.metric span { display: block; color: var(--muted); font-size: 10px; margin-bottom: 5px; }
.metric strong { font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }

.history-row { min-height: 54px; margin-bottom: 12px; padding: 8px 11px; border: 1px solid rgba(148, 178, 217, 0.08); border-radius: 11px; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: rgba(5, 14, 24, 0.28); }
.history-label { display: flex; flex-direction: column; gap: 3px; min-width: 92px; }
.history-label span { color: #c8d5e5; font-size: 11px; }
.history-label small { color: var(--muted); font-size: 10px; }
.sparkline { width: 150px; height: 36px; overflow: visible; }
.sparkline .area { fill: rgba(70, 223, 186, 0.08); }
.sparkline .line { fill: none; stroke: var(--teal); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sparkline .baseline { stroke: rgba(148, 178, 217, 0.12); stroke-width: 1; }
.sparkline-empty { color: #647991; font-size: 10px; }
.expiry { color: var(--muted); font-size: 10px; margin-top: 4px; }
.history-warning { color: var(--amber); }

.asset-hero { padding: 25px 27px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(135deg, rgba(18, 40, 65, 0.94), rgba(10, 39, 45, 0.82)); display: flex; justify-content: space-between; align-items: center; gap: 24px; box-shadow: var(--shadow); }
.asset-hero h2 { margin: 7px 0 6px; font-size: 26px; }
.asset-hero p { margin: 0; color: var(--muted); font-size: 13px; }
.asset-counts { display: flex; gap: 10px; }
.asset-counts div { min-width: 82px; padding: 12px 14px; text-align: center; border: 1px solid rgba(148, 178, 217, 0.12); border-radius: 12px; background: rgba(5, 16, 27, 0.38); }
.asset-counts strong, .asset-counts span { display: block; }
.asset-counts strong { color: var(--teal); font-size: 22px; }
.asset-counts span { color: var(--muted); font-size: 10px; margin-top: 3px; }
.asset-toolbar { display: flex; gap: 10px; flex-wrap: wrap; }

.resource-overview { display: grid; grid-template-columns: 0.8fr 1.25fr 1.05fr; gap: 14px; margin-bottom: 14px; }
.resource-dashboard { position: relative; overflow: hidden; min-height: 226px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(145deg, rgba(16, 36, 59, 0.98), rgba(8, 24, 40, 0.94)); box-shadow: var(--shadow); }
.resource-dashboard::after { content: ''; position: absolute; right: -42px; bottom: -55px; width: 150px; height: 150px; border-radius: 50%; background: rgba(70, 223, 186, 0.045); }
.dashboard-head { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid rgba(148, 178, 217, 0.1); }
.dashboard-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; color: var(--teal); background: rgba(70, 223, 186, 0.09); font-size: 12px; font-weight: 800; }
.dashboard-head strong, .dashboard-head small { display: block; }
.dashboard-head strong { color: var(--text); font-size: 15px; }
.dashboard-head small { margin-top: 2px; color: #637c99; font-size: 8px; letter-spacing: 0.12em; }
.primary-metric { position: relative; z-index: 1; padding: 17px 0 16px; }
.primary-metric span, .primary-metric small { display: block; }
.primary-metric span { color: #9fb2c8; font-size: 10px; }
.primary-metric > strong { display: block; margin: 7px 0 4px; color: var(--teal); font-size: 39px; line-height: 0.95; }
.primary-metric small { color: var(--muted); font-size: 9px; }
.secondary-metrics { position: relative; z-index: 1; display: grid; overflow: hidden; border: 1px solid rgba(148, 178, 217, 0.1); border-radius: 11px; background: rgba(4, 14, 24, 0.35); }
.secondary-metrics.three-metrics { grid-template-columns: repeat(3, 1fr); }
.secondary-metrics.two-metrics { grid-template-columns: repeat(2, 1fr); }
.secondary-metrics > div { min-width: 0; padding: 10px; border-right: 1px solid rgba(148, 178, 217, 0.1); }
.secondary-metrics > div:last-child { border-right: 0; }
.secondary-metrics span, .secondary-metrics strong { display: block; }
.secondary-metrics span { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.secondary-metrics strong { margin-top: 5px; color: #d8e5f3; font-size: 18px; }
.secondary-metrics .warning-metric strong { color: var(--amber); }

.assignment-workbench, .inventory-panel, .workload-panel { border: 1px solid var(--line); border-radius: 17px; background: var(--panel); box-shadow: var(--shadow); padding: 20px; }
.assignment-workbench { margin-bottom: 14px; }
.assignment-inline { display: grid; grid-template-columns: 1.05fr 0.9fr 1.05fr 1.2fr auto; align-items: end; gap: 10px; }
.assignment-inline label { color: #b9c9db; font-size: 11px; }
.assignment-inline input, .assignment-inline select { width: 100%; height: 40px; margin-top: 6px; padding: 0 11px; border: 1px solid rgba(148, 178, 217, 0.18); border-radius: 9px; outline: none; color: var(--text); background: #0a1727; }
.assignment-inline input:focus, .assignment-inline select:focus { border-color: rgba(70, 223, 186, 0.58); box-shadow: 0 0 0 3px rgba(70, 223, 186, 0.07); }
.assignment-inline .button { height: 40px; white-space: nowrap; }

.insight-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 14px; margin-bottom: 14px; }
.pending-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pending-columns > div { min-width: 0; padding: 12px; border-radius: 12px; background: rgba(6, 17, 29, 0.4); }
.pending-columns h3 { margin: 0 0 9px; color: #aebfd2; font-size: 11px; }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; max-height: 126px; overflow-y: auto; }
.resource-chip { max-width: 100%; padding: 5px 8px; overflow: hidden; color: #c8d6e5; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; border: 1px solid rgba(148, 178, 217, 0.12); border-radius: 999px; background: rgba(18, 39, 64, 0.7); }
.empty-chip { color: var(--muted); font-size: 10px; }

.chart-legend { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 9px; }
.chart-legend span { width: 8px; height: 8px; border-radius: 3px; }
.account-legend { background: var(--teal); }
.ip-legend { margin-left: 5px; background: var(--blue); }
.workload-chart { display: grid; gap: 11px; }
.workload-row { display: grid; grid-template-columns: minmax(72px, 0.35fr) 1fr; align-items: center; gap: 12px; }
.workload-name { overflow: hidden; color: #c9d6e5; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.workload-bars { display: grid; gap: 5px; }
.bar-line { display: grid; grid-template-columns: 28px 1fr 22px; align-items: center; gap: 7px; }
.bar-line > span, .bar-line > strong { color: var(--muted); font-size: 9px; }
.bar-line > strong { color: #b9c9db; text-align: right; }
.bar-track { height: 7px; overflow: hidden; border-radius: 999px; background: rgba(148, 178, 217, 0.08); }
.bar-fill { display: block; width: var(--bar); min-width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #1eaa91, var(--teal)); }
.bar-fill.ip-bar { background: linear-gradient(90deg, #467fd8, var(--blue)); }

.asset-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; align-items: start; }
.asset-form { position: relative; padding: 20px; border: 1px solid var(--line); border-radius: 17px; background: var(--panel); box-shadow: var(--shadow); overflow: hidden; }
.form-number { position: absolute; right: 15px; top: 10px; color: rgba(99, 165, 255, 0.13); font-size: 42px; font-weight: 800; }
.asset-form h3 { margin: 0 0 5px; font-size: 17px; }
.asset-form > p { margin: 0 0 17px; color: var(--muted); font-size: 11px; min-height: 30px; }
.asset-form label { display: block; margin-bottom: 11px; color: #b9c9db; font-size: 11px; }
.asset-form input:not([type="checkbox"]), .asset-form select { width: 100%; height: 39px; margin-top: 6px; padding: 0 11px; border: 1px solid rgba(148, 178, 217, 0.18); border-radius: 9px; outline: none; color: var(--text); background: #0a1727; }
.asset-form input:focus, .asset-form select:focus { border-color: rgba(70, 223, 186, 0.58); box-shadow: 0 0 0 3px rgba(70, 223, 186, 0.07); }
.checkbox-label { display: flex !important; align-items: center; gap: 7px; }
.checkbox-label input { accent-color: var(--teal-dark); }
.form-submit { width: 100%; margin-top: 3px; }

.assignment-panel, .audit-panel { border: 1px solid var(--line); border-radius: 17px; background: var(--panel); box-shadow: var(--shadow); padding: 20px; margin-bottom: 14px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 15px; }
.panel-heading h2 { margin: 0 0 4px; font-size: 17px; }
.panel-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.rule-badge { color: var(--teal); background: rgba(70, 223, 186, 0.08); border-radius: 999px; padding: 6px 10px; font-size: 10px; font-weight: 700; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th { padding: 10px 12px; text-align: left; color: #758ba5; font-size: 10px; font-weight: 650; border-bottom: 1px solid var(--line); }
td { padding: 13px 12px; color: #c9d6e5; font-size: 12px; border-bottom: 1px solid rgba(148, 178, 217, 0.08); }
tbody tr:last-child td { border-bottom: 0; }
.empty-cell { text-align: center; color: var(--muted); padding: 30px; }
.inline-muted { color: var(--muted); font-size: 10px; display: block; margin-top: 3px; }
.importance { display: inline-flex; padding: 4px 7px; border-radius: 7px; font-size: 10px; }
.importance.important { color: var(--amber); background: rgba(255, 202, 114, 0.1); }
.importance.normal { color: #9bb0c8; background: rgba(148, 178, 217, 0.08); }
.unassigned { color: var(--amber); }
.danger-mini { border-color: rgba(255, 127, 131, 0.2); color: #ffaaaD; }
.row-actions { display: flex; gap: 6px; white-space: nowrap; }
.credential-button { border-color: rgba(70, 223, 186, 0.22); color: var(--teal); }
.audit-list { display: grid; gap: 8px; }
.audit-item { padding: 10px 12px; border-radius: 10px; background: rgba(7, 17, 29, 0.45); display: flex; justify-content: space-between; gap: 18px; }
.audit-item span { color: #c3d1e1; font-size: 11px; }
.audit-item time { color: var(--muted); font-size: 10px; white-space: nowrap; }
.empty-audit { color: var(--muted); font-size: 11px; padding: 12px 0; }

.employee-groups { display: grid; gap: 10px; }
.employee-group { overflow: hidden; border: 1px solid rgba(148, 178, 217, 0.12); border-radius: 13px; background: rgba(7, 17, 29, 0.42); }
.employee-group summary { display: grid; grid-template-columns: minmax(180px, 1.4fr) repeat(2, minmax(110px, 0.55fr)) auto; align-items: center; gap: 16px; padding: 15px 17px; cursor: pointer; list-style: none; user-select: none; }
.employee-group summary::-webkit-details-marker { display: none; }
.employee-group summary:hover { background: rgba(28, 53, 82, 0.34); }
.employee-name strong, .employee-name span { display: block; }
.employee-name strong { color: var(--text); font-size: 14px; }
.employee-name span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.employee-summary-stat { padding-left: 15px; border-left: 1px solid rgba(148, 178, 217, 0.12); }
.employee-summary-stat strong, .employee-summary-stat span { display: block; }
.employee-summary-stat strong { color: var(--teal); font-size: 18px; }
.employee-summary-stat span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.expand-cue { color: #9bb0c8; font-size: 11px; white-space: nowrap; }
.expand-cue::before { content: '展开'; }
.employee-group[open] .expand-cue::before { content: '收起'; }
.employee-group[open] .expand-cue::after { transform: rotate(180deg); }
.expand-cue::after { content: '⌄'; display: inline-block; margin-left: 6px; color: var(--teal); transition: transform 160ms ease; }
.employee-detail { padding: 0 12px 12px; border-top: 1px solid rgba(148, 178, 217, 0.1); }
.employee-detail table { min-width: 720px; }
.usage-count { display: inline-flex; margin-top: 4px; padding: 3px 7px; border-radius: 999px; color: var(--teal); background: rgba(70, 223, 186, 0.08); font-size: 9px; }
.legacy-account { color: var(--amber); }

.modal-shell { position: fixed; inset: 0; z-index: 50; display: flex; padding: 18px; background: rgba(2, 9, 16, 0.72); backdrop-filter: blur(7px); }
.modal-shell[hidden] { display: none; }
.modal-panel { color: var(--text); border: 1px solid rgba(148, 178, 217, 0.2); background: #0d1e31; box-shadow: 0 28px 90px rgba(0, 0, 0, 0.5); }
.drawer-panel { width: min(470px, 100%); height: 100%; margin-left: auto; padding: 25px; border-radius: 20px; animation: drawer-in 180ms ease-out; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 25px; }
.modal-head h2 { margin: 7px 0 0; font-size: 23px; }
.modal-close { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 10px; color: #b9c9db; background: rgba(20, 38, 62, 0.7); font-size: 22px; cursor: pointer; }
.modal-panel label { display: block; color: #b9c9db; font-size: 11px; }
.modal-panel textarea { width: 100%; margin-top: 8px; padding: 12px; resize: vertical; border: 1px solid rgba(148, 178, 217, 0.18); border-radius: 11px; outline: none; color: var(--text); background: #081624; line-height: 1.7; }
.drawer-form { display: grid; gap: 13px; }
.drawer-form label { min-width: 0; }
.modal-panel input, .modal-panel select { width: 100%; height: 42px; margin-top: 7px; padding: 0 11px; border: 1px solid rgba(148, 178, 217, 0.18); border-radius: 10px; outline: none; color: var(--text); background: #081624; }
.modal-panel input:focus, .modal-panel select:focus { border-color: rgba(70, 223, 186, 0.58); box-shadow: 0 0 0 3px rgba(70, 223, 186, 0.07); }
.form-pair { display: grid; grid-template-columns: 1fr 0.72fr; gap: 10px; }
.drawer-form .form-help { margin: 0 0 6px; }
.modal-panel textarea:focus { border-color: rgba(70, 223, 186, 0.58); box-shadow: 0 0 0 3px rgba(70, 223, 186, 0.07); }
.form-help { margin: 10px 0 22px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; }
.confirm-shell { align-items: center; justify-content: center; }
.confirm-panel { width: min(400px, 100%); padding: 27px; text-align: center; border-radius: 19px; }
.confirm-icon { display: grid; width: 44px; height: 44px; margin: 0 auto 14px; place-items: center; border-radius: 50%; color: var(--amber); background: rgba(255, 202, 114, 0.1); font-size: 20px; font-weight: 800; }
.confirm-panel h2 { margin: 0 0 8px; font-size: 20px; }
.confirm-panel p { margin: 0 0 22px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.confirm-panel .modal-actions { justify-content: center; }
.danger-button { border: 1px solid rgba(255, 127, 131, 0.25); color: #fff; background: #b64955; }

@keyframes drawer-in { from { transform: translateX(28px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.node-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 14px; }
.location { color: #b9c7d9; font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.card-actions { display: flex; gap: 7px; }
.mini-button { border: 1px solid var(--line); background: rgba(20, 38, 62, 0.7); color: #dce7f4; border-radius: 9px; padding: 7px 10px; font-size: 11px; cursor: pointer; text-decoration: none; }
.mini-button:hover { border-color: rgba(70, 223, 186, 0.38); }

.employee-shell { width: min(1120px, calc(100% - 40px)); }
.employee-topbar { align-items: center; }
.employee-summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.employee-notice { margin-top: 0; }
.employee-node-grid { display: grid; gap: 16px; }
.employee-node-card { overflow: hidden; border: 1px solid var(--line); border-radius: 19px; background: linear-gradient(155deg, rgba(18, 35, 57, 0.98), rgba(9, 23, 38, 0.94)); box-shadow: var(--shadow); }
.employee-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 22px 23px 17px; border-bottom: 1px solid rgba(148, 178, 217, 0.1); }
.employee-card-head h3 { margin: 5px 0 4px; font-size: 21px; }
.employee-card-head p { margin: 0; color: var(--muted); font-size: 11px; }
.employee-account-label { color: var(--teal); font-size: 9px; font-weight: 800; letter-spacing: 0.13em; }
.employee-card-body { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(220px, 0.5fr); gap: 14px; padding: 18px 23px; }
.proxy-credential-panel, .qr-panel { padding: 17px; border: 1px solid rgba(148, 178, 217, 0.12); border-radius: 14px; background: rgba(4, 14, 24, 0.42); }
.credential-title { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 13px; }
.credential-title strong, .credential-title span, .qr-panel > div:first-child strong, .qr-panel > div:first-child span { display: block; }
.credential-title strong, .qr-panel strong { font-size: 13px; }
.credential-title span, .qr-panel span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.credential-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.credential-list div { min-width: 0; padding: 10px 11px; border-radius: 10px; background: rgba(18, 39, 64, 0.58); }
.credential-list dt { color: var(--muted); font-size: 9px; }
.credential-list dd { margin: 5px 0 0; overflow-wrap: anywhere; color: #e4edf7; font-family: "Cascadia Mono", Consolas, monospace; font-size: 12px; }
.qr-panel { display: flex; flex-direction: column; align-items: stretch; text-align: center; }
.qr-frame { width: 154px; height: 154px; margin: 13px auto; padding: 7px; overflow: hidden; border-radius: 12px; background: #fff; }
.qr-frame img { display: block; width: 100%; height: 100%; object-fit: contain; }
.employee-card-foot { display: flex; justify-content: space-between; gap: 14px; padding: 12px 23px; border-top: 1px solid rgba(148, 178, 217, 0.1); color: var(--muted); font-size: 10px; }
.trust-badge { color: var(--amber); }
.login-state { display: inline-flex; align-items: center; gap: 6px; margin-top: 5px; color: var(--muted); font-size: 9px; }
.login-state.active { color: var(--teal); }
.login-state.disabled { color: var(--red); }
.credential-result { width: 100%; min-height: 170px; white-space: pre-wrap; }
.employee-login-admin { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 12px 0 0; padding: 12px; border-top: 1px solid rgba(148, 178, 217, 0.1); color: var(--muted); font-size: 10px; }

.loading-panel { grid-column: 1 / -1; min-height: 260px; border: 1px dashed rgba(148, 178, 217, 0.25); border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; color: var(--muted); }
.loading-panel strong { color: var(--text); }
.spinner { width: 30px; height: 30px; border-radius: 50%; border: 3px solid rgba(99, 165, 255, 0.18); border-top-color: var(--blue); animation: spin 0.8s linear infinite; margin-bottom: 6px; }

footer { display: flex; justify-content: space-between; gap: 20px; padding: 22px 2px 0; color: #667a94; font-size: 11px; }
.toast { position: fixed; right: 24px; bottom: 24px; transform: translateY(18px); opacity: 0; pointer-events: none; background: #162b45; color: #edf5ff; border: 1px solid var(--line); border-radius: 11px; padding: 11px 15px; box-shadow: var(--shadow); transition: 180ms ease; font-size: 13px; }
.toast.show { opacity: 1; transform: translateY(0); }

.login-body { display: grid; place-items: center; padding: 24px; }
.login-shell { position: relative; width: min(430px, 100%); }
.login-panel { padding: 34px; border: 1px solid var(--line); border-radius: 22px; background: rgba(13, 30, 49, 0.94); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.login-panel h1 { margin: 13px 0 7px; font-size: 32px; }
.login-panel > p { margin: 0 0 26px; color: var(--muted); font-size: 13px; }
.login-panel > small { display: block; margin-top: 20px; color: #667a94; font-size: 10px; text-align: center; }
.login-form { display: grid; gap: 15px; }
.login-form label { color: #b9c9db; font-size: 11px; }
.login-form input { width: 100%; height: 44px; margin-top: 7px; padding: 0 12px; border: 1px solid rgba(148, 178, 217, 0.18); border-radius: 10px; outline: none; color: var(--text); background: #081624; }
.login-form input:focus { border-color: rgba(70, 223, 186, 0.58); box-shadow: 0 0 0 3px rgba(70, 223, 186, 0.07); }
.login-form .button { width: 100%; margin-top: 4px; }
.login-error { min-height: 18px; color: var(--red); font-size: 11px; text-align: center; }

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .node-grid { grid-template-columns: 1fr; }
  .asset-form-grid { grid-template-columns: 1fr; }
  .resource-overview { grid-template-columns: 1fr 1fr; }
  .account-dashboard { grid-column: 1 / -1; }
  .assignment-inline { grid-template-columns: 1fr 1fr; }
  .assignment-inline .button { grid-column: 1 / -1; }
  .insight-grid { grid-template-columns: 1fr; }
  .employee-card-body { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .shell { width: min(100% - 24px, 1220px); padding-top: 26px; }
  .topbar, .section-head { align-items: flex-start; flex-direction: column; }
  .top-actions { width: 100%; justify-content: stretch; }
  .button { flex: 1; }
  .summary-grid { gap: 10px; }
  .summary-card { min-height: 116px; padding: 16px; }
  .summary-card strong { font-size: 29px; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .monitor-strip { align-items: flex-start; }
  .sparkline { width: 118px; }
  .asset-hero { align-items: flex-start; flex-direction: column; }
  .asset-toolbar { width: 100%; }
  .asset-toolbar .button { flex: 1; }
  .form-pair { grid-template-columns: 1fr; }
  .asset-counts { width: 100%; }
  .asset-counts div { flex: 1; min-width: 0; }
  .resource-overview { grid-template-columns: 1fr; }
  .account-dashboard { grid-column: auto; }
  .resource-dashboard { min-height: 210px; }
  .assignment-inline { grid-template-columns: 1fr; }
  .assignment-inline .button { grid-column: auto; }
  .pending-columns { grid-template-columns: 1fr; }
  .workload-row { grid-template-columns: 72px 1fr; }
  .employee-group summary { grid-template-columns: 1fr auto auto; gap: 10px; }
  .employee-summary-stat { padding-left: 10px; }
  .expand-cue { grid-column: 1 / -1; justify-self: end; }
  footer { flex-direction: column; }
  .employee-summary-grid { grid-template-columns: 1fr; }
  .employee-card-body { padding: 14px; }
  .credential-list { grid-template-columns: 1fr; }
  .employee-card-foot { flex-direction: column; }
}
