:root {
  --bg: #141313;
  --bg-deep: #0e0e0e;
  --side: #181717;
  --panel: #1c1b1b;
  --panel-high: #242323;
  --panel-soft: #201f1f;
  --line: rgba(255,255,255,.075);
  --line-soft: rgba(255,255,255,.045);
  --text: #e5e2e1;
  --title: #f1eee8;
  --muted: #8d8d88;
  --muted-2: #5f605b;
  --ivory: #f1eee8;
  --green: #42c58a;
  --amber: #d7a047;
  --red: #e58c86;
  --blue: #b1cad7;
  --radius: 6px;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
.material-symbols-outlined { font-size: 20px; font-variation-settings: 'FILL' 0, 'wght' 350, 'GRAD' 0, 'opsz' 24; }
.app-shell { display: grid; grid-template-columns: 150px minmax(0, 1fr); min-height: 100vh; background: var(--bg); transition: grid-template-columns .18s ease; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 14px 8px; background: #181717; border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 5; transition: padding .18s ease; }
.sidebar-head { display: flex; justify-content: flex-end; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-logo { width: 34px; height: 34px; border-radius: 6px; display: block; }
.brand strong { display: block; color: var(--title); font-size: 15px; font-weight: 800; letter-spacing: .08em; white-space: nowrap; }
.brand em { display: block; margin-top: 5px; font-style: normal; color: #777a76; font-size: 8px; font-weight: 700; letter-spacing: .12em; white-space: nowrap; }
.sidebar-toggle { width: 30px; height: 30px; display: grid; place-items: center; color: var(--muted); background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 5px; cursor: pointer; transition: .15s ease; }
.sidebar-toggle:hover { color: var(--title); background: rgba(255,255,255,.07); }
.sidebar-toggle .material-symbols-outlined { font-size: 18px; }
.nav { display: flex; flex-direction: column; gap: 5px; }
.nav-item { min-height: 42px; display: flex; align-items: center; gap: 9px; padding: 0 9px; border-radius: 4px; color: #777974; transition: .15s ease; overflow: hidden; }
.nav-item b { font-size: 13px; font-weight: 500; letter-spacing: .02em; white-space: nowrap; }
.nav-item:hover { color: var(--title); background: rgba(255,255,255,.04); }
.nav-item.active { color: #1a1c19; background: var(--ivory); }
.nav-item.active .material-symbols-outlined { font-variation-settings: 'FILL' 1, 'wght' 420, 'GRAD' 0, 'opsz' 24; }
.user-card { margin-top: auto; display: grid; grid-template-columns: 36px 1fr 24px; align-items: center; gap: 11px; padding: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 7px; min-width: 0; }
.avatar { width: 36px; height: 36px; border-radius: 999px; background: linear-gradient(135deg,#2f2f2e,#70706b); }
.user-card strong { display: block; color: var(--title); font-size: 12px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card span { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; }
.logout-link { color: var(--muted); display: grid; place-items: center; }
html.sidebar-collapsed .app-shell { grid-template-columns: 56px minmax(0, 1fr); }
html.sidebar-collapsed .sidebar { padding: 14px 8px; }
html.sidebar-collapsed .sidebar-head { justify-content: center; padding-bottom: 14px; }
html.sidebar-collapsed .brand { justify-content: center; }
html.sidebar-collapsed .brand span,
html.sidebar-collapsed .nav-item b,
html.sidebar-collapsed .user-card > div:not(.avatar) { display: none; }
html.sidebar-collapsed .sidebar-toggle .material-symbols-outlined { transform: rotate(180deg); }
html.sidebar-collapsed .nav-item { justify-content: center; padding: 0; gap: 0; }
html.sidebar-collapsed .user-card { grid-template-columns: 1fr; justify-items: center; padding: 10px 0; gap: 10px; }
html.sidebar-collapsed .avatar { width: 30px; height: 30px; }
.main { min-width: 0; background: #141313; }
.main.is-navigating .content { opacity: .92; }
.topbar { height: 72px; display: flex; align-items: center; gap: 28px; padding: 0 32px; background: rgba(20,19,19,.86); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 3; }
.page-title span { display: block; color: var(--muted); font-size: 10px; letter-spacing: .22em; font-weight: 700; }
.page-title h1 { margin: 7px 0 0; color: var(--title); font-size: 20px; font-weight: 700; letter-spacing: .02em; }
.top-metrics { margin-left: auto; display: flex; gap: 26px; align-items: center; color: var(--muted); font-size: 12px; white-space: nowrap; }
.top-metrics b { color: var(--title); font-weight: 650; margin-left: 5px; }
.content { padding: 28px 32px 40px; }
.grid-3 { display: grid; grid-template-columns: 340px minmax(0,1fr) 310px; gap: 22px; align-items: start; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 22px; align-items: start; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 22px; }
.panel, .metric-card, .table-panel, .gallery-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.metric-card { padding: 18px; min-height: 96px; }
.metric-card span, .label { display: block; color: var(--muted); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 650; }
.metric-card b { display: block; color: var(--title); font-size: 27px; font-weight: 650; margin-top: 18px; }
.panel-head { padding: 18px 20px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.panel-head span { color: var(--title); font-size: 14px; font-weight: 650; }
.panel-head small { color: var(--muted); font-size: 11px; }
.panel-body { padding: 20px; }
textarea.quiet-input { min-height: 180px; resize: vertical; }
.quiet-input, .toolbar input, .toolbar select, .login-card input { width: 100%; background: #151414; border: 1px solid var(--line); color: var(--text); border-radius: 5px; outline: none; padding: 13px 14px; }
.quiet-input:focus, .toolbar input:focus, .toolbar select:focus, .login-card input:focus { border-color: rgba(241,238,232,.35); }
.field { display: block; margin-bottom: 17px; }
.field > span { display: block; color: var(--muted); font-size: 11px; letter-spacing: .14em; font-weight: 650; margin-bottom: 9px; text-transform: uppercase; }
.button-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.primary-button, .quiet-button, .danger-button { border: 0; border-radius: 5px; height: 42px; padding: 0 16px; cursor: pointer; transition: .15s ease; }
.primary-button { background: var(--ivory); color: #1a1c19; font-weight: 700; }
.quiet-button { background: rgba(255,255,255,.05); color: var(--text); border: 1px solid var(--line); }
.danger-button { background: rgba(229,140,134,.12); color: var(--red); border: 1px solid rgba(229,140,134,.22); }
.primary-button:hover, .quiet-button:hover { filter: brightness(1.08); }
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 15px 0; }
.step { min-height: 74px; display: grid; place-items: center; text-align: center; color: var(--muted); background: rgba(255,255,255,.03); border-radius: 5px; }
.step.done { color: var(--green); }
.step.active { color: var(--title); background: rgba(241,238,232,.09); }
.step span { display: block; font-size: 10px; margin-top: 6px; }
.status { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 4px; font-size: 11px; font-weight: 650; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.status.completed, .status.online { color: var(--green); background: rgba(66,197,138,.09); border-color: rgba(66,197,138,.2); }
.status.generating, .status.busy, .status.assigned { color: var(--blue); background: rgba(177,202,215,.09); border-color: rgba(177,202,215,.2); }
.status.queued { color: var(--amber); background: rgba(215,160,71,.09); border-color: rgba(215,160,71,.2); }
.status.failed, .status.offline { color: var(--red); background: rgba(229,140,134,.09); border-color: rgba(229,140,134,.2); }
.status.login-status { cursor: pointer; border-radius: 4px; }
.status.login-status:hover { filter: brightness(1.18); }
.toolbar { display: grid; grid-template-columns: 1fr 160px 160px auto; gap: 10px; margin-bottom: 14px; }
.table-wrap { overflow: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); }
.data-table { width: 100%; border-collapse: collapse; min-width: 900px; }
.data-table th { color: var(--muted); text-align: left; font-size: 10px; letter-spacing: .14em; font-weight: 700; text-transform: uppercase; padding: 14px 16px; background: #171616; }
.data-table td { padding: 15px 16px; border-top: 1px solid var(--line-soft); color: #c8c6c2; font-size: 13px; vertical-align: middle; }
.data-table strong { color: var(--title); font-weight: 650; }
.empty-cell { height: 120px; text-align: center; color: var(--muted) !important; }
.node-list-panel .data-table { min-width: 1160px; }
.node-row { cursor: pointer; transition: background .14s ease; }
.node-row:hover, .node-row:focus { background: rgba(255,255,255,.035); outline: 0; }
.node-row.is-selected { background: rgba(241,238,232,.07); }
.node-name-cell { display: inline-flex; align-items: center; gap: 8px; max-width: 210px; }
.node-name-cell > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-button { width: 26px; height: 26px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 4px; background: rgba(255,255,255,.04); color: var(--muted); cursor: pointer; flex: 0 0 auto; }
.icon-button:hover { color: var(--title); background: rgba(255,255,255,.075); }
.icon-button .material-symbols-outlined { font-size: 15px; }
.inline-name-input { width: 150px; height: 30px; padding: 0 9px; border: 1px solid rgba(241,238,232,.28); border-radius: 4px; outline: 0; background: #121111; color: var(--title); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.detail-list { display: grid; gap: 12px; }
.detail-list div { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); color: var(--muted); font-size: 12px; }
.detail-list strong { color: var(--title); font-weight: 600; text-align: right; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.gallery-card { overflow: hidden; }
.gallery-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: #0b0b0b; }
.gallery-card div, .gallery-card p, .gallery-card small { margin: 14px 15px; }
.gallery-card div { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.gallery-card p { color: #bbb8b2; font-size: 13px; line-height: 1.5; }
.gallery-card small { display: block; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 22px; }
.settings-list { display: grid; gap: 0; }
.settings-list div { display: flex; justify-content: space-between; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line-soft); color: var(--muted); }
.settings-list div:last-child { border-bottom: 0; }
.settings-list strong { color: var(--title); text-align: right; font-weight: 600; }
.node-health { height: 7px; background: rgba(255,255,255,.06); border-radius: 999px; overflow: hidden; }
.node-health i { display: block; height: 100%; background: var(--ivory); }
.detail-list .node-health { display: block; padding: 0; border: 0; }
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.24); opacity: 0; pointer-events: none; transition: opacity .18s ease; z-index: 20; }
.node-drawer, .node-login-drawer { position: fixed; top: 0; right: 0; width: min(390px, calc(100vw - 72px)); height: 100vh; background: #181717; border-left: 1px solid var(--line); box-shadow: -22px 0 60px rgba(0,0,0,.32); transform: translateX(102%); transition: transform .22s ease; z-index: 21; display: flex; flex-direction: column; }
.node-login-drawer { width: min(520px, calc(100vw - 72px)); z-index: 22; }
.node-drawer.is-open, .node-login-drawer.is-open { transform: translateX(0); }
.drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }
.drawer-head { min-height: 102px; padding: 22px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 8px 0 7px; color: var(--title); font-size: 20px; font-weight: 700; }
.drawer-head p { margin: 0; color: var(--muted); font-size: 12px; }
.drawer-body { padding: 22px; overflow: auto; }
.node-login-form { display: flex; flex-direction: column; gap: 18px; }
.session-input { min-height: 220px; resize: vertical; line-height: 1.55; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.center-action { display: flex; justify-content: center; }
.center-action .primary-button { min-width: 138px; }
.node-login-log { min-height: 160px; white-space: pre-wrap; overflow: auto; padding: 14px; border: 1px solid var(--line); border-radius: 5px; background: #121111; color: #bcb9b2; font: 12px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.login-page { min-height: 100vh; background: #111010; }
.login-stage { min-height: 100vh; display: grid; grid-template-columns: minmax(520px, 1fr) 420px; }
.login-brief { padding: 44px 54px; display: flex; flex-direction: column; justify-content: space-between; background:
  linear-gradient(90deg, rgba(20,19,19,.98), rgba(20,19,19,.82)),
  radial-gradient(circle at 18% 18%, rgba(241,238,232,.08), transparent 30%),
  #141313; }
.login-brand { display: flex; align-items: center; gap: 13px; }
.login-brand img { width: 38px; height: 38px; border-radius: 6px; }
.login-brand strong { display:block; color: var(--title); font-size: 17px; letter-spacing: .08em; }
.login-brand span { color: var(--muted); font-size: 9px; letter-spacing: .18em; }
.login-copy { max-width: 680px; }
.login-copy p { color: var(--muted); font-size: 11px; letter-spacing: .22em; font-weight: 700; margin: 0 0 18px; }
.login-copy h1 { color: var(--title); font-size: 52px; line-height: 1.08; max-width: 680px; font-weight: 700; margin: 0; letter-spacing: -.02em; }
.login-copy > span { display: block; color: #a4a29c; font-size: 15px; line-height: 1.8; margin-top: 22px; max-width: 520px; }
.login-signal { display: grid; grid-template-columns: repeat(3, minmax(0, 148px)); gap: 12px; }
.login-signal div { border: 1px solid var(--line); background: rgba(255,255,255,.035); border-radius: 6px; padding: 14px 15px; }
.login-signal span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 14px; }
.login-signal b { color: var(--title); font-size: 22px; font-weight: 650; }
.login-panel { display: grid; place-items: center; padding: 34px; background: #0f0f0f; border-left: 1px solid var(--line); }
.login-card { width: 100%; display: grid; gap: 18px; border: 1px solid var(--line); background: rgba(255,255,255,.025); border-radius: 8px; padding: 24px; }
.login-card-head { padding-bottom: 6px; }
.login-card h2 { color: var(--title); margin: 10px 0 8px; font-size: 25px; }
.login-card p { color: var(--muted); margin: 0; font-size: 13px; }
.login-card label span { display:block; color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.form-error { color: var(--red); background: rgba(229,140,134,.1); border: 1px solid rgba(229,140,134,.2); padding: 11px 12px; border-radius: 5px; font-size: 13px; }
.login-note { font-size: 12px; }
@media (max-width: 1100px) { .grid-3, .grid-2, .settings-grid { grid-template-columns: 1fr; } .metrics-grid { grid-template-columns: repeat(2,1fr); } .gallery { grid-template-columns: repeat(2,1fr); } .top-metrics { display:none; } }
@media (max-width: 760px) { .app-shell { grid-template-columns: 1fr; } .sidebar { position: static; height: auto; } .nav { display:grid; grid-template-columns: repeat(2,1fr); } .content, .topbar { padding-left: 18px; padding-right: 18px; } .toolbar { grid-template-columns: 1fr; } .gallery, .metrics-grid { grid-template-columns: 1fr; } .login-stage { grid-template-columns: 1fr; } .login-brief { min-height: 48vh; padding: 32px 24px; } .login-copy h1 { font-size: 36px; } .login-signal { grid-template-columns: 1fr; } .login-panel { border-left:0; padding: 24px; } }
