:root {
  color-scheme: light;
  --ink: #111111;
  --muted: #686868;
  --line: #e4e4e4;
  --paper: #f6f6f6;
  --surface: #ffffff;
  --surface-strong: #f3eeee;
  --red: #c1121f;
  --red-dark: #8f0d17;
  --black: #080808;
  --charcoal: #1a1a1a;
  --brick: #c1121f;
  --amber: #9b1c25;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  overflow-y: auto;
  background: var(--black);
  color: #f5fbfa;
}

.brand,
.nav-link {
  text-decoration: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--red), var(--charcoal));
  font-weight: 800;
}

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

.brand small {
  color: #f0b7bc;
  font-weight: 700;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: var(--radius);
  color: #c9dcda;
  font-weight: 700;
}

.nav-link:hover,
.nav-link.active,
.brand.active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.nav-link span {
  width: 22px;
  text-align: center;
}

.sidebar-card {
  display: flex;
  gap: 12px;
  margin-top: auto;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
}

.sidebar-card p {
  margin: 4px 0 0;
  color: #d8d8d8;
  font-size: 0.84rem;
  line-height: 1.45;
}

.status-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: #ff3b4d;
  box-shadow: 0 0 0 5px rgba(193, 18, 31, 0.2);
  flex: 0 0 auto;
}

.workspace {
  min-width: 0;
  padding: 22px;
}

.workspace > *,
.dashboard-grid > *,
.report-layout > *,
.ai-layout > *,
.settings-grid > *,
.admin-layout > *,
.crm-layout > *,
.panel > *,
.panel-header > * {
  min-width: 0;
}

.topbar {
  position: sticky;
  z-index: 5;
  top: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -22px -22px 18px;
  padding: 16px 22px;
  border-bottom: 1px solid rgba(228, 228, 228, 0.86);
  background: rgba(246, 246, 246, 0.92);
  backdrop-filter: blur(12px);
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
  flex: 1;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.search-wrap input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.icon-button,
.primary-action,
.secondary-action,
.glass-action,
.segment,
.template-list button {
  min-height: 42px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 800;
}

.icon-button {
  display: none;
  width: 44px;
  background: var(--surface);
  border-color: var(--line);
}

.primary-action {
  padding: 0 16px;
  background: var(--red);
  color: #ffffff;
  border-color: var(--red);
}

.primary-action:hover {
  background: var(--red-dark);
}

.secondary-action,
.template-list button {
  padding: 0 16px;
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}

.glass-action {
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.hero-band.view.is-active,
.home-grid.view.is-active,
.conversion-grid.view.is-active,
.cta-band.view.is-active,
.metric-grid.view.is-active,
.dashboard-grid.view.is-active {
  display: grid;
}

.hero-band {
  position: relative;
  min-height: 380px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--black);
  box-shadow: var(--shadow);
}

.hero-band img,
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-video {
  z-index: 0;
}

.hero-fallback {
  z-index: -1;
}

.hero-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.9), rgba(18, 18, 18, 0.62) 48%, rgba(193, 18, 31, 0.12));
}

.hero-overlay {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  max-width: 670px;
  min-height: 380px;
  padding: 48px;
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--red);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-overlay .eyebrow {
  color: #ffb3ba;
}

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

h1,
h2 {
  letter-spacing: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2.1rem, 4vw, 4.6rem);
  line-height: 1;
}

h2 {
  margin-bottom: 0;
  font-size: 1.18rem;
}

