/* =====================================================================
   LOMITO CLUB · Sistema de diseño
   Misma línea que los sistemas de ranitas-pdv (Mercury y polotab):
   tokens primero, componentes con prefijo `lc-` y BEM (`lc-card__head`,
   `lc-btn--subtle`, estados `is-active`), escala compacta e iconos Lucide.
   Colores y fuentes de lomito.club: Montserrat (cuerpo) y Playfair Display
   (titulares); tema claro y oscuro.

   Índice
     1. Tokens
     2. Base
     3. Tipografía y utilidades de texto
     4. Iconos
     5. Botones, botones de icono, píldoras y menús
     6. Formularios
     7. Cards, listas de definición y métricas
     8. Badges, avatar y puntos
     9. Tabla
    10. Tabs
    11. Avisos, estados vacíos y spinner
    12. Overlay (modal) y drawer
    13. Toasts
    14. Layout: sitio público
    15. Layout: app de miembros
    16. Layout: consola (Club OS, partners, admin)
    17. Guía de estilos
    18. Utilidades
   ===================================================================== */

/* =====================================================================
   1. TOKENS
   ===================================================================== */
:root {
  color-scheme: light;

  /* ---- Marca (lomito.club) ---- */
  --lc-brand: #a61d30;
  --lc-brand-deep: #721322;
  --lc-cream: #f7f3ee;

  /* ---- Superficies ---- */
  --lc-bg: #f7f3ee;
  --lc-surface: #ffffff;
  --lc-surface-2: #efe8e0;
  --lc-sunken: #f1ebe3;
  --lc-hover: #f3ede6;
  --lc-active: #e9e0d6;

  /* ---- Bordes ---- */
  --lc-border: #e2d9cf;
  --lc-border-strong: #d2c6b9;
  --lc-divider: #ece5dc;

  /* ---- Texto ---- */
  --lc-text: #211a1b;
  --lc-text-secondary: #4a4042;
  --lc-text-muted: #5e5355;
  --lc-text-faint: #8f8385;
  --lc-heading: #721322;
  --lc-link: #a61d30;

  /* ---- Acción (una sola acción primaria por contexto) ---- */
  --lc-primary: #a61d30;
  --lc-primary-strong: #721322;
  --lc-primary-soft: #f6e6e8;
  --lc-on-primary: #f7f3ee;
  --lc-focus-ring: rgba(166, 29, 48, 0.18);

  /* ---- Semánticos ---- */
  --lc-success: #3f6b45;
  --lc-success-soft: #e6eee3;
  --lc-warning: #a35a0c;
  --lc-warning-soft: #f8ecdc;
  --lc-danger: #c2412d;
  --lc-danger-soft: #f9e5e1;
  --lc-info: #3b5b86;
  --lc-info-soft: #e5ecf5;
  --lc-neutral-soft: #efe8e0;
  --lc-neutral-text: #5e5355;

  /* ---- Forma ---- */
  --lc-radius-sm: 6px;
  --lc-radius: 8px;
  --lc-radius-md: 10px;
  --lc-radius-lg: 12px;
  --lc-radius-pill: 999px;

  /* ---- Espaciado (compacto) ---- */
  --lc-gap: 8px;
  --lc-gap-lg: 14px;
  --lc-pad: 12px;
  --lc-pad-lg: 20px;

  /* ---- Sombras ---- */
  --lc-shadow-sm: 0 1px 2px rgba(33, 26, 27, 0.06);
  --lc-shadow: 0 4px 16px rgba(33, 26, 27, 0.08);
  --lc-shadow-lg: 0 16px 40px rgba(33, 26, 27, 0.14);
  --lc-backdrop: rgba(33, 26, 27, 0.4);

  /* ---- Iconos ---- */
  --lc-icon-stroke: 1.6;

  /* ---- Tipografía ---- */
  --lc-font-body: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --lc-font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;

  /* ---- Medidas de layout ---- */
  --lc-topbar-h: 52px;
  --lc-rail-w: 56px;
  --lc-side-w: 220px;
  --lc-tabbar-h: 62px;
  --lc-well: 1240px;
}

