/* =============================================================================
   Construye México · estilos
   Paleta inspirada en arquitectura mexicana moderna (sage + cream + terracota)
   ============================================================================= */

/* -----------------------------------------------------------------------------
   Tipografía oficial — Galeano Grotesque (familia completa)
   Las URLs apuntan a los .otf que están en /fonts/Galeano Grotesque/.
   Los espacios en las rutas van como %20 (encoding URL).
   ----------------------------------------------------------------------------- */
@font-face {
  font-family: 'Galeano Grotesque';
  src: url('fonts/Galeano%20Grotesque/Rene%20Bieder%20-%20GalanoGrotesque%20Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Galeano Grotesque';
  src: url('fonts/Galeano%20Grotesque/Rene%20Bieder%20-%20GalanoGrotesque%20LightItalic.otf') format('opentype');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Galeano Grotesque';
  src: url('fonts/Galeano%20Grotesque/Rene%20Bieder%20-%20GalanoGrotesque%20Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Galeano Grotesque';
  src: url('fonts/Galeano%20Grotesque/Rene%20Bieder%20-%20GalanoGrotesque%20RegularItalic.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Galeano Grotesque';
  src: url('fonts/Galeano%20Grotesque/Rene%20Bieder%20-%20GalanoGrotesque%20Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Galeano Grotesque';
  src: url('fonts/Galeano%20Grotesque/Rene%20Bieder%20-%20GalanoGrotesque%20MediumItalic.otf') format('opentype');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Galeano Grotesque';
  src: url('fonts/Galeano%20Grotesque/Rene%20Bieder%20-%20GalanoGrotesque%20SemiBold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Galeano Grotesque';
  src: url('fonts/Galeano%20Grotesque/Rene%20Bieder%20-%20GalanoGrotesque%20Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Galeano Grotesque';
  src: url('fonts/Galeano%20Grotesque/Rene%20Bieder%20-%20GalanoGrotesque%20ExtraBold.otf') format('opentype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* === Paleta oficial Construye México === */
  /* Fondos: más claros y limpios, sensación de respiro */
  --bg:           #F5F2EB;   /* fondo principal — más claro que antes */
  --bg-warm:      #EDE7D9;   /* zonas con énfasis cálido */
  --surface:      #FFFFFF;   /* tarjetas y modales */
  --surface-alt:  #F8F5EE;   /* hover suave */
  --border:       #E2DCCC;   /* bordes más sutiles */
  --border-strong:#C9C1AD;

  /* Texto: más contraste, jerarquía clara */
  --text:         #2A2E2A;   /* casi negro con tinte verde */
  --text-muted:   #5C645B;
  --text-faint:   #8A8F86;

  /* Acento principal: el sage de la marca */
  --accent:       #5E6E5B;   /* sage un poco más profundo, más serio */
  --accent-dark:  #424E40;
  --accent-soft:  #E4EADE;   /* fondo suave */

  /* Acento cálido (terracota suave) para CTAs y momentos editoriales */
  --warm:         #B5683C;   /* terracota mexicana */
  --warm-dark:    #94522C;
  --warm-soft:    #F4E3D6;

  /* Semánticos */
  --success:      #2F6F3E;
  --success-soft: #DDEED5;
  --warning:      #A77514;
  --warning-soft: #FAEFCB;
  --danger:       #9C342B;
  --danger-soft:  #F8DAD4;

  --concrete:     #5C5C5C;

  /* Sombras más sutiles, papel premium */
  --shadow-sm: 0 1px 2px rgba(42,46,42,0.04), 0 1px 1px rgba(42,46,42,0.03);
  --shadow-md: 0 4px 14px rgba(42,46,42,0.08), 0 2px 4px rgba(42,46,42,0.04);
  --shadow-lg: 0 24px 56px -12px rgba(42,46,42,0.18), 0 8px 20px -8px rgba(42,46,42,0.10);

  /* Categorías (independientes de la marca, deben distinguirse en el mapa) */
  --c-constructora:    #B85A3D;
  --c-desarrolladora:  #2E5C8A;
  --c-proveedor:       #5C6E3F;
  --c-arquitectura:    #8B5A3C;
  --c-interiores:      #B8860B;

  --header-h: 68px;
  --sidebar-w: 360px;

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 14px;

  /* Tipografía oficial: Galeano Grotesque (toda la familia).
     Cuerpo y UI usan los pesos 400-600. Los "títulos editoriales" usan
     Galeano en peso 300 italic para sentirse refinados sin meter otra fuente. */
  --font-sans: 'Galeano Grotesque', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', system-ui, sans-serif;
  --font-display: 'Galeano Grotesque', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', system-ui, sans-serif;
  --font-serif: var(--font-display);
}

/* ---------- Reset ligero ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss01';
}

/* Familia serif editorial — solo para títulos prominentes (landing, ficha, modales) */
.cmx-display {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: -0.02em;
  font-feature-settings: 'liga', 'ss01';
}
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================ HEADER */
.cmx-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.cmx-header__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
/* Logo: contenedor sage + ícono SVG "El Umbral" en blanco */
.cmx-logo {
  width: 40px;
  height: 40px;
  background: var(--accent);
  border-radius: 10px;
  display: grid;
  place-items: center;
  position: relative;
  flex: 0 0 40px;
  transition: background 0.15s, transform 0.15s;
  text-decoration: none;
}
.cmx-logo:hover {
  background: var(--accent-dark);
  transform: scale(1.03);
}
.cmx-logo__svg {
  width: 22px;
  height: 22px;
  color: #fff;
  display: block;
}

/* En contextos sobre fondos oscuros (gate hero), el logo invierte */
.cmx-gate .cmx-logo,
.cmx-gate .cmx-header .cmx-logo { background: rgba(255,255,255,0.10); }
.cmx-gate .cmx-logo:hover { background: rgba(255,255,255,0.18); }

.cmx-header__text h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.cmx-header__text p {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.2;
  letter-spacing: 0.005em;
}

.cmx-header__nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cmx-nav-link {
  padding: 8px 14px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  text-decoration: none !important;
}
.cmx-nav-link:hover { background: var(--surface-alt); }

/* ============================================================ BUTTONS */
.cmx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.cmx-btn[hidden] { display: none !important; }
.cmx-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.cmx-btn:hover { background: var(--surface-alt); }
.cmx-btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.cmx-btn--primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

.cmx-link-btn {
  background: transparent;
  border: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
}
.cmx-link-btn:hover { text-decoration: underline; }

/* ============================================================ MAIN LAYOUT */
.cmx-main {
  display: flex;
  height: calc(100vh - var(--header-h));
  width: 100%;
  overflow: hidden;
}
.cmx-main[hidden] { display: none !important; }
.cmx-gate[hidden] { display: none !important; }

/* --- sidebar --- */
.cmx-sidebar {
  flex: 0 0 var(--sidebar-w);
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  overflow: hidden;
}
.cmx-sidebar__inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* ---------- Toggle de vistas (Profesionales / Proyectos) ---------- */
.cmx-view-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 12px 12px 6px;
  border-bottom: 1px solid var(--border);
}
.cmx-view-toggle[hidden] { display: none; }

.cmx-view-tab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 2px;
  padding: 9px 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  color: var(--text-muted);
}
.cmx-view-tab:hover {
  background: var(--surface-alt);
  color: var(--text);
}
.cmx-view-tab--active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.cmx-view-tab--active:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}
.cmx-view-tab--locked {
  cursor: not-allowed;
  opacity: 0.62;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 7px,
    var(--surface-alt) 7px,
    var(--surface-alt) 14px
  );
}
.cmx-view-tab--locked:hover {
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 7px,
    var(--surface-alt) 7px,
    var(--surface-alt) 14px
  );
  color: var(--text-muted);
}
.cmx-view-tab__chip {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 7px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--warm);
  color: #fff;
  border-radius: 999px;
  vertical-align: middle;
  line-height: 1.5;
}

.cmx-view-tab__icon {
  font-size: 16px;
  line-height: 1;
}
.cmx-view-tab__label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}
.cmx-view-tab__sub {
  font-size: 10px;
  line-height: 1.2;
  opacity: 0.7;
}