.hero-overlay p:not(.eyebrow) {
  max-width: 560px;
  margin: 18px 0 0;
  color: #e1eeee;
  font-size: 1.04rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.metric-grid,
.home-grid,
.conversion-grid,
.dashboard-grid,
.report-layout,
.ai-layout,
.settings-grid {
  display: grid;
  gap: 14px;
}

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

.home-grid {
  grid-template-columns: 1.4fr repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.conversion-grid {
  grid-template-columns: 1.25fr 1fr 1fr;
  margin-top: 14px;
}

.dashboard-grid,
.report-layout,
.ai-layout,
.settings-grid,
.request-layout,
.estimate-layout,
.booking-layout,
.chatbot-layout,
.admin-layout,
.analytics-layout,
.crm-layout,
.prospection-layout,
.followup-layout,
.contact-layout {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.span-2 {
  grid-column: span 2;
}

.metric,
.panel,
.home-card,
.cta-band,
.service-card,
.schedule-card,
.defect-card,
.client-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.trust-list,
.testimonial-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.trust-list div,
.testimonial-list article {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfbfb;
}

.trust-list small,
.testimonial-list small {
  color: var(--muted);
  line-height: 1.45;
}

.area-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.area-tags span {
  padding: 8px 10px;
  border-radius: 999px;
  background: #fff0f1;
  color: var(--premium-red);
  font-size: 0.82rem;
  font-weight: 800;
}

.cta-band {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-top: 14px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(180, 15, 29, 0.15), transparent 52%),
    var(--premium-black);
  color: #ffffff;
}

.cta-band .eyebrow {
  color: #ffb3ba;
}

.cta-band h2 {
  font-size: clamp(1.35rem, 2.3vw, 2rem);
}

.cta-band p {
  margin: 10px 0 0;
  color: #eeeeee;
  line-height: 1.55;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.cta-band .secondary-action {
  background: #ffffff;
}

.request-layout {
  display: grid;
  gap: 14px;
  align-items: start;
}

.estimate-layout {
  display: grid;
  gap: 14px;
  align-items: start;
}

.booking-layout {
  display: grid;
  gap: 14px;
  align-items: start;
}

.chatbot-layout {
  display: grid;
  gap: 14px;
  align-items: start;
}

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

.admin-layout {
  display: grid;
  gap: 14px;
  align-items: start;
}

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

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

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

.prospection-layout {
  display: grid;
  gap: 14px;
  align-items: start;
}

.email-service-panel,
.campaign-panel {
  grid-column: span 3;
}

.prospects-panel,
.email-queue-panel {
  grid-column: span 1;
}

.email-queue-panel {
  grid-column: span 2;
}

.integration-warning {
  margin-top: 14px;
  padding: 14px;
  border-left: 4px solid var(--premium-red);
  border-radius: var(--radius);
  background: #fffafa;
}

.integration-warning p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.prospect-list,
.email-queue {
  display: grid;
  gap: 10px;
}

.prospect-card,
.email-queue-item,
.email-queue-empty {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfbfb;
}

.prospect-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.prospect-card strong,
.prospect-card small,
.prospect-card em,
.email-queue-item strong,
.email-queue-item small {
  display: block;
}

.prospect-card em {
  margin-top: 4px;
  color: var(--premium-red);
  font-style: normal;
  font-size: 0.82rem;
  font-weight: 800;
}

.prospect-card span,
.email-queue-item span {
  padding: 6px 9px;
  border-radius: 999px;
  background: #fff0f1;
  color: var(--premium-red);
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.email-queue-item {
  display: grid;
  gap: 6px;
}

.email-queue-item p {
  margin: 0;
  color: var(--charcoal);
}

.email-queue-empty {
  color: var(--muted);
  line-height: 1.5;
}

.crm-layout {
  display: grid;
  gap: 14px;
  align-items: start;
}

.crm-directory,
.crm-pipeline-panel {
  grid-column: span 2;
}

.crm-search {
  margin-bottom: 12px;
}

.crm-list {
  display: grid;
  gap: 10px;
  max-height: 560px;
  overflow-y: auto;
  padding-right: 4px;
}

.crm-client {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  text-align: left;
}

.crm-client.active,
.crm-client:hover {
  border-color: var(--premium-red);
  background: #fffafa;
}

.crm-client strong,
.crm-client small,
.crm-client em {
  display: block;
}

.crm-client em {
  margin-top: 4px;
  color: var(--premium-red);
  font-style: normal;
  font-size: 0.82rem;
  font-weight: 800;
}

.crm-profile {
  position: sticky;
  top: 92px;
}

.crm-profile-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.crm-profile-head h2 {
  margin: 0;
}

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

.crm-profile-grid article,
.crm-next {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfbfb;
}

.crm-profile-grid span,
.crm-next span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.crm-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.crm-tags span {
  padding: 6px 9px;
  border-radius: 999px;
  background: #fff0f1;
  color: var(--premium-red);
  font-size: 0.78rem;
  font-weight: 800;
}

.crm-profile p {
  margin: 14px 0 0;
  color: var(--charcoal);
  line-height: 1.55;
}

.crm-pipeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(170px, 1fr));
  gap: 10px;
  overflow-x: auto;
}

.crm-stage {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 240px;
  padding: 12px;
  border-radius: var(--radius);
  background: #f9f9f9;
}

.crm-stage > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.crm-stage > div span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--black);
  color: #ffffff;
  font-weight: 800;
}

