:root {
  --bg: #0a0e15;
  --bg-soft: #0f1520;
  --panel: #111a27;
  --panel-2: #172233;
  --line: #22314a;
  --text: #e8eefc;
  --muted: #8fa1bd;
  --accent: #37d6c0;
  --accent-2: #4f9dff;
  --danger: #ff6b7a;
  --warn: #ffc46b;
  --ok: #3ddc97;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(1200px 700px at 80% -10%, rgba(79, 157, 255, .16), transparent 60%),
              radial-gradient(900px 600px at -10% 10%, rgba(55, 214, 192, .12), transparent 55%),
              var(--bg);
  color: var(--text);
  font: 15px/1.65 "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; font-weight: 650; letter-spacing: .2px; }
h1 { font-size: clamp(28px, 4vw, 44px); }
h2 { font-size: 22px; }
h3 { font-size: 17px; }
p { margin: 0 0 1em; }
code { background: #0c1420; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: .92em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.container { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.narrow { max-width: 780px; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(10, 14, 21, .78);
  border-bottom: 1px solid rgba(34, 49, 74, .7);
}
.topbar-inner { display: flex; align-items: center; gap: 28px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04121a; font-weight: 800;
}
.brand-text { letter-spacing: .5px; }
.nav { display: flex; gap: 22px; flex: 1; }
.nav a { color: var(--muted); font-size: 14px; }
.nav a:hover { color: var(--text); text-decoration: none; }
.topbar-actions { display: flex; gap: 10px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 8px 16px;
  border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 14px;
  cursor: pointer; white-space: nowrap;
  transition: transform .08s ease, background .15s ease, border-color .15s ease, opacity .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: linear-gradient(135deg, var(--accent), #2bb9ff); color: #04121a; }
.btn-ghost { background: rgba(23, 34, 51, .7); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: #34507a; }
.btn-danger { background: rgba(255, 107, 122, .12); border-color: rgba(255, 107, 122, .45); color: var(--danger); }
.btn-sm { min-height: 30px; padding: 4px 10px; font-size: 13px; border-radius: 8px; }
.btn-lg { min-height: 46px; padding: 11px 22px; font-size: 15px; }
.btn-block { width: 100%; }

.hero { padding: 78px 0 34px; }
.hero-inner { display: grid; grid-template-columns: 1.25fr .75fr; gap: 44px; align-items: center; }
.pill {
  display: inline-block; margin-bottom: 18px;
  padding: 4px 12px; border-radius: 999px; font-size: 12px; letter-spacing: .4px;
  color: var(--accent); background: rgba(55, 214, 192, .08); border: 1px solid rgba(55, 214, 192, .3);
}
.lead { color: var(--muted); font-size: 17px; max-width: 560px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 18px; }
.hero-meta { margin-top: 8px; }
.hero-panel {
  background: linear-gradient(180deg, var(--panel), #0d1420);
  border: 1px solid var(--line); border-radius: 18px;
  padding: 22px; box-shadow: var(--shadow);
}
.panel-row { display: flex; align-items: center; gap: 10px; padding: 9px 2px; font-size: 14px; color: var(--muted); }
.panel-kv { justify-content: space-between; color: var(--muted); }
.panel-kv strong { color: var(--text); }
.panel-divider { height: 1px; background: var(--line); margin: 10px 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-green { background: var(--ok); box-shadow: 0 0 10px rgba(61, 220, 151, .7); }
.dot-blue { background: var(--accent-2); box-shadow: 0 0 10px rgba(79, 157, 255, .7); }
.dot-amber { background: var(--warn); box-shadow: 0 0 10px rgba(255, 196, 107, .7); }

.section { padding: 34px 0; }
.section-title { margin-bottom: 20px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  background: linear-gradient(180deg, rgba(23, 34, 51, .75), rgba(17, 26, 39, .9));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px;
}
.card p:last-child { margin-bottom: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { margin: 0; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.steps li { display: flex; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.steps h3 { margin-bottom: 4px; }
.steps p { margin: 0; }
.step-no {
  flex: 0 0 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; color: #04121a;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.cta-band {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: linear-gradient(120deg, rgba(55, 214, 192, .1), rgba(79, 157, 255, .1));
  border: 1px solid var(--line); border-radius: 18px; padding: 30px 28px; margin-bottom: 40px;
}
.cta-band h2 { margin-bottom: 4px; }
.cta-band p { margin: 0; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.notice { background: rgba(79, 157, 255, .08); border: 1px solid rgba(79, 157, 255, .3); border-radius: 12px; padding: 14px 16px; margin: 14px 0; }
.notice-warn { background: rgba(255, 196, 107, .08); border-color: rgba(255, 196, 107, .35); }

.auth-wrap { display: grid; place-items: center; padding: 56px 0 70px; }
.auth-card { width: min(430px, 100%); }
.auth-card h1 { font-size: 30px; margin-bottom: 6px; }
.auth-alt { margin: 18px 0 0; text-align: center; }

.form { display: grid; gap: 14px; margin-top: 18px; }
.form label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.form input {
  width: 100%; min-height: 42px; padding: 9px 12px;
  background: #0b1320; border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); font: inherit;
}
.form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(55, 214, 192, .12); }
.form-inline { grid-template-columns: 1fr auto; align-items: center; }
.form-msg { min-height: 20px; font-size: 13px; color: var(--danger); }
.form-msg.ok { color: var(--ok); }

.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid var(--line); color: var(--muted); background: rgba(143, 161, 189, .08); }
.badge-active { color: var(--ok); border-color: rgba(61, 220, 151, .4); background: rgba(61, 220, 151, .1); }
.badge-expired { color: var(--warn); border-color: rgba(255, 196, 107, .4); background: rgba(255, 196, 107, .1); }
.badge-revoked, .badge-disabled { color: var(--danger); border-color: rgba(255, 107, 122, .4); background: rgba(255, 107, 122, .1); }

.dashboard { padding: 34px 0 60px; display: grid; gap: 18px; }
.dashboard-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.dashboard-head h1 { font-size: 30px; margin-bottom: 2px; }
.license-card .card-head { margin-bottom: 10px; }
.license-main { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 8px 0 16px; }
.license-plan { font-size: 26px; font-weight: 700; }
.meter-bar { height: 8px; border-radius: 999px; background: #0b1320; border: 1px solid var(--line); overflow: hidden; }
.meter-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.meter-label { display: flex; justify-content: space-between; margin-top: 8px; font-size: 13px; }
.license-hint { margin-top: 12px; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; font-size: 14px; color: var(--muted); }
.kv strong { color: var(--text); font-weight: 600; text-align: right; word-break: break-all; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { color: var(--muted); font-weight: 600; font-size: 12px; letter-spacing: .4px; text-transform: uppercase; white-space: nowrap; }
.table tbody tr:hover { background: rgba(79, 157, 255, .04); }
.table td .btn + .btn { margin-left: 6px; }
.table .col-actions { text-align: right; white-space: nowrap; }
.mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 13px; letter-spacing: .3px; }

.list { margin: 0; padding-left: 20px; color: var(--muted); }
.list li { margin-bottom: 8px; }
.legal h2 { margin-top: 28px; font-size: 18px; }
.legal p { color: var(--muted); }

.footer { border-top: 1px solid var(--line); background: rgba(10, 14, 21, .8); padding: 26px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-brand { font-weight: 700; }
.footer-links { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.footer-links a { color: var(--muted); }

@media (max-width: 900px) {
  .hero-inner, .grid-2, .grid-3, .steps { grid-template-columns: 1fr; }
  .hero { padding-top: 46px; }
  .nav { display: none; }
  .cta-band { flex-direction: column; align-items: flex-start; }
  .form-inline { grid-template-columns: 1fr; }
  .dashboard-head { flex-direction: column; align-items: flex-start; }
  .license-main { flex-direction: column; gap: 4px; }
}
