:root {
  --paper: #f5f3ed;
  --surface: #ffffff;
  --surface-soft: #faf9f5;
  --ink: #17211e;
  --muted: #717a75;
  --line: #e4e2db;
  --forest: #192c49;
  --green: #2e826b;
  --green-soft: #e6f2ed;
  --coral: #f3961e;
  --coral-soft: #fff0dc;
  --blue: #53798a;
  --blue-soft: #e8f0f3;
  --sand: #b18a4b;
  --sand-soft: #f3ecdf;
  --shadow: 0 16px 44px rgba(28, 38, 34, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll {
  overflow: hidden;
}

.hidden {
  display: none !important;
}

.auth-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 15%, rgba(243, 150, 30, 0.13), transparent 30%),
    radial-gradient(circle at 85% 82%, rgba(46, 130, 107, 0.11), transparent 31%),
    var(--paper);
}

.auth-shell,
.setup-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 30px 18px;
}

.auth-card {
  width: min(440px, 100%);
  padding: clamp(28px, 5vw, 46px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.setup-card {
  width: min(650px, 100%);
}

.auth-logo {
  display: block;
  width: 210px;
  height: auto;
  margin-bottom: 34px;
}

.auth-card h1 {
  margin-bottom: 12px;
  font-size: clamp(32px, 6vw, 44px);
}

.auth-copy,
.auth-help {
  color: var(--muted);
  line-height: 1.6;
}

.auth-copy {
  margin-bottom: 24px;
  font-size: 14px;
}

.auth-help {
  margin: 20px 0 0;
  font-size: 11px;
  text-align: center;
}

.login-form,
.setup-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-form label,
.setup-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.login-form input,
.setup-form input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  background: var(--surface-soft);
}

.login-form input:focus,
.setup-form input:focus {
  border-color: #79a493;
  box-shadow: 0 0 0 3px rgba(46, 130, 107, 0.1);
}

.setup-form fieldset {
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.setup-form legend {
  padding: 0 7px;
  font-size: 12px;
  font-weight: 850;
}

.wide-button {
  width: 100%;
}

.form-alert,
.form-success {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.5;
}

.form-alert {
  border: 1px solid #efc5b9;
  background: #fff2ed;
  color: #913b2d;
}

.form-success {
  border: 1px solid #bedbcd;
  background: var(--green-soft);
  color: #226e58;
}

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

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

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  padding: 0 clamp(20px, 4vw, 64px);
  border-bottom: 1px solid rgba(23, 33, 30, 0.1);
  background: rgba(245, 243, 237, 0.92);
  backdrop-filter: blur(16px);
}

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

.brand-logo {
  display: block;
  width: 174px;
  height: auto;
}

.brand-divider {
  width: 1px;
  height: 27px;
  background: rgba(25, 44, 73, 0.2);
}

.brand-product {
  color: #192c49;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.logout-form {
  margin: 0;
}

.logout-button {
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.logout-button:hover {
  background: white;
  color: var(--ink);
}

.save-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.save-state i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #46a383;
  box-shadow: 0 0 0 4px rgba(70, 163, 131, 0.12);
}

.save-state.saving i {
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(243, 150, 30, 0.14);
}

.save-state.error {
  color: #a93c2c;
}

.save-state.error i {
  background: #d95945;
  box-shadow: 0 0 0 4px rgba(217, 89, 69, 0.12);
}

.primary-button,
.secondary-button {
  min-height: 42px;
  padding: 0 17px;
  border: 0;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 750;
}

.primary-button {
  background: var(--forest);
  color: white;
  box-shadow: 0 8px 18px rgba(23, 63, 53, 0.16);
}

.primary-button:hover {
  background: #102139;
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.secondary-button {
  border: 1px solid var(--line);
  background: white;
}

.workspace {
  width: min(1600px, 100%);
  margin: 0 auto;
  padding: 46px clamp(20px, 4vw, 64px) 30px;
}

.data-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding: 12px 15px;
  border: 1px solid #efc5b9;
  border-radius: 12px;
  background: #fff2ed;
  color: #913b2d;
  font-size: 11px;
}

.data-error button {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid #df9e8d;
  border-radius: 7px;
  background: white;
  color: inherit;
  font-size: 10px;
  font-weight: 800;
}

.hero-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 30px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--green);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 680px;
  margin-bottom: 8px;
  font-size: clamp(34px, 4vw, 55px);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.hero-copy {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
}

.today-card {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  column-gap: 13px;
  min-width: 294px;
  padding: 19px 21px 17px;
  border: 1px solid #f1d5ad;
  border-radius: 18px;
  background: var(--coral-soft);
}