.crm-stage button {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  text-align: left;
}

.crm-stage button:hover {
  border-color: var(--premium-red);
}

.crm-activity {
  display: grid;
  gap: 10px;
}

.crm-activity article {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfbfb;
}

.crm-activity span {
  color: var(--premium-red);
  font-size: 0.78rem;
  font-weight: 800;
}

.analytics-layout {
  display: grid;
  gap: 14px;
  align-items: start;
}

.analytics-chart-panel {
  grid-column: span 2;
}

.bar-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  min-height: 270px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfbfb;
}

.bar-item {
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 8px;
  min-height: 230px;
  text-align: center;
}

.bar-item span {
  align-self: end;
  min-height: 12px;
  border-radius: 8px 8px 2px 2px;
  background: linear-gradient(180deg, #d2192a, var(--premium-red));
  box-shadow: 0 10px 20px rgba(180, 15, 29, 0.18);
}

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

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

.analytics-row {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfbfb;
}

.analytics-row div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.analytics-row span {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #ededed;
}

.analytics-row span::before {
  content: "";
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: var(--premium-red);
}

.analytics-note p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.followup-layout {
  display: grid;
  gap: 14px;
  align-items: start;
}

.contact-layout {
  display: grid;
  gap: 14px;
  align-items: start;
}

.contact-card {
  grid-column: span 2;
}

.contact-card p:not(.eyebrow) {
  max-width: 780px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.contact-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.contact-actions a,
.contact-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
}

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

.integration-list article {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfbfb;
}

.integration-list small {
  color: var(--muted);
  line-height: 1.45;
}

.followup-editor {
  grid-column: span 1;
}

.followup-preview-panel {
  grid-column: span 2;
}

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

.followup-template {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  text-align: left;
}

.followup-template.active {
  border-color: var(--red);
  background: #fff0f1;
}

.followup-template span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--black);
  color: #ffffff;
  font-weight: 800;
}

.followup-template small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.followup-fields {
  margin-bottom: 12px;
}

#followupPreview {
  min-height: 220px;
  background: #fafafa;
  line-height: 1.6;
}

.admin-table-panel {
  grid-column: span 2;
}

.admin-status {
  min-width: 180px;
  font-weight: 800;
}

.admin-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  width: fit-content;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
}

.status-nouveau,
.admin-status-pill.status-nouveau {
  background: #fff0f1;
  color: var(--red);
}

.status-contacte,
.status-soumission-envoyee,
.admin-status-pill.status-contacte,
.admin-status-pill.status-soumission-envoyee {
  background: #f6f6f6;
  color: var(--charcoal);
}

.status-rendez-vous-confirme,
.admin-status-pill.status-rendez-vous-confirme {
  background: #111111;
  color: #ffffff;
}

.status-rapport-remis,
.admin-status-pill.status-rapport-remis {
  background: #f0f0f0;
  color: var(--red-dark);
}

.status-ferme,
.admin-status-pill.status-ferme {
  background: #ffffff;
  color: var(--muted);
}

.admin-note-stack {
  display: grid;
  gap: 10px;
}

.admin-note-stack article {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfbfb;
}

