:root {
  --primary: #041632;
  --primary-2: #1b2b48;
  --accent: #fd761a;
  --accent-2: #ffdbca;
  --bg: #f7f9fb;
  --surface: #ffffff;
  --surface-soft: #f2f4f6;
  --line: #d9dce1;
  --line-dark: #c5c6ce;
  --text: #191c1e;
  --muted: #555a61;
  --danger: #ba1a1a;
  --danger-bg: #ffdad6;
  --success: #185b3b;
  --success-bg: #d9f6e7;
  --shadow: 0 24px 60px rgba(4, 22, 50, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(4, 22, 50, 0.06), rgba(247, 249, 251, 0) 360px),
    var(--bg);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
  display: inline-block;
  line-height: 1;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 32px;
  background: rgba(4, 22, 50, 0.98);
  color: white;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.brand,
.topbar-actions,
.assistant-row,
.booking-header,
.location-line,
.lead-topline,
.notification-heading,
.urgent-alert,
.action-row {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
}

.brand-mark,
.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #341100;
  background: var(--accent);
}

.brand-logo {
  overflow: hidden;
  background: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.brand-logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 18px;
  line-height: 1.1;
  font-weight: 900;
}

.brand small {
  color: #d7e2ff;
  margin-top: 3px;
  font-size: 13px;
}

.topbar-actions {
  gap: 10px;
}

.quiet-button,
.accent-button,
.book-button,
.action-primary,
.action-secondary {
  min-height: 42px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  font-weight: 850;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.quiet-button {
  padding: 0 15px;
  color: white;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.accent-button {
  padding: 0 16px;
  color: #341100;
  background: var(--accent);
}

.quiet-button:hover,
.accent-button:hover,
.book-button:hover,
.action-primary:hover,
.action-secondary:hover,
.service-option:hover,
.pill-group button:hover,
.slot-grid button:hover {
  transform: translateY(-1px);
}

.workspace {
  width: min(1360px, 100%);
  margin: 0 auto;
  padding: 32px;
  display: grid;
  grid-template-columns: minmax(0, 1.24fr) minmax(360px, 0.76fr);
  gap: 24px;
}

.intake-panel,
.lead-card,
.notification-card,
.sales-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.intake-panel {
  padding: 24px;
}

.hero-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #9d4300;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 36px;
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: 0;
}

.hero-strip p {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.storm-card {
  min-height: 140px;
  border-radius: 8px;
  padding: 18px;
  display: grid;
  align-content: center;
  gap: 6px;
  color: white;
  background:
    linear-gradient(rgba(4, 22, 50, 0.76), rgba(4, 22, 50, 0.74)),
    url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=700&q=80") center / cover;
}

.storm-card .material-symbols-outlined {
  color: var(--accent);
  font-size: 34px;
}

.storm-card strong {
  font-size: 18px;
}

.storm-card small {
  color: #d7e2ff;
  line-height: 1.35;
}

.assistant-row {
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.assistant-avatar {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: white;
  background: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.logo-avatar {
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
}

.logo-avatar img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
}

.assistant-bubble {
  max-width: 620px;
  padding: 14px 16px;
  color: white;
  background: var(--primary);
  border-radius: 8px;
  border-bottom-left-radius: 3px;
  line-height: 1.5;
}

.service-grid,
.contact-grid,
.metric-grid,
.slot-grid {
  display: grid;
  gap: 12px;
}

.service-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 20px;
}

.service-option {
  min-height: 54px;
  padding: 0 13px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--text);
  background: white;
  cursor: pointer;
  font-weight: 850;
}

.service-option .material-symbols-outlined {
  color: #9d4300;
}

.service-option.selected {
  color: #341100;
  background: var(--accent);
  border-color: #9d4300;
  box-shadow: 0 10px 24px rgba(253, 118, 26, 0.22);
}

.service-option.selected .material-symbols-outlined {
  color: #341100;
  font-variation-settings: "FILL" 1, "wght" 600, "GRAD" 0, "opsz" 24;
}

.form-card,
.booking-card {
  padding: 18px;
  border: 1px solid #e0e3e5;
  border-radius: 8px;
  background: var(--surface-soft);
}

.form-card {
  display: grid;
  gap: 16px;
  margin-bottom: 20px;
}

label,
legend {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

label {
  display: grid;
  gap: 8px;
}

fieldset {
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
}

legend {
  margin-bottom: 8px;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--text);
  background: white;
  outline: none;
  text-transform: none;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(4, 22, 50, 0.13);
}

.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

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

.pill-group button,
.slot-grid button {
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  color: var(--text);
  background: white;
  cursor: pointer;
  font-weight: 850;
}

.pill-group button {
  min-height: 44px;
}

.pill-group button.selected,
.slot-grid button.selected {
  color: white;
  background: var(--primary);
  border-color: var(--primary);
}

.contact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 20px;
}