.cmx-search {
  position: relative;
  padding: 16px 16px 12px 16px;
}
.cmx-search__icon {
  position: absolute;
  left: 32px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: var(--accent);
  pointer-events: none;
  font-weight: 600;
}
#cmx-search-input {
  width: 100%;
  padding: 14px 14px 14px 44px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}
#cmx-search-input::placeholder {
  color: var(--text-faint);
  font-weight: 400;
  font-style: italic;
  transition: opacity 0.3s;
}
#cmx-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-sm);
}

.cmx-filters {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.cmx-filters__title {
  margin: 0 0 8px 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.cmx-filters__title:not(:first-child) { margin-top: 16px; }

.cmx-filters__group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cmx-cat-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  transition: background 0.15s;
}
.cmx-cat-chip:hover { background: var(--surface-alt); }
.cmx-cat-chip input { accent-color: var(--accent); }
.cmx-cat-chip__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 10px;
}
.cmx-cat-chip__count {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.cmx-select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 13px;
  color: var(--text);
  outline: none;
}
.cmx-select:focus { border-color: var(--accent); }

/* --- results --- */
.cmx-results {
  flex: 1 1 auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.cmx-results__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 1;
}
.cmx-results__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.cmx-result {
  display: grid;
  grid-template-columns: 4px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s, padding-left 0.15s;
  position: relative;
}
.cmx-result:hover {
  background: var(--surface-alt);
}
.cmx-result__accent {
  width: 4px;
  align-self: stretch;
  border-radius: 2px;
  flex: 0 0 4px;
}
.cmx-result__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cmx-result__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.005em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cmx-result__verif {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  border-radius: 50%;
  color: #fff;
}
.cmx-result__verif--ok    { background: var(--success); }
.cmx-result__verif--pending { background: var(--warning); }
.cmx-result__meta {
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cmx-result__cat {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.055em;
}
.cmx-result__chev {
  color: var(--text-faint);
  font-size: 14px;
  flex: 0 0 auto;
  transition: transform 0.15s, color 0.15s;
}
.cmx-result:hover .cmx-result__chev {
  color: var(--text-muted);
  transform: translateX(2px);
}

.cmx-results__empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* --- sidebar footer --- */
.cmx-sidebar__footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.cmx-disclaimer {
  margin: 0 0 6px 0;
  font-size: 11px;
  color: var(--text-faint);
  line-height: 1.4;
}
.cmx-credits {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}
.cmx-credits strong { color: var(--accent); }

/* ============================================================ MAP */
.cmx-map-wrap {
  flex: 1 1 auto;
  position: relative;
  background: #DDD7CC;
}
#cmx-map {
  width: 100%;
  height: 100%;
}

.cmx-map-legend {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 500;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 10px 12px;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 200px;
}
.cmx-legend__title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-bottom: 4px;
}
.cmx-legend__row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cmx-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* Pines personalizados */
.cmx-pin {
  width: 22px;
  height: 22px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
}