/* Tema oscuro: elegido a mano (data-theme) o por el dispositivo. */
:root[data-theme='dark'] {
  color-scheme: dark;
  --lc-bg: #211a1b;
  --lc-surface: #2b2223;
  --lc-surface-2: #362b2d;
  --lc-sunken: #1c1617;
  --lc-hover: #362b2d;
  --lc-active: #43373a;
  --lc-border: #4a3d3f;
  --lc-border-strong: #5c4d50;
  --lc-divider: #3a2f31;
  --lc-text: #f7f3ee;
  --lc-text-secondary: #ddd3cd;
  --lc-text-muted: #bbafa9;
  --lc-text-faint: #8c7f7b;
  --lc-heading: #f7f3ee;
  --lc-link: #ea7a86;
  --lc-primary: #a61d30;
  --lc-primary-strong: #c23347;
  --lc-primary-soft: rgba(234, 122, 134, 0.14);
  --lc-on-primary: #f7f3ee;
  --lc-focus-ring: rgba(234, 122, 134, 0.25);
  --lc-success: #9cc597;
  --lc-success-soft: rgba(156, 197, 151, 0.14);
  --lc-warning: #e3a75c;
  --lc-warning-soft: rgba(227, 167, 92, 0.14);
  --lc-danger: #f08a78;
  --lc-danger-soft: rgba(240, 138, 120, 0.14);
  --lc-info: #97b6e0;
  --lc-info-soft: rgba(151, 182, 224, 0.14);
  --lc-neutral-soft: #362b2d;
  --lc-neutral-text: #bbafa9;
  --lc-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --lc-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  --lc-shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --lc-backdrop: rgba(0, 0, 0, 0.55);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --lc-bg: #211a1b;
    --lc-surface: #2b2223;
    --lc-surface-2: #362b2d;
    --lc-sunken: #1c1617;
    --lc-hover: #362b2d;
    --lc-active: #43373a;
    --lc-border: #4a3d3f;
    --lc-border-strong: #5c4d50;
    --lc-divider: #3a2f31;
    --lc-text: #f7f3ee;
    --lc-text-secondary: #ddd3cd;
    --lc-text-muted: #bbafa9;
    --lc-text-faint: #8c7f7b;
    --lc-heading: #f7f3ee;
    --lc-link: #ea7a86;
    --lc-primary: #a61d30;
    --lc-primary-strong: #c23347;
    --lc-primary-soft: rgba(234, 122, 134, 0.14);
    --lc-on-primary: #f7f3ee;
    --lc-focus-ring: rgba(234, 122, 134, 0.25);
    --lc-success: #9cc597;
    --lc-success-soft: rgba(156, 197, 151, 0.14);
    --lc-warning: #e3a75c;
    --lc-warning-soft: rgba(227, 167, 92, 0.14);
    --lc-danger: #f08a78;
    --lc-danger-soft: rgba(240, 138, 120, 0.14);
    --lc-info: #97b6e0;
    --lc-info-soft: rgba(151, 182, 224, 0.14);
    --lc-neutral-soft: #362b2d;
    --lc-neutral-text: #bbafa9;
    --lc-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --lc-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    --lc-shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
    --lc-backdrop: rgba(0, 0, 0, 0.55);
  }
}

/* =====================================================================
   2. BASE
   ===================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 1rem = 14px: es la palanca global de tamaño. */
html {
  font-size: 87.5%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--lc-bg);
  color: var(--lc-text);
  font-family: var(--lc-font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

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

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

a {
  color: var(--lc-link);
  text-decoration-color: color-mix(in srgb, var(--lc-link) 40%, transparent);
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--lc-link);
  outline-offset: 2px;
}

::selection {
  background: var(--lc-primary-soft);
}

[hidden] {
  display: none !important;
}

.lc-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* =====================================================================
   3. TIPOGRAFÍA Y UTILIDADES DE TEXTO
   ===================================================================== */
h1,
h2,
.lc-display {
  font-family: var(--lc-font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--lc-heading);
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.5rem;
}

h3,
h4 {
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--lc-text);
}

h3 {
  font-size: 1.0714rem;
}

h4 {
  font-size: 1rem;
}

/* Etiqueta en mayúsculas espaciadas (como en lomito.club). */
.lc-eyebrow {
  font-size: 0.7857rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lc-link);
}

.lc-lead {
  font-size: 1.1429rem;
  line-height: 1.6;
  color: var(--lc-text-secondary);
}

.lc-muted {
  color: var(--lc-text-muted);
}

.lc-faint {
  color: var(--lc-text-faint);
}

.lc-small {
  font-size: 0.8929rem;
}

.lc-num {
  font-variant-numeric: tabular-nums;
}

/* =====================================================================
   4. ICONOS (sprite Lucide: <svg class="lc-ic"><use href="#ic-NOMBRE"></use></svg>)
   Tamaño = font-size del contexto, color = currentColor.
   ===================================================================== */
.lc-ic {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: var(--lc-icon-stroke);
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.125em;
}

/* =====================================================================
   5. BOTONES, BOTONES DE ICONO, PÍLDORAS Y MENÚS
   ===================================================================== */
.lc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: var(--lc-radius-sm);
  background: var(--lc-primary);
  color: var(--lc-on-primary);
  font-size: 0.9286rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background 0.12s ease,
    border-color 0.12s ease,
    color 0.12s ease,
    transform 0.12s ease;
}

.lc-btn .lc-ic {
  font-size: 15px;
}

.lc-btn:hover {
  background: var(--lc-primary-strong);
}

.lc-btn:active {
  transform: scale(0.985);
}

.lc-btn:disabled,
.lc-btn[aria-disabled='true'] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* Secundario: superficie con borde. */
.lc-btn--subtle {
  background: var(--lc-surface);
  border-color: var(--lc-border-strong);
  color: var(--lc-text);
  box-shadow: var(--lc-shadow-sm);
}

.lc-btn--subtle:hover {
  background: var(--lc-hover);
}

.lc-btn--subtle .lc-ic {
  color: var(--lc-text-secondary);
}

/* Fantasma: sin fondo. */
.lc-btn--ghost {
  background: transparent;
  color: var(--lc-text-secondary);
}

.lc-btn--ghost:hover {
  background: var(--lc-hover);
  color: var(--lc-text);
}

/* Peligro: solo en el botón que confirma algo destructivo. */
.lc-btn--danger {
  background: var(--lc-danger);
  color: #ffffff;
}

