:root {
  --bg: #05060f;
  --navy: #0b1022;
  --cyan: #3ee0ff;
  --violet: #a78bfa;
  --gold: #f0c36a;
  --text: #e7eefc;
  --muted: rgba(214, 226, 255, 0.62);
  --line: rgba(150, 196, 255, 0.18);
  --glass: rgba(8, 12, 28, 0.78);
  --radius: 16px;
  --font: "Outfit", sans-serif;
  --display: "Syne", sans-serif;
}

[hidden] { display: none !important; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); }
body { background:
  radial-gradient(1200px 600px at 10% -10%, rgba(62, 224, 255, 0.12), transparent 50%),
  radial-gradient(900px 500px at 100% 0%, rgba(167, 139, 250, 0.14), transparent 45%),
  var(--bg);
}

.stars {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,.7), transparent),
    radial-gradient(1px 1px at 70% 20%, rgba(255,255,255,.45), transparent),
    radial-gradient(1px 1px at 40% 80%, rgba(255,255,255,.35), transparent),
    radial-gradient(1px 1px at 85% 70%, rgba(255,255,255,.5), transparent);
}

.screen { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; padding: 32px 18px 64px; }
.kicker { margin: 0 0 6px; letter-spacing: 0.16em; font-size: 12px; color: var(--cyan); font-family: var(--display); text-transform: uppercase; }
h1 { margin: 0 0 8px; font-family: var(--display); font-size: 32px; }
h2 { margin: 0 0 10px; font-family: var(--display); font-size: 20px; }
.lead, .hint { color: var(--muted); line-height: 1.5; }
.hint { font-size: 14px; }
.hint a { color: var(--cyan); }
code { font-size: 12px; color: var(--gold); }

.card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  backdrop-filter: blur(12px);
}

.login-card { max-width: 460px; margin: 12vh auto 0; }
.top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
@media (max-width: 860px) { .grid { grid-template-columns: 1fr; } }

.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.row-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .row-fields { grid-template-columns: 1fr; } }

label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
input, textarea, select {
  background: #070b18;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}
textarea { resize: vertical; min-height: 120px; }

button {
  font: inherit;
  font-weight: 600;
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  cursor: pointer;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  color: #061018;
  width: fit-content;
}
button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
button.danger { background: linear-gradient(90deg, #ff7a3c, #e85dff); color: #16080c; }
button:disabled { opacity: 0.5; cursor: not-allowed; }

.error { color: #ff8d8d; font-size: 13px; margin: 0; }
.ok { color: #7dffb3; font-size: 13px; margin: 0; }
.status { font-size: 14px; color: var(--gold); }

.items { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(5, 8, 20, 0.55);
}
.item header { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 720px) { .cols { grid-template-columns: 1fr; } }
.cols p { white-space: pre-wrap; font-size: 13px; line-height: 1.45; margin: 0; }
.badge { color: var(--cyan); }
.badge.edited { color: #7dffb3; }
.badge.error { color: #ff8d8d; }

.qr-wrap { display: flex; flex-direction: column; gap: 12px; margin: 12px 0 18px; }
.qr-box {
  background: #fff;
  padding: 16px;
  border-radius: 12px;
  width: fit-content;
}
.qr-box svg { display: block; width: 320px; height: 320px; }
.phone-fallback { color: var(--muted); font-size: 14px; }
.phone-fallback summary { cursor: pointer; margin-bottom: 10px; }
