* { box-sizing: border-box; }

:root {
  --bg: #0b1220;
  --bg-soft: #111a2c;
  --panel: #16203a;
  --panel-2: #1c2745;
  --line: #263353;
  --text: #e8eefc;
  --muted: #97a5c4;
  --brand: #4f8cff;
  --brand-2: #22d3a6;
  --warn: #f5a623;
  --danger: #ff5d5d;
  --ok: #22d3a6;
  --radius: 14px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --font: "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
}

html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(1200px 600px at 15% -10%, #1b2b52 0%, transparent 60%),
              radial-gradient(900px 500px at 95% 0%, #123c34 0%, transparent 55%),
              var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }

/* ---------- 产品门户 ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0; position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(10px);
  background: linear-gradient(180deg, rgba(11, 18, 32, 0.92), rgba(11, 18, 32, 0.55));
  border-bottom: 1px solid rgba(38, 51, 83, 0.6);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: 0.02em; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: grid; place-items: center; font-size: 15px; color: #04111f; font-weight: 800;
}
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--muted); font-size: 14px; }
.nav a:hover { color: var(--text); text-decoration: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); font-size: 14px; font-family: inherit;
  cursor: pointer; transition: transform 0.05s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: var(--panel-2); border-color: #33436b; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(135deg, var(--brand), #3f74e0); border-color: transparent; color: #fff; font-weight: 600; }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn.danger { border-color: #5a2a2a; color: #ffb4b4; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.hero { padding: 72px 0 40px; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 42px; align-items: center; }
.hero h1 { font-size: 42px; line-height: 1.22; margin: 0 0 18px; letter-spacing: -0.01em; }
.hero h1 .accent { background: linear-gradient(120deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { color: var(--muted); font-size: 17px; margin: 0 0 26px; max-width: 560px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.badge-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.pill { border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; color: var(--muted); background: rgba(22, 32, 58, 0.7); }
.pill strong { color: var(--text); }

.hero-card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: var(--shadow); }
.hero-card h3 { margin: 0 0 6px; font-size: 15px; color: var(--muted); font-weight: 500; }
.hero-card .big { font-size: 34px; font-weight: 700; margin: 0 0 4px; }
.hero-card .sub { color: var(--muted); font-size: 13px; }
.metric-list { display: grid; gap: 12px; margin-top: 18px; }
.metric-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; background: var(--bg-soft); border-radius: 10px; border: 1px solid rgba(38, 51, 83, 0.7); }
.metric-row .k { color: var(--muted); font-size: 13px; }
.metric-row .v { font-weight: 600; }

.section { padding: 56px 0; border-top: 1px solid rgba(38, 51, 83, 0.5); }
.section h2 { font-size: 27px; margin: 0 0 10px; }
.section .section-sub { color: var(--muted); margin: 0 0 28px; max-width: 720px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card h3 { margin: 0 0 8px; font-size: 17px; }
.card p { color: var(--muted); margin: 0; font-size: 14px; }
.card .num { color: var(--brand-2); font-weight: 700; font-size: 13px; letter-spacing: 0.08em; }

.price-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.price-card.featured { border-color: #37538f; box-shadow: 0 0 0 1px rgba(79, 140, 255, 0.35), var(--shadow); }
.price-card .tier { font-size: 14px; color: var(--muted); }
.price-card .price { font-size: 32px; font-weight: 700; }
.price-card .price span { font-size: 13px; color: var(--muted); font-weight: 400; }
.price-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; color: var(--muted); font-size: 14px; }
.price-card li::before { content: "✓"; color: var(--brand-2); margin-right: 8px; }
.price-card .btn { margin-top: auto; }

table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { text-align: left; padding: 10px 12px; border-bottom: 1px solid rgba(38, 51, 83, 0.7); }
table.data th { color: var(--muted); font-weight: 500; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.05em; }
table.data tbody tr:hover { background: rgba(28, 39, 69, 0.6); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }

.demo-note { background: rgba(245, 166, 35, 0.1); border: 1px solid rgba(245, 166, 35, 0.35); color: #ffd79a; border-radius: 12px; padding: 14px 18px; font-size: 13.5px; }

/* ---------- 登录页 ---------- */
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 32px; }
.auth-card { width: min(420px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 30px; box-shadow: var(--shadow); }
.auth-card h1 { margin: 0 0 6px; font-size: 22px; }
.auth-card .muted { color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field label { font-size: 13px; color: var(--muted); }
input[type="text"], input[type="password"], input[type="email"], input[type="number"], input[type="file"], select, textarea {
  width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg-soft); color: var(--text); font-family: inherit; font-size: 14.5px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(79, 140, 255, 0.45); outline-offset: 1px; }
.form-error { color: #ffb4b4; font-size: 13.5px; min-height: 20px; margin: 6px 0 0; }
.demo-box { margin-top: 20px; border-top: 1px dashed var(--line); padding-top: 16px; font-size: 13px; color: var(--muted); }
.demo-box code { color: var(--text); }

/* ---------- 控制台 ---------- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar { background: rgba(17, 26, 44, 0.9); border-right: 1px solid var(--line); padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand { padding: 0 8px 18px; }
.sidebar nav { display: grid; gap: 4px; }
.sidebar nav a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  color: var(--muted); font-size: 14px;
}
.sidebar nav a:hover { background: var(--panel); color: var(--text); text-decoration: none; }
.sidebar nav a.active { background: linear-gradient(135deg, rgba(79, 140, 255, 0.22), rgba(34, 211, 166, 0.14)); color: var(--text); border: 1px solid #2d4272; }
.sidebar .who { margin-top: 18px; padding: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.sidebar .who strong { color: var(--text); display: block; font-size: 13.5px; }

.main { padding: 22px 26px 60px; min-width: 0; }
.topline { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.topline h1 { font-size: 22px; margin: 0; }
.topline .actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.banner-demo {
  background: linear-gradient(90deg, rgba(245, 166, 35, 0.16), rgba(245, 166, 35, 0.04));
  border: 1px solid rgba(245, 166, 35, 0.4); color: #ffd79a;
  padding: 9px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 16px;
}

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 15px 16px; }
.stat .label { color: var(--muted); font-size: 12.5px; margin-bottom: 6px; }
.stat .value { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .hint { color: var(--muted); font-size: 12px; margin-top: 4px; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.panel h2 { font-size: 16px; margin: 0 0 4px; }
.panel .panel-sub { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }

.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
.split-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.bar-row { display: grid; grid-template-columns: 150px 1fr 96px; gap: 12px; align-items: center; margin-bottom: 9px; font-size: 13.5px; }
.bar-track { height: 9px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; border: 1px solid rgba(38, 51, 83, 0.7); }
.bar-fill { height: 100%; width: var(--pct, 0%); background: linear-gradient(90deg, var(--brand), var(--brand-2)); border-radius: 999px; }
.bar-fill.warn { background: linear-gradient(90deg, #f5a623, #ff7a45); }
.bar-fill.danger { background: linear-gradient(90deg, #ff7a45, #ff5d5d); }
.bar-value { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; border: 1px solid var(--line); color: var(--muted); }
.tag.ok { color: #8ff0d3; border-color: rgba(34, 211, 166, 0.4); background: rgba(34, 211, 166, 0.1); }
.tag.warn { color: #ffd79a; border-color: rgba(245, 166, 35, 0.4); background: rgba(245, 166, 35, 0.1); }
.tag.danger { color: #ffb4b4; border-color: rgba(255, 93, 93, 0.4); background: rgba(255, 93, 93, 0.1); }
.tag.info { color: #b9d0ff; border-color: rgba(79, 140, 255, 0.4); background: rgba(79, 140, 255, 0.12); }

.chart { width: 100%; overflow: visible; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .grid-line { stroke: rgba(38, 51, 83, 0.9); stroke-width: 1; }
.chart .axis-line { stroke: #33436b; stroke-width: 1; }
.chart .line-cost { fill: none; stroke: var(--brand); stroke-width: 2.2; stroke-linejoin: round; }
.chart .line-fitted { fill: none; stroke: var(--brand-2); stroke-width: 1.6; stroke-dasharray: 4 4; }
.chart .band { fill: rgba(79, 140, 255, 0.14); stroke: none; }
.chart .bar { fill: rgba(79, 140, 255, 0.55); }
.chart .bar:hover { fill: rgba(79, 140, 255, 0.85); }
.chart .dot-anomaly { fill: var(--warn); stroke: #2a1c05; stroke-width: 1; }

.empty { color: var(--muted); font-size: 14px; padding: 26px 0; text-align: center; }
.muted { color: var(--muted); }
.mono { font-family: "Cascadia Code", Consolas, "Courier New", monospace; font-size: 13px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.grid-form { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-items: end; }
.grid-form .field { margin-bottom: 0; }
.grid-form .grow-2 { grid-column: span 2; }
.hidden { display: none !important; }

.toast {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow); font-size: 14px; max-width: 420px;
}
.toast.err { border-color: #5a2a2a; color: #ffc9c9; }
.toast.ok { border-color: rgba(34, 211, 166, 0.4); }

.modal-back { position: fixed; inset: 0; background: rgba(4, 8, 16, 0.72); z-index: 50; display: grid; place-items: center; padding: 24px; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px; width: min(760px, 100%); max-height: 86vh; overflow: auto; box-shadow: var(--shadow); }
.modal h2 { margin: 0 0 12px; font-size: 18px; }

footer.foot { padding: 34px 0; color: var(--muted); font-size: 13px; border-top: 1px solid rgba(38, 51, 83, 0.5); }
footer.foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; }
  .grid-3, .cards, .split, .split-3, .grid-form { grid-template-columns: 1fr; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .sidebar nav { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; }
}

/* ---- 登录页 2.0 ---- */
.auth-shell { display:flex; align-items:center; justify-content:center; min-height:100vh; padding:32px 16px; }
.auth-card { width:100%; max-width:460px; background:#141b2e; border:1px solid #263050; border-radius:18px; padding:32px 30px; }
.auth-brand { display:flex; align-items:center; gap:10px; font-weight:600; color:#e8edf9; font-size:15px; margin-bottom:18px; }
.auth-title { font-size:22px; line-height:1.4; margin:0 0 8px; color:#e8edf9; }
.auth-sub { font-size:13px; color:#9aa6c2; margin:0 0 22px; line-height:1.6; }
.auth-submit { width:100%; margin-top:6px; }
.auth-links { font-size:13px; color:#8b95ad; margin:12px 0 0; }
.auth-links .sep { margin:0 8px; color:#3d4a6b; }
.field-error { color:#ff9b9b; font-size:12px; margin:6px 0 0; min-height:0; }
.auth-demo { margin:22px 0 0; padding:14px 16px; border:1px solid #2b3a5e; background:#101728; border-radius:12px; font-size:13px; color:#b9c4da; line-height:1.8; }
.auth-demo p { margin:2px 0; }
.auth-status { font-size:13px; color:#7fd6a2; margin:16px 0 0; }
.auth-status.is-down { color:#ff8f8f; }
.auth-status a, .auth-demo a { color:#7fb0ff; }
.auth-sso { display:flex; align-items:center; gap:10px; margin:16px 0 0; flex-wrap:wrap; }
.auth-sso-btn { opacity:.6; cursor:not-allowed; }
.auth-sso-hint { font-size:12px; color:#8b95ad; }
.auth-role { font-size:12px; color:#8b95ad; margin:14px 0 0; line-height:1.7; }
.auth-isolation { font-size:12px; color:#9aa6c2; margin:10px 0 0; line-height:1.7; border-left:2px solid #37538f; padding-left:10px; }
.auth-legal { font-size:12px; color:#8b95ad; margin:16px 0 0; line-height:1.9; }
.auth-legal a { color:#7fb0ff; margin-right:2px; }
.auth-back { font-size:13px; margin:18px 0 0; }