.lc-btn--danger:hover {
  background: color-mix(in srgb, var(--lc-danger) 85%, #000000);
}

.lc-btn--link {
  height: auto;
  padding: 0;
  background: transparent;
  color: var(--lc-link);
}

.lc-btn--link:hover {
  background: transparent;
  text-decoration: underline;
}

.lc-btn--sm {
  height: 28px;
  padding: 0 10px;
  font-size: 0.8571rem;
}

.lc-btn--lg {
  height: 44px;
  padding: 0 22px;
  font-size: 1rem;
}

.lc-btn--block {
  width: 100%;
}

/* Botón en carga: oculta el contenido y muestra un spinner. */
.lc-btn.is-loading {
  position: relative;
  pointer-events: none;
}

.lc-btn.is-loading > * {
  visibility: hidden;
}

.lc-btn.is-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: lc-spin 0.6s linear infinite;
}

/* Botón de solo icono. */
.lc-iconbtn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid transparent;
  border-radius: var(--lc-radius-sm);
  background: transparent;
  color: var(--lc-text-secondary);
  font-size: 16px;
  cursor: pointer;
  transition:
    background 0.12s ease,
    color 0.12s ease;
}

.lc-iconbtn:hover {
  background: var(--lc-hover);
  color: var(--lc-text);
}

.lc-iconbtn--bordered {
  border-color: var(--lc-border);
  background: var(--lc-surface);
}

/* Punto de notificación. */
.lc-iconbtn--dot::after {
  content: '';
  position: absolute;
  top: 6px;
  right: 7px;
  width: 7px;
  height: 7px;
  border: 1.5px solid var(--lc-surface);
  border-radius: 50%;
  background: var(--lc-primary);
}

/* Píldora de filtro. */
.lc-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--lc-border);
  border-radius: var(--lc-radius-pill);
  background: var(--lc-surface);
  color: var(--lc-text-secondary);
  font-size: 0.8571rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background 0.12s ease,
    border-color 0.12s ease;
}

.lc-pill .lc-ic {
  font-size: 13px;
  color: var(--lc-text-muted);
}

.lc-pill:hover {
  background: var(--lc-hover);
  border-color: var(--lc-border-strong);
}

.lc-pill.is-active {
  background: var(--lc-primary-soft);
  border-color: var(--lc-primary);
  color: var(--lc-link);
}

.lc-pill.is-active .lc-ic {
  color: var(--lc-link);
}

/* Menú desplegable: contenedor .lc-dropdown con un botón [data-lc-menu-toggle]. */
.lc-dropdown {
  position: relative;
  display: inline-flex;
}

.lc-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 40;
  display: none;
  min-width: 200px;
  max-height: 320px;
  padding: 4px;
  overflow-y: auto;
  border: 1px solid var(--lc-border-strong);
  border-radius: var(--lc-radius);
  background: var(--lc-surface);
  box-shadow: var(--lc-shadow);
}

.lc-menu--end {
  right: 0;
  left: auto;
}

.lc-dropdown.is-open .lc-menu {
  display: block;
}

.lc-menu__item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 9px;
  border: 0;
  border-radius: var(--lc-radius-sm);
  background: transparent;
  color: var(--lc-text-secondary);
  font-size: 0.9286rem;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.lc-menu__item:hover {
  background: var(--lc-hover);
  color: var(--lc-text);
}

.lc-menu__item.is-active {
  background: var(--lc-primary-soft);
  color: var(--lc-link);
  font-weight: 500;
}

.lc-menu__divider {
  height: 1px;
  margin: 4px 0;
  background: var(--lc-divider);
}

/* =====================================================================
   6. FORMULARIOS
   ===================================================================== */
.lc-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.lc-field > label,
.lc-label {
  font-size: 0.8571rem;
  font-weight: 500;
  color: var(--lc-text-muted);
}

.lc-field__hint {
  font-size: 0.8214rem;
  color: var(--lc-text-faint);
}

.lc-field__error {
  font-size: 0.8214rem;
  color: var(--lc-danger);
}

.lc-field.is-invalid .lc-input,
.lc-field.is-invalid .lc-select {
  border-color: var(--lc-danger);
}

/* Etiqueta a la izquierda y control a la derecha (switches). */
.lc-field--row {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lc-field--row > label {
  font-size: 0.9286rem;
  color: var(--lc-text);
}

.lc-input,
.lc-select {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--lc-border-strong);
  border-radius: var(--lc-radius-sm);
  background: var(--lc-surface);
  color: var(--lc-text);
  font-size: 0.9286rem;
  outline: none;
  transition:
    border-color 0.12s ease,
    box-shadow 0.12s ease;
}

.lc-input:focus,
.lc-select:focus {
  border-color: var(--lc-primary);
  box-shadow: 0 0 0 3px var(--lc-focus-ring);
}

.lc-input::placeholder {
  color: var(--lc-text-faint);
}

.lc-input:disabled,
.lc-select:disabled {
  background: var(--lc-sunken);
  color: var(--lc-text-muted);
  cursor: not-allowed;
}

textarea.lc-input {
  height: auto;
  min-height: 72px;
  padding: 8px 10px;
  line-height: 1.45;
  resize: vertical;
}

