:root {
  color-scheme: dark;
  --bg: #070711;
  --panel: #11101f;
  --panel-2: #19162d;
  --text: #f6f8fb;
  --muted: #b7aee5;
  --line: #352b58;
  --accent: #9b4dff;
  --accent-2: #35c8ff;
  --accent-dark: #130822;
  --danger: #ff5c7a;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 28% 0%, rgba(155, 77, 255, 0.24), transparent 30rem),
    radial-gradient(circle at 82% 26%, rgba(53, 200, 255, 0.11), transparent 24rem),
    linear-gradient(180deg, #070711 0%, #0d0b18 48%, #070711 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(7, 7, 17, 0.82);
  backdrop-filter: blur(18px);
}

.brand {
  color: var(--text);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
}

.brand span {
  color: var(--accent);
}

.logo-brand {
  display: inline-flex;
  align-items: center;
}

.logo-brand img {
  display: block;
  width: auto;
  height: 48px;
  object-fit: contain;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav a {
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
}

.nav-button {
  min-height: auto;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 400;
  padding: 0;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.simple-home {
  display: grid;
  justify-items: center;
  align-content: start;
  min-height: 100vh;
  padding: clamp(28px, 6vh, 58px) 0 56px;
}

.home-logo {
  display: block;
  width: min(320px, 72vw);
  margin: -56px 0 -30px;
  text-decoration: none;
}

.home-logo img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 44px rgba(155, 77, 255, 0.24));
}

.simple-home .create-panel {
  width: min(560px, 100%);
}

.simple-copy {
  width: min(620px, 100%);
  margin: clamp(22px, 4vh, 30px) auto 0;
  color: #d9dcf4;
  font-size: clamp(1.25rem, 3vw, 1.9rem);
  font-weight: 900;
  letter-spacing: 0.28em;
  line-height: 1.28;
  text-align: center;
  text-transform: uppercase;
}

.simple-copy span {
  color: #d8dbf0;
}

.simple-copy strong {
  color: var(--accent);
  font-weight: 900;
  text-shadow: 0 0 22px rgba(155, 77, 255, 0.26);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(340px, 0.75fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: center;
  min-height: 72vh;
  padding: 48px 0;
}

.public-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(300px, 0.7fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 90px);
  padding: 48px 0;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(4rem, 12vw, 9rem);
  line-height: 0.88;
  letter-spacing: 0;
}

.hero-logo {
  display: block;
  width: min(430px, 84vw);
  height: auto;
  margin: -82px auto -96px;
  filter: drop-shadow(0 20px 44px rgba(155, 77, 255, 0.26));
}

.logo-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: min(520px, 92vw);
  min-height: 310px;
  margin: 18px 0 16px;
  overflow: hidden;
  border: 1px solid rgba(155, 77, 255, 0.22);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 48%, rgba(155, 77, 255, 0.26), transparent 17rem),
    radial-gradient(circle at 38% 36%, rgba(53, 200, 255, 0.14), transparent 12rem),
    linear-gradient(135deg, rgba(25, 16, 50, 0.78), rgba(8, 7, 18, 0.58));
  box-shadow: 0 26px 80px rgba(10, 6, 28, 0.42);
}

.logo-stage::after {
  content: "";
  position: absolute;
  inset: auto 14% 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(155, 77, 255, 0.76), rgba(53, 200, 255, 0.5), transparent);
}

.hero-copy p:not(.eyebrow) {
  max-width: 620px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.65;
}

.hero-copy .slogan {
  max-width: 620px;
  margin: 0;
  color: #d7ccff;
  font-size: clamp(1.35rem, 3vw, 2.2rem);
  font-weight: 800;
  line-height: 1.18;
}

.hero-support {
  max-width: 580px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.6;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-chips span {
  padding: 9px 12px;
  border: 1px solid rgba(155, 77, 255, 0.34);
  border-radius: 999px;
  background: rgba(155, 77, 255, 0.1);
  color: #eee9ff;
  font-size: 0.9rem;
  font-weight: 800;
}

.flow-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: -28px 0 56px;
}

.flow-strip div {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid rgba(155, 77, 255, 0.2);
  border-radius: 8px;
  background: rgba(17, 16, 31, 0.58);
}

.flow-strip span {
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.flow-strip strong {
  color: #f4f0ff;
  font-size: 1.08rem;
}

.flow-strip p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.48;
}

.public-actions {
  display: flex;
  margin-top: 28px;
}

.public-preview {
  display: grid;
  gap: 18px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(31, 24, 57, 0.96), rgba(14, 12, 27, 0.96)),
    #11101f;
  box-shadow: var(--shadow);
}

.preview-bar {
  width: 46%;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
}

