@import url('../fonts/fonts.css');

/* ==========================================================================
   Hostal Familiar Rivalta — Sistema de diseño
   --------------------------------------------------------------------------
   Paleta extraída de las fotografías reales del hostal:
     · Verde esmeralda  -> fachada colonial de 1928 (Colón #230)
     · Turquesa         -> columnas y paredes del pasillo interior
     · Crema / cal      -> molduras, ventanas y ropa de cama
     · Terracota        -> pisos ajedrezados del patio
     · Verde follaje    -> jardín interior y plantas colgantes
     · Ámbar solar      -> sistema fotovoltaico (diferencial del hostal)
   Tipografías: Cormorant Garamond (títulos, aire colonial) + Karla (texto).
   Sin frameworks ni compilación: se sirve tal cual desde /public.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Marca: verdes de la fachada */
  --emerald-50:  #eef6f1;
  --emerald-100: #d5e9de;
  --emerald-200: #aed4c2;
  --emerald-300: #7fb69c;
  --emerald-400: #4f9377;
  --emerald-500: #2f7359;
  --emerald-600: #1f5c45;
  --emerald-700: #1a4a39;
  --emerald-800: #143a2c;
  --emerald-900: #0e2a20;

  /* Acento: turquesa del pasillo */
  --turquoise-50:  #edfafc;
  --turquoise-100: #d3f1f6;
  --turquoise-200: #a8e3ec;
  --turquoise-300: #74cfdf;
  --turquoise-400: #45b8cc;
  --turquoise-500: #2b9cb2;
  --turquoise-600: #1f7d91;
  --turquoise-700: #1b6474;
  --turquoise-800: #17505d;

  /* Terciario: terracota del piso */
  --clay-50:  #fdf6f1;
  --clay-100: #f8e6da;
  --clay-200: #efc9b0;
  --clay-300: #e0a880;
  --clay-400: #cd8557;
  --clay-500: #b56840;
  --clay-600: #95512f;

  /* Neutros cálidos: crema y cal */
  --cream:      #fbf9f4;
  --sand-50:    #f6f3ec;
  --sand-100:   #ede8dd;
  --sand-200:   #ded7c8;
  --sand-300:   #c5bcab;
  --sand-400:   #a29885;
  --sand-500:   #7d7466;
  --ink-600:    #5a5347;
  --ink-700:    #3d382f;
  --ink-800:    #2a261f;
  --ink-900:    #1a1713;

  /* Semánticos */
  --success-bg: #e6f4ec;  --success-fg: #1f6b45;  --success-bd: #a9d8bd;
  --warning-bg: #fdf3e0;  --warning-fg: #8a5a12;  --warning-bd: #efd39a;
  --danger-bg:  #fdecea;  --danger-fg:  #94302a;  --danger-bd:  #f0b8b3;
  --info-bg:    #e8f4fa;  --info-fg:    #1c5a78;  --info-bd:    #a9d2e9;
  --sky-bg:     #e9f5fa;  --sky-fg:     #17566b;  --sky-bd:     #a6d5e6;

  /* Tipografía */
  --font-display: 'Cormorant Garamond', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --font-body: 'Karla', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;
  --text-6xl:  3.75rem;
  --text-7xl:  4.5rem;

  /* Espaciado y medidas */
  --container: 1200px;
  --container-narrow: 760px;
  --radius-sm: 4px;
  --radius:    8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --radius-full: 999px;

  /* Sombras */
  --shadow-xs: 0 1px 2px rgba(26, 23, 19, 0.05);
  --shadow-sm: 0 1px 3px rgba(26, 23, 19, 0.08), 0 1px 2px rgba(26, 23, 19, 0.04);
  --shadow:    0 4px 12px rgba(26, 23, 19, 0.08), 0 2px 4px rgba(26, 23, 19, 0.04);
  --shadow-md: 0 10px 24px rgba(26, 23, 19, 0.10), 0 4px 8px rgba(26, 23, 19, 0.05);
  --shadow-lg: 0 20px 44px rgba(26, 23, 19, 0.14), 0 8px 16px rgba(26, 23, 19, 0.06);

  --header-height: 76px;
  --transition: 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* --------------------------------------------------------------------------
   2. Reset y base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--ink-800);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, picture, video, canvas, svg { display: block; max-width: 100%; }
img { height: auto; }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--emerald-900);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 5.5vw, var(--text-6xl)); }
h2 { font-size: clamp(1.75rem, 3.8vw, var(--text-4xl)); }
h3 { font-size: clamp(1.375rem, 2.4vw, var(--text-2xl)); }
h4 { font-size: var(--text-xl); font-weight: 600; }

p { text-wrap: pretty; }

a { color: var(--emerald-600); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--emerald-700); }

ul, ol { padding-left: 1.25rem; }

::selection { background: var(--turquoise-200); color: var(--emerald-900); }