.lc-select {
  appearance: none;
  padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238f8385' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 10px center;
  background-repeat: no-repeat;
  cursor: pointer;
}

/* Input con icono o sufijo. */
.lc-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.lc-input-wrap > .lc-ic {
  position: absolute;
  left: 10px;
  font-size: 15px;
  color: var(--lc-text-muted);
  pointer-events: none;
}

.lc-input-wrap > .lc-ic + .lc-input {
  padding-left: 32px;
}

.lc-input-wrap__suffix {
  position: absolute;
  right: 10px;
  font-size: 0.8571rem;
  color: var(--lc-text-muted);
  pointer-events: none;
}

/* Switch. */
.lc-switch {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  width: 34px;
  height: 20px;
  cursor: pointer;
}

.lc-switch input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}

.lc-switch__track {
  position: absolute;
  inset: 0;
  border-radius: var(--lc-radius-pill);
  background: var(--lc-border-strong);
  transition: background 0.15s ease;
}

.lc-switch__track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: var(--lc-shadow-sm);
  transition: transform 0.15s ease;
}

.lc-switch input:checked + .lc-switch__track {
  background: var(--lc-primary);
}

.lc-switch input:checked + .lc-switch__track::after {
  transform: translateX(14px);
}

.lc-switch input:focus-visible + .lc-switch__track {
  box-shadow: 0 0 0 3px var(--lc-focus-ring);
}

/* Checkbox y radio dibujados (todos los de la app, sin tocar el markup). */
.lc-check {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.9286rem;
  cursor: pointer;
}

input[type='checkbox']:not(.lc-switch input),
input[type='radio'] {
  appearance: none;
  display: inline-grid;
  flex-shrink: 0;
  place-content: center;
  width: 17px;
  height: 17px;
  margin: 0;
  border: 1.5px solid var(--lc-border-strong);
  border-radius: 5px;
  background: var(--lc-surface) no-repeat center;
  cursor: pointer;
  transition:
    border-color 0.12s ease,
    background-color 0.12s ease,
    box-shadow 0.12s ease;
}

input[type='radio'] {
  border-radius: 50%;
}

input[type='checkbox']:not(.lc-switch input):hover,
input[type='radio']:hover {
  border-color: var(--lc-primary);
}

input[type='checkbox']:not(.lc-switch input):focus-visible,
input[type='radio']:focus-visible {
  outline: none;
  border-color: var(--lc-primary);
  box-shadow: 0 0 0 3px var(--lc-focus-ring);
}

input[type='checkbox']:not(.lc-switch input):checked {
  border-color: var(--lc-primary);
  background-color: var(--lc-primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E");
}

input[type='radio']:checked {
  border-color: var(--lc-primary);
  background-color: var(--lc-primary);
  background-image: radial-gradient(circle at center, #fff 0 3px, transparent 3.5px);
}

input[type='checkbox']:disabled,
input[type='radio']:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Opción seleccionable en card (plan, tipo de evento…). */
.lc-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 4px 10px;
  padding: 10px 12px;
  border: 1px solid var(--lc-border-strong);
  border-radius: var(--lc-radius);
  background: var(--lc-surface);
  cursor: pointer;
  transition:
    background 0.12s ease,
    border-color 0.12s ease;
}

.lc-option:hover {
  background: var(--lc-hover);
}

.lc-option:has(input:checked),
.lc-option.is-selected {
  border-color: var(--lc-primary);
  box-shadow: inset 0 0 0 1px var(--lc-primary);
  background: var(--lc-primary-soft);
}

.lc-option__title {
  font-weight: 600;
}

.lc-option__desc {
  grid-column: 2;
  font-size: 0.8571rem;
  color: var(--lc-text-muted);
}

/* =====================================================================
   7. CARDS, LISTAS DE DEFINICIÓN Y MÉTRICAS
   ===================================================================== */
.lc-card {
  padding: 16px;
  border: 1px solid var(--lc-border);
  border-radius: var(--lc-radius-lg);
  background: var(--lc-surface);
  box-shadow: var(--lc-shadow-sm);
}

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

.lc-card__media {
  margin: -16px -16px 14px;
  border-radius: var(--lc-radius-lg) var(--lc-radius-lg) 0 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--lc-surface-2);
}

.lc-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lc-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--lc-divider);
}

/* Card sin padding, para listas que llegan al borde. */
.lc-card--flush {
  padding: 0;
  overflow: hidden;
}

/* Card que es un link completo. */
a.lc-card {
  display: block;
  color: inherit;
  text-decoration: none;
  transition:
    border-color 0.12s ease,
    box-shadow 0.12s ease;
}

a.lc-card:hover {
  border-color: var(--lc-border-strong);
  box-shadow: var(--lc-shadow);
}

.lc-dl {
  display: flex;
  flex-direction: column;
}

.lc-dl > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--lc-gap);
  padding: 8px 0;
  border-bottom: 1px solid var(--lc-divider);
}

.lc-dl > div:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.lc-dl dt {
  flex-shrink: 0;
  font-size: 0.8929rem;
  color: var(--lc-text-muted);
}

.lc-dl dd {
  font-weight: 500;
  text-align: right;
}

.lc-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--lc-gap-lg);
}

.lc-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lc-stat__label {
  font-size: 0.8571rem;
  color: var(--lc-text-muted);
}

