:root {
  --ink: #16212b;
  --muted: #6b7781;
  --line: #e5e9ec;
  --soft: #f5f7f7;
  --surface: #ffffff;
  --navy: #182b3a;
  --navy-2: #223d50;
  --mint: #2bb89a;
  --mint-soft: #e7f7f3;
  --orange: #ef9b45;
  --orange-soft: #fff4e8;
  --red: #d65c63;
  --shadow: 0 12px 36px rgba(22, 33, 43, .08);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--soft);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--soft); color: var(--ink); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 248px; flex: 0 0 248px; min-height: 100vh; padding: 28px 18px; background: var(--navy); color: #d9e7eb; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 12px 30px; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--mint); color: white; font-weight: 800; letter-spacing: 0; }
.brand strong { display: block; font-size: 15px; color: white; letter-spacing: 0; }
.brand small { color: #8fa8b3; font-size: 11px; }
.nav-label { padding: 0 12px 9px; color: #7e9aa5; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.nav { display: grid; gap: 5px; }
.nav a { padding: 11px 12px; border-radius: 7px; color: #b8ccd1; font-size: 14px; display: flex; align-items: center; gap: 10px; }
.nav a:hover, .nav a.active { background: var(--navy-2); color: white; }
.nav-icon { width: 18px; text-align: center; color: #7ea0aa; font-size: 12px; }
.nav a.active .nav-icon { color: var(--mint); }
.sidebar-foot { margin-top: auto; padding: 16px 12px 0; border-top: 1px solid rgba(255,255,255,.1); color: #90aab1; font-size: 12px; line-height: 1.65; }
.content { flex: 1; min-width: 0; }
.topbar { height: 76px; padding: 0 42px; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.topbar h1 { margin: 0; font-size: 20px; letter-spacing: 0; }
.topbar p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.user-menu { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--mint-soft); color: #168a74; font-weight: 700; }
.page { max-width: 1480px; padding: 32px 42px 60px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.page-head h2 { margin: 0; font-size: 26px; letter-spacing: 0; }
.page-head p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { border: 0; border-radius: 6px; padding: 10px 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; font-weight: 650; }
.btn-primary { color: white; background: var(--mint); }
.btn-primary:hover { background: #219c85; }
.btn-dark { color: white; background: var(--navy); }
.btn-quiet { color: var(--ink); background: white; border: 1px solid var(--line); }
.btn-danger { color: white; background: var(--red); }
.btn-small { padding: 7px 10px; font-size: 12px; }
.grid { display: grid; gap: 18px; }
.metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 22px; }
.metric { padding: 21px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 3px 12px rgba(22,33,43,.03); }
.metric-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 12px; }
.metric-icon { width: 28px; height: 28px; display: grid; place-items: center; color: var(--mint); background: var(--mint-soft); border-radius: 7px; font-weight: 800; }
.metric strong { display: block; margin-top: 13px; font-size: 27px; letter-spacing: 0; }
.metric small { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; }
.two-col { grid-template-columns: minmax(0, 1.3fr) minmax(330px, .7fr); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.panel-head { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.panel-head h3 { margin: 0; font-size: 15px; }
.panel-head span { color: var(--muted); font-size: 12px; }
.panel-body { padding: 20px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { background: #f8faf9; color: var(--muted); font-size: 11px; text-align: left; font-weight: 650; white-space: nowrap; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td strong { font-weight: 650; }
.muted { color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 5px; font-size: 11px; font-weight: 650; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-published, .status-success { color: #19866f; background: var(--mint-soft); }
.status-draft, .status-pending { color: #a7671f; background: var(--orange-soft); }
.status-offline, .status-failed { color: #b64d56; background: #fcecee; }
.status-active { color: #19866f; background: var(--mint-soft); }
.status-disabled { color: var(--muted); background: #edf0f1; }
.bar-chart { display: flex; align-items: end; gap: 12px; height: 154px; padding: 16px 8px 0; border-bottom: 1px solid var(--line); }
.bar-col { flex: 1; min-width: 18px; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: end; gap: 7px; }
.bar { width: 100%; max-width: 30px; height: var(--height); min-height: 4px; border-radius: 4px 4px 0 0; background: var(--mint); }
.bar-col:nth-child(even) .bar { background: var(--orange); }
.bar-col small { color: var(--muted); font-size: 10px; }
.empty { padding: 42px 20px; color: var(--muted); text-align: center; font-size: 13px; }
.filterbar { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.field { display: grid; gap: 7px; min-width: 0; }
.field label { color: var(--muted); font-size: 12px; font-weight: 650; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #d8e0e2; border-radius: 6px; padding: 10px 11px; color: var(--ink); background: white; outline: none; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--mint); box-shadow: 0 0 0 3px rgba(43,184,154,.12); }
.field textarea { min-height: 150px; resize: vertical; line-height: 1.6; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.span-2 { grid-column: span 2; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 8px; }
.notice { padding: 13px 15px; border-radius: 6px; font-size: 13px; line-height: 1.6; margin-bottom: 18px; }
.notice-error { color: #a33e49; background: #fcecee; border: 1px solid #f3cbd0; }
.notice-success { color: #176f5e; background: var(--mint-soft); border: 1px solid #bde8df; }
.notice-info { color: #6d5625; background: var(--orange-soft); border: 1px solid #f5d7b4; }
.secret-box { padding: 15px; background: #f6f8f8; border: 1px dashed #cbd6d8; border-radius: 6px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; word-break: break-all; }
.code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
.pill-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.pill-tabs a { border: 1px solid var(--line); padding: 7px 10px; border-radius: 5px; color: var(--muted); font-size: 12px; }
.pill-tabs a.active { color: var(--navy); border-color: var(--mint); background: var(--mint-soft); }
.login-page, .install-page { min-height: 100vh; display: grid; place-items: center; padding: 30px; background: var(--navy); }
.login-card, .install-card { width: min(100%, 980px); background: white; border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; }
.login-card { width: min(100%, 430px); padding: 34px; }
.login-brand { margin-bottom: 30px; }
.login-brand .brand-mark { margin-bottom: 18px; }
.login-brand h1 { margin: 0; font-size: 25px; }
.login-brand p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.login-card .field + .field { margin-top: 16px; }
.login-card .btn { width: 100%; margin-top: 22px; }
.install-head { padding: 30px 34px 25px; background: #f8fbfa; border-bottom: 1px solid var(--line); }
.install-head h1 { margin: 0; font-size: 24px; }
.install-head p { margin: 8px 0 0; color: var(--muted); }
.install-body { padding: 30px 34px; }
.install-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 30px; }
.steps { display: grid; gap: 12px; align-content: start; }
.step { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 13px; }
.step-number { width: 26px; height: 26px; flex: 0 0 26px; display: grid; place-items: center; border-radius: 50%; background: #e8eeee; color: var(--muted); font-size: 12px; font-weight: 700; }
.step.active .step-number { background: var(--mint); color: white; }
.step strong { display: block; color: var(--ink); margin-bottom: 2px; }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
.check-item { padding: 11px 13px; background: var(--soft); border-radius: 6px; font-size: 12px; display: flex; justify-content: space-between; gap: 10px; }
.check-ok { color: #18846f; }.check-bad { color: var(--red); }
.toast { position: fixed; right: 24px; bottom: 24px; padding: 12px 15px; color: white; background: var(--navy); border-radius: 6px; box-shadow: var(--shadow); font-size: 13px; display: none; }
@media (max-width: 1100px) { .sidebar { width: 214px; flex-basis: 214px; } .topbar, .page { padding-left: 26px; padding-right: 26px; } .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .two-col { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .app-shell { display: block; } .sidebar { min-height: auto; width: auto; padding: 14px; } .brand { padding: 0 4px 14px; } .nav-label, .sidebar-foot { display: none; } .nav { display: flex; overflow-x: auto; } .nav a { white-space: nowrap; } .topbar { height: auto; padding: 17px 18px; } .user-menu span { display: none; } .page { padding: 22px 18px 40px; } .page-head { align-items: flex-start; flex-direction: column; margin-bottom: 20px; } .page-head h2 { font-size: 22px; } .metric-grid { grid-template-columns: 1fr 1fr; gap: 10px; } .metric { padding: 15px; } .metric strong { font-size: 21px; } .metric-top { font-size: 11px; } .form-grid { grid-template-columns: 1fr; } .span-2 { grid-column: auto; } .panel-body { padding: 15px; } .install-layout { grid-template-columns: 1fr; gap: 20px; } .steps { grid-template-columns: repeat(3, 1fr); } .step { display: block; } .step-number { margin-bottom: 6px; } .check-grid { grid-template-columns: 1fr; } }
