:root {
  color-scheme: dark;
  --bg: #050207;
  --bg-2: #100516;
  --ink: #fff7ff;
  --muted: #b9a8c8;
  --soft: #211029;
  --surface: rgba(15, 8, 20, 0.82);
  --surface-strong: rgba(25, 12, 32, 0.94);
  --line: rgba(255, 0, 204, 0.18);
  --pink: #ff00c8;
  --pink-2: #ff62df;
  --purple: #9d38ff;
  --purple-deep: #3e0c57;
  --green: #41f0a2;
  --rose: #ff4d8d;
  --amber: #ffd166;
  --shadow: 0 24px 80px rgba(255, 0, 200, 0.15);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  background:
    linear-gradient(90deg, rgba(255, 0, 204, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(157, 56, 255, 0.06) 1px, transparent 1px),
    radial-gradient(circle at 45% 12%, rgba(255, 0, 204, 0.17), transparent 28rem),
    linear-gradient(145deg, #050207 0%, #100516 52%, #060208 100%);
  background-size: 84px 84px, 84px 84px, auto, auto;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  animation: textureFloat 18s ease-in-out infinite alternate;
  background: url("/assets/reformer-texture.png") center top / 620px auto no-repeat;
  content: "";
  inset: 0 0 auto auto;
  height: 100vh;
  opacity: 0.13;
  pointer-events: none;
  position: fixed;
  transform: translateX(12%);
  width: 46vw;
  z-index: 0;
}

body::after {
  animation: neonSweep 7s linear infinite;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 0, 204, 0.05) 38%, rgba(255, 0, 204, 0.18) 50%, transparent 62%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
  transform: translateX(-120%);
  z-index: 0;
}

button,
input,
select {
  font: inherit;
}

button,
select,
input {
  border-radius: 8px;
}

button {
  background: linear-gradient(135deg, var(--pink), var(--purple));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 22px rgba(255, 0, 204, 0.25);
  color: #fff;
  cursor: pointer;
  font-weight: 850;
  min-height: 44px;
  padding: 0 18px;
}

button:hover {
  box-shadow: 0 0 34px rgba(255, 0, 204, 0.44);
  transform: translateY(-1px);
}

input,
select {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 0, 204, 0.22);
  color: var(--ink);
  min-height: 44px;
  padding: 0 13px;
}

input:focus,
select:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(255, 0, 204, 0.14);
  outline: 0;
}

select option {
  background: #120618;
  color: var(--ink);
}

.layout {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.sidebar {
  background: linear-gradient(180deg, rgba(23, 8, 34, 0.96), rgba(6, 2, 9, 0.96));
  border-right: 1px solid rgba(255, 0, 204, 0.16);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding: 28px 22px;
  position: sticky;
  top: 0;
}

.brand {
  align-items: center;
  display: flex;
  gap: 13px;
  min-width: 0;
}

.brandMark {
  align-items: center;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 0 28px rgba(255, 0, 204, 0.28);
  display: grid;
  height: 58px;
  justify-content: center;
  overflow: hidden;
  width: 58px;
}

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

.brand strong {
  display: block;
  font-size: 1.04rem;
  line-height: 1.1;
}

.brand small,
.panelHead p,
.leadMeta {
  color: var(--muted);
}

.brand small {
  display: block;
  margin-top: 5px;
}

.nav {
  display: grid;
  gap: 9px;
}

.nav a {
  border: 1px solid transparent;
  border-radius: 8px;
  color: #f3e7ff;
  font-weight: 820;
  padding: 13px 15px;
  text-decoration: none;
}

.nav a.active,
.nav a:hover {
  background: rgba(255, 0, 204, 0.11);
  border-color: rgba(255, 0, 204, 0.22);
  box-shadow: inset 3px 0 0 var(--pink);
}

.connection {
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #f0d7ff;
  display: flex;
  gap: 9px;
  margin-top: auto;
  padding-top: 18px;
}

.dot {
  animation: pulse 1.8s ease-in-out infinite;
  background: var(--green);
  border-radius: 999px;
  box-shadow: 0 0 0 6px rgba(65, 240, 162, 0.13);
  height: 10px;
  width: 10px;
}

.content {
  padding: 34px;
}

.hero {
  align-items: end;
  background:
    linear-gradient(135deg, rgba(255, 0, 204, 0.11), rgba(157, 56, 255, 0.06)),
    rgba(9, 3, 14, 0.58);
  border: 1px solid rgba(255, 0, 204, 0.18);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin: 0 auto 18px;
  max-width: 1320px;
  overflow: hidden;
  padding: 26px;
  position: relative;
}

.hero::after {
  animation: shimmer 4.8s ease-in-out infinite;
  background: linear-gradient(90deg, transparent, rgba(255, 0, 204, 0.22), transparent);
  content: "";
  height: 1px;
  inset: auto 0 0;
  position: absolute;
}

.heroLogo {
  display: block;
  filter: drop-shadow(0 0 16px rgba(255, 0, 204, 0.5));
  height: 54px;
  margin-bottom: 12px;
  object-fit: contain;
  width: 180px;
}

.eyebrow {
  color: var(--pink-2);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  color: #fff;
  font-size: clamp(2.1rem, 4.3vw, 4.8rem);
  letter-spacing: 0;
  line-height: 0.96;
  max-width: 840px;
  text-shadow: 0 0 28px rgba(255, 0, 204, 0.2);
}

h2 {
  color: #fff;
  font-size: 1.08rem;
}

.authBox {
  display: flex;
  gap: 10px;
}

.authBox input {
  min-width: 210px;
}

.metrics {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 auto 18px;
  max-width: 1320px;
}

.metrics article,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(18px);
}