:focus-visible {
  outline: 3px solid var(--turquoise-400);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Utilidad para lectores de pantalla */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; top: -100px; left: 16px; z-index: 100;
  background: var(--emerald-700); color: #fff; padding: 12px 20px;
  border-radius: 0 0 var(--radius) var(--radius); font-weight: 600;
  transition: top var(--transition);
}
.skip-link:focus { top: 0; color: #fff; }

/* --------------------------------------------------------------------------
   3. Layout
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}
.container-narrow { max-width: var(--container-narrow); }

.section { padding-block: clamp(56px, 8vw, 104px); }
.section-sm { padding-block: clamp(36px, 5vw, 64px); }
.section-tight { padding-block: clamp(28px, 4vw, 48px); }

.section--sand { background: var(--sand-50); }
.section--cream { background: var(--cream); }
.section--emerald {
  background: var(--emerald-800);
  color: var(--emerald-50);
}
.section--emerald h1, .section--emerald h2, .section--emerald h3 { color: #fff; }
.section--tint {
  background: linear-gradient(180deg, var(--emerald-50) 0%, var(--cream) 100%);
}

/* Rejillas */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* Rejilla de dos columnas desiguales (formulario + resumen, texto + foto).
   En pantallas pequeñas colapsa a una sola columna. */
.grid-split {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 44px);
  align-items: start;
}
.grid-split--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 960px) {
  .grid-split, .grid-split--even { grid-template-columns: minmax(0, 1fr); }
}

.stack > * + * { margin-top: var(--stack-gap, 16px); }
.cluster { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cluster-between { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.center { text-align: center; }
.center-x { margin-inline: auto; }

/* --------------------------------------------------------------------------
   4. Cabecera de sección
   -------------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--turquoise-600);
}
.eyebrow::before {
  content: '';
  width: 26px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}
.section--emerald .eyebrow { color: var(--turquoise-300); }

.section-head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }
.section-head p { margin-top: 14px; font-size: var(--text-lg); color: var(--ink-600); }
.section--emerald .section-head p { color: var(--emerald-100); }

.lead { font-size: var(--text-lg); color: var(--ink-600); }
.muted { color: var(--ink-600); }
.small { font-size: var(--text-sm); }
.tiny { font-size: var(--text-xs); }

/* --------------------------------------------------------------------------
   5. Botones
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 26px;
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition),
              background-color var(--transition), border-color var(--transition), color var(--transition);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn--primary {
  background: var(--emerald-600);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--emerald-700); color: #fff; box-shadow: var(--shadow-md); }

.btn--accent {
  background: var(--turquoise-500);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--accent:hover { background: var(--turquoise-600); color: #fff; box-shadow: var(--shadow-md); }

.btn--clay {
  background: var(--clay-500);
  color: #fff;
}
.btn--clay:hover { background: var(--clay-600); color: #fff; }

.btn--outline {
  border-color: var(--emerald-600);
  color: var(--emerald-700);
  background: transparent;
}
.btn--outline:hover { background: var(--emerald-600); color: #fff; }

.btn--ghost {
  border-color: var(--sand-200);
  background: #fff;
  color: var(--ink-700);
}
.btn--ghost:hover { border-color: var(--emerald-300); color: var(--emerald-700); }

.btn--light {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
  backdrop-filter: blur(6px);
}
.btn--light:hover { background: #fff; color: var(--emerald-800); }

.btn--white { background: #fff; color: var(--emerald-800); }
.btn--white:hover { background: var(--emerald-50); color: var(--emerald-900); }

.btn--lg { padding: 16px 34px; font-size: var(--text-lg); }
.btn--sm { padding: 9px 18px; font-size: var(--text-sm); }
.btn--block { width: 100%; }
.btn--icon { padding: 10px; border-radius: var(--radius-full); }

.btn:disabled, .btn[aria-disabled='true'] { opacity: 0.55; pointer-events: none; }

/* --------------------------------------------------------------------------
   6. Cabecera del sitio
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 249, 244, 0.94);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--sand-200);
  transition: box-shadow var(--transition), background-color var(--transition);
}
.site-header.is-scrolled { box-shadow: var(--shadow); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: var(--header-height);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  /* El bloque no debe encogerse: si el ancho aprieta, se recorta el menú antes
     que partir el nombre en dos líneas. */
  flex: none;
}

/* Monograma: cuadrado esmeralda con las iniciales en crema.
   Se usa en la cabecera pública, en el portal, en el panel y en el login, para
   que el negocio se reconozca igual en todas partes.
   Un recorte cuadrado de la foto de la fachada a este tamaño no se leía. */
.brand__mark {
  width: 46px; height: 46px; flex: none;
  display: grid; place-items: center;
  border-radius: var(--radius-md);
  background: var(--emerald-700);
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  box-shadow: var(--shadow-xs);
}

/* La foto de la fachada dentro del distintivo: se recorta al cuadrado.
   OJO: a 46 px esta imagen pierde detalle. Si se ve sucia, conviene sustituir
   el archivo por una versión mejor encuadrada (fachada completa o en horizontal). */
.brand__mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* Variantes de tamaño */
.brand__mark--sm { width: 38px; height: 38px; font-size: 1.15rem; }
.brand__mark--lg { width: 56px; height: 56px; font-size: 1.7rem; }
.brand__mark--onDark { background: rgba(255, 255, 255, 0.14); box-shadow: none; }

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 3px;               /* separación real entre nombre y etiqueta */
  min-width: 0;
}

