/* ==========================================================================
   WILLIAM AVENDAÑO — EDEALS DARK LUXURY INSURTECH DESIGN SYSTEM (PART 1)
   Palette: Deep Obsidian Navy (#060D1A / #0A1526) • Insurtech Teal (#00796B / #2DD4BF)
   ========================================================================== */

:root {
  --bg-obsidian: #060d1a;
  --bg-navy-950: #0a1526;
  --bg-card: #0f1e36;
  --bg-card-elevated: #142744;
  --bg-input: #081221;
  --teal-700: #005b4f;
  --teal-600: #00796b;
  --teal-500: #008f8c;
  --teal-400: #14b8a6;
  --teal-300: #2dd4bf;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-subtle: rgba(148, 163, 184, 0.16);
  --border-teal: rgba(45, 212, 191, 0.35);
  --star-amber: #fbbf24;
}

* {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

html,
body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background-color: var(--bg-obsidian) !important;
  color: var(--text-primary) !important;
  caret-color: var(--teal-300);
  scrollbar-color: #1e3a5f #060d1a;
  overflow-x: hidden;
  margin: 0;
  color-scheme: dark;
}

/* Browser Surfaces (Selection, Scrollbars, Focus Rings, Tabular Numerals, Links) */
::selection {
  background-color: var(--teal-600);
  color: #ffffff;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-obsidian);
}

::-webkit-scrollbar-thumb {
  background: #1e3a5f;
  border-radius: 9999px;
  border: 2px solid var(--bg-obsidian);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--teal-500);
}

a {
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--teal-300) !important;
  outline-offset: 2px !important;
}

table,
.font-mono,
input[type="range"] + span,
#bo-kpi-bookings,
#bo-kpi-leads,
#funnel-live-headline,
#summary-amount {
  font-variant-numeric: tabular-nums;
}

