:root {
  --navy: #061b3a;
  --navy-2: #0d2a55;
  --gold: #d6a83f;
  --gold-2: #f2cf74;
  --burgundy: #731d3a;
  --white: #ffffff;
  --ivory: #fffaf0;
  --mist: #eef3f8;
  --ink: #132033;
  --muted: #647084;
  --line: rgba(6, 27, 58, 0.12);
  --shadow: 0 22px 60px rgba(6, 27, 58, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--ivory);
  font-family: Inter, system-ui, sans-serif;
  line-height: 1.5;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  color: var(--white);
  background: rgba(6, 27, 58, 0.96);
  border-bottom: 1px solid rgba(214, 168, 63, 0.32);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  color: var(--navy);
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  border-radius: 50%;
  font-weight: 900;
}

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

.brand strong {
  font-size: 0.94rem;
}

.brand small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.74rem;
}

.nav-toggle {
  width: 42px;
  height: 42px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
}

.site-nav {
  position: absolute;
  top: 72px;
  right: 14px;
  left: 14px;
  display: none;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 12px;
  background: var(--navy);
  border: 1px solid rgba(214, 168, 63, 0.26);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.site-nav.open {
  display: grid;
}

.site-nav a {
  padding: 12px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.84);
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.hero {
  position: relative;
  display: grid;
  gap: 28px;
  min-height: calc(100vh - 70px);
  padding: 46px 18px 34px;
  color: var(--white);
  background:
    linear-gradient(110deg, rgba(6, 27, 58, 0.96), rgba(13, 42, 85, 0.88) 48%, rgba(115, 29, 58, 0.8)),
    url("./assets/directory-reference.jpeg") center/cover;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 9px;
  background: linear-gradient(90deg, var(--gold), var(--burgundy), var(--gold));
}

.hero-copy {
  position: relative;
  z-index: 1;
  align-self: center;
  max-width: 760px;
}

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

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.02;
}

h1,
h2 {
  font-family: "Playfair Display", Georgia, serif;
}

h1 {
  max-width: 8ch;
  font-size: clamp(3.3rem, 16vw, 7.7rem);
}

h2 {
  color: var(--navy);
  font-size: clamp(2rem, 8vw, 4rem);
}

h3 {
  color: var(--navy);
  font-size: 1.18rem;
}

.subheadline {
  margin: 16px 0 0;
  color: var(--gold-2);
  font-size: clamp(1.2rem, 5vw, 2rem);
  font-weight: 800;
}

.intro {
  max-width: 650px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.02rem;
}

.support-note {
  display: inline-flex;
  max-width: 650px;
  margin: 18px 0 0;
  padding: 10px 12px;
  color: var(--navy);
  background: rgba(242, 207, 116, 0.94);
  border-radius: 8px;
  font-weight: 900;
}

.hero-actions,
.card-actions,
.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.btn,
.card-actions a,
.card-actions button,
.quote-form button,
.admin-actions button,
.assistant-box button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 16px;
  border: 0;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.btn.primary,
.quote-form button,
.assistant-box button {
  color: var(--navy);
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
}

.btn.secondary {
  color: var(--white);
  background: var(--burgundy);
}

