:root {
  color-scheme: light;
  --ink: #0c111d;
  --ink-2: #182230;
  --muted: #667085;
  --line: #d7dce5;
  --paper: #ffffff;
  --soft: #f4f7fb;
  --soft-2: #edf3f8;
  --blue: #2f6fed;
  --coral: #ff4d55;
  --mint: #1fb087;
  --yellow: #f3bf2f;
  --violet: #6f5cff;
  --shadow: 0 28px 90px rgba(16, 24, 40, 0.18);
  --soft-shadow: 0 18px 48px rgba(16, 24, 40, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #f7f9fc 0%, #f1f5f9 44%, #ffffff 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

.shell {
  min-height: 100vh;
  overflow: hidden;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(215, 220, 229, 0.78);
  background: rgba(247, 249, 252, 0.86);
  backdrop-filter: blur(22px);
}

.topbar-inner,
.hero,
.section,
.footer {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-weight: 950;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  box-shadow: 0 16px 34px rgba(12, 17, 29, 0.25);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button,
.ghost-button,
.primary-button,
.copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, border-color 150ms ease;
}

.icon-button {
  width: 44px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
}

.ghost-button {
  padding: 0 17px;
  background: var(--ink);
  color: white;
  font-weight: 850;
  text-decoration: none;
  box-shadow: 0 16px 36px rgba(12, 17, 29, 0.18);
}

.primary-button,
.copy-button {
  width: 100%;
  border: 0;
  padding: 0 18px;
  background: var(--coral);
  color: white;
  font-weight: 900;
  box-shadow: 0 18px 40px rgba(255, 77, 85, 0.3);
}

.creator-panel .primary-button {
  min-height: 54px;
  background: linear-gradient(135deg, var(--coral), #ff7a45);
}

.primary-button:hover,
.copy-button:hover,
.ghost-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 456px);
  gap: 54px;
  align-items: center;
  padding: 62px 0 50px;
}

.hero-copy {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  padding: 8px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 32px;
  margin-bottom: 19px;
  padding: 0 12px;
  border: 1px solid rgba(47, 111, 237, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--blue);
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
  box-shadow: var(--soft-shadow);
}

.eyebrow::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: var(--yellow);
  box-shadow: 0 0 0 4px rgba(243, 191, 47, 0.16);
}

h1 {
  max-width: 680px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(40px, 4.6vw, 64px);
  line-height: 1.04;
  letter-spacing: 0;
  text-wrap: balance;
}

.lead {
  max-width: 590px;
  margin: 22px 0 0;
  color: #475467;
  font-size: 18px;
  line-height: 1.72;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 30px;
}

.metric,
.panel,
.card,
.admin-card {
  border: 1px solid rgba(215, 220, 229, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
}

.metric {
  position: relative;
  min-height: 78px;
  padding: 14px 15px 14px 17px;
  overflow: hidden;
  border-color: rgba(215, 220, 229, 0.9);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.06);
}

.metric::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--blue);
}

.metric:nth-child(2) {
  border-color: rgba(215, 220, 229, 0.9);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.06);
}

.metric:nth-child(2)::before {
  background: var(--yellow);
}

.metric:nth-child(3) {
  border-color: rgba(215, 220, 229, 0.9);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.06);
}

.metric:nth-child(3)::before {
  background: var(--mint);
}

.metric strong {
  position: relative;
  display: block;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.15;
}

.metric span {
  position: relative;
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.panel {
  position: relative;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 253, 0.93)),
    var(--paper);
  box-shadow: 0 20px 56px rgba(16, 24, 40, 0.12);
}

.creator-panel {
  grid-column: 2;
  grid-row: 1;
  isolation: isolate;
  border-color: rgba(47, 111, 237, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 251, 255, 0.96)),
    var(--paper);
  box-shadow: 0 24px 70px rgba(16, 24, 40, 0.14);
}

.creator-panel::before {
  display: none;
}

.creator-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.window-dots {
  display: inline-flex;
  gap: 6px;
}

.window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: var(--coral);
}

.window-dots span:nth-child(2) {
  background: var(--yellow);
}

.window-dots span:nth-child(3) {
  background: var(--mint);
}

.creator-label {
  color: #175cd3;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.route-strip {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 0 0 15px;
  padding: 9px 10px;
  border: 1px solid rgba(47, 111, 237, 0.16);
  border-radius: 8px;
  background: #f4f8ff;
  color: var(--ink);
}