.today-number {
  grid-row: 1 / 3;
  font-size: 39px;
  font-weight: 820;
  letter-spacing: -0.06em;
}

.today-card strong,
.today-card small {
  display: block;
}

.today-card strong {
  font-size: 13px;
}

.today-card small {
  margin-top: 2px;
  color: #8d6a3b;
  font-size: 12px;
}

.today-card button {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #a75e08;
  font-size: 12px;
  font-weight: 800;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  margin-bottom: 42px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 5px 22px rgba(27, 39, 34, 0.035);
}

.metric {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 96px;
  padding: 18px 22px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.metric:last-child {
  border-right: 0;
}

.metric:hover,
.metric.active {
  background: var(--surface-soft);
}

.metric-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  font-size: 15px;
  font-weight: 850;
}

.metric-icon.coral { background: var(--coral-soft); color: var(--coral); }
.metric-icon.blue { background: var(--blue-soft); color: var(--blue); }
.metric-icon.green { background: var(--green-soft); color: var(--green); }
.metric-icon.sand { background: var(--sand-soft); color: var(--sand); }

.metric span:last-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.metric strong {
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.pipeline-section {
  min-width: 0;
}

.pipeline-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.pipeline-head h2 {
  margin-bottom: 0;
  font-size: 23px;
  letter-spacing: -0.035em;
}

.filters {
  display: flex;
  align-items: center;
  gap: 9px;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}

.search-field span {
  color: var(--muted);
  font-size: 20px;
  line-height: 0;
}

.search-field input {
  width: 195px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12px;
}

.filters select,
.filters .clear-filter {
  height: 40px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 650;
}

.filters .clear-filter {
  padding: 0 12px;
  color: var(--coral);
}

.pipeline {
  display: grid;
  grid-auto-columns: minmax(245px, 1fr);
  grid-auto-flow: column;
  gap: 12px;
  overflow-x: auto;
  padding: 1px 1px 18px;
  scroll-snap-type: x proximity;
}

.pipeline-column {
  min-width: 245px;
  scroll-snap-align: start;
}

.column-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 7px;
}

.column-head h3 {
  overflow: hidden;
  margin: 0;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.035em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #a3aaa6;
}

.status-new .status-dot { background: var(--coral); }
.status-whatsapp .status-dot { background: #75a185; }
.status-conversation .status-dot { background: var(--blue); }
.status-call .status-dot { background: #8b6eae; }
.status-decision .status-dot { background: var(--sand); }
.status-closed .status-dot { background: var(--green); }

.lead-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.column-list {
  display: flex;
  min-height: 390px;
  flex-direction: column;
  gap: 10px;
  padding: 9px;
  border: 1px solid rgba(23, 33, 30, 0.07);
  border-radius: 16px;
  background: rgba(232, 230, 223, 0.52);
}

.lead-card {
  position: relative;
  padding: 15px;
  border: 1px solid #deddd7;
  border-radius: 13px;
  outline: none;
  background: var(--surface);
  box-shadow: 0 2px 6px rgba(24, 35, 31, 0.035);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.lead-card:hover,
.lead-card:focus-visible {
  z-index: 2;
  border-color: #a9b6b0;
  box-shadow: 0 10px 24px rgba(23, 39, 32, 0.1);
  transform: translateY(-2px);
}

.lead-card.is-due::before {
  position: absolute;
  top: 12px;
  right: -1px;
  width: 3px;
  height: 25px;
  border-radius: 3px 0 0 3px;
  background: var(--coral);
  content: "";
}

.lead-topline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--sand-soft);
  color: #765d36;
  font-size: 10px;
  font-weight: 850;
}

.avatar.large {
  width: 47px;
  height: 47px;
  font-size: 13px;
}

.avatar.tiny {
  width: 24px;
  height: 24px;
  background: var(--forest);
  color: white;
  font-size: 8px;
}

.lead-identity {
  min-width: 0;
  flex: 1;
}

.lead-identity strong,
.lead-identity span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-identity strong {
  margin-bottom: 3px;
  font-size: 13px;
  letter-spacing: -0.015em;
}

.lead-identity span,
.card-arrow {
  color: var(--muted);
  font-size: 10px;
}

.card-arrow {
  align-self: flex-start;
}

.outcome-pill {
  display: inline-flex;
  margin: 13px 0 12px;
  padding: 5px 8px;
  border-radius: 7px;
  background: #f0efeb;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.outcome-pill.course { background: var(--green-soft); color: var(--green); }
.outcome-pill.private { background: var(--blue-soft); color: var(--blue); }

.outcome-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 13px 0 12px;
}

.outcome-row .outcome-pill {
  margin: 0;
}

.payment-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 9px;
  font-weight: 800;
}

