/* ==========================================================================
   ROX OLIVER — PLATAFORMA DE INTELIGÊNCIA IMOBILIÁRIA
   Design System & Master Stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties / Design Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand & Core Palette */
  --color-primary: #173f46;
  --color-primary-light: #20616C;
  --color-primary-dark: #0f2a2f;
  --color-secondary: #20616C;
  --color-secondary-light: #437F91;
  --color-accent: #437F91;
  --color-accent-light: #40C5D3;
  
  /* Precision & Status Colors */
  --color-emerald: #916A43;
  --color-emerald-light: #b08356;
  --color-emerald-bg: #f7f0e8;
  --color-emerald-border: #e2cdb5;
  
  --color-amber: #d97706;
  --color-amber-light: #f59e0b;
  --color-amber-bg: #fffbeb;
  --color-amber-border: #fde68a;

  --color-rose: #e11d48;
  --color-rose-bg: #fff1f2;

  /* Surfaces & Backgrounds */
  --color-background: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-subtle: #f1f5f9;
  --color-surface-elevated: #ffffff;
  --color-surface-dark: #0f172a;
  --color-surface-dark-elevated: #1e293b;
  
  /* Typography Colors */
  --color-text: #0f172a;
  --color-text-secondary: #475569;
  --color-text-muted: #64748b;
  --color-text-inverse: #f8fafc;
  --color-text-inverse-muted: #94a3b8;
  
  /* Borders & Dividers */
  --color-border: #e2e8f0;
  --color-border-subtle: #edf2f7;
  --color-border-strong: #cbd5e1;
  --color-border-dark: #2f4a50;
  
  /* Typography System (100% Local / Offline Safe) */
  --font-main: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Quantico", "Fustat", "Roboto", sans-serif;
  --font-heading: "Fustat", "Roboto", -apple-system, "Segoe UI", sans-serif;
  /* Brand palette (Manual de Identidade Visual) */
  --brand-blue: #437F91;
  --brand-teal: #20616C;
  --brand-cyan: #40C5D3;
  --brand-brown: #916A43;
  --brand-brown-dark: #564330;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  
  /* Elevations & Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.07), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --shadow-inner: inset 0 2px 4px 0 rgba(15, 23, 42, 0.05);
  
  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  
  /* Layout Spacing */
  --container-max: 1240px;
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 6px;
  --radius-xl: 8px;
  --radius-full: 4px;
}

/* --------------------------------------------------------------------------
   2. Reset & Global Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-background);
  color: var(--color-text);
  line-height: 1.6;
  letter-spacing: -0.011em;
  overflow-x: hidden;
  min-height: 100vh;
}

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

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

button {
  cursor: pointer;
  border: none;
  background: transparent;
}

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

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--color-primary);
}

h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.75rem); }
h4 { font-size: 1.15rem; }

p {
  color: var(--color-text-secondary);
}

.text-muted { color: var(--color-text-muted); }
.text-emerald { color: var(--color-emerald); }
.text-amber { color: var(--color-amber); }
.text-accent { color: var(--color-accent); }

/* Layout Helpers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.section {
  padding-top: 5.5rem;
  padding-bottom: 5.5rem;
  border-bottom: 1px solid var(--color-border-subtle);
}

.section-dark {
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
  border-bottom: 1px solid var(--color-border-dark);
}

.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 {
  color: var(--color-text-inverse);
}

.section-dark p {
  color: var(--color-text-inverse-muted);
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 3.5rem;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-secondary);
  background-color: rgba(32, 97, 108, 0.08);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}

.section-tag.tag-dark {
  color: var(--color-accent-light);
  background-color: rgba(64, 197, 211, 0.12);
  border: 1px solid rgba(64, 197, 211, 0.2);
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  margin-top: 0.85rem;
}

/* --------------------------------------------------------------------------
   3. Buttons & Interactive Controls
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

.btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(23, 63, 70, 0.15);
}

.btn-primary:hover {
  background-color: var(--color-primary-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(23, 63, 70, 0.22);
}

.btn-secondary {
  background-color: var(--color-surface);
  color: var(--color-primary);
  border: 1px solid var(--color-border-strong);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  background-color: var(--color-surface-subtle);
  border-color: var(--color-primary);
}

.btn-outline-white {
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #ffffff;
}

.btn-emerald {
  background-color: var(--color-emerald);
  color: #ffffff;
}

.btn-emerald:hover {
  background-color: var(--color-emerald-light);
  transform: translateY(-1px);
}

.btn-text {
  padding: 0.5rem 0.25rem;
  color: var(--color-secondary);
  font-weight: 600;
}

.btn-text:hover {
  color: var(--color-accent);
}

/* --------------------------------------------------------------------------
   4. Badges, Indicators & Progress Lines
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
}

.badge-emerald {
  background-color: var(--color-emerald-bg);
  color: var(--color-emerald);
  border: 1px solid var(--color-emerald-border);
}

.badge-amber {
  background-color: var(--color-amber-bg);
  color: var(--color-amber);
  border: 1px solid var(--color-amber-border);
}

.badge-dark {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge-outline {
  background-color: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
}

/* --------------------------------------------------------------------------
   5. Global Header & Navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  transition: all var(--transition-normal);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}

.brand-logo {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  cursor: pointer;
  user-select: none;
}

.brand-logo-text {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--color-primary);
}

.brand-logo-dot {
  width: 7px;
  height: 7px;
  background-color: var(--color-emerald);
  border-radius: 50%;
  display: inline-block;
  margin-left: 2px;
}

.brand-tagline {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  padding-left: 0.65rem;
  border-left: 1px solid var(--color-border-strong);
  display: none;
}

@media (min-width: 900px) {
  .brand-tagline { display: block; }
}

.nav-links {
  display: none;
  align-items: center;
  gap: 1.8rem;
  list-style: none;
}

@media (min-width: 960px) {
  .nav-links { display: flex; }
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
  cursor: pointer;
}

.nav-link:hover {
  color: var(--color-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.crm-demo-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-full);
  background-color: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.crm-demo-pill:hover {
  background-color: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}

.mobile-menu-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 8px;
  border-radius: var(--radius-sm);
  background-color: var(--color-surface-subtle);
}

@media (min-width: 960px) {
  .mobile-menu-btn { display: none; }
}

.mobile-menu-btn span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--color-primary);
  transition: var(--transition-fast);
}

/* Mobile Nav Drawer */
.mobile-nav-drawer {
  display: none;
  position: fixed;
  top: 74px;
  left: 0;
  right: 0;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 1.5rem;
  box-shadow: var(--shadow-xl);
  z-index: 99;
}