/* ============================================================ FICHA */
.cmx-ficha {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cmx-ficha__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.cmx-ficha__cat-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 100px;
  color: #fff;
}
.cmx-ficha h2 {
  margin: 8px 0 2px 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 28px;
  letter-spacing: -0.02em;
  line-height: 1.15;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.cmx-ficha__location {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0;
}
.cmx-ficha__desc {
  margin: 4px 0 0 0;
  font-size: 14px;
  color: var(--text);
}
.cmx-ficha__row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.cmx-tag {
  display: inline-block;
  font-size: 12px;
  padding: 3px 9px;
  background: var(--surface-alt);
  border-radius: 100px;
  color: var(--text);
}
.cmx-ficha__detail-list {
  list-style: none;
  margin: 8px 0 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
}
.cmx-ficha__detail-list li {
  font-size: 13px;
  color: var(--text);
}
.cmx-ficha__detail-list li span {
  display: block;
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}
.cmx-ficha__cta {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
}

/* ============================================================ MODAL */
.cmx-modal[hidden] { display: none !important; }
.cmx-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 24px;
}
.cmx-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(60, 66, 60, 0.55);
  backdrop-filter: blur(2px);
  cursor: pointer;
}
.cmx-modal__panel {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 600px;
  width: 100%;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 28px;
  z-index: 1;
}
.cmx-modal__panel--ficha { max-width: 540px; }
.cmx-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: var(--text-muted);
  border-radius: 6px;
}
.cmx-modal__close:hover { background: var(--surface-alt); color: var(--text); }

/* Títulos de modales: serif editorial, prominentes */
.cmx-modal__panel h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 26px;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 6px;
}
.cmx-modal__panel h3 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 24px 0 10px;
}
.cmx-modal__sub {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 20px;
}
/* ============================================================ FORM */
.cmx-form { display: flex; flex-direction: column; gap: 14px; }
.cmx-form__row { display: flex; flex-direction: column; gap: 6px; }
.cmx-form__row--two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.cmx-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
}
.cmx-form input,
.cmx-form select,
.cmx-form textarea {
  padding: 9px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 400;
  outline: none;
  transition: border-color 0.15s;
}
.cmx-form input:focus,
.cmx-form select:focus,
.cmx-form textarea:focus { border-color: var(--accent); }
.cmx-form textarea { resize: vertical; min-height: 64px; }
.cmx-form__hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: -8px 0 0 0;
}
.cmx-form__legal {
  font-size: 11px;
  color: var(--text-faint);
  margin: 0;
  line-height: 1.45;
}
.cmx-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

/* ============================================================ ACERCA DE */
.cmx-prose {
  margin: 0 0 14px 0;
  color: var(--text);
  line-height: 1.6;
}
.cmx-modal h3 {
  margin: 18px 0 8px 0;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
}
.cmx-list {
  margin: 0 0 14px 0;
  padding-left: 18px;
  color: var(--text);
}
.cmx-list li { margin-bottom: 6px; line-height: 1.5; }

/* ============================================================ TOAST */
.cmx-toast[hidden] { display: none; }
.cmx-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  padding: 12px 18px;
  background: var(--text);
  color: #fff;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: cmx-toast-in 0.25s ease;
}
@keyframes cmx-toast-in {
  from { transform: translate(-50%, 12px); opacity: 0; }
  to   { transform: translate(-50%, 0); opacity: 1; }
}

/* ============================================================ MOBILE */
@media (max-width: 900px) {
  .cmx-header { padding: 0 16px; }
  .cmx-header__text p { display: none; }
  .cmx-header__nav .cmx-nav-link { display: none; }
  .cmx-header__nav .cmx-nav-link[data-modal="modal-acerca"] { display: inline-flex; }
  .cmx-main { flex-direction: column; }
  .cmx-sidebar {
    flex: 0 0 auto;
    width: 100%;
    max-height: 50vh;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .cmx-map-wrap { flex: 1 1 auto; min-height: 50vh; }
  .cmx-form__row--two { grid-template-columns: 1fr; }
  .cmx-modal__panel { padding: 20px; }
  .cmx-ficha__detail-list { grid-template-columns: 1fr; }
}

/* =============================================================================
   Auth · header · gate · admin (extensión)
   ============================================================================= */

/* ---------- Header user chip ---------- */
.cmx-userchip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  border: 1px solid var(--border);
  border-radius: 100px;
  cursor: pointer;
  position: relative;
  user-select: none;
  background: var(--surface);
  transition: background 0.15s, border-color 0.15s;
}
.cmx-userchip:hover { background: var(--surface-alt); }
.cmx-userchip__avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex: 0 0 26px;
}
.cmx-userchip__name {
  font-size: 13px;
  font-weight: 600;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cmx-userchip__caret {
  font-size: 10px;
  color: var(--text-muted);
}

.cmx-usermenu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 240px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 1100;
  overflow: hidden;
}
.cmx-usermenu[hidden] { display: none; }
.cmx-usermenu__head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.cmx-usermenu__name { font-weight: 600; font-size: 13px; }
.cmx-usermenu__email { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.cmx-usermenu__role { font-size: 11px; color: var(--text-faint); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.04em; }
.cmx-usermenu__item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
}
.cmx-usermenu__item:hover { background: var(--surface-alt); }

/* ---------- Status badges ---------- */
.cmx-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 100px;
  background: var(--surface-alt);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.cmx-badge--warn,