.brand__name {
  font-family: var(--font-display);
  /* Siglas (HFR), no un nombre completo: se les da tamaño de titular y un
     poco de separación entre letras para que respiren. */
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.05;
  color: var(--emerald-800);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* Etiqueta SIN mayúsculas: en mayúsculas y con tracking ocupaba ~150 px y
   competía visualmente con el nombre. Así es más corta y discreta. */
.brand__tag {
  font-size: 0.72rem;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--turquoise-600);
  font-weight: 600;
  white-space: nowrap;
}

/* En pantallas intermedias el menú aprieta: se oculta la etiqueta y el bloque
   queda en una sola línea, mucho más limpio. */
@media (max-width: 1280px) {
  .brand__tag { display: none; }
  .brand__text { gap: 0; }
}

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav__link {
  padding: 9px 14px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-700);
  text-decoration: none;
  /* Que ningún enlace se parta en dos líneas: era lo que hacía que la
     cabecera pareciera desordenada en pantallas intermedias. */
  white-space: nowrap;
  transition: background-color var(--transition), color var(--transition);
}

/* En el rango en que el menú sigue visible pero el ancho aprieta, se ajusta el
   espaciado en lugar de dejar que el navegador comprima y parta el texto. */
@media (min-width: 1025px) and (max-width: 1280px) {
  .site-nav { gap: 0; }
  .site-nav__link { padding: 9px 9px; font-size: 0.82rem; }
  .header-actions { gap: 7px; }
}
.site-nav__link:hover { background: var(--emerald-50); color: var(--emerald-700); }
.site-nav__link.is-active { color: var(--emerald-700); background: var(--emerald-50); }

.header-actions { display: flex; align-items: center; gap: 10px; }

/* Selector de idioma */
.lang-switch { display: flex; border: 1px solid var(--sand-200); border-radius: var(--radius-full); overflow: hidden; }
.lang-switch a {
  padding: 6px 11px;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-600);
  text-decoration: none;
  transition: background-color var(--transition), color var(--transition);
}
.lang-switch a:hover { background: var(--sand-50); }
.lang-switch a.is-active { background: var(--emerald-600); color: #fff; }

/* Menú móvil */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  border: 1px solid var(--sand-200);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
}
.nav-toggle__bars { position: relative; width: 20px; height: 14px; }
.nav-toggle__bars span {
  position: absolute; left: 0; width: 100%; height: 2px;
  background: var(--ink-800); border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle__bars span:nth-child(1) { top: 0; }
.nav-toggle__bars span:nth-child(2) { top: 6px; }
.nav-toggle__bars span:nth-child(3) { top: 12px; }
.nav-toggle[aria-expanded='true'] .nav-toggle__bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded='true'] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded='true'] .nav-toggle__bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1024px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: fixed;
    inset: var(--header-height) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 16px 20px 28px;
    background: var(--cream);
    border-bottom: 1px solid var(--sand-200);
    box-shadow: var(--shadow-lg);
    transform: translateY(-120%);
    transition: transform var(--transition);
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
  }
  .site-nav.is-open { transform: translateY(0); }
  .site-nav__link { padding: 14px 16px; font-size: var(--text-lg); }
  .header-actions .btn--header-cta { display: none; }
}
@media (min-width: 1025px) { .site-nav { position: static; transform: none; } }

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: clamp(560px, 82vh, 800px);
  display: grid;
  align-items: center;
  overflow: hidden;
  background: var(--emerald-900);
  color: #fff;
  isolation: isolate;
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1400ms ease-in-out;
}
.hero__slide.is-active { opacity: 1; }
.hero__slide img { width: 100%; height: 100%; object-fit: cover; }

/* Velo con degradado esmeralda: mantiene legible el texto sobre cualquier foto */
.hero::after {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(105deg, rgba(14, 42, 32, 0.92) 0%, rgba(14, 42, 32, 0.62) 46%, rgba(14, 42, 32, 0.28) 100%),
    linear-gradient(0deg, rgba(14, 42, 32, 0.72) 0%, transparent 45%);
}

.hero__inner { padding-block: clamp(72px, 11vw, 128px); width: 100%; }
.hero__content { max-width: 660px; }
.hero h1 { color: #fff; margin-bottom: 18px; }
.hero h1 em {
  font-style: italic;
  color: var(--turquoise-300);
}
.hero__text {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: rgba(255, 255, 255, 0.9);
  max-width: 56ch;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

.hero__badges { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  backdrop-filter: blur(8px);
}
.hero-badge svg { width: 15px; height: 15px; color: var(--turquoise-300); }

.hero__dots {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}
.hero__dots button {
  width: 34px; height: 4px;
  border: 0; padding: 0;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background-color var(--transition), width var(--transition);
}
.hero__dots button.is-active { background: #fff; width: 52px; }

/* --------------------------------------------------------------------------
   8. Buscador de disponibilidad
   -------------------------------------------------------------------------- */
.search-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 22px;
  border: 1px solid var(--sand-200);
}
.search-card__title {
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--turquoise-600);
  margin-bottom: 14px;
}
.search-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  align-items: end;
}
.search-grid .btn { height: 48px; }

/* Tarjeta flotante sobre el hero */
.hero__search {
  margin-top: -46px;
  position: relative;
  z-index: 5;
}
@media (max-width: 640px) { .hero__search { margin-top: 0; } }