.mobile-nav-drawer.active {
  display: block;
}

.mobile-nav-drawer ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.mobile-nav-drawer .nav-link {
  font-size: 1.05rem;
}

/* --------------------------------------------------------------------------
   6. SPA View System
   -------------------------------------------------------------------------- */
.spa-view {
  display: none !important;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.spa-view.active-view {
  display: block !important;
  opacity: 1;
}

.spa-view.active-view.quiz-view-container,
.spa-view.active-view.processing-container,
.spa-view.active-view.crm-layout {
  display: flex !important;
}

/* --------------------------------------------------------------------------
   7. Home View Components
   -------------------------------------------------------------------------- */

/* Hero Section */
.hero-section {
  padding-top: 4.5rem;
  padding-bottom: 5.5rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid var(--color-border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3.5rem;
  align-items: center;
}

@media (min-width: 992px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

.hero-content {
  max-width: 640px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-secondary);
  background-color: rgba(32, 97, 108, 0.07);
  border: 1px solid rgba(32, 97, 108, 0.15);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.4rem, 4.2vw, 3.6rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.035em;
  color: var(--color-primary);
  margin-bottom: 1.35rem;
}

.hero-subtitle {
  font-size: 1.18rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin-bottom: 2.2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.hero-trust-indicators {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--color-border);
}

.hero-trust-item {
  display: flex;
  flex-direction: column;
}

.hero-trust-number {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.02em;
}

.hero-trust-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

/* Hero Visual Widget */
.hero-widget-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}

.hero-widget-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 50%, var(--color-emerald) 100%);
}

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border-subtle);
  margin-bottom: 1.5rem;
}

.widget-profile-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.widget-profile-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-primary);
}

.widget-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.widget-metric-item {
  background: var(--color-surface-subtle);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-subtle);
}

.widget-metric-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.widget-metric-value {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-top: 0.15rem;
}

.widget-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0 1.25rem;
}

.widget-divider-line {
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.widget-divider-tag {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-emerald);
  background: var(--color-emerald-bg);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.widget-match-box {
  background: linear-gradient(135deg, #173f46 0%, #1d4f58 100%);
  color: #ffffff;
  padding: 1.35rem;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.widget-match-info h4 {
  color: #ffffff;
  font-size: 1.05rem;
  margin-bottom: 0.15rem;
}

.widget-match-info p {
  color: var(--color-text-inverse-muted);
  font-size: 0.8rem;
}

.widget-match-score {
  text-align: right;
}

.widget-match-percent {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-emerald-light);
  line-height: 1;
}

.widget-match-sub {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

/* Equation Section */
.equation-card-wrapper {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
  box-shadow: var(--shadow-md);
}

.equation-flex {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.eq-block {
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  text-align: center;
  min-width: 170px;
  flex: 1;
  max-width: 220px;
  transition: all var(--transition-fast);
}

.eq-block:hover {
  transform: translateY(-2px);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.eq-block-icon {
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: center;
  color: var(--color-secondary);
}

.eq-block-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-primary);
}

.eq-operator {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-muted);
}

.eq-result-block {
  background: var(--color-primary);
  color: #ffffff;
  border: 1px solid var(--color-primary-light);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.75rem;
  text-align: center;
  min-width: 220px;
  flex: 1.2;
}

.eq-result-block .eq-block-icon {
  color: var(--color-emerald-light);
}

.eq-result-block .eq-block-title {
  color: #ffffff;
  font-size: 0.95rem;
}

/* Philosophy / Comparison Section */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .comparison-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.comparison-card {
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  height: 100%;
}

.comparison-traditional {
  background: #ffffff;
  border: 1px solid var(--color-border);
}

.comparison-rox {
  background: linear-gradient(145deg, #102d33 0%, #1d4f58 100%);
  color: #ffffff;
  border: 1px solid var(--color-border-dark);
}

.comparison-header {
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border);
}

.comparison-rox .comparison-header {
  border-bottom-color: var(--color-border-dark);
}

.flow-step-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--color-surface-subtle);
  font-size: 0.9rem;
  font-weight: 600;
}

.comparison-rox .flow-step-item {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.flow-arrow {
  display: flex;
  justify-content: center;
  margin: 0.35rem 0;
  color: var(--color-text-muted);
}

.comparison-rox .flow-arrow {
  color: var(--color-accent-light);
}

/* How it Works Section */
.steps-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  position: relative;
}

@media (min-width: 992px) {
  .steps-container {
    grid-template-columns: repeat(4, 1fr);
  }
}

.step-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2.2rem 1.75rem;
  position: relative;
  transition: all var(--transition-normal);
}

.step-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-secondary);
  box-shadow: var(--shadow-lg);
}

.step-number {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-border-strong);
  line-height: 1;
  margin-bottom: 1.25rem;
  font-family: var(--font-mono);
}

.step-card:hover .step-number {
  color: var(--color-secondary);
}

.step-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.step-desc {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--color-text-secondary);
}

/* For Whom Section */
.audience-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

@media (min-width: 600px) {
  .audience-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .audience-grid { grid-template-columns: repeat(4, 1fr); }
}

.audience-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-normal);
}

