:root {
  --bg: #08070a;
  --panel: rgba(15, 13, 18, 0.82);
  --panel-strong: rgba(24, 20, 28, 0.95);
  --text: #fbf7fb;
  --muted: #c6bdc9;
  --line: rgba(255, 255, 255, 0.14);
  --accent: #e85d8f;
  --accent-2: #f4b266;
  --danger: #ff7d7d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Aptos Display", "Segoe UI Variable", "Trebuchet MS", ui-sans-serif, system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

button,
input,
textarea {
  font: inherit;
}

.landing-page {
  --landing-a: #e85d8f;
  --landing-b: #f4b266;
  --landing-c: #5e233f;
  --active-bg: var(--uploaded-bg, var(--landing-scene));
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 34px);
  overflow-x: hidden;
  background:
    linear-gradient(120deg, rgba(5, 3, 8, 0.74), rgba(5, 3, 8, 0.42)),
    var(--active-bg),
    radial-gradient(circle at 18% 12%, color-mix(in srgb, var(--landing-a) 32%, transparent), transparent 28rem),
    radial-gradient(circle at 82% 78%, color-mix(in srgb, var(--landing-b) 24%, transparent), transparent 30rem),
    conic-gradient(from 210deg at 50% 50%, #09070d, color-mix(in srgb, var(--landing-c) 70%, #09070d), #120814, #09070d);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.landing-shell {
  width: min(430px, 100%);
  min-height: min(720px, calc(100vh - 48px));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero-visual {
  display: none;
}

.verification-panel,
.admin-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
}

.verification-panel {
  width: 100%;
  padding: clamp(20px, 3vw, 32px);
  position: relative;
  z-index: 2;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
    rgba(15, 13, 18, 0.86);
}

.age-lock {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--text);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.stop-icon {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: #c71931;
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
  font-size: 11px;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.eyebrow {
  color: var(--accent-2);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
  margin: 0 0 14px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.panel-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.panel-head.compact {
  margin: 22px 0 14px;
}

.panel-head h1,
.panel-head h2 {
  font-size: clamp(23px, 3vw, 30px);
  margin-bottom: 6px;
}

.panel-head p {
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}

.step-dot {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #110c12;
  background: linear-gradient(135deg, var(--landing-a, var(--accent)), var(--landing-b, var(--accent-2)));
  flex: 0 0 auto;
  font-weight: 900;
}

.digit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.digit-button {
  aspect-ratio: 1.28;
  min-height: 58px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(9, 7, 11, 0.76);
  font-size: clamp(24px, 7vw, 34px);
  font-weight: 900;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.digit-button:hover,
.digit-button.selected {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--landing-b, var(--accent-2)) 74%, white);
  background: color-mix(in srgb, var(--landing-c, #2a1822) 76%, black);
}

.field-label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

input[type="email"],
input[type="text"],
input[type="password"],
input[type="url"],
input[type="file"],
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(8, 7, 10, 0.84);
  padding: 0 14px;
  outline: none;
}

input[type="file"] {
  padding: 12px 14px;
}

select {
  appearance: none;
}

textarea {
  min-height: 180px;
  padding: 14px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: color-mix(in srgb, var(--landing-a, var(--accent)) 72%, white);
}

.custom-html {
  color: var(--muted);
  margin-bottom: 16px;
}

.custom-html h1,
.custom-html h2,
.custom-html h3 {
  color: var(--text);
  margin-bottom: 8px;
}

.primary-button,
.ghost-button,
.tap-email-button {
  min-height: 46px;
  border: 0;
  cursor: pointer;
  font-weight: 900;
}

.primary-button {
  width: 100%;
  margin-top: 16px;
  color: #130c12;
  background: linear-gradient(135deg, var(--landing-a, var(--accent)), var(--landing-b, var(--accent-2)));
}

.continue-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.primary-button.narrow {
  width: auto;
  padding: 0 22px;
}

.tap-email-button {
  width: 100%;
  margin-bottom: 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid color-mix(in srgb, var(--landing-b, var(--accent-2)) 48%, transparent);
}

.tap-email-button:focus,
.tap-email-button:hover {
  background: rgba(255, 255, 255, 0.14);
}

.ghost-button {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  padding: 0 18px;
}

.ghost-link {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 0 18px;
}

.form-error,
.notice,
.access-granted,
.fast-status {
  color: var(--danger);
  background: rgba(255, 125, 125, 0.08);
  border: 1px solid rgba(255, 125, 125, 0.24);
  padding: 12px 14px;
}

.fast-status {
  color: #0d2a17;
  background: linear-gradient(135deg, #9bffd2, #f5ff96);
  border-color: rgba(155, 255, 210, 0.6);
  text-align: center;
  font-weight: 950;
  margin-bottom: 14px;
}

.access-granted {
  color: #0d2a17;
  background: linear-gradient(135deg, #6dff9a, #c7ff73);
  border-color: rgba(126, 255, 165, 0.6);
  font-size: 20px;
  font-weight: 950;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0;
  margin: 16px 0 4px;
}

.notice {
  color: var(--accent-2);
  border-color: rgba(242, 179, 109, 0.24);
  background: rgba(242, 179, 109, 0.08);
}

.theme-aurora {
  --landing-a: #e85d8f;
  --landing-b: #f4b266;
  --landing-c: #321721;
  --landing-scene: radial-gradient(ellipse at 30% 18%, rgba(238, 110, 154, 0.44), transparent 34%), radial-gradient(ellipse at 72% 62%, rgba(244, 178, 102, 0.2), transparent 36%), linear-gradient(135deg, #070507, #1d1018 48%, #070507);
}

.theme-velvet {
  --landing-a: #b91f50;
  --landing-b: #c99665;
  --landing-c: #2f0d18;
  --landing-scene: radial-gradient(ellipse at 52% 18%, rgba(185, 31, 80, 0.55), transparent 28%), repeating-linear-gradient(100deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 42px), linear-gradient(160deg, #080505, #2b0714 55%, #10070c);
}

.theme-noir {
  --landing-a: #f2f0e7;
  --landing-b: #7d91ff;
  --landing-c: #151724;
  --landing-scene: radial-gradient(ellipse at 58% 42%, rgba(242, 240, 231, 0.2), transparent 24%), linear-gradient(90deg, rgba(255,255,255,0.1), transparent 18% 82%, rgba(255,255,255,0.08)), linear-gradient(135deg, #030405, #171820 52%, #050506);
}

.theme-crimson {
  --landing-a: #ff315d;
  --landing-b: #ff8a4c;
  --landing-c: #3b0a12;
  --landing-scene: radial-gradient(circle at 45% 25%, rgba(255, 49, 93, 0.42), transparent 28%), linear-gradient(115deg, transparent 0 42%, rgba(255,255,255,0.1) 43%, transparent 44%), linear-gradient(150deg, #100306, #360914 58%, #070304);
}

.theme-glass {
  --landing-a: #64d2ff;
  --landing-b: #f3a5c8;
  --landing-c: #112637;
  --landing-scene: radial-gradient(ellipse at 60% 24%, rgba(100, 210, 255, 0.28), transparent 28%), linear-gradient(125deg, rgba(255,255,255,0.12), transparent 22% 72%, rgba(255,255,255,0.08)), linear-gradient(150deg, #05090d, #142637 55%, #070609);
}

.theme-smoke {
  --landing-a: #b693ff;
  --landing-b: #e7d6c7;
  --landing-c: #211b2b;
  --landing-scene: radial-gradient(ellipse at 50% 36%, rgba(182, 147, 255, 0.28), transparent 30%), radial-gradient(ellipse at 30% 70%, rgba(231, 214, 199, 0.12), transparent 28%), linear-gradient(145deg, #060507, #221a27 58%, #09080b);
}

.theme-gold {
  --landing-a: #f5c35b;
  --landing-b: #d54e7b;
  --landing-c: #33230f;
  --landing-scene: radial-gradient(circle at 62% 22%, rgba(245, 195, 91, 0.34), transparent 26%), repeating-linear-gradient(78deg, rgba(245,195,91,0.08) 0 2px, transparent 2px 54px), linear-gradient(135deg, #080604, #30220d 50%, #0a0507);
}

.theme-violet {
  --landing-a: #a259ff;
  --landing-b: #ff6b9e;
  --landing-c: #201038;
  --landing-scene: radial-gradient(ellipse at 48% 18%, rgba(162, 89, 255, 0.45), transparent 32%), linear-gradient(90deg, transparent 0 36%, rgba(255,255,255,0.08) 37%, transparent 38%), linear-gradient(160deg, #07040b, #201038 52%, #09040a);
}

.theme-silk {
  --landing-a: #ff416c;
  --landing-b: #d8b481;
  --landing-c: #351018;
  --landing-scene: radial-gradient(ellipse at 38% 20%, rgba(255, 65, 108, 0.42), transparent 30%), repeating-linear-gradient(105deg, rgba(255,255,255,0.06) 0 1px, transparent 1px 30px), linear-gradient(140deg, #090304, #39101a 58%, #090304);
}

.theme-blue {
  --landing-a: #3a86ff;
  --landing-b: #ffbe6b;
  --landing-c: #0d203d;
  --landing-scene: radial-gradient(ellipse at 58% 24%, rgba(58, 134, 255, 0.42), transparent 32%), radial-gradient(ellipse at 34% 78%, rgba(255, 190, 107, 0.15), transparent 26%), linear-gradient(150deg, #03060c, #102441 55%, #060409);
}

.admin-page {
  padding: 28px;
  background:
    radial-gradient(circle at 18% 10%, rgba(216, 95, 140, 0.18), transparent 28rem),
    radial-gradient(circle at 90% 90%, rgba(100, 210, 255, 0.12), transparent 28rem),
    #09070b;
}

.login-shell {
  min-height: calc(100vh - 56px);
  display: grid;
  place-items: center;
}

.login-card {
  width: min(420px, 100%);
  padding: 32px;
}

.login-card h1 {
  font-size: 34px;
}

.login-card input {
  margin-bottom: 14px;
}

.admin-header {
  width: min(1240px, 100%);
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.admin-header h1 {
  margin-bottom: 0;
  font-size: 34px;
}

.tabs {
  width: min(1240px, 100%);
  margin: 0 auto 18px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.tabs a {
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 12px 16px;
  background: rgba(20, 15, 24, 0.72);
  white-space: nowrap;
}

.tabs a.active {
  color: var(--text);
  border-color: rgba(216, 95, 140, 0.72);
  background: rgba(216, 95, 140, 0.16);
}

.admin-main {
  width: min(1240px, 100%);
  margin: 0 auto;
}

.admin-card {
  padding: 24px;
}

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

.section-title h2 {
  margin: 0;
}

.section-title span {
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
}

.lead-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.filter-tools {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.filter-tools .field-label {
  grid-column: 1 / -1;
}

.filter-tools textarea {
  min-height: 86px;
}

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

th,
td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  vertical-align: top;
}

th {
  color: var(--accent-2);
  font-size: 13px;
}

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

.landing-list {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.landing-row {
  display: grid;
  grid-template-columns: 1.2fr auto auto minmax(220px, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
}

.landing-row span,
.hint {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.landing-row label,
.toggle-line {
  white-space: nowrap;
}

.domains-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: start;
}

.toggle-box {
  border: 1px solid var(--line);
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
}

.add-landing-form,
.redirect-rules {
  display: grid;
  gap: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.code-box {
  font-family: Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.5;
}

.rule-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(220px, 1.2fr);
  gap: 12px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  border: 1px solid var(--line);
  padding: 18px;
  background: rgba(0, 0, 0, 0.18);
}

.stat-card h3 {
  margin-bottom: 16px;
}

.stat-number {
  font-size: 44px;
  font-weight: 900;
  color: var(--accent-2);
  margin-bottom: 18px;
}

.stat-line {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: 10px;
}

.stat-line span {
  color: var(--muted);
}

.redirect-form {
  max-width: 680px;
}

.campaign-form {
  max-width: none;
}

.campaign-list {
  display: grid;
  gap: 16px;
  margin: 18px 0;
}

.campaign-box {
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
  padding: 0;
}

.campaign-summary {
  display: grid;
  grid-template-columns: 30px minmax(180px, 1fr) minmax(170px, 0.9fr) minmax(220px, 1.1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  cursor: pointer;
  list-style: none;
}

.campaign-summary::-webkit-details-marker {
  display: none;
}

.campaign-summary::before {
  content: "+";
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--accent-2);
  grid-column: 1;
  grid-row: 1;
}

.campaign-summary strong {
  min-width: 0;
}

.campaign-box[open] .campaign-summary::before {
  content: "-";
}

.campaign-summary span {
  color: var(--muted);
}

.campaign-body {
  border-top: 1px solid var(--line);
  padding: 16px;
}

.redirect-rows {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.campaign-redirect-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 110px auto;
  gap: 10px;
  align-items: center;
}

.campaign-redirect-row input[type="hidden"] {
  display: none;
}

.campaign-redirect-row label {
  white-space: nowrap;
  color: var(--muted);
}

.hourly-chart {
  display: grid;
  gap: 10px;
}

.hour-row {
  display: grid;
  grid-template-columns: 150px minmax(220px, 1fr) 190px;
  gap: 12px;
  align-items: center;
  color: var(--muted);
}

.hour-bar {
  height: 18px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.26);
  overflow: hidden;
}

.hour-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.hourly-chart-large {
  margin-top: 18px;
}

@media (max-width: 860px) {
  .landing-page {
    --active-bg: var(--uploaded-bg-mobile, var(--uploaded-bg-tablet, var(--uploaded-bg, var(--landing-scene))));
    background-position: center;
  }

  .landing-page,
  .admin-page {
    padding: 12px;
  }

  .landing-shell {
    min-height: calc(100vh - 24px);
    align-content: center;
  }

  .hero-visual {
    display: none;
  }

  .verification-panel {
    width: min(460px, 100%);
    margin: 0 auto;
  }

  .digit-grid {
    gap: 8px;
  }

  .digit-button {
    min-height: 50px;
    aspect-ratio: 1.45;
  }

  .landing-row,
  .stats-grid,
  .domains-layout,
  .form-grid,
  .rule-row,
  .filter-tools,
  .campaign-redirect-row,
  .hour-row {
    grid-template-columns: 1fr;
  }

  .campaign-summary {
    grid-template-columns: 30px 1fr;
  }

}

@media (min-width: 861px) and (max-width: 1280px) {
  .landing-page {
    --active-bg: var(--uploaded-bg-tablet, var(--uploaded-bg, var(--landing-scene)));
  }
}


@media (max-width: 420px) {
  .verification-panel {
    padding: 16px;
  }

  .age-lock {
    margin-bottom: 12px;
  }

  .stop-icon {
    width: 42px;
    height: 42px;
  }

  .panel-head {
    margin-bottom: 12px;
  }

  .panel-head h1,
  .panel-head h2 {
    font-size: 22px;
  }

  .panel-head p {
    font-size: 14px;
  }
}