.lc-stat__value {
  font-family: var(--lc-font-display);
  font-size: 1.7143rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.lc-stat__delta {
  font-size: 0.8214rem;
  color: var(--lc-text-muted);
}

.lc-stat__delta.is-up {
  color: var(--lc-success);
}

.lc-stat__delta.is-down {
  color: var(--lc-danger);
}

/* Lista de filas (lugares, documentos…) dentro de una card --flush. */
.lc-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.lc-list__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--lc-divider);
}

.lc-list__item:last-child {
  border-bottom: none;
}

.lc-list__icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--lc-radius);
  background: var(--lc-primary-soft);
  color: var(--lc-link);
  font-size: 17px;
}

.lc-list__body {
  flex: 1 1 auto;
  min-width: 0;
}

.lc-list__title {
  font-weight: 600;
}

.lc-list__meta {
  overflow: hidden;
  color: var(--lc-text-muted);
  font-size: 0.8571rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lc-list__aside {
  flex-shrink: 0;
  color: var(--lc-text-muted);
  font-size: 0.8571rem;
  white-space: nowrap;
}

/* Encabezado de sección con acción a la derecha. */
.lc-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 24px 0 10px;
}

.lc-section-head h2 {
  font-size: 1.3571rem;
}

/* =====================================================================
   8. BADGES, AVATAR Y PUNTOS
   ===================================================================== */
.lc-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px;
  border-radius: var(--lc-radius-pill);
  background: var(--lc-neutral-soft);
  color: var(--lc-neutral-text);
  font-size: 0.7857rem;
  font-weight: 500;
  line-height: 1.6;
  white-space: nowrap;
}

.lc-badge .lc-ic {
  font-size: 12px;
}

.lc-badge--brand {
  background: var(--lc-primary-soft);
  color: var(--lc-link);
}

.lc-badge--success {
  background: var(--lc-success-soft);
  color: var(--lc-success);
}

.lc-badge--warning {
  background: var(--lc-warning-soft);
  color: var(--lc-warning);
}

.lc-badge--danger {
  background: var(--lc-danger-soft);
  color: var(--lc-danger);
}

.lc-badge--info {
  background: var(--lc-info-soft);
  color: var(--lc-info);
}

.lc-avatar {
  display: inline-grid;
  flex-shrink: 0;
  place-items: center;
  width: 28px;
  height: 28px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--lc-primary-soft);
  color: var(--lc-link);
  font-size: 0.7857rem;
  font-weight: 600;
}

.lc-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lc-avatar--lg {
  width: 44px;
  height: 44px;
  font-size: 1rem;
}

.lc-dot {
  display: inline-block;
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lc-text-faint);
}

.lc-dot--ok {
  background: var(--lc-success);
}

.lc-dot--warn {
  background: var(--lc-warning);
}

.lc-dot--danger {
  background: var(--lc-danger);
}

/* =====================================================================
   9. TABLA
   ===================================================================== */
.lc-table-wrap {
  overflow-x: auto;
}

.lc-table {
  width: 100%;
  border-collapse: collapse;
}

.lc-table thead th {
  padding: 7px 10px;
  border-bottom: 1px solid var(--lc-border);
  color: var(--lc-text-muted);
  font-size: 0.7857rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-align: left;
  white-space: nowrap;
}

.lc-table tbody td {
  padding: 10px;
  border-bottom: 1px solid var(--lc-divider);
  font-size: 0.9286rem;
  vertical-align: middle;
}

/* La primera y la última columna alinean con el título de la página. */
.lc-table th:first-child,
.lc-table td:first-child {
  padding-left: 0;
}

.lc-table th:last-child,
.lc-table td:last-child {
  padding-right: 0;
}

.lc-table .lc-table__num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.lc-table--hover tbody tr {
  cursor: pointer;
  transition: background 0.1s ease;
}

.lc-table--hover tbody tr:hover {
  background: var(--lc-sunken);
}

.lc-table__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.lc-cell-party {
  display: flex;
  align-items: center;
  gap: 9px;
}

/* =====================================================================
   10. TABS (segmentados)
   ===================================================================== */
.lc-tabs {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--lc-border);
  border-radius: var(--lc-radius);
  background: var(--lc-sunken);
}

.lc-tabs--inline {
  display: inline-flex;
  align-self: flex-start;
}

.lc-tab {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  border: none;
  border-radius: var(--lc-radius-sm);
  background: transparent;
  color: var(--lc-text-secondary);
  font-size: 0.8929rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background 0.12s ease,
    color 0.12s ease;
}

.lc-tabs--inline .lc-tab {
  flex: 0 0 auto;
}

.lc-tab:hover {
  color: var(--lc-text);
}

.lc-tab.is-active {
  background: var(--lc-surface);
  color: var(--lc-text);
  font-weight: 600;
  box-shadow: var(--lc-shadow-sm);
}

/* =====================================================================
   11. AVISOS, ESTADOS VACÍOS Y SPINNER
   ===================================================================== */
.lc-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--lc-radius);
  background: var(--lc-info-soft);
  color: var(--lc-text);
  font-size: 0.9286rem;
}

.lc-alert > .lc-ic {
  margin-top: 2px;
  font-size: 16px;
  color: var(--lc-info);
}

.lc-alert__title {
  font-weight: 600;
}