.admin-note-stack strong,
.admin-note-stack small {
  display: block;
}

.admin-note-stack p {
  margin: 0;
  color: var(--charcoal);
  line-height: 1.5;
}

.chatbot-panel {
  grid-column: span 2;
}

.chatbot-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.assistant-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--black);
  color: #ffffff;
  font-weight: 800;
}

.chatbot-header strong,
.chatbot-header small {
  display: block;
}

.chatbot-header small {
  margin-top: 4px;
  color: var(--muted);
}

.chat-window {
  display: grid;
  align-content: start;
  gap: 12px;
  height: 430px;
  overflow-y: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fafafa;
}

.chat-message {
  max-width: 82%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.chat-message.user {
  justify-self: end;
  background: #fff0f1;
  border-color: rgba(193, 18, 31, 0.24);
}

.chat-message strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
}

.chat-message p {
  margin: 0;
  color: var(--charcoal);
  line-height: 1.5;
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 12px;
}

.faq-panel {
  max-height: 668px;
  overflow: hidden;
}

.faq-list {
  display: grid;
  gap: 8px;
  max-height: 590px;
  overflow-y: auto;
  padding-right: 4px;
}

.faq-question {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  text-align: left;
  font-weight: 700;
}

.faq-question:hover {
  border-color: var(--red);
  color: var(--red);
}

.estimate-calculator {
  grid-column: span 2;
}

.booking-calendar {
  grid-column: span 2;
}

.calendar-controls {
  display: flex;
  gap: 8px;
}

.compact-icon {
  display: inline-grid;
  width: 42px;
  place-items: center;
  font-size: 1.4rem;
}

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

.calendar-day,
.slot-button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  text-align: left;
}

.calendar-day {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 14px;
}

.calendar-day span,
.calendar-day small,
.slot-button strong {
  color: var(--muted);
}

.calendar-day strong {
  font-size: 2rem;
  line-height: 1;
}

.calendar-day.active,
.slot-button.active {
  border-color: var(--red);
  background: #fff0f1;
  box-shadow: 0 0 0 3px rgba(193, 18, 31, 0.08);
}

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

.slot-button {
  display: grid;
  gap: 6px;
  min-height: 72px;
  padding: 14px;
}

.slot-button span {
  font-weight: 800;
}

.slot-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.booking-summary {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--black);
  color: #ffffff;
}

.booking-summary span {
  color: #ffb3ba;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.booking-summary p {
  margin: 0;
  color: #f0f0f0;
  line-height: 1.5;
}

.estimate-result {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding: 18px;
  border-radius: var(--radius);
  background: #fff0f1;
  color: var(--red-dark);
}

.estimate-result span {
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.estimate-result strong {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1;
}

.estimate-result p {
  margin: 0;
  color: var(--charcoal);
  line-height: 1.5;
}

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

.pricing-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfbfb;
}

.pricing-list span {
  color: var(--muted);
}

.pricing-list strong {
  text-align: right;
}

.estimate-disclaimer {
  margin: 14px 0 0;
  padding: 14px;
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--charcoal);
  font-weight: 700;
  line-height: 1.5;
}

.request-form {
  grid-column: span 2;
}

.form-section {
  display: grid;
  gap: 14px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.form-section:last-of-type {
  margin-bottom: 0;
}

.wide-field {
  grid-column: span 2;
}

select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  color: var(--ink);
  background: #ffffff;
  outline-color: var(--red);
}

