:root {
  color-scheme: light;
  --ink: #171b1f;
  --ink-2: #2e343b;
  --muted: #65717d;
  --paper: #f6f2e9;
  --paper-2: #ece7dc;
  --surface: #fffefa;
  --surface-2: #fdf8ee;
  --charcoal: #111820;
  --charcoal-2: #1e2932;
  --green: #176146;
  --green-2: #21815e;
  --mint: #dff7df;
  --gold: #f4bd3d;
  --orange: #ee7f31;
  --red: #cf4d45;
  --blue: #315fd5;
  --sky: #dce8ff;
  --violet: #7251c8;
  --line: #ded8cc;
  --line-dark: rgba(255, 255, 255, 0.12);
  --shadow: 0 18px 50px rgba(17, 24, 32, 0.12);
  --shadow-soft: 0 8px 24px rgba(17, 24, 32, 0.08);
  --radius: 8px;
  --sidebar: 278px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(246, 242, 233, 0.95), rgba(236, 231, 220, 0.9)),
    var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

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

.public-site {
  min-height: 100vh;
  background: var(--paper);
}

.public-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 24px;
  background: rgba(255, 254, 250, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.public-nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 850;
}

.public-nav-actions a {
  color: var(--ink-2);
  text-decoration: none;
}

.public-hero {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(420px, 1.1fr);
  align-items: center;
  gap: 26px;
  padding: 34px 24px 28px;
  background:
    linear-gradient(90deg, rgba(17, 24, 32, 0.97), rgba(23, 97, 70, 0.93) 50%, rgba(244, 189, 61, 0.1)),
    var(--charcoal);
  color: #fffefa;
}

.public-hero-copy {
  width: min(680px, 100%);
  justify-self: end;
  padding: 20px 0;
}

.public-hero h1 {
  margin: 14px 0 16px;
  font-size: 56px;
  line-height: 1.02;
  letter-spacing: 0;
}

.public-hero p {
  max-width: 610px;
  margin: 0 0 22px;
  color: rgba(255, 254, 250, 0.76);
  font-size: 18px;
}

.public-proof {
  margin-top: 28px;
}

.public-hero-media {
  min-width: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.28);
}

.public-hero-media img {
  width: 100%;
  height: min(640px, calc(100vh - 170px));
  object-fit: cover;
}

.public-band,
.public-split,
.public-login-section {
  padding: 56px 24px;
}

.public-feature-grid {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.public-split {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.62fr);
  gap: 24px;
  align-items: center;
}

.public-split h2 {
  margin: 12px 0 10px;
  font-size: 40px;
  line-height: 1.08;
}

.public-split p {
  max-width: 640px;
  color: var(--muted);
  font-size: 17px;
}

.pricing-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.public-login-section {
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(255, 254, 250, 0.62), rgba(236, 231, 220, 0.9));
}

.public-login-card {
  width: min(500px, 100%);
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(340px, 0.92fr) minmax(420px, 1.08fr);
  background: var(--charcoal);
  color: #fffefa;
}

.login-visual {
  position: relative;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(17, 24, 32, 0.92) 0%, rgba(17, 24, 32, 0.66) 42%, rgba(17, 24, 32, 0.08) 100%),
    url("assets/topslide-field-owner.png") center / cover;
  overflow: hidden;
}

.login-visual::after {
  content: "";
  position: absolute;
  inset: auto 28px 28px 28px;
  height: 1px;
  background: linear-gradient(90deg, rgba(244, 189, 61, 0), rgba(244, 189, 61, 0.75), rgba(244, 189, 61, 0));
}

