:root {
  --bg: #08090b;
  --panel: #101115;
  --panel-2: #151720;
  --line: rgba(255, 255, 255, 0.12);
  --text: #f7f5f2;
  --muted: #a9a5a3;
  --dim: #706c6b;
  --accent: #f50451;
  --cyan: #68f7ff;
  --ok: #8dffbf;
  --warn: #ffd36c;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(104, 247, 255, 0.11), transparent 34rem),
    radial-gradient(circle at 82% 12%, rgba(245, 4, 81, 0.16), transparent 32rem),
    var(--bg);
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; }
.side {
  border-right: 1px solid var(--line);
  background: rgba(8, 9, 11, 0.82);
  padding: 28px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; background: var(--accent); }
.nav { display: grid; gap: 8px; margin-top: 42px; }
.nav a { color: var(--muted); padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.nav a:hover { color: var(--text); }
.main { padding: clamp(28px, 5vw, 64px); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.section-head p { margin-bottom: 0; }
.eyebrow { color: var(--accent); font-size: 12px; letter-spacing: .22em; text-transform: uppercase; font-weight: 800; }
h1, h2, h3 { margin: 0; text-transform: uppercase; letter-spacing: .03em; }
h1 { font-size: clamp(44px, 7vw, 92px); line-height: .9; }
h2 { font-size: clamp(24px, 3vw, 42px); }
h3 { font-size: 18px; }
p { color: var(--muted); line-height: 1.6; }
.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .02));
  border: 1px solid var(--line);
  padding: 22px;
  min-width: 0;
}
.card strong { display: block; font-size: clamp(28px, 3.5vw, 48px); line-height: 1; }
.card span, .meta { color: var(--muted); font-size: 13px; }
.upgrade {
  border-color: rgba(245, 4, 81, .48);
  background: linear-gradient(135deg, rgba(245, 4, 81, .18), rgba(104, 247, 255, .06));
}
.install-section { border-color: rgba(104, 247, 255, .34); }
.mode-command-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.mode-command-grid div {
  min-width: 0;
  border: 1px solid var(--line);
  padding: 14px;
  background: rgba(255, 255, 255, .035);
}
.mode-command-grid code {
  color: var(--cyan);
  font-size: 14px;
  word-break: break-word;
}
.mode-command-grid p {
  margin: 10px 0 0;
  font-size: 13px;
}
.desktop-bridge {
  margin-top: 16px;
  border: 1px solid rgba(245, 4, 81, .36);
  padding: 16px;
  background: rgba(245, 4, 81, .08);
}
.desktop-bridge h3 { margin-bottom: 8px; }
.desktop-bridge p { margin: 0 0 12px; }
.desktop-bridge code {
  display: inline-block;
  color: var(--ok);
  word-break: break-word;
}
.install-grid {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 16px;
  align-items: end;
  margin: 18px 0;
}
.mode-detail {
  min-height: 78px;
  border: 1px solid var(--line);
  padding: 14px;
  background: rgba(255, 255, 255, .035);
}
.mode-detail strong {
  font-size: 18px;
  line-height: 1.2;
}
.mode-detail p { margin: 8px 0 0; }
.command-box {
  margin: 18px 0;
  padding: 16px;
  overflow-x: auto;
  border: 1px solid rgba(104, 247, 255, .28);
  background: rgba(0, 0, 0, .36);
}
.command-box code {
  white-space: pre;
  color: var(--ok);
  font-size: 13px;
}
.mode-examples {
  display: grid;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
}
.mode-examples span {
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 10px;
}
.mode-examples code {
  color: var(--cyan);
  word-break: break-word;
}
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  min-height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 12px;
  cursor: pointer;
}
.btn-primary { background: var(--text); color: #08090b; border-color: var(--text); }
.btn-accent { background: var(--accent); border-color: var(--accent); }
.btn-danger { border-color: rgba(245, 4, 81, .65); color: #ff8cac; }
.table { width: 100%; border-collapse: collapse; overflow: hidden; }
.table th, .table td { border-bottom: 1px solid var(--line); padding: 14px 10px; text-align: left; font-size: 13px; }
.table th { color: var(--dim); text-transform: uppercase; letter-spacing: .16em; font-size: 10px; }
.section { margin-top: 28px; }
.form { display: grid; gap: 12px; max-width: 720px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; }
input, select {
  width: 100%;
  min-height: 44px;
  color: var(--text);
  background: rgba(255, 255, 255, .045);
  border: 1px solid var(--line);
  padding: 0 12px;
}
.status { min-height: 22px; color: var(--cyan); font-size: 13px; }
.pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  padding: 5px 8px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 10px;
}
.login-page { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.login-card { width: min(440px, calc(100vw - 40px)); padding: clamp(24px, 4vw, 36px); }
.login-card h1 {
  font-size: clamp(2rem, 4.8vw, 3rem);
  line-height: 1;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: clip;
}
.login-card p { font-size: .94rem; }
.small { font-size: 12px; color: var(--dim); }
.auth-options { display: grid; gap: 12px; margin: 26px 0 18px; }
.auth-btn {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .045);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  font-weight: 700;
}
.auth-btn:hover { border-color: rgba(255, 255, 255, .34); background: rgba(255, 255, 255, .075); }
.auth-icon {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}
.auth-icon svg { width: 20px; height: 20px; display: block; }
.auth-icon-apple { color: var(--text); }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--dim);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .16em;
  margin: 6px 0 18px;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}
.auth-secondary {
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}
.auth-secondary a:last-child { color: var(--accent); }
.field-hidden { display: none; }
.auth-legal {
  color: var(--dim);
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
}
.auth-legal a,
.legal-links a,
.app-footer a,
.policy-body a { color: var(--cyan); }
.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--dim);
  font-size: 12px;
}
.app-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.policy-page { min-height: 100vh; }
.policy-shell {
  width: min(920px, calc(100vw - 40px));
  margin: 0 auto;
  padding: clamp(28px, 6vw, 72px) 0;
}
.policy-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 34px;
}
.policy-body {
  display: grid;
  gap: 22px;
}
.policy-body h1 { font-size: clamp(44px, 8vw, 86px); }
.policy-body h2 { margin-top: 20px; }
.policy-body ul { color: var(--muted); line-height: 1.7; padding-left: 20px; }
.policy-body li + li { margin-top: 8px; }
.policy-body .card p:last-child,
.policy-body .card ul:last-child { margin-bottom: 0; }
.input-with-icon {
  position: relative;
  display: block;
}
.input-with-icon svg {
  position: absolute;
  left: 13px;
  top: 50%;
  width: 18px;
  height: 18px;
  color: var(--dim);
  transform: translateY(-50%);
  pointer-events: none;
}
.input-with-icon input { padding-left: 44px; }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .side { position: relative; height: auto; }
  .grid-4, .grid-3, .grid-2, .mode-command-grid { grid-template-columns: 1fr 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 620px) {
  .main { padding: 24px; }
  .grid-4, .grid-3, .grid-2, .form-row, .install-grid, .mode-command-grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; }
  .actions { flex-direction: column; }
  .btn { width: 100%; }
}