.audience-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.audience-card-top {
  margin-bottom: 2rem;
}

.audience-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--color-surface-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-secondary);
  margin-bottom: 1.5rem;
}

.audience-title {
  font-size: 1.3rem;
  margin-bottom: 0.65rem;
}

.audience-desc {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--color-text-secondary);
}

.audience-action {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Rox Score Section */
.rox-score-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 960px) {
  .rox-score-container {
    grid-template-columns: 1fr 1fr;
  }
}

.gauge-visual-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.gauge-wrapper {
  position: relative;
  width: 220px;
  height: 120px;
  margin: 0 auto 1.5rem;
}

.gauge-svg {
  width: 220px;
  height: 120px;
}

.gauge-score-text {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
}

.gauge-subtext {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-emerald);
}

.gauge-formula-pill {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-mono);
  background: var(--color-surface-subtle);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-full);
  margin-top: 1.5rem;
  border: 1px solid var(--color-border);
}

/* Featured Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 640px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .products-grid { grid-template-columns: repeat(4, 1fr); }
}

.product-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-xl);
}

.product-media {
  height: 190px;
  background: var(--color-primary-light);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-media-svg {
  width: 100%;
  height: 100%;
}

.product-score-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(23, 63, 70, 0.88);
  backdrop-filter: blur(4px);
  color: #ffffff;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.product-stage-tag {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.product-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-location {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.product-title {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.product-specs-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border-subtle);
}

.product-specs-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.product-price-box {
  margin-top: auto;
  margin-bottom: 1.25rem;
}

.product-price-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: 600;
}

.product-price-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-primary);
}

.product-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Insights Section */
.insights-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .insights-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .insights-grid { grid-template-columns: repeat(4, 1fr); }
}

.insight-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.insight-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.insight-category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-secondary);
  margin-bottom: 0.75rem;
}

.insight-title {
  font-size: 1.15rem;
  line-height: 1.4;
  margin-bottom: 1.25rem;
}

.insight-read-time {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Final CTA Section */
.cta-banner {
  background: linear-gradient(135deg, #102d33 0%, #1d4f58 100%);
  color: #ffffff;
  border-radius: var(--radius-xl);
  padding: 4.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner h2 {
  color: #ffffff;
  max-width: 780px;
  margin: 0 auto 1.25rem;
}

.cta-banner p {
  color: var(--color-text-inverse-muted);
  max-width: 580px;
  margin: 0 auto 2.5rem;
  font-size: 1.1rem;
}

/* --------------------------------------------------------------------------
   8. Quiz / Guided Onboarding Flow View
   -------------------------------------------------------------------------- */
.quiz-view-container {
  min-height: calc(100vh - 74px);
  flex-direction: column;
  background: #ffffff;
}

.quiz-top-bar {
  border-bottom: 1px solid var(--color-border);
  padding: 1.25rem 0;
}

.quiz-top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quiz-progress-track {
  width: 100%;
  height: 4px;
  background: var(--color-border-subtle);
  position: relative;
}

.quiz-progress-bar {
  height: 100%;
  background: var(--color-emerald);
  transition: width 0.4s ease;
}

.quiz-step-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem 5rem;
}

.quiz-card-box {
  width: 100%;
  max-width: 680px;
}

.quiz-question-title {
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  font-weight: 800;
  margin-bottom: 0.85rem;
}

.quiz-question-subtitle {
  font-size: 1.05rem;
  color: var(--color-text-secondary);
  margin-bottom: 2.5rem;
}

/* Selection Cards Grid */
.quiz-options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 600px) {
  .quiz-options-grid.grid-2 { grid-template-columns: repeat(2, 1fr); }
  .quiz-options-grid.grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.quiz-option-card {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.quiz-option-card:hover {
  border-color: var(--color-secondary);
  background: var(--color-surface-subtle);
}

.quiz-option-card.selected {
  border-color: var(--color-primary);
  background: rgba(23, 63, 70, 0.04);
  box-shadow: 0 0 0 1px var(--color-primary);
}

.quiz-option-card.selected .quiz-check-circle {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
}

.quiz-check-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

/* Form Inputs */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.4rem;
}

.form-input, .form-select {
  width: 100%;
  padding: 0.85rem 1.15rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-input:focus, .form-select:focus {
  border-color: var(--color-primary);
}

.quiz-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border-subtle);
}

/* Processing Simulation View */
.processing-container {
  min-height: calc(100vh - 74px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  text-align: center;
}

.processing-spinner {
  width: 64px;
  height: 64px;
  border: 4px solid var(--color-border);
  border-top-color: var(--color-emerald);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 2rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.processing-checklist {
  list-style: none;
  max-width: 380px;
  width: 100%;
  text-align: left;
  margin: 2rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.processing-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-muted);
  opacity: 0.35;
  transition: all 0.3s ease;
}

.processing-item.active {
  color: var(--color-primary);
  opacity: 1;
}

.processing-item.completed {
  color: var(--color-emerald);
  opacity: 1;
}

/* --------------------------------------------------------------------------
   9. Profile Result View
   -------------------------------------------------------------------------- */
.result-header-hero {
  background: linear-gradient(180deg, #102d33 0%, #1d4f58 100%);
  color: #ffffff;
  padding: 4.5rem 0 3.5rem;
}

.result-header-hero h1, .result-header-hero h2, .result-header-hero h3 {
  color: #ffffff;
}

.result-grid-summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2.5rem;
}

@media (min-width: 900px) {
  .result-grid-summary {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.profile-dna-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.profile-score-display {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 2rem;
  color: var(--color-primary);
  text-align: center;
}

.recommended-list-section {
  padding: 4.5rem 0;
}

.match-card-detailed {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
  transition: all var(--transition-normal);
}

@media (min-width: 860px) {
  .match-card-detailed {
    grid-template-columns: 200px 1.5fr 1fr;
  }
}

.match-card-detailed:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-lg);
}

.match-reasons-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

/* --------------------------------------------------------------------------
   10. Product Detail View
   -------------------------------------------------------------------------- */
.product-detail-hero {
  padding: 3rem 0 2rem;
  background: #ffffff;
  border-bottom: 1px solid var(--color-border);
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
}

.product-detail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding: 3.5rem 0;
}

@media (min-width: 960px) {
  .product-detail-layout {
    grid-template-columns: 1.8fr 1fr;
  }
}

.detail-tab-nav {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 2rem;
  overflow-x: auto;
}

.detail-tab-btn {
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.detail-tab-btn.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.detail-tab-pane {
  display: none;
}

.detail-tab-pane.active {
  display: block;
}

.faq-accordion {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 1rem;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  width: 100%;
  padding: 1.25rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.95rem;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-answer {
  padding: 0 1.25rem 1.25rem;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  display: none;
}

.faq-item.open .faq-answer {
  display: block;
}

.product-sidebar-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 94px;
}

/* --------------------------------------------------------------------------
   11. CRM & Intelligence Dashboard View
   -------------------------------------------------------------------------- */
.crm-layout {
  min-height: 100vh;
  background: #f8fafc;
}

.crm-sidebar {
  width: 260px;
  background: var(--color-primary);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid var(--color-border-dark);
}

@media (max-width: 900px) {
  .crm-sidebar {
    width: 72px;
  }
  .crm-sidebar .sidebar-label, .crm-sidebar .crm-env-badge, .crm-sidebar .brand-tagline-sidebar {
    display: none;
  }
}

.crm-sidebar-header {
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.crm-env-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-emerald-light);
  background: rgba(176, 131, 86, 0.15);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-top: 0.35rem;
}

.crm-nav-list {
  list-style: none;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.crm-nav-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.crm-nav-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.crm-nav-item.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-left: 3px solid var(--color-emerald-light);
}

.crm-sidebar-footer {
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.crm-main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-y: auto;
}

.crm-topbar {
  background: #ffffff;
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.crm-page-container {
  padding: 2rem;
  flex: 1;
}

/* KPI Cards Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.kpi-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.25rem;
  box-shadow: var(--shadow-xs);
}

.kpi-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.kpi-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-primary);
  margin: 0.25rem 0 0.15rem;
}

.kpi-delta {
  font-size: 0.75rem;
  font-weight: 700;
}

.kpi-delta.up { color: var(--color-emerald); }

/* Charts & Funnel Section */
.crm-charts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (min-width: 992px) {
  .crm-charts-grid {
    grid-template-columns: 1.5fr 1fr;
  }
}

.crm-panel-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-xs);
}