.metrics article {
  min-height: 120px;
  overflow: hidden;
  padding: 18px;
  position: relative;
}

.metrics article::before {
  background: linear-gradient(180deg, var(--pink), transparent);
  content: "";
  inset: 0 auto 0 0;
  position: absolute;
  width: 3px;
}

.metrics span {
  color: var(--muted);
  display: block;
  font-size: 0.9rem;
  margin-bottom: 11px;
}

.metrics strong {
  color: #fff;
  font-size: 2.25rem;
  text-shadow: 0 0 18px rgba(255, 0, 204, 0.26);
}

.workspace {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.1fr) minmax(370px, 0.9fr);
  margin: 0 auto;
  max-width: 1320px;
}

.panel {
  min-width: 0;
  overflow: hidden;
}

.leadPanel {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.panelHead {
  align-items: center;
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 18px;
}

.panelHead p {
  font-size: 0.9rem;
  margin-top: 4px;
}

.tableWrap {
  overflow-x: auto;
}

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

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

th {
  color: #d9c6e8;
  font-size: 0.74rem;
  text-transform: uppercase;
}

td {
  color: #f8edff;
}

.code {
  background: rgba(255, 0, 204, 0.12);
  border: 1px solid rgba(255, 0, 204, 0.34);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-weight: 900;
  padding: 5px 10px;
  text-shadow: 0 0 12px rgba(255, 0, 204, 0.55);
}

.codeOptions {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
  padding: 14px;
}

.codeOption {
  align-items: center;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 0, 204, 0.12);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: auto 1fr;
  padding: 10px;
}

.codeOption p {
  color: var(--muted);
  font-size: 0.82rem;
}

.leadList {
  display: grid;
  gap: 10px;
  max-height: 680px;
  overflow: auto;
  padding: 14px;
}

.lead {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 0, 204, 0.13);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.leadTop {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.leadMessage {
  color: #fff;
  line-height: 1.45;
  margin-top: 8px;
}

.leadMeta {
  font-size: 0.84rem;
  margin-top: 8px;
}

.statusButtons {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.statusButtons button {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
  color: #f2dfff;
  font-size: 0.82rem;
  min-height: 34px;
  padding: 0 10px;
}

.statusButtons button.active {
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: #fff;
}

.empty {
  color: var(--muted);
  padding: 18px;
}

.status-won {
  color: var(--green);
}

.status-lost {
  color: var(--rose);
}

.status-contacted {
  color: var(--amber);
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 5px rgba(65, 240, 162, 0.13), 0 0 18px rgba(65, 240, 162, 0.18);
  }
  50% {
    box-shadow: 0 0 0 9px rgba(65, 240, 162, 0.04), 0 0 30px rgba(65, 240, 162, 0.34);
  }
}

@keyframes shimmer {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}

@keyframes neonSweep {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(120%);
  }
}

@keyframes textureFloat {
  0% {
    opacity: 0.09;
    transform: translateX(14%) translateY(-18px) scale(1);
  }
  100% {
    opacity: 0.17;
    transform: translateX(8%) translateY(18px) scale(1.04);
  }
}

@media (max-width: 1020px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
    position: static;
  }

  .workspace,
  .metrics {
    grid-template-columns: 1fr;
  }

  .leadPanel {
    grid-column: auto;
    grid-row: auto;
  }

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

@media (max-width: 620px) {
  .content {
    padding: 18px;
  }

  .authBox,
  .panelHead,
  .leadTop {
    align-items: stretch;
    flex-direction: column;
  }

  .authBox input,
  .authBox button {
    width: 100%;
  }

  h1 {
    font-size: 2.15rem;
  }
}