.urgency-field {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.urgency-field legend {
  padding: 0 6px;
  font-weight: 800;
}

.urgency-field label,
.toggle-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.urgency-field input,
.toggle-row input {
  width: auto;
  accent-color: var(--red);
}

.upload-field {
  padding: 14px;
  border: 1px dashed #cfcfcf;
  border-radius: var(--radius);
  background: #fafafa;
}

.upload-field small {
  line-height: 1.45;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.form-note {
  margin: 12px 0 0;
  color: var(--muted);
}

.was-validated input:invalid,
.was-validated select:invalid,
.was-validated textarea:invalid {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(193, 18, 31, 0.1);
}

.request-summary {
  position: sticky;
  top: 92px;
}

.request-summary ol {
  display: grid;
  gap: 12px;
  margin: 16px 0;
  padding-left: 22px;
  line-height: 1.5;
}

.summary-callout {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: var(--radius);
  background: #fff0f1;
  color: var(--red-dark);
}

.summary-callout small {
  color: var(--charcoal);
  line-height: 1.45;
}

.service-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
}

.service-hero p:not(.eyebrow) {
  max-width: 780px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

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

.service-card {
  display: flex;
  min-height: 230px;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
}

.service-card span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  width: fit-content;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff0f1;
  color: var(--red);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.service-card strong {
  display: block;
  margin-top: 14px;
  font-size: 1.12rem;
}

.service-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.home-intro {
  grid-row: span 2;
}

.home-intro p:not(.eyebrow) {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.home-card {
  display: grid;
  gap: 12px;
  min-height: 156px;
  padding: 18px;
}

.home-card span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: #fff0f1;
  color: var(--red);
  font-weight: 800;
}

.home-card strong {
  font-size: 1.08rem;
}

.home-card small {
  color: var(--muted);
  line-height: 1.5;
}

.metric {
  display: grid;
  gap: 8px;
  min-height: 126px;
  padding: 18px;
}

.metric span,
.metric small,
small,
.timeline span,
.timeline small,
.ai-result span,
.ai-result p,
.defect-card small,
.client-card small,
.report-stack small,
.mini-card small {
  color: var(--muted);
}

.metric strong {
  font-size: 1.85rem;
  line-height: 1;
}

.panel {
  padding: 20px;
}

.panel-header,
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.page-heading {
  margin: 0 0 18px;
}

.segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-x: auto;
  background: var(--paper);
}

.segment {
  padding: 0 12px;
  white-space: nowrap;
  background: transparent;
  color: var(--muted);
}

.segment.active {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}

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

.kanban-column {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 260px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--paper);
}

.kanban-title,
.mini-card-footer,
.schedule-card div,
.report-stack article,
.client-card,
.compliance-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.kanban-title span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #dce9e6;
  color: var(--red-dark);
  font-weight: 800;
}

.mini-card,
.timeline article,
.alert-stack article,
.report-stack article,
.recommendation {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdfc;
}

.mini-card {
  display: grid;
  gap: 10px;
  padding: 12px;
}

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

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.pill.critical {
  background: #fff0e8;
  color: var(--red);
}

.pill.scheduled {
  background: #f4f4f4;
  color: var(--charcoal);
}

.pill.review {
  background: #fff0f1;
  color: var(--amber);
}

.timeline,
.alert-stack,
.report-stack,
.template-list,
.ai-card,
.recommendation-grid {
  display: grid;
  gap: 10px;
}

.timeline article,
.alert-stack article,
.report-stack article,
.recommendation {
  padding: 14px;
}

.timeline strong,
.timeline small,
.report-stack span,
.report-stack strong,
.report-stack small {
  display: block;
  margin-top: 4px;
}

.alert-stack article {
  display: flex;
  gap: 12px;
}

.alert-stack strong {
  display: grid;
  width: 62px;
  min-height: 50px;
  place-items: center;
  border-radius: var(--radius);
  background: #fff0e8;
  color: var(--red);
  flex: 0 0 auto;
}

.schedule-grid,
.defect-grid,
.client-grid,
.compliance-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.schedule-card,
.defect-card,
.client-card {
  padding: 16px;
}

.schedule-card,
.defect-card {
  display: grid;
  gap: 10px;
}

.table-shell {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

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

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

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

td strong,
td span {
  display: block;
}

meter {
  width: 100%;
  height: 10px;
  vertical-align: middle;
  accent-color: var(--red);
}

.defect-card span,
.report-stack span {
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.client-card {
  align-items: center;
}

.avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: #e6eee9;
  color: var(--red-dark);
  font-weight: 800;
  flex: 0 0 auto;
}

.ai-card label,
.form-grid label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

textarea,
input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  outline-color: var(--red);
  color: var(--ink);
  background: #ffffff;
}