/* --------------------------------------------------------------------------
   9. Formularios
   -------------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-700);
}
.field__hint { font-size: var(--text-xs); color: var(--ink-600); }
.field__error { font-size: var(--text-xs); color: var(--danger-fg); font-weight: 600; }

.input, .select, .textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--sand-300);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink-800);
  transition: border-color var(--transition), box-shadow var(--transition);
  min-height: 48px;
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--sand-400); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--turquoise-400);
  box-shadow: 0 0 0 3px rgba(69, 184, 204, 0.18);
  outline: none;
}
.input--error, .select--error, .textarea--error { border-color: var(--danger-bd); }
.textarea { min-height: 130px; resize: vertical; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a5347' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 40px;
}

.checkbox, .radio { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.checkbox input, .radio input {
  width: 20px; height: 20px; flex: none; margin-top: 2px;
  accent-color: var(--emerald-600);
}

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.form-grid--full { grid-column: 1 / -1; }

/* Honeypot anti-spam: invisible para personas, visible para bots */
.honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px; overflow: hidden;
}

/* --------------------------------------------------------------------------
   10. Tarjetas
   -------------------------------------------------------------------------- */
.card {
  background: #fff;
  border: 1px solid var(--sand-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card--hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--emerald-200); }
.card__body { padding: 22px; }
.card__media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--sand-100); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms ease; }
.card--hover:hover .card__media img { transform: scale(1.04); }
.card__title { font-size: var(--text-xl); }
.card__title a { color: inherit; text-decoration: none; }
.card__title a:hover { color: var(--emerald-600); }
.card__footer {
  padding: 16px 22px;
  border-top: 1px solid var(--sand-100);
  background: var(--sand-50);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}

/* Tarjeta de habitación */
.room-card__price {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--emerald-700);
  line-height: 1;
}
.room-card__price small { font-family: var(--font-body); font-size: var(--text-sm); font-weight: 600; color: var(--ink-600); }
.room-card__meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; font-size: var(--text-sm); color: var(--ink-600); }
.room-card__meta span { display: inline-flex; align-items: center; gap: 6px; }
.room-card__meta svg { width: 16px; height: 16px; color: var(--turquoise-500); }

.ribbon {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  padding: 6px 13px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.94);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--emerald-700);
  box-shadow: var(--shadow-sm);
}
.ribbon--clay { background: var(--clay-500); color: #fff; }
.ribbon--solar {
  background: linear-gradient(120deg, #f6c14b, #e8952c);
  color: #3d2404;
  display: inline-flex; align-items: center; gap: 6px;
}

/* --------------------------------------------------------------------------
   11. Insignias y píldoras
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px;
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge svg { width: 13px; height: 13px; }
.badge--success { background: var(--success-bg); color: var(--success-fg); border-color: var(--success-bd); }
.badge--warning { background: var(--warning-bg); color: var(--warning-fg); border-color: var(--warning-bd); }
.badge--danger  { background: var(--danger-bg);  color: var(--danger-fg);  border-color: var(--danger-bd); }
.badge--info    { background: var(--info-bg);    color: var(--info-fg);    border-color: var(--info-bd); }
.badge--sky     { background: var(--sky-bg);     color: var(--sky-fg);     border-color: var(--sky-bd); }
.badge--slate   { background: var(--sand-100);   color: var(--ink-600);    border-color: var(--sand-200); }
.badge--emerald { background: var(--emerald-50); color: var(--emerald-700); border-color: var(--emerald-200); }
.badge--amber   { background: var(--warning-bg); color: var(--warning-fg); border-color: var(--warning-bd); }
.badge--rose    { background: var(--danger-bg);  color: var(--danger-fg);  border-color: var(--danger-bd); }

.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 15px;
  border-radius: var(--radius-full);
  background: #fff;
  border: 1px solid var(--sand-200);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-700);
  text-decoration: none;
  transition: border-color var(--transition), color var(--transition), background-color var(--transition);
}
.pill:hover { border-color: var(--emerald-300); color: var(--emerald-700); background: var(--emerald-50); }
.pill.is-active { background: var(--emerald-600); border-color: var(--emerald-600); color: #fff; }
.pill svg { width: 16px; height: 16px; }

/* --------------------------------------------------------------------------
   12. Franja de confianza / reputación
   -------------------------------------------------------------------------- */
.trust-bar {
  background: var(--emerald-800);
  color: var(--emerald-50);
  padding-block: 18px;
}
.trust-bar__inner {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: center; gap: clamp(20px, 4vw, 56px);
  text-align: center;
}
.trust-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.trust-item span {
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--turquoise-300);
  font-weight: 700;
}
.stars { display: inline-flex; gap: 2px; color: #f0b429; }
.stars svg { width: 16px; height: 16px; }

/* --------------------------------------------------------------------------
   13. Destacado solar (diferencial del hostal)
   -------------------------------------------------------------------------- */
.solar-panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--emerald-800) 0%, var(--emerald-700) 52%, var(--turquoise-700) 100%);
  color: #fff;
}
.solar-panel__grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: stretch;
}
@media (max-width: 900px) { .solar-panel__grid { grid-template-columns: 1fr; } }
.solar-panel__body { padding: clamp(30px, 5vw, 58px); display: flex; flex-direction: column; justify-content: center; }
.solar-panel__body h2 { color: #fff; }
.solar-panel__body p { color: rgba(255, 255, 255, 0.88); margin-top: 14px; }
.solar-panel__media { min-height: 320px; position: relative; }
.solar-panel__media img { width: 100%; height: 100%; object-fit: cover; }
.solar-panel__media::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--emerald-800) 0%, transparent 55%);
}
@media (max-width: 900px) { .solar-panel__media::after { background: linear-gradient(0deg, var(--emerald-800) 0%, transparent 60%); } }