.cmx-badge--pendiente { background: #FFF3D6; color: #8B6914; border-color: #F0DCA0; }
.cmx-badge--aprobado  { background: #D9EFD9; color: #2E5C2E; border-color: #B5DCB5; }
.cmx-badge--rechazado,
.cmx-badge--competencia { background: #F7D4CF; color: #8B2D22; border-color: #E5B0AA; }
.cmx-badge--suspendido { background: #E5DDD0; color: #5C5C5C; border-color: #D2C8B7; }
/* Planes / suscripciones (V12 · Stripe) */
.cmx-badge--plan-basico     { background: #EFEBE1; color: #5C5C5C; border-color: #D2C8B7; }
.cmx-badge--plan-verificado { background: #E3EBDE; color: #3F5A34; border-color: #B9CBB0; }
.cmx-badge--plan-destacado  { background: #F0E1D4; color: #7C4A28; border-color: #DBC0A2; }

/* ---------- Botón modificadores ---------- */
.cmx-btn--sm { padding: 5px 10px; font-size: 12px; }
.cmx-btn--lg { padding: 12px 22px; font-size: 15px; }
.cmx-btn--block { width: 100%; }
.cmx-btn--danger {
  border-color: #B23B2D;
  color: #8B2D22;
}
.cmx-btn--danger:hover { background: #F7D4CF; }
/* Botón de "Reportar problema": menos prominente que danger, pero claramente serio */
.cmx-btn--danger-ghost {
  border-color: #D4A8A2;
  color: #8B2D22;
  background: transparent;
}
.cmx-btn--danger-ghost:hover { background: #F7D4CF; border-color: #B23B2D; }

/* ---------- Badges de verificación (Capa 1 de confianza) ---------- */
.cmx-verif-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 8px;
  line-height: 1.2;
  border: 1px solid transparent;
  cursor: help;
}
.cmx-verif-badge--ok {
  background: #DFEDD8;
  color: #2F5722;
  border-color: #A8C998;
}
.cmx-verif-badge--pending {
  background: #FFF3D6;
  color: #6B5111;
  border-color: #E0C57A;
}
.cmx-verif-badge--none {
  background: #F1ECE3;
  color: #7C7060;
  border-color: #CFC4B0;
}

/* ---------- Modal narrow ---------- */
.cmx-modal__panel--narrow { max-width: 420px; }

/* ---------- Form error ---------- */
.cmx-form__error {
  margin: 0;
  padding: 10px 12px;
  background: #F7D4CF;
  border: 1px solid #E5B0AA;
  color: #8B2D22;
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.cmx-form label small {
  font-weight: 400;
  color: var(--text-faint);
}

/* ---------- Bloque de verificación rápida (admin) ---------- */
.cmx-verif-admin {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  margin: 6px 0 16px;
}
.cmx-verif-admin__state {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cmx-verif-admin__lbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.cmx-verif-admin__actions {
  margin-left: auto;
}

/* ---------- Welcome strip en sidebar ---------- */
.cmx-welcome {
  padding: 14px 16px 16px;
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--bg-warm) 100%);
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}
.cmx-welcome__greeting {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.2;
}
.cmx-welcome__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}
.cmx-welcome__stat strong {
  color: var(--text);
  font-weight: 700;
  margin-right: 3px;
}
.cmx-welcome__stat--ok strong { color: var(--success); }
.cmx-welcome__stat-line {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

/* ---------- Chips de filtro rápido (sidebar) ---------- */
.cmx-quick {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px 16px 14px;
  border-bottom: 1px solid var(--border);
}
.cmx-quick__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 500;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.cmx-quick__chip:hover {
  background: var(--surface);
  color: var(--text);
  border-color: var(--accent);
}
.cmx-quick__chip--active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.cmx-quick__chip--active:hover {
  background: var(--accent-dark);
  color: #fff;
}

/* ---------- Empty state mejorado ---------- */
.cmx-empty {
  padding: 32px 20px;
  text-align: center;
  background: var(--bg);
  border-radius: var(--radius-sm);
  margin: 16px;
}
.cmx-empty__title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.cmx-empty__body {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 12px;
}
.cmx-empty__action {
  display: flex;
  justify-content: center;
  gap: 8px;
}

/* ---------- Modal de bienvenida (3 pasos) ---------- */
.cmx-welcome-steps {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 16px 0 24px;
}
.cmx-welcome-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  background: var(--surface-alt);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
}
.cmx-welcome-step__num {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
}
.cmx-welcome-step strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.cmx-welcome-step p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ---------- Sucursales (form de empresa) ---------- */
.cmx-sucursales {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 10px 0 14px;
}
.cmx-sucursal {
  padding: 14px 16px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
}
.cmx-sucursal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.cmx-sucursal__num {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-dark);
}

.cmx-ficha__sec-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 20px 0 8px;
}

/* ---------- Patrocinios (V11) ---------- */
.cmx-patrocinio__tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--warm);
  color: #fff;
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 4px;
  align-self: flex-start;
}
.cmx-result--patrocinio {
  background: linear-gradient(90deg, var(--warm-soft) 0%, transparent 60%);
  border-left: 3px solid var(--warm);
  padding-left: 12px;
}
.cmx-result--patrocinio .cmx-result__name { color: var(--warm-dark); }

.cmx-patrocinio-banner {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 400;
  background: #FFFBF5;
  border: 1px solid var(--warm-soft);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}
.cmx-patrocinio-banner__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
}
.cmx-patrocinio-banner__img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.cmx-patrocinio-banner__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.cmx-patrocinio-banner__body strong {
  font-size: 14px;
  color: var(--text);
  font-weight: 700;
}
.cmx-patrocinio-banner__body span {
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cmx-patrocinio-banner__close {
  background: transparent;
  border: 0;
  font-size: 20px;
  line-height: 1;
  color: var(--text-muted);
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 4px;
}
.cmx-patrocinio-banner__close:hover { background: var(--surface-alt); color: var(--text); }

/* Ocultar banner en móvil (interfiere con el mapa chico) */
@media (max-width: 760px) {
  .cmx-patrocinio-banner { display: none; }
}

/* ---------- Onboarding banner (perfil incompleto del dueño) ---------- */
.cmx-onboard {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cmx-onboard--low  { border-left: 4px solid var(--danger); background: #FBE9E5; }
.cmx-onboard--mid  { border-left: 4px solid var(--warning); background: #FBF0D1; }
.cmx-onboard--high { border-left: 4px solid var(--success); background: var(--success-soft); }

.cmx-onboard__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.cmx-onboard__title strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.cmx-onboard__title span {
  font-size: 13px;
  color: var(--text-muted);
}
.cmx-onboard__toggle {
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s;
}
.cmx-onboard__toggle:hover { background: rgba(255,255,255,0.6); }

.cmx-onboard__bar {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.7);
  border-radius: 999px;
  overflow: hidden;
}
.cmx-onboard__bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--success));
  transition: width 0.3s ease-out;
}
.cmx-onboard--low .cmx-onboard__bar-fill { background: var(--danger); }
.cmx-onboard--mid .cmx-onboard__bar-fill { background: var(--warning); }
.cmx-onboard--high .cmx-onboard__bar-fill { background: var(--success); }

.cmx-onboard__list {
  list-style: none;
  margin: 0;
  padding: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.cmx-onboard__list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  padding: 4px 0;
}
.cmx-onboard__list li.is-ok      { color: var(--text-muted); text-decoration: line-through; opacity: 0.7; }
.cmx-onboard__list li.is-pending { color: var(--text); font-weight: 500; }
.cmx-onboard__icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  flex: 0 0 18px;
}
.cmx-onboard__list li.is-ok .cmx-onboard__icon {
  background: var(--success);
  color: #fff;
}
.cmx-onboard__list li.is-pending .cmx-onboard__icon {
  background: transparent;
  border: 1.5px solid var(--text-faint);
  color: var(--text-faint);
}

.cmx-onboard__cta {
  display: flex;
  justify-content: flex-end;
  margin-top: 2px;
}

/* ---------- Google rating (en ficha) ---------- */
.cmx-google-rating {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: #FFFBF5;
  border: 1px solid var(--warm-soft);
  border-radius: 10px;
  text-decoration: none !important;
  margin-top: 8px;
  flex-wrap: wrap;
  transition: background 0.15s;
}
.cmx-google-rating:hover { background: var(--warm-soft); }
.cmx-google-rating__num {
  font-size: 28px;
  font-weight: 700;
  color: var(--warm-dark);
  font-feature-settings: 'tnum';
}
.cmx-google-rating__stars {
  color: #F4B400;
  font-size: 18px;
  letter-spacing: 1px;
}
.cmx-google-rating__count {
  color: var(--text-muted);
  font-size: 13px;
  flex: 1;
  min-width: 120px;
}
.cmx-google-rating__cta {
  color: var(--warm-dark);
  font-weight: 600;
  font-size: 13px;
}

/* ---------- Reseñas internas ---------- */
.cmx-resenas { margin-top: 4px; }
.cmx-resenas__loading {
  padding: 12px 0;
  color: var(--text-muted);
  font-size: 13px;
  font-style: italic;
}
.cmx-resenas__header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface-alt);
  border-radius: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.cmx-resenas__avg {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  font-feature-settings: 'tnum';
}
.cmx-resenas__stars {
  color: var(--warm);
  font-size: 18px;
  letter-spacing: 1px;
}
.cmx-resenas__count {
  color: var(--text-muted);
  font-size: 13px;
  flex: 1;
  min-width: 120px;
}
.cmx-resenas__empty {
  padding: 14px 16px;
  background: var(--surface-alt);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.cmx-resenas__yo, .cmx-resenas__login {
  padding: 12px 14px;
  background: var(--accent-soft);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
  margin-top: 12px;
}

.cmx-resenas__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cmx-resena {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}
.cmx-resena--oculta {
  background: #F8E9E5;
  border-color: var(--danger-soft);
  opacity: 0.85;
}
.cmx-resena__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.cmx-resena__autor strong { font-weight: 600; font-size: 14px; color: var(--text); }
.cmx-resena__fecha { font-size: 12px; color: var(--text-faint); margin-left: 8px; }
.cmx-resena__texto {
  margin: 4px 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-wrap;
}
.cmx-resena__respuesta {
  margin: 10px 0 0;
  padding: 10px 12px;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text);
}
.cmx-resena__respuesta strong { display: block; margin-bottom: 4px; font-size: 12px; color: var(--accent-dark); }
.cmx-resena__respuesta p { margin: 0; line-height: 1.5; white-space: pre-wrap; }
.cmx-resena__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