textarea {
  resize: vertical;
}

.full {
  width: 100%;
}

.ai-result {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.ai-result strong {
  font-size: 1.35rem;
}

.ai-result p,
.recommendation p {
  margin-bottom: 0;
  line-height: 1.5;
}

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

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

.compliance-card small {
  display: block;
  margin-top: 4px;
}

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

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

pre {
  overflow-x: auto;
  margin: 12px 0 0;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--black);
  color: #ffffff;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  max-width: min(360px, calc(100vw - 28px));
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--black);
  border: 1px solid #2a2a2a;
  color: #ffffff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

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

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    z-index: 20;
    width: 280px;
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

  .icon-button {
    display: inline-grid;
    place-items: center;
  }

  .metric-grid,
  .home-grid,
  .conversion-grid,
  .admin-metrics,
  .analytics-metrics,
  .crm-metrics,
  .prospection-metrics,
  .services-grid,
  .schedule-grid,
  .defect-grid,
  .client-grid,
  .compliance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid,
  .report-layout,
  .ai-layout,
  .settings-grid,
  .request-layout,
  .estimate-layout,
  .booking-layout,
  .chatbot-layout,
  .admin-layout,
  .analytics-layout,
  .crm-layout,
  .prospection-layout,
  .followup-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

  .request-form {
    grid-column: auto;
  }

  .estimate-calculator {
    grid-column: auto;
  }

  .booking-calendar {
    grid-column: auto;
  }

  .chatbot-panel {
    grid-column: auto;
  }

  .admin-table-panel {
    grid-column: auto;
  }

  .analytics-chart-panel {
    grid-column: auto;
  }

  .crm-directory,
  .crm-pipeline-panel {
    grid-column: auto;
  }

  .email-service-panel,
  .campaign-panel,
  .prospects-panel,
  .email-queue-panel {
    grid-column: auto;
  }

  .crm-profile {
    position: static;
  }

  .followup-editor,
  .followup-preview-panel {
    grid-column: auto;
  }

  .contact-card {
    grid-column: auto;
  }

  .faq-panel {
    max-height: none;
  }

  .request-summary {
    position: static;
  }
}

@media (max-width: 760px) {
  .workspace {
    padding: 14px;
  }

  .topbar {
    flex-wrap: wrap;
    margin: -14px -14px 14px;
    padding: 12px 14px;
  }

  .search-wrap {
    order: 3;
    flex-basis: 100%;
  }

  .secondary-action,
  .topbar .primary-action {
    flex: 1 1 132px;
  }

  .hero-band,
  .hero-overlay {
    min-height: 430px;
  }

  .hero-overlay {
    padding: 26px;
  }

  .hero-band::after {
    background: linear-gradient(0deg, rgba(10, 32, 36, 0.92), rgba(10, 32, 36, 0.32));
  }

  .metric-grid,
  .home-grid,
  .conversion-grid,
  .cta-band,
  .admin-metrics,
  .analytics-metrics,
  .crm-metrics,
  .prospection-metrics,
  .services-grid,
  .bar-chart,
  .calendar-days,
  .kanban,
  .schedule-grid,
  .defect-grid,
  .client-grid,
  .compliance-grid,
  .recommendation-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .wide-field {
    grid-column: auto;
  }

  .form-actions {
    display: grid;
  }

  .cta-actions {
    display: grid;
    justify-content: stretch;
  }

  .crm-profile-grid {
    grid-template-columns: 1fr;
  }

  .contact-actions {
    grid-template-columns: 1fr;
  }

  .chat-window {
    height: 380px;
  }

  .chat-message {
    max-width: 100%;
  }

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

  .panel-header,
  .page-heading,
  .service-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }
}

/* Premium production polish */
:root {
  --premium-red: #b40f1d;
  --premium-red-strong: #8b0b15;
  --premium-black: #070707;
  --premium-graphite: #141414;
  --premium-border: #dedede;
  --premium-soft: #f7f7f7;
  --premium-cream: #fffafa;
  --premium-shadow: 0 18px 52px rgba(0, 0, 0, 0.11);
}

