:root {
  --ink: #202633;
  --muted: #667085;
  --line: #d9dee8;
  --page: #f3f6fb;
  --panel: #ffffff;
  --green: #173f3a;
  --teal: #1d8a93;
  --gold: #f5b84b;
  --red: #bd5843;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  -webkit-text-size-adjust: 100%;
}

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

button {
  cursor: pointer;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--green);
  text-decoration: none;
}

.brand span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  color: var(--green);
  background: var(--gold);
  font-weight: 900;
}

nav {
  display: flex;
  gap: 8px;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
}

.top-nav:empty {
  display: none;
}

.nav-link {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 900;
}

.nav-link:hover,
.nav-link:focus {
  outline: 0;
  color: var(--green);
  background: #f3fbfb;
}

.nav-link.is-active {
  color: #ffffff;
  background: var(--teal);
}

.nav-action {
  border-color: var(--line);
  color: var(--ink);
  background: #ffffff;
}

nav button,
.secondary-button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  font-weight: 800;
}

.primary-button {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: var(--teal);
  font-weight: 900;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

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

.realtime-bar {
  width: max-content;
  max-width: calc(100% - 48px);
  margin: 18px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  opacity: 0.72;
}

.realtime-bar.is-live {
  border-color: rgba(29, 138, 147, 0.35);
  color: var(--green);
  background: #f7fcfc;
}

.hero,
.landing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 24px;
  align-items: stretch;
}

.landing-grid {
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  align-items: start;
}

.landing-copy {
  position: sticky;
  top: 86px;
}

.landing-copy h1 {
  font-size: clamp(2.2rem, 4vw, 3.6rem);
}

.landing-form {
  max-width: none;
}

.quick-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.quick-points span {
  padding: 9px 11px;
  border-radius: 999px;
  color: var(--green);
  background: #fff4dc;
  font-size: 0.84rem;
  font-weight: 900;
}

.landing-note {
  margin-top: 22px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.landing-note strong {
  display: block;
  margin-bottom: 4px;
}

.landing-note p {
  margin: 0;
}

.landing-content {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.content-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.content-card span {
  display: grid;
  width: 38px;
  height: 38px;
  margin-bottom: 12px;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: var(--green);
  font-size: 0.84rem;
  font-weight: 900;
}

.content-card strong {
  display: block;
  font-size: 1.05rem;
}

.content-card p {
  margin-bottom: 0;
}

.checklist-panel {
  margin-top: 24px;
}

.checklist-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.checklist-grid span {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--ink);
  font-weight: 800;
}

.team-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 24px 0 4px;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
}

.team-footer span {
  color: var(--muted);
  font-weight: 900;
}

.team-footer button {
  min-height: 34px;
  padding: 0 8px;
  border: 0;
  color: var(--teal);
  background: transparent;
  font-size: 0.9rem;
  font-weight: 900;
}

.team-footer button:hover {
  text-decoration: underline;
}

.home-panel {
  max-width: 920px;
  margin: 0 auto;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.role-card {
  display: grid;
  justify-items: start;
  gap: 8px;
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
}

.role-card span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: var(--teal);
  font-weight: 900;
}

.role-card small {
  color: var(--muted);
  line-height: 1.4;
}

.panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 20px 60px rgba(32, 38, 51, 0.08);
}

.customer-panel {
  display: grid;
  gap: 18px;
  max-width: 980px;
  margin: 0 auto;
}

.customer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.save-pill {
  flex: 0 0 auto;
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--green);
  background: #fff4dc;
  font-size: 0.82rem;
  font-weight: 900;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.section-title span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: var(--green);
  font-size: 0.85rem;
  font-weight: 900;
}

.eyebrow {
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 6px 0 12px;
  line-height: 1.05;
}

h1 {
  font-size: clamp(2.1rem, 5vw, 4.5rem);
}

h3 {
  margin-top: 22px;
  font-size: 1rem;
}

p {
  color: var(--muted);
  line-height: 1.55;
}

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

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