.btn.ghost {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.hero-media {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  align-self: end;
}

.hero-media img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.hero-media img:nth-child(2) {
  transform: translateY(-18px);
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.stats-strip div {
  padding: 18px 10px;
  text-align: center;
  border-right: 1px solid var(--line);
}

.stats-strip strong,
.stats-strip span {
  display: block;
}

.stats-strip strong {
  color: var(--burgundy);
  font-size: 1.5rem;
}

.stats-strip span {
  color: var(--muted);
  font-size: 0.78rem;
}

.section,
.ai-section {
  padding: 58px 18px;
}

.section-heading {
  max-width: 760px;
  margin: 0 auto 24px;
  text-align: center;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1rem;
}

.directory-tools {
  display: grid;
  gap: 12px;
  max-width: 960px;
  margin: 0 auto 22px;
}

label span,
.search-field span,
.filter-field span {
  display: block;
  margin-bottom: 7px;
  color: var(--navy);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 12px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

.featured-grid,
.business-grid {
  display: grid;
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
}

.featured-grid {
  margin-bottom: 16px;
}

.business-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(6, 27, 58, 0.08);
}

.business-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: top;
  background: var(--mist);
}

.business-card-body {
  padding: 16px;
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.card-topline span,
.card-topline b,
.service-tags span {
  display: inline-flex;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

.card-topline span,
.service-tags span {
  color: var(--navy);
  background: #f7ebc9;
}

.card-topline b {
  color: var(--white);
  background: var(--burgundy);
}

.owner {
  margin: 6px 0 10px;
  color: var(--burgundy);
  font-weight: 800;
}

.business-card p {
  color: var(--muted);
}

.card-actions a,
.card-actions button {
  flex: 1 1 130px;
  color: var(--navy);
  background: var(--mist);
}

.card-actions .whatsapp {
  color: var(--white);
  background: #128c4a;
}

.card-actions button {
  color: var(--white);
  background: var(--navy);
}

.warm-band {
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.92), rgba(255, 255, 255, 0.96)),
    repeating-linear-gradient(45deg, rgba(214, 168, 63, 0.12) 0 2px, transparent 2px 14px);
}

.category-grid {
  display: grid;
  gap: 12px;
  max-width: 1180px;
  margin: 0 auto;
}

.category-card {
  display: grid;
  gap: 10px;
  min-height: 126px;
  padding: 18px;
  text-align: left;
  background: var(--navy);
  border: 1px solid rgba(214, 168, 63, 0.42);
  border-radius: 8px;
  cursor: pointer;
}

.category-card span {
  color: var(--gold-2);
  font-size: 0.8rem;
  font-weight: 800;
}

.category-card strong {
  color: var(--white);
  font-size: 1.05rem;
}

.profile-panel,
.split-section,
.ai-section,
.dashboard {
  display: grid;
  gap: 22px;
  max-width: 1180px;
  margin: 0 auto;
}

.profile-panel {
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.profile-gallery {
  display: grid;
  gap: 12px;
}

.profile-gallery img {
  width: 100%;
  max-height: 620px;
  object-fit: contain;
  background: var(--mist);
  border-radius: 8px;
}

.qr-placeholder {
  display: grid;
  place-items: center;
  min-height: 132px;
  color: var(--navy);
  background:
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 18px 18px,
    var(--ivory);
  border: 2px dashed rgba(6, 27, 58, 0.28);
  border-radius: 8px;
  font-weight: 900;
}

.profile-details {
  padding: 8px;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.contact-list {
  display: grid;
  gap: 9px;
  margin-top: 18px;
}

.contact-list a,
.contact-list span {
  padding: 11px 12px;
  background: var(--mist);
  border-radius: 8px;
}

.share-button {
  min-height: 44px;
  padding: 11px 16px;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.quote-form,
.form-card {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.form-card {
  margin-top: 0;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(6, 27, 58, 0.08);
}

.split-section h2 {
  margin-bottom: 12px;
}

.split-section p {
  color: var(--muted);
}

.upload-preview {
  display: grid;
  gap: 8px;
  margin-top: 24px;
  padding: 22px;
  color: var(--navy);
  background: #f7ebc9;
  border: 1px dashed var(--gold);
  border-radius: 8px;
}

.ai-section {
  color: var(--white);
  background: linear-gradient(135deg, var(--navy), var(--burgundy));
}

.ai-section h2 {
  color: var(--white);
  font-size: clamp(1.8rem, 6vw, 3.3rem);
}

.assistant-box {
  display: grid;
  gap: 12px;
  align-content: center;
  padding: 18px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
}

.assistant-box span {
  color: rgba(255, 255, 255, 0.82);
}

.about-section video {
  width: min(100%, 920px);
  margin: 0 auto;
  background: var(--navy);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.admin-section {
  background: var(--white);
}

.dashboard {
  overflow: hidden;
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.dashboard aside {
  display: grid;
  gap: 4px;
  padding: 16px;
  color: var(--white);
  background: var(--navy);
}

.dashboard aside a {
  padding: 10px;
  color: rgba(255, 255, 255, 0.78);
  border-radius: 8px;
}

.dashboard aside a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.dashboard-main {
  display: grid;
  gap: 16px;
  padding: 14px;
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.dashboard-metrics div {
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.dashboard-metrics strong,
.dashboard-metrics span {
  display: block;
}

.dashboard-metrics strong {
  color: var(--burgundy);
  font-size: 1.6rem;
}

.dashboard-metrics span,
.table-row small {
  color: var(--muted);
}

.admin-table {
  display: grid;
  overflow-x: auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.table-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.3fr) 120px 90px minmax(260px, 1fr);
  gap: 12px;
  min-width: 720px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.table-head {
  color: var(--white);
  background: var(--navy);
  font-weight: 800;
}

.table-row small {
  display: block;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-actions button {
  min-height: 34px;
  padding: 7px 10px;
  color: var(--navy);
  background: var(--mist);
  font-size: 0.78rem;
}

.empty-state {
  padding: 28px;
  color: var(--muted);
  text-align: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.site-footer {
  display: grid;
  gap: 4px;
  padding: 28px 18px;
  color: var(--white);
  text-align: center;
  background: var(--navy);
}

.site-footer span {
  color: rgba(255, 255, 255, 0.72);
}

.form-status {
  min-height: 22px;
  margin: 0;
  color: #0f6b3b;
  font-size: 0.9rem;
  font-weight: 800;
}

.backend-callout {
  background: var(--white);
}

.chat-launcher {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  width: 64px;
  height: 64px;
  color: var(--navy);
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  border: 0;
  border-radius: 50%;
  box-shadow: 0 18px 44px rgba(6, 27, 58, 0.28);
  font-weight: 900;
  cursor: pointer;
}

.chatbot {
  position: fixed;
  right: 14px;
  bottom: 92px;
  z-index: 50;
  display: none;
  width: min(calc(100vw - 28px), 410px);
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(6, 27, 58, 0.18);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.chatbot.open {
  display: grid;
}

.chatbot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  color: var(--white);
  background: var(--navy);
}

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

.chatbot-header span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
}

.chatbot-header button {
  width: 36px;
  height: 36px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border: 0;
  border-radius: 8px;
  font-size: 1.4rem;
  cursor: pointer;
}

.chatbot-messages {
  display: grid;
  gap: 10px;
  max-height: 420px;
  min-height: 260px;
  padding: 14px;
  overflow-y: auto;
  background: var(--ivory);
}

.chat-message {
  width: fit-content;
  max-width: 92%;
  padding: 11px;
  border-radius: 8px;
}

.chat-message p {
  margin: 0;
}

.chat-message.bot {
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
}

.chat-message.user {
  justify-self: end;
  color: var(--white);
  background: var(--burgundy);
}

.chat-matches {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.chat-matches button {
  display: grid;
  gap: 4px;
  padding: 10px;
  color: var(--navy);
  text-align: left;
  background: #f7ebc9;
  border: 1px solid rgba(214, 168, 63, 0.45);
  border-radius: 8px;
  cursor: pointer;
}

.chat-matches span {
  color: var(--muted);
  font-size: 0.78rem;
}

.chatbot-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px;
  background: var(--white);
  border-top: 1px solid var(--line);
}

.chatbot-form button {
  min-height: 46px;
  padding: 0 14px;
  color: var(--navy);
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  border: 0;
  border-radius: 8px;
  font-weight: 900;
}

.backend-body {
  background: #f4f7fb;
}

.backend-nav {
  position: static;
  display: flex;
  flex-wrap: wrap;
  width: auto;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.backend-shell {
  padding: 22px 14px 58px;
}

.backend-hero {
  display: grid;
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto 20px;
  padding: 24px;
  color: var(--white);
  background:
    linear-gradient(115deg, rgba(6, 27, 58, 0.96), rgba(115, 29, 58, 0.82)),
    url("./assets/directory-reference.jpeg") center/cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.backend-hero h1 {
  max-width: none;
  font-size: clamp(2.5rem, 10vw, 5.5rem);
}

.backend-hero p:not(.eyebrow) {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.82);
}

.backend-dashboard {
  max-width: 1180px;
}

.backend-dashboard aside button,
.danger-button {
  min-height: 42px;
  padding: 10px;
  color: var(--white);
  text-align: left;
  background: rgba(115, 29, 58, 0.86);
  border: 0;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.admin-auth {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
}

.admin-auth label,
.admin-auth small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
}

.admin-auth input {
  margin-top: 6px;
  min-height: 40px;
}

.admin-auth button {
  text-align: center;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: var(--navy);
}

.backend-panel {
  display: grid;
  gap: 12px;
}

.panel-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
}

.panel-title h2 {
  font-size: clamp(1.8rem, 6vw, 3rem);
}

.panel-title span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

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

.lead-card {
  display: grid;
  gap: 9px;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

.lead-card span,
.lead-card small {
  color: var(--muted);
}

.lead-card p {
  margin: 0;
}

.admin-actions button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

@media (min-width: 680px) {
  .directory-tools,
  .split-section,
  .ai-section {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .featured-grid,
  .business-grid,
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .profile-panel {
    grid-template-columns: minmax(280px, 0.9fr) 1.1fr;
    padding: 18px;
  }
}

@media (min-width: 940px) {
  .site-header {
    padding: 16px 34px;
  }

  .nav-toggle {
    display: none;
  }

  .site-nav {
    position: static;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(380px, 0.72fr);
    padding: 70px 48px 44px;
  }

  .hero-media {
    gap: 14px;
  }

  .section,
  .ai-section {
    padding: 80px 34px;
  }

  .featured-grid,
  .business-grid,
  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .dashboard {
    grid-template-columns: 240px 1fr;
  }

  .dashboard-metrics {
    grid-template-columns: repeat(4, 1fr);
  }
}