/* Form para dejar reseña */
.cmx-resena-form {
  margin-top: 14px;
  padding: 14px 16px;
  background: var(--surface-alt);
  border-radius: 10px;
  border: 1px solid var(--border);
}
.cmx-resena-form__lbl {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.cmx-resena-form__stars {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
}
.cmx-resena-form__star {
  background: transparent;
  border: 0;
  font-size: 28px;
  color: var(--text-faint);
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
  transition: color 0.15s, transform 0.15s;
}
.cmx-resena-form__star:hover { transform: scale(1.15); }
.cmx-resena-form__star--on { color: var(--warm); }
.cmx-resena-form textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #fff;
  resize: vertical;
}
.cmx-resena-form textarea:focus { border-color: var(--accent); outline: none; }
.cmx-resena-form__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}
.cmx-resena-form__actions .cmx-form__error { margin: 0; flex: 1; }

/* ---------- Sucursales en la ficha pública ---------- */
.cmx-ficha__sucursales {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.cmx-ficha__sucursal {
  padding: 10px 12px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cmx-ficha__sucursal-name {
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cmx-ficha__sucursal-loc {
  color: var(--text-muted);
  font-size: 12px;
}
.cmx-ficha__sucursal-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
  font-size: 12px;
}
.cmx-ficha__sucursal-contacts a {
  color: var(--accent-dark);
}

/* ---------- Input de código OTP ---------- */
.cmx-otp-input {
  font-size: 24px !important;
  letter-spacing: 6px;
  text-align: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: 14px 8px !important;
  color: var(--text);
}
.cmx-otp-input::placeholder {
  letter-spacing: 4px;
  color: var(--text-faint);
  font-weight: 400;
}

/* ---------- Gate (visitantes) ---------- */
/* ============================================================ GATE V2 — Hero cinematográfico */
.cmx-gate {
  min-height: calc(100vh - var(--header-h));
  position: relative;
  display: flex;
  align-items: stretch;
  padding: 0;
  /* Capa 1: gradiente oscuro de izquierda a transparente derecha. Capa 2: imagen hero. */
  background:
    linear-gradient(95deg, rgba(20,28,34,0.92) 0%, rgba(20,28,34,0.78) 40%, rgba(30,38,38,0.40) 70%, rgba(30,38,38,0.15) 100%),
    url('hero.jpg') center center / cover no-repeat;
  background-attachment: fixed, fixed;
  color: #fff;
}
.cmx-gate[hidden] { display: none; }

.cmx-gate__inner {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 56px 48px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
  position: relative;
  z-index: 1;
}
@media (max-width: 880px) {
  .cmx-gate__inner {
    grid-template-columns: 1fr;
    padding: 40px 24px;
    gap: 32px;
  }
}

.cmx-gate__hero {
  color: #fff;
}
.cmx-gate__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 6px 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  color: rgba(255,255,255,0.92);
  margin-bottom: 24px;
}
.cmx-gate__eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #B5683C;
  box-shadow: 0 0 0 4px rgba(181,104,60,0.25);
}
.cmx-gate__title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
  color: #fff;
  max-width: 17ch;
}
.cmx-gate__title em {
  font-style: italic;
  color: #E8C99B;
  font-weight: 400;
}
.cmx-gate__lead {
  font-size: 17px;
  line-height: 1.6;
  color: rgba(255,255,255,0.85);
  margin: 0 0 32px;
  max-width: 52ch;
}
.cmx-gate__lead strong { color: #fff; font-weight: 500; }
.cmx-gate__cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.cmx-gate__cta .cmx-btn--primary {
  background: #fff;
  color: var(--text);
  border-color: #fff;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 600;
}
.cmx-gate__cta .cmx-btn--primary:hover {
  background: var(--bg);
  border-color: var(--bg);
}
.cmx-gate__cta .cmx-btn:not(.cmx-btn--primary) {
  background: transparent;
  border-color: rgba(255,255,255,0.40);
  color: #fff;
  padding: 12px 22px;
  font-size: 15px;
}
.cmx-gate__cta .cmx-btn:not(.cmx-btn--primary):hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.65);
}