.login-copy {
  position: relative;
  z-index: 1;
  width: min(520px, calc(100% - 48px));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 34px 0 34px 34px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  font-size: 24px;
  line-height: 1;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  display: inline-grid;
  place-items: center;
  color: var(--charcoal);
  background:
    linear-gradient(135deg, #fff 0%, #fff 39%, transparent 40%),
    linear-gradient(135deg, var(--gold), #f7e486 42%, #3fe08d 43%, #1d9367 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  font-weight: 950;
}

.brand-lockup.dark .brand-mark {
  color: #fff;
  background:
    linear-gradient(135deg, var(--green) 0%, var(--green) 50%, transparent 51%),
    linear-gradient(135deg, var(--gold), var(--orange));
}

.login-headline {
  max-width: 500px;
}

.eyebrow {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.login-headline h1 {
  margin: 14px 0 16px;
  font-size: 58px;
  line-height: 1.02;
  letter-spacing: 0;
}

.login-headline p {
  max-width: 460px;
  margin: 0;
  color: rgba(255, 254, 250, 0.78);
  font-size: 18px;
}

.login-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: min(570px, calc(100% - 20px));
}

.proof-tile {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.proof-tile strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
}

.proof-tile span {
  display: block;
  margin-top: 5px;
  color: rgba(255, 254, 250, 0.72);
  font-size: 12px;
}

.login-panel {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background:
    linear-gradient(180deg, rgba(255, 254, 250, 0.98), rgba(246, 242, 233, 0.98));
  color: var(--ink);
}

.login-card {
  width: min(468px, 100%);
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.login-card h2 {
  margin: 22px 0 8px;
  font-size: 28px;
  line-height: 1.1;
}

.login-card p {
  margin: 0 0 22px;
  color: var(--muted);
}

.credential-strip {
  margin-top: 18px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 13px;
}

.credential-strip code {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  color: var(--green);
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(17, 24, 32, 0.98), rgba(30, 41, 50, 0.98));
  color: #fffefa;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-head {
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--line-dark);
}

.company-switcher {
  margin-top: 18px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
}

.company-switcher strong {
  display: block;
  font-size: 14px;
}

.company-switcher span {
  display: block;
  margin-top: 3px;
  color: rgba(255, 254, 250, 0.62);
  font-size: 12px;
}

.nav-list {
  display: grid;
  gap: 4px;
  padding: 16px 12px;
}

.nav-button {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: rgba(255, 254, 250, 0.72);
  text-align: left;
  font-weight: 750;
}

.nav-button:hover,
.nav-button.active {
  color: #fffefa;
  background: rgba(255, 255, 255, 0.09);
}

.nav-button.active {
  box-shadow: inset 3px 0 0 var(--gold);
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px;
  border-top: 1px solid var(--line-dark);
}

.plan-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-radius: var(--radius);
  background: rgba(244, 189, 61, 0.14);
  border: 1px solid rgba(244, 189, 61, 0.32);
  color: #fff;
  font-size: 12px;
}

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  background: rgba(246, 242, 233, 0.92);
  border-bottom: 1px solid rgba(222, 216, 204, 0.85);
  backdrop-filter: blur(18px);
}

.topbar-left {
  min-width: 0;
}

.mobile-menu {
  display: none;
}

.page-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
}

