:root {
  color-scheme: dark;
  --bg: #050505;
  --bg-deep: #000000;
  --card: #0a0a0a;
  --card-soft: #111111;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.2);
  --text: #f7f9fc;
  --muted: #9b9b9b;
  --quiet: #5c5c5c;
  --white: #ffffff;
  --blue: #f2f2f2;
  --radius: 22px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 85% -5%, rgba(255, 255, 255, 0.12), transparent 32%),
    radial-gradient(circle at -10% 55%, rgba(255, 255, 255, 0.06), transparent 36%),
    var(--bg);
  color: var(--text);
}

button, input, textarea { font: inherit; }

.shell {
  width: min(100%, 680px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 16px max(22px, env(safe-area-inset-bottom));
}

.topbar, .brand, .row, .between, .actions, .stats {
  display: flex;
  align-items: center;
}

.topbar { justify-content: space-between; margin-bottom: 24px; }
.brand { gap: 12px; }
.brand-logo {
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  object-fit: cover;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: 19px; letter-spacing: 0.02em; }
h2 { font-size: 20px; line-height: 1.18; }
h3 { font-size: 15px; }
.brand p, footer { color: var(--muted); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; }
.shield svg { width: 24px; height: 24px; fill: var(--white); opacity: 0.9; }

.card {
  margin-bottom: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(17, 17, 17, 0.98), rgba(5, 5, 5, 0.99));
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18);
}

.hero { padding: 22px; }
.hero-mark {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 20px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
}
.hero-mark svg { width: 24px; fill: var(--white); }
.eyebrow { margin-bottom: 8px; color: var(--blue); font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
.muted { color: var(--muted); }
.small { font-size: 12px; line-height: 1.5; }
.hero .muted { margin-top: 9px; line-height: 1.5; }
.status-line { margin-top: 18px; gap: 8px; color: var(--text); font-size: 13px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--white); box-shadow: 0 0 14px rgba(255, 255, 255, 0.8); }
.dot.off { background: var(--quiet); box-shadow: none; }

.stats { gap: 8px; margin-top: 18px; }
.stat {
  flex: 1;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}
.stat b { display: block; font-size: 17px; }
.stat span { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.25; text-transform: uppercase; }

.section-title { margin: 22px 3px 11px; color: var(--muted); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.plans { display: grid; gap: 9px; }
.plan { justify-content: space-between; padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,0.025); }
.plan strong { display: block; margin-bottom: 4px; font-size: 15px; }
.plan span { color: var(--muted); font-size: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.btn.primary { border-color: var(--white); background: var(--white); color: #07101e; }
.btn.block { width: 100%; }
.btn.tiny { min-height: 34px; padding: 0 10px; font-size: 11px; }
.btn:active { transform: translateY(1px); }
.actions { flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.actions .btn { flex: 1; min-width: 130px; }
.url-box, .payment-code {
  margin-top: 13px;
  padding: 13px;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--blue);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  line-height: 1.5;
}
.payment-label { margin-top: 14px; color: var(--muted); font-size: 11px; text-transform: uppercase; }
.payment-value { margin-top: 5px; font-size: 20px; font-weight: 800; }
.news + .news { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.news p { margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.5; white-space: pre-wrap; }

.admin-nav { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 5px; }
.admin-nav .btn { flex: 0 0 auto; min-height: 36px; padding: 0 11px; color: var(--muted); }
.admin-nav .active { background: var(--white); color: var(--bg-deep); }
.admin-item { padding: 13px 0; border-bottom: 1px solid var(--line); }
.admin-item:last-child { border-bottom: 0; }
.admin-item p { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.badge { display: inline-block; padding: 4px 7px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.form { display: grid; gap: 9px; }
input, textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
}
textarea { min-height: 94px; resize: vertical; }

.loading-card { display: grid; min-height: 220px; place-items: center; align-content: center; gap: 13px; color: var(--muted); font-size: 13px; }
.spinner { width: 25px; height: 25px; border: 2px solid var(--line); border-top-color: var(--white); border-radius: 50%; animation: spin .8s linear infinite; }
.toast { position: fixed; right: 16px; bottom: 20px; left: 16px; z-index: 10; max-width: 540px; margin: auto; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: #181818; color: var(--text); font-size: 13px; opacity: 0; pointer-events: none; transform: translateY(12px); transition: .22s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
footer { padding-top: 16px; text-align: center; opacity: 0.65; }

@keyframes spin { to { transform: rotate(360deg); } }
