:root{
  color-scheme:dark;
  --bg:#070d14;
  --panel:#111a24;
  --panel-2:#162330;
  --line:#27384b;
  --text:#f4f7fb;
  --muted:#9eafc3;
  --accent:#84baff;
  --accent-soft:#d3e7ff;
  --gold:#e5c97a;
  --gold-soft:#f6e5b0;
  --danger:#ff9b9b;
  --shadow:0 14px 40px rgba(0,0,0,.24);
  --radius-xl:26px;
  --radius-lg:20px;
  --radius-md:14px;
  --font-sans: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, -apple-system, sans-serif;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:var(--font-sans);
  color:var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(132,186,255,.1), transparent 24%),
    radial-gradient(circle at 90% 8%, rgba(229,201,122,.08), transparent 22%),
    linear-gradient(135deg, #071019 0%, #0f1d2d 48%, #080d12 100%);
}
body::before{content:none}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font:inherit}
img{display:block;max-width:100%}

.wrap{
  max-width:1280px;
  margin:0 auto;
  padding:28px;
}

body:not(.authed) .status-band,
body:not(.authed) .metric-grid,
body:not(.authed) .actions,
body:not(.authed) .cards {
  display:none !important;
}
body:not(.authed) #logout,
body.authed #login,
body.authed #qr-login {
  display:none !important;
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin-bottom:18px;
}
.brand{
  display:inline-flex;
  align-items:center;
  gap:14px;
}
.brand-mark{
  display:grid;
  grid-template:repeat(2,6px)/repeat(2,6px);
  gap:4px;
  width:36px;
  height:36px;
  padding:7px;
  border-radius:8px;
  background:var(--gold);
  flex:0 0 auto;
}
.brand-mark i{border-radius:1px;background:#0f161d}
.brand-mark i:nth-child(2){opacity:.6}
.brand-mark i:nth-child(3){opacity:.78}
.brand strong,
.brand small{display:block}
.brand strong{font-size:18px}
.brand small{margin-top:3px;color:var(--muted);font-size:10px;letter-spacing:.18em}
.topbar-copy{
  padding:10px 14px;
  border:1px solid var(--line);
  border-radius:999px;
  background:rgba(255,255,255,.03);
  color:var(--muted);
  font-size:12px;
}

.hero,
.status-band,
.metric-grid article,
.actions article,
.cards article{
  border:1px solid var(--line);
  border-radius:var(--radius-xl);
  background:rgba(17,26,36,.82);
  box-shadow:var(--shadow);
}

.hero{
  display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(360px,.85fr);
  gap:22px;
  padding:28px;
  background:
    linear-gradient(135deg, rgba(132,186,255,.16), rgba(229,201,122,.1)),
    rgba(17,26,36,.86);
}

.hero-copy{
  display:grid;
  gap:18px;
}
.hero-copy > p:first-child,
.status-band span{
  color:var(--accent-soft);
  font-size:10px;
  font-weight:700;
  letter-spacing:.18em;
  text-transform:uppercase;
}
.hero-copy h1{
  margin:0;
  font-size:clamp(34px, 4vw, 58px);
  line-height:1.05;
  letter-spacing:-.04em;
}
.hero-copy .lead{
  margin:0;
  max-width:760px;
  color:var(--muted);
  line-height:1.85;
  font-size:15px;
}

.login-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
}
.hero button,
.actions button{
  min-height:46px;
  padding:0 18px;
  border:0;
  border-radius:999px;
  background:linear-gradient(135deg, var(--accent), var(--accent-soft));
  color:#09111a;
  font-weight:800;
  box-shadow:0 12px 26px rgba(132,186,255,.2);
}
.hero button.secondary,
.qr-login-panel button.secondary,
.actions .secondary{
  background:transparent;
  color:var(--accent);
  border:1px solid rgba(132,186,255,.45);
  box-shadow:none;
}

.hero-pills{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.hero-pills span{
  padding:9px 12px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:999px;
  background:rgba(255,255,255,.04);
  color:#eef5ff;
  font-size:12px;
}

.hero-side{
  display:grid;
  gap:16px;
}
.hero-visual{
  margin:0;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.08);
  border-radius:26px;
  background:linear-gradient(180deg, rgba(255,255,255,.02), rgba(0,0,0,.14));
}
.hero-visual img{
  width:100%;
  aspect-ratio:1.42 / 1;
  object-fit:cover;
  object-position:center;
  filter:saturate(1.05) contrast(1.04);
}

.qr-login-panel{
  display:grid;
  gap:10px;
  padding:18px;
  border:1px solid var(--line);
  border-radius:24px;
  background:rgba(8,13,19,.68);
  backdrop-filter:blur(16px);
}
.qr-login-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
}
.qr-login-head span{font-size:14px;font-weight:800}
.qr-login-head small{color:var(--muted)}
.qr-login-frame{
  position:relative;
  display:grid;
  place-items:center;
  min-height:260px;
  overflow:hidden;
  border:1px solid rgba(132,186,255,.24);
  border-radius:20px;
  background:
    radial-gradient(circle at 50% 50%, rgba(132,186,255,.1), transparent 58%),
    #fff;
}
.qr-login-frame img{
  width:238px;
  height:238px;
  object-fit:contain;
}
.qr-login-frame span{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  color:#3067b5;
  font-weight:700;
  background:#fff;
}
.qr-login-panel p{
  margin:2px 0 0;
  color:var(--accent);
}
.qr-login-panel a{
  color:var(--accent-soft);
  text-decoration:underline;
  text-underline-offset:3px;
}

.status-band{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:0;
  margin-top:18px;
  overflow:hidden;
}
.status-band article{
  display:grid;
  gap:8px;
  min-height:96px;
  padding:20px 22px;
  border-right:1px solid var(--line);
}
.status-band article:last-child{border-right:0}
.status-band strong{font-size:14px;line-height:1.55}

.metric-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
  margin-top:18px;
}
.metric-grid article,
.actions article,
.cards article{
  padding:22px;
  background:rgba(17,26,36,.88);
}
.metric-grid small{
  color:var(--accent-soft);
  font-size:10px;
  letter-spacing:.16em;
  text-transform:uppercase;
}
.metric-grid h2{
  margin:12px 0 10px;
  font-size:21px;
}
.metric-grid p,
.actions p{
  margin:0;
  color:var(--muted);
  line-height:1.8;
}

.actions{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
  margin-top:18px;
}
.actions h2,
.cards h2{
  margin:0;
  font-size:21px;
}
.actions input{
  width:100%;
  min-height:46px;
  margin-top:10px;
  padding:12px 14px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:14px;
  background:rgba(6,10,15,.84);
  color:var(--text);
}
.actions input::placeholder{color:#8798aa}
.row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:12px;
}

.cards{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
  margin-top:18px;
}
.cards.two{grid-template-columns:1fr 1fr}
pre{
  margin:0;
  padding:18px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  background:rgba(0,0,0,.22);
  color:#d7e7fb;
  white-space:pre-wrap;
  line-height:1.7;
  overflow:auto;
  max-height:520px;
  font-size:13px;
}

button:focus-visible,
input:focus-visible,
a:focus-visible{
  outline:2px solid rgba(229,201,122,.58);
  outline-offset:2px;
}

@media (max-width: 1180px){
  .hero{grid-template-columns:1fr}
}

@media (max-width: 900px){
  .wrap{padding:18px}
  .topbar{flex-direction:column;align-items:flex-start}
  .status-band,
  .metric-grid,
  .actions,
  .cards,
  .cards.two{
    grid-template-columns:1fr;
  }
}