.funnel-step-row {
  display: flex;
  align-items: center;
  margin-bottom: 0.85rem;
  gap: 1rem;
}

.funnel-label {
  width: 140px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.funnel-bar-bg {
  flex: 1;
  height: 28px;
  background: var(--color-surface-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
}

.funnel-bar-fill {
  height: 100%;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  padding-left: 0.75rem;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
}

/* CRM Leads Table */
.crm-table-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.crm-table-container {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow-x: auto;
  box-shadow: var(--shadow-xs);
}

.crm-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.crm-table th {
  background: var(--color-surface-subtle);
  padding: 0.85rem 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.72rem;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
}

.crm-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border-subtle);
  color: var(--color-text);
}

.crm-table tr:hover td {
  background-color: #f8fafc;
  cursor: pointer;
}

/* CRM Lead Detail Drawer / View */
.lead-detail-header {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.lead-timeline {
  position: relative;
  padding-left: 1.5rem;
  border-left: 2px solid var(--color-border);
}

.timeline-event {
  position: relative;
  margin-bottom: 1.5rem;
}

.timeline-dot {
  position: absolute;
  left: -1.95rem;
  top: 0.2rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-emerald);
  border: 2px solid #ffffff;
}

.timeline-time {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.timeline-desc {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-top: 0.15rem;
}

/* Intelligence Loop Visual Diagram */
.loop-diagram-box {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
  text-align: center;
  margin-top: 2rem;
  box-shadow: var(--shadow-sm);
}

.loop-nodes-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 2.5rem 0;
}

.loop-node {
  background: var(--color-surface-subtle);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-primary);
  transition: all var(--transition-fast);
}

.loop-node:hover {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

.loop-node.core-hub {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-emerald);
  box-shadow: 0 0 16px rgba(145, 106, 67, 0.25);
}

.loop-connector {
  color: var(--color-emerald);
  font-weight: 800;
  font-size: 1.1rem;
}

/* --------------------------------------------------------------------------
   12. Modals & Notifications
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(23, 63, 70, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  max-width: 620px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.25rem;
  position: relative;
  box-shadow: var(--shadow-xl);
  transform: translateY(20px);
  transition: transform var(--transition-normal);
}

.modal-overlay.active .modal-card {
  transform: translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-surface-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--color-text-muted);
}

.compatibility-bar-row {
  margin-bottom: 1.15rem;
}

.compatibility-bar-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.compatibility-bar-track {
  height: 8px;
  background: var(--color-surface-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.compatibility-bar-fill {
  height: 100%;
  background: var(--color-emerald);
  border-radius: var(--radius-full);
}

.tradeoff-alert-box {
  background: var(--color-amber-bg);
  border: 1px solid var(--color-amber-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1.5rem;
}

.tradeoff-alert-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-amber);
  margin-bottom: 0.4rem;
}

/* Toast Notification */
.toast-notice {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--color-primary);
  color: #ffffff;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 2000;
  transform: translateY(100px);
  opacity: 0;
  transition: all var(--transition-normal);
}

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

