@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=IBM+Plex+Sans:wght@400;500;600&display=swap");

:root {
  --ink: #111a1f;
  --muted: #60717b;
  --paper: #f5efe5;
  --panel: rgba(255, 252, 245, 0.92);
  --line: rgba(17, 26, 31, 0.12);
  --navy: #101820;
  --blue: #1264d8;
  --cyan: #8bd7ff;
  --orange: #ff8a3d;
  --green: #18a46f;
  --red: #e04b4b;
  --shadow: 0 22px 70px rgba(16, 24, 32, 0.18);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "IBM Plex Sans", sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 138, 61, 0.24), transparent 24rem),
    radial-gradient(circle at 84% 6%, rgba(139, 215, 255, 0.42), transparent 22rem),
    linear-gradient(135deg, #f6ebd6 0%, #eef7fb 52%, #f7efe1 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

.app-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 22px clamp(16px, 4vw, 46px) 46px;
  color: #fff;
  background:
    linear-gradient(120deg, rgba(16, 24, 32, 0.98), rgba(18, 100, 216, 0.68)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 18px);
  border-bottom-left-radius: 42px;
  border-bottom-right-radius: 42px;
}

.hero::after {
  position: absolute;
  right: -10rem;
  top: 5rem;
  width: 26rem;
  height: 26rem;
  content: "";
  border-radius: 999px;
  background: rgba(255, 138, 61, 0.3);
  filter: blur(6px);
}

.topbar,
.hero-grid,
.workspace,
.insight-strip,
.production-note {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 15px;
  color: var(--navy);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  background: var(--cyan);
}

.brand strong,
h1,
h2,
h3 {
  font-family: "Space Grotesk", sans-serif;
}

.brand small,
.muted {
  color: rgba(255, 255, 255, 0.72);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  padding-top: 54px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--orange);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1 {
  max-width: 840px;
  margin: 0;
  font-size: clamp(2.65rem, 7vw, 6rem);
  line-height: 0.9;
  letter-spacing: -0.075em;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 650px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(1.02rem, 2vw, 1.28rem);
  line-height: 1.6;
}

.hero-actions,
.action-row,
.import-export {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  margin-top: 28px;
}

.primary-button,
.secondary-button,
.ghost-button,
.icon-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-button {
  padding: 0 22px;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 14px 34px rgba(18, 100, 216, 0.28);
}

.secondary-button {
  padding: 0 20px;
  color: var(--navy);
  background: #fff;
  border: 1px solid rgba(16, 24, 32, 0.12);
}

.ghost-button,
.icon-button {
  color: inherit;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.ghost-button {
  padding: 0 18px;
}

.icon-button {
  width: 50px;
  color: var(--navy);
  background: #f6efe4;
}

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

.compact {
  min-height: 42px;
  padding-inline: 18px;
}

.full-width {
  width: 100%;
}

.phone-card {
  width: min(100%, 390px);
  margin-left: auto;
  padding: 20px;
  color: var(--ink);
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(145deg, var(--cyan), var(--orange)) border-box;
  border: 1px solid transparent;
  border-radius: 38px;
  box-shadow: var(--shadow);
}

.phone-top {
  width: 84px;
  height: 7px;
  margin: 0 auto 22px;
  border-radius: 999px;
  background: #d7e2e6;
}

.workflow-step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fffaf2;
}

.workflow-step + .workflow-step {
  margin-top: 12px;
}

.workflow-step.active {
  background: #eaf7ff;
  border-color: rgba(18, 100, 216, 0.2);
}

.workflow-step span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #fff;
  border-radius: 13px;
  background: var(--navy);
  font-weight: 700;
}

.workflow-step small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.insight-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 20px clamp(16px, 4vw, 46px) 0;
  margin-top: -26px;
}

.insight-strip article {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 38px rgba(16, 24, 32, 0.08);
  backdrop-filter: blur(12px);
}

.insight-strip span {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.05em;
}

.insight-strip small {
  color: var(--muted);
  font-weight: 600;
}