.suffix-field {
  position: relative;
  display: block;
}

.suffix-field input {
  padding-right: 72px;
}

.suffix-field span {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #75777e;
  font-size: 13px;
  font-weight: 900;
  text-transform: lowercase;
}

.booking-card {
  margin-bottom: 18px;
  background: white;
}

.booking-header {
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.booking-header > .material-symbols-outlined {
  color: var(--primary);
  font-size: 28px;
}

.booking-header h2 {
  margin-bottom: 3px;
  color: var(--primary);
  font-size: 19px;
}

.booking-header p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

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

.slot-grid button {
  min-height: 56px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  text-align: left;
}

.book-button {
  width: 100%;
  min-height: 58px;
  color: #341100;
  background: var(--accent);
  font-size: 18px;
  box-shadow: 0 16px 28px rgba(253, 118, 26, 0.22);
}

.consent {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.contractor-panel {
  display: grid;
  gap: 16px;
  align-content: start;
  position: sticky;
  top: 90px;
}

.lead-card,
.notification-card,
.sales-card {
  padding: 18px;
}

.lead-topline {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: #75777e;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.priority-pill {
  padding: 7px 11px;
  border-radius: 999px;
}

.priority-pill.hot {
  color: #341100;
  background: var(--accent);
}

.priority-pill.warm {
  color: #271900;
  background: #ffdea7;
}

.priority-pill.low {
  color: #374765;
  background: #d7e2ff;
}

.lead-card h2 {
  margin-bottom: 7px;
  color: var(--primary);
  font-size: 31px;
  line-height: 1.1;
}

.location-line {
  gap: 7px;
  margin-bottom: 14px;
  color: var(--muted);
  line-height: 1.45;
}

.map-card {
  position: relative;
  height: 190px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 14px;
  background: #e0e3e5;
}

.map-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.map-pin {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--accent);
  border: 4px solid white;
  box-shadow: 0 10px 28px rgba(4, 22, 50, 0.24);
}

.map-caption {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  color: white;
  background: rgba(4, 22, 50, 0.83);
  border-radius: 8px;
  font-size: 12px;
}

.map-caption span {
  color: #d7e2ff;
}

.urgent-alert {
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 8px;
  color: #93000a;
  background: var(--danger-bg);
  font-size: 14px;
  font-weight: 850;
}

.lead-summary {
  margin-bottom: 14px;
  padding: 14px;
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  background: var(--surface-soft);
}

.lead-summary p {
  margin-bottom: 0;
  line-height: 1.5;
}

.metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 16px;
}

.metric-grid div {
  padding: 12px;
  border: 1px solid #e0e3e5;
  border-radius: 8px;
}

.metric-grid span {
  display: block;
  margin-bottom: 5px;
  color: #75777e;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.metric-grid strong {
  color: var(--primary);
  font-size: 15px;
}

.action-row {
  gap: 8px;
  flex-wrap: wrap;
}

.action-primary,
.action-secondary {
  flex: 1;
  min-width: 110px;
  padding: 0 12px;
}

.action-primary {
  color: white;
  background: var(--primary);
}

.action-secondary {
  color: var(--primary);
  background: white;
  border: 1px solid var(--line-dark);
}

.notification-heading {
  justify-content: space-between;
  gap: 12px;
}

.notification-heading span {
  padding: 6px 9px;
  color: var(--success);
  background: var(--success-bg);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.notification-heading span.error {
  color: #93000a;
  background: var(--danger-bg);
}

pre {
  white-space: pre-wrap;
  margin: 0;
  padding: 14px;
  color: #d7e2ff;
  background: var(--primary);
  border-radius: 8px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.5;
}

.sales-card h2 {
  margin-bottom: 12px;
  color: var(--primary);
  font-size: 22px;
}

.sales-card ul {
  margin: 0;
  padding-left: 19px;
  color: var(--muted);
  line-height: 1.7;
}

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

  .contractor-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    padding: 12px 16px;
  }

  .topbar-actions .quiet-button {
    display: none;
  }

  .workspace {
    padding: 16px;
  }

  .intake-panel,
  .lead-card,
  .notification-card,
  .sales-card {
    padding: 16px;
  }

  .hero-strip,
  .two-column,
  .service-grid,
  .contact-grid,
  .slot-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 28px;
  }

  .map-caption {
    display: grid;
  }
}