/* --------------------------------------------------------------------------
   13. Footer & Legal Disclaimer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--color-primary-dark);
  color: #ffffff;
  padding: 4.5rem 0 2.5rem;
  border-top: 1px solid var(--color-border-dark);
}

.site-footer h4 { color: #ffffff; }

.footer-disclaimer-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 2.5rem;
  font-size: 0.82rem;
  color: var(--color-text-inverse-muted);
  line-height: 1.5;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
  color: var(--color-text-inverse-muted);
}


/* ==========================================================================
   14. Rox Oliver Brand Layer (Manual de Identidade Visual)
   ========================================================================== */
:root {
  --pattern-outline: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-10 -10 610 612'%3E%3Cpath d='M97 0H492L590 97V225L522 295L590 365V592H394V295H296V198H198V592H0V97Z' fill='none' stroke='%23ffffff' stroke-opacity='0.09' stroke-width='5'/%3E%3C/svg%3E");
  --pattern-tile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 720 720'%3E%3Cpath transform='translate(65 64)' d='M97 0H492L590 97V225L522 295L590 365V592H394V295H296V198H198V592H0V97Z' fill='%23ffffff' fill-opacity='0.022'/%3E%3C/svg%3E");
}

h1, h2 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0;
}
h3, h4, h5, h6 { font-family: var(--font-heading); letter-spacing: -0.01em; }
.hero-title { font-family: var(--font-display); letter-spacing: -0.01em; line-height: 1.08; }
.quiz-question-title { font-family: var(--font-display); letter-spacing: 0; }
.btn, .nav-link, .section-tag, .hero-tag, .badge, .crm-demo-pill, .kpi-label,
.eq-block-title, .audience-action, .detail-tab-btn, .crm-nav-item, .form-label { font-family: var(--font-heading); }
.kpi-value, .hero-trust-number, .gauge-score-text, .widget-match-percent, .step-number,
#res-score-number, #pdetail-fit-score, #compat-modal-score, #crm-lead-modal-score, .product-price-val { font-family: var(--font-display); letter-spacing: 0; }
.brand-logo-dot { border-radius: 1px; }

/* Logo usage */
.brand-logo { align-items: center; }
.brand-logo-img { height: 46px; width: auto; display: block; }
.brand-logo-img-sm { height: 36px; }
.crm-logo-full { height: 44px; }
.crm-logo-icon { display: none; height: 34px; }
@media (max-width: 900px) {
  .crm-logo-full { display: none; }
  .crm-logo-icon { display: block; }
  .crm-sidebar-header { padding: 1.25rem 0.75rem; display: flex; justify-content: center; }
}
.footer-logo { height: 52px; width: auto; }

/* Header: keep menu on one line; switch to drawer below 1200px */
.nav-links { gap: 1.6rem; }
.nav-link { white-space: nowrap; }
@media (min-width: 960px) { .nav-links { display: none; } .mobile-menu-btn { display: flex; } }
@media (min-width: 1200px) { .nav-links { display: flex; } .mobile-menu-btn { display: none; } }
@media (max-width: 640px) {
  .header-actions .crm-demo-pill, .header-actions .btn { display: none; }
  .brand-logo-img { height: 38px; }
}