.route-node {
  overflow: hidden;
  color: #667085;
  font-size: 12px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-arrow {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #175cd3;
  color: white;
}

.input-group {
  display: grid;
  gap: 8px;
  margin-bottom: 13px;
}

.input-group label {
  color: var(--ink-2);
  font-weight: 900;
  font-size: 14px;
}

.creator-panel .input-group label {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

input,
textarea,
select {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  outline: none;
  padding: 0 15px;
}

.creator-panel input {
  min-height: 52px;
  border-color: rgba(47, 111, 237, 0.22);
  background: #fbfdff;
  font-weight: 760;
}

textarea {
  min-height: 128px;
  padding-top: 13px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(47, 111, 237, 0.16);
}

.preview {
  margin: 6px 0 8px;
  padding: 12px;
  border: 1px solid rgba(47, 111, 237, 0.26);
  border-radius: 8px;
  background: #ecf4ff;
  color: #175cd3;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.hint,
.status {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.status {
  min-height: 18px;
  margin: 9px 0;
}

.status.ok {
  color: var(--mint);
  font-weight: 900;
}

.status.error {
  color: #d92d20;
  font-weight: 900;
}

.result {
  display: none;
  gap: 10px;
  margin-top: 16px;
}

.result.visible {
  display: grid;
}

.qr-result,
.upgrade-result {
  display: none;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(47, 111, 237, 0.16);
  border-radius: 8px;
  background: #f6f9ff;
}

.qr-result.visible,
.upgrade-result.visible {
  display: grid;
}

.qr-result.visible {
  grid-template-columns: 118px minmax(0, 1fr);
  align-items: center;
}

.qr-frame {
  display: grid;
  place-items: center;
  width: 118px;
  height: 118px;
  border: 1px solid rgba(215, 220, 229, 0.9);
  border-radius: 8px;
  background: white;
}

.qr-frame img {
  width: 96px;
  height: 96px;
}

.qr-copy strong,
.upgrade-result strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
}

.qr-copy p,
.upgrade-result p {
  margin: 6px 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

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

.mini-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid rgba(47, 111, 237, 0.18);
  border-radius: 8px;
  background: white;
  color: #175cd3;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.upgrade-result.visible {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  background: #fff9ed;
  border-color: rgba(243, 191, 47, 0.28);
}

.upgrade-action {
  min-width: 150px;
  border-color: rgba(255, 77, 85, 0.22);
  background: #fff;
  color: #d92d20;
}

.upgrade-action:disabled {
  color: #047857;
  cursor: default;
  opacity: 0.85;
}

.section {
  padding: 52px 0;
}

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

h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.08;
  text-wrap: balance;
}

.section-kicker {
  margin: 10px 0 0;
  max-width: 620px;
  color: var(--muted);
  line-height: 1.6;
}

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

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  gap: 18px;
}

.card {
  position: relative;
  min-height: 192px;
  padding: 22px;
  overflow: hidden;
  border-color: rgba(215, 220, 229, 0.88);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 16px 42px rgba(16, 24, 40, 0.07);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--blue);
}

.card::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: rgba(47, 111, 237, 0.08);
}

.card .symbol {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  margin-bottom: 20px;
  background: var(--ink);
  color: white;
  font-weight: 950;
}

.card:nth-child(2) .symbol {
  background: var(--blue);
}

.card:nth-child(2) {
  border-color: rgba(215, 220, 229, 0.88);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 16px 42px rgba(16, 24, 40, 0.07);
}

.card:nth-child(2)::before {
  background: var(--yellow);
}

.card:nth-child(2)::after {
  background: rgba(243, 191, 47, 0.1);
}

.card:nth-child(3) .symbol {
  background: var(--mint);
}

.card:nth-child(3) {
  border-color: rgba(215, 220, 229, 0.88);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 16px 42px rgba(16, 24, 40, 0.07);
}

.card:nth-child(3)::before {
  background: var(--mint);
}

.card:nth-child(3)::after {
  background: rgba(31, 176, 135, 0.1);
}

.card h3,
.admin-card h3 {
  position: relative;
  margin: 0 0 10px;
  font-size: 20px;
}

.card p,
.empty {
  position: relative;
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}

.link-list {
  display: grid;
  gap: 10px;
}

.link-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  min-height: 58px;
  padding: 14px 16px;
  border: 1px solid rgba(215, 220, 229, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.05);
}

.link-row a {
  color: #175cd3;
  font-weight: 780;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.link-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 42px;
  min-height: 30px;
  justify-content: center;
  border-radius: 999px;
  background: #f2f4f7;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.feedback-panel {
  padding: 22px;
  border-color: rgba(215, 220, 229, 0.9);
  background: rgba(255, 255, 255, 0.88);
}

.form-grid {
  display: grid;
  gap: 12px;
}

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

details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  padding: 17px;
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.05);
}

summary {
  cursor: pointer;
  font-weight: 900;
}

details p {
  color: var(--muted);
  line-height: 1.65;
}

.footer {
  padding: 32px 0 52px;
  color: var(--muted);
  text-align: center;
}

.admin-shell {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 70px 0;
}

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