.payment-pill.pending {
  background: var(--coral-soft);
  color: #9a5a0b;
}

.payment-pill.paid {
  background: var(--green-soft);
  color: var(--green);
}

.lead-meta {
  min-height: 16px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
}

.due-label {
  color: var(--coral);
}

.call-time {
  color: #76549d;
  font-weight: 750;
}

.card-actions {
  display: flex;
  gap: 6px;
  padding-top: 11px;
  border-top: 1px solid #efeee9;
}

.card-actions a,
.card-actions button {
  display: inline-flex;
  min-height: 31px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-size: 9px;
  font-weight: 780;
  text-decoration: none;
}

.card-actions a {
  border-color: #cfe5dc;
  color: var(--green);
}

.card-actions button:hover,
.card-actions a:hover {
  background: var(--surface-soft);
}

.empty-column {
  display: grid;
  min-height: 116px;
  place-items: center;
  align-content: center;
  color: #9ca29e;
  text-align: center;
}

.empty-column span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.75);
  font-size: 11px;
}

.empty-column p {
  margin: 7px 0 0;
  font-size: 10px;
  font-weight: 700;
}

.app-footer {
  display: flex;
  justify-content: space-between;
  padding-top: 15px;
  color: #8a918d;
  font-size: 10px;
}

.demo-label {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255,255,255,0.4);
}

.overlay {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  background: rgba(15, 26, 22, 0.38);
  backdrop-filter: blur(3px);
  animation: fade-in 150ms ease;
}

.overlay.centered {
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lead-drawer {
  width: min(590px, 100%);
  height: 100%;
  background: var(--surface-soft);
  box-shadow: -20px 0 60px rgba(16, 28, 23, 0.18);
  animation: slide-in 220ms ease;
}

.drawer-head,
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-head {
  min-height: 92px;
  padding: 18px 25px;
  border-bottom: 1px solid var(--line);
  background: white;
}

.drawer-person {
  display: flex;
  align-items: center;
  gap: 13px;
}

.drawer-person .eyebrow {
  margin-bottom: 3px;
}

.drawer-person h2 {
  margin-bottom: 2px;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.drawer-person div > span {
  color: var(--muted);
  font-size: 10px;
}

.icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  font-size: 21px;
  line-height: 1;
}

.drawer-scroll {
  height: calc(100% - 92px);
  overflow-y: auto;
  padding: 16px 20px 40px;
}

.drawer-section {
  margin-bottom: 12px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 15px;
}

.section-heading h3 {
  margin: 0;
  font-size: 13px;
  letter-spacing: -0.015em;
}

.section-heading span {
  color: var(--muted);
  font-size: 9px;
}

.status-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.status-picker button {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 9px;
  font-weight: 730;
}

.status-picker button i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b6b9b7;
}

.status-picker button.selected {
  border-color: var(--forest);
  background: var(--forest);
  color: white;
}

.status-picker button.selected i {
  background: #7cc3aa;
}

.classification-box {
  border-color: #d4e5dd;
  background: #f8fcfa;
}

.outcome-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.outcome-grid button {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  font-size: 10px;
  font-weight: 750;
  text-align: left;
}

.outcome-grid button span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 7px;
  background: #efefeb;
}

.outcome-grid button.course span { background: var(--green-soft); color: var(--green); }
.outcome-grid button.private span { background: var(--blue-soft); color: var(--blue); }
.outcome-grid button.selected { border-color: var(--forest); box-shadow: inset 0 0 0 1px var(--forest); }

.payment-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding: 13px;
  border: 1px solid #efd5ae;
  border-radius: 11px;
  background: var(--coral-soft);
}

.payment-control.is-paid {
  border-color: #bedbcd;
  background: var(--green-soft);
}

.payment-control strong,
.payment-control small {
  display: block;
}

.payment-control strong {
  margin-bottom: 3px;
  font-size: 11px;
}

.payment-control small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.payment-control button {
  min-height: 35px;
  flex: 0 0 auto;
  padding: 0 11px;
  border: 1px solid rgba(25, 44, 73, 0.18);
  border-radius: 8px;
  background: white;
  color: var(--forest);
  font-size: 9px;
  font-weight: 800;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

.form-grid .full-field {
  grid-column: 1 / -1;
}

.form-grid input,
.form-grid select {
  width: 100%;
  height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: 0;
  background: var(--surface-soft);
  font-size: 11px;
}

.form-grid input:focus,
.form-grid select:focus,
.note-composer textarea:focus {
  border-color: #79a493;
  box-shadow: 0 0 0 3px rgba(46, 130, 107, 0.1);
}

.whatsapp-button {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 13px;
  border: 1px solid #bcdaca;
  border-radius: 9px;
  background: var(--green-soft);
  color: #226e58;
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
}

.note-composer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
}

