:root {
  --bg: #100818;
  --text: #f7f3ff;
  --muted: #cfc3e6;
  --faint: #a898c8;
  --line: rgba(255, 255, 255, 0.12);
  --card: rgba(255, 255, 255, 0.055);
  --card-strong: rgba(28, 14, 48, 0.78);
  --magenta: #e879f9;
  --violet: #8b5cf6;
  --danger: #fb7185;
  --ok: #6ee7b7;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --max: 85%;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 520px at 88% 8%, rgba(168, 85, 247, 0.32), transparent 60%),
    radial-gradient(720px 480px at 8% -10%, rgba(217, 70, 239, 0.2), transparent 55%),
    radial-gradient(800px 520px at 70% 110%, rgba(88, 28, 135, 0.38), transparent 55%),
    var(--bg);
  line-height: 1.5;
}

body.admin,
body.auth {
  background:
    radial-gradient(800px 420px at 100% 0%, rgba(168, 85, 247, 0.22), transparent 55%),
    radial-gradient(640px 380px at 0% 0%, rgba(217, 70, 239, 0.12), transparent 50%),
    var(--bg);
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
.brand {
  font-family: Outfit, Inter, sans-serif;
  letter-spacing: -0.03em;
}

p {
  margin: 0;
}

::selection {
  background: rgba(217, 70, 239, 0.45);
  color: white;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(16, 8, 24, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.brand img {
  display: block;
  height: 40px;
  width: auto;
}

.footer-brand img {
  height: 32px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: white;
  background: linear-gradient(145deg, #e879f9, #7c3aed);
  box-shadow: 0 8px 20px rgba(168, 85, 247, 0.35);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: white;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: white;
  position: relative;
  border-radius: 2px;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-icon::before {
  top: -6px;
}

.nav-toggle-icon::after {
  top: 6px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease;
}

.btn-primary {
  color: white;
  background: linear-gradient(135deg, #d946ef 0%, #7c3aed 100%);
  box-shadow: 0 10px 24px rgba(168, 85, 247, 0.32);
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.btn-ghost {
  color: white;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.18);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
}

.btn-danger {
  color: #ffe4e6;
  background: rgba(244, 63, 94, 0.16);
  border-color: rgba(251, 113, 133, 0.4);
}

.btn-danger:hover {
  background: rgba(244, 63, 94, 0.28);
}

.btn:disabled {
  opacity: 0.7;
  cursor: progress;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(232, 121, 249, 0.35);
  background: rgba(232, 121, 249, 0.1);
  color: #f5d0fe;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-banner {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 680px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(8, 3, 16, 0.9) 0%, rgba(8, 3, 16, 0.72) 32%, rgba(8, 3, 16, 0.18) 54%, rgba(8, 3, 16, 0.05) 100%),
    url("../images/hero-banner.jpg") right center / cover no-repeat;
}

.hero-banner-content {
  position: relative;
  z-index: 1;
  padding: 88px 0 80px;
}

.hero-banner h1 {
  margin: 0;
  max-width: min(34rem, 70vw);
  font-size: clamp(2.5rem, 4.2vw, 3.7rem);
  line-height: 1.05;
  font-weight: 700;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}

.hero-banner h1 span {
  display: block;
  margin-top: 8px;
  color: var(--magenta);
}

.hero-banner h1 {
  max-width: min(33rem, 50vw);
}

.hero-banner .lede,
.hero-banner .proof {
  max-width: min(26rem, 40vw);
  color: #efe7ff;
}

.lede {
  max-width: 38rem;
  margin-top: 22px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
  padding: 0;
  list-style: none;
}

.proof li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(12, 6, 24, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #efe7ff;
  font-size: 0.92rem;
  font-weight: 600;
}

.proof svg {
  color: #e879f9;
}

.steps {
  padding: 28px 0 10px;
}

.steps h2,
.book h2,
.panel h2,
.auth-card h1,
.detail-head h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.15;
}

.section-copy {
  margin-top: 8px;
  color: var(--muted);
  max-width: 36rem;
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 22px;
}

.step {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
}

.step b {
  display: block;
  margin-bottom: 8px;
  color: #f0abfc;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.step h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.step p {
  color: var(--muted);
}

.book {
  padding: 54px 0 72px;
}

.form-card,
.confirm-card,
.panel,
.auth-card {
  border-radius: 24px;
  background: var(--card-strong);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.form-card,
.confirm-card {
  margin-top: 22px;
  padding: 28px;
}

.confirm-card h2 {
  margin-bottom: 10px;
}

.confirm-card p {
  color: var(--muted);
  max-width: 38rem;
}

.confirm-card .btn {
  margin-top: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 18px;
  margin-top: 22px;
}

.span-2 {
  grid-column: 1 / -1;
}

.field,
fieldset.field {
  margin: 0;
  border: 0;
  padding: 0;
  min-width: 0;
}

.field label,
.field legend,
.filters label,
.stack label {
  display: block;
  margin-bottom: 8px;
  color: #efe7ff;
  font-size: 0.92rem;
  font-weight: 600;
}

.optional {
  color: var(--faint);
  font-weight: 500;
}

input:not([type]),
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="date"],
input[type="datetime-local"],
input[type="number"],
select,
textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  padding: 12px 14px;
  outline: none;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

input[type="number"] {
  appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #e879f9;
  box-shadow: 0 0 0 3px rgba(217, 70, 239, 0.25);
}

select {
  color-scheme: light;
  appearance: none;
  color: #f7f3ff;
  background-color: #2a1840;
  background-image:
    linear-gradient(45deg, transparent 50%, #efe7ff 50%),
    linear-gradient(135deg, #efe7ff 50%, transparent 50%);
  background-position:
    calc(100% - 20px) calc(50% - 2px),
    calc(100% - 14px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 40px;
}

select option {
  color: #1a1028;
  background-color: #ffffff;
}

@supports (appearance: base-select) {

  select,
  select::picker(select) {
    appearance: base-select;
  }

  select {
    color-scheme: dark;
    background-image: none;
    padding-right: 14px;
  }

  select::picker-icon {
    color: #efe7ff;
  }

  select::picker(select) {
    background: #2a1840;
    color: #f7f3ff;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
  }

  select option {
    color: #f7f3ff;
    background: transparent;
    padding: 8px 12px;
    border-radius: 8px;
  }

  select option:hover,
  select option:focus,
  select option:checked {
    background: #4a2d72;
    color: #ffffff;
  }
}

.choices,
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.choice {
  position: relative;
}

.choice input {
  position: absolute;
  opacity: 0;
  inset: 0;
}

.choice span {
  display: block;
  min-width: 120px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.choice input:checked+span {
  border-color: #e879f9;
  background: rgba(217, 70, 239, 0.14);
}

.choice input:focus-visible+span {
  outline: 2px solid #f0abfc;
  outline-offset: 2px;
}

.field-error {
  margin: 6px 0 0;
  color: #fecdd3;
  font-size: 0.86rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}

.fine {
  color: var(--faint);
  font-size: 0.88rem;
}

.hp {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 22px 0 28px;
  color: var(--faint);
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer a {
  color: #f0abfc;
}

.alert {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

.alert-success {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(110, 231, 183, 0.35);
  color: #d1fae5;
}

.alert-error {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(251, 113, 133, 0.4);
  color: #ffe4e6;
}

.admin-bar {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 72px;
  padding: 0 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(16, 8, 24, 0.8);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin: auto;
}

.admin-nav a {
  color: var(--muted);
  font-size: 14px;
}

.admin-nav a.is-active,
.admin-nav a:hover {
  color: white;
  font-weight: 600;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}

.user-menu {
  position: relative;
}

.user-button {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.user-avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #e879f9, #7c3aed);
  color: white;
  font-weight: 700;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  padding: 12px;
  border-radius: 16px;
  background: #1c1028;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
}

.user-dropdown-name {
  font-weight: 700;
}

.user-dropdown-role,
.user-dropdown .fine {
  color: var(--faint);
  font-size: 0.85rem;
}

.user-dropdown a,
.user-dropdown button {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 8px 0 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: #f0abfc;
  text-align: left;
  font-weight: 600;
  cursor: pointer;
}

.bulk-bar,
.inline-form,
.button-row,
.step-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin-bottom: 12px;
}

.bulk-bar select,
.inline-form select,
.step-row select,
.step-row input {
  min-width: 180px;
}

.check-col {
  width: 48px;
  text-align: center;
}

table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #d946ef;
}

.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.mail-panel {
  margin-top: 16px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.team-card h2 {
  margin-bottom: 8px;
}

.team-now {
  display: flex;
  gap: 16px;
  color: var(--muted);
  margin-bottom: 10px;
}

.link-list {
  margin: 8px 0 0;
  padding-left: 18px;
}

.admin-main {
  width: min(85%, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 18px;
}

.page-head h1,
.detail-head h1 {
  margin: 0;
  font-size: 2rem;
}

.detail-head {
  margin: 12px 0 16px;
}

.narrow {
  max-width: 520px;
}

.page-head p,
.detail-head p {
  color: var(--muted);
  margin-top: 4px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.stat {
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
}

.stat span {
  color: var(--faint);
  font-size: 0.85rem;
  font-weight: 600;
}

.stat strong {
  display: block;
  margin-top: 4px;
  font-family: Outfit, Inter, sans-serif;
  font-size: 1.7rem;
}

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.panel {
  padding: 8px;
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

th,
td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: middle;
  white-space: nowrap;
}

th {
  color: #d8c8f5;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.035);
}

td a {
  font-weight: 600;
}

td a:hover {
  color: #f0abfc;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  color: #efe7ff;
  white-space: nowrap;
}

.badge-new {
  background: rgba(217, 70, 239, 0.18);
  color: #f5d0fe;
}

.badge-contacted {
  background: rgba(99, 102, 241, 0.22);
  color: #c7d2fe;
}

.badge-follow_up {
  background: rgba(245, 158, 11, 0.18);
  color: #fde68a;
}

.badge-demo_scheduled {
  background: rgba(34, 211, 238, 0.16);
  color: #a5f3fc;
}

.badge-qualified {
  background: rgba(52, 211, 153, 0.16);
  color: #a7f3d0;
}

.badge-closed_won {
  background: rgba(16, 185, 129, 0.22);
  color: #d1fae5;
}

.badge-closed_lost {
  background: rgba(148, 163, 184, 0.16);
  color: #e2e8f0;
}

.overdue {
  color: #fda4af;
  font-weight: 600;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  padding: 14px;
}

.pager a,
.pager span {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--muted);
}

.pager a {
  border: 1px solid var(--line);
}

.pager a:hover,
.pager a.is-current {
  color: white;
  border-color: #e879f9;
  background: rgba(217, 70, 239, 0.16);
}

.empty {
  padding: 36px 20px;
  text-align: center;
}

.empty h2 {
  margin: 0 0 8px;
  font-size: 1.4rem;
}

.empty p {
  color: var(--muted);
}

.detail-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 16px;
  align-items: start;
}

.stack {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.meta {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
}

.meta div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.meta dt {
  color: var(--faint);
  font-size: 0.86rem;
}

.meta dd {
  margin: 0;
}

.prose {
  white-space: pre-wrap;
}

.timeline {
  display: grid;
  gap: 12px;
  margin-top: 8px;
  max-height: 300px;
  overflow: auto;
}

.note {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.note header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--faint);
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.danger-zone {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.back {
  color: #f0abfc;
  font-weight: 600;
  font-size: 0.92rem;
}

.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(440px, 100%);
  padding: 28px;
}

.auth-card .brand {
  margin-bottom: 22px;
}

.auth-card h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.auth-card .lede {
  margin-top: 0;
  margin-bottom: 18px;
}

.auth-card .stack {
  padding: 0;
}

.auth-card .btn {
  width: 100%;
  margin-top: 6px;
}

@media (max-width: 980px) {
  .hero-banner {
    align-items: flex-end;
    min-height: 820px;
    background:
      linear-gradient(180deg, rgba(8, 3, 16, 0.12) 0%, rgba(8, 3, 16, 0.28) 38%, rgba(8, 3, 16, 0.9) 64%, rgba(8, 3, 16, 0.96) 100%),
      url("../images/hero-banner.jpg") 72% 8% / cover no-repeat;
  }

  .hero-banner-content {
    padding: 360px 0 48px;
  }

  .hero-banner h1,
  .hero-banner .lede,
  .hero-banner .proof {
    max-width: 36rem;
  }

  .step-grid,
  .detail-grid,
  .stats,
  .filters {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .wrap {
    width: min(var(--max), calc(100% - 28px));
  }

  .nav-toggle {
    display: inline-block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 76px;
    left: 14px;
    right: 14px;
    padding: 14px;
    flex-direction: column;
    align-items: stretch;
    border-radius: 16px;
    background: #1a0d2b;
    border: 1px solid var(--line);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav {
    position: relative;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .hero-banner {
    min-height: 760px;
  }

  .hero-banner-content {
    padding: 320px 0 36px;
  }

  .hero-banner h1 {
    font-size: 2.45rem;
  }

  .admin-bar {
    flex-wrap: wrap;
    padding: 12px;
  }

  .admin-nav {
    order: 3;
    width: 100%;
  }

  .meta div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .form-card {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn-primary:hover {
    transform: none;
  }
}