:root {
  color-scheme: dark;
  --bg: #08110f;
  --panel: #101c19;
  --panel-2: #15231f;
  --line: rgba(224, 242, 236, .11);
  --text: #ecf5f1;
  --muted: #91a59e;
  --mint: #75f0bc;
  --mint-2: #1ecb86;
  --red: #ff7e78;
  --amber: #f4c768;
  --blue: #79a9ff;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif; color: var(--text); background: radial-gradient(circle at 70% -15%, rgba(30, 203, 134, .16), transparent 38%), var(--bg); }
button, input { font: inherit; }
a { color: inherit; }
.muted { color: var(--muted); line-height: 1.7; }
.eyebrow { margin: 0 0 10px; color: var(--mint); font-size: 11px; font-weight: 800; letter-spacing: .18em; }
.brand-mark { display: grid; width: 52px; height: 52px; place-items: center; border: 1px solid rgba(117,240,188,.45); border-radius: 15px; background: linear-gradient(145deg, rgba(117,240,188,.18), rgba(30,203,134,.03)); color: var(--mint); font-weight: 900; letter-spacing: -.06em; box-shadow: inset 0 0 22px rgba(117,240,188,.08); }
.brand-mark.small { width: 34px; height: 34px; border-radius: 10px; font-size: 12px; }

.login-body { display: grid; place-items: center; padding: 28px; }
.login-shell { display: grid; grid-template-columns: 1fr 1fr; width: min(1040px, 100%); min-height: 560px; overflow: hidden; border: 1px solid var(--line); border-radius: 26px; background: rgba(16,28,25,.9); box-shadow: 0 30px 90px rgba(0,0,0,.36); backdrop-filter: blur(18px); }
.login-brand { display: flex; flex-direction: column; justify-content: center; padding: clamp(40px, 5.4vw, 66px); border-right: 1px solid var(--line); background: linear-gradient(150deg, rgba(117,240,188,.08), transparent 58%); }
.login-brand .brand-mark { margin-bottom: 42px; }
.login-brand h1 { margin: 0; font-size: clamp(40px, 4.2vw, 54px); font-weight: 800; line-height: 1.15; letter-spacing: -.035em; word-break: keep-all; }
.login-brand h1 span { display: block; white-space: nowrap; }
.login-brand .muted { max-width: 440px; }
.read-only-note { display: flex; align-items: center; gap: 10px; margin-top: 36px; color: #b8cbc4; font-size: 13px; }
.read-only-note span { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 5px rgba(117,240,188,.1); }
.login-card { display: flex; flex-direction: column; justify-content: center; padding: clamp(42px, 5vw, 64px); }
.login-card h2 { margin: 0; font-size: 32px; font-weight: 750; letter-spacing: -.025em; }
.login-card form { display: grid; gap: 18px; margin-top: 34px; }
label { display: grid; gap: 9px; color: #b9cac4; font-size: 13px; font-weight: 700; }
input { width: 100%; padding: 14px 15px; border: 1px solid var(--line); border-radius: 12px; outline: none; background: #0b1513; color: var(--text); transition: border-color .2s, box-shadow .2s; }
input:focus { border-color: var(--mint-2); box-shadow: 0 0 0 4px rgba(30,203,134,.12); }
button[type="submit"] { margin-top: 6px; padding: 14px 18px; border: 0; border-radius: 12px; background: var(--mint); color: #062015; font-weight: 900; cursor: pointer; }
.alert { margin-top: 22px; padding: 12px 14px; border: 1px solid rgba(255,126,120,.25); border-radius: 11px; background: rgba(255,126,120,.08); color: #ffaaa6; font-size: 13px; }
.form-foot { margin: 18px 0 0; text-align: center; color: #61756e; font-size: 12px; }

.topbar { position: sticky; z-index: 10; top: 0; display: flex; align-items: center; justify-content: space-between; height: 68px; padding: 0 max(24px, calc((100vw - 1180px) / 2)); border-bottom: 1px solid var(--line); background: rgba(8,17,15,.82); backdrop-filter: blur(20px); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 800; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.readonly-pill, .state-badge { border: 1px solid rgba(117,240,188,.18); border-radius: 999px; padding: 6px 9px; background: rgba(117,240,188,.06); color: var(--mint); font-size: 11px; font-weight: 800; }
.quiet-button { border: 1px solid var(--line); border-radius: 9px; padding: 8px 11px; background: transparent; color: #b8c8c2; cursor: pointer; }
.quiet-button:hover { border-color: rgba(117,240,188,.35); color: var(--mint); }
.quiet-button:disabled { opacity: .45; }
.top-actions form { margin: 0; }
.top-actions button[type="submit"] { margin: 0; }

.dashboard-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 48px 0 70px; }
.hero-panel { display: flex; align-items: flex-end; justify-content: space-between; min-height: 240px; padding: 44px; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(120deg, rgba(117,240,188,.11), transparent 48%), var(--panel); }
.hero-panel h1 { margin: 0; font-size: clamp(38px, 5vw, 62px); letter-spacing: -.055em; }
.health-score { text-align: right; }
.health-score strong { font-size: 66px; color: var(--mint); letter-spacing: -.07em; }
.health-score > span { color: var(--muted); font-size: 25px; }
.health-score small { display: block; margin-top: -5px; color: var(--muted); }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 12px 0; }
.metric { padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.metric span { display: block; margin-bottom: 16px; color: var(--muted); font-size: 12px; }
.metric strong { font-size: 30px; letter-spacing: -.04em; }
.metric small { margin-left: 5px; color: var(--muted); }
.content-grid { display: grid; grid-template-columns: 1.45fr .75fr; gap: 12px; }
.right-column { display: grid; align-content: start; gap: 12px; }
.panel { border: 1px solid var(--line); border-radius: 20px; background: var(--panel); overflow: hidden; }
.panel-title { display: flex; align-items: center; justify-content: space-between; padding: 26px 28px 18px; }
.panel-title h2 { margin: 0; font-size: 22px; letter-spacing: -.03em; }
.service-list { padding: 0 16px 16px; }
.service-row { display: grid; grid-template-columns: 11px 1fr auto; align-items: center; gap: 15px; padding: 15px 12px; border-top: 1px solid var(--line); }
.service-row > div, .site-row > div { display: grid; gap: 4px; }
.service-row small, .site-row small { color: var(--muted); }
.status-dot { width: 9px; height: 9px; border-radius: 50%; }
.status-dot.online { background: var(--mint); box-shadow: 0 0 0 5px rgba(117,240,188,.09); }
.status-dot.offline { background: var(--red); box-shadow: 0 0 0 5px rgba(255,126,120,.08); }
.state-badge.offline { border-color: rgba(255,126,120,.2); background: rgba(255,126,120,.07); color: var(--red); }
.state-badge.warning { border-color: rgba(244,199,104,.2); background: rgba(244,199,104,.07); color: var(--amber); }
.state-badge.planned { border-color: rgba(121,169,255,.2); background: rgba(121,169,255,.07); color: var(--blue); }
.site-list { padding: 0 18px 18px; }
.site-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 10px; border-top: 1px solid var(--line); }
.quick-links { display: grid; padding: 0 18px 18px; }
.quick-links a { display: flex; justify-content: space-between; padding: 15px 10px; border-top: 1px solid var(--line); text-decoration: none; }
.quick-links a:hover { color: var(--mint); }
.quick-links b { color: var(--mint); font-size: 12px; }

@media (max-width: 780px) {
  .login-body { padding: 0; }
  .login-shell { display: block; min-height: 100vh; border: 0; border-radius: 0; }
  .login-brand { padding: 42px 28px 34px; border-right: 0; border-bottom: 1px solid var(--line); }
  .login-brand .brand-mark { margin-bottom: 34px; }
  .login-brand h1 { font-size: clamp(36px, 11vw, 46px); }
  .login-brand h1 span { white-space: normal; }
  .read-only-note { margin-top: 26px; }
  .login-card { padding: 36px 28px 48px; }
  .topbar { padding: 0 18px; }
  .brand > span:last-child { display: none; }
  .dashboard-shell { width: min(100% - 24px, 620px); padding-top: 22px; }
  .hero-panel { align-items: flex-start; min-height: 220px; padding: 28px 24px; }
  .health-score strong { font-size: 48px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .content-grid { grid-template-columns: 1fr; }
  .service-row { grid-template-columns: 9px 1fr; }
  .service-row .state-badge { display: none; }
}