/* Fila de stats / trust signals abajo del CTA */
.cmx-gate__stats {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.cmx-gate__stat {
  display: flex;
  flex-direction: column;
  min-width: 100px;
}
.cmx-gate__stat-num {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 500;
  color: #fff;
  line-height: 1;
  margin-bottom: 6px;
}
.cmx-gate__stat-lbl {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Tarjeta lateral con principios de la plataforma */
.cmx-gate__values {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius-lg);
  padding: 32px;
  color: rgba(255,255,255,0.92);
}
.cmx-gate__values-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  margin: 0 0 18px;
  color: #fff;
  letter-spacing: -0.01em;
}
.cmx-gate__values-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.cmx-gate__values-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.cmx-gate__values-icon {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(181,104,60,0.18);
  color: #E8C99B;
  display: grid;
  place-items: center;
  font-size: 15px;
}
.cmx-gate__values-text strong {
  display: block;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 2px;
}
.cmx-gate__values-text span {
  font-size: 13px;
  color: rgba(255,255,255,0.72);
  line-height: 1.5;
}
.cmx-gate__values-note {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  line-height: 1.5;
}
.cmx-gate__values-note strong { color: #E8C99B; font-weight: 500; }

/* Eyebrow chip dentro de modales */
.cmx-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 10px;
  background: var(--warm-soft);
  color: var(--warm-dark);
  border-radius: 999px;
  margin-bottom: 12px;
}

/* Nota de costo dentro de forms (waitlist principalmente) */
.cmx-cost-note {
  margin: 14px 0;
  padding: 12px 14px;
  background: var(--warm-soft);
  border-left: 3px solid var(--warm);
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted);
}
.cmx-cost-note strong { color: var(--text); }

/* Variante "tarjeta" — para estado pendiente/rechazado (compacto al centro) */
.cmx-gate--card .cmx-gate__inner {
  grid-template-columns: 1fr;
  max-width: 540px;
}
.cmx-gate--card .cmx-gate__card {
  background: #fff;
  color: var(--text);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px 36px;
  text-align: center;
}
.cmx-gate--card .cmx-gate__card h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 26px;
  margin: 0 0 12px;
  letter-spacing: -0.015em;
  color: var(--text);
}
.cmx-gate--card .cmx-gate__card p {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.55;
}
.cmx-gate__sub { color: var(--text-muted); font-size: 13px; }
.cmx-gate__about {
  margin-top: 18px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
  font-size: 13px;
}

/* ---------- Admin overlay ---------- */
.cmx-admin-overlay {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 1500;
  background: var(--bg);
  overflow: auto;
}
.cmx-admin-overlay[hidden] { display: none; }

.cmx-admin {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 60px;
}
.cmx-admin__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.cmx-admin__header h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.01em;
}
.cmx-admin__subtitle {
  margin: 4px 0 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.cmx-admin__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}
.cmx-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.cmx-stat__num {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.1;
}
.cmx-stat__lbl {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}
.cmx-stat--warn .cmx-stat__num { color: var(--accent); }

.cmx-admin__tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  overflow-x: auto;
}
.cmx-admin__tab {
  background: transparent;
  border: 0;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.cmx-admin__tab:hover { color: var(--text); }
.cmx-admin__tab--active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.cmx-admin__panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.cmx-admin__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.cmx-admin__search {
  flex: 1 1 auto;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 13px;
  outline: none;
}
.cmx-admin__search:focus { border-color: var(--accent); }

/* ---------- "Base de datos" en pestañas Usuarios / Empresas ---------- */
.cmx-db__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-alt);
  flex-wrap: wrap;
}
.cmx-db__h {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
  color: var(--text);
}
.cmx-db__sub {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  max-width: 56ch;
}
.cmx-db__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cmx-db__toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  flex-wrap: wrap;
}
.cmx-db__search {
  flex: 0 0 280px;
  min-width: 200px;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.cmx-db__search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.cmx-db__chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1 1 auto;
}
.cmx-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.cmx-chip:hover {
  background: var(--surface-alt);
  color: var(--text);
}
.cmx-chip--active {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}
.cmx-chip--active:hover {
  background: var(--text);
  color: #fff;
}