.admin-dashboard {
  display: none;
}

.admin-dashboard.visible {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.admin-sidebar {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--soft-shadow);
}

.admin-tabs {
  display: grid;
  gap: 8px;
}

.admin-tab {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
  text-align: left;
  padding: 0 12px;
}

.admin-tab.is-active {
  border-color: rgba(47, 111, 237, 0.24);
  background: #ecf4ff;
  color: #175cd3;
}

.admin-content {
  min-width: 0;
}

.admin-panel {
  display: none;
}

.admin-panel.is-active {
  display: block;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.admin-card {
  padding: 18px;
  box-shadow: var(--soft-shadow);
}

.admin-card strong {
  display: block;
  font-size: 28px;
  line-height: 1.15;
  margin-top: 6px;
  overflow-wrap: anywhere;
}

.admin-section {
  margin-top: 34px;
}

.section-heading.compact {
  align-items: start;
}

.ad-admin-section {
  display: grid;
  gap: 16px;
}

.monetization-section {
  display: grid;
  gap: 16px;
}

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

.limit-strip > div {
  min-height: 72px;
  padding: 14px;
  border: 1px solid rgba(215, 220, 229, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--soft-shadow);
}

.limit-strip span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.limit-strip strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 20px;
  overflow-wrap: anywhere;
}

.monetization-form {
  display: grid;
  gap: 14px;
  padding: 18px;
  box-shadow: var(--soft-shadow);
}

.monetization-form h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 18px;
}

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

.toggle-grid .check-row {
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid rgba(215, 220, 229, 0.9);
  border-radius: 8px;
  background: #f8fbff;
}

.ad-form {
  padding: 18px;
  box-shadow: var(--soft-shadow);
}

.search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 140px;
  gap: 12px;
  align-items: end;
  padding: 18px;
  box-shadow: var(--soft-shadow);
}

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

.field {
  display: grid;
  gap: 7px;
}

.field > span {
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 900;
}

.form-row:has(input[type="date"]) {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.check-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  font-weight: 850;
}

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

.ad-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ad-empty {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.ad-table th:first-child,
.ad-table td:first-child {
  width: 70px;
}

.ad-table th:last-child,
.ad-table td:last-child {
  width: 180px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 8px;
  background: white;
  box-shadow: var(--soft-shadow);
}

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

.admin-table th {
  color: var(--muted);
  font-size: 13px;
}

.admin-table td {
  overflow-wrap: anywhere;
}

.admin-table th:first-child,
.admin-table td:first-child {
  width: 110px;
}

.admin-table th:nth-child(3),
.admin-table td:nth-child(3) {
  width: 120px;
}

.admin-table th:last-child,
.admin-table td:last-child {
  width: 210px;
}

.table-action {
  min-height: 34px;
  margin-right: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink);
  color: white;
  font-weight: 850;
  cursor: pointer;
}

.table-action.popular-hide {
  background: var(--blue);
  border-color: rgba(47, 111, 237, 0.26);
}

.table-action.popular-show,
.table-action.danger-action {
  background: #d92d20;
  border-color: rgba(217, 45, 32, 0.28);
}

.table-action:disabled {
  cursor: wait;
  opacity: 0.65;
}

.visibility-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(31, 176, 135, 0.12);
  color: #047857;
  font-size: 12px;
  font-weight: 900;
}

.visibility-chip.is-hidden {
  background: rgba(255, 77, 85, 0.12);
  color: #b42318;
}

.hidden {
  display: none !important;
}

@media (max-width: 960px) {
  .hero,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .creator-panel,
  .hero-copy {
    grid-column: 1;
    grid-row: auto;
  }

  .hero {
    padding-top: 44px;
  }
}

@media (max-width: 720px) {
  body {
    background-size: auto;
  }

  .topbar-inner,
  .hero,
  .section,
  .footer {
    width: min(100% - 28px, 1180px);
  }

  .topbar-inner {
    min-height: 64px;
  }

  .ghost-button {
    display: none;
  }

  .hero {
    gap: 30px;
    padding: 38px 0 34px;
  }

  h1 {
    font-size: clamp(38px, 12vw, 52px);
    line-height: 1.02;
  }

  .lead {
    font-size: 16px;
  }

  .hero-metrics,
  .grid-3,
  .legal,
  .admin-grid,
  .admin-dashboard.visible,
  .search-form,
  .form-row,
  .form-row:has(input[type="date"]),
  .limit-strip,
  .toggle-grid,
  .qr-result.visible,
  .upgrade-result.visible {
    grid-template-columns: 1fr;
  }

  .qr-frame {
    width: 100%;
  }

  .upgrade-action {
    width: 100%;
  }

  .admin-sidebar {
    position: static;
  }

  .admin-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .route-strip {
    display: none;
  }

  .admin-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
