:root {
  --bg: #0c0e12;
  --card: #12151b;
  --card-hover: #161a22;
  --border: #1e232d;
  --text: #e6eaf0;
  --muted: #8b93a1;
  --accent: #8fb8de;
  --accent-dim: #5d7fa3;
  --danger: #de8f8f;
  --ok: #8fdeaa;
  --font: "Geist Sans", "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "liga" 1, "calt" 1, "kern" 1;
}

code,
kbd,
.nav-user,
.footnote,
.kv .v,
.field .count,
.admin-name,
.admin-meta,
.status-badge,
.badge,
.pending-user-line {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "kern" 1;
}

body.locked {
  overflow: hidden;
}

.fx {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(700px 460px at 50% -12%, rgba(143, 184, 222, 0.07), transparent 70%),
    radial-gradient(900px 560px at 85% 112%, rgba(143, 184, 222, 0.045), transparent 70%);
}

.center-stage {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.gate-content {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent);
  border: 1px solid rgba(143, 184, 222, 0.25);
  border-radius: 999px;
  padding: 4px 14px;
  margin-bottom: 26px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.brand-name {
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.brand-name .tld {
  color: var(--muted);
  font-weight: 550;
  font-size: 0.78em;
}

.hero {
  text-align: center;
  max-width: 520px;
}

.hero h1 {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.hero h1 .tld {
  font-size: 0.62em;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0;
}

.hero p {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 34px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.footnote {
  position: absolute;
  bottom: 26px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  opacity: 0.65;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 550;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.12s ease;
}

.btn:hover {
  border-color: var(--accent-dim);
  background: var(--card-hover);
}

.btn:active {
  transform: scale(0.98);
}

.btn.primary {
  background: linear-gradient(160deg, rgba(143, 184, 222, 0.22), rgba(143, 184, 222, 0.1));
  border-color: rgba(143, 184, 222, 0.4);
  color: #dcebfa;
}

.btn.primary:hover {
  border-color: var(--accent);
}

.btn:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none;
}

.btn.wide {
  width: 100%;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px 30px 28px;
}

.auth-card.wide-card {
  max-width: 460px;
}

.auth-head {
  text-align: center;
  margin-bottom: 26px;
}

.auth-head .brand {
  justify-content: center;
  margin-bottom: 18px;
}

.auth-head h1 {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.auth-head p {
  color: var(--muted);
  font-size: 13.5px;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  font-weight: 550;
  color: var(--muted);
  margin-bottom: 7px;
  letter-spacing: 0.02em;
}

.field .count {
  font-family: var(--mono);
  font-size: 11px;
  opacity: 0.7;
}

.field input,
.field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 11px 13px;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  transition: border-color 0.18s ease;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent-dim);
}

.field textarea {
  resize: vertical;
  min-height: 92px;
}

.wizard-steps {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

.wstep {
  font-size: 12.5px;
  font-weight: 550;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.18s ease;
}

.wstep.active {
  color: var(--accent);
}

.wstep-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.wizard-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.wizard-actions .btn {
  flex: 1;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.form-error {
  display: none;
  background: rgba(222, 143, 143, 0.08);
  border: 1px solid rgba(222, 143, 143, 0.3);
  color: var(--danger);
  border-radius: 11px;
  padding: 10px 13px;
  font-size: 13px;
  margin-bottom: 16px;
}

.form-error.visible {
  display: block;
}

.auth-alt {
  text-align: center;
  margin-top: 20px;
  font-size: 13.5px;
  color: var(--muted);
}

.auth-alt a {
  color: var(--accent);
  text-decoration: none;
}

.auth-alt a:hover {
  text-decoration: underline;
}

.pending-card {
  text-align: center;
  max-width: 440px;
}

.pulse-ring {
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  border-radius: 50%;
  border: 2px solid rgba(143, 184, 222, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.pulse-ring::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  animation: pulse 2.4s ease-out infinite;
}

.ring-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(143, 184, 222, 0.6);
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.55);
    opacity: 0;
  }
}

.pending-card h1 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.pending-card p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 8px;
}

.pending-card .pending-user-line {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 26px;
}

.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.topnav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-user {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
}

.btn.small {
  padding: 8px 16px;
  font-size: 13px;
}

.dash {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 28px 60px;
  position: relative;
  z-index: 1;
}

.dash-hero {
  text-align: center;
  margin: 18px 0 34px;
}

.clock {
  font-family: var(--mono);
  font-size: 68px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.dash h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.dash .sub {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 32px;
}

.dash-hero .sub {
  margin: 12px 0 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.welcome-note {
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: rgba(143, 184, 222, 0.07);
  border: 1px solid rgba(143, 184, 222, 0.3);
  border-radius: 14px;
  padding: 13px 17px;
  margin-bottom: 22px;
}

.welcome-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.welcome-body {
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.dash-grid .full {
  grid-column: 1 / -1;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  transition: border-color 0.18s ease;
}

.card:hover {
  border-color: var(--accent-dim);
}

.card h2 {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-bottom: 16px;
}

.kv {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  font-size: 13.5px;
  border-bottom: 1px solid rgba(30, 35, 45, 0.6);
}

.kv:last-child {
  border-bottom: none;
}

.kv .k {
  color: var(--muted);
}

.kv .v {
  font-family: var(--mono);
  font-size: 12.5px;
}

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(143, 222, 170, 0.1);
  border: 1px solid rgba(143, 222, 170, 0.3);
  color: var(--ok);
}

.card p {
  color: var(--muted);
  font-size: 13.5px;
  margin-bottom: 14px;
}

.hsteps {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 8px;
}

.hsteps li {
  counter-increment: step;
  position: relative;
  padding-top: 42px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
}

.hsteps li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 550;
  color: var(--accent);
  background: rgba(143, 184, 222, 0.1);
  border: 1px solid rgba(143, 184, 222, 0.28);
  border-radius: 50%;
}

.hsteps li::after {
  content: "";
  position: absolute;
  top: 14px;
  left: 40px;
  right: -24px;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

.hsteps li:last-child::after {
  display: none;
}

.hstep-title {
  display: block;
  color: var(--text);
  font-weight: 550;
  font-size: 14px;
  margin-bottom: 4px;
}

.card code {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  background: rgba(143, 184, 222, 0.08);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
}

.card kbd {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 2px 7px;
}

.chat-widget {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  width: 320px;
  height: 460px;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.45);
}

.chat-head {
  text-align: center;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 12px 4px 4px 0;
}

.chat-empty {
  margin: auto;
  color: var(--muted);
  font-size: 13px;
}

.chat-msg {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.chat-name {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.chat-msg.self .chat-name {
  color: var(--accent);
}

.chat-admin {
  font-family: var(--mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  border: 1px solid rgba(143, 184, 222, 0.3);
  border-radius: 999px;
  padding: 0 6px;
}

.chat-time {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  margin-left: auto;
}

.chat-body {
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-error {
  display: none;
  color: var(--danger);
  font-size: 12px;
  margin: 8px 2px 0;
}

.chat-error.visible {
  display: block;
}

.chat-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.chat-form input {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  outline: none;
  transition: border-color 0.18s ease;
}

.chat-form input:focus {
  border-color: var(--accent-dim);
}

.chat-form .btn {
  padding: 10px 16px;
}

@media (max-width: 560px) {
  .chat-widget {
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    height: 55vh;
  }
}

.hidden {
  display: none !important;
}

body.gated > .gate-content {
  visibility: hidden;
}

body.gated.ready > .gate-content {
  visibility: visible;
}

.btn.danger {
  color: var(--danger);
  border-color: rgba(222, 143, 143, 0.3);
}

.btn.danger:hover {
  border-color: var(--danger);
  background: rgba(222, 143, 143, 0.08);
}

.btn.ghost {
  background: transparent;
}

.admin-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease;
}

.filter-tab:hover {
  color: var(--text);
}

.filter-tab.active {
  color: var(--text);
  border-color: var(--accent-dim);
  background: var(--card-hover);
}

.filter-tab .pill {
  font-family: var(--mono);
  font-size: 11px;
  background: rgba(143, 184, 222, 0.14);
  color: var(--accent);
  border-radius: 999px;
  padding: 1px 8px;
}

.admin-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 14px;
  transition: border-color 0.18s ease;
}

.admin-card:hover {
  border-color: var(--accent-dim);
}

.admin-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.admin-name {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.admin-tag {
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  border: 1px solid rgba(143, 184, 222, 0.3);
  border-radius: 999px;
  padding: 1px 8px;
  margin-left: 8px;
}

.status-badge {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 999px;
  padding: 2px 10px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.status-badge.s-pending {
  color: #dec98f;
  border-color: rgba(222, 201, 143, 0.3);
  background: rgba(222, 201, 143, 0.08);
}

.status-badge.s-approved {
  color: var(--ok);
  border-color: rgba(143, 222, 170, 0.3);
  background: rgba(143, 222, 170, 0.08);
}

.status-badge.s-banned {
  color: var(--danger);
  border-color: rgba(222, 143, 143, 0.3);
  background: rgba(222, 143, 143, 0.08);
}

.status-badge.s-denied {
  color: #dea98f;
  border-color: rgba(222, 169, 143, 0.3);
  background: rgba(222, 169, 143, 0.08);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(6, 8, 11, 0.72);
  backdrop-filter: blur(4px);
}

.modal {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
}

.modal h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.modal-sub {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.modal textarea {
  width: 100%;
  min-height: 96px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 11px 13px;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  resize: vertical;
  outline: none;
  transition: border-color 0.18s ease;
}

.modal textarea:focus {
  border-color: var(--accent-dim);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.deny-ring {
  width: 60px;
  height: 60px;
  margin: 0 auto 22px;
  border-radius: 50%;
  border: 2px solid rgba(222, 143, 143, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.deny-ring span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 12px rgba(222, 143, 143, 0.6);
}

.deny-reason {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 13px 15px;
  margin-bottom: 14px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-word;
}

.deny-countdown {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 24px;
}

.admin-meta {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 12px;
}

.admin-app {
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 12px 14px;
  margin-bottom: 14px;
  white-space: pre-wrap;
  word-break: break-word;
}

.admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-empty {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 40px 0;
}

@media (max-width: 720px) {
  .dash-grid {
    grid-template-columns: 1fr;
  }
  .hsteps {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .hsteps li {
    padding-top: 0;
    padding-left: 42px;
  }
  .hsteps li::before {
    top: -2px;
  }
  .hsteps li::after {
    display: none;
  }
}

@media (max-width: 560px) {
  .hero h1 {
    font-size: 34px;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .auth-card {
    padding: 26px 20px;
  }
}