/* Accents: brand brown for highlights, cyan on dark surfaces */
.badge-emerald { color: #7a5733; }
.text-emerald { color: var(--brand-brown); }
.widget-match-percent { color: var(--brand-cyan); }
.eq-result-block .eq-block-icon { color: var(--brand-cyan); }
.crm-env-badge { color: var(--brand-cyan); background: rgba(64, 197, 211, 0.12); }
.crm-nav-item.active { border-left-color: var(--brand-cyan); }
.btn-primary { background-color: var(--brand-blue); box-shadow: 0 4px 12px rgba(32, 97, 108, 0.18); }
.btn-primary:hover { background-color: var(--brand-teal); }
.btn-emerald { background-color: var(--brand-brown); }
.btn-emerald:hover { background-color: var(--brand-brown-dark); }
.hero-widget-card::before { background: linear-gradient(90deg, var(--brand-teal) 0%, var(--brand-blue) 50%, var(--brand-brown) 100%); }

/* Patterns */
.section-dark, .result-header-hero, .cta-banner, .comparison-rox { position: relative; }
.section-dark {
  background-image: var(--pattern-outline);
  background-repeat: no-repeat;
  background-position: right -140px center;
  background-size: 560px auto;
}
.result-header-hero {
  background-image: var(--pattern-outline), linear-gradient(180deg, #102d33 0%, #1d4f58 100%);
  background-repeat: no-repeat, no-repeat;
  background-position: right -120px top 40px, 0 0;
  background-size: 520px auto, cover;
}
.cta-banner {
  background-image: var(--pattern-tile), linear-gradient(135deg, #102d33 0%, #20616C 100%);
  background-size: 72px 72px, cover;
}
.comparison-rox {
  background-image: var(--pattern-outline), linear-gradient(145deg, #102d33 0%, #1d4f58 100%);
  background-repeat: no-repeat, no-repeat;
  background-position: right -90px bottom -60px, 0 0;
  background-size: 340px auto, cover;
}
.site-footer, .crm-sidebar {
  background-image: var(--pattern-tile);
  background-size: 72px 72px;
}

/* Small-screen fixes */
@media (max-width: 640px) {
  .btn-lg { white-space: normal; text-align: center; max-width: 100%; }
  .hero-trust-indicators { flex-wrap: wrap; gap: 1rem 1.5rem; }
  .hero-trust-number { white-space: nowrap; }
}


/* ==========================================================================
   15. Favorites, Saved Profile & Listing Media
   ========================================================================== */
.fav-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
  font-family: var(--font-heading); font-weight: 700; font-size: 0.8rem;
  border: 1px solid var(--color-border-strong); background: #ffffff; color: var(--color-primary);
  padding: 0.4rem 0.75rem; border-radius: var(--radius-sm); transition: all var(--transition-fast);
}
.fav-toggle:hover { border-color: var(--brand-brown); color: var(--brand-brown); }
.fav-toggle .fav-icon { font-size: 1rem; line-height: 1; }
.fav-toggle.is-fav { background: var(--brand-brown); border-color: var(--brand-brown); color: #ffffff; }
.fav-on-media { position: absolute; top: 1rem; left: 1rem; z-index: 2; background: rgba(255, 255, 255, 0.92); border-color: transparent; }
.fav-on-media.is-fav { background: var(--brand-brown); }
.fav-inline { width: 100%; padding: 0.5rem 1rem; }
.fav-block { width: 100%; padding: 0.7rem 1rem; font-size: 0.9rem; margin-bottom: 0.75rem; }
.fav-pill .fav-pill-heart { color: var(--brand-brown); }
.fav-pill:hover .fav-pill-heart { color: #ffffff; }
.fav-count {
  min-width: 1.25rem; height: 1.25rem; padding: 0 0.3rem; border-radius: var(--radius-sm);
  background: var(--brand-brown); color: #ffffff; font-size: 0.7rem; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.res-saved-note { font-size: 0.8rem; color: #b9cdd2; }

.favorites-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.fav-chip {
  font-family: var(--font-heading); font-weight: 600; font-size: 0.85rem;
  padding: 0.45rem 0.9rem; border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm);
  background: #ffffff; color: var(--color-text-secondary);
}
.fav-chip.active { background: var(--color-primary); border-color: var(--color-primary); color: #ffffff; }
.favorite-row {
  display: grid; grid-template-columns: 1fr; gap: 1.25rem; align-items: start;
  background: #ffffff; border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  padding: 1.5rem; margin-bottom: 1rem;
}
@media (min-width: 900px) { .favorite-row { grid-template-columns: 1.3fr 1.2fr 0.6fr; } }
.favorite-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: var(--color-primary); }
.favorite-organize .form-select, .favorite-organize .form-input { padding: 0.6rem 0.85rem; font-size: 0.9rem; }
.favorite-note { resize: vertical; min-height: 64px; font-family: var(--font-main); }
.favorite-actions { display: flex; flex-direction: column; gap: 0.5rem; }
.favorites-empty {
  text-align: center; padding: 4rem 1.5rem; background: #ffffff;
  border: 1px dashed var(--color-border-strong); border-radius: var(--radius-lg);
}

.product-media-img { width: 100%; height: 100%; object-fit: cover; }
.pdetail-media.has-media { height: auto !important; background: transparent !important; display: block !important; }
.pdetail-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.75rem; }
.pdetail-gallery img, .pdetail-gallery video { width: 100%; height: 240px; object-fit: cover; border-radius: var(--radius-md); background: #102d33; }

/* Detail layout keeps the container's side gutters */
.product-detail-layout { padding: 3.5rem 1.5rem; }


/* ==========================================================================
   16. Accounts, Profile Page & Admin
   ========================================================================== */
.account-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-heading); font-weight: 700; font-size: 0.85rem; color: var(--color-primary);
  padding: 0.3rem 0.8rem 0.3rem 0.3rem; border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm); background: #ffffff;
}
.account-btn:hover { border-color: var(--brand-blue); }
.account-avatar {
  width: 28px; height: 28px; border-radius: var(--radius-sm); background: var(--brand-teal); color: #ffffff;
  display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 0.85rem;
}
@media (max-width: 640px) { .header-actions .account-btn { display: none; } }

.auth-tabs { display: flex; border-bottom: 1px solid var(--color-border); margin-bottom: 1.25rem; }
.auth-tab { flex: 1; padding: 0.7rem; font-family: var(--font-heading); font-weight: 700; color: var(--color-text-muted); border-bottom: 2px solid transparent; }
.auth-tab.active { color: var(--color-primary); border-bottom-color: var(--brand-blue); }
.auth-error { color: var(--color-rose); font-size: 0.85rem; font-weight: 600; min-height: 1.2rem; margin-bottom: 0.5rem; }
.auth-demo-note { font-size: 0.75rem; color: var(--color-text-muted); text-align: center; margin-top: 1rem; }

.profile-hero {
  background-image: var(--pattern-outline), linear-gradient(180deg, #102d33 0%, #1d4f58 100%);
  background-repeat: no-repeat, no-repeat; background-position: right -80px center, 0 0; background-size: 360px auto, cover;
  padding: 3rem 0;
}
.profile-account { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; }
.profile-avatar {
  width: 72px; height: 72px; border-radius: var(--radius-md); background: var(--brand-blue); color: #ffffff;
  font-family: var(--font-display); font-size: 2rem; display: flex; align-items: center; justify-content: center;
}
.profile-card { background: #ffffff; border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow-sm); }
.profile-rox-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center; }
@media (min-width: 860px) { .profile-rox-grid { grid-template-columns: 1fr 260px; } }
.profile-params { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.75rem; }
.profile-params div, .admin-user-grid div { background: var(--color-surface-subtle); padding: 0.75rem 1rem; border-radius: var(--radius-sm); }
.profile-params span, .admin-user-grid span { display: block; font-size: 0.7rem; text-transform: uppercase; font-weight: 700; color: var(--color-text-muted); letter-spacing: 0.04em; }
.profile-params strong, .admin-user-grid strong { color: var(--color-primary); font-size: 0.92rem; }
.profile-score-box { text-align: center; background: var(--color-surface-subtle); border-radius: var(--radius-md); padding: 1.5rem; }
.profile-score-num { font-family: var(--font-display); font-size: 3.5rem; font-weight: 700; color: var(--color-primary); line-height: 1; }

.admin-page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.25rem; }
.admin-form-grid { display: grid; grid-template-columns: 1fr; gap: 0 1rem; }
@media (min-width: 640px) { .admin-form-grid { grid-template-columns: 1fr 1fr; } .admin-form-grid .span-2 { grid-column: span 2; } }
.admin-form .form-group { margin-bottom: 0.85rem; }
.admin-form .form-input, .admin-form .form-select { padding: 0.6rem 0.85rem; font-size: 0.9rem; }
.admin-form textarea { resize: vertical; font-family: var(--font-main); }
.admin-danger { color: var(--color-rose) !important; margin-left: 0.5rem; }
.admin-user-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0.6rem; }


/* Listing gallery */
.gallery-main { position: relative; height: 460px; background: #102d33; border-radius: var(--radius-lg); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.gallery-main img, .gallery-main video { width: 100%; height: 100%; object-fit: contain; }
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.9); color: var(--color-primary); font-size: 1.8rem; line-height: 1; display: flex; align-items: center; justify-content: center; }
.gallery-nav.prev { left: 0.75rem; } .gallery-nav.next { right: 0.75rem; }
.gallery-bar { display: flex; justify-content: flex-end; font-size: 0.8rem; color: var(--color-text-muted); margin: 0.5rem 0; }
.gallery-thumbs { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.5rem; }
.gallery-thumb { flex: 0 0 auto; width: 84px; height: 64px; border-radius: var(--radius-sm); overflow: hidden; border: 2px solid transparent; opacity: 0.7; background: #102d33; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.active { border-color: var(--brand-brown); opacity: 1; }
.gallery-thumb-video { color: #ffffff; font-size: 1.2rem; }
@media (max-width: 640px) { .gallery-main { height: 300px; } }
.product-detail-layout > div { min-width: 0; }


/* Admin media manager */
.media-manager { border: 1px dashed var(--color-border-strong); border-radius: var(--radius-md); padding: 0.85rem; background: var(--color-surface-subtle); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 0.6rem; max-height: 300px; overflow-y: auto; }
.media-item { background: #ffffff; border: 1px solid var(--color-border); border-radius: var(--radius-sm); overflow: hidden; }
.media-item.is-cover { border-color: var(--brand-brown); box-shadow: 0 0 0 1px var(--brand-brown); }
.media-thumb { position: relative; height: 84px; background: #102d33; }
.media-thumb img, .media-thumb video { width: 100%; height: 100%; object-fit: cover; }
.media-video-badge { position: absolute; right: 4px; bottom: 4px; }
.media-badges { position: absolute; left: 4px; top: 4px; display: flex; flex-wrap: wrap; gap: 3px; }
.media-cover-badge, .media-video-badge, .media-thumb-badge { font-size: 0.65rem; font-weight: 700; padding: 1px 6px; border-radius: 2px; background: var(--brand-brown); color: #ffffff; }
.media-video-badge { left: auto; right: 4px; background: rgba(0, 0, 0, 0.65); }
.media-item-actions { display: flex; }
.media-item-actions button { flex: 1; padding: 0.3rem 0; font-size: 0.85rem; color: var(--color-primary); border-right: 1px solid var(--color-border-subtle); }
.media-item-actions button:last-child { border-right: none; }
.media-item-actions button:disabled { opacity: 0.3; cursor: default; }
.media-item-actions button.danger { color: var(--color-rose); }
.media-item-actions button:not(:disabled):hover { background: var(--color-surface-subtle); }
.media-empty, .media-count { grid-column: 1 / -1; font-size: 0.8rem; color: var(--color-text-muted); }
.media-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: 0.75rem; }
.media-upload-btn { position: relative; overflow: hidden; cursor: pointer; }
.media-upload-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.media-upload-btn.disabled { opacity: 0.5; pointer-events: none; }
.media-link-add { display: flex; gap: 0.4rem; flex: 1; min-width: 240px; }
.media-link-add .form-input { padding: 0.45rem 0.7rem; font-size: 0.85rem; }
.media-status { font-size: 0.78rem; color: var(--color-text-muted); margin-top: 0.5rem; }
.media-status.error { color: var(--color-rose); font-weight: 600; }
.insight-cover { width: calc(100% + 3.5rem); max-width: none; margin: -1.75rem -1.75rem 1rem; height: 150px; object-fit: cover; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.insight-media { display: grid; gap: 0.75rem; margin-top: 1.25rem; }
.insight-media img, .insight-media video { width: 100%; border-radius: var(--radius-md); }

/* Browsing thumbnail + listing status (v9) */
.media-thumb-badge { background: var(--brand-cyan); color: #0f2f35; }
.media-item.is-thumb { border-color: var(--brand-cyan); box-shadow: 0 0 0 2px var(--brand-cyan); }
.media-thumb-btn { display: block; width: 100%; padding: 0.3rem 0.25rem; font-size: 0.72rem; font-weight: 700; color: var(--color-primary); border-top: 1px solid var(--color-border-subtle); background: #ffffff; }
.media-thumb-btn:not(:disabled):hover { background: var(--color-surface-subtle); }
.media-thumb-btn:disabled { color: #0f6b77; cursor: default; background: rgba(64, 197, 211, 0.12); }
.badge-sold { background: var(--brand-brown-dark); color: #ffffff; border-color: var(--brand-brown-dark); }
.admin-sold-btn { color: var(--brand-brown); }
.favorite-row.is-unavailable { position: relative; }
.favorite-row.is-unavailable .favorite-main { opacity: 0.6; }
.favorite-status-banner { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.35rem 0.75rem; align-items: baseline; padding: 0.65rem 0.9rem; background: var(--color-surface-subtle); border-left: 4px solid var(--brand-brown); font-size: 0.85rem; color: var(--color-text-muted); }
.favorite-status-banner strong { color: var(--brand-brown-dark); text-transform: uppercase; letter-spacing: 0.04em; font-family: "Fustat", sans-serif; }
.favorite-row.is-sold .favorite-status-banner { border-left-color: var(--brand-brown-dark); background: #f3eee9; }

/* ==========================================================================
   Launch additions: auth links, consent, footer contact, cookie notice,
   WhatsApp button, profile privacy box
   ========================================================================== */
.auth-link { color: var(--brand-teal); font-weight: 600; cursor: pointer; text-decoration: underline; }
.auth-consent { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.85rem; color: var(--color-text-secondary); margin: -0.25rem 0 1rem; line-height: 1.4; }
.auth-consent input { margin-top: 0.2rem; flex-shrink: 0; }
.auth-consent a, .auth-error a { color: var(--brand-teal); text-decoration: underline; }
button:disabled { opacity: 0.6; cursor: wait; }

.footer-bottom { gap: 1.5rem; align-items: flex-start; }
.footer-contact { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-top: 1rem; }
.footer-contact a { color: #ffffff; text-decoration: none; font-weight: 600; }
.footer-contact a:hover { text-decoration: underline; }
.footer-legal { line-height: 1.7; text-align: right; max-width: 560px; }
@media (max-width: 720px) { .footer-legal { text-align: left; } }

.specialist-contact-links { display: flex; flex-direction: column; gap: 0.6rem; }
.specialist-contact-links a { text-decoration: none; text-align: center; }

.cookie-notice {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1500;
  max-width: 760px; margin: 0 auto; display: none; align-items: center; gap: 1rem;
  background: var(--color-primary-dark, #10272c); color: #ffffff; padding: 1rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.cookie-notice.show { display: flex; }
.cookie-notice p { margin: 0; font-size: 0.85rem; line-height: 1.5; color: #dbe7ea; }
.cookie-notice a { color: #40C5D3; text-decoration: underline; }
.cookie-notice .btn { flex-shrink: 0; }
@media (max-width: 600px) { .cookie-notice { flex-direction: column; align-items: stretch; } }

.whatsapp-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 1400; width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
  background: #25D366; color: #ffffff; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); transition: transform 0.15s ease;
}
.whatsapp-float:hover { transform: scale(1.06); }
.cookie-notice.show ~ .whatsapp-float { bottom: 110px; }
body.crm-open .whatsapp-float { display: none; }

.profile-privacy { margin-top: 3rem; padding: 1.25rem 1.5rem; border: 1px solid var(--color-border, #e2e8f0); background: var(--color-surface-subtle); }

/* QA fixes (v10) */
#rox-score .gauge-formula-pill, #rox-score .gauge-formula-pill span { color: var(--color-text-muted); }
#rox-score .gauge-formula-pill strong { color: var(--brand-brown); }
.sr-funnel { position: absolute; left: calc(100% + 0.4rem); color: var(--brand-brown); font-weight: 700; }
.funnel-bar-fill { position: relative; }
.crm-dist-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; text-align: center; }
.crm-topbar { gap: 0.75rem 1rem; flex-wrap: wrap; }
.crm-topbar-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
body:has(#view-crm.active-view) .site-footer { display: none; }
@media (max-width: 700px) {
  .spa-view.active-view.crm-layout { flex-direction: column; }
  .crm-sidebar { width: 100%; flex-direction: row; align-items: stretch; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1); position: sticky; top: 0; z-index: 20; }
  .crm-sidebar-header { padding: 0.6rem 0.75rem; border-bottom: none; border-right: 1px solid rgba(255,255,255,0.1); align-items: center; }
  .crm-logo-icon { height: 28px; }
  .crm-nav-list { flex-direction: row; overflow-x: auto; padding: 0.4rem; gap: 0.25rem; scrollbar-width: none; }
  .crm-nav-list::-webkit-scrollbar { display: none; }
  .crm-nav-item { flex-direction: column; gap: 0.15rem; padding: 0.45rem 0.6rem; font-size: 0.68rem; white-space: nowrap; border-left: none !important; }
  .crm-nav-item.active { border-bottom: 2px solid var(--brand-cyan); }
  .crm-sidebar .sidebar-label { display: block; }
  .crm-sidebar-footer { display: none; }
  .crm-topbar { padding: 0.85rem 1rem; }
  .crm-topbar-title .text-muted { display: none; }
  .crm-topbar-actions { gap: 0.6rem; }
  .crm-page-container { padding: 1.1rem 1rem; }
  .crm-dist-grid { grid-template-columns: repeat(2, 1fr); }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
}

/* Embedded videos (YouTube / Instagram links) and admin video tiles */
.video-embed { width: 100%; height: 100%; border: 0; background: #000; }
.insight-media .video-embed { aspect-ratio: 16 / 9; height: auto; }
.insight-media .video-embed.is-instagram { aspect-ratio: 4 / 5; max-width: 480px; margin: 0 auto; }
.media-video-tile { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: #102d33; color: #ffffff; font-size: 0.8rem; font-weight: 600; }
.gallery-thumb img + .gallery-thumb-video { position: absolute; }
.gallery-thumb { position: relative; }

/* Admin: storage usage indicator */
.admin-storage { border: 1px solid var(--color-border, #e2e8f0); background: #ffffff; padding: 1rem 1.25rem; margin-bottom: 1.25rem; font-size: 0.85rem; }
.storage-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1rem; margin-bottom: 0.6rem; }
.storage-head span { color: var(--color-text-secondary); }
.storage-bar { display: flex; height: 10px; background: var(--color-surface-subtle); overflow: hidden; }
.storage-bar span { display: block; height: 100%; }
.storage-photos { background: #437F91; }
.storage-videos { background: #916A43; }
.storage-legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; margin-top: 0.6rem; color: var(--color-text-secondary); }
.storage-legend i { display: inline-block; width: 10px; height: 10px; margin-right: 0.4rem; vertical-align: -1px; }
.drive-sync p { margin: 0.4rem 0 0; }
.drive-sync ul { margin: 0.3rem 0 0; padding-left: 1.2rem; color: var(--color-text-secondary); }
.drive-sync .storage-head a { color: var(--color-primary); font-weight: 600; text-decoration: none; }
.storage-note { margin: 0.6rem 0 0; color: var(--brand-brown); font-weight: 600; }