.solar-stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 28px; }
.solar-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 700;
  line-height: 1;
  color: var(--turquoise-300);
}
.solar-stat span { font-size: var(--text-xs); letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.8); font-weight: 600; }

/* --------------------------------------------------------------------------
   14. Servicios (rejilla de iconos)
   -------------------------------------------------------------------------- */
.amenity {
  display: flex; gap: 15px; align-items: flex-start;
  padding: 18px;
  border-radius: var(--radius-md);
  background: #fff;
  border: 1px solid var(--sand-200);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.amenity:hover { border-color: var(--emerald-200); box-shadow: var(--shadow-sm); }
.amenity__icon {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  border-radius: var(--radius);
  background: var(--emerald-50);
  color: var(--emerald-600);
}
.amenity__icon svg { width: 22px; height: 22px; }
.amenity__name { font-weight: 700; color: var(--ink-800); font-size: var(--text-base); }
.amenity__desc { font-size: var(--text-sm); color: var(--ink-600); margin-top: 2px; }
.amenity__price { font-size: var(--text-sm); font-weight: 700; color: var(--clay-600); margin-top: 4px; }

.amenity--featured .amenity__icon { background: linear-gradient(135deg, #f6c14b, #e8952c); color: #3d2404; }

/* --------------------------------------------------------------------------
   15. Galería
   -------------------------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.gallery-item {
  position: relative;
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--sand-100);
  cursor: zoom-in;
  border: 0; padding: 0;
  width: 100%;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms ease, filter var(--transition); }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item__caption {
  position: absolute; inset: auto 0 0 0;
  padding: 26px 16px 14px;
  background: linear-gradient(0deg, rgba(14, 42, 32, 0.88), transparent);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 600;
  text-align: left;
  opacity: 0;
  transition: opacity var(--transition);
}
.gallery-item:hover .gallery-item__caption, .gallery-item:focus-visible .gallery-item__caption { opacity: 1; }
.gallery-item--wide { grid-column: span 2; }
.gallery-item--tall { grid-row: span 2; aspect-ratio: 3 / 4; }
@media (max-width: 640px) {
  .gallery-item--wide, .gallery-item--tall { grid-column: auto; grid-row: auto; aspect-ratio: 4 / 3; }
}

/* Visor (lightbox) */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(14, 42, 32, 0.95);
  padding: 20px;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 100%; max-height: 88vh; border-radius: var(--radius); object-fit: contain; }
.lightbox__close, .lightbox__prev, .lightbox__next {
  position: absolute;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.12);
  color: #fff; cursor: pointer;
  transition: background-color var(--transition);
}
.lightbox__close:hover, .lightbox__prev:hover, .lightbox__next:hover { background: rgba(255, 255, 255, 0.25); }
.lightbox__close { top: 20px; right: 20px; }
.lightbox__prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 20px; top: 50%; transform: translateY(-50%); }
.lightbox__caption {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.9); font-size: var(--text-sm); text-align: center; max-width: 90%;
}

/* --------------------------------------------------------------------------
   16. Almanaque / calendario
   -------------------------------------------------------------------------- */
.calendar-wrap { overflow-x: auto; border: 1px solid var(--sand-200); border-radius: var(--radius-md); background: #fff; }
.calendar { border-collapse: collapse; width: 100%; min-width: 880px; }
.calendar th, .calendar td { border: 1px solid var(--sand-100); padding: 0; }
.calendar thead th {
  padding: 10px 6px;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-600);
  background: var(--sand-50);
  text-align: center;
}
.calendar thead th.is-weekend { color: var(--clay-600); }
.calendar__room {
  position: sticky; left: 0; z-index: 2;
  padding: 12px 14px;
  background: #fff;
  border-right: 2px solid var(--sand-200);
  min-width: 150px;
  text-align: left;
}
.calendar__room a { font-weight: 700; color: var(--emerald-700); text-decoration: none; font-size: var(--text-sm); }
.calendar__room small { display: block; color: var(--ink-600); font-size: var(--text-xs); font-weight: 600; }

.cal-day {
  display: block;
  min-height: 42px;
  padding: 5px 4px;
  text-align: center;
  font-size: var(--text-xs);
  font-weight: 600;
  text-decoration: none;
  color: var(--ink-700);
  position: relative;
  transition: background-color var(--transition);
}
.cal-day__num { display: block; font-size: var(--text-sm); font-weight: 700; }
.cal-day--available { background: #fff; }
.cal-day--available:hover { background: var(--emerald-50); }
.cal-day--booked {
  background: var(--emerald-100);
  color: var(--emerald-800);
  cursor: not-allowed;
}
.cal-day--blocked {
  background: repeating-linear-gradient(45deg, var(--sand-100), var(--sand-100) 5px, var(--sand-200) 5px, var(--sand-200) 10px);
  color: var(--ink-600);
  cursor: not-allowed;
}
.cal-day--past { background: var(--sand-50); color: var(--sand-400); }
.cal-day--today { box-shadow: inset 0 0 0 2px var(--turquoise-500); }

.calendar-legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 16px; font-size: var(--text-sm); color: var(--ink-600); }
.calendar-legend span { display: inline-flex; align-items: center; gap: 8px; }
.calendar-legend i { width: 18px; height: 18px; border-radius: 4px; border: 1px solid var(--sand-200); display: inline-block; }