.preview-line {
  width: 76%;
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.preview-line.strong {
  width: 92%;
  height: 20px;
  background: rgba(255, 255, 255, 0.18);
}

.preview-card {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 18px;
  border: 1px solid rgba(155, 77, 255, 0.42);
  border-radius: 8px;
  background: rgba(155, 77, 255, 0.14);
}

.preview-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.create-panel,
.dialog-panel,
.login-panel,
.redirect-panel {
  display: grid;
  gap: 18px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(31, 24, 57, 0.96), rgba(14, 12, 27, 0.96));
  box-shadow: var(--shadow);
}

.create-panel {
  position: relative;
}

.create-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

label {
  display: grid;
  gap: 8px;
  color: #d7deea;
  font-size: 0.9rem;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0a15;
  color: var(--text);
  font: inherit;
  outline: none;
  padding: 0 14px;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(155, 77, 255, 0.18);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

button,
.destination {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(155, 77, 255, 0.28);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 0 16px;
  text-decoration: none;
}

button:hover,
.destination:hover {
  filter: brightness(1.08);
}

.ghost,
.copy-button {
  border: 1px solid var(--line);
  background: #0d0b18;
  color: var(--text);
}

.danger {
  background: rgba(255, 92, 122, 0.13);
  color: #ff9aac;
  border: 1px solid rgba(255, 92, 122, 0.36);
}

.form-message {
  min-height: 22px;
  margin: 0;
  color: var(--accent-2);
  font-size: 0.92rem;
}

.form-message:empty {
  display: none;
}

.result-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(53, 200, 255, 0.38);
  border-radius: 8px;
  background: rgba(53, 200, 255, 0.1);
}

.result-panel[hidden] {
  display: none;
}

.result-panel span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.result-panel a {
  overflow: hidden;
  color: var(--text);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 52px;
}

.stats-strip div {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(17, 16, 31, 0.72);
}

.stats-strip span {
  font-size: 2rem;
  font-weight: 800;
}

.stats-strip p {
  margin: 6px 0 0;
  color: var(--muted);
}

.admin {
  padding-bottom: 64px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.section-heading input {
  max-width: 320px;
}

.table-shell {
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(17, 16, 31, 0.82);
}

table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
}

th,
td {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.short-cell,
.row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.destination-cell {
  display: grid;
  gap: 4px;
  max-width: 420px;
}

.destination-cell a {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.88rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.select-toggle {
  border: 1px solid var(--line);
  background: #0d0b18;
  color: var(--muted);
}

.select-toggle.active {
  border-color: rgba(155, 77, 255, 0.65);
  background: rgba(155, 77, 255, 0.18);
  color: var(--accent);
}

.empty-state {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

dialog {
  width: min(640px, calc(100% - 28px));
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
}

.dialog-panel {
  width: 100%;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.icon-button {
  width: 42px;
  min-height: 42px;
  padding: 0;
}

.check-row {
  display: flex;
  grid-template-columns: auto 1fr;
  align-items: center;
}

.check-row input {
  width: 18px;
  min-height: 18px;
}

.redirect-page {
  display: grid;
  place-items: center;
}

.login-page {
  display: grid;
  place-items: center;
}

.login-shell {
  display: grid;
  gap: 28px;
  width: min(460px, calc(100% - 32px));
}

.login-panel h1 {
  margin: 0;
  font-size: clamp(2.4rem, 8vw, 4.6rem);
}

.redirect-shell {
  display: grid;
  width: min(560px, calc(100% - 32px));
}

.redirect-panel {
  position: relative;
  overflow: hidden;
  text-align: center;
  gap: 18px;
  padding: clamp(26px, 5vw, 44px);
}

.redirect-panel h1 {
  margin: 0;
  font-size: clamp(2.4rem, 8vw, 4.7rem);
  line-height: 1;
}

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

.redirect-logo,
.panel-logo {
  display: block;
  width: min(210px, 54vw);
  height: auto;
  margin: -42px auto -50px;
  filter: drop-shadow(0 22px 42px rgba(155, 77, 255, 0.22));
}

.panel-logo {
  width: min(190px, 52vw);
  margin-bottom: -42px;
}

.redirect-panel::after,
.login-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 9%, rgba(155, 77, 255, 0.16), transparent 17rem),
    radial-gradient(circle at 80% 32%, rgba(53, 200, 255, 0.08), transparent 15rem);
}

.redirect-panel > *,
.login-panel > * {
  position: relative;
  z-index: 1;
}

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .logo-stage {
    width: 100%;
    min-height: 260px;
  }

  .hero-logo {
    width: min(360px, 90vw);
    margin: -70px auto -84px;
  }

  .flow-strip {
    grid-template-columns: 1fr;
    margin: 0 0 44px;
  }

  .simple-home {
    min-height: 100vh;
    padding: 28px 0 42px;
  }

  .home-logo {
    width: min(270px, 78vw);
    margin: -48px 0 -26px;
  }

  .simple-copy {
    font-size: clamp(1rem, 5vw, 1.35rem);
    letter-spacing: 0.16em;
  }

  .public-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .stats-strip,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .section-heading input {
    max-width: none;
  }

  .topbar {
    align-items: center;
  }
}