body {
  background:
    linear-gradient(180deg, rgba(180, 15, 29, 0.035), transparent 340px),
    var(--paper);
}

button,
a,
input,
select,
textarea {
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease, color 150ms ease, transform 150ms ease;
}

button:hover,
.primary-action:hover,
.secondary-action:hover,
.glass-action:hover,
.contact-actions a:hover {
  transform: translateY(-1px);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(180, 15, 29, 0.22);
  outline-offset: 2px;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(180, 15, 29, 0.18), transparent 220px),
    var(--premium-black);
  border-right: 1px solid #242424;
}

.brand {
  padding: 10px;
  border-radius: var(--radius);
}

.brand-mark {
  background: linear-gradient(135deg, var(--premium-red), #2a2a2a);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.nav-link {
  color: #d2d2d2;
  border: 1px solid transparent;
}

.nav-link span {
  display: grid;
  height: 26px;
  place-items: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 800;
}

.nav-link:hover,
.nav-link.active,
.brand.active {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.12);
}

.topbar {
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.05);
}

.search-wrap,
input,
select,
textarea {
  border-color: var(--premium-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.search-wrap:focus-within,
input:focus,
select:focus,
textarea:focus {
  border-color: rgba(180, 15, 29, 0.55);
  box-shadow: 0 0 0 4px rgba(180, 15, 29, 0.09);
}

.primary-action {
  background: linear-gradient(180deg, #d2192a, var(--premium-red));
  border-color: var(--premium-red);
  box-shadow: 0 10px 22px rgba(180, 15, 29, 0.22);
}

.primary-action:hover {
  background: linear-gradient(180deg, var(--premium-red), var(--premium-red-strong));
}

.secondary-action,
.template-list button {
  background: #ffffff;
  border-color: #d6d6d6;
}

.secondary-action:hover,
.template-list button:hover {
  border-color: #b7b7b7;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.07);
}

.hero-band {
  min-height: 430px;
  border: 1px solid #1f1f1f;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.2);
}

.hero-band::after {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.94), rgba(16, 16, 16, 0.72) 50%, rgba(180, 15, 29, 0.18)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.24), transparent);
}

.hero-overlay {
  padding: clamp(28px, 5vw, 58px);
}

.hero-overlay h1 {
  max-width: 760px;
  font-weight: 800;
}

.panel,
.metric,
.home-card,
.service-card,
.schedule-card,
.defect-card,
.client-card {
  border-color: #dedede;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9), var(--premium-shadow);
}

.panel:hover,
.home-card:hover,
.service-card:hover,
.metric:hover {
  border-color: #cfcfcf;
}

.metric strong {
  color: var(--premium-black);
}

.page-heading {
  padding: 4px 0 2px;
}

.page-heading h1 {
  font-size: clamp(2rem, 3vw, 3.35rem);
}

.eyebrow {
  color: var(--premium-red);
}

.service-hero,
.estimate-disclaimer,
.summary-callout,
.estimate-result {
  background:
    linear-gradient(135deg, rgba(180, 15, 29, 0.08), transparent 55%),
    #ffffff;
}

.table-shell {
  box-shadow: var(--premium-shadow);
}

th {
  background: #fbfbfb;
}

tr:hover td {
  background: #fffafa;
}

.pill,
.admin-status-pill,
.service-card span {
  letter-spacing: 0;
}

.chat-window,
#followupPreview,
.kanban-column {
  background: #f9f9f9;
}

.toast {
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

@media (min-width: 1181px) {
  .workspace {
    padding: 26px;
  }

  .topbar {
    margin: -26px -26px 22px;
    padding: 18px 26px;
  }
}

@media (max-width: 760px) {
  .hero-band,
  .hero-overlay {
    min-height: 480px;
  }

  .icon-button.menu-button {
    width: auto;
    padding: 0 12px;
  }
}