.note-composer textarea {
  min-height: 72px;
  resize: vertical;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 11px;
  line-height: 1.5;
}

.note-composer button {
  align-self: flex-end;
  min-height: 31px;
  padding: 0 11px;
  border: 0;
  border-radius: 8px;
  background: var(--forest);
  color: white;
  font-size: 9px;
  font-weight: 800;
}

.note-composer button:disabled {
  cursor: default;
  opacity: 0.4;
}

.notes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.notes-list article {
  padding: 12px;
  border-left: 2px solid #d9e5df;
  background: #fbfbf8;
}

.notes-list article > div {
  display: flex;
  align-items: center;
  gap: 7px;
}

.notes-list strong {
  font-size: 9px;
}

.notes-list time {
  margin-left: auto;
  color: var(--muted);
  font-size: 8px;
}

.notes-list article p {
  margin: 9px 0 0 31px;
  color: #4f5b56;
  font-size: 10px;
  line-height: 1.55;
}

.no-notes {
  margin: 3px 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.danger-zone {
  border-color: #efddd8;
  background: #fffaf8;
}

.delete-lead-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #a64637;
  font-size: 10px;
  font-weight: 780;
}

.delete-confirm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.delete-confirm strong,
.delete-confirm small {
  display: block;
}

.delete-confirm strong {
  margin-bottom: 4px;
  font-size: 11px;
}

.delete-confirm small {
  max-width: 290px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.delete-confirm > div:last-child {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
}

.delete-confirm button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-size: 9px;
  font-weight: 800;
}

.delete-confirm .danger-button {
  border-color: #c75645;
  background: #b84b3a;
  color: white;
}

.new-lead-modal {
  width: min(520px, 100%);
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: white;
  box-shadow: var(--shadow);
  animation: modal-in 180ms ease;
}

.modal-head h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.modal-copy {
  max-width: 390px;
  margin: 12px 0 20px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 22px;
}

@keyframes fade-in {
  from { opacity: 0; }
}

@keyframes slide-in {
  from { transform: translateX(35px); opacity: 0; }
}

@keyframes modal-in {
  from { transform: translateY(10px) scale(0.985); opacity: 0; }
}

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

  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }

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

  .filters {
    width: 100%;
  }

  .search-field {
    flex: 1;
  }

  .search-field input {
    width: 100%;
  }
}

@media (max-width: 680px) {
  .topbar {
    height: 66px;
    padding: 0 16px;
  }

  .brand-product,
  .brand-divider,
  .save-state,
  .primary-button span {
    display: none;
  }

  .primary-button {
    min-height: 38px;
    padding: 0 13px;
  }

  .topbar-actions {
    gap: 8px;
  }

  .logout-button {
    padding: 0 8px;
  }

  .brand-logo {
    width: 150px;
  }

  .workspace {
    padding: 29px 16px 22px;
  }

  .hero-row {
    align-items: stretch;
    flex-direction: column;
    gap: 20px;
  }

  h1 {
    font-size: 38px;
  }

  .today-card {
    min-width: 0;
  }

  .metrics {
    margin-bottom: 32px;
  }

  .metric {
    min-height: 83px;
    padding: 14px;
  }

  .metric-icon {
    width: 31px;
    height: 31px;
  }

  .metric small {
    font-size: 9px;
  }

  .metric strong {
    font-size: 20px;
  }

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

  .filters select,
  .filters .clear-filter {
    width: 100%;
  }

  .pipeline {
    margin-right: -16px;
    grid-auto-columns: minmax(278px, 85vw);
  }

  .app-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .lead-drawer {
    width: 100%;
  }

  .drawer-head {
    min-height: 84px;
    padding: 15px 16px;
  }

  .drawer-scroll {
    height: calc(100% - 84px);
    padding: 12px 12px 30px;
  }

  .drawer-section {
    padding: 16px;
  }

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

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-grid .full-field {
    grid-column: auto;
  }

  .new-lead-modal {
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    padding: 20px;
  }

  .payment-control,
  .delete-confirm {
    align-items: stretch;
    flex-direction: column;
  }

  .payment-control button,
  .delete-confirm > div:last-child {
    width: 100%;
  }

  .delete-confirm button {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