/* --------------------------------------------------------------------------
   17. Pasos / proceso
   -------------------------------------------------------------------------- */
.steps { counter-reset: step; display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.step { position: relative; padding-top: 8px; }
.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid; place-items: center;
  width: 40px; height: 40px;
  margin-bottom: 14px;
  border-radius: var(--radius-full);
  background: var(--emerald-600);
  color: #fff;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
}
.step h3 { font-size: var(--text-lg); font-family: var(--font-body); font-weight: 700; }
.step p { color: var(--ink-600); font-size: var(--text-sm); margin-top: 6px; }

/* --------------------------------------------------------------------------
   18. Testimonios
   -------------------------------------------------------------------------- */
.quote {
  background: #fff;
  border: 1px solid var(--sand-200);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex; flex-direction: column; gap: 14px;
  height: 100%;
}
.quote__text { font-size: var(--text-base); color: var(--ink-700); font-style: italic; flex: 1; }
.quote__author { display: flex; align-items: center; gap: 12px; }
.quote__avatar {
  width: 42px; height: 42px; flex: none;
  border-radius: var(--radius-full);
  background: var(--emerald-100);
  color: var(--emerald-700);
  display: grid; place-items: center;
  font-weight: 700;
}
.quote__name { font-weight: 700; font-size: var(--text-sm); }
.quote__meta { font-size: var(--text-xs); color: var(--ink-600); }

/* --------------------------------------------------------------------------
   19. Blog
   -------------------------------------------------------------------------- */
.post-card__meta {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  font-size: var(--text-xs); color: var(--ink-600); font-weight: 600;
}
.post-body { font-size: var(--text-lg); line-height: 1.75; color: var(--ink-700); }
.post-body > * + * { margin-top: 1.15em; }
.post-body h2 { margin-top: 1.8em; font-size: var(--text-3xl); }
.post-body h3 { margin-top: 1.5em; font-size: var(--text-2xl); }
.post-body ul, .post-body ol { padding-left: 1.4rem; }
.post-body li + li { margin-top: 0.4em; }
.post-body img { border-radius: var(--radius); margin-block: 1.5em; }
.post-body blockquote {
  border-left: 4px solid var(--turquoise-400);
  background: var(--turquoise-50);
  padding: 16px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
}

/* --------------------------------------------------------------------------
   20. Tablas
   -------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--sand-200); border-radius: var(--radius-md); background: #fff; }
.table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.table th, .table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid var(--sand-100); }
.table thead th {
  background: var(--sand-50);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-600);
  white-space: nowrap;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--sand-50); }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table--compact th, .table--compact td { padding: 8px 12px; }

/* --------------------------------------------------------------------------
   21. Alertas
   -------------------------------------------------------------------------- */
.alert {
  display: flex; gap: 13px;
  padding: 15px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  line-height: 1.55;
}
.alert svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.alert__title { font-weight: 700; }
.alert--success { background: var(--success-bg); color: var(--success-fg); border-color: var(--success-bd); }
.alert--warning { background: var(--warning-bg); color: var(--warning-fg); border-color: var(--warning-bd); }
.alert--danger  { background: var(--danger-bg);  color: var(--danger-fg);  border-color: var(--danger-bd); }
.alert--info    { background: var(--info-bg);    color: var(--info-fg);    border-color: var(--info-bd); }
.alert--solar {
  background: linear-gradient(120deg, #fdf6e3, #fdeccd);
  color: #7a4c07;
  border-color: #f0d59a;
}
.alert--solar svg { color: #d98b0f; }

/* --------------------------------------------------------------------------
   22. Cuenta / factura
   -------------------------------------------------------------------------- */
.summary-list { display: flex; flex-direction: column; gap: 2px; }
.summary-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--sand-200);
}
.summary-row:last-child { border-bottom: 0; }
.summary-row span:first-child { color: var(--ink-600); }
.summary-row .amount { font-variant-numeric: tabular-nums; font-weight: 700; }
.summary-row--total {
  border-top: 2px solid var(--emerald-700);
  border-bottom: 0;
  margin-top: 8px;
  padding-top: 14px;
  font-size: var(--text-xl);
}
.summary-row--total span:first-child { font-weight: 700; color: var(--ink-800); }
.summary-row--total .amount { font-family: var(--font-display); font-size: var(--text-3xl); color: var(--emerald-700); }
.amount--negative { color: var(--success-fg); }
.amount--positive { color: var(--ink-800); }

/* --------------------------------------------------------------------------
   23. Chat
   -------------------------------------------------------------------------- */
.chat { display: grid; grid-template-columns: 320px 1fr; gap: 22px; align-items: start; }
@media (max-width: 900px) { .chat { grid-template-columns: 1fr; } }

