:root {
  --bg-1: #070b14;
  --bg-2: #0d1424;
  --panel: rgba(15, 24, 42, 0.72);
  --panel-strong: rgba(13, 20, 36, 0.9);
  --ink: #e6edf7;
  --muted: #9aa8be;
  --line: rgba(143, 179, 255, 0.28);
  --line-strong: rgba(143, 179, 255, 0.52);
  --accent: #1fd2ff;
  --accent-soft: rgba(31, 210, 255, 0.18);
  --accent-2: #6f8cff;
  --danger: #ff5f7a;
  --shadow-deep: 0 28px 65px rgba(0, 0, 0, 0.5);
  --shadow-edge: 0 0 0 1px rgba(143, 179, 255, 0.18), 0 0 36px rgba(31, 210, 255, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Sora", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 15%, rgba(111, 140, 255, 0.22) 0%, rgba(111, 140, 255, 0) 35%),
    radial-gradient(circle at 85% 80%, rgba(31, 210, 255, 0.18) 0%, rgba(31, 210, 255, 0) 40%),
    linear-gradient(145deg, var(--bg-1) 0%, var(--bg-2) 55%, #050912 100%);
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

body::before {
  background-image:
    linear-gradient(rgba(143, 179, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 179, 255, 0.08) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at center, black 35%, transparent 90%);
}

body::after {
  background: radial-gradient(circle at center, rgba(15, 24, 42, 0) 0%, rgba(3, 6, 14, 0.65) 80%);
}

h1,
h2,
h3 {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  margin: 0;
  letter-spacing: 0.01em;
}

.small-heading {
  font-size: 1.05rem;
}

.landing,
.dashboard,
.auth-wrap,
.single-col {
  width: min(1120px, 92vw);
  margin: 32px auto 64px;
  display: grid;
  gap: 22px;
  perspective: 1200px;
}

.single-col {
  width: min(700px, 92vw);
}

.hero,
.panel,
.plan,
.invite-item {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(165deg, rgba(23, 34, 57, 0.8) 0%, rgba(12, 19, 35, 0.82) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-deep), var(--shadow-edge);
  transform-style: preserve-3d;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.hero,
.panel,
.plan {
  padding: 24px;
}

.hero::before,
.panel::before,
.plan::before,
.invite-item::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(130deg, rgba(31, 210, 255, 0.5), rgba(111, 140, 255, 0.08), rgba(31, 210, 255, 0.26));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.hero:hover,
.panel:hover,
.plan:hover,
.invite-item:hover {
  transform: translateY(-4px) rotateX(1.6deg);
  border-color: var(--line-strong);
  box-shadow: 0 35px 70px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(31, 210, 255, 0.28), 0 0 42px rgba(31, 210, 255, 0.2);
}

.badge {
  width: fit-content;
  margin: 0 0 12px;
  color: #c8f4ff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(31, 210, 255, 0.45);
  background: rgba(31, 210, 255, 0.12);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 0.98;
  text-shadow: 0 4px 24px rgba(31, 210, 255, 0.25);
}

.subhead,
.meta,
.plan .price span,
.form-panel label,
.form-panel input,
.form-panel select {
  color: var(--muted);
}

.subhead {
  max-width: 58ch;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.btn {
  position: relative;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 18px;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #06111f;
  font-weight: 700;
  background: linear-gradient(130deg, #1fd2ff 0%, #88e7ff 45%, #6f8cff 100%);
  box-shadow: 0 10px 28px rgba(31, 210, 255, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 15px 35px rgba(31, 210, 255, 0.48);
}

.btn-secondary {
  color: var(--ink);
  border-color: var(--line);
  background: linear-gradient(160deg, rgba(26, 38, 64, 0.9) 0%, rgba(12, 19, 35, 0.9) 100%);
}

.btn-secondary:hover {
  border-color: var(--line-strong);
}

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

.plan .price {
  font-size: 2rem;
  margin: 6px 0;
  color: #d9f3ff;
}

.featured {
  background:
    linear-gradient(170deg, rgba(30, 52, 92, 0.8) 0%, rgba(14, 25, 46, 0.9) 100%),
    radial-gradient(circle at 88% 12%, rgba(31, 210, 255, 0.18), transparent 45%);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.portal-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 10px;
}

.lead-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: grid;
  gap: 10px;
}

.lead-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 5px;
  cursor: pointer;
  background: linear-gradient(150deg, rgba(25, 36, 58, 0.78), rgba(11, 18, 34, 0.8));
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.lead-item:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
}

.score {
  font-weight: 700;
  color: #c8f4ff;
}

.low .score {
  color: var(--danger);
}

#score-details {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed rgba(143, 179, 255, 0.35);
  padding-bottom: 6px;
  font-size: 0.9rem;
  color: #b9c8df;
}

.auth-wrap {
  grid-template-columns: 1fr 1fr;
}

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

.form-panel label {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
}

.form-panel input,
.form-panel select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  font: inherit;
  background: rgba(9, 15, 30, 0.7);
  color: var(--ink);
  outline: none;
}

.form-panel input:focus,
.form-panel select:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(31, 210, 255, 0.18);
}

.dash-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.admin-layout {
  gap: 16px;
}

.invite-list {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.invite-item {
  padding: 12px;
  display: grid;
  gap: 6px;
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hero,
.panel,
.plan {
  animation: floatIn 420ms ease both;
}

@media (max-width: 900px) {
  .cards-grid,
  .plans,
  .auth-wrap {
    grid-template-columns: 1fr;
  }

  .dash-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

.followup-panel textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  font: inherit;
  background: rgba(9, 15, 30, 0.7);
  color: var(--ink);
  outline: none;
  resize: vertical;
}

.followup-panel textarea:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(31, 210, 255, 0.18);
}

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

.pipeline-checklist {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 8px;
  background: rgba(9, 15, 30, 0.45);
}

.pipeline-checklist legend {
  color: var(--ink);
  font-size: 0.9rem;
  padding: 0 6px;
}

.pipeline-checklist label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pipeline-checklist input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.critical-step {
  color: #ffd4dc;
  font-weight: 700;
}

.lead-form-grid .hero-actions {
  grid-column: 1 / -1;
}

.lead-manager-list {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

@media (max-width: 900px) {
  .lead-form-grid {
    grid-template-columns: 1fr;
  }
}

.form-panel textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  font: inherit;
  background: rgba(9, 15, 30, 0.7);
  color: var(--ink);
  outline: none;
  resize: vertical;
}

.form-panel textarea:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(31, 210, 255, 0.18);
}
