:root {
  --bg: #07110f;
  --surface: #0d1916;
  --surface-2: #12221e;
  --surface-3: #183029;
  --line: #244238;
  --text: #eef8f3;
  --muted: #98b2a8;
  --accent: #36d399;
  --accent-strong: #10b981;
  --warning: #f2c66d;
  --danger: #ff8b8b;
  --blue: #8db6ff;
  --shadow: 0 24px 70px rgba(0, 0, 0, .28);
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.55; }
a { color: inherit; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
code, pre { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
code { color: #c9f7e7; overflow-wrap: anywhere; }
pre { margin: 16px 0; padding: 18px; overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: #081511; color: #c9f7e7; line-height: 1.6; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-size: clamp(2rem, 5vw, 3.7rem); line-height: 1.04; letter-spacing: -.045em; }
h2 { margin-bottom: 8px; font-size: 1.15rem; letter-spacing: -.015em; }
small, .muted { color: var(--muted); }
.small { font-size: .84rem; }

.product-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100vh; padding: 24px 18px; border-right: 1px solid var(--line); background: #091512; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; }
.brand span:last-child { display: grid; }
.brand b { font-size: 1.04rem; letter-spacing: -.02em; }
.brand small { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; }
.brand-mark { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 12px; background: var(--accent-strong); color: #04261b; font-weight: 900; }
.sidebar nav { display: grid; gap: 6px; margin-top: 42px; }
.sidebar nav a { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 10px; color: #b6cbc3; text-decoration: none; transition: .18s ease; }
.sidebar nav a:hover, .sidebar nav a:focus-visible { background: var(--surface-2); color: var(--text); outline: none; }
.sidebar nav a span { width: 20px; color: var(--accent); text-align: center; }
.sidebar-foot { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); }
.identity { display: flex; align-items: center; gap: 10px; }
.identity > span:last-child { display: grid; min-width: 0; }
.identity b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { display: grid; flex: 0 0 auto; place-items: center; width: 34px; height: 34px; border: 1px solid #346453; border-radius: 50%; background: var(--surface-3); color: var(--accent); font-weight: 800; }
.text-button { padding: 10px 0 0; border: 0; background: none; color: var(--muted); cursor: pointer; }
.text-button:hover { color: var(--text); }

.main-column { min-width: 0; }
.topbar { position: sticky; z-index: 10; top: 0; display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 12px clamp(20px, 4vw, 52px); border-bottom: 1px solid rgba(36, 66, 56, .82); background: rgba(7, 17, 15, .93); backdrop-filter: blur(14px); }
.topbar > div { display: grid; }
.topbar strong { font-size: 1.05rem; }
.topbar .service-pill { margin-left: auto; }
.content { width: min(1260px, 100%); margin: 0 auto; padding: 42px clamp(20px, 4vw, 52px) 80px; }
.mobile-nav { display: none; border: 0; background: none; color: var(--text); font-size: 1.4rem; }

.hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 28px; }
.hero-row p { max-width: 740px; margin-bottom: 0; color: var(--muted); font-size: 1.02rem; }
.hero-row.compact h1 { font-size: clamp(2rem, 4vw, 3rem); }
.eyebrow { display: inline-block; margin-bottom: 13px; color: var(--accent); font-size: .72rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.eyebrow.success { color: var(--accent); }
.lede { color: var(--muted); font-size: 1.02rem; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.metric, .panel, .key-card, .empty-state { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 1px 0 rgba(255,255,255,.02) inset; }
.metric { display: grid; gap: 4px; min-height: 132px; padding: 19px; }
.metric strong { font-size: 1.9rem; letter-spacing: -.04em; }
.metric span { align-self: end; color: var(--muted); font-size: .8rem; }
.panel-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.panel { padding: 22px; }
.span-5 { grid-column: span 5; }
.span-7 { grid-column: span 7; }
.span-12 { grid-column: 1 / -1; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.panel-head h2 { margin-bottom: 0; }
.steps { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.steps li { display: flex; gap: 13px; padding: 12px 0; border-top: 1px solid var(--line); }
.steps li > span, .safety-list > span { display: grid; flex: 0 0 auto; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: rgba(54, 211, 153, .12); color: var(--accent); font-weight: 800; }
.steps p, .safety-list p { margin-bottom: 0; color: var(--muted); }
.status-list, .model-list { display: grid; }
.status-list > div, .model-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
.status-list span, .model-list span { color: var(--muted); text-align: right; }

.service-pill, .badge { display: inline-flex; align-items: center; gap: 7px; width: fit-content; padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: #b9d2c8; font-size: .73rem; white-space: nowrap; }
.service-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(54, 211, 153, .12); }
.badge.active { color: var(--accent); }
.alert { margin: 0 0 18px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: #c9dcd5; }
.alert.error { border-color: rgba(255, 139, 139, .42); background: rgba(255, 139, 139, .08); color: #ffd4d4; }
.alert.warning { border-color: rgba(242, 198, 109, .38); background: rgba(242, 198, 109, .07); color: #f9dfaa; }
.alert.success { border-color: rgba(54, 211, 153, .35); background: rgba(54, 211, 153, .08); color: #baf3dd; }

.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 9px 15px; border-radius: 10px; font-weight: 750; text-decoration: none; cursor: pointer; transition: .18s ease; }
.primary-button { border: 1px solid var(--accent); background: var(--accent); color: #04261b; }
.primary-button:hover { background: #5be2af; }
.primary-button.inline { width: fit-content; white-space: nowrap; }
.secondary-button { border: 1px solid var(--line); background: var(--surface-2); color: var(--text); }
.secondary-button:hover { border-color: #3a6c5b; background: var(--surface-3); }
button:disabled { cursor: not-allowed; opacity: .45; }

.stack-form { display: grid; gap: 15px; }
.stack-form label { display: grid; gap: 7px; color: #c8d9d2; font-weight: 650; }
input, select { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #091612; color: var(--text); outline: none; }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(54, 211, 153, .1); }

.auth-shell { display: grid; align-content: center; width: min(100% - 32px, 610px); min-height: 100vh; margin: auto; padding: 54px 0; }
.auth-brand { margin: 0 auto 24px; }
.auth-card { width: 100%; padding: clamp(25px, 5vw, 42px); border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }
.auth-card.wide { width: min(720px, 100%); }
.auth-card.delivery-card { width: min(850px, 100%); }
.auth-foot { margin: 20px auto 0; color: var(--muted); font-size: .76rem; text-align: center; }
.safety-list { display: flex; gap: 12px; padding: 8px 0; }
.secret-box { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 16px; border: 1px solid rgba(54, 211, 153, .45); border-radius: 14px; background: #071c16; }
.secret-box span { grid-column: 1 / -1; color: var(--muted); font-size: .75rem; }
.secret-box code { align-self: center; font-size: 1rem; word-break: break-all; }
.secret-box button { border: 0; border-radius: 9px; background: var(--accent); color: #04261b; font-weight: 800; cursor: pointer; }
.fact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 18px 0 28px; }
.fact-grid > div { display: grid; gap: 5px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }

.card-list { display: grid; gap: 14px; }
.key-card { padding: 21px; }
.key-title { display: flex; align-items: center; gap: 13px; }
.key-title > div { min-width: 0; }
.key-title h2 { margin-bottom: 3px; }
.key-title .badge { margin-left: auto; }
.key-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: rgba(54, 211, 153, .12); color: var(--accent); font-size: 1.25rem; }
.key-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 18px 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--line); }
.key-facts > div { display: grid; gap: 4px; padding: 13px; background: var(--surface-2); }
.key-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.empty-state { padding: 50px 20px; text-align: center; }
.empty-state > span { color: var(--accent); font-size: 2rem; }
.one-time { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; margin: 0 0 18px; padding: 17px; border: 1px solid rgba(242, 198, 109, .42); border-radius: 14px; background: rgba(242, 198, 109, .07); }
.one-time code { grid-column: 1 / -1; padding: 12px; border-radius: 9px; background: #081410; }
.member-list { display: grid; }
.member-list > div { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-top: 1px solid var(--line); }
.member-list > div > span:nth-child(2) { display: grid; min-width: 0; }
.member-list .badge { margin-left: auto; }
.inline-form { display: flex; gap: 8px; min-width: 330px; }
.inline-form select { min-height: 38px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 11px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; }
.empty-cell { padding: 30px; color: var(--muted); text-align: center; }
.check-list { display: grid; gap: 9px; }

@media (max-width: 980px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .span-5, .span-7 { grid-column: 1 / -1; }
  .key-facts { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .product-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; width: 260px; transform: translateX(-105%); transition: transform .2s ease; box-shadow: var(--shadow); }
  .menu-open .sidebar { transform: translateX(0); }
  .mobile-nav { display: block; }
  .topbar { padding: 12px 18px; }
  .topbar .service-pill { display: none; }
  .content { padding: 32px 18px 60px; }
  .hero-row { align-items: flex-start; flex-direction: column; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .fact-grid, .key-facts { grid-template-columns: 1fr; }
  .one-time { grid-template-columns: 1fr; }
  .one-time code { grid-column: auto; }
  .inline-form { min-width: 280px; }
}

@media (max-width: 480px) {
  .metric-grid { grid-template-columns: 1fr; }
  .panel, .key-card { padding: 17px; }
  .secret-box { grid-template-columns: 1fr; }
  .secret-box button { min-height: 40px; }
  h1 { font-size: 2.3rem; }
}