.page-subtitle {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.content {
  width: min(1580px, 100%);
  padding: 24px;
  margin: 0 auto;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
}

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

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

.grid.auto {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.section {
  margin-top: 22px;
}

.section:first-child {
  margin-top: 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.section-head h2,
.section-head h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.section-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.panel,
.card,
.metric,
.table-wrap,
.modal-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.panel {
  padding: 18px;
}

.card {
  padding: 16px;
}

.metric {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
}

.metric-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.metric-value {
  font-size: 30px;
  line-height: 1;
  font-weight: 950;
}

.metric-foot {
  color: var(--muted);
  font-size: 13px;
}

.metric.good {
  background: linear-gradient(180deg, #fffefa, #f1fff2);
  border-color: #c6eec9;
}

.metric.gold {
  background: linear-gradient(180deg, #fffefa, #fff6d8);
  border-color: #efd48b;
}

.metric.blue {
  background: linear-gradient(180deg, #fffefa, #eff5ff);
  border-color: #cbdcff;
}

.btn,
.icon-btn {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-weight: 850;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition:
    transform 140ms ease,
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease;
}

.btn {
  padding: 10px 13px;
}

.icon-btn {
  width: 40px;
  padding: 0;
}

.btn:hover,
.icon-btn:hover {
  transform: translateY(-1px);
  border-color: #c8c0b3;
}

.btn.primary {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.btn.primary:hover {
  background: var(--green-2);
}

.btn.dark {
  border-color: var(--charcoal);
  background: var(--charcoal);
  color: #fff;
}

.btn.gold {
  border-color: #d89d24;
  background: var(--gold);
  color: var(--charcoal);
}

.btn.ghost {
  background: transparent;
}

.btn.danger {
  border-color: #f0c2bd;
  background: #fff4f2;
  color: #a9342d;
}

.btn.small {
  min-height: 32px;
  padding: 7px 9px;
  font-size: 12px;
}

.btn.full {
  width: 100%;
}

.icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.icon.fill {
  fill: currentColor;
  stroke: none;
}

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field label {
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 850;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 10px 11px;
  outline: none;
}

.field textarea {
  min-height: 92px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(23, 97, 70, 0.12);
}

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

.form-grid .wide {
  grid-column: 1 / -1;
}

.searchbar,
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.searchbar {
  min-width: min(420px, 100%);
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.searchbar input {
  min-width: 180px;
  flex: 1;
  min-height: 40px;
  border: 0;
  outline: 0;
  background: transparent;
}

.segmented {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  gap: 3px;
}

.segmented button {
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 6px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.segmented button.active {
  background: var(--charcoal);
  color: #fff;
}

.badge,
.status,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  white-space: nowrap;
}

.badge {
  padding: 5px 8px;
  background: #eef1ef;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 850;
}

.badge.green {
  background: var(--mint);
  color: var(--green);
}

.badge.gold {
  background: #fff1c8;
  color: #815300;
}

.badge.blue {
  background: var(--sky);
  color: #214ba7;
}

.badge.red {
  background: #ffe1dd;
  color: #a9342d;
}

.badge.violet {
  background: #eee8ff;
  color: var(--violet);
}

.status {
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 900;
}

.status.scheduled {
  background: var(--sky);
  color: #214ba7;
}

.status.in-progress {
  background: #fff1c8;
  color: #815300;
}

.status.completed,
.status.paid {
  background: var(--mint);
  color: var(--green);
}

.status.quote {
  background: #eee8ff;
  color: var(--violet);
}

.status.new {
  background: #eef1ef;
  color: var(--ink-2);
}

.status.contacted {
  background: var(--sky);
  color: #214ba7;
}

.status.quote-sent {
  background: #fff1c8;
  color: #815300;
}

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

.status.draft,
.status.unpaid {
  background: #eef1ef;
  color: var(--ink-2);
}

.status.urgent {
  background: #ffe1dd;
  color: #a9342d;
}

.hero-panel {
  position: relative;
  min-height: 360px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  overflow: hidden;
  background:
    linear-gradient(100deg, rgba(17, 24, 32, 0.98), rgba(23, 97, 70, 0.92) 56%, rgba(244, 189, 61, 0.2)),
    var(--charcoal);
  color: #fff;
  border: 0;
}

.hero-copy {
  position: relative;
  z-index: 1;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.hero-copy h2 {
  margin: 10px 0 12px;
  font-size: 32px;
  line-height: 1.08;
}

.hero-copy p {
  max-width: 560px;
  margin: 0;
  color: rgba(255, 254, 250, 0.76);
}

.hero-image {
  min-height: 360px;
  background:
    linear-gradient(90deg, rgba(17, 24, 32, 0.76), rgba(17, 24, 32, 0.05)),
    url("assets/topslide-field-owner.png") center / cover;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.hero-stat {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.hero-stat strong {
  display: block;
  font-size: 20px;
}

.hero-stat span {
  color: rgba(255, 254, 250, 0.68);
  font-size: 12px;
}

.job-card {
  display: grid;
  gap: 14px;
}

.card-top,
.job-card-head,
.lead-card-head,
.member-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.job-title,
.lead-title {
  min-width: 0;
}

.job-title h3,
.lead-title h3,
.member-head h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
}

.job-title p,
.lead-title p,
.member-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.job-meta,
.lead-meta,
.member-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.job-numbers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.mini-stat {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.mini-stat span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.mini-stat strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.photo-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.photo-tile {
  position: relative;
  min-height: 88px;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, #cbdcff, #f5e2b1);
  border: 1px solid rgba(17, 24, 32, 0.1);
}

.photo-tile img {
  width: 100%;
  height: 100%;
  min-height: 88px;
  object-fit: cover;
}

.photo-tile.placeholder {
  display: grid;
  place-items: center;
  color: rgba(17, 24, 32, 0.65);
  font-size: 12px;
  font-weight: 900;
}

.photo-tile.wash {
  background:
    linear-gradient(135deg, rgba(49, 95, 213, 0.7), rgba(223, 247, 223, 0.7)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.32) 0 5px, transparent 5px 14px);
}

.photo-tile.lawn {
  background:
    linear-gradient(135deg, rgba(33, 129, 94, 0.86), rgba(244, 189, 61, 0.62)),
    radial-gradient(circle at 25% 24%, rgba(255, 255, 255, 0.45), transparent 22%);
}

.photo-tile.haul {
  background:
    linear-gradient(135deg, rgba(238, 127, 49, 0.82), rgba(46, 52, 59, 0.8)),
    linear-gradient(90deg, transparent 0 28%, rgba(255, 255, 255, 0.28) 28% 31%, transparent 31%);
}

.avatar-row {
  display: flex;
  align-items: center;
}

.avatar {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  border: 2px solid var(--surface);
  background: var(--green);
  color: #fff;
  font-size: 11px;
  font-weight: 950;
}

.avatar + .avatar {
  margin-left: -8px;
}

.avatar.gold {
  background: var(--gold);
  color: var(--charcoal);
}

.avatar.blue {
  background: var(--blue);
}

.avatar.orange {
  background: var(--orange);
}

.avatar.violet {
  background: var(--violet);
}

.quick-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
}

.timeline-dot {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: #eef1ef;
  color: var(--green);
}

.timeline-item strong {
  display: block;
  font-size: 14px;
}

.timeline-item p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.pipeline-column {
  min-width: 240px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 254, 250, 0.62);
}

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

.pipeline-head h3 {
  margin: 0;
  font-size: 14px;
}

.lead-card {
  display: grid;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.lead-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 900;
}

.progress-track {
  width: 100%;
  height: 9px;
  border-radius: 99px;
  background: #e6e1d7;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: var(--value, 50%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--gold));
}

.table-wrap {
  overflow: auto;
}

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

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

tr:last-child td {
  border-bottom: 0;
}

.chart {
  display: grid;
  align-items: end;
  grid-template-columns: repeat(7, minmax(26px, 1fr));
  gap: 10px;
  height: 230px;
  padding: 12px 0 0;
}

.bar-wrap {
  min-width: 0;
  display: grid;
  align-items: end;
  gap: 8px;
  height: 100%;
}

.bar {
  min-height: 10px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--green-2), var(--green));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.bar.gold {
  background: linear-gradient(180deg, #f8d878, var(--gold));
}

.bar.blue {
  background: linear-gradient(180deg, #6f93ed, var(--blue));
}

.bar-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-align: center;
}

.insight-list {
  display: grid;
  gap: 10px;
}

.insight {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.insight-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--charcoal);
  color: #fff;
}

.insight strong {
  display: block;
}

.insight p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.map-canvas {
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 0;
  height: auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(223, 247, 223, 0.9), rgba(220, 232, 255, 0.9)),
    radial-gradient(circle at 18% 22%, rgba(244, 189, 61, 0.32), transparent 28%),
    radial-gradient(circle at 76% 78%, rgba(23, 97, 70, 0.22), transparent 30%);
}

.leaflet-map {
  aspect-ratio: 1 / 1;
  width: 100%;
  min-height: 0;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
}

.leaflet-map .leaflet-control-attribution {
  font-size: 10px;
}

.leaflet-pin {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  pointer-events: none;
}

.map-canvas.picker {
  aspect-ratio: auto;
  min-height: 260px;
  cursor: crosshair;
}

.map-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(17, 24, 32, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 24, 32, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
}

.map-road {
  position: absolute;
  height: 20px;
  border-radius: 999px;
  background: rgba(255, 254, 250, 0.82);
  box-shadow: 0 0 0 1px rgba(17, 24, 32, 0.08);
}

.road-a {
  width: 120%;
  left: -8%;
  top: 47%;
  transform: rotate(-13deg);
}

.road-b {
  width: 80%;
  left: 23%;
  top: 24%;
  transform: rotate(42deg);
}

.road-c {
  width: 65%;
  left: -9%;
  top: 76%;
  transform: rotate(22deg);
}

.map-pin {
  position: absolute;
  z-index: 2;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  transform: translate(-50%, -100%);
}

.map-pin span {
  display: block;
  width: 22px;
  height: 22px;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 6px 16px rgba(17, 24, 32, 0.28);
}

.map-pin span::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  left: 5px;
  top: 5px;
  border-radius: 50%;
  background: #fff;
}

.map-pin.one-time span {
  background: var(--red);
}

.map-pin.repeat span {
  background: var(--green);
}

.map-pin.home span {
  background: var(--blue);
}

.map-pin.active span,
.map-pin:hover span {
  box-shadow:
    0 6px 16px rgba(17, 24, 32, 0.28),
    0 0 0 5px rgba(244, 189, 61, 0.34);
}

.day-cell {
  min-height: 112px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.day-cell.muted {
  opacity: 0.45;
}

.day-num {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.day-job {
  margin-top: 7px;
  padding: 7px;
  border-radius: 6px;
  background: var(--mint);
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
}

.member-card {
  display: grid;
  gap: 13px;
}

.workload {
  display: grid;
  gap: 7px;
}

.workload-line {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

.site-studio {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(360px, 1.2fr);
  gap: 16px;
  align-items: start;
}

.site-preview {
  overflow: hidden;
  background: #fff;
}

.preview-hero {
  min-height: 285px;
  padding: 24px;
  display: grid;
  align-content: end;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(17, 24, 32, 0.12), rgba(17, 24, 32, 0.82)),
    url("assets/topslide-field-owner.png") center / cover;
}

.preview-hero h2 {
  max-width: 580px;
  margin: 8px 0 8px;
  font-size: 34px;
  line-height: 1.1;
}

.preview-hero p {
  max-width: 560px;
  margin: 0;
  color: rgba(255, 254, 250, 0.8);
}

.preview-body {
  padding: 18px;
  display: grid;
  gap: 14px;
}

.service-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.service-pill {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  font-weight: 900;
}

.trust-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.trust-item {
  padding: 12px;
  border-radius: var(--radius);
  background: #eef1ef;
}

.trust-item strong {
  display: block;
}

.trust-item span {
  color: var(--muted);
  font-size: 12px;
}

.color-swatches {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.swatch {
  width: 32px;
  height: 32px;
  border: 2px solid #fff;
  border-radius: 999px;
  box-shadow: 0 0 0 1px var(--line);
}

.swatch.active {
  box-shadow: 0 0 0 2px var(--charcoal);
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.toggle-row:last-child {
  border-bottom: 0;
}

.switch {
  position: relative;
  width: 48px;
  height: 28px;
  flex: 0 0 auto;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #d8d3c8;
  transition: background 140ms ease;
}

.switch span::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(17, 24, 32, 0.2);
  transition: transform 140ms ease;
}

.switch input:checked + span {
  background: var(--green);
}

.switch input:checked + span::after {
  transform: translateX(20px);
}

.empty-state {
  min-height: 180px;
  display: grid;
  place-items: center;
  padding: 28px;
  border: 1px dashed #cfc7b8;
  border-radius: var(--radius);
  background: rgba(255, 254, 250, 0.58);
  text-align: center;
}

.empty-state strong {
  display: block;
  font-size: 18px;
}

.empty-state p {
  max-width: 420px;
  margin: 7px auto 0;
  color: var(--muted);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(17, 24, 32, 0.62);
}

.modal-card {
  width: min(760px, 100%);
  max-height: min(820px, calc(100vh - 44px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.28);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 0;
  font-size: 20px;
}

.modal-body {
  overflow: auto;
  padding: 20px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

#toast-root {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 200;
  display: grid;
  gap: 10px;
}

.toast {
  width: min(370px, calc(100vw - 36px));
  padding: 13px 14px;
  border: 1px solid rgba(23, 97, 70, 0.22);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
  font-weight: 800;
}

.muted {
  color: var(--muted);
}

.nowrap {
  white-space: nowrap;
}

.hidden {
  display: none !important;
}

@media (max-width: 1180px) {
  .grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid.two,
  .hero-panel,
  .site-studio,
  .public-hero,
  .public-split {
    grid-template-columns: 1fr;
  }

  .hero-image {
    min-height: 250px;
  }

  .public-hero-copy {
    justify-self: start;
  }

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

@media (max-width: 860px) {
  .public-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .public-nav-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .public-hero h1 {
    font-size: 40px;
  }

  .public-hero-media img {
    height: auto;
  }

  .public-feature-grid {
    grid-template-columns: 1fr;
  }

  .login-page {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: auto;
  }

  .login-copy {
    min-height: 520px;
    padding: 24px;
  }

  .login-headline h1 {
    font-size: 40px;
  }

  .login-panel {
    min-height: auto;
  }

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

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 90;
    width: min(320px, calc(100vw - 54px));
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mobile-menu {
    display: inline-flex;
  }

  .topbar {
    align-items: flex-start;
    padding: 14px;
  }

  .content {
    padding: 14px;
  }

  .grid.three,
  .grid.four,
  .hero-stats,
  .trust-row,
  .service-list {
    grid-template-columns: 1fr;
  }

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

  .login-proof {
    grid-template-columns: 1fr;
  }

  .page-title {
    font-size: 20px;
  }
}

@media (max-width: 560px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-actions,
  .toolbar,
  .searchbar {
    width: 100%;
  }

  .btn {
    flex: 1 1 auto;
  }

  .job-numbers,
  .photo-strip,
  .calendar-grid {
    grid-template-columns: 1fr;
  }

  .calendar-grid {
    gap: 6px;
  }

  .day-cell {
    min-height: auto;
  }

  .modal-backdrop {
    padding: 10px;
  }
}