.workspace {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr) 340px;
  gap: 18px;
  padding: 20px clamp(16px, 4vw, 46px) 32px;
}

.panel,
.production-note {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 55px rgba(16, 24, 32, 0.08);
  backdrop-filter: blur(16px);
}

.panel {
  min-width: 0;
  padding: 18px;
}

.panel-heading,
.detail-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.panel-heading h2,
.panel-heading h3,
.detail-top h2 {
  margin: 0;
  line-height: 1;
  letter-spacing: -0.04em;
}

.panel-heading.slim {
  margin-top: 8px;
}

.filters,
.field-grid,
.new-lead-form,
.settings-card {
  display: grid;
  gap: 12px;
}

.filters {
  margin-top: 16px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  color: var(--ink);
  border: 1px solid rgba(16, 24, 32, 0.14);
  border-radius: 15px;
  outline: 0;
  background: rgba(255, 255, 255, 0.76);
}

input,
select {
  min-height: 46px;
  padding: 0 13px;
}

textarea {
  padding: 12px 13px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(18, 100, 216, 0.72);
  box-shadow: 0 0 0 4px rgba(18, 100, 216, 0.1);
}

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

.lead-card {
  width: 100%;
  padding: 14px;
  color: inherit;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.lead-card:hover,
.lead-card.active {
  transform: translateY(-2px);
  border-color: rgba(18, 100, 216, 0.42);
  background: #fff;
}

.lead-card-top,
.lead-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.lead-card-top small,
.status-pill {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--navy);
  background: #e8f4ff;
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
}

.lead-card > span:nth-child(2) {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.35;
}

.lead-card-bottom {
  margin-top: 12px;
  color: var(--muted);
}

.detail-panel {
  min-height: 680px;
}

.empty-state {
  display: grid;
  min-height: 420px;
  align-content: center;
  justify-items: start;
}

.empty-state h2 {
  max-width: 400px;
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.empty-state p:not(.eyebrow) {
  color: var(--muted);
}

.lead-detail {
  display: grid;
  gap: 18px;
}

.detail-top .muted {
  margin: 8px 0 0;
  color: var(--muted);
}

.status-pill {
  background: #fff0dc;
}

.action-row {
  padding: 10px;
  border-radius: 20px;
  background: rgba(16, 24, 32, 0.05);
}

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

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

.span-2,
.full-field {
  grid-column: 1 / -1;
}

.note-composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
}

.timeline {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.timeline-item {
  padding: 13px;
  border-left: 4px solid var(--blue);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
}

.timeline-item strong {
  display: block;
}

.timeline-item small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.new-lead-form {
  margin-top: 16px;
}

.settings-card,
.import-export {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.settings-card {
  gap: 12px;
}

.add-panel .ghost-button {
  color: var(--navy);
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--line);
}

.file-button {
  position: relative;
  overflow: hidden;
}

.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.production-note {
  margin: 0 clamp(16px, 4vw, 46px) 46px;
  padding: clamp(22px, 4vw, 38px);
}

.production-note h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4.4rem);
  line-height: 0.93;
  letter-spacing: -0.07em;
}

.production-note p:not(.eyebrow) {
  max-width: 820px;
  color: var(--muted);
  line-height: 1.65;
}

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

  .phone-card {
    margin-left: 0;
  }

  .list-panel,
  .add-panel {
    order: initial;
  }
}

@media (max-width: 760px) {
  .hero {
    padding-top: 16px;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
  }

  .hero-grid {
    padding-top: 34px;
  }

  .insight-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .field-grid,
  .field-grid.mini,
  .note-composer {
    grid-template-columns: 1fr;
  }

  .action-row {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .brand small {
    display: none;
  }

  h1 {
    font-size: 3rem;
  }

  .hero-actions {
    display: grid;
  }

  .insight-strip {
    gap: 10px;
  }

  .insight-strip article {
    padding: 14px;
  }

  .insight-strip span {
    font-size: 1.7rem;
  }

  .workspace {
    padding-inline: 12px;
  }

  .panel {
    padding: 14px;
  }
}