.location-block {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.mini-grid {
  display: grid;
  grid-template-columns: minmax(90px, 0.8fr) minmax(0, 1fr);
  gap: 10px;
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 3px solid rgba(29, 138, 147, 0.14);
  border-color: var(--teal);
}

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

.map-picker {
  display: grid;
  gap: 8px;
  position: relative;
}

.map-suggestions {
  position: absolute;
  top: 82px;
  left: 0;
  right: 0;
  z-index: 40;
  display: none;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(32, 38, 51, 0.16);
}

.map-suggestions:not(:empty) {
  display: grid;
}

.map-suggestions button {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 54px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  background: #ffffff;
  text-align: left;
}

.map-suggestions button:last-child {
  border-bottom: 0;
}

.map-suggestions button:hover,
.map-suggestions button:focus {
  outline: 0;
  background: #f3fbfb;
}

.map-suggestions strong {
  font-size: 0.92rem;
}

.map-suggestions span,
.map-status {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.video-upload small {
  display: block;
  color: var(--muted);
}

.upload-icon {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: var(--teal);
  font-weight: 900;
}

.video-upload {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
}

.video-row {
  display: grid;
}

.video-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.video-upload.has-file {
  border-color: var(--teal);
  background: #eefafa;
}

.video-upload.has-error {
  border-color: var(--red);
  background: #fff7f5;
}

.otp-box {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.otp-box p,
.otp-box small {
  margin: 4px 0 0;
  color: var(--muted);
}

.otp-actions {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.tab-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.wide-button {
  min-width: 180px;
}

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

.lead-group {
  margin-top: 18px;
}

.lead-dashboard-grid .lead-group {
  margin-top: 0;
}

.lead-group h3 {
  margin-bottom: 10px;
}

.subpanel {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.card strong,
.metric strong {
  display: block;
}

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

.session-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 18px;
}

.card-head,
.bid-row,
.inline-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.bid-row {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.bid-row small {
  display: block;
  color: var(--muted);
}

.meta-line {
  margin: 4px 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.activity-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.activity-list.empty {
  color: var(--muted);
  font-size: 0.9rem;
}

.activity-item {
  display: grid;
  gap: 2px;
}

.activity-item strong {
  font-size: 0.92rem;
}

.activity-item span,
.activity-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.inline-action {
  align-items: end;
  margin-top: 12px;
}

.inline-action .field {
  flex: 1 1 180px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--green);
  background: #fff4dc;
  font-size: 0.78rem;
  font-weight: 900;
}

.metric {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.metric span {
  color: var(--muted);
  font-size: 0.82rem;
}

@media (max-width: 780px) {
  .app {
    padding: 14px;
  }

  .topbar {
    align-items: center;
    padding: 12px 14px;
  }

  nav {
    overflow-x: auto;
    padding-bottom: 2px;
    width: 100%;
  }

  nav button {
    flex: 0 0 auto;
    min-width: max-content;
  }

  .hero,
  .landing-grid,
  .location-grid,
  .mini-grid,
  .grid,
  .metrics,
  .role-grid,
  .dashboard-grid,
  .landing-content,
  .checklist-grid {
    grid-template-columns: 1fr;
  }

  .realtime-bar {
    max-width: calc(100% - 28px);
  }

  .card-head,
  .bid-row,
  .inline-action,
  .session-bar,
  .otp-actions {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .panel {
    padding: 16px;
  }

  .customer-head {
    display: grid;
  }

  .landing-copy {
    position: static;
  }

  .save-pill {
    width: max-content;
  }

  .customer-actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin: 0 -16px -16px;
    padding: 12px 16px;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
  }

  .customer-actions .primary-button {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .brand strong {
    font-size: 0.95rem;
  }

  .topbar {
    gap: 10px;
  }

  .field input,
  .field select,
  .field textarea {
    min-height: 50px;
  }

  .video-upload {
    align-items: flex-start;
  }
}
