:root {
  --bg: #05070d;
  --panel: rgba(10, 16, 28, 0.72);
  --line: rgba(120, 210, 255, 0.22);
  --cyan: #6ee7ff;
  --cyan-2: #3aa7ff;
  --gold: #e4c48a;
  --text: #eef5ff;
  --muted: #8ea0b8;
  --ok: #4ade80;
  --bad: #fb7185;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

.fx { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.fx::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(58, 167, 255, 0.18), transparent 55%),
    radial-gradient(700px 500px at 90% 10%, rgba(110, 231, 255, 0.08), transparent 50%),
    linear-gradient(180deg, #08111f 0%, #05070d 55%, #03040a 100%);
}
.grid-floor {
  position: absolute;
  inset: 42% -10% -20%;
  background-image:
    linear-gradient(rgba(110, 231, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 231, 255, 0.08) 1px, transparent 1px);
  background-size: 56px 56px;
  transform: perspective(500px) rotateX(62deg);
  mask-image: linear-gradient(to bottom, transparent, #000 30%, transparent 85%);
  animation: grid-drift 18s linear infinite;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.45;
}
.orb-1 { width: 380px; height: 380px; background: #1d4ed8; top: -80px; right: 8%; }
.orb-2 { width: 280px; height: 280px; background: #0e7490; bottom: 8%; left: -40px; }
.scan {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 3px,
    rgba(255, 255, 255, 0.015) 3px 4px
  );
}
@keyframes grid-drift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 0 56px, 56px 0; }
}

.topbar, .shell { position: relative; z-index: 1; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px 8px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.mark {
  width: 34px;
  height: 34px;
  border: 1px solid var(--cyan);
  transform: rotate(45deg);
  box-shadow: 0 0 18px rgba(110, 231, 255, 0.35);
  background:
    linear-gradient(135deg, transparent 46%, var(--cyan) 46% 54%, transparent 54%),
    linear-gradient(45deg, transparent 46%, var(--gold) 46% 54%, transparent 54%);
}
.brand strong {
  display: block;
  letter-spacing: 0.22em;
  font-size: 13px;
}
.brand small, .status, .kicker, label, .chip, .clock, .text-btn {
  letter-spacing: 0.18em;
  font-size: 11px;
  color: var(--muted);
}
.status { display: flex; align-items: center; gap: 10px; }
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: pulse 1.8s ease infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.clock { font-variant-numeric: tabular-nums; color: var(--gold); }

.shell {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 48px;
}
.shell.slim { width: min(460px, calc(100% - 32px)); padding-top: 12vh; }

.hud { min-height: 68vh; display: grid; place-items: center; }
.hud-frame {
  width: min(460px, 100%);
  padding: 36px 32px 32px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow), inset 0 0 80px rgba(110, 231, 255, 0.04);
  backdrop-filter: blur(18px);
  position: relative;
}
.hud-frame i {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid var(--cyan);
}
.hud-frame i:nth-child(1) { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.hud-frame i:nth-child(2) { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
.hud-frame i:nth-child(3) { bottom: -1px; left: -1px; border-right: 0; border-top: 0; }
.hud-frame i:nth-child(4) { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.hud-frame.quiet { border-color: rgba(110, 231, 255, 0.16); }

.kicker { margin: 0 0 10px; color: var(--cyan); }
h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 620;
  letter-spacing: 0.18em;
}
.desc { margin: 10px 0 24px; color: var(--muted); }

label { display: block; margin: 16px 0 8px; }
input, textarea {
  width: 100%;
  height: 48px;
  border: 1px solid rgba(110, 231, 255, 0.18);
  background: rgba(4, 8, 16, 0.65);
  color: var(--text);
  border-radius: 0;
  padding: 0 14px;
  font-size: 15px;
  outline: none;
  font-family: "Cascadia Code", "JetBrains Mono", "Consolas", ui-monospace, monospace;
}
textarea {
  height: auto;
  min-height: 140px;
  padding: 12px 14px;
  resize: vertical;
  line-height: 1.6;
}
input:focus, textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(110, 231, 255, 0.12), 0 0 24px rgba(110, 231, 255, 0.08);
}

.field { display: flex; gap: 8px; }
.field input { flex: 1; }

button {
  font-family: inherit;
  cursor: pointer;
  border: 0;
  height: 48px;
  padding: 0 16px;
  letter-spacing: 0.14em;
}
button:disabled { opacity: 0.45; cursor: not-allowed; }
.primary {
  width: 100%;
  margin-top: 22px;
  color: #041018;
  background: linear-gradient(90deg, var(--cyan), var(--cyan-2));
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(58, 167, 255, 0.28);
}
.primary:hover:not(:disabled) { filter: brightness(1.08); }
.icon-btn {
  min-width: 84px;
  background: transparent;
  color: var(--cyan);
  border: 1px solid rgba(110, 231, 255, 0.35);
  white-space: nowrap;
}
.text-btn {
  height: auto;
  background: none;
  color: var(--gold);
  padding: 0;
}

.desk-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.steps {
  display: flex;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.steps li {
  color: var(--muted);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.steps li span {
  font-family: ui-monospace, monospace;
  color: var(--cyan);
  opacity: 0.45;
}
.steps li.on { color: var(--text); }
.steps li.on span { opacity: 1; text-shadow: 0 0 10px rgba(110, 231, 255, 0.7); }

.cols {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
}
.glass {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  padding: 22px;
}
.slim .glass { min-height: 0; }
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.table-wrap { overflow: auto; }
.table { display: grid; gap: 8px; }
.row {
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 1fr 0.8fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(110, 231, 255, 0.1);
  font-size: 13px;
}
.row .phone { font-family: ui-monospace, monospace; color: var(--text); letter-spacing: 0.06em; }
.row .invite { font-family: ui-monospace, monospace; color: var(--gold); }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.row-actions button {
  height: 32px;
  padding: 0 10px;
  font-size: 12px;
  letter-spacing: 0.08em;
  background: transparent;
  color: var(--cyan);
  border: 1px solid rgba(110, 231, 255, 0.3);
}
.row.off { opacity: 0.5; }
.glass-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.14em;
  font-weight: 620;
}
.chip {
  border: 1px solid rgba(228, 196, 138, 0.35);
  color: var(--gold);
  padding: 4px 8px;
}

.list { display: grid; gap: 10px; max-height: 520px; overflow: auto; }
.item {
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(110, 231, 255, 0.1);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}
.item .phone {
  color: var(--text);
  font-family: ui-monospace, monospace;
  font-size: 16px;
  letter-spacing: 0.08em;
}
.tag {
  display: inline-block;
  margin-left: 8px;
  font-size: 10px;
  letter-spacing: 0.14em;
  padding: 2px 7px;
  border: 1px solid var(--line);
  color: var(--cyan);
}
.tag.ok { color: var(--ok); border-color: rgba(74, 222, 128, 0.35); }
.tag.wait { color: var(--muted); }

.msg { font-size: 13px; margin: 12px 0 0; }
.msg.ok { color: var(--ok); }
.msg.bad { color: var(--bad); }
.hidden { display: none !important; }
.shake { animation: shake 0.4s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.result {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(110, 231, 255, 0.2);
  background: linear-gradient(90deg, rgba(110, 231, 255, 0.08), transparent 70%);
  font-size: 13px;
  line-height: 1.8;
  font-family: ui-monospace, Consolas, monospace;
}
.result b { color: var(--cyan); letter-spacing: 0.12em; font-family: inherit; }
.result.success {
  border-color: rgba(74, 222, 128, 0.35);
  background: linear-gradient(90deg, rgba(74, 222, 128, 0.1), transparent 70%);
}

@media (max-width: 860px) {
  .cols, .admin-grid { grid-template-columns: 1fr; }
  .topbar { padding: 16px 16px 0; }
  h1 { font-size: 28px; }
  .field { flex-direction: column; }
  .icon-btn { width: 100%; }
  .steps { gap: 10px; flex-wrap: wrap; }
  .row { grid-template-columns: 1fr; }
}