/* Explicit Typographic Scale (>1.25x Modular Ratio — higher specificity than Tailwind CDN preflight) */
html body h1 {
  font-size: clamp(2.125rem, 3.5vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 800;
  text-wrap: balance;
  margin-top: 0;
}

html body h2 {
  font-size: clamp(1.5rem, 2.4vw, 1.875rem);
  line-height: 1.22;
  letter-spacing: -0.02em;
  font-weight: 800;
  text-wrap: balance;
  margin-top: 0;
}

html body h3 {
  font-size: 1.125rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
  font-weight: 700;
  margin-top: 0;
}

p {
  max-width: 70ch;
}

/* Explicit Static Padding & Rhythm Fallbacks (Prevents FOUC & Cramped Containers) */
section {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

.p-2\.5 { padding: 0.75rem; }
.p-3 { padding: 0.875rem; }
.p-3\.5 { padding: 1rem; }
.p-4 { padding: 1.125rem; }
.p-5 { padding: 1.375rem; }
.p-6 { padding: 1.625rem; }
.p-8 { padding: 2rem; }
.px-2\.5 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-3 { padding-left: 0.875rem; padding-right: 0.875rem; }
.px-3\.5 { padding-left: 1rem; padding-right: 1rem; }
.px-4 { padding-left: 1.125rem; padding-right: 1.125rem; }
.px-5 { padding-left: 1.375rem; padding-right: 1.375rem; }
.px-6 { padding-left: 1.625rem; padding-right: 1.625rem; }
.py-1 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-3\.5 { padding-top: 0.875rem; padding-bottom: 0.875rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-10 { padding-top: 2.75rem; padding-bottom: 2.75rem; }
.py-12 { padding-top: 3.25rem; padding-bottom: 3.25rem; }
.py-14 { padding-top: 3.75rem; padding-bottom: 3.75rem; }

/* ==========================================================================
   GLOBAL DARK MODE OVERRIDES
   ========================================================================== */
.bg-white {
  background-color: var(--bg-card) !important;
  color: var(--text-primary);
}

.bg-\[\#F8FAFC\],
.bg-slate-50,
.bg-slate-100 {
  background-color: var(--bg-navy-950) !important;
  color: var(--text-primary);
}

.bg-\[\#F0FDFA\],
.bg-\[\#F0FDFA\]\/50 {
  background-color: rgba(20, 184, 166, 0.13) !important;
}

.text-\[\#0B1E33\],
.text-slate-900,
.text-slate-800 {
  color: #f8fafc !important;
}

.text-slate-700,
.text-slate-600 {
  color: #cbd5e1 !important;
}

.text-slate-500,
.text-slate-400 {
  color: #94a3b8 !important;
}

.text-\[\#008F8C\] {
  color: #2dd4bf !important;
}

.border-slate-100,
.border-slate-200,
.border-slate-200\/80,
.border-slate-300 {
  border-color: var(--border-subtle) !important;
}

.divide-slate-200 > :not([hidden]) ~ :not([hidden]) {
  border-color: var(--border-subtle) !important;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  background-color: var(--bg-input) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(148, 163, 184, 0.25) !important;
  padding: 0.625rem 0.875rem;
}

input::placeholder,
textarea::placeholder {
  color: #94a3b8 !important;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal-400) !important;
  outline: 2px solid var(--teal-400) !important;
  outline-offset: 1px !important;
}

/* ==========================================================================
   EDEALS DARK LUXURY COMPONENTS
   ========================================================================== */
.glass-panel {
  background: rgba(15, 30, 54, 0.88);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
}

.edeals-navy-bar {
  background: linear-gradient(90deg, #040912 0%, #091526 55%, #0d213a 100%);
  color: #ffffff;
}

.edeals-teal-btn,
.gold-gradient-btn {
  background: linear-gradient(135deg, #00796b 0%, #005b4f 100%);
  color: #ffffff !important;
  font-weight: 700;
  padding: 0.625rem 1.125rem;
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.18s ease, filter 0.18s ease;
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(45, 212, 191, 0.35);
}

.edeals-teal-btn:hover,
.gold-gradient-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -4px rgba(0, 0, 0, 0.65);
  filter: brightness(1.08);
}

.edeals-teal-btn:active,
.gold-gradient-btn:active {
  transform: translateY(1px) scale(0.985);
}

.edeals-outline-btn {
  background: rgba(15, 30, 54, 0.9) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(45, 212, 191, 0.35) !important;
  font-weight: 600;
  padding: 0.625rem 1.125rem;
  transition: all 0.18s ease;
}

.edeals-outline-btn:hover {
  border-color: #2dd4bf !important;
  color: #2dd4bf !important;
  background: rgba(20, 184, 166, 0.15) !important;
}

/* Pillar Badges in Dark Luxury Mode */
.pillar-badge-health {
  background: rgba(14, 165, 233, 0.16);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 0.35rem 0.75rem;
}

.pillar-badge-life {
  background: rgba(20, 184, 166, 0.16);
  color: #2dd4bf;
  border: 1px solid rgba(45, 212, 191, 0.35);
  padding: 0.35rem 0.75rem;
}

.pillar-badge-realtor,
.pillar-badge-realty {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.35);
  padding: 0.35rem 0.75rem;
}

.pillar-badge-tms {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.35);
  padding: 0.35rem 0.75rem;
}

.pillar-badge-business {
  background: rgba(245, 158, 11, 0.12);
  color: #fde68a;
  border: 1px solid rgba(253, 230, 138, 0.35);
  padding: 0.35rem 0.75rem;
}

/* Multi-Page Active Navigation & Editorial Image Frames */
header a[href="admin.html"],
header a.edeals-teal-btn,
header a[href="index.html"] {
  flex-shrink: 0;
  white-space: nowrap;
}

.nav-page-link {
  color: #cbd5e1;
  padding: 0.4rem 0.55rem;
  border-radius: 0.5rem;
  transition: color 0.18s ease, background-color 0.18s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-page-link:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.08);
}

.nav-page-link.is-active {
  color: #2dd4bf !important;
  background-color: rgba(20, 184, 166, 0.14);
  border: 1px solid rgba(45, 212, 191, 0.3);
}

.hero-visual-frame {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-card);
}

.hero-visual-frame > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.hero-visual-caption {
  padding: 1.125rem 1.375rem;
  border-top: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, rgba(15, 30, 54, 0.96) 0%, #091526 100%);
}

.hero-visual-frame .william-avatar-thumb,
.william-avatar-thumb {
  width: 3.125rem;
  height: 3.125rem;
  aspect-ratio: 1 / 1;
  border-radius: 0.75rem;
  object-fit: cover;
  object-position: top center;
  border: 1px solid rgba(45, 212, 191, 0.45);
  flex-shrink: 0;
  display: block;
}

.brand-graphic-card {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background-color: #081529;
}

.brand-graphic-card img:not(.brand-showcase-img) {
  display: block;
  width: 100%;
  height: auto;
}

.brand-graphic-card img.brand-showcase-img,
.brand-showcase-img {
  width: 100%;
  height: 17.5rem;
  object-fit: contain;
  object-position: center;
  background-color: #081529;
  display: block;
}

.p-7 { padding: 1.75rem; }
.py-16 { padding-top: 4.25rem; padding-bottom: 4.25rem; }

/* Card Hover Lift in Dark Mode (Single Elevation Authority: Border on Default, Lift on Hover) */
.hover-lift {
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.22s ease;
}

.hover-lift:hover {
  transform: translateY(-3px);
  border-color: #2dd4bf !important;
}

/* Calendar & Time Slot States (Dark Luxury Mode) */
.calendar-day {
  transition: all 0.18s ease;
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  padding: 0.625rem;
}
.calendar-day:hover:not(:disabled) {
  border-color: var(--teal-400);
  background: rgba(20, 184, 166, 0.15);
}
.calendar-day.selected {
  background: linear-gradient(135deg, #00796b 0%, #005b4f 100%) !important;
  color: #ffffff !important;
  font-weight: 700;
  border-color: #2dd4bf !important;
}

.time-slot-btn {
  transition: all 0.18s ease;
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  padding: 0.625rem 0.75rem;
}
.time-slot-btn:hover:not(:disabled) {
  border-color: var(--teal-400);
  background: rgba(20, 184, 166, 0.15);
}
.time-slot-btn.selected {
  background: linear-gradient(135deg, #00796b 0%, #005b4f 100%) !important;
  color: #ffffff !important;
  font-weight: 700;
  border-color: #2dd4bf !important;
}
.time-slot-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  text-decoration: line-through;
  background: #050b14;
}

/* Edeals iOS-Style Toggle Switch for Plan Comparison Table */
.edeals-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.edeals-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.edeals-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #1e293b;
  border: 1px solid rgba(148, 163, 184, 0.3);
  transition: 0.25s;
  border-radius: 9999px;
}
.edeals-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: #f8fafc;
  transition: 0.25s;
  border-radius: 50%;
}
.edeals-toggle input:checked + .edeals-slider {
  background-color: #00796b;
  border-color: #2dd4bf;
}
.edeals-toggle input:checked + .edeals-slider:before {
  transform: translateX(20px);
  background-color: #ffffff;
}

/* Modal Backdrop */
.modal-backdrop {
  background: rgba(3, 7, 18, 0.82);
  backdrop-filter: blur(8px);
}

/* ==========================================================================
   TOP EXECUTIVE WA SIGNATURE BANNER (HD PHOTO + VECTOR SVG + WEBFONT CREST)
   ========================================================================== */
.wa-top-banner-section {
  padding-top: 1.5rem;
  padding-bottom: 0.5rem;
}

.wa-executive-banner {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 1rem;
  overflow: hidden;
  border: 1.5px solid rgba(212, 175, 55, 0.65);
  background: linear-gradient(135deg, #06142a 0%, #091d3a 55%, #040e1f 100%);
  box-shadow: 0 22px 50px -18px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(253, 230, 138, 0.12) inset;
}

.wa-banner-photo-pane {
  position: relative;
  width: 100%;
  height: 12.5rem;
  overflow: hidden;
  flex-shrink: 0;
  border-bottom: 1.5px solid rgba(212, 175, 55, 0.55);
}

.wa-banner-photo-pane img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 42% 18%;
}

.wa-banner-gold-slash,
.wa-banner-gold-facet,
.wa-banner-right-chevron {
  display: none;
}

.wa-banner-crest {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem 1.25rem;
  background: radial-gradient(circle at 50% 35%, rgba(20, 48, 92, 0.72) 0%, #06142a 80%);
}

.wa-banner-monogram {
  width: 7.75rem;
  height: auto;
  display: block;
  margin-bottom: 0.45rem;
}

.wa-banner-title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: clamp(1.35rem, 2.25vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1.1;
  color: #f6d57a;
  text-transform: uppercase;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7);
  margin: 0;
}

.wa-banner-title .cap {
  font-size: 1.15em;
  color: #fde68a;
}

.wa-banner-sub {
  margin-top: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.085em;
  text-transform: uppercase;
  color: #e2e8f0;
  line-height: 1.4;
}

.wa-banner-rule {
  width: min(100%, 27rem);
  height: 1px;
  margin: 0.65rem auto;
  background: linear-gradient(90deg, transparent 0%, #eab308 22%, #fde68a 50%, #eab308 78%, transparent 100%);
}

.wa-banner-tagline {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #f8fafc;
}

@media (min-width: 960px) {
  .wa-executive-banner {
    display: block;
    height: 17.5rem;
    background: radial-gradient(circle at 69% 40%, #102c57 0%, #06142a 58%, #030b18 100%);
  }

  .wa-banner-photo-pane {
    position: absolute;
    inset: 0 auto 0 0;
    width: 47.5%;
    height: 100%;
    border-bottom: 0;
    z-index: 1;
    clip-path: polygon(0 0, 100% 0, 81% 100%, 0 100%);
  }

  .wa-banner-photo-pane img {
    object-position: 36% 18%;
  }

  .wa-banner-gold-facet {
    display: block;
    position: absolute;
    top: 0;
    left: 36.8%;
    width: 6.5rem;
    height: 56%;
    z-index: 2;
    pointer-events: none;
    clip-path: polygon(0 0, 34% 0, 100% 100%, 72% 100%);
    background: linear-gradient(180deg, #8a6118 0%, #f5d57a 55%, #b07e20 100%);
    opacity: 0.9;
  }

  .wa-banner-gold-slash {
    display: block;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 37.5%;
    width: 11.25rem;
    z-index: 3;
    pointer-events: none;
    clip-path: polygon(82% 0, 99% 0, 18% 100%, 1% 100%);
    background: linear-gradient(145deg, #8a6118 0%, #e7c262 32%, #fff2bd 54%, #c6922c 76%, #7c5410 100%);
  }

  .wa-banner-right-chevron {
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 5.5rem;
    z-index: 2;
    pointer-events: none;
    clip-path: polygon(48% 0, 82% 0, 34% 50%, 82% 100%, 48% 100%, 0 50%);
    background: linear-gradient(180deg, #8a6118 0%, #f7dc84 48%, #9e711e 100%);
    opacity: 0.92;
  }

  .wa-banner-crest {
    position: absolute;
    inset: 0 7.5% 0 47.5%;
    padding: 1rem 1rem;
    background: transparent;
  }

  .wa-banner-monogram {
    width: 8rem;
    margin-bottom: 0.35rem;
  }

  .wa-banner-sub {
    font-size: clamp(0.625rem, 0.76vw, 0.71rem);
    letter-spacing: 0.08em;
    white-space: nowrap;
  }

  .wa-banner-tagline {
    font-size: clamp(0.72rem, 0.88vw, 0.8rem);
    letter-spacing: 0.12em;
    white-space: nowrap;
  }
}

/* ==========================================================================
   TRILINGUAL AI ADVISORY CONCIERGE WIDGET & EXECUTIVE DOSSIER (PART 2 UPGRADES)
   ========================================================================== */
.wa-concierge-fab {
  position: fixed;
  bottom: 1.35rem;
  right: 1.35rem;
  z-index: 48;
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1.15rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #00796b 0%, #005b4f 100%);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  border: 1.5px solid rgba(45, 212, 191, 0.55);
  box-shadow: 0 14px 32px -6px rgba(0, 0, 0, 0.78), 0 0 0 1px rgba(45, 212, 191, 0.2);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), filter 0.2s ease;
}

.wa-concierge-fab:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.wa-concierge-pulse {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 9999px;
  background-color: #2dd4bf;
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.25);
}

.wa-concierge-drawer {
  position: fixed;
  bottom: 5rem;
  right: 1.35rem;
  z-index: 49;
  width: min(25.5rem, calc(100vw - 2rem));
  max-height: min(37rem, calc(100vh - 7rem));
  display: flex;
  flex-direction: column;
  border-radius: 1.15rem;
  overflow: hidden;
  background-color: var(--bg-card);
  border: 1px solid rgba(45, 212, 191, 0.4);
  box-shadow: 0 24px 54px -12px rgba(0, 0, 0, 0.88);
}

.wa-concierge-messages {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 1rem;
  background-color: var(--bg-obsidian);
}

.wa-chat-bubble-bot {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: 0.875rem 0.875rem 0.875rem 0.25rem;
  padding: 0.75rem 0.9rem;
  font-size: 0.78rem;
  line-height: 1.5;
}

.wa-chat-bubble-user {
  background: linear-gradient(135deg, #00796b 0%, #005b4f 100%);
  border: 1px solid rgba(45, 212, 191, 0.35);
  color: #ffffff;
  border-radius: 0.875rem 0.875rem 0.25rem 0.875rem;
  padding: 0.65rem 0.9rem;
  font-size: 0.78rem;
  line-height: 1.45;
  margin-left: auto;
  max-width: 86%;
}

.wa-concierge-chip {
  background-color: var(--bg-input);
  border: 1px solid rgba(45, 212, 191, 0.3);
  color: #cbd5e1;
  border-radius: 9999px;
  padding: 0.32rem 0.7rem;
  font-size: 0.7rem;
  font-weight: 600;
  transition: all 0.16s ease;
  cursor: pointer;
}

.wa-concierge-chip:hover {
  border-color: #2dd4bf;
  color: #ffffff;
  background-color: rgba(20, 184, 166, 0.16);
}

/* Executive Dossier Modal & Print Styling */
.wa-dossier-sheet {
  background-color: #0a1526;
  border: 1px solid rgba(251, 191, 36, 0.45);
  border-radius: 1rem;
  padding: 1.5rem;
  font-variant-numeric: tabular-nums;
}

@media print {
  body > *:not(#executive-dossier-modal) {
    display: none !important;
  }
  #executive-dossier-modal {
    position: static !important;
    display: block !important;
    background: #060d1a !important;
    padding: 0 !important;
  }
  .no-print {
    display: none !important;
  }
}