.lc-alert--success {
  background: var(--lc-success-soft);
}

.lc-alert--success > .lc-ic {
  color: var(--lc-success);
}

.lc-alert--warning {
  background: var(--lc-warning-soft);
}

.lc-alert--warning > .lc-ic {
  color: var(--lc-warning);
}

.lc-alert--danger {
  background: var(--lc-danger-soft);
}

.lc-alert--danger > .lc-ic {
  color: var(--lc-danger);
}

.lc-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 36px 16px;
  color: var(--lc-text-muted);
  text-align: center;
}

.lc-empty__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--lc-surface-2);
  color: var(--lc-text-muted);
  font-size: 22px;
}

.lc-empty__title {
  color: var(--lc-text);
  font-weight: 600;
}

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

.lc-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: lc-spin 0.6s linear infinite;
}

.lc-spinner--lg {
  width: 28px;
  height: 28px;
  border-width: 3px;
}

/* =====================================================================
   12. OVERLAY (MODAL) Y DRAWER
   Se abren con [data-lc-open="#id"] y se cierran con [data-lc-close],
   tocando fuera o con Esc (public/js/core/ui.js).
   ===================================================================== */
.lc-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--lc-backdrop);
  backdrop-filter: blur(3px);
}

.lc-overlay__card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 460px;
  max-height: calc(100dvh - 32px);
  border: 1px solid var(--lc-border);
  border-radius: var(--lc-radius-lg);
  background: var(--lc-surface);
  box-shadow: var(--lc-shadow-lg);
}

.lc-overlay__head,
.lc-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px 10px;
}

.lc-overlay__body,
.lc-drawer__body {
  flex: 1 1 auto;
  padding: 4px 16px 16px;
  overflow-y: auto;
}

.lc-overlay__foot,
.lc-drawer__foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--lc-divider);
}

.lc-drawer {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--lc-backdrop);
}

.lc-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(440px, 100%);
  border-left: 1px solid var(--lc-border);
  background: var(--lc-surface);
  box-shadow: var(--lc-shadow-lg);
  animation: lc-drawer-in 0.18s ease;
}

@keyframes lc-drawer-in {
  from {
    transform: translateX(24px);
    opacity: 0;
  }
}

/* =====================================================================
   13. TOASTS (window.lcToast)
   ===================================================================== */
.lc-toasts {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 4000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(360px, calc(100vw - 32px));
}

.lc-toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--lc-border);
  border-left: 3px solid var(--lc-info);
  border-radius: var(--lc-radius);
  background: var(--lc-surface);
  box-shadow: var(--lc-shadow);
  font-size: 0.9286rem;
  animation: lc-toast-in 0.18s ease;
}

.lc-toast--success {
  border-left-color: var(--lc-success);
}

.lc-toast--warning {
  border-left-color: var(--lc-warning);
}

.lc-toast--danger {
  border-left-color: var(--lc-danger);
}

@keyframes lc-toast-in {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
}

/* En móvil con tabbar, los toasts suben para no taparla. */
.lc-app .lc-toasts {
  bottom: calc(var(--lc-tabbar-h) + 12px);
}

/* =====================================================================
   14. LAYOUT: SITIO PÚBLICO
   ===================================================================== */
.lc-site {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.lc-site__header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--lc-border);
  background: color-mix(in srgb, var(--lc-bg) 92%, transparent);
  backdrop-filter: blur(8px);
}

.lc-site__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: var(--lc-well);
  height: 60px;
  margin: 0 auto;
  padding: 0 20px;
}

.lc-site__main {
  flex: 1 1 auto;
  width: 100%;
  max-width: var(--lc-well);
  margin: 0 auto;
  padding: 40px 20px 56px;
}

.lc-site__footer {
  border-top: 1px solid var(--lc-border);
  color: var(--lc-text-muted);
  font-size: 0.8571rem;
}

.lc-site__footer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: var(--lc-well);
  margin: 0 auto;
  padding: 20px;
}

/* Marca: wordmark hasta tener el logo del manual de identidad. */
.lc-brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  color: var(--lc-text);
  text-decoration: none;
}

.lc-brand__name {
  font-family: var(--lc-font-display);
  font-size: 1.2857rem;
  letter-spacing: 0.04em;
}

.lc-brand__sub {
  margin-top: 2px;
  font-size: 0.5714rem;
  font-weight: 500;
  letter-spacing: 0.4em;
  text-transform: uppercase;
}

/* Selector de idioma y de tema (header). */
.lc-segmented {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--lc-border);
  border-radius: var(--lc-radius-sm);
  background: var(--lc-surface);
}

.lc-segmented__item {
  padding: 4px 8px;
  border-radius: 4px;
  color: var(--lc-text-secondary);
  font-size: 0.7857rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.lc-segmented__item:hover {
  color: var(--lc-text);
}

.lc-segmented__item.is-active {
  background: var(--lc-primary);
  color: var(--lc-on-primary);
}

/* El botón de tema muestra el icono del tema al que cambia. */
.lc-theme-toggle .lc-ic--moon {
  display: none;
}

:root[data-theme='light'] .lc-theme-toggle .lc-ic--sun,
:root:not([data-theme]) .lc-theme-toggle .lc-ic--sun {
  display: none;
}

:root[data-theme='light'] .lc-theme-toggle .lc-ic--moon,
:root:not([data-theme]) .lc-theme-toggle .lc-ic--moon {
  display: inline-block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .lc-theme-toggle .lc-ic--sun {
    display: inline-block;
  }

  :root:not([data-theme]) .lc-theme-toggle .lc-ic--moon {
    display: none;
  }
}

/* Login y registro: card centrada. */
.lc-auth {
  display: grid;
  place-items: start center;
}

.lc-auth__card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 420px;
  padding: 24px;
}