.chat-thread {
  display: block; padding: 15px;
  border: 1px solid var(--sand-200);
  border-radius: var(--radius);
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition), background-color var(--transition);
}
.chat-thread:hover { border-color: var(--emerald-300); background: var(--emerald-50); }
.chat-thread.is-unread { border-left: 4px solid var(--turquoise-500); }
.chat-thread__subject { font-weight: 700; font-size: var(--text-sm); color: var(--ink-800); }
.chat-thread__preview { font-size: var(--text-xs); color: var(--ink-600); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-thread__meta { font-size: var(--text-xs); color: var(--sand-500); margin-top: 6px; }

.chat-window {
  display: flex; flex-direction: column;
  border: 1px solid var(--sand-200);
  border-radius: var(--radius-md);
  background: #fff;
  overflow: hidden;
  min-height: 460px;
}
.chat-window__head { padding: 15px 20px; border-bottom: 1px solid var(--sand-200); background: var(--sand-50); }
.chat-window__body {
  flex: 1; padding: 20px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px;
  background: var(--cream);
  max-height: 56vh;
}
.chat-window__foot { padding: 15px 20px; border-top: 1px solid var(--sand-200); background: #fff; }

.bubble { max-width: 76%; padding: 11px 15px; border-radius: var(--radius-md); font-size: var(--text-sm); line-height: 1.55; }
.bubble__author { font-size: var(--text-xs); font-weight: 700; margin-bottom: 4px; opacity: 0.85; }
.bubble__time { font-size: 0.68rem; opacity: 0.7; margin-top: 5px; display: block; }
.bubble--guest { align-self: flex-end; background: var(--emerald-600); color: #fff; border-bottom-right-radius: 4px; }
.bubble--staff { align-self: flex-start; background: #fff; color: var(--ink-800); border: 1px solid var(--sand-200); border-bottom-left-radius: 4px; }
.bubble--staff .bubble__author { color: var(--turquoise-600); }

/* --------------------------------------------------------------------------
   24. Panel de administración
   -------------------------------------------------------------------------- */
.admin { display: grid; grid-template-columns: 258px 1fr; min-height: 100vh; background: var(--sand-50); }
@media (max-width: 1024px) { .admin { grid-template-columns: 1fr; } }

.admin-side {
  background: var(--emerald-900);
  color: var(--emerald-100);
  padding: 20px 16px;
  display: flex; flex-direction: column; gap: 6px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
@media (max-width: 1024px) {
  .admin-side {
    position: fixed; inset: 0 auto 0 0; z-index: 60;
    width: 270px; transform: translateX(-100%);
    transition: transform var(--transition);
  }
  .admin-side.is-open { transform: translateX(0); }
}
.admin-brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 20px; text-decoration: none; }
.admin-brand img { width: 38px; height: 38px; border-radius: var(--radius); object-fit: cover; }
.admin-brand .brand__mark { flex: none; }
.admin-brand strong { font-family: var(--font-display); font-size: 1.1rem; color: #fff; line-height: 1.1; display: block; }
.admin-brand small { font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--turquoise-300); font-weight: 700; }

.admin-nav { display: flex; flex-direction: column; gap: 2px; }
.admin-nav__group {
  padding: 16px 10px 6px;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--emerald-300);
  font-weight: 700;
}
.admin-nav__link {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--emerald-100);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 600;
  transition: background-color var(--transition), color var(--transition);
}
.admin-nav__link:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.admin-nav__link.is-active { background: var(--emerald-700); color: #fff; }
.admin-nav__link svg { width: 18px; height: 18px; flex: none; opacity: 0.9; }
.admin-nav__count {
  margin-left: auto;
  background: var(--clay-500);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--radius-full);
}

.admin-main { display: flex; flex-direction: column; min-width: 0; }
.admin-top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 24px;
  background: #fff;
  border-bottom: 1px solid var(--sand-200);
  position: sticky; top: 0; z-index: 30;
}
.admin-top__title { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 700; color: var(--emerald-900); }
.admin-body { padding: 24px; flex: 1; }
@media (max-width: 640px) { .admin-body { padding: 16px; } }

.admin-menu-toggle {
  display: none;
  width: 42px; height: 42px;
  align-items: center; justify-content: center;
  border: 1px solid var(--sand-200); border-radius: var(--radius);
  background: #fff; cursor: pointer;
}
@media (max-width: 1024px) { .admin-menu-toggle { display: inline-flex; } }

/* Tarjeta de estadística */
.stat {
  background: #fff;
  border: 1px solid var(--sand-200);
  border-radius: var(--radius-md);
  padding: 18px;
}
.stat__label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-600);
  display: flex; align-items: center; gap: 7px;
}
.stat__value {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--emerald-800);
  line-height: 1.1;
  margin-top: 6px;
}
.stat__hint { font-size: var(--text-xs); color: var(--ink-600); margin-top: 4px; }
.stat--accent { border-left: 4px solid var(--turquoise-500); }
.stat--warn { border-left: 4px solid var(--clay-500); }