/* badge ok (verde) que faltaba */
.cmx-badge--ok {
  background: var(--success-soft);
  color: var(--success);
  border-color: var(--success);
}
.cmx-admin__intro {
  margin: 0;
  padding: 14px 18px 0;
  color: var(--text-muted);
  font-size: 13px;
}
.cmx-admin__col {
  padding: 14px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cmx-admin__inline-form {
  display: flex;
  gap: 8px;
}
.cmx-admin__inline-form input {
  flex: 1 1 auto;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
}
.cmx-admin__chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cmx-admin__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 4px 5px 10px;
  background: var(--surface-alt);
  border-radius: 100px;
  font-size: 12px;
  font-family: ui-monospace, monospace;
}
.cmx-admin__chip button {
  width: 22px; height: 22px;
  border: 0;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-muted);
}
.cmx-admin__chip button:hover { background: var(--accent); color: #fff; }

.cmx-admin__empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* ---------- Admin tables ---------- */
.cmx-admin__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.cmx-admin__table thead th {
  text-align: left;
  padding: 10px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  font-weight: 600;
}
.cmx-admin__table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.cmx-admin__table tbody tr:hover { background: rgba(119,132,116,0.05); }
.cmx-admin__name { font-weight: 600; color: var(--text); }
.cmx-admin__sub { color: var(--text-muted); font-size: 12px; margin-top: 2px; }
.cmx-admin__motivo { max-width: 320px; color: var(--text-muted); }
.cmx-admin__actions-col {
  white-space: nowrap;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.cmx-admin__table .cmx-tag { white-space: nowrap; }
.cmx-admin__table code {
  background: var(--surface-alt);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
}

/* ---------- Status feedback en formulario (parser Maps) ---------- */
.cmx-form__status {
  font-size: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  background: var(--surface-alt);
  color: var(--text-muted);
}
.cmx-form__status--ok    { background: #D9EFD9; color: #2E5C2E; border: 1px solid #B5DCB5; }
.cmx-form__status--error { background: #F7D4CF; color: #8B2D22; border: 1px solid #E5B0AA; }
.cmx-form__label-block { font-weight: 600; font-size: 12px; color: var(--text); margin-bottom: 4px; display: block; }
.cmx-form__label-block small { font-weight: 400; color: var(--text-faint); }

/* Encabezados de sección dentro del form */
.cmx-form__section-title {
  margin: 12px 0 4px 0;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-dark);
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.cmx-form__section-title:first-of-type { border-top: 0; padding-top: 0; }
.cmx-form__section-title small {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 6px;
}

/* ---------- Mini-mapa de confirmación ---------- */
.cmx-mini-map {
  width: 100%;
  height: 180px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-top: 6px;
}

/* ---------- Checkboxes de categorías (multi-selección) ---------- */
.cmx-cat-checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 6px;
  margin-top: 4px;
}
.cmx-cat-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 400;
  user-select: none;
  background: #fff;
  transition: background 0.15s, border-color 0.15s;
}
.cmx-cat-check:hover { background: var(--surface-alt); }
.cmx-cat-check input { accent-color: var(--accent); margin: 0; }
.cmx-cat-check input:checked + span { color: var(--accent-dark); font-weight: 600; }
.cmx-cat-check:has(input:checked) {
  background: var(--accent-soft);
  border-color: var(--accent);
}

/* Variante compacta para cobertura de estados (son 32, no ocupemos tanto) */
.cmx-cat-checks--small {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 4px;
  max-height: 280px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
}
.cmx-cat-checks--small .cmx-cat-check {
  padding: 4px 8px;
  font-size: 12px;
}

/* Galería en ficha de empresa */
.cmx-ficha__gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 12px;
}
.cmx-ficha__gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
}