/* Bloque principal de una página pública. */
.lc-hero {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 760px;
}

.lc-hero h1 {
  font-size: clamp(2.4rem, 6vw, 3.7rem);
  line-height: 1.05;
}

.lc-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

/* =====================================================================
   15. LAYOUT: APP DE MIEMBROS (PWA)
   Móvil: topbar + contenido + tabbar inferior.
   Escritorio (≥ 900px): la tabbar pasa a rail lateral.
   ===================================================================== */
.lc-app {
  min-height: 100dvh;
  padding-bottom: calc(var(--lc-tabbar-h) + env(safe-area-inset-bottom));
}

.lc-app__topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--lc-topbar-h);
  padding: 0 14px;
  border-bottom: 1px solid var(--lc-border);
  background: color-mix(in srgb, var(--lc-surface) 94%, transparent);
  backdrop-filter: blur(8px);
}

.lc-app__main {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 18px 14px 24px;
}

.lc-app__main > .lc-alert {
  margin-bottom: 14px;
}

.lc-app__page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.lc-tabbar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: calc(var(--lc-tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid var(--lc-border);
  background: var(--lc-surface);
}

.lc-tabbar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--lc-text-muted);
  font-size: 0.7143rem;
  font-weight: 500;
  text-decoration: none;
}

.lc-tabbar__item .lc-ic {
  font-size: 21px;
}

.lc-tabbar__item.is-active {
  color: var(--lc-link);
}

@media (min-width: 900px) {
  .lc-app {
    padding-bottom: 0;
    padding-left: 84px;
  }

  .lc-app__topbar {
    margin-left: -84px;
    padding-left: 20px;
  }

  .lc-app__main {
    padding: 24px 24px 40px;
  }

  .lc-tabbar {
    top: var(--lc-topbar-h);
    right: auto;
    width: 84px;
    height: auto;
    grid-template-columns: 1fr;
    grid-auto-rows: 64px;
    align-content: start;
    padding: 10px 0 0;
    border-top: none;
    border-right: 1px solid var(--lc-border);
    background: var(--lc-sunken);
  }

  .lc-tabbar__item.is-active {
    background: var(--lc-primary-soft);
  }

  .lc-app .lc-toasts {
    bottom: 16px;
  }
}

/* Selector de zona (Mi Zona) en la topbar. */
.lc-zone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--lc-border);
  border-radius: var(--lc-radius-pill);
  background: var(--lc-surface);
  color: var(--lc-text);
  font-size: 0.8929rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.lc-zone .lc-ic {
  font-size: 14px;
  color: var(--lc-link);
}

.lc-zone__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =====================================================================
   16. LAYOUT: CONSOLA (Club OS, partners, admin)
   Shell Mercury: topbar fija + rail de secciones + sidebar contextual + main.
   La navegación sale de la configuración del servidor (src/web/shared/console-nav.ts).
   ===================================================================== */
.lc-console {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
  font-size: 0.9286rem;
}

.lc-console__topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--lc-topbar-h);
  padding: 0 16px 0 11px;
  border-bottom: 1px solid var(--lc-border);
  background: var(--lc-surface);
}

.lc-console__mark {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--lc-radius);
  background: var(--lc-primary);
  color: var(--lc-on-primary);
  font-family: var(--lc-font-display);
  font-size: 1.1429rem;
  text-decoration: none;
  box-shadow: var(--lc-shadow-sm);
}

.lc-console__spacer {
  flex: 1 1 auto;
}

.lc-console__right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lc-console__menu-btn {
  display: none;
}

.lc-console__body {
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
}

/* Buscador global. */
.lc-search {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 460px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--lc-border);
  border-radius: var(--lc-radius);
  background: var(--lc-sunken);
  color: var(--lc-text-muted);
}

.lc-search input {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.8929rem;
}

.lc-kbd {
  padding: 1px 5px;
  border: 1px solid var(--lc-border);
  border-radius: var(--lc-radius-sm);
  background: var(--lc-surface);
  color: var(--lc-text-muted);
  font-size: 0.7143rem;
}

/* Rail de secciones. */
.lc-rail {
  flex: 0 0 var(--lc-rail-w);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 9px;
  border-right: 1px solid var(--lc-border);
  background: var(--lc-sunken);
}

.lc-rail__btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--lc-radius);
  color: var(--lc-text-muted);
  font-size: 18px;
  text-decoration: none;
  transition:
    background 0.12s ease,
    color 0.12s ease;
}

.lc-rail__btn:hover {
  background: var(--lc-hover);
  color: var(--lc-text-secondary);
}

.lc-rail__btn.is-active {
  background: var(--lc-primary-soft);
  color: var(--lc-link);
}