/* Panel con encabezado */
.panel { background: #fff; border: 1px solid var(--sand-200); border-radius: var(--radius-md); overflow: hidden; }
.panel__head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--sand-200);
  background: var(--sand-50);
}
.panel__title { font-size: var(--text-base); font-weight: 700; color: var(--ink-800); display: flex; align-items: center; gap: 9px; }
.panel__title svg { width: 18px; height: 18px; color: var(--turquoise-600); }
.panel__body { padding: 20px; }
.panel__body--flush { padding: 0; }

/* Barra de progreso (ocupación) */
.progress { height: 8px; background: var(--sand-100); border-radius: var(--radius-full); overflow: hidden; }
.progress__bar { height: 100%; background: linear-gradient(90deg, var(--emerald-500), var(--turquoise-500)); border-radius: inherit; }

/* Pestañas */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--sand-200); margin-bottom: 20px; }
.tabs a, .tabs button {
  padding: 11px 16px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-600);
  text-decoration: none;
  border: 0; background: none; cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tabs a:hover, .tabs button:hover { color: var(--emerald-700); }
.tabs a.is-active, .tabs button.is-active { color: var(--emerald-700); border-bottom-color: var(--emerald-600); }

/* Filtros */
.filters {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end;
  padding: 16px; background: #fff;
  border: 1px solid var(--sand-200); border-radius: var(--radius-md);
  margin-bottom: 18px;
}
.filters .field { min-width: 150px; flex: 1 1 150px; }

/* Paginación */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 26px; }
.pagination a, .pagination span {
  min-width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--sand-200);
  border-radius: var(--radius);
  background: #fff;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-700);
  text-decoration: none;
}
.pagination a:hover { border-color: var(--emerald-300); color: var(--emerald-700); }
.pagination .is-active { background: var(--emerald-600); border-color: var(--emerald-600); color: #fff; }
.pagination .is-disabled { opacity: 0.45; }

/* Migas de pan */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: var(--text-sm); color: var(--ink-600); margin-bottom: 18px; }
.breadcrumb a { color: var(--emerald-700); text-decoration: none; font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span[aria-hidden] { color: var(--sand-400); }

/* --------------------------------------------------------------------------
   25. Pie de página
   -------------------------------------------------------------------------- */
.site-footer { background: var(--emerald-900); color: var(--emerald-100); margin-top: auto; }
.site-footer__main { padding-block: clamp(44px, 6vw, 68px); }
.site-footer h3 { color: #fff; font-size: var(--text-lg); font-family: var(--font-body); font-weight: 700; margin-bottom: 16px; }
.site-footer a { color: var(--emerald-100); text-decoration: none; font-size: var(--text-sm); }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
  gap: 34px;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } }
.site-footer ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.footer-contact { display: flex; flex-direction: column; gap: 12px; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact svg { width: 17px; height: 17px; flex: none; margin-top: 3px; color: var(--turquoise-300); }
.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-block: 20px;
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: center; justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--emerald-300);
}
.social-links { display: flex; gap: 10px; }
.social-links a {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  transition: background-color var(--transition), border-color var(--transition);
}
.social-links a:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.4); }
.social-links svg { width: 18px; height: 18px; }

/* --------------------------------------------------------------------------
   26. WhatsApp flotante
   -------------------------------------------------------------------------- */
.whatsapp-float {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 45;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 20px;
  border-radius: var(--radius-full);
  background: #25d366;
  color: #fff;
  font-weight: 700;
  font-size: var(--text-sm);
  text-decoration: none;
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition), box-shadow var(--transition);
}
.whatsapp-float:hover { transform: translateY(-2px) scale(1.02); color: #fff; }
.whatsapp-float svg { width: 22px; height: 22px; }
@media (max-width: 640px) {
  .whatsapp-float { right: 14px; bottom: 14px; padding: 14px; }
  .whatsapp-float span { display: none; }
}

/* --------------------------------------------------------------------------
   27. Barra de progreso de lectura (blog)
   -------------------------------------------------------------------------- */
.read-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--turquoise-400), var(--emerald-500));
  z-index: 60;
  transition: width 90ms linear;
}

/* --------------------------------------------------------------------------
   28. Impresión (facturas)
   -------------------------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .whatsapp-float, .admin-side, .admin-top,
  .no-print, .read-progress { display: none !important; }
  .admin, .admin-main, .admin-body { display: block !important; padding: 0 !important; background: #fff !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .panel, .card, .table-wrap { border: 1px solid #ccc !important; box-shadow: none !important; }
  a { color: #000; text-decoration: none; }
  .page-break { page-break-before: always; }
}

/* --------------------------------------------------------------------------
   29. Utilidades finales
   -------------------------------------------------------------------------- */
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 8px !important; }
.mt-2 { margin-top: 16px !important; }
.mt-3 { margin-top: 24px !important; }
.mt-4 { margin-top: 32px !important; }
.mb-1 { margin-bottom: 8px !important; }
.mb-2 { margin-bottom: 16px !important; }
.mb-3 { margin-bottom: 24px !important; }
.mb-4 { margin-bottom: 32px !important; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.tabular { font-variant-numeric: tabular-nums; }
.text-emerald { color: var(--emerald-700); }
.text-clay { color: var(--clay-600); }
.text-turquoise { color: var(--turquoise-600); }
.text-danger { color: var(--danger-fg); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.font-display { font-family: var(--font-display); }