/* ---------- Productos checkboxes ---------- */
.cmx-productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 6px;
}
.cmx-productos-group {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px 10px;
  margin: 0;
}
.cmx-productos-group legend {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  padding: 0 4px;
}
.cmx-prod-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 400;
  user-select: none;
  transition: background 0.15s;
}
.cmx-prod-chip:hover { background: var(--surface-alt); }
.cmx-prod-chip input { accent-color: var(--accent); margin: 0; }
.cmx-prod-chip span { flex: 1 1 auto; }
.cmx-prod-chip--warn {
  background: #FFF3D6;
  border: 1px solid #F0DCA0;
}
.cmx-prod-chip--warn:hover { background: #FCE9B7; }
.cmx-prod-chip__flag {
  flex: 0 0 auto;
  font-size: 14px;
  color: #B23B2D;
}

/* ---------- Tag warn (productos en común con Prolífica) ---------- */
.cmx-tag--warn {
  background: #FFE4E1;
  color: #8B2D22;
  border: 1px solid #F0BFB5;
  font-weight: 500;
}

/* ---------- Stat alert ---------- */
.cmx-stat--alert {
  background: linear-gradient(135deg, #FFF3D6 0%, #FFE4E1 100%);
  border-color: #F0DCA0;
}
.cmx-stat--alert .cmx-stat__num { color: #8B2D22; }

/* ---------- Form success ---------- */
.cmx-form__success {
  margin: 0;
  padding: 10px 12px;
  background: #D9EFD9;
  border: 1px solid #B5DCB5;
  color: #2E5C2E;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

/* ---------- Subhead en admin ---------- */
.cmx-admin__subhead {
  margin: 24px 18px 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}

/* ---------- Caja de contraseña temporal ---------- */
.cmx-temp-pwd {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: #FFF3D6;
  border: 2px solid #F0DCA0;
  border-radius: var(--radius);
  margin: 12px 0;
}
.cmx-temp-pwd code {
  flex: 1 1 auto;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #1F1B16;
  user-select: all;
  background: transparent;
  padding: 0;
}

/* ---------- Filas con alerta de competencia ---------- */
.cmx-admin__table tr.cmx-row--warn {
  background: #FFF8EE !important;
  border-left: 3px solid #B85A3D;
}
.cmx-admin__table tr.cmx-row--warn:hover { background: #FFEED5 !important; }

/* ---------- Mobile ajustes admin ---------- */
@media (max-width: 700px) {
  .cmx-admin { padding: 16px 12px 48px; }
  .cmx-admin__header { flex-direction: column; }
  .cmx-admin__table { font-size: 12px; }
  .cmx-admin__table thead { display: none; }
  .cmx-admin__table tbody, .cmx-admin__table tbody tr { display: block; }
  .cmx-admin__table tbody td {
    display: block;
    border-bottom: 0;
    padding: 4px 16px;
  }
  .cmx-admin__table tbody tr {
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
  }
  .cmx-userchip__name { display: none; }
}

/* =============================================================================
   MOBILE EXPERIENCE — hamburger + sidebar drawer + ficha fullscreen
   ============================================================================= */

/* Hamburger button: visible solo en móvil */
.cmx-hamburger {
  display: none;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 0;
  padding: 12px 10px;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  margin-right: 4px;
  border-radius: 8px;
  transition: background 0.15s;
}
.cmx-hamburger:hover { background: var(--surface-alt); }
.cmx-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}
/* Animación del hamburger a "X" cuando el sidebar está abierto */
.cmx-hamburger.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.cmx-hamburger.is-open span:nth-child(2) { opacity: 0; }
.cmx-hamburger.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Close button dentro del sidebar drawer (solo móvil) */
.cmx-sidebar__close {
  display: none;
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 0;
  font-size: 26px;
  line-height: 1;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  z-index: 2;
}
.cmx-sidebar__close:hover { background: var(--surface-alt); color: var(--text); }

/* Backdrop oscuro detrás del drawer */
.cmx-sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(42, 46, 42, 0.55);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}
.cmx-sidebar-backdrop[hidden] { display: none; }
.cmx-sidebar-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* === BREAKPOINT MÓVIL: hasta 760px === */
@media (max-width: 760px) {
  :root {
    --header-h: 56px;
  }

  /* Header más compacto */
  .cmx-header { padding: 0 12px; }
  .cmx-header__text h1 { font-size: 16px; }
  .cmx-header__text p { display: none; } /* subtítulo se oculta */
  .cmx-logo { width: 36px; height: 36px; flex: 0 0 36px; }
  .cmx-logo__svg { width: 20px; height: 20px; }
  .cmx-header__brand { gap: 8px; }
  .cmx-hamburger { display: flex; }

  /* Nav del header: solo mostrar admin button y user chip, ocultar links texto */
  .cmx-header__nav { gap: 6px; }
  .cmx-nav-link { display: none; }
  .cmx-userchip__name { display: none; }
  .cmx-userchip { padding: 4px 8px 4px 4px; }

  /* Sidebar en móvil: drawer deslizable desde la izquierda */
  .cmx-sidebar {
    position: fixed;
    top: var(--header-h);
    left: 0;
    bottom: 0;
    width: 86vw;
    max-width: 340px;
    z-index: 999;
    transform: translateX(-100%);
    transition: transform 0.25s ease-out;
    box-shadow: 8px 0 32px -8px rgba(0,0,0,0.25);
    overflow-y: auto;
  }
  .cmx-sidebar.is-open {
    transform: translateX(0);
  }
  .cmx-sidebar__close { display: block; }

  /* Map ocupa toda la pantalla en móvil (sidebar va encima cuando abre) */
  .cmx-main { display: block; height: calc(100vh - var(--header-h)); }
  .cmx-map-wrap { width: 100%; height: 100%; }

  /* Ficha modal a pantalla completa en móvil */
  .cmx-modal__panel--ficha,
  .cmx-modal__panel {
    max-width: 100%;
    width: 100%;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
    padding: 56px 20px 24px;
  }
  .cmx-modal { padding: 0; }
  .cmx-modal__close {
    top: 8px; right: 8px;
    width: 40px; height: 40px;
    background: var(--surface-alt);
  }

  /* Modal de waitlist y signup: respiro */
  .cmx-form__row--two { grid-template-columns: 1fr; gap: 12px; }

  /* CTA del gate más prominente en móvil */
  .cmx-gate__cta { flex-direction: column; align-items: stretch; }
  .cmx-gate__cta .cmx-btn { width: 100%; justify-content: center; }
  .cmx-gate__title { font-size: clamp(28px, 9vw, 40px); }
  .cmx-gate__inner { padding: 32px 20px; }
  .cmx-gate__values { padding: 22px; }

  /* Tabla admin scroll horizontal en móvil */
  .cmx-admin__table { display: block; overflow-x: auto; white-space: nowrap; }

  /* Welcome strip más compacto */
  .cmx-welcome { padding: 12px 14px; }
  .cmx-welcome__greeting { font-size: 16px; }

  /* Buscador con padding optimizado para touch */
  #cmx-search-input {
    padding: 16px 14px 16px 44px;
    font-size: 16px; /* >=16px evita zoom auto de iOS */
  }

  /* Botones del CTA touch friendly */
  .cmx-btn { min-height: 40px; padding: 10px 16px; }
  .cmx-btn--sm { min-height: 32px; }

  /* OTP input a tamaño completo en móvil */
  .cmx-otp-input { font-size: 22px !important; letter-spacing: 4px; }
}

/* Pantallas muy chicas (iPhone SE) */
@media (max-width: 380px) {
  .cmx-header__text h1 { font-size: 14px; }
  .cmx-gate__title { font-size: 26px; }
}