/* Etiqueta como tooltip a la derecha del rail. */
.lc-rail__label {
  position: absolute;
  top: 50%;
  left: calc(100% + 10px);
  z-index: 60;
  padding: 4px 9px;
  border-radius: var(--lc-radius-sm);
  background: var(--lc-text);
  color: var(--lc-bg);
  font-size: 0.8214rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-3px, -50%);
  transition:
    opacity 0.12s ease 0.05s,
    transform 0.12s ease 0.05s;
}

.lc-rail__btn:hover .lc-rail__label,
.lc-rail__btn:focus-visible .lc-rail__label {
  opacity: 1;
  transform: translate(0, -50%);
}

/* Sidebar contextual. */
.lc-side {
  flex: 0 0 var(--lc-side-w);
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--lc-border);
  background: var(--lc-surface);
}

.lc-side__head {
  padding: 15px 14px 10px 17px;
}

.lc-side__title {
  font-family: var(--lc-font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--lc-text);
}

.lc-side__subtitle {
  margin-top: 1px;
  font-size: 0.7857rem;
  color: var(--lc-text-muted);
}

.lc-side__nav {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-height: 0;
  padding: 3px 8px 10px;
  overflow-y: auto;
}

.lc-side__group {
  margin: 12px 9px 3px;
  color: var(--lc-text-faint);
  font-size: 0.7143rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lc-side__group:first-child {
  margin-top: 2px;
}

.lc-side__item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 9px;
  border-radius: var(--lc-radius-sm);
  color: var(--lc-text-secondary);
  font-size: 0.8929rem;
  font-weight: 500;
  text-decoration: none;
  transition:
    background 0.12s ease,
    color 0.12s ease;
}

.lc-side__item .lc-ic {
  font-size: 15px;
  color: var(--lc-text-muted);
}

.lc-side__item:hover {
  background: var(--lc-hover);
  color: var(--lc-text);
}

.lc-side__item.is-active {
  background: var(--lc-primary-soft);
  color: var(--lc-link);
  font-weight: 600;
}

.lc-side__item.is-active .lc-ic {
  color: var(--lc-link);
}

.lc-side__footer {
  padding: 9px 8px 12px;
  border-top: 1px solid var(--lc-divider);
}

/* Main: cabecera de página, toolbar y contenido con scroll. */
.lc-main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--lc-bg);
}

.lc-page__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 10px;
}

.lc-crumbs {
  margin-bottom: 3px;
  color: var(--lc-text-muted);
  font-size: 0.7857rem;
}

.lc-page__head h1 {
  font-size: 1.7143rem;
}

.lc-page__actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.lc-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  row-gap: 9px;
  padding: 0 20px 12px;
}

.lc-toolbar__spacer {
  flex: 1 1 auto;
}

.lc-content {
  flex: 1 1 auto;
  min-height: 0;
  padding: 4px 20px 28px;
  overflow-y: auto;
}

/* Móvil: rail + sidebar se vuelven un panel lateral. */
@media (max-width: 899px) {
  .lc-console__menu-btn {
    display: inline-grid;
  }

  .lc-console .lc-search {
    display: none;
  }

  .lc-console__nav {
    position: fixed;
    top: var(--lc-topbar-h);
    bottom: 0;
    left: 0;
    z-index: 70;
    display: flex;
    box-shadow: var(--lc-shadow-lg);
    transform: translateX(-100%);
    transition: transform 0.18s ease;
  }

  .lc-console.is-nav-open .lc-console__nav {
    transform: none;
  }

  .lc-page__head,
  .lc-toolbar,
  .lc-content {
    padding-right: 14px;
    padding-left: 14px;
  }
}

@media (min-width: 900px) {
  .lc-console__nav {
    display: contents;
  }
}

/* =====================================================================
   17. GUÍA DE ESTILOS (solo fuera de producción)
   ===================================================================== */
.lc-sg-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 0;
  border-bottom: 1px solid var(--lc-divider);
  scroll-margin-top: 12px;
}

.lc-sg-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.lc-swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.lc-swatch {
  overflow: hidden;
  border: 1px solid var(--lc-border);
  border-radius: var(--lc-radius);
  background: var(--lc-surface);
}

.lc-swatch__color {
  height: 56px;
  border-bottom: 1px solid var(--lc-border);
}

.lc-swatch__meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 10px;
  font-size: 0.7857rem;
}

.lc-swatch__meta code {
  color: var(--lc-text-muted);
}

.lc-icons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}

.lc-icons-grid > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px;
  border: 1px solid var(--lc-border);
  border-radius: var(--lc-radius);
  background: var(--lc-surface);
  color: var(--lc-text-secondary);
  font-size: 0.7857rem;
}

.lc-icons-grid .lc-ic {
  font-size: 20px;
}

/* =====================================================================
   18. UTILIDADES
   ===================================================================== */
.lc-stack {
  display: flex;
  flex-direction: column;
  gap: var(--lc-gap-lg);
}

.lc-stack--sm {
  gap: var(--lc-gap);
}

.lc-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--lc-gap);
}

.lc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--lc-gap-lg);
}

.lc-spacer {
  flex: 1 1 auto;
}

.lc-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;
}

/* En móvil los campos van a 16px para que iOS no haga zoom al enfocarlos. */
@media (max-width: 640px) {
  .lc-input,
  .lc-select {
    font-size: 16px;
  }
}
