/* ═══════════════════════════════════════════════════════════════════
   EnManada — Design System
   Paleta: #2D4A3E (forest) · #609f98 (teal) · #F7F6F2 (warm bg)
   Fuente: DM Sans · Iconos: Tabler Icons
   ═══════════════════════════════════════════════════════════════════ */

:root {
  /* Superficie y fondo */
  --bg:          #F7F6F2;
  --bg2:         #FFFFFF;
  --bg3:         #EFEFEA;
  /* Bordes */
  --border:      rgba(0, 0, 0, 0.08);
  --border2:     rgba(0, 0, 0, 0.14);
  /* Texto */
  --text:        #1A1A18;
  --text2:       #6B6B65;
  --text3:       #A0A099;
  /* Acento principal (forest green) — tokens del design system */
  --accent:        #2D4A3E;
  --accent-hover:  #3A5E50;
  --accent-light:  #EAF3DE;
  --accent-border: #C0DD97;
  --accent-text:   #27500A;
  --gold:          #F5C842;
  /* Alias cortos (compatibilidad interna) */
  --accent-lt:   #EAF3DE;
  --accent-tx:   #27500A;
  /* Semánticos — design system exacto */
  --success-bg:     #EAF3DE;
  --success-border: #C0DD97;
  --success-text:   #3B6D11;
  --warning-bg:     #FAEEDA;
  --warning-border: #FAC775;
  --warning-text:   #854F0B;
  --danger-bg:      #FCEBEB;
  --danger-border:  #F09595;
  --danger-text:    #A32D2D;
  --info-bg:        #E6F1FB;
  --info-border:    #85B7EB;
  --info-text:      #185FA5;
  --purple-bg:      #EEEDFE;
  --purple-border:  #CECBF6;
  --purple-text:    #3C3489;
  /* Acento secundario (teal marca) */
  --teal:        #609f98;
  --teal-dk:     #4d8680;
  --teal-mist:   #eef5f4;
  --teal-soft:   #c9dedb;
  --teal-bright: #7badb6;
  /* Alias legacy (compatibilidad con templates existentes) */
  --enm-white:       #FFFFFF;
  --enm-ink:         #1A1A18;
  --enm-brand-rgb:   96, 159, 152;
  --enm-teal:        #609f98;
  --enm-teal-dark:   #4d8680;
  --enm-teal-bright: #7badb6;
  --enm-teal-soft:   #c9dedb;
  --enm-teal-mist:   #eef5f4;
  --enm-accent:      #609f98;
  --enm-bg:          #F7F6F2;
  --enm-surface:     #FFFFFF;
  --enm-border:      rgba(0, 0, 0, 0.08);
  /* Layout */
  --sidebar-w:   240px;
  --sidebar-rail-w: 76px;
  --em-nav-dur:  0.36s;
  --em-nav-ease: cubic-bezier(0.32, 0.72, 0, 1);
  --radius:      10px;
  --radius-lg:   14px;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.05), 0 4px 12px rgba(0,0,0,.05);
  --shadow-md:   0 2px 8px rgba(0,0,0,.07), 0 8px 24px rgba(0,0,0,.07);
  --tr:          0.12s ease;
}

/* ── Reset ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  scrollbar-gutter: stable;
}

/* ── Body / Layout ───────────────────────────────────────────────── */
body.enm-body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
.enm-shell {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  align-items: stretch;
  min-width: 0;
  min-height: 0;
  width: 100%;
}
/* Mantener también .bg-enmanada por si algún template lo usa */
body.bg-enmanada { background: var(--bg); color: var(--text); }

/* ── Sidebar ──────────────────────────────────────────────────────── */
.enm-sidebar {
  width: var(--sidebar-w);
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  flex-shrink: 0;
  overflow-y: auto;
  z-index: 200;
}
/* Paleta viva: scroll solo en nav; pie fijo (evita cortar «Búsqueda» sin scroll claro). */
#enmSidebar.em-menu {
  overflow: hidden;
}
#enmSidebar.em-menu .em-menu-shell {
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.enm-sidebar-logo {
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.enm-logo-icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
}
.enm-logo-icon-img {
  width: 100%; height: 100%;
  object-fit: contain;
}
.enm-logo-name  { font-size: 14px; font-weight: 600; color: var(--text); }
.enm-logo-sub   { font-size: 11px; color: var(--text3); margin-top: 1px; }

/* Nav */
.enm-nav { padding: 12px 8px; flex: 1; }
.enm-nav-section {
  font-size: 10px; color: var(--text3);
  padding: 10px 10px 5px;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.enm-nav-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 8px;
  font-size: 13px; font-weight: 400; color: var(--text2);
  text-decoration: none; cursor: pointer;
  margin-bottom: 1px;
  transition: background var(--tr), color var(--tr);
}
.enm-nav-item i { font-size: 17px; flex-shrink: 0; }
.enm-nav-item:hover  { background: var(--bg3); color: var(--text); }
.enm-nav-item.active { background: var(--accent-lt); color: var(--accent-tx); font-weight: 500; }

/* Nav badge */
.enm-nav-badge {
  margin-left: auto;
  font-size: 10px; padding: 1px 7px; border-radius: 20px; font-weight: 500;
  background: #FCEBEB; color: #A32D2D;
}
.enm-nav-badge.warn { background: #FAEEDA; color: #854F0B; }

/* Sidebar footer */
.enm-sidebar-footer {
  padding: 10px 8px;
  border-top: 1px solid var(--border);
}
.enm-user-row {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: 8px;
}
.enm-av {
  width: 30px; height: 30px; border-radius: 50%;
  background: #CECBF6; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 500; color: #3C3489; flex-shrink: 0;
}
.enm-av--purple { background: #CECBF6; color: #3C3489; }
.enm-av--green { background: #9FE1CB; color: #085041; }
.enm-av--blue { background: #B5D4F4; color: #0C447C; }
.enm-av--foto { overflow: hidden; padding: 0; }
.enm-av--foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.enm-user-name { font-size: 13px; font-weight: 500; }
.enm-user-role { font-size: 11px; color: var(--text3); }

/* Mobile overlay */
.enm-overlay {
  display: block;
  position: fixed;
  inset: 0;
  background: rgba(45, 74, 62, 0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 199;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.enm-overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
body.enm-menu-open {
  overflow: hidden;
}
.em-mob-bar__menu,
.em-mob-drawer__close {
  display: none;
}

.enm-env-banner {
  flex: 0 0 100%;
  width: 100%;
  box-sizing: border-box;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  padding: 6px 12px;
  border-bottom: 0.5px solid rgba(0,0,0,0.08);
  position: relative;
  z-index: 210;
}
.enm-env-banner--qa { background: #FAEEDA; color: #854F0B; }
.enm-env-banner--stg { background: #E6F1FB; color: #185FA5; }

/* ── Main layout ──────────────────────────────────────────────────── */
.enm-layout-main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
  overflow-x: clip;
  box-sizing: border-box;
}
@media (min-width: 992px) {
  .enm-shell {
    display: block;
  }
  #enmSidebar.em-menu {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    height: 100vh;
    width: var(--sidebar-w);
    min-width: var(--sidebar-w);
    max-width: var(--sidebar-w);
    z-index: 200;
    overflow: visible;
    transition:
      width var(--em-nav-dur) var(--em-nav-ease),
      min-width var(--em-nav-dur) var(--em-nav-ease),
      max-width var(--em-nav-dur) var(--em-nav-ease),
      padding var(--em-nav-dur) var(--em-nav-ease);
  }
  html.enm-nav-animating #enmSidebar.em-menu {
    overflow: hidden;
  }
  .enm-layout-main {
    margin-left: var(--sidebar-w);
    width: calc(100% - var(--sidebar-w));
    max-width: calc(100% - var(--sidebar-w));
    flex: none;
    box-sizing: border-box;
    transition:
      margin-left var(--em-nav-dur) var(--em-nav-ease),
      width var(--em-nav-dur) var(--em-nav-ease),
      max-width var(--em-nav-dur) var(--em-nav-ease);
  }
  .enm-layout-main > .enm-topbar {
    transition: padding-left var(--em-nav-dur) var(--em-nav-ease);
  }
  /* Relleno detrás del menú: evita el triángulo crema en la curva superior sin quitar el borde redondo. */
  .enm-shell::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-w);
    z-index: 199;
    pointer-events: none;
    background: #fff;
    transition: width var(--em-nav-dur) var(--em-nav-ease);
  }
  html.enm-nav-collapsed .enm-shell::before {
    width: var(--sidebar-rail-w);
  }
  html[data-em-menu-tema="oscuro"] .enm-shell::before,
  html:has(#enmSidebar[data-tema="oscuro"]) .enm-shell::before {
    background: linear-gradient(180deg, #2d4a3e, #223a31);
  }
  html:has(.enm-env-banner) .enm-shell::before {
    top: 33px;
  }
  .enm-layout-main::before {
    content: "";
    position: fixed;
    top: 0;
    left: calc(var(--sidebar-w) - 24px);
    width: 24px;
    height: 24px;
    background: #d4ebe7;
    z-index: 199;
    pointer-events: none;
    transition: left var(--em-nav-dur) var(--em-nav-ease);
  }
  html.enm-nav-collapsed .enm-layout-main::before {
    left: calc(var(--sidebar-rail-w) - 24px);
  }
  html:has(.enm-env-banner) .enm-layout-main::before {
    top: 33px;
  }
}

/* ── Topbar / encabezado de página (mock encabezado-pagina) ─────── */
.enm-topbar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 14px 22px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
  gap: 12px;
}
/* Encabezado mock: static/css/em-page-hdr.css (carga al final).
   No resetear aquí: una regla más específica dejaba la tarjeta transparente. */
.enm-topbar-left  { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.enm-topbar-titles { min-width: 0; flex: 1; }
.enm-topbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.enm-topbar-right:empty { display: none; }
.em-topbar-cta-tutor {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
@media (max-width: 575.98px) {
  .em-topbar-cta-tutor__lbl { display: none; }
}
.enm-topbar-dup { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
/* Hotel check-in / check-out: iconos en la barra (sin texto que se parta en móvil) */
.enm-topbar-right .enm-topbar-hotel {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  max-width: min(56vw, 360px);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.enm-topbar-right .enm-topbar-hotel::-webkit-scrollbar { display: none; }
.enm-topbar-right .enm-topbar-hotel > form { margin: 0; flex-shrink: 0; }
.enm-topbar-right .enm-btn.enm-topbar-ico {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  width: 40px;
  height: 40px;
  padding: 0;
  flex-shrink: 0;
}
.enm-topbar-right .enm-btn.enm-topbar-ico i { font-size: 18px; margin: 0; }
.enm-topbar-right .enm-btn.enm-topbar-ico .enm-topbar-ico__lbl {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.enm-topbar-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  margin: 0;
  line-height: 1.2;
}
.enm-topbar-sub {
  margin: 0;
}

.enm-nav-collapse {
  z-index: 260;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg2);
  border: 0.5px solid rgba(0, 0, 0, 0.08);
  color: var(--text3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  font-size: 13px;
  line-height: 1;
  flex: none;
}
.enm-nav-collapse:hover {
  background: var(--bg3);
  color: var(--text2);
  border-color: rgba(0, 0, 0, 0.14);
}
/* Botón menú opción A: círculo blanco flotante (mockup boton-menu-lateral-opcion-a) */
#enmSidebar.em-menu > .enm-nav-collapse.em-menu-tg {
  position: absolute;
  top: 30px;
  right: -19px;
  left: auto;
  z-index: 250;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: #fff;
  color: #2d4a3e;
  box-shadow:
    0 6px 16px rgba(45, 74, 62, 0.3),
    0 0 0 4px rgba(255, 255, 255, 0.35);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
#enmSidebar.em-menu > .enm-nav-collapse.em-menu-tg:hover {
  background: #ddf3ec;
  color: #2d4a3e;
  transform: scale(1.08);
  border-color: transparent;
}
#enmSidebar.em-menu > .enm-nav-collapse.em-menu-tg:active {
  transform: scale(0.94);
}
#enmSidebar.em-menu > .enm-nav-collapse.em-menu-tg:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.95);
  outline-offset: 3px;
  box-shadow:
    0 6px 16px rgba(45, 74, 62, 0.3),
    0 0 0 6px rgba(58, 106, 93, 0.55);
}
#enmSidebar.em-menu > .enm-nav-collapse.em-menu-tg i {
  display: block;
  font-size: 18px;
  line-height: 1;
  transition: transform var(--em-nav-dur) var(--em-nav-ease);
}
@media (min-width: 992px) {
  html.enm-nav-collapsed #enmSidebar.em-menu > .enm-nav-collapse.em-menu-tg i {
    transform: none;
  }
}
@media (min-width: 992px) {
  html.enm-nav-collapsed .enm-sidebar:not(.em-menu) {
    display: none;
  }
}

/* ── Content ──────────────────────────────────────────────────────── */
.enm-content {
  padding: 22px 24px;
  flex: 1;
  width: 100%;
  min-width: 0;
  background: linear-gradient(180deg, #d4ebe7 0%, #e9f5f2 24%, #f4f7f6 52%, #f7f6f2 100%);
}

/* ── Mobile breakpoint ───────────────────────────────────────────── */
@media (max-width: 991.98px) {
  body.enm-body { display: flex; }
  .enm-shell { display: block; min-height: 100vh; }

  .enm-sidebar,
  #enmSidebar.em-menu {
    position: fixed;
    left: 0;
    top: 0;
    width: min(300px, 86vw);
    max-width: min(300px, 86vw);
    height: 100%;
    height: 100dvh;
    overflow: visible;
    transform: translateX(-105%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
    border-radius: 0 28px 28px 0;
    z-index: 210;
  }
  .enm-sidebar.open,
  #enmSidebar.em-menu.open {
    transform: none;
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.3);
    z-index: 230;
  }
  body.enm-menu-open .enm-layout-main {
    position: relative;
    z-index: 1;
  }
  body.enm-menu-open .enm-overlay {
    z-index: 220;
  }
  #enmSidebar.em-menu > .enm-nav-collapse.em-menu-tg {
    display: none !important;
  }
  #enmSidebar.em-menu .enm-sidebar-logo.em-menu-hd {
    align-items: center;
    gap: 12px;
    padding-bottom: 18px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }
  .em-mob-drawer__close {
    display: grid !important;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-left: auto;
    flex-shrink: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    cursor: pointer;
    padding: 0;
    font-size: 20px;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease;
  }
  .em-mob-drawer__close:hover {
    background: rgba(255, 255, 255, 0.26);
  }
  .em-mob-bar__menu {
    display: grid !important;
    place-items: center;
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border: 0;
    border-radius: 15px;
    background: #ddf3ec;
    color: #2d4a3e;
    cursor: pointer;
    padding: 0;
    font-size: 22px;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease, transform 0.15s ease;
  }
  .em-mob-bar__menu:hover {
    background: #cbebe1;
  }
  .em-mob-bar__menu:active {
    transform: scale(0.94);
  }
  .enm-topbar.em-mob-bar {
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;
    padding: calc(env(safe-area-inset-top, 0px) + 12px) 14px 14px;
    background: #fff;
    border-bottom: 0;
    border-radius: 0 0 26px 26px;
    box-shadow: 0 8px 22px rgba(45, 74, 62, 0.12);
  }
  .enm-topbar.em-mob-bar .enm-topbar-left {
    flex: 1;
    min-width: 0;
    align-items: center;
    gap: 12px;
  }
  .enm-topbar.em-mob-bar .enm-topbar-title {
    font-family: var(--em-font-display, "Em Fredoka", ui-rounded, system-ui, sans-serif);
    font-weight: 700;
    font-size: 1.3rem;
    color: #2d4a3e;
    line-height: 1.15;
  }
  .enm-topbar.em-mob-bar .enm-topbar-sub {
    margin-top: 1px;
    font-size: 0.8rem;
    color: #6b6458;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .enm-topbar.em-mob-bar .enm-topbar-right {
    flex: 0 0 auto;
    width: auto;
  }
  .em-mob-bar__add,
  .em-mob-bar__actions > .enm-btn.em-mob-bar__add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 46px;
    height: 46px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: #2d4a3e;
    color: #fff;
    font-family: var(--em-font-display, "Em Fredoka", ui-rounded, system-ui, sans-serif);
    font-weight: 600;
    font-size: 0.92rem;
    box-shadow: 0 6px 14px rgba(45, 74, 62, 0.28);
    white-space: nowrap;
  }
  .em-mob-bar__add .em-mob-bar__add-txt {
    display: none;
  }
  @media (min-width: 520px) {
    .em-mob-bar__add {
      padding: 0 22px;
    }
    .em-mob-bar__add .em-mob-bar__add-txt {
      display: inline;
    }
  }
  .enm-layout-main { min-height: 100vh; }
  .enm-content { padding: 16px; }
}

/* ── Firma tutor: ancho completo ──────────────────────────────────── */
main.enm-firma-main {
  width: 100%; max-width: min(1240px, calc(100vw - 1.5rem));
  margin: 0 auto; padding: 0 0.75rem; box-sizing: border-box;
}
@media (min-width: 768px) {
  main.enm-firma-main { padding: 0 1.25rem; }
}

header.navbar-enmanada .enm-navbar-logo {
  height: 40px;
  width: auto;
  max-width: min(200px, 45vw);
  object-fit: contain;
}

/* Firma tutor: pantalla de contrato guardado (card centrada, sin barra superior) */
body.enm-firma-done header.navbar-enmanada {
  display: none;
}
body.enm-firma-done main.enm-firma-main {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 20px 40px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.enm-firma-done-wrap {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.enm-firma-done-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.enm-firma-done-brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 10px;
}
.enm-firma-done-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.enm-firma-done-brand-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}
.enm-firma-done-brand-sub {
  font-size: 12px;
  color: var(--text3);
}
.enm-firma-done-card {
  background: var(--bg2);
  border: 0.5px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px 28px;
  width: 100%;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
}
.enm-firma-done-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-light);
  border: 2px solid var(--accent-border);
  color: var(--accent-text);
  font-size: 30px;
  line-height: 1;
}
.enm-firma-done-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--accent-text);
  margin-bottom: 10px;
}
.enm-firma-done-desc {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.65;
  margin-bottom: 24px;
}
a.enm-firma-done-btn {
  font-family: 'DM Sans', sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 22px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  background: var(--teal);
  color: #fff !important;
  border: 1px solid var(--teal);
  transition: background 0.15s ease, border-color 0.15s ease;
}
a.enm-firma-done-btn:hover {
  background: var(--teal-dk);
  border-color: var(--teal-dk);
  color: #fff !important;
}
.enm-firma-done-note {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 0.5px solid var(--border);
  font-size: 12px;
  color: var(--text3);
  line-height: 1.6;
  text-align: center;
}
.enm-firma-done-note strong {
  color: var(--teal);
  font-weight: 600;
}
.enm-firma-done-foot {
  margin-top: 28px;
  font-size: 11px;
  color: var(--text3);
  text-align: center;
}

/* Firma registrada (una de dos): paleta viva */
@font-face {
  font-family: "Em Fredoka";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/fredoka-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Em Fredoka";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/fredoka-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Em Nunito";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/nunito-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Em Nunito";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/nunito-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Em Nunito";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/nunito-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
body.enm-firma-parcial,
body.enm-firma-guardado {
  margin: 0;
  min-height: 100vh;
  color: #3A352D;
  background: linear-gradient(180deg, #BFE8DC 0, #E2F4EE 300px, #FAF8F4 680px) fixed;
  font-family: "Em Nunito", system-ui, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
}
body.enm-firma-parcial header.navbar-enmanada,
body.enm-firma-guardado header.navbar-enmanada { display: none; }
body.enm-firma-parcial main.enm-firma-main,
body.enm-firma-guardado main.enm-firma-main {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 36px 16px 28px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.enm-firma-reg {
  width: 100%;
  max-width: 480px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.enm-firma-reg-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
  align-self: center;
}
.enm-firma-reg-brand img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(45, 74, 62, .2);
}
.enm-firma-reg-brand b {
  display: block;
  font-family: "Em Fredoka", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: #2D4A3E;
  line-height: 1.1;
}
.enm-firma-reg-brand span {
  font-size: .82rem;
  color: #6B6458;
}
.enm-firma-reg-card {
  width: 100%;
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 12px 36px rgba(45, 74, 62, .14);
  padding: 36px 30px 28px;
  text-align: center;
  animation: enm-firma-reg-pop .3s ease;
}
.enm-firma-reg-ic {
  width: 76px;
  height: 76px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: #DDF6E8;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 9px #EDFAF2;
}
.enm-firma-reg-ic svg {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: #1FA971;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.enm-firma-reg-card h1 {
  margin: 0 0 12px;
  font-family: "Em Fredoka", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.55rem;
  color: #2D4A3E;
  line-height: 1.2;
}
.enm-firma-reg-t {
  margin: 0;
  color: #6B6458;
  font-size: .98rem;
}
.enm-firma-reg-t b {
  color: #3A352D;
  font-weight: 700;
}
.enm-firma-guardado-t {
  margin: 0 auto;
  max-width: 380px;
  color: #6B6458;
  font-size: .98rem;
}
.enm-firma-guardado-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  text-align: left;
  margin-top: 26px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #F8F6F0;
  color: #6B6458;
  font-size: .86rem;
  line-height: 1.55;
}
.enm-firma-guardado-note svg {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  fill: none;
  stroke: #3A6A5D;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.enm-firma-guardado-note p {
  margin: 0;
}
.enm-firma-guardado-note b {
  color: #1B5E4B;
  font-weight: 700;
}
.enm-firma-reg-st {
  margin: 22px 0 0;
  display: grid;
  gap: 8px;
  text-align: left;
}
.enm-firma-reg-p {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #F8F6F0;
}
.enm-firma-reg-p .av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: "Em Fredoka", system-ui, sans-serif;
  font-weight: 700;
  font-size: .8rem;
  flex: none;
}
.enm-firma-reg-p.is-done .av { background: #DDF6E8; color: #0F6B47; }
.enm-firma-reg-p.is-wait .av { background: #FFF0CC; color: #8A5200; }
.enm-firma-reg-p > b {
  flex: 1;
  min-width: 0;
  font-family: "Em Fredoka", system-ui, sans-serif;
  font-weight: 600;
  font-size: .95rem;
  color: #2D4A3E;
  line-height: 1.25;
}
.enm-firma-reg-p .chip {
  font-family: "Em Fredoka", system-ui, sans-serif;
  font-weight: 600;
  font-size: .75rem;
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.enm-firma-reg-p.is-done .chip { background: #DDF6E8; color: #0F6B47; }
.enm-firma-reg-p.is-wait .chip { background: #FFF0CC; color: #8A5200; }
.enm-firma-reg-hr {
  border: 0;
  border-top: 1px solid #EDE8DF;
  margin: 24px 0 20px;
  opacity: 1;
}
.enm-firma-reg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  background: #DDF3EC;
  color: #1B5E4B;
  font-family: "Em Fredoka", system-ui, sans-serif;
  font-weight: 600;
  font-size: .98rem;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.enm-firma-reg-btn:hover {
  background: #CBEBE1;
  color: #1B5E4B;
  transform: translateY(-1px);
}
.enm-firma-reg-btn:focus-visible {
  outline: 3px solid rgba(58, 106, 93, .45);
  outline-offset: 2px;
}
.enm-firma-reg-foot {
  margin-top: auto;
  padding-top: 28px;
  font-size: .8rem;
  color: #6B6458;
  text-align: center;
}
@keyframes enm-firma-reg-pop {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@media (max-width: 420px) {
  .enm-firma-reg-card { padding: 30px 20px 24px; border-radius: 24px; }
  .enm-firma-reg-card h1 { font-size: 1.4rem; }
  .enm-firma-reg-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .enm-firma-reg-card { animation: none; }
  .enm-firma-reg-btn { transition: none; }
}

/* ── Botones del topbar / globales ────────────────────────────────── */
.enm-btn {
  font-family: 'DM Sans', sans-serif;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 8px;
  font-size: 13px; font-weight: 500; cursor: pointer;
  border: 1px solid var(--border2);
  background: transparent; color: var(--text);
  text-decoration: none;
  transition: background var(--tr);
  white-space: nowrap;
}
.enm-btn:hover { background: var(--bg3); color: var(--text); }
.enm-btn i { font-size: 16px; }

.enm-btn-accent {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.enm-btn-accent:hover { background: var(--accent-hover); color: #fff; }

.enm-btn-outline-green {
  color: var(--accent-text); border-color: var(--accent-border); background: transparent;
}
.enm-btn-outline-green:hover { background: var(--accent-light); }

.enm-btn-secondary {
  background: var(--bg3); color: var(--text2); border-color: var(--border2);
}
.enm-btn-secondary:hover { background: var(--bg3); color: var(--text); border-color: var(--border2); }

.enm-btn-teal {
  background: var(--teal); color: #fff; border-color: var(--teal);
}
.enm-btn-teal:hover { background: var(--teal-dk); color: #fff; }

/* ── Dashboard: métricas ──────────────────────────────────────────── */
.enm-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px; margin-bottom: 20px;
}
.enm-metric {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
}
.enm-metric-label {
  font-size: 12px; color: var(--text2); margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.enm-metric-label i { font-size: 15px; }
.enm-metric-value  { font-size: 26px; font-weight: 500; color: var(--text); }
.enm-metric-delta  { font-size: 11px; color: var(--text3); margin-top: 4px; }
.enm-metric-delta .enm-metric-delta-stat--ok { color: var(--success-text); font-weight: 500; }
.enm-metric-delta .enm-metric-delta-stat--muted { color: var(--text3); font-weight: 400; }
.enm-metric--placeholder {
  opacity: 0.65;
  pointer-events: none;
}
.enm-metric--teal { background: #E1F5EE; border-color: #9FE1CB; }
.enm-metric--teal .enm-metric-label { color: #0F6E56; }
.enm-metric--green { background: var(--accent-light); border-color: var(--accent-border); }
.enm-metric--green .enm-metric-label { color: var(--accent-text); }
.enm-metric--blue { background: var(--info-bg); border-color: var(--info-border); }
.enm-metric--blue .enm-metric-label { color: var(--info-text); }
.enm-metric--purple { background: var(--purple-bg); border-color: var(--purple-border); }
.enm-metric--purple .enm-metric-label { color: var(--purple-text); }
.enm-metric--amber { background: var(--warning-bg); border-color: var(--warning-border); }
.enm-metric--amber .enm-metric-label { color: var(--warning-text); }
.enm-metric-value--muted {
  font-size: 18px;
  color: var(--text3);
}
.enm-metric-delta.up   { color: #3B6D11; }
.enm-metric-delta.warn { color: #854F0B; }
.enm-metric-delta.danger { color: #A32D2D; }

/* ── Mascotas: conteo por plan ────────────────────────────────────── */
.enm-plan-linea { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.enm-plan-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px;
  background: #FFFFFF; border: 0.5px solid rgba(0,0,0,0.08); border-radius: 20px;
  font-size: 12px; color: #1A1A18; white-space: nowrap;
}
.enm-plan-pill b { font-weight: 500; }
.enm-plan-pill--total { background: #E1F5EE; border-color: #9FE1CB; color: #0F6E56; }
.enm-plan-pill--total i { font-size: 14px; }
.enm-plan-pill.is-vacio { color: #A0A099; }
.enm-plan-pill.is-vacio b { font-weight: 400; }
.enm-plan-pill.is-vacio .enm-plan-dot { opacity: .4; }
.enm-plan-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; }
.enm-plan-bg--green  { background: #3B6D11; }
.enm-plan-bg--teal   { background: #1D9E75; }
.enm-plan-bg--blue   { background: #185FA5; }
.enm-plan-bg--amber  { background: #FAC775; }
.enm-plan-bg--purple { background: #7F77DD; }
.enm-plan-bg--accent { background: #2D4A3E; }
.enm-plan-bg--gold   { background: #F5C842; }
.enm-plan-bg--danger { background: #F09595; }
.enm-plan-bg--info   { background: #85B7EB; }
.enm-plan-bg--muted  { background: #A0A099; }

/* ── Dashboard: grid 2 col ────────────────────────────────────────── */
.enm-dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 16px;
}
@media (max-width: 767px) {
  .enm-dash-grid { grid-template-columns: 1fr; }
  .enm-metrics   { grid-template-columns: repeat(2,1fr); }
}

/* ── Card genérica ────────────────────────────────────────────────── */
.enm-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.enm-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.enm-card-title { font-size: 13px; font-weight: 500; color: var(--text); }
.enm-card-link  {
  font-size: 12px; color: #185FA5; text-decoration: none; cursor: pointer;
}
.enm-card-link:hover { text-decoration: underline; }

/* ── Ficha contrato (design-system: guía, scard, grid datos) ───────── */
.enm-guide-box {
  background: var(--accent-light);
  border: 0.5px solid var(--accent-border);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  margin-bottom: 16px;
}
.enm-guide-box-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-text);
  margin-bottom: 4px;
}
.enm-guide-box-body {
  font-size: 12px;
  color: #27500A;
  line-height: 1.6;
}
.enm-guide-box-body strong { font-weight: 500; }

.enm-scard {
  background: var(--bg2);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 16px;
}
.enm-scard-header {
  background: var(--accent);
  color: #fff;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 7px;
}
.enm-scard-header i { font-size: 14px; opacity: 0.9; }
.enm-scard-body { padding: 16px; }

.enm-datos-section {
  background: var(--bg2);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  overflow: hidden;
}
.enm-datos-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 0.5px solid var(--border);
}
.enm-datos-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
}
.enm-datos-header-left i { font-size: 15px; color: var(--text3); }
a.enm-datos-edit {
  font-size: 12px;
  color: var(--accent-text);
  text-decoration: none;
  font-weight: 500;
}
a.enm-datos-edit:hover { text-decoration: underline; }
.enm-datos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.enm-datos-cell {
  padding: 10px 14px;
  border-bottom: 0.5px solid var(--border);
  border-right: 0.5px solid var(--border);
}
.enm-datos-label {
  font-size: 10px;
  color: var(--text3);
  margin-bottom: 2px;
}
.enm-datos-val {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}
.enm-datos-cell--wide {
  grid-column: 1 / -1;
}
.enm-ct-prestador-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.enm-ct-prestador-logo img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
}
.enm-datos-val.muted { font-weight: 400; color: var(--text2); }

.enm-firma-subdivider {
  border: none;
  border-top: 0.5px solid var(--border);
  margin: 12px 0;
}
.enm-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; padding: 3px 9px; border-radius: 20px; font-weight: 500;
}
.enm-pill-green  { background: var(--success-bg); color: var(--success-text); }
.enm-pill-amber  { background: var(--warning-bg); color: var(--warning-text); }
.enm-pill-blue   { background: var(--info-bg);    color: var(--info-text); }
.enm-pill-red    { background: var(--danger-bg);  color: var(--danger-text); }
.enm-pill-purple { background: var(--purple-bg);  color: var(--purple-text); }
.enm-pill-teal   { background: var(--teal-mist);  color: var(--teal-dk); }
.enm-pill-gray   { background: var(--bg3);        color: var(--text2); }

/* ── Activity feed ────────────────────────────────────────────────── */
.enm-activity-item {
  display: flex; gap: 10px; padding: 9px 0;
  border-bottom: 1px solid var(--border);
}
.enm-activity-item:last-child { border-bottom: none; }
.enm-act-dot {
  width: 8px; height: 8px; border-radius: 50%;
  margin-top: 5px; flex-shrink: 0;
}
.enm-act-dot.green  { background: #639922; }
.enm-act-dot.blue   { background: #378ADD; }
.enm-act-dot.amber  { background: #BA7517; }
.enm-act-dot.red    { background: #E24B4A; }
.enm-act-dot.teal   { background: var(--teal); }
.enm-act-text { font-size: 13px; line-height: 1.4; color: var(--text); }
.enm-act-time { font-size: 11px; color: var(--text3); margin-top: 2px; }

/* ── Tablas limpias ───────────────────────────────────────────────── */
.enm-table { width: 100%; border-collapse: collapse; }
.enm-table th {
  font-size: 11px; color: var(--text3); font-weight: 400;
  padding: 0 0 9px; text-align: left;
  border-bottom: 1px solid var(--border);
}
.enm-table td {
  font-size: 13px; color: var(--text); padding: 10px 0;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.enm-table tr:last-child td { border-bottom: none; }
.enm-table td.muted { color: var(--text2); }

.enm-dog-av {
  width: 28px; height: 28px; border-radius: 50%;
  background: #E1F5EE; display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.enm-dog-av i { font-size: 14px; color: #0F6E56; }

/* ── Formulario: tarjetas legadas ─────────────────────────────────── */
.enm-form-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.enm-module-card-head {
  background: var(--teal-mist);
  border-bottom: 1px solid rgba(var(--enm-brand-rgb), 0.18);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.enm-module-card-head-divider {
  border: none !important;
  border-bottom: 1px solid rgba(var(--enm-brand-rgb), 0.15) !important;
}
.enm-form-card-strip {
  height: 4px;
  background: var(--teal);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ── Alertas ──────────────────────────────────────────────────────── */
.enm-alert-info-soft {
  background: var(--teal-mist);
  border: 1px solid rgba(var(--enm-brand-rgb), 0.35);
  border-left: 4px solid var(--teal);
  color: var(--text); border-radius: var(--radius);
}
.enm-alert-info-soft svg { color: var(--teal); flex-shrink: 0; }
.enm-alert-empty {
  background: var(--teal-mist); color: var(--text);
  border-left: 4px solid var(--teal) !important;
  border-radius: var(--radius);
}
.enm-alert-vinculo {
  background: var(--teal-mist); color: var(--text);
  border-left: 4px solid var(--teal); border-radius: var(--radius);
}

/* ── Secciones evaluación ─────────────────────────────────────────── */
.enm-section-title {
  display: block; margin: 0;
  padding: 0.55rem 0.9rem;
  color: #fff; background: var(--accent);
  border-radius: var(--radius); letter-spacing: 0.04em;
}
.enm-heading-accent {
  color: var(--teal-dk);
  border-bottom: 2px solid var(--teal-soft);
  padding-bottom: 0.3rem;
}
/* Evaluación formulario — tarjetas tipo design-system (secciones con borde, filas en rejilla) */
.enm-form-scope .enm-ec-section {
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg2);
}
.enm-form-scope .enm-ec-section-header {
  margin-bottom: 0;
  border-radius: 0;
  padding: 11px 16px;
}
.enm-form-scope .enm-ec-section > .enm-ec-section-header + .enm-form-group {
  padding-top: 4px;
}
.enm-form-scope .enm-ec-section .enm-form-group {
  padding-left: 16px;
  padding-right: 16px;
  padding-bottom: 8px;
}
.enm-form-scope .enm-ec-concepto-group {
  padding: 14px 16px;
  margin-bottom: 0;
  border-bottom: 0.5px solid var(--border);
}
.enm-form-scope .enm-ec-section .enm-form-grid {
  padding-left: 16px;
  padding-right: 16px;
}
.enm-form-scope .enm-ec-section > .enm-q-row:last-child,
.enm-form-scope .enm-ec-section > .enm-form-group:last-child {
  padding-bottom: 14px;
}
.enm-form-scope .enm-q-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 220px);
  align-items: center;
  gap: 14px 20px;
  padding: 11px 16px;
  margin: 0;
  border-bottom: 0.5px solid var(--border);
}
.enm-form-scope .enm-q-row:last-child { border-bottom: none; }
.enm-form-scope .enm-q-label {
  min-width: 0;
  line-height: 1.4;
}
.enm-form-scope .enm-q-select {
  width: 100%;
  max-width: 220px;
  justify-self: end;
}
@media (max-width: 640px) {
  .enm-form-scope .enm-q-row {
    grid-template-columns: 1fr;
  }
  .enm-form-scope .enm-q-select {
    max-width: none;
    justify-self: stretch;
  }
}
.enm-ec-form-title {
  font-size: 20px; font-weight: 500; color: var(--text);
  margin-bottom: 24px; padding-bottom: 16px;
  border-bottom: 2px solid var(--accent);
}
.enm-ec-section { margin-bottom: 24px; }
.enm-ec-section-header {
  display: flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff;
  padding: 10px 16px; border-radius: 8px;
  font-size: 13px; font-weight: 500;
  margin-bottom: 16px;
}
.enm-ec-section-header i { font-size: 15px; opacity: 0.8; }
.enm-ec-section-header.purple { background: #7F77DD; }
.enm-ec-section-header.green  { background: #1D9E75; }
/* Filas fuera de .enm-form-scope (p. ej. previews) — fallback flex */
.enm-q-row {
  display: flex; justify-content: space-between;
  align-items: center; gap: 12px;
  padding: 7px 0; border-bottom: 0.5px solid var(--border);
}
.enm-q-row:last-child { border-bottom: none; }
.enm-q-label { font-size: 13px; color: var(--text); flex: 1; }
.enm-q-select { width: 160px; flex-shrink: 0; }
.enm-ec-radio-group { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 10px; }
.enm-ec-radio-option {
  display: flex; align-items: center; gap: 7px;
  cursor: pointer; font-size: 13px;
}
.enm-ec-radio-option input[type=radio] {
  width: 15px; height: 15px;
  accent-color: var(--accent); cursor: pointer; flex-shrink: 0;
}
.enm-ec-concepto-group { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }
.enm-ec-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 20px; border-top: 0.5px solid var(--border);
  margin-top: 8px; flex-wrap: wrap; gap: 12px;
}
.enm-ec-footer-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.enm-mascota-found {
  background: var(--accent-lt); border: 0.5px solid #C0DD97;
  border-radius: var(--radius); padding: 10px 14px;
  display: flex; align-items: center; gap: 10px;
  margin-top: 8px;
}
.enm-mascota-found i { font-size: 16px; color: var(--accent-text); }
.enm-mascota-found-text { font-size: 13px; color: var(--accent-text); flex: 1; }

/* ── Botones Bootstrap legados ────────────────────────────────────── */
.btn-enmanada-accent, .enm-btn-primary {
  background: var(--teal); border-color: var(--teal);
  color: #fff; font-weight: 600; border-radius: var(--radius);
}
.btn-enmanada-accent:hover, .enm-btn-primary:hover {
  background: var(--teal-dk); border-color: var(--teal-dk); color: #fff;
}
.enm-btn-primary-soft {
  background: var(--teal-mist);
  border-color: rgba(var(--enm-brand-rgb), 0.4);
  color: var(--text); font-weight: 600; border-radius: var(--radius);
}
.enm-btn-primary-soft:hover {
  background: var(--teal-soft); border-color: var(--teal); color: var(--text);
}
.enm-btn-outline {
  border-color: var(--teal); color: var(--teal-dk);
  font-weight: 600; border-radius: var(--radius);
}
.enm-btn-outline:hover {
  background: var(--teal); border-color: var(--teal); color: #fff;
}
.btn-success {
  --bs-btn-bg: var(--teal); --bs-btn-border-color: var(--teal);
  --bs-btn-hover-bg: var(--teal-dk); --bs-btn-hover-border-color: var(--teal-dk);
  --bs-btn-active-bg: var(--teal-dk); --bs-btn-active-border-color: var(--teal-dk);
}

/* ── Back nav chip ────────────────────────────────────────────────── */
a.enm-back-nav {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 1rem; font-weight: 500; font-size: 0.875rem;
  color: var(--text2); background: var(--bg2);
  border: 1px solid var(--border); border-radius: 2rem;
  box-shadow: var(--shadow-sm); text-decoration: none;
  transition: background var(--tr), color var(--tr);
}
a.enm-back-nav:hover { background: var(--bg3); color: var(--text); }

/* ── Links ────────────────────────────────────────────────────────── */
.enm-link { color: var(--teal-dk); text-decoration: none; }
.enm-link:hover { color: var(--text); }
.enm-page-title { color: var(--text); letter-spacing: 0.01em; }
.enm-list-module-title {
  font-weight: 700; font-size: clamp(1.6rem, 2.1vw, 2.2rem);
  color: var(--text); letter-spacing: 0.01em; line-height: 1.15;
}
.enm-module-form-title {
  font-weight: 700; font-size: clamp(1.55rem, 2vw, 1.9rem);
  color: var(--text); letter-spacing: 0.01em; line-height: 1.2;
}

/* ── Formulario: autofill ─────────────────────────────────────────── */
.campo-autofill-enm {
  background: var(--teal-mist) !important;
  border-color: rgba(var(--enm-brand-rgb), 0.32);
}
.enm-theme-tutores.enm-form-card,
.enm-theme-pets.enm-form-card {
  border-color: rgba(var(--enm-brand-rgb), 0.22);
}

/* ── Tarjetas mascotas ────────────────────────────────────────────── */
.enm-pet-module-grid .enm-pet-tile {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--bg2); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--tr), transform var(--tr);
}
.enm-pet-module-grid .enm-pet-tile:hover {
  box-shadow: var(--shadow-md); transform: translateY(-2px);
}
.enm-pet-tile-accent { height: 4px; background: var(--teal); }
.enm-pet-tile-body   { padding: 1rem 1.1rem 1rem; }
.enm-pet-tile-name   { color: var(--text); letter-spacing: 0.01em; }
.enm-pet-tile-name a.enm-link { color: var(--text); font-weight: 600; }
.enm-pet-tile-name a.enm-link:hover { color: var(--teal-dk); }
.enm-pet-tile-sub    { color: var(--text2); font-size: 0.83rem; }
.enm-pet-module-grid .btn-sm { min-width: 5.5rem; }

/* ── Card de datos (detalle) ──────────────────────────────────────── */
.enm-data-card .card-header.enm-card-header {
  background: var(--accent); border: none; color: #fff;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
}
.enm-kv { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; align-items: baseline; }
.enm-kv-label { color: var(--text3); font-size: 0.77rem; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.enm-kv-val   { font-weight: 600; color: var(--text); text-align: right; }

/* ── Cards búsqueda ───────────────────────────────────────────────── */
.enm-pet-card { transition: transform var(--tr), box-shadow var(--tr); }
.enm-pet-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md) !important; }
.enm-pet-card-accent { position: absolute; top:0;left:0;right:0; height:4px; background: var(--teal); }
.enm-search-card {
  border-radius: var(--radius-lg); background: var(--bg2);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.enm-search-hit { transition: transform var(--tr), box-shadow var(--tr); }
.enm-search-hit:hover { transform: translateY(-2px); box-shadow: var(--shadow-md) !important; }
.enm-pet-name { color: var(--text); }

/* ── Tarjetas tutores ─────────────────────────────────────────────── */
.enm-tutor-grid .enm-tutor-tile {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--bg2); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: box-shadow var(--tr), transform var(--tr);
}
.enm-tutor-grid .enm-tutor-tile:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.enm-tutor-tile-accent { height: 4px; background: var(--accent); }
.enm-tutor-tile-body   { padding: 1rem 1.1rem 1rem; }
.enm-tutor-tile-name   { color: var(--text); letter-spacing: 0.01em; }
.enm-tutor-tile-phone  { color: var(--teal-dk); font-weight: 500; }
.enm-tutor-grid .btn-sm { min-width: 5.5rem; }

/* ── Badge soft ───────────────────────────────────────────────────── */
.enm-badge-soft {
  background: var(--teal-mist); color: var(--text);
  font-weight: 500; border-radius: 2rem; padding: 0.22em 0.6em; font-size: 0.79rem;
}

/* ── Inicio: panel búsqueda live ──────────────────────────────────── */
.enm-home-search-panel {
  max-width: 520px;
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  border: 1px solid var(--border);
  background: var(--bg2);
  box-shadow: var(--shadow-md);
}
.enm-home-busqueda-live {
  border-radius: var(--radius);
  padding: 10px 12px;
  border: 1px solid rgba(var(--enm-brand-rgb), 0.28);
  background: var(--bg2);
  box-shadow: var(--shadow-sm);
}
.enm-home-busqueda-live-h {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text3);
}
.enm-home-busqueda-live-empty { font-size: 0.875rem; color: var(--text2); }
.enm-home-busqueda-live-ul { margin: 0; padding: 0; }
.enm-home-busqueda-live-li + .enm-home-busqueda-live-li { margin-top: 2px; }
.enm-home-busqueda-live-a {
  display: block; padding: 7px 8px; border-radius: var(--radius);
  text-decoration: none; transition: background var(--tr);
}
.enm-home-busqueda-live-a:hover { background: var(--bg3); }
.enm-home-busqueda-live-sub {
  display: block; font-size: 12px; color: var(--text3); margin-top: 1px;
}
.enm-home-busqueda-live-nombre {
  display: block; font-weight: 500; color: var(--text); font-size: 13px;
}
.enm-home-busqueda-live-nombre strong {
  font-weight: 700; color: var(--text);
  background: rgba(var(--enm-brand-rgb), 0.18);
  border-radius: 3px; padding: 0.03em 0.14em;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.enm-home-busqueda-live-sub strong {
  font-weight: 600; color: var(--text2);
  background: rgba(var(--enm-brand-rgb), 0.12);
  border-radius: 3px; padding: 0.02em 0.1em;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}

/* ── Upload zone ──────────────────────────────────────────────────── */
.enm-upload-zone {
  display: flex; align-items: center; gap: 0.6rem;
  border: 2px dashed rgba(var(--enm-brand-rgb), 0.45);
  border-radius: var(--radius); padding: 0.65rem 1rem;
  cursor: pointer; background: rgba(var(--enm-brand-rgb), 0.03);
  transition: background var(--tr), border-color var(--tr);
  color: var(--text); font-size: 0.875rem; position: relative; overflow: hidden;
}
.enm-upload-zone:hover { background: var(--teal-mist); border-color: var(--teal); }
.enm-upload-zone__icon { font-size: 1.2rem; line-height: 1; flex-shrink: 0; color: var(--teal-dk); }
.enm-upload-zone__input { position: absolute; width:0; height:0; opacity:0; pointer-events:none; }

/* ── Contratos: botones de tabla ──────────────────────────────────── */
.enm-tbl-action {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.28rem 0.7rem; font-size: 0.79rem; font-weight: 500;
  border-radius: 2rem; border: 1px solid transparent;
  line-height: 1.4; white-space: nowrap; cursor: pointer;
  text-decoration: none;
  transition: background var(--tr), border-color var(--tr), color var(--tr);
  vertical-align: middle; background: none;
}
.enm-tbl-action-view {
  color: var(--teal-dk); border-color: rgba(var(--enm-brand-rgb),.35);
  background: rgba(var(--enm-brand-rgb),.04);
}
.enm-tbl-action-view:hover { background: var(--teal-mist); border-color: var(--teal); color: var(--text); }
.enm-tbl-action-pdf  { color: var(--teal-dk); background: rgba(var(--enm-brand-rgb),.1); }
.enm-tbl-action-pdf:hover { background: rgba(var(--enm-brand-rgb),.2); color: var(--text); }
.enm-tbl-action-del  { color: #dc3545; border-color: rgba(220,53,69,.22); }
.enm-tbl-action-del:hover { background: rgba(220,53,69,.07); border-color: rgba(220,53,69,.4); color: #b02a37; }

/* ── Chips estado contratos ───────────────────────────────────────── */
.enm-estado-chip {
  display: inline-flex; align-items: center;
  padding: 0.18rem 0.6rem; border-radius: 2rem;
  font-size: 0.75rem; font-weight: 500; white-space: nowrap;
}
.enm-estado-pendiente    { background: rgba(var(--enm-brand-rgb),.1); color: var(--teal-dk); }
.enm-estado-tutor_firmado { background: rgba(13,110,253,.1); color: #0a4abf; }
.enm-estado-completado   { background: rgba(25,135,84,.1); color: #0f5132; }

/* ── Índice módulos PDF ───────────────────────────────────────────── */
.enm-docs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 900px) { .enm-docs-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .enm-docs-grid { grid-template-columns: 1fr; } }

.enm-doc-card {
  background: var(--bg2);
  border: 0.5px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  padding: 24px;
  display: flex; flex-direction: column; gap: 16px;
  transition: border-color var(--tr), box-shadow var(--tr);
}
.enm-doc-card:hover:not(.enm-doc-card--inactivo) { border-color: var(--border2) !important; box-shadow: var(--shadow-md) !important; }
.enm-doc-card--inactivo { opacity: .55; }
.enm-doc-card-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--accent-lt); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.enm-doc-card-icon i { font-size: 24px; color: var(--accent-text); }
.enm-doc-card-icon.gray { background: var(--bg3); }
.enm-doc-card-icon.gray i { color: var(--text3); }
.enm-doc-card-body { flex: 1; }
.enm-doc-card-title { font-size: 15px; font-weight: 500; margin-bottom: 5px; }
.enm-doc-card--inactivo .enm-doc-card-title { color: var(--text3); }
.enm-doc-card-desc { font-size: 13px; color: var(--text2); line-height: 1.5; }
.enm-doc-card--inactivo .enm-doc-card-desc { color: var(--text3); }
.enm-coming-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--text3);
  background: var(--bg3); padding: 3px 9px;
  border-radius: 20px; margin-top: 8px;
}
.enm-doc-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 12px;
}

/* ── Flujo contratos ──────────────────────────────────────────────── */
.enm-workflow-step {
  display: flex; gap: 1rem; padding: 1rem 0;
  border-bottom: 1px solid rgba(var(--enm-brand-rgb), 0.12);
}
.enm-workflow-step:last-child { border-bottom: none; padding-bottom: 0; }
.enm-step-dot {
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: 50%;
  font-weight: 600; font-size: 0.8rem;
  background: var(--teal-mist); color: var(--teal-dk);
  border: 2px solid rgba(var(--enm-brand-rgb), 0.28);
  margin-top: 0.05rem;
  transition: background var(--tr), border-color var(--tr), color var(--tr);
}
.enm-step-dot.done { background: var(--teal); border-color: var(--teal-dk); color: #fff; }
.enm-step-dot.next { background: var(--accent, #2D4A3E); border-color: var(--accent, #2D4A3E); color: #fff; }
.enm-workflow-step__body { flex: 1; min-width: 0; }
.enm-step-title { font-weight: 600; font-size: 0.875rem; color: var(--text); line-height: 1.3; margin-bottom: 0.2rem; }
.enm-workflow-step.is-locked { opacity: 0.62; }
.enm-workflow-step.is-locked .enm-upload-zone { pointer-events: none; }
.enm-btn:disabled,
.enm-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════════════
   Componentes adicionales: Toolbar, Cards mascotas, Tabla tutores/contratos
   ═══════════════════════════════════════════════════════════════════ */

/* ── Toolbar ──────────────────────────────────────────────────────── */
.enm-toolbar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 18px; flex-wrap: wrap;
}
.enm-search-wrap {
  position: relative; flex: 1; max-width: 320px; min-width: 180px;
}
.enm-search-wrap i {
  position: absolute; left: 10px; top: 50%;
  transform: translateY(-50%); color: var(--text3);
  font-size: 16px; pointer-events: none;
}
.enm-search-input {
  width: 100%; padding: 8px 12px 8px 34px;
  border-radius: 8px; border: 1px solid var(--border2);
  background: var(--bg2); font-family: 'DM Sans', sans-serif;
  font-size: 13px; color: var(--text); outline: none;
  transition: border-color var(--tr);
}
.enm-search-input:focus { border-color: var(--accent); }
.enm-filter-select {
  font-family: 'DM Sans', sans-serif; padding: 8px 12px;
  border-radius: 8px; border: 1px solid var(--border2);
  background: var(--bg2); font-size: 13px; color: var(--text);
  cursor: pointer; outline: none;
  transition: border-color var(--tr);
}
.enm-filter-select:focus { border-color: var(--accent); }

/* ── Grid mascotas ────────────────────────────────────────────────── */
.enm-mascota-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.enm-mascota-card {
  background: var(--bg2); border: 0.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px;
  display: flex; flex-direction: column;
  transition: border-color var(--tr), box-shadow var(--tr);
}
.enm-mascota-card:hover {
  border-color: var(--border2);
  box-shadow: var(--shadow-sm);
}
.enm-mascota-card--inactiva {
  background: #FBF7EC;
  border-color: #D9C98A;
}
.enm-mascota-card--inactiva:hover {
  border-color: #C4AF6A;
  box-shadow: 0 2px 8px rgba(180,155,60,0.12);
}
.enm-mascota-card--inactiva .enm-mascota-avatar {
  background: #F0E8C6;
}
.enm-mascota-card--inactiva .enm-mascota-avatar i { color: #9A8742; }
.enm-mascota-card--inactiva .enm-mascota-name { color: #6B5F30; }
.enm-mascota-card--inactiva .enm-mascota-divider { border-color: #DDD0A0; }
.enm-mascota-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--accent-lt);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px; flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.enm-mascota-avatar i { font-size: 26px; color: #0F6E56; }
.enm-mascota-name  { font-size: 18px; font-weight: 500; text-align: center; margin-bottom: 3px; color: var(--text); }
.enm-mascota-raza  { font-size: 12px; color: var(--text2); text-align: center; margin-bottom: 12px; }
.enm-mascota-divider { border: none; border-top: 1px solid var(--border); margin: 0 0 12px; }
.enm-mascota-meta  { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.enm-meta-row { display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
.enm-meta-label { color: var(--text); font-weight: 500; display: flex; align-items: center; gap: 5px; }
.enm-meta-label i { font-size: 13px; }
.enm-meta-val { color: var(--text); font-weight: 500; max-width: 128px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.enm-mascota-footer {
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex; gap: 6px;
}
.enm-mascota-footer .enm-btn {
  flex: 1; justify-content: center;
  padding: 6px 8px; font-size: 12px;
}

/* ── Table card ───────────────────────────────────────────────────── */
.enm-table-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.enm-table-card table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.enm-table-card th {
  font-size: 11px; color: var(--text3); font-weight: 400;
  padding: 11px 16px; text-align: left;
  border-bottom: 1px solid var(--border);
  background: var(--bg3);
}
.enm-table-card td {
  font-size: 13px; color: var(--text); padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.enm-table-card td.enm-td-estado {
  overflow: visible;
  white-space: normal;
  text-overflow: clip;
  word-break: break-word;
  vertical-align: middle;
}
.enm-table-card td.enm-td-estado .enm-pill {
  display: inline-block;
  max-width: 100%;
  white-space: normal;
  line-height: 1.35;
  hyphens: auto;
}
.enm-table-card td.enm-td-actions {
  white-space: nowrap;
  overflow: visible;
  vertical-align: middle;
  position: relative;
  z-index: 2;
  background: var(--bg2);
  box-shadow: -8px 0 12px -8px rgba(0, 0, 0, 0.06);
}
.enm-table-card tr:last-child td { border-bottom: none; }
.enm-table-card tbody tr:hover td { background: var(--bg3); cursor: pointer; }
.enm-table-card td.muted { color: var(--text2); }
.enm-table-card--tutores th {
  color: var(--text);
  font-weight: 500;
  background: #EAF3DE;
  border-bottom-color: #C0DD97;
}
.enm-table-card--tutores tbody tr.is-inactiva td { background: #FBF7EC; }
.enm-table-card--tutores tbody tr:hover td { background: #F3F7EE; }
.enm-table-card--tutores .enm-cell-name { font-size: 14px; }
.enm-pill-teal { background: #E1F5EE; color: #0F6E56; }
.enm-table-pager {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px; border-top: 1px solid var(--border);
}
.enm-page-info { font-size: 12px; color: var(--text2); }

/* ── Tutor avatar (initials) ──────────────────────────────────────── */
.enm-tutor-av {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; flex-shrink: 0;
}
.enm-row-flex { display: flex; align-items: center; gap: 10px; }
.enm-cell-name  { font-size: 13px; font-weight: 500; color: var(--text); }
.enm-cell-sub   { font-size: 11px; color: var(--text3); }

/* ── Contract icon ────────────────────────────────────────────────── */
.enm-contract-icon {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--accent-lt);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.enm-contract-icon i { font-size: 15px; color: var(--accent-tx); }

/* ── Small action button ──────────────────────────────────────────── */
.enm-action-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 8px; border-radius: 6px; font-size: 12px;
  border: 1px solid var(--border); background: none;
  cursor: pointer; color: var(--text2);
  font-family: 'DM Sans', sans-serif;
  text-decoration: none;
  transition: background var(--tr), color var(--tr);
}
.enm-action-btn:hover { background: var(--bg3); color: var(--text); }
.enm-action-btn-del:hover { background: #FCEBEB; color: #A32D2D; border-color: rgba(220,53,69,.3); }

/* ── Visor de foto (check-in hotel) ──────────────────────────────── */
.enm-hotel-foto-thumb {
  display: block;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  border-radius: 8px;
  line-height: 0;
}
.enm-hotel-foto-thumb:focus-visible {
  outline: 2px solid #2d4a3e;
  outline-offset: 2px;
}
.enm-hotel-foto-thumb img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 8px;
  border: 0.5px solid var(--border);
  display: block;
}
.enm-foto-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
.enm-foto-lightbox[hidden] { display: none !important; }
.enm-foto-lightbox__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: rgba(26, 26, 24, 0.72);
  backdrop-filter: blur(3px);
}
.enm-foto-lightbox__panel {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.enm-foto-lightbox__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
  padding: 12px 14px;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
  background: #f7f6f2;
}
.enm-foto-lightbox__cap {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: #1a1a18;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 120px;
}
.enm-foto-lightbox__acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}
.enm-foto-lightbox__frame {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: #1a1a18;
}
.enm-foto-lightbox__frame img {
  max-width: 100%;
  max-height: min(72vh, 720px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
}
body.enm-foto-lightbox-open { overflow: hidden; }

/* ── Diálogo confirmación in-app (paleta viva) ───────────────────── */
.enm-confirm {
  position: fixed; inset: 0; z-index: 3000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.enm-confirm[hidden] { display: none !important; }
.enm-confirm__backdrop {
  position: absolute; inset: 0;
  background: rgba(45, 74, 62, 0.5);
  backdrop-filter: blur(2px);
}
.enm-confirm__panel {
  position: relative;
  width: 100%; max-width: 420px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: #fff;
  border: 0;
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(45, 74, 62, 0.28);
  padding: 32px 28px 24px;
  text-align: center;
}
.enm-confirm__icon {
  width: 72px; height: 72px; border-radius: 50%;
  background: #ddf3ec;
  color: #2f8f7b;
  display: grid; place-items: center;
  margin: 0 auto 18px;
  font-size: 34px;
  box-shadow: 0 0 0 8px #eef9f5;
}
.enm-confirm--success .enm-confirm__icon {
  background: #ddf6e8;
  color: #1fa971;
  box-shadow: 0 0 0 8px #edfaf2;
}
.enm-confirm--danger .enm-confirm__icon {
  background: #fcebeb;
  color: #a32d2d;
  box-shadow: 0 0 0 8px #fff5f5;
}
.enm-confirm__title {
  font-family: var(--em-font-display, "Em Fredoka", ui-rounded, system-ui, sans-serif);
  font-size: 1.4rem; font-weight: 700; color: #2d4a3e;
  margin: 0 0 10px;
  line-height: 1.2;
}
.enm-confirm__body {
  font-size: 0.98rem; color: #6b6458;
  line-height: 1.5;
  margin: 0 auto 0;
  max-width: 340px;
  text-align: center;
}
.enm-confirm__body b { color: #3a352d; font-weight: 700; }
.enm-confirm__note {
  display: flex; gap: 10px; align-items: flex-start;
  text-align: left;
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #eef9f5;
  color: #1b5e4b;
  font-size: 0.88rem;
  font-weight: 600;
}
.enm-confirm__note i { font-size: 18px; flex: none; margin-top: 2px; }
.enm-confirm__chips {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 8px;
  margin-top: 14px;
}
.enm-confirm__chip {
  font-family: var(--em-font-display, "Em Fredoka", ui-rounded, system-ui, sans-serif);
  font-size: 0.8rem; font-weight: 600;
  padding: 5px 12px; border-radius: 999px;
  background: #ddf6e8; color: #0f6b47;
}
.enm-confirm__chip--muted { background: #f4f1ea; color: #6b6458; }
.enm-confirm__warn {
  display: flex; gap: 12px; align-items: flex-start;
  text-align: left;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff0cc;
  color: #5e3800;
  font-size: 0.88rem;
  line-height: 1.5;
}
.enm-confirm__warn i { font-size: 20px; color: #8a5200; flex: none; margin-top: 1px; }
.enm-confirm__warn b {
  display: block;
  font-family: var(--em-font-display, "Em Fredoka", ui-rounded, system-ui, sans-serif);
  font-size: 0.92rem;
  color: #8a5200;
  margin-bottom: 2px;
}
.enm-confirm__warn strong {
  font-weight: 600;
  color: #3a352d;
}
.enm-confirm__warn code {
  font-weight: 600;
  font-size: inherit;
  color: #3a352d;
  background: transparent;
  padding: 0;
  border-radius: 0;
  word-break: break-word;
}
.enm-confirm__actions {
  display: flex; gap: 10px; margin-top: 26px;
}
.enm-confirm--solo .enm-confirm__actions {
  margin-top: 24px;
  display: block;
  width: 100%;
}
.enm-confirm__btn-gh,
.enm-confirm__btn-pri {
  flex: 1;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  font-family: var(--em-font-display, "Em Fredoka", ui-rounded, system-ui, sans-serif);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0 18px;
}
.enm-confirm__btn-gh {
  background: #fff;
  color: #3a352d;
  box-shadow: inset 0 0 0 1.5px #e4ded3;
}
.enm-confirm__btn-gh:hover { background: #f6f3ec; }
.enm-confirm__btn-pri {
  background: #2d4a3e;
  color: #fff;
  box-shadow: 0 6px 14px rgba(45, 74, 62, 0.25);
}
.enm-confirm__btn-pri:hover { background: #3a6a5d; }
.enm-confirm--danger .enm-confirm__btn-pri {
  background: #a32d2d;
  box-shadow: 0 6px 14px rgba(163, 45, 45, 0.25);
}
.enm-confirm--danger .enm-confirm__btn-pri:hover { background: #8c2626; }
.enm-confirm--solo .enm-confirm__btn-pri {
  width: 100%;
  max-width: 100%;
  flex: none;
  display: block;
  margin: 0 auto;
}
#enmConfirmRoot.enm-confirm__panel,
#enmConfirmRoot .enm-confirm__panel {
  text-align: center;
}
#enmConfirmRoot .enm-confirm__title {
  font-family: var(--em-font-display, "Em Fredoka", ui-rounded, system-ui, sans-serif);
  font-weight: 700;
  font-size: 1.4rem;
  color: #2d4a3e;
}
#enmConfirmRoot .enm-confirm__body {
  text-align: center;
  text-wrap: pretty;
}
#enmConfirmRoot .enm-confirm__actions {
  display: flex;
  gap: 10px;
  margin-top: 26px;
}
#enmConfirmRoot .enm-confirm__btn-gh,
#enmConfirmRoot .enm-confirm__btn-pri {
  flex: 1 1 0;
  width: auto;
  min-height: 48px;
  margin: 0;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  font-family: var(--em-font-display, "Em Fredoka", ui-rounded, system-ui, sans-serif);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#enmConfirmRoot .enm-confirm__btn-gh {
  background: #fff;
  color: #3a352d;
  box-shadow: inset 0 0 0 1.5px #e4ded3;
}
#enmConfirmRoot .enm-confirm__btn-pri {
  background: #2d4a3e;
  color: #fff;
  box-shadow: 0 6px 14px rgba(45, 74, 62, 0.25);
}
#enmConfirmRoot.enm-confirm--solo #enmConfirmCancel { display: none !important; }
@media (max-width: 420px) {
  .enm-confirm__panel { padding: 28px 20px 20px; }
  .enm-confirm__actions { flex-direction: column-reverse; }
}

/* ═══════════════════════════════════════════════════════════════════
   Componentes: Hero, Info-row, Grid2/3, Breadcrumb, Obs-block, Fichas detalle
   ═══════════════════════════════════════════════════════════════════ */

/* ── Topbar sub-title ─────────────────────────────────────────────── */
.enm-topbar-sub { font-size: 12px; color: var(--text3); margin-top: 1px; }
.enm-topbar-sub:empty { display: none; }

/* ── Breadcrumb ───────────────────────────────────────────────────── */
.enm-breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text2);
}
.enm-breadcrumb a { color: var(--text2); text-decoration: none; transition: color var(--tr); }
.enm-breadcrumb a:hover { color: var(--text); }
.enm-breadcrumb i { font-size: 14px; color: var(--text3); }
.enm-breadcrumb span { color: var(--text); font-weight: 500; }

/* ── Grids de secciones ───────────────────────────────────────────── */
.enm-grid3 {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  align-items: start;
  gap: 16px; margin-bottom: 16px;
}
.enm-grid3 > :nth-child(1) { grid-column: 1; grid-row: 1; }
.enm-grid3 > :nth-child(3) { grid-column: 2; grid-row: 1; }
.enm-grid3 > :nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
.enm-grid2 {
  display: grid;
  grid-template-columns: minmax(0,1.4fr) minmax(0,1fr);
  gap: 16px; margin-bottom: 16px;
}
@media (max-width: 991.98px) {
  .enm-grid3 { grid-template-columns: 1fr; }
  .enm-grid3 > :nth-child(1),
  .enm-grid3 > :nth-child(2),
  .enm-grid3 > :nth-child(3) { grid-column: auto; grid-row: auto; }
  .enm-grid2 { grid-template-columns: 1fr; }
}
@media (min-width: 768px) and (max-width: 991.98px) {
  .enm-grid3 { grid-template-columns: 1fr 1fr; }
}

/* ── Hero card ────────────────────────────────────────────────────── */
.enm-hero-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  display: flex; align-items: flex-start; gap: 20px;
  margin-bottom: 20px;
}
.enm-hero-avatar {
  width: 96px; height: 96px; border-radius: 50%;
  background: var(--accent-lt);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; border: 3px solid #C0DD97;
  position: relative;
  overflow: hidden;
}
.enm-hero-avatar i { font-size: 44px; color: var(--accent-tx); }
.enm-hero-avatar img,
.enm-mascota-avatar img,
.enm-mascota-mini-av img,
.enm-edit-av img,
.enm-dog-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
  position: absolute;
  inset: 0;
}
.enm-pet-av-shell {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
}
.enm-pet-av-has-foto { background: #EFEFEA; overflow: hidden; }
.enm-pet-av-cam,
.enm-pet-av-del {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0.5px solid rgba(0,0,0,0.14);
  cursor: pointer;
  z-index: 2;
}
.enm-pet-av-cam {
  right: 0;
  bottom: 0;
  transform: translate(-45%, -45%);
  background: #2D4A3E;
  color: #fff;
}
.enm-pet-av-cam:hover { background: #3A5E50; }
.enm-pet-av-cam input { display: none; }
.enm-pet-av-cam i,
.enm-pet-av-del i { font-size: 9px; color: inherit; line-height: 1; }
.enm-pet-av-del {
  right: 0;
  top: 0;
  transform: translate(-45%, 45%);
  background: #FFFFFF;
  color: #A32D2D;
}
.enm-pet-av-del:hover { background: #FCEBEB; }
.enm-pet-av-form,
.enm-pet-av-del-form { margin: 0; padding: 0; }
.enm-hero-avatar-tutor {
  width: 72px; height: 72px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 600; flex-shrink: 0;
  border: 3px solid transparent;
}
.enm-hero-info  { flex: 1; min-width: 0; }
.enm-hero-name  { font-size: 22px; font-weight: 500; margin-bottom: 2px; }
.enm-hero-sub   { font-size: 14px; color: var(--text2); margin-bottom: 14px; }
.enm-hero-tags  { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.enm-hero-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; padding: 4px 10px; border-radius: 20px;
  border: 1px solid var(--border2); color: var(--text2); background: var(--bg3);
}
.enm-hero-tag i { font-size: 13px; }
.enm-hero-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
  width: 100%;
}
.enm-hero-meta--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.enm-hero-mini-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.enm-hero-mini-stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  background: var(--bg2);
  border: 0.5px solid var(--border);
  border-radius: 8px;
  min-height: 0;
}
.enm-hero-mini-stat__label {
  font-size: 11px;
  color: var(--text3);
  line-height: 1.2;
}
.enm-hero-mini-stat__val {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.2;
}
.enm-hero-mini-stat .enm-pill {
  font-size: 11px;
  padding: 2px 8px;
}
.enm-ingreso-colegio-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--info-bg);
  border: 0.5px solid var(--info-border);
  border-radius: var(--radius);
  width: 100%;
  box-sizing: border-box;
}
.enm-ingreso-colegio-bar > i.ti {
  font-size: 18px;
  color: var(--info-text);
  flex-shrink: 0;
}
.enm-ingreso-colegio-bar__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-right: 4px;
}
.enm-ingreso-colegio-bar__form {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.enm-ingreso-colegio-bar__form .enm-form-input[type="date"] {
  width: auto;
  min-width: 148px;
  font-size: 12px;
  padding: 6px 10px;
  background: #fff;
}
.enm-ingreso-colegio-bar__form .enm-btn {
  font-size: 12px;
  padding: 6px 12px;
}
.enm-ingreso-colegio-bar__hint {
  flex: 1 1 100%;
  margin: 0;
  font-size: 11px;
  color: var(--text3);
  line-height: 1.4;
}
@media (max-width: 991.98px) {
  .enm-hero-meta { grid-template-columns: 1fr 1fr; }
  .enm-hero-meta--3 { grid-template-columns: 1fr; }
}
.enm-meta-block { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.enm-meta-block .enm-pill { width: auto; max-width: max-content; }
.enm-meta-block-label { font-size: 11px; color: var(--text3); }
.enm-meta-block-val   { font-size: 14px; font-weight: 500; color: var(--text); }
.enm-hero-stats {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px;
}
.enm-hero-stat {
  display: inline-flex; flex-direction: row; align-items: center; gap: 8px; width: auto;
  padding: 5px 10px; background: #F7F6F2; border-radius: 8px;
}
.enm-hero-stat-label {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: #6B6B65;
}
.enm-hero-stat-label i { font-size: 13px; }
.enm-hero-stat-val { font-size: 13px; font-weight: 500; color: #1A1A18; }
.enm-hero-stat .enm-pill { width: auto; }
.enm-hero-stat--ok { background: #EAF3DE; }
.enm-hero-stat--ok .enm-hero-stat-label { color: #27500A; }
.enm-hero-stat--off { background: #FAEEDA; }
.enm-hero-stat--off .enm-hero-stat-label { color: #854F0B; }
.enm-hero-stat--dias { background: #E1F5EE; }
.enm-hero-stat--dias .enm-hero-stat-label,
.enm-hero-stat--dias .enm-hero-stat-val { color: #0F6E56; }
.enm-hero-stat--ingreso { background: #E6F1FB; }
.enm-hero-stat--ingreso .enm-hero-stat-label,
.enm-hero-stat--ingreso .enm-hero-stat-val { color: #185FA5; }

/* ── Ficha mascota: resumen compacto (sustituye hero grande) ───────── */
.enm-pet-strip {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.enm-pet-strip-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  flex: 1 1 220px;
}
.enm-pet-strip-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-lt);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.enm-pet-strip-avatar i { font-size: 22px; color: var(--accent-tx); }
.enm-pet-strip-name {
  font-size: 17px;
  font-weight: 500;
  margin: 0 0 2px;
  line-height: 1.25;
  color: var(--text);
}
.enm-pet-strip-sub {
  font-size: 13px;
  color: var(--text2);
  margin: 0 0 8px;
  line-height: 1.35;
}
.enm-pet-strip-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.enm-pet-strip-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 22px;
  align-items: flex-start;
}
.enm-pet-strip-stat-note { font-size: 11px; color: var(--text3); font-weight: 400; display: block; margin-top: 2px; }

/* ── Contrato detalle: cabecera alineada al diseño ─────────────────── */
.enm-ct-page-head { margin-bottom: 18px; }
.enm-ct-back { font-size: 13px; color: var(--text2); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; margin-bottom: 10px; }
.enm-ct-back:hover { color: var(--text); }
.enm-ct-title-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.enm-ct-h1 { font-size: 20px; font-weight: 500; margin: 0 0 4px; color: var(--text); }
.enm-ct-meta { font-size: 13px; color: var(--text2); margin: 0; line-height: 1.4; }
.enm-ct-meta a { color: var(--accent); font-weight: 500; text-decoration: none; }
.enm-ct-meta a:hover { text-decoration: underline; }
.enm-ct-scard { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 16px; }
.enm-ct-scard-h {
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.enm-ct-scard-h i { font-size: 15px; opacity: 0.9; }
.enm-ct-scard-b { padding: 16px; }

/* Stat chips (hero tutor / contrato) */
.enm-stat-chip {
  background: var(--bg3);
  border-radius: var(--radius);
  padding: 12px 10px;
  text-align: center;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  box-sizing: border-box;
}
.enm-stat-chip--ended {
  background: #FCEBEB;
  border: 0.5px solid #F09595;
}
.enm-stat-chip--contrato {
  background: #EAF3DE;
  border: 0.5px solid #C0DD97;
}
.enm-stat-chip--contrato .enm-stat-chip-val {
  font-size: 13px;
  color: #27500A;
}
.enm-stat-chip-val {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.25;
  width: 100%;
  overflow-wrap: break-word;
}
.enm-stat-chip-val .enm-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  max-width: 100%;
  white-space: normal;
  line-height: 1.3;
  padding: 3px 8px;
}
.enm-stat-chip-val.is-danger,
.enm-stat-chip-label.is-danger { color: #A32D2D; }
.enm-stat-chip-val.is-warn { color: #B35A00; }
.enm-stat-chip-label { font-size: 11px; color: var(--text3); line-height: 1.3; }

.enm-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text);
  cursor: pointer;
  line-height: 1.4;
}
.enm-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  flex-shrink: 0;
  accent-color: #2D4A3E;
}

/* ── Card (ficha): header + title + action ────────────────────────── */
.enm-card-title {
  font-size: 14px; font-weight: 500;
  display: flex; align-items: center; gap: 7px;
  color: var(--text);
}
.enm-card-title i { font-size: 16px; color: var(--text3); }
.enm-card-action {
  font-size: 12px; color: #185FA5; cursor: pointer;
  text-decoration: none; border: none; background: none; padding: 0;
  font-family: 'DM Sans', sans-serif;
  transition: opacity var(--tr);
}
.enm-card-action:hover { text-decoration: underline; }
.enm-card-header .enm-btn { padding: 5px 12px; font-size: 12px; }
.enm-card-header .enm-btn i { font-size: 14px; }

.enm-avisos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.enm-avisos-kicker {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 8px;
}
.enm-avisos { display: flex; flex-direction: column; gap: 6px; }
.enm-avisos-scroll {
  max-height: 200px;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.14) transparent;
}
.enm-avisos-grupo { display: flex; flex-direction: column; gap: 6px; }
.enm-avisos-grupo[hidden],
.enm-avisos-col[hidden],
[data-aviso][hidden] { display: none !important; }
.enm-avisos-restaurar {
  margin-left: auto;
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  color: var(--accent-tx);
  cursor: pointer;
}
.enm-avisos-restaurar:hover { text-decoration: underline; }
.enm-avisos-vacio { font-size: 12px; color: var(--text3); margin: 4px 0 0; }
.enm-aviso-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: currentColor;
  opacity: 0.55;
  padding: 0;
  cursor: pointer;
  font-size: 11px;
  transition: background var(--tr), color var(--tr);
}
.enm-aviso-x:hover { opacity: 1; background: rgba(0, 0, 0, 0.06); }
.enm-aviso-chip a { color: inherit; text-decoration: none; }
.enm-avisos-hotel { display: flex; flex-direction: column; }
.enm-aviso-hotel-head,
.enm-aviso-hotel-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 12px;
  align-items: baseline;
}
.enm-aviso-hotel-head {
  padding: 0 26px 6px 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--text2);
}
.enm-aviso-hotel-head span:last-child { text-align: right; }
.enm-aviso-hotel {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 0.5px solid var(--border);
}
.enm-aviso-hotel:last-child { border-bottom: none; }
.enm-aviso-hotel-link {
  flex: 1;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
}
.enm-aviso-hotel .enm-aviso-name { font-weight: 500; }
.enm-aviso-hotel .enm-aviso-cuando {
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  text-align: right;
}
.enm-aviso-hotel .enm-aviso-x { margin-left: auto; color: var(--text3); }
.enm-aviso-chip { gap: 4px; padding-right: 4px; }
.enm-aviso-perro { position: relative; padding-right: 30px; }
.enm-aviso-perro .enm-aviso-x {
  position: absolute;
  top: 6px;
  right: 6px;
  color: var(--text2);
}
.enm-aviso-perro-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: inherit;
  text-decoration: none;
}
.enm-avisos-sub {
  font-size: 11px;
  color: var(--text3);
  margin-top: 2px;
}
.enm-avisos-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.enm-aviso-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  border: 0.5px solid var(--border);
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
}
.enm-aviso-chip:hover { background: var(--bg3); color: var(--text); }
.enm-aviso-chip--hotel { background: #E1F5EE; border-color: #9FE1CB; color: #0F6E56; }
.enm-aviso-chip--hoy { background: #FAEEDA; border-color: #FAC775; color: #854F0B; }
.enm-aviso-perro {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  border: 0.5px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  text-decoration: none;
  color: var(--text);
}
.enm-aviso-perro:hover { background: var(--bg3); color: var(--text); }
.enm-aviso-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.enm-aviso-tag {
  font-size: 11px;
  color: var(--text2);
  background: var(--bg3);
  border-radius: 20px;
  padding: 2px 8px;
}
.enm-aviso-tag--hoy { background: #FAEEDA; color: #854F0B; }
.enm-aviso {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg);
  border: 0.5px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
}
.enm-aviso:hover { background: var(--bg3); color: var(--text); }
.enm-aviso-name { font-weight: 500; color: var(--text); }
.enm-aviso-meta { font-size: 12px; color: var(--text3); text-align: right; }

/* ── Info row (label / value) ─────────────────────────────────────── */
.enm-info-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px;
}
.enm-info-row:last-child { border-bottom: none; }
.enm-info-label { color: var(--text2); flex-shrink: 0; }
.enm-info-val   {
  font-weight: 500; text-align: right; color: var(--text);
  min-width: 0; overflow-wrap: anywhere; word-break: break-word;
}
.enm-info-val.is-empty,
.enm-info-val .is-empty { color: var(--text3); font-weight: 400; }
.enm-info-row--noche { align-items: flex-start; }
.enm-noche-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}
.enm-noche-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
}
.enm-noche-hint {
  margin: 0;
  text-align: right;
  max-width: 280px;
}

/* ── Obs block ────────────────────────────────────────────────────── */
.enm-obs-block {
  background: var(--bg3); padding: 12px;
  font-size: 13px; color: var(--text2); line-height: 1.6;
  border-left: 3px solid #9FE1CB;
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* ── Tutor link card (inside ficha mascota) ───────────────────────── */
.enm-tutor-link-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; background: var(--bg3); border-radius: var(--radius);
  cursor: pointer; text-decoration: none;
  transition: background var(--tr); margin-bottom: 14px;
}
.enm-tutor-link-card:hover { background: var(--border); }
.enm-tutor-av-lg {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; flex-shrink: 0;
}

/* ── Mascotas mini grid (ficha tutor) ─────────────────────────────── */
.enm-mascotas-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.enm-mascota-mini {
  background: var(--bg3); border-radius: var(--radius);
  padding: 12px; text-align: center; cursor: pointer;
  text-decoration: none; display: block;
  transition: background var(--tr);
}
.enm-mascota-mini:hover { background: var(--border); }
.enm-mascota-mini-av {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent-lt);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 8px;
  overflow: hidden;
  position: relative;
}
.enm-mascota-mini-av i { font-size: 20px; color: var(--accent-tx); }
.enm-mascota-mini-name { font-size: 13px; font-weight: 500; color: var(--text); }
.enm-mascota-mini-raza { font-size: 11px; color: var(--text3); margin-top: 1px; }

/* ── Botones de estado (activo/inactivo) ──────────────────────────── */
.enm-btn-danger {
  background: var(--danger-bg); color: var(--danger-text);
  border-color: var(--danger-border);
}
.enm-btn-danger:hover { background: #F5C4C4; color: #7A1C1C; }
.enm-btn-success {
  background: var(--success-bg); color: var(--success-text);
  border-color: var(--success-border);
}
.enm-btn-success:hover { background: #D0E8C4; color: var(--success-text); }

/* ── Alert banner (ficha mascota) ────────────────────────────────── */
.enm-alert-banner {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 14px; border-radius: 8px;
  font-size: 12px; line-height: 1.55; flex-wrap: wrap;
  border: 0.5px solid transparent;
}
.enm-alert-banner i { font-size: 15px; flex-shrink: 0; margin-top: 1px; }
.enm-alert-warn  { background: var(--warning-bg); border-color: var(--warning-border); color: var(--warning-text); }
.enm-alert-info  { background: var(--info-bg);    border-color: var(--info-border);    color: var(--info-text); }
.enm-alert-ok    { background: var(--success-bg); border-color: var(--success-border); color: var(--success-text); }
.enm-alert-danger { background: var(--danger-bg); border-color: var(--danger-border);  color: var(--danger-text); }

/* ── Toasts (flash + enmMostrarToast) — paleta viva + barra de tiempo ─ */
@keyframes enm-toast-ttl-shrink {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}
@keyframes enm-toast-in-viva {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}
.enm-toast-stack {
  position: fixed;
  z-index: 400;
  left: 14px;
  right: 14px;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  max-width: min(900px, calc(100vw - 28px));
  margin: 0 auto;
  pointer-events: none;
}
body:has(.enm-env-banner) .enm-toast-stack {
  top: calc(env(safe-area-inset-top, 0px) + 44px);
}
.enm-toast-stack--inline {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  z-index: 2;
  margin: 0 0 14px;
  max-width: none;
  width: 100%;
  pointer-events: none;
}
@media (min-width: 992px) {
  .enm-toast-stack:not(.enm-toast-stack--inline) {
    left: auto;
    right: 20px;
    top: 20px;
    width: min(420px, calc(100vw - 40px));
    max-width: 420px;
    align-items: flex-end;
    margin: 0;
  }
  body:has(.enm-env-banner) .enm-toast-stack:not(.enm-toast-stack--inline) {
    top: 52px;
  }
  .enm-toast-stack--inline {
    margin-bottom: 16px;
  }
}
.enm-toast {
  --enm-toast-ms: 6s;
  pointer-events: auto;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 12px 8px 15px 14px;
  border-radius: 18px;
  border: 0;
  background: #ddf6e8;
  color: #0f6b47;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  max-width: 100%;
  box-shadow: 0 6px 18px rgba(45, 74, 62, 0.1);
  animation: enm-toast-in-viva 0.3s ease both;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.enm-toast.is-out {
  opacity: 0;
  transform: translateY(-6px);
}
.enm-toast-ttl {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  transform-origin: left center;
  animation: enm-toast-ttl-shrink var(--enm-toast-ms) linear forwards;
  pointer-events: none;
}
.enm-toast-ico {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #2d4a3e;
  color: #fff;
}
.enm-toast-ico i { font-size: 18px; }
.enm-toast-msg { flex: 1; min-width: 0; }
.enm-toast--stack { align-items: flex-start; }
.enm-toast--stack .enm-toast-ico { margin-top: 2px; }
.enm-toast-title { display: block; font-weight: 600; font-size: 0.9rem; line-height: 1.35; }
.enm-toast-detail {
  display: block;
  font-weight: 500;
  font-size: 0.82rem;
  margin-top: 4px;
  color: inherit;
  opacity: 0.9;
}
.enm-toast-close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: inherit;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  opacity: 0.85;
}
.enm-toast-close i { font-size: 18px; }
.enm-toast-close:hover { background: rgba(255, 255, 255, 0.7); opacity: 1; }
.enm-toast--ok {
  background: #ddf6e8;
  color: #0f6b47;
}
.enm-toast--ok .enm-toast-ttl { background: #1fa971; }
.enm-toast--info {
  background: #ddf0ff;
  color: #0b5394;
}
.enm-toast--info .enm-toast-ico { background: #0b5394; }
.enm-toast--info .enm-toast-ttl { background: #3b82f6; }
.enm-toast--warn {
  background: #fff0cc;
  color: #8a5200;
}
.enm-toast--warn .enm-toast-ico { background: #b45309; color: #fff; }
.enm-toast--warn .enm-toast-ttl { background: #d97706; }
.enm-toast--danger {
  background: #fde8e6;
  color: #b42318;
}
.enm-toast--danger .enm-toast-ico { background: #b42318; color: #fff; }
.enm-toast--danger .enm-toast-ttl { background: #e11d48; }
@media (prefers-reduced-motion: reduce) {
  .enm-toast-ttl { display: none; }
  .enm-toast { animation: none; }
}

/* ── Timeline actividad reciente ──────────────────────────────────── */
.enm-card-actividad { margin-bottom: 0; }
.enm-timeline { display: flex; flex-direction: column; gap: 0; }
.enm-timeline-item {
  display: flex; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.enm-timeline-item:last-child { border-bottom: none; }
.enm-tl-icon {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 2px;
}
.enm-tl-icon i { font-size: 15px; }
.enm-tl-ic-green { background: #EAF3DE; color: #3B6D11; }
.enm-tl-ic-blue  { background: #E6F1FB; color: #185FA5; }
.enm-tl-ic-amber { background: #FAEEDA; color: #854F0B; }
.enm-tl-ic-red   { background: #FCEBEB; color: #A32D2D; }
.enm-tl-ic-gray  { background: #F1EFE8; color: #5F5E5A; }
.enm-tl-body     { flex: 1; min-width: 0; }
.enm-tl-title    { font-size: 13px; font-weight: 500; color: var(--text); }
.enm-tl-desc     { font-size: 12px; color: var(--text2); margin-top: 1px; line-height: 1.4; }
.enm-tl-date     { font-size: 11px; color: var(--text3); flex-shrink: 0; margin-top: 3px; }

/* ── Modal registro mascota (lista) ───────────────────────────────── */
/* Scroll al abrir modal: enm-scroll-keep.js */
.enm-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1080;
  align-items: center;
  justify-content: center;
  padding: 28px;
}
.enm-modal-overlay.open { display: flex; }
.enm-modal {
  position: relative;
  background: var(--bg2);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border2);
  width: 100%;
  max-width: 520px;
  overflow: visible;
  box-shadow: var(--shadow-md);
}
.enm-modal--wide { max-width: 560px; }
.enm-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 36px 0 22px;
  margin-bottom: 16px;
}
.enm-modal-title { font-size: 16px; font-weight: 500; color: var(--text); }
.enm-modal-form,
.em-ing-historial-body {
  max-height: min(72vh, 620px);
  overflow-y: auto;
}
.enm-modal-form { padding: 0 22px 22px; }
.enm-modal-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 2px;
}
.enm-modal-form-group { margin-bottom: 14px; }
.enm-tutor-pick { position: relative; }
.enm-tutor-pick-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  text-align: left;
  cursor: pointer;
  background: var(--bg2);
}
.enm-tutor-pick-btn .ti { font-size: 16px; color: var(--text3); flex-shrink: 0; }
.enm-tutor-pick-btn-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.enm-tutor-pick-btn.is-empty .enm-tutor-pick-btn-text { color: var(--text3); }
.enm-tutor-pick-panel {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1100;
  margin-top: 4px;
  background: var(--bg2);
  border: 0.5px solid var(--border2);
  border-radius: 8px;
  overflow: hidden;
}
.enm-tutor-pick-panel[hidden] { display: none; }
.enm-tutor-pick-panel:not([hidden]) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.enm-tutor-pick-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 8px 10px;
  border-bottom: 0.5px solid var(--border);
}
.enm-tutor-pick-search .ti { font-size: 16px; color: var(--text3); flex-shrink: 0; }
.enm-tutor-pick-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  padding: 0;
}
.enm-tutor-pick-search-input::placeholder { color: var(--text3); }
.enm-tutor-pick-list {
  max-height: 360px;
  overflow-y: auto;
}
.enm-tutor-pick-empty {
  margin: 0;
  padding: 12px 11px;
  font-size: 13px;
  color: var(--text3);
  line-height: 1.4;
}
.enm-tutor-pick-item {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  min-height: 36px;
  padding: 8px 11px;
  font-family: inherit;
  font-size: 13px;
  line-height: 20px;
  color: var(--text);
  background: transparent;
  border: none;
  border-bottom: 0.5px solid var(--border);
  cursor: pointer;
  transition: background 0.12s;
}
.enm-tutor-pick-item:last-child { border-bottom: none; }
.enm-tutor-pick-item:hover { background: var(--bg3); }
.enm-tutor-pick-item.is-on { background: var(--accent-light); color: var(--accent-text); }
.enm-tutor-pick-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.enm-modal-form-group-wide { grid-column: 1 / -1; }
.enm-modal-label-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.enm-modal-label-action .enm-modal-label { margin-bottom: 0; }
.enm-modal-link-action {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.enm-modal-link-action:hover { color: var(--accent-hover, var(--accent)); text-decoration: underline; }
.enm-modal-alerts-zone { margin-bottom: 14px; }
.enm-modal-alerts-zone .enm-modal-inline-alert { margin-bottom: 8px; }
.enm-modal-alerts-zone .enm-modal-inline-alert:last-child { margin-bottom: 0; }
.enm-modal-form-group-muted .enm-modal-input { background: var(--bg3); }
.enm-modal-label {
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 5px;
  display: block;
}
.enm-modal-label-note { font-weight: 400; color: var(--text3); }
.enm-modal-hint {
  font-size: 11px;
  color: var(--text3);
  margin: 4px 0 0;
  line-height: 1.35;
}
.enm-modal-input {
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border2);
  background: var(--bg2);
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  outline: none;
}
.enm-modal-input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(45, 74, 62, 0.12); }
.enm-modal-textarea { resize: vertical; min-height: 72px; }
.enm-modal-dd {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1090;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  max-height: 220px;
  overflow-y: auto;
  box-shadow: var(--shadow-sm);
}
.enm-modal-dd-item {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.enm-modal-dd-item:hover { background: var(--teal-mist); }
.enm-modal-dd-sub { color: var(--text3); font-size: 12px; }
.enm-modal-inline-alert {
  font-size: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 0.5px solid transparent;
  margin-bottom: 12px;
  line-height: 1.4;
}
.enm-modal-inline-alert-warn   { background: var(--warning-bg); border-color: var(--warning-border); color: var(--warning-text); }
.enm-modal-inline-alert-info   { background: var(--info-bg);    border-color: var(--info-border);    color: var(--info-text); }
.enm-modal-inline-alert-danger { background: var(--danger-bg);  border-color: var(--danger-border);  color: var(--danger-text); }
.enm-modal-footer-note {
  font-size: 12px;
  color: var(--text2);
  margin: 4px 0 16px;
  line-height: 1.4;
}
.enm-modal-footer-note a,
.enm-modal-footer-note-btn {
  font-weight: 500;
  font-family: inherit;
  font-size: inherit;
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.enm-modal-footer-note-btn:hover { color: var(--accent-hover); }
.enm-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
@media (max-width: 540px) {
  .enm-modal-form-row { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════
   Formularios de edición estilo PawAdmin
   ═══════════════════════════════════════════════════════════════════ */

/* Mini avatar header en editar */
.enm-edit-avatar-bar {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); margin-bottom: 16px;
  min-width: 0;
}
.enm-edit-av {
  width: 104px; height: 104px; border-radius: 50%;
  background: var(--accent-lt);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; border: 3px solid #C0DD97;
  position: relative;
  overflow: hidden;
}
.enm-edit-av i { font-size: 48px; color: var(--accent-tx); }
.enm-edit-av-name { font-size: 18px; font-weight: 500; margin-bottom: 2px; overflow-wrap: anywhere; }
.enm-edit-av-meta { min-width: 0; flex: 1; }
.enm-edit-av-sub  { font-size: 13px; color: var(--text2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }

/* Form card — contenedor de sección del formulario */
.enm-form-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px;
  margin-bottom: 16px;
  position: relative;
}
.enm-form-card:focus-within { z-index: 8; }
.enm-form-section-title {
  font-size: 13px; font-weight: 500; color: var(--text);
  margin-bottom: 16px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 7px;
}
.enm-form-section-title i { font-size: 16px; color: var(--text3); }
.enm-form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
@media (max-width: 767.98px) { .enm-form-grid { grid-template-columns: 1fr; } }
.enm-form-group { display: flex; flex-direction: column; gap: 5px; }
.mascotas-ac-wrap { position: relative; z-index: 2; overflow-anchor: none; }
.mascotas-ac-wrap:focus-within { z-index: 30; }
.mascotas-ac-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--bg2);
  border: 0.5px solid rgba(0, 0, 0, 0.14);
  border-radius: 8px;
  max-height: min(52vh, 15rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: 0 8px 24px rgba(45, 74, 62, 0.12);
}
.mascotas-ac-panel .list-group-item {
  display: block;
  width: 100%;
  text-align: left;
  background: #FFFFFF;
  border: none;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 0;
  padding: 10px 12px;
  font-size: 13px;
  color: #1A1A18;
  cursor: pointer;
}
.mascotas-ac-panel .list-group-item:last-child { border-bottom: none; }
.mascotas-ac-panel .list-group-item:hover,
.mascotas-ac-panel .list-group-item:focus {
  background: #EFEFEA;
}
.enm-form-group-full { grid-column: 1 / -1; }
.enm-form-label { font-size: 12px; color: var(--text2); }
.enm-form-input {
  width: 100%; padding: 9px 12px; border-radius: var(--radius);
  border: 1px solid var(--border2); background: var(--bg2);
  font-family: 'DM Sans', sans-serif; font-size: 13px;
  color: var(--text); outline: none;
  transition: border-color var(--tr);
}
.enm-form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(45,74,62,.1); }
.enm-form-input:disabled, .enm-form-input[readonly] {
  background: var(--bg3); color: var(--text3); cursor: not-allowed;
}
.enm-form-textarea { resize: vertical; min-height: 80px; }
.enm-form-hint { font-size: 11px; color: var(--text3); margin-top: 6px; line-height: 1.4; }
.enm-info-row--with-hint { border-bottom: none; padding-bottom: 2px; }
.enm-info-hint {
  font-size: 11px;
  color: var(--text3);
  line-height: 1.45;
  margin: 8px 0 12px;
  padding-top: 0;
}

/* Toggle switch */
.enm-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid var(--border);
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border);
}
.enm-toggle-info { flex: 1; }
.enm-toggle-label { font-size: 13px; font-weight: 500; color: var(--text); }
.enm-toggle-desc  { font-size: 12px; color: var(--text2); margin-top: 2px; }
.enm-toggle { position: relative; width: 36px; height: 20px; flex-shrink: 0; }
.enm-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.enm-toggle-slider {
  position: absolute; inset: 0; background: var(--bg3);
  border-radius: 20px; cursor: pointer;
  border: 1px solid var(--border2);
  transition: background .2s, border-color .2s;
}
.enm-toggle-slider::before {
  content: ''; position: absolute;
  width: 14px; height: 14px; left: 2px; top: 2px;
  background: #fff; border-radius: 50%;
  transition: transform .2s;
}
.enm-toggle input:checked + .enm-toggle-slider { background: var(--accent); border-color: var(--accent); }
.enm-toggle input:checked + .enm-toggle-slider::before { transform: translateX(16px); }

/* Vacunas en edición */
.enm-vacuna-edit-header {
  display: grid;
  grid-template-columns: 1fr 140px 140px 36px;
  gap: 10px; margin-bottom: 4px;
  font-size: 11px; color: var(--text3);
}
.enm-vacuna-edit-row {
  display: grid;
  grid-template-columns: 1fr 140px 140px 36px;
  gap: 10px; align-items: center;
  padding: 8px 0; border-bottom: 0.5px solid var(--border);
}
.enm-vacuna-edit-row:last-of-type { border-bottom: none; }
.enm-vacuna-del-btn {
  padding: 6px 8px; border-radius: 6px; font-size: 13px;
  border: 1px solid var(--border); color: #A32D2D;
  background: transparent; cursor: pointer;
  font-family: inherit; display: flex; align-items: center;
  transition: background var(--tr);
}
.enm-vacuna-del-btn:hover { background: #FCEBEB; }
.enm-vacuna-add-row {
  display: flex; align-items: center; gap: 8px;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* Footer pegajoso en formularios de edición */
.enm-form-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; border-top: 1px solid var(--border);
  margin-top: 4px;
  position: sticky; bottom: 0;
  background: var(--bg);
  z-index: 5;
}
.enm-form-footer-note { font-size: 12px; color: var(--text3); display: flex; align-items: center; gap: 5px; }
.enm-form-footer-note--emphasis {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.45;
}
.enm-form-footer-actions { display: flex; gap: 8px; }

/* Max-width para formularios (evitar que se estiree demasiado) */
.enm-form-scope { max-width: 860px; }
.enm-form-scope--wide { max-width: none; width: 100%; }

/* ── Col-stack (right column inside grid2) ──────────────────────────── */
.enm-col-stack { display: flex; flex-direction: column; gap: 16px; }

/* ── Vacuna rows ─────────────────────────────────────────────────────── */
.enm-salud-top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  margin-top: 12px;
}
.enm-carnet-list { display: flex; flex-wrap: wrap; gap: 12px; }
.enm-doc {
  display: flex; flex-direction: row; align-items: flex-start; gap: 12px; text-align: left;
  width: auto; max-width: 320px; box-sizing: border-box; padding: 12px;
  border: 0.5px solid rgba(0,0,0,0.08); border-radius: 12px; background: #fff;
}
.enm-doc-ico { width: 36px; height: 36px; margin: 2px 0 0; flex: none; display: block; }
.enm-doc-text { min-width: 0; }
.enm-doc .enm-file-name { font-size: 13px; color: #1A1A18; line-height: 1.35; }
.enm-doc .enm-carnet-meta { text-align: left; }
.enm-doc .enm-carnet-acts { margin-top: 8px; justify-content: flex-start; }
.enm-salud-flag {
  display: flex; align-items: center; gap: 6px; flex: none;
  font-size: 13px; color: #1A1A18;
}
.enm-salud-flag.is-ok { color: #27500A; }
.enm-salud-flag.is-no { color: #A32D2D; }
.enm-salud-flag.is-empty { color: #6B6B65; }
.enm-salud-flag .ti-circle-check { color: #3B6D11; }
.enm-salud-flag .ti-circle-x { color: #A32D2D; }
.enm-salud-flag .ti-circle { color: #A0A099; }
.enm-vac-form {
  margin-top: 14px; padding: 12px 14px 4px;
  border: 0.5px solid rgba(0,0,0,0.08); border-radius: 12px; background: #fff;
}
.enm-vac-pill {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 20px; border: 0.5px solid transparent;
  font-size: 12px; font-weight: 500; line-height: 1.3;
}
.enm-vac-pill--green { background: #EAF3DE; color: #27500A; border-color: #C0DD97; }
.enm-vac-pill--amber { background: #FAEEDA; color: #854F0B; border-color: #FAC775; }
.enm-vac-pill--red { background: #FCEBEB; color: #A32D2D; border-color: #F09595; }
.enm-vac-pill--blue { background: #E6F1FB; color: #185FA5; border-color: #85B7EB; }
.enm-vac-pill--gray { background: #EFEFEA; color: #6B6B65; border-color: rgba(0,0,0,0.08); }
.enm-salud-pie {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px;
}
.enm-salud-box {
  border: 0.5px solid rgba(0,0,0,0.08); border-radius: 12px; background: #fff; padding: 12px 14px;
}
.enm-salud-pie .enm-obs-block,
.enm-salud-pie .enm-info-val.is-empty { margin-top: 8px; text-align: left; display: block; }
@media (max-width: 720px) {
  .enm-salud-top,
  .enm-salud-pie { flex-direction: column; grid-template-columns: 1fr; }
}
.enm-vac-head { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-bottom: 10px; }
.enm-vac-head-title { font-size: 12px; font-weight: 500; color: #6B6B65; }
.enm-vac-head-sum { margin: 2px 0 0; font-size: 11px; color: #A0A099; }
.enm-vac-list { width: 100%; border-collapse: collapse; }
.enm-vac-list th {
  text-align: left; font-size: 11px; font-weight: 500; color: #A0A099;
  padding: 0 12px 8px 0;
}
.enm-vac-list th:last-child,
.enm-vac-list td:last-child { text-align: right; }
.enm-vac-list td {
  padding: 10px 12px 10px 0; border-top: 0.5px solid rgba(0,0,0,0.08);
  font-size: 13px; color: #1A1A18; vertical-align: middle;
}
.enm-vac-estado { font-size: 12px; }
.enm-vac-date {
  width: 148px; padding: 6px 8px; box-sizing: border-box;
  border: 0.5px solid rgba(0,0,0,0.14); border-radius: 8px; background: #FFFFFF;
  font-family: inherit; font-size: 12px; color: #1A1A18;
}
.enm-vac-date:focus { outline: none; border-color: #2D4A3E; }
.enm-vac-row--green .enm-vac-estado { color: #27500A; }
.enm-vac-row--amber .enm-vac-estado { color: #854F0B; }
.enm-vac-row--red .enm-vac-estado { color: #A32D2D; }
.enm-vac-row--blue .enm-vac-estado { color: #185FA5; }
.enm-vac-row--gray .enm-vac-estado { color: #6B6B65; }
.enm-vacuna-scroll {
  max-height: 340px; overflow-y: auto;
  border: 0.5px solid rgba(0,0,0,0.08); border-radius: 8px; background: #F7F6F2; padding: 2px 10px;
}
.enm-vacuna-row--linea { gap: 8px; min-height: 40px; }
.enm-vacuna-row--linea .enm-vacuna-name { flex: 1; min-width: 0; }
.enm-vacuna-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #A0A099; }
.enm-vacuna-dot--green { background: #3B6D11; }
.enm-vacuna-dot--amber { background: #854F0B; }
.enm-vacuna-dot--red { background: #A32D2D; }
.enm-vacuna-dot--blue { background: #185FA5; }
.enm-vacuna-dot--gray { background: #A0A099; }
.enm-vacuna-row--linea .enm-pill { flex: none; }
.enm-vacuna-fecha-input { flex: none; width: 128px; margin: 0; padding: 4px 8px; font-size: 12px; }
.enm-vacuna-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px;
}
.enm-vacuna-row:last-child { border-bottom: none; }
.enm-vacuna-name { display: flex; align-items: center; gap: 7px; }
.enm-vacuna-name i { font-size: 14px; }
.enm-vacuna-fecha { font-size: 11px; color: var(--text3); margin-top: 2px; text-align: right; }
.enm-carnet-add { margin: 0; }
.enm-carnet-file {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.enm-carnet-hint {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--text3);
  line-height: 1.4;
}
.enm-carnet-empty {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text3);
}
.enm-carnet-meta { font-size: 11px; color: var(--text3); margin-top: 2px; }
.enm-carnet-item {
  padding: 10px 0 12px;
  border-bottom: 0.5px solid var(--border);
}
.enm-carnet-fileinfo {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.enm-carnet-fileinfo > .ti {
  font-size: 18px;
  color: var(--text3);
  flex-shrink: 0;
}
.enm-carnet-filetext { min-width: 0; flex: 1; }
.enm-carnet-filename {
  font-size: 13px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.enm-carnet-acts {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.enm-carnet-acts form { margin: 0; display: flex; }
.enm-carnet-btn {
  box-sizing: border-box;
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0.5px solid var(--border2);
  border-radius: 8px;
  background: var(--bg2);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
  font-family: inherit;
  transition: background 0.12s, color 0.12s;
}
.enm-carnet-btn i { font-size: 16px; line-height: 1; }
.enm-carnet-btn:hover { background: var(--bg3); color: var(--text); }
.enm-carnet-btn.is-danger { color: var(--danger-text); border-color: var(--danger-border); }
.enm-carnet-btn.is-danger:hover { background: var(--danger-bg); color: var(--danger-text); }

.enm-hotel-stay {
  padding: 14px 0 16px;
  border-bottom: 0.5px solid var(--border);
}
.enm-hotel-stay:last-child { border-bottom: none; padding-bottom: 4px; }
.enm-hotel-stay-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.enm-hotel-par {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: stretch;
}
.enm-hotel-lado {
  display: flex;
  flex-direction: column;
  border: 0.5px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  padding: 0;
  background: #fff;
  overflow: hidden;
}
.enm-hotel-banda {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  color: #fff;
}
.enm-hotel-lado.is-checkin .enm-hotel-banda { background: #2D4A3E; }
.enm-hotel-lado.is-cerrada .enm-hotel-banda { background: #1D9E75; }
.enm-hotel-lado.is-abierta .enm-hotel-banda { background: #854F0B; }
.enm-hotel-banda-ico {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.16);
  flex-shrink: 0;
}
.enm-hotel-banda-ico i { font-size: 18px; color: #fff; }
.enm-hotel-banda-kicker {
  display: block;
  font-size: 11px;
  line-height: 1.2;
  color: rgba(255,255,255,0.78);
}
.enm-hotel-banda-fecha {
  display: block;
  margin-top: 2px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  color: #fff;
}
.enm-hotel-banda-estado {
  margin-left: auto;
  max-width: 46%;
  padding: 4px 8px;
  border-radius: 20px;
  background: rgba(255,255,255,0.18);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
  text-align: right;
}
.enm-hotel-cuerpo {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  padding: 12px;
}
.enm-hotel-fotos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.enm-hotel-fotos a {
  display: block;
  width: 96px;
  height: 96px;
  border-radius: 8px;
  overflow: hidden;
  border: 0.5px solid rgba(0,0,0,0.08);
  background: #F7F6F2;
}
.enm-hotel-fotos a:focus-visible {
  outline: 2px solid #2D4A3E;
  outline-offset: 2px;
}
.enm-hotel-fotos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.enm-hotel-fotos-vacio {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 96px;
  margin: 0;
  padding: 0 12px;
  border-radius: 8px;
  background: #F7F6F2;
  color: #6B6B65;
  font-size: 12px;
}
.enm-hotel-fotos-vacio i { font-size: 18px; color: #A0A099; }
@media (max-width: 720px) {
  .enm-hotel-par { grid-template-columns: 1fr; }
}
.enm-hotel-dates {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
.enm-hotel-date-lab {
  font-size: 11px;
  font-weight: 500;
  color: var(--text3);
  margin-bottom: 2px;
}
.enm-hotel-date-val {
  font-size: 13px;
  color: var(--text);
}
.enm-hotel-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}
.enm-hotel-act {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 0.5px solid rgba(0,0,0,0.14);
  background: #fff;
  color: #1A1A18;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.enm-hotel-act:hover { background: var(--bg3); }
.enm-hotel-act i { font-size: 16px; }
.enm-hotel-act:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.enm-hotel-act--pdf,
.enm-hotel-act--foto {
  background: var(--accent-light);
  border-color: var(--accent-border);
  color: var(--accent-text);
}
.enm-hotel-act--pdf:hover,
.enm-hotel-act--foto:hover {
  background: var(--accent-light);
  color: var(--accent-text);
}
.enm-hotel-act--danger {
  color: #A32D2D;
  border-color: #F09595;
  background: #fff;
}
.enm-hotel-act--danger:hover {
  background: #FCEBEB;
  color: #A32D2D;
}
.enm-hotel-td-act form { display: inline; margin-left: 8px; }

.enm-table--hotel th,
.enm-table--hotel td {
  padding: 14px 16px 14px 0;
  vertical-align: top;
  border-bottom: 0.5px solid var(--border);
}
.enm-table--hotel th:last-child,
.enm-table--hotel td:last-child { padding-right: 0; }
.enm-table a.enm-hotel-name {
  color: var(--text);
  font-weight: 500;
  font-size: 13px;
  text-decoration: none;
}
.enm-table a.enm-hotel-name:hover { color: var(--accent-text); }
.enm-table a.enm-hotel-name:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.enm-hotel-td-act { text-align: right; white-space: nowrap; }
.enm-hotel-fotos-n { color: var(--text2); }

.enm-hotel-aviso-fijo {
  position: sticky;
  top: 56px;
  z-index: 8;
  margin-bottom: 16px;
  align-items: flex-start;
}
.enm-hotel-aviso-titulo {
  font-weight: 500;
  font-size: 13px;
  margin-bottom: 2px;
}

/* ── Asistencia heatmap ──────────────────────────────────────────────── */
/* ── Asistencia en ficha mascota (no reutilizar .enm-asist-cal del mes) ── */
.enm-ficha-asist {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 0 auto 4px;
}
.enm-ficha-asist-week {
  display: block;
  width: 100%;
  margin-bottom: 14px;
}
.enm-ficha-asist-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--text2);
  margin: 0 0 6px;
  text-align: center;
}
.enm-ficha-asist-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 8px 2px;
  margin: 0;
}
.enm-ficha-asist-table th,
.enm-ficha-asist-table td {
  text-align: center;
  vertical-align: middle;
  padding: 0;
}
.enm-ficha-asist-table th {
  font-size: 11px;
  font-weight: 400;
  color: var(--text3);
  padding: 0 0 4px;
}
.enm-ficha-asist-table .enm-day-dot {
  margin: 0 auto;
}

/* ── Asistencia heatmap (legado) ─────────────────────────────────────── */
.enm-week-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; flex-wrap: nowrap; }
.enm-week-row--head { margin-bottom: 8px; }
.enm-week-label { font-size: 11px; color: var(--text3); width: 42px; flex-shrink: 0; }
.enm-day-head {
  width: 28px; height: 16px;
  font-size: 11px; color: var(--text3);
  text-align: center; flex-shrink: 0;
}
.enm-day-dot {
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 500; color: #fff;
}
.enm-dot-present { background: #639922; color: #fff; }
.enm-dot-hotel   { background: #6AA6E8; color: #fff; }
.enm-dot-absent  { background: #F09595; color: #A32D2D; }
.enm-dot-late    { background: #EF9F27; }
.enm-dot-empty   { background: var(--bg3); color: var(--text3); }
.enm-dot-na      { background: transparent; color: transparent; }
.enm-dot-legend  { display: flex; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
.enm-dot-legend-item { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text2); }
.enm-dot-legend-item span { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.enm-asist-bar {
  height: 12px;
  background: #EFEFEA;
  border-radius: 20px;
  overflow: hidden;
}
.enm-asist-bar-fill {
  height: 12px;
  border-radius: 20px;
  background: linear-gradient(90deg, #C5E1A5 0%, #3B6D11 100%);
  max-width: 100%;
}

/* ── Pagos resumen (ficha tutor) ─────────────────────────────────────── */
.enm-pago-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px;
  gap: 8px;
}
.enm-pago-row:last-child { border-bottom: none; }
.enm-pago-mes { color: var(--text2); flex: 1; }
.enm-pago-fecha { font-size: 12px; color: var(--text3); }
.enm-pago-val { font-weight: 500; }
.enm-pago-val.pos { color: #3B6D11; }

.enm-vig-hint {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.45;
  margin: 0 0 12px;
}
.enm-vig-bar { margin-bottom: 14px; }
.enm-vig-bar-track {
  height: 8px;
  background: #EFEFEA;
  border-radius: 20px;
  overflow: hidden;
  border: 0.5px solid rgba(0,0,0,0.08);
}
.enm-vig-bar-fill {
  height: 100%;
  background: #2D4A3E;
  border-radius: 20px;
  max-width: 100%;
}
.enm-vig-bar-fill.is-warn { background: #854F0B; }
.enm-vig-bar-fill.is-danger { background: #A32D2D; }
.enm-vig-bar-fill.is-complete { background: #3B6D11; }
.enm-vig-bar-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  font-size: 11px;
  color: #6B6B65;
}
.enm-vig-chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.enm-vig-chip {
  text-align: center;
  background: var(--bg3);
  border-radius: 8px;
  padding: 10px 8px;
  min-width: 0;
}
.enm-vig-chip-val {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.25;
  overflow-wrap: break-word;
}
.enm-vig-chip-lab { font-size: 11px; color: var(--text3); margin-top: 2px; }
.enm-pago-form { margin-bottom: 4px; }
.enm-pago-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
.enm-pago-list { margin-top: 8px; border-top: 0.5px solid var(--border); }
@media (max-width: 767.98px) {
  .enm-vig-chips { grid-template-columns: 1fr; }
  .enm-pago-form-grid { grid-template-columns: 1fr; }
}

/* ── "Próximamente" note inside sections ─────────────────────────────── */
.enm-prox-note {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--text3);
  padding: 10px 12px;
  background: var(--bg3); border-radius: var(--radius);
  margin-bottom: 12px;
}
.enm-prox-note i { font-size: 14px; flex-shrink: 0; }

/* ── Zona de peligro (ficha detalle) ─────────────────────────────────── */
.enm-danger-zone {
  border: 1px solid rgba(220,53,69,.2);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  background: #fffafa;
  margin-bottom: 0;
}
.enm-danger-zone-title {
  font-size: 13px; font-weight: 500; color: #A32D2D;
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 8px;
}
.enm-danger-zone-desc { font-size: 12px; color: var(--text2); margin-bottom: 12px; }
.enm-danger-zone-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Búsqueda global (design system PawAdmin / busqueda.html) ───────── */
.enm-busqueda-page {
  max-width: 920px;
  font-size: 13px;
  overflow-anchor: none;
}

.enm-bq-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.enm-bq-page-title {
  font-size: 22px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 3px;
  line-height: 1.25;
}

.enm-bq-page-sub { font-size: 13px; color: var(--text3); }

.enm-bq-header-btn {
  font-size: 12px;
  padding: 7px 14px;
  border-radius: 8px;
  text-decoration: none;
  line-height: 1;
  font-weight: 400;
  flex-shrink: 0;
  align-self: flex-start;
}
.enm-bq-header-btn i { font-size: 13px; }

.enm-bq-search-card {
  background: var(--bg2);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 22px 20px;
  margin-bottom: 20px;
}

.enm-bq-search-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 8px;
  display: block;
}

.enm-bq-search-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.enm-bq-input-wrap {
  flex: 1;
  position: relative;
  min-width: 0;
}

.enm-bq-input-wrap > .ti {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text3);
  font-size: 16px;
  pointer-events: none;
}

.enm-bq-input {
  font-family: 'DM Sans', system-ui, sans-serif;
  width: 100%;
  padding: 11px 12px 11px 36px;
  border-radius: 8px;
  border: 0.5px solid var(--border2);
  background: var(--bg2);
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: border-color var(--tr);
  height: 46px;
  box-sizing: border-box;
}
.enm-bq-input:focus { border-color: var(--accent); }
.enm-bq-input::placeholder { color: var(--text3); }

.enm-bq-submit {
  padding: 0 28px;
  font-size: 13px;
  font-weight: 500;
  height: 46px;
  border-radius: 8px;
  flex-shrink: 0;
  align-self: stretch;
  line-height: 1;
}

.enm-bq-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 0.5px solid var(--border);
  align-items: center;
}

.enm-bq-filter-label {
  font-size: 11px;
  color: var(--text3);
  margin-right: 4px;
}

.enm-bq-chip {
  font-family: 'DM Sans', system-ui, sans-serif;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  cursor: pointer;
  border: 0.5px solid var(--border2);
  background: transparent;
  color: var(--text2);
  transition: background var(--tr), color var(--tr), border-color var(--tr);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  line-height: 1.35;
}
.enm-bq-chip i { font-size: 12px; }
.enm-bq-chip:hover { background: var(--bg3); color: var(--text); }
.enm-bq-chip.active {
  background: var(--accent-light);
  border-color: var(--accent-border);
  color: var(--accent-text);
  font-weight: 500;
}

.enm-bq-fetch-error {
  font-size: 12px;
  color: var(--danger-text);
  background: var(--danger-bg);
  border: 0.5px solid var(--danger-border);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0 0 16px;
}

.enm-bq-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 24px;
  text-align: center;
}

.enm-bq-empty-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.enm-bq-empty-icon .ti { font-size: 24px; color: var(--text3); }

.enm-bq-empty-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 5px;
}

.enm-bq-empty-sub {
  font-size: 13px;
  color: var(--text3);
  line-height: 1.6;
  max-width: 340px;
}

.enm-bq-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.enm-bq-results-count { font-size: 12px; color: var(--text3); }

.enm-bq-results-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.enm-bq-result-card {
  background: var(--bg2);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color var(--tr);
  color: inherit;
}
.enm-bq-result-card:hover { border-color: var(--border2); }

.enm-bq-av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  flex-shrink: 0;
}
.enm-bq-av .ti { font-size: 16px; }

.enm-bq-av-mascota { background: #E1F5EE; color: #0F6E56; }
.enm-bq-av-contrato { background: var(--info-bg); color: var(--info-text); }

.enm-bq-av-tutor-0 { background: #CECBF6; color: #3C3489; }
.enm-bq-av-tutor-1 { background: #9FE1CB; color: #085041; }
.enm-bq-av-tutor-2 { background: #F5C4B3; color: #712B13; }
.enm-bq-av-tutor-3 { background: #B5D4F4; color: #0C447C; }

.enm-bq-result-info { flex: 1; min-width: 0; }

.enm-bq-result-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 1px;
}

.enm-bq-result-meta { font-size: 11px; color: var(--text3); }

.enm-bq-result-type {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  flex-shrink: 0;
}

.enm-bq-type-mascota { background: var(--accent-light); color: var(--accent-text); }
.enm-bq-type-tutor { background: var(--purple-bg); color: var(--purple-text); }
.enm-bq-type-contrato { background: var(--info-bg); color: var(--info-text); }

.enm-bq-result-arrow { font-size: 14px; color: var(--text3); flex-shrink: 0; }

.enm-busqueda-page mark {
  background: var(--gold);
  color: var(--accent);
  border-radius: 2px;
  padding: 0 2px;
  font-style: normal;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════════
   Contratos — alineado a contratos.html (PawAdmin / design system)
   ═══════════════════════════════════════════════════════════════════ */
.enm-ct-page {
  font-size: 13px;
}

/* Métricas */
.enm-ct-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
@media (max-width: 1100px) {
  .enm-ct-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .enm-ct-metrics { grid-template-columns: 1fr; }
}

.enm-ct-metric {
  background: var(--bg2);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}

.enm-ct-metric-label {
  font-size: 11px;
  color: var(--text2);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.enm-ct-metric-label i { font-size: 14px; flex-shrink: 0; }
.enm-ct-metric-label--accent { color: var(--accent-text); }
.enm-ct-metric-label--warn { color: var(--warning-text); }
.enm-ct-metric-label--danger { color: var(--danger-text); }

.enm-ct-metric-val {
  font-size: 24px;
  font-weight: 500;
  line-height: 1.1;
  color: var(--text);
}
.enm-ct-metric-val--accent { color: var(--accent); }
.enm-ct-metric-val--warn { color: var(--warning-text); }
.enm-ct-metric-val--danger { color: var(--danger-text); }
.enm-ct-metric-val--muted {
  font-size: 18px;
  color: var(--text3);
}

.enm-ct-metric-sub {
  font-size: 11px;
  color: var(--text3);
  margin-top: 3px;
  line-height: 1.4;
}
.enm-ct-metric-sub i { font-size: 11px; }

/* Toolbar */
.enm-ct-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.enm-ct-search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 300px;
}
.enm-ct-search-wrap > .ti {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text3);
  font-size: 14px;
  pointer-events: none;
}
.enm-ct-search-input {
  font-family: 'DM Sans', system-ui, sans-serif;
  width: 100%;
  padding: 7px 10px 7px 30px;
  border-radius: 8px;
  border: 0.5px solid var(--border2);
  background: var(--bg2);
  font-size: 12px;
  color: var(--text);
  outline: none;
  transition: border-color var(--tr);
}
.enm-ct-search-input:focus { border-color: var(--accent); }

.enm-ct-filter-select {
  font-family: 'DM Sans', system-ui, sans-serif;
  padding: 7px 10px;
  border-radius: 8px;
  border: 0.5px solid var(--border2);
  background: var(--bg2);
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
  outline: none;
}
.enm-ct-filter-select:focus { border-color: var(--accent); }
.enm-ct-filter-select:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.enm-ct-toolbar-right {
  margin-left: auto;
  font-size: 12px;
  color: var(--text3);
}

/* Tabla */
.enm-ct-table-card {
  background: var(--bg2);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
.enm-ct-table-card table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
  table-layout: fixed;
}
.enm-ct-table-card thead tr { background: var(--bg3); }
.enm-ct-table-card th {
  font-size: 11px;
  color: var(--text3);
  font-weight: 400;
  padding: 9px 12px;
  text-align: left;
  border-bottom: 0.5px solid var(--border);
  white-space: nowrap;
}
.enm-ct-table-card td {
  font-size: 12px;
  color: var(--text);
  padding: 11px 12px;
  border-bottom: 0.5px solid var(--border);
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.enm-ct-table-card tbody tr:last-child td { border-bottom: none; }
.enm-ct-table-card tbody tr:hover td {
  background: #F2F7F2;
  cursor: default;
}

.enm-ct-cnt-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.enm-ct-cnt-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 0.5px solid var(--accent-border);
}
.enm-ct-cnt-icon .ti { font-size: 14px; color: var(--accent-text); }
.enm-ct-cnt-text { min-width: 0; }
.enm-ct-cnt-num {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.2;
}
.enm-ct-cnt-status {
  font-size: 10px;
  color: var(--text3);
  margin-top: 1px;
}

.enm-ct-td-tutor,
.enm-ct-td-mascota {
  color: var(--accent);
  font-weight: 500;
}
.enm-ct-td-tutor a,
.enm-ct-td-mascota a {
  color: inherit;
  text-decoration: none;
}
.enm-ct-td-tutor a:hover,
.enm-ct-td-mascota a:hover { text-decoration: underline; }

.enm-ct-muted { color: var(--text2); }
.enm-ct-td-valor { font-weight: 500; color: var(--text); }

/* Pills (contratos.html) */
.enm-ct-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1.25;
  border: 0.5px solid transparent;
  box-sizing: border-box;
  vertical-align: middle;
}
.enm-ct-pill-activo {
  background: var(--accent);
  color: #fff;
}
.enm-ct-pill-completado {
  background: #1D9E75;
  color: #fff;
}
.enm-ct-pill-revision {
  background: #FAEEDA;
  color: #854F0B;
  border: 0.5px solid #FAC775;
}
.enm-ct-pill-vencer {
  background: var(--warning-bg);
  color: #633806;
  border: 0.5px solid var(--warning-border);
}
.enm-ct-pill-vencido {
  background: var(--danger-bg);
  color: #791F1F;
  border: 0.5px solid var(--danger-border);
}
.enm-ct-pill-nuevo {
  background: var(--info-bg);
  color: #0C447C;
  border: 0.5px solid var(--info-border);
}
.enm-ct-pill-cancelado {
  background: #EFEFEA;
  color: #444441;
  border: 0.5px solid var(--border2);
}
.enm-ct-pill-incompleto {
  background: var(--warning-bg);
  color: #854F0B;
  border: 0.5px solid var(--warning-border);
}

.enm-ct-td-estado {
  overflow: visible;
  white-space: nowrap;
  text-align: left;
  vertical-align: middle;
}
.enm-ct-td-estado .enm-ct-pill { vertical-align: middle; }

/* Acciones */
.enm-ct-th-acciones,
.enm-ct-td-acciones {
  width: 118px;
  min-width: 118px;
  text-align: right;
  overflow: visible;
  white-space: nowrap;
  padding-left: 8px;
  padding-right: 10px;
}
.enm-ct-actions {
  display: inline-flex;
  gap: 6px;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: nowrap;
}
.enm-ct-act-form {
  margin: 0;
  display: flex;
  flex-shrink: 0;
}
.enm-ct-act-btn {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0.5px solid var(--border2);
  background: transparent;
  cursor: pointer;
  color: var(--text2);
  transition: background var(--tr), color var(--tr), border-color var(--tr);
  text-decoration: none;
  padding: 0;
  font-family: inherit;
  box-sizing: border-box;
}
.enm-ct-act-btn:hover {
  background: var(--bg3);
  color: var(--text);
}
.enm-ct-act-btn--danger:hover {
  background: var(--danger-bg);
  color: var(--danger-text);
  border-color: var(--danger-border);
}
.enm-ct-act-btn .ti { font-size: 13px; }

/* Paginación */
.enm-ct-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-top: 0.5px solid var(--border);
}
.enm-ct-page-info { font-size: 12px; color: var(--text3); }
.enm-ct-page-btns { display: flex; gap: 4px; }
.enm-ct-page-btn {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  border: 0.5px solid var(--border);
  background: transparent;
  cursor: pointer;
  font-family: 'DM Sans', system-ui, sans-serif;
  color: var(--text);
  transition: background var(--tr);
}
.enm-ct-page-btn:hover:not(:disabled) { background: var(--bg3); }
.enm-ct-page-btn--active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.enm-ct-page-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

/* Vacío */
.enm-ct-empty {
  text-align: center;
  padding: 48px 22px;
  background: var(--bg2);
  border: 0.5px solid var(--border);
  border-radius: 12px;
}
.enm-ct-empty .ti {
  font-size: 40px;
  color: var(--text3);
  display: block;
  margin-bottom: 12px;
}
.enm-ct-empty p {
  color: var(--text2);
  margin-bottom: 14px;
  font-size: 13px;
}

/* Login panel */
.enm-login-body {
  min-height: 100vh;
  margin: 0;
  background-color: #F7F6F2;
  background-image: url("../img/login-pets-papel.png");
  background-repeat: repeat;
  background-size: 640px 640px;
  font-family: "DM Sans", sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
}
.enm-login-card {
  width: 100%;
  max-width: 400px;
  background: #FFFFFF;
  border: 0.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 40px 36px 32px;
  box-shadow: 0 18px 48px rgba(26, 26, 24, 0.12), 0 4px 12px rgba(26, 26, 24, 0.06);
}
.enm-login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.enm-login-brand--stack {
  flex-direction: column;
  text-align: center;
  gap: 12px;
  margin-bottom: 16px;
}
.enm-login-logo {
  width: 52px;
  height: 52px;
  border-radius: 12px;
}
.enm-login-title {
  font-size: 22px;
  font-weight: 500;
  color: #2D4A3E;
  margin: 0 0 28px;
  text-align: center;
  line-height: 1.3;
}
.enm-login-lead {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.5;
  margin: -16px 0 24px;
  text-align: center;
}
.enm-login-form .enm-form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #1A1A18;
  margin-bottom: 6px;
}
.enm-login-form .enm-form-input + .enm-form-label,
.enm-login-form .enm-login-pass-wrap + .enm-form-label {
  margin-top: 16px;
}
.enm-login-form .enm-form-input {
  width: 100%;
  padding: 12px 14px;
  border: 0.5px solid rgba(0, 0, 0, 0.14);
  border-radius: 8px;
  background: #FFFFFF;
  font-size: 13px;
}
.enm-login-pass-wrap {
  position: relative;
}
.enm-login-pass-wrap .enm-form-input {
  padding-right: 44px;
}
.enm-login-pass-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #A0A099;
  cursor: pointer;
  border-radius: 8px;
  padding: 0;
  line-height: 1;
}
.enm-login-pass-toggle:hover {
  background: #EFEFEA;
  color: #1A1A18;
}
.enm-login-pass-toggle .ti {
  font-size: 18px;
}
.enm-login-form .enm-form-input::placeholder {
  color: #A0A099;
}
.enm-login-form .enm-form-input:focus {
  border-color: #2D4A3E;
  box-shadow: none;
}
.enm-login-submit {
  width: 100%;
  justify-content: center;
  margin-top: 22px;
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
}
.enm-login-foot {
  margin: 18px 0 0;
  text-align: center;
  font-size: 13px;
}
.enm-login-foot a { color: #6B6B65; text-decoration: none; }
.enm-login-foot a:hover { color: #2D4A3E; }

/* Asistencia / bitácora */
.enm-asist-page.em-eg-viva {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.enm-asist-hero { margin: 0; }
.enm-asist-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.enm-asist-hero-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
}
.enm-asist-hero-title i { color: var(--accent-text); font-size: 20px; }
.enm-asist-hero-sub {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text2);
  max-width: 42rem;
}
.enm-asist-hero-fecha {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-text);
  background: var(--accent-light);
  border: 0.5px solid var(--accent-border);
  border-radius: 999px;
  padding: 6px 14px;
}
.enm-asist-hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
}
.enm-asist-hero-metric { margin: 0; }
.enm-asist-hero-rutas { display: contents; }
.enm-asist-hero-lista {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1 1 100%;
  padding-top: 4px;
}
.enm-asist-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 0.5px solid var(--border);
  background: var(--bg2);
  font-size: 12px;
  color: var(--text2);
}
.enm-asist-chip strong {
  font-weight: 500;
  color: var(--text);
  margin-right: 2px;
}
.enm-asist-chip i { font-size: 16px; }
.enm-asist-chip--ok { background: var(--success-bg); border-color: var(--success-border); }
.enm-asist-chip--ok i { color: var(--success-text); }
.enm-asist-chip--no { background: var(--danger-bg); border-color: var(--danger-border); }
.enm-asist-chip--no i { color: var(--danger-text); }
.enm-asist-chip--wait { background: var(--warning-bg); border-color: var(--warning-border); }
.enm-asist-chip--wait i { color: var(--warning-text); }
.enm-asist-resumen-dia {
  margin-bottom: 16px;
}
.enm-asist-resumen-head {
  display: flex;
  justify-content: flex-start;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 12px;
}
.enm-asist-resumen-head strong { font-weight: 500; color: var(--text2); }
.enm-asist-resumen-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
}
.enm-asist-resumen-total {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 180px;
  max-width: 240px;
  min-height: 72px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 0.5px solid var(--accent-border);
  background: var(--accent-light);
}
.enm-asist-resumen-ico {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #fff;
  color: var(--accent-text);
}
.enm-asist-resumen-ico i { font-size: 20px; }
.enm-asist-resumen-n {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.1;
  color: var(--accent-text);
}
.enm-asist-resumen-l {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text2);
}
.enm-asist-resumen-rutas {
  list-style: none;
  margin: 0;
  padding: 0;
  display: contents;
}
.enm-asist-resumen-ruta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  flex: 1 1 140px;
  max-width: 180px;
  min-height: 72px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 0.5px solid var(--border);
  background: var(--bg2);
}
.enm-asist-resumen-ruta span {
  font-size: 12px;
  color: var(--text2);
}
.enm-asist-resumen-ruta strong {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.1;
  color: var(--text);
}
.enm-asist-resumen-ruta--hotel {
  background: var(--info-bg);
  border-color: var(--info-border);
}
.enm-asist-resumen-ruta--hotel strong { color: var(--info-text); }
.enm-asist-resumen-ruta--internado {
  background: #E1F5EE;
  border-color: #9FE1CB;
}
.enm-asist-resumen-ruta--internado strong { color: #0F6E56; }
.enm-asist-resumen-ruta.is-zero strong { color: var(--text3); }
@media (max-width: 767.98px) {
  .enm-asist-resumen-total,
  .enm-asist-resumen-ruta { max-width: none; flex-basis: calc(50% - 8px); }
}
.enm-asist-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.enm-asist-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg2);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  min-width: 0;
}
.enm-asist-stat-ico {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg3);
  color: var(--text2);
}
.enm-asist-stat-ico i { font-size: 20px; }
.enm-asist-stat-body { min-width: 0; }
.enm-asist-stat-n {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.1;
  color: var(--text);
}
.enm-asist-stat-l {
  font-size: 12px;
  color: var(--text2);
  margin-top: 2px;
}
.enm-asist-stat-h {
  font-size: 11px;
  color: var(--text3);
  margin-top: 2px;
}
.enm-asist-stat--lista { background: #E1F5EE; border-color: #9FE1CB; }
.enm-asist-stat--colegio { background: var(--accent-light); border-color: var(--accent-border); }
.enm-asist-stat--hotel { background: var(--info-bg); border-color: var(--info-border); }
.enm-asist-stat--ok { background: var(--success-bg); border-color: var(--success-border); }
.enm-asist-stat--no { background: var(--danger-bg); border-color: var(--danger-border); }
.enm-asist-stat--wait { background: var(--warning-bg); border-color: var(--warning-border); }
.enm-asist-stat--lista .enm-asist-stat-ico,
.enm-asist-stat--colegio .enm-asist-stat-ico,
.enm-asist-stat--hotel .enm-asist-stat-ico,
.enm-asist-stat--ok .enm-asist-stat-ico,
.enm-asist-stat--no .enm-asist-stat-ico,
.enm-asist-stat--wait .enm-asist-stat-ico { background: #fff; }
.enm-asist-stat--lista .enm-asist-stat-ico { color: #0F6E56; }
.enm-asist-stat--colegio .enm-asist-stat-ico { color: var(--accent-text); }
.enm-asist-stat--hotel .enm-asist-stat-ico { color: var(--info-text); }
.enm-asist-stat--ok .enm-asist-stat-ico,
.enm-asist-stat--ok .enm-asist-stat-n { color: var(--success-text); }
.enm-asist-stat--no .enm-asist-stat-ico,
.enm-asist-stat--no .enm-asist-stat-n { color: var(--danger-text); }
.enm-asist-stat--wait .enm-asist-stat-ico,
.enm-asist-stat--wait .enm-asist-stat-n { color: var(--warning-text); }
@media (max-width: 900px) {
  .enm-asist-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.enm-asist-filtros {
  margin: 0;
  padding: 0;
}
.enm-asist-filtros-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  padding: 4px 0;
  user-select: none;
}
.enm-asist-filtros-summary::-webkit-details-marker { display: none; }
.enm-asist-filtros-summary-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
.enm-asist-filtros-summary-main i { color: var(--accent-text); font-size: 18px; }
.enm-asist-filtros-activa {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-text);
  background: var(--accent-light);
  border: 0.5px solid var(--accent-border);
  border-radius: 999px;
  padding: 3px 10px;
}
.enm-asist-filtros-chevron i {
  font-size: 18px;
  color: var(--text3);
  transition: transform 0.12s;
}
.enm-asist-filtros[open] .enm-asist-filtros-chevron i { transform: rotate(180deg); }
.enm-asist-filtros-body {
  padding-top: 14px;
  margin-top: 10px;
  border-top: 0.5px solid var(--border);
}
.enm-asist-filtros-kicker {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.enm-asist-grupos {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
}
.enm-asist-grupo-lab {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--text2);
}
.enm-asist-grupo-lab i { font-size: 14px; }
.enm-asist-grupo-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.enm-asist-ruta {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  border: 0.5px solid var(--border2);
  background: transparent;
  color: var(--text);
  text-decoration: none;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.enm-asist-ruta:hover {
  background: var(--bg3);
  color: var(--text);
}
.enm-asist-ruta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.enm-asist-ruta.is-on,
.enm-asist-ruta.is-on:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.enm-asist-filtros-ayuda {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 0.5px solid var(--border);
  font-size: 13px;
  line-height: 1.45;
  color: var(--text2);
}
@media (max-width: 720px) {
  .enm-asist-grupos { flex-direction: column; gap: 14px; }
}
.enm-asist-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
  gap: 16px;
  width: 100%;
  align-items: start;
}
.enm-asist-layout--stack {
  grid-template-columns: 1fr;
}
.enm-asist-list-card {
  min-width: 0;
  width: 100%;
  grid-column: 1;
  grid-row: 1;
}
.enm-asist-cal-card {
  grid-column: 2;
  grid-row: 1;
  position: sticky;
  top: 56px;
  max-width: 100%;
}
.enm-asist-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 0.5px solid var(--border);
}
.enm-asist-list-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
}
.enm-asist-list-sub {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text2);
  max-width: 36rem;
}
.enm-asist-mes-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.enm-asist-mes-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  min-width: 7.5rem;
  text-align: center;
}
.enm-asist-mes-btn {
  padding: 6px 10px;
  min-width: 36px;
}
.enm-asist-mes-btn.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}
.enm-asist-cal-head { margin-bottom: 10px; }
.enm-asist-cal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.enm-asist-cal-hint {
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 1.4;
  color: var(--text3);
}
.enm-asist-legend-fold {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text2);
}
.enm-asist-legend-fold summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--text2);
  list-style: none;
  padding: 6px 0;
}
.enm-asist-legend-fold summary::-webkit-details-marker { display: none; }
.enm-asist-legend.enm-dot-legend {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  max-width: none;
  margin: 8px 0 0;
}
.enm-leg-asistio { background: #639922; }
.enm-leg-hotel { background: #6AA6E8; }
.enm-leg-no { background: #F09595; }
.enm-leg-empty { background: var(--bg3); }
.enm-leg-estadia { background: #E1F5EE; border: 0.5px solid #9FE1CB; }
.enm-asist-acciones {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
@media (max-width: 1024px) {
  .enm-asist-layout {
    grid-template-columns: 1fr;
  }
  .enm-asist-list-card,
  .enm-asist-cal-card {
    grid-column: 1;
    grid-row: auto;
  }
  .enm-asist-cal-card {
    position: static;
    order: 2;
  }
  .enm-asist-list-card { order: 1; }
}
.enm-asist-layout .enm-dot-legend {
  justify-content: center;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}
.enm-asist-cal-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}
.enm-asist-cal-mes { font-size: 14px; font-weight: 500; }
.enm-asist-cal {
  width: 100%;
  max-width: 360px;
  margin: 0 auto 8px;
}
.enm-asist-cal.enm-ficha-asist {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 0 auto 4px;
}
.enm-asist-cal-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 4px 4px;
  margin: 0;
}
.enm-asist-cal-table th,
.enm-asist-cal-table td {
  text-align: center;
  vertical-align: middle;
  padding: 0;
}
.enm-asist-cal-table th {
  font-size: 11px;
  font-weight: 400;
  color: var(--text3);
  padding: 0 0 4px;
}
.enm-asist-cal .enm-asist-day {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: auto;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 12px;
  position: relative;
  text-decoration: none;
  color: var(--text);
  user-select: none;
  -webkit-user-drag: none;
}
.enm-asist-cal .enm-asist-day.has-data::after,
.enm-asist-cal .enm-asist-day.has-vino::after,
.enm-asist-cal .enm-asist-day.has-hotel-asist::after,
.enm-asist-cal .enm-asist-day.has-ausente::after {
  display: none;
}
.enm-asist-cal .enm-asist-day.is-sel:not(.has-ausente):not(.has-hotel-asist):not(.has-vino):not(.is-hotel) {
  background: #D9D9D2;
  color: var(--text);
  box-shadow: none;
}
.enm-asist-cal .enm-asist-day.has-vino,
.enm-asist-cal .enm-asist-day.enm-dot-present {
  background: #639922;
  color: #fff;
}
.enm-asist-cal .enm-asist-day.has-vino.is-sel {
  background: #3F6B12;
  color: #fff;
}
.enm-asist-cal .enm-asist-day.has-hotel-asist {
  background: #6AA6E8;
  color: #fff;
}
.enm-asist-cal .enm-asist-day.has-hotel-asist.is-sel {
  background: #2F6FB8;
  color: #fff;
}
.enm-asist-cal .enm-asist-day.has-ausente,
.enm-asist-cal .enm-asist-day.enm-dot-absent {
  background: #F09595;
  color: #A32D2D;
}
.enm-asist-cal .enm-asist-day.has-ausente.is-sel {
  background: #C45C5C;
  color: #fff;
}
.enm-asist-day.is-future {
  color: #A0A099;
  cursor: default;
  opacity: 0.4;
  pointer-events: none;
}
.enm-asist-search-wrap {
  max-width: none;
  margin: 0 0 12px;
}
.enm-asist-list { display: flex; flex-direction: column; gap: 8px; }
.enm-asist-item[hidden] { display: none; }
.enm-asist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 0.5px solid var(--border);
  border-radius: 12px;
  background: var(--bg2);
  transition: background 0.12s, border-color 0.12s;
}
.enm-asist-item:hover { background: #fff; border-color: var(--border2); }
.enm-asist-item.is-sel {
  background: var(--accent-light);
  border-color: var(--accent-border);
  box-shadow: none;
}
.enm-asist-info { flex: 1; min-width: 0; }
.enm-asist-name {
  font-size: 16px;
  font-weight: 500;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  word-break: break-word;
}
.enm-asist-name a { color: inherit; text-decoration: none; }
.enm-asist-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.enm-asist-pdf-btn {
  flex: 0 0 auto;
  padding: 5px 10px;
  font-size: 12px;
  gap: 4px;
  color: var(--accent-text);
  border-color: var(--accent-border);
  background: #fff;
  text-decoration: none;
}
.enm-asist-pdf-btn:hover {
  background: var(--accent-light);
  color: var(--accent-text);
}
.enm-asist-pdf {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 500;
  color: #27500A;
  text-decoration: none;
  white-space: nowrap;
}
.enm-asist-pdf:hover { color: #3B6D11; }
.enm-asist-sub { font-size: 11px; color: #A0A099; }
.enm-asist-ruta-txt { font-size: 12px; color: #A0A099; line-height: 1.35; }
.enm-asist-ruta-prev {
  font-size: 11px;
  font-weight: 400;
  color: #A0A099;
  line-height: 1.35;
  margin-top: 2px;
}
.enm-asist-resumen { font-size: 13px; font-weight: 500; color: #3B6D11; line-height: 1.35; margin-top: 4px; }
.enm-asist-cal .enm-asist-day.is-hotel:not(.has-vino):not(.has-ausente):not(.is-sel):not(.has-hotel-asist) {
  background: #E1F5EE;
  color: #0F6E56;
}
.enm-asist-cal .enm-asist-day.is-hotel.is-sel:not(.has-vino):not(.has-ausente):not(.has-hotel-asist) {
  background: #7DCFB6;
  color: #085041;
}
.enm-asist-cal .enm-asist-day.is-we:not(.has-vino):not(.has-ausente):not(.has-hotel-asist):not(.is-sel) {
  color: #A0A099;
}
.enm-asist-estado {
  font-size: 11px;
  font-weight: 500;
}
.enm-asist-estado.enm-pill-green {
  background: #EAF3DE;
  color: #3B6D11;
  border: 0.5px solid #C0DD97;
}
.enm-asist-estado.enm-pill-red {
  background: #FCEBEB;
  color: #A32D2D;
  border: 0.5px solid #F09595;
}
.enm-asist-estado.enm-pill-hotel {
  background: #E6F1FB;
  color: #185FA5;
  border: 0.5px solid #9EC5EF;
}
.enm-asist-estado.enm-pill-gray {
  background: #EFEFEA;
  color: #6B6B65;
  border: 0.5px solid rgba(0,0,0,0.08);
}
.enm-asist-btns { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.enm-asist-btns .enm-btn { padding: 6px 10px; font-size: 12px; }
.enm-asist-quitar { color: #6B6B65; }
.enm-asist-empty { font-size: 13px; color: #A0A099; margin: 12px 0; }
#enmAsistTopbar {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.enm-asist-asignar-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.enm-asist-asignar-row .enm-asist-dd {
  min-width: 0;
  width: auto;
  flex: 0 0 auto;
}
.enm-asist-asignar-row .enm-asist-dd-btn { width: auto; }
.enm-asist-asignar { flex-shrink: 0; white-space: nowrap; }
.enm-asist-dd { position: relative; min-width: 176px; z-index: 2; }
.enm-asist-dd.is-open { z-index: 30; }
.enm-asist-dd-btn {
  display: flex; align-items: center; gap: 6px; width: 100%;
  padding: 7px 10px; background: #EAF3DE; border: 0.5px solid #C0DD97;
  border-radius: 8px; color: #27500A; font-family: inherit; font-size: 12px;
  font-weight: 500; cursor: pointer; text-align: left;
}
.enm-asist-dd-menu {
  position: absolute; right: 0; top: calc(100% + 4px); min-width: 100%;
  margin: 0; padding: 6px; list-style: none; background: #fff;
  border: 0.5px solid rgba(0,0,0,0.08); border-radius: 12px; max-height: 260px; overflow-y: auto;
}
.enm-asist-dd-opt {
  display: block; width: 100%; text-align: left; padding: 8px 10px; border: none;
  background: transparent; border-radius: 8px; font-family: inherit; font-size: 13px;
  color: #1A1A18; cursor: pointer;
}
.enm-asist-dd-opt:hover { background: #EFEFEA; }
.enm-asist-pager {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 12px; margin-top: 4px; border-top: 0.5px solid rgba(0,0,0,0.08);
}
.enm-asist-pager[hidden] { display: none; }
.enm-btn-danger-soft { color: #A32D2D; border-color: #F09595; }
.enm-btn-danger-soft:hover { background: #FCEBEB; color: #A32D2D; }

.enm-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* iPhone / pantallas estrechos (~390px) */
@media (max-width: 767.98px) {
  .enm-topbar:not(.em-mob-bar):not(.em-page-hdr) {
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 10px 12px 10px 46px;
    padding-top: max(10px, env(safe-area-inset-top));
    row-gap: 8px;
  }
  .enm-topbar:not(.em-mob-bar):not(.em-page-hdr) .enm-topbar-left {
    flex: 1 1 auto;
    min-width: 0;
    width: calc(100% - 8px);
  }
  .enm-topbar:not(.em-mob-bar):not(.em-page-hdr) .enm-topbar-right {
    flex: 1 1 100%;
    width: 100%;
    justify-content: flex-end;
  }
  .enm-topbar-dup { display: none; }
  .enm-topbar-right:has(> .enm-topbar-dup) { display: none; }
  .enm-breadcrumb {
    flex-wrap: wrap;
    row-gap: 2px;
    min-width: 0;
  }
  .enm-breadcrumb span {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .enm-topbar-title { font-size: 15px; line-height: 1.3; }
  .enm-topbar-sub { font-size: 11px; line-height: 1.35; }
  .enm-content {
    padding: 12px;
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }
  .enm-btn { white-space: nowrap; }

  .enm-hero-card { flex-wrap: wrap; padding: 16px; gap: 12px; }
  .enm-hero-avatar { width: 88px; height: 88px; }
  .enm-hero-avatar i { font-size: 40px; }
  .enm-edit-avatar-bar {
    flex-wrap: wrap;
    padding: 14px;
    gap: 12px;
  }
  .enm-edit-av { width: 96px; height: 96px; }
  .enm-edit-av i { font-size: 44px; }
  .enm-pet-av-cam,
  .enm-pet-av-del {
    width: 22px;
    height: 22px;
  }
  .enm-pet-av-cam i,
  .enm-pet-av-del i { font-size: 11px; }
  .enm-form-scope { max-width: none; width: 100%; min-width: 0; }
  .enm-form-input, select.enm-form-input, textarea.enm-form-input {
    font-size: 16px;
  }
  .enm-toggle-row { gap: 12px; align-items: flex-start; }
  .enm-hero-name {
    font-size: 18px;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }
  .enm-hero-meta { grid-template-columns: 1fr 1fr; gap: 8px; }
  .enm-hero-meta--3 { display: flex; }
  .enm-hero-meta--3 .enm-stat-chip { min-height: 0; }
  .enm-meta-block { flex: 1 1 calc(50% - 10px); min-width: 0; }
  .enm-stat-chip { padding: 12px 8px; min-height: 72px; }
  .enm-stat-chip-val { font-size: 15px; }

  .enm-info-row {
    align-items: flex-start;
    gap: 8px;
  }
  .enm-info-label { max-width: 42%; }
  .enm-info-val {
    min-width: 0;
    overflow-wrap: break-word;
  }

  .enm-tl-body { min-width: 0; flex: 1; }
  .enm-tl-date { flex-shrink: 0; }

  /* overflow visible: el autocomplete de mascota debe salir de la tarjeta */
  .enm-form-card { padding: 16px 12px; overflow: visible; }
  .enm-form-card:focus-within { z-index: 8; }
  .enm-form-input, .enm-form-select, select.enm-form-input {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .enm-vacuna-edit-header { display: none; }
  .enm-vacuna-edit-row {
    grid-template-columns: 1fr 1fr 36px;
    grid-template-areas:
      "nombre nombre del"
      "app vence del";
    gap: 8px;
    padding: 12px 0;
  }
  .enm-vacuna-edit-row > :nth-child(1) { grid-area: nombre; }
  .enm-vacuna-edit-row > :nth-child(2) { grid-area: app; }
  .enm-vacuna-edit-row > :nth-child(3) { grid-area: vence; }
  .enm-vacuna-edit-row > :nth-child(4) { grid-area: del; align-self: start; }

  .enm-form-footer {
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
  }
  .enm-form-footer-note { width: 100%; }
  .enm-form-footer-actions {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .enm-table-card,
  .enm-ct-table-card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .enm-table-card table,
  .enm-ct-table-card table {
    table-layout: fixed;
    min-width: 1040px;
  }
  .enm-table--fichas { min-width: 480px; }
  .enm-table--fichas th,
  .enm-table--fichas td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 10px;
  }
  .enm-table--fichas td:nth-child(4),
  .enm-table--fichas th:nth-child(4) { display: none; }

  .enm-ct-search-wrap {
    min-width: 0;
    max-width: none;
    flex: 1 1 100%;
  }
  .enm-ct-toolbar .enm-ct-filter-select { flex: 1 1 calc(50% - 8px); min-width: 0; }
  .enm-ct-toolbar-right { margin-left: 0; width: 100%; }

  .enm-metrics { grid-template-columns: 1fr 1fr; }
  .enm-metric { padding: 12px; }
  .enm-metric-value { font-size: 22px; }

  .enm-asist-item {
    flex-wrap: wrap;
    align-items: flex-start;
    row-gap: 8px;
  }
  .enm-asist-info {
    flex: 1 1 calc(100% - 40px);
    min-width: 120px;
  }
  .enm-asist-name,
  .enm-asist-resumen,
  .enm-asist-ruta-txt {
    word-break: normal;
    overflow-wrap: break-word;
  }
  .enm-asist-acciones {
    flex: 1 1 100%;
    align-items: flex-start;
    width: 100%;
  }
  .enm-asist-btns {
    width: 100%;
    justify-content: flex-start;
    flex-shrink: 1;
  }
  .enm-asist-btns .enm-btn {
    padding: 8px 10px;
    font-size: 12px;
  }
  .enm-asist-cal.enm-ficha-asist { max-width: 320px; }
  .enm-asist-day { font-size: 11px; }

  .enm-login-body {
    padding: 20px 12px;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }
  .enm-login-card { padding: 28px 18px 22px; }
  .enm-login-title { font-size: 20px; }

  .enm-danger-zone-btns { flex-direction: column; }
  .enm-danger-zone-btns .enm-btn { width: 100%; justify-content: center; }
}

.enm-inc-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.enm-inc-lista-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 0.5px solid var(--border2);
  border-radius: var(--radius);
  background: var(--bg2);
  flex-wrap: wrap;
}
.enm-inc-lista-ico {
  width: 32px; height: 32px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: #FAEEDA; color: #854F0B; font-size: 16px;
}
.enm-inc-lista-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.enm-inc-lista-titulo { font-size: 13px; font-weight: 500; color: var(--text); }
.enm-inc-lista-fecha { font-size: 12px; color: var(--text2, #6B6B65); }

@media (max-width: 430px) {
  .enm-edit-avatar-bar {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .enm-edit-av { width: 128px; height: 128px; }
  .enm-edit-av i { font-size: 56px; }
  .enm-edit-av-sub { justify-content: center; }
  .enm-hero-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .enm-hero-avatar { width: 120px; height: 120px; }
  .enm-hero-avatar i { font-size: 52px; }
  .enm-hero-tags { justify-content: center; }
  .enm-hero-info { width: 100%; min-width: 0; }
}

.enm-card--sombra { box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08); }
.enm-drop__native { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.enm-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  width: 100%; min-height: 84px; padding: 14px; border: 1.5px dashed #c5ced8; border-radius: 12px;
  background: #f4f7fb; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  color: #5c6b7a; text-align: center; cursor: pointer;
}
.enm-drop i { font-size: 22px; color: #8aa0b4; }
.enm-drop__title { font-size: 12px; color: #6B6B65; }
.enm-drop__hint { font-size: 11px; color: #A0A099; }
.enm-drop.is-over { background: #eaf3de; border-color: #609f98; }
.enm-drop__list { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.enm-drop__list:empty { display: none; margin: 0; }
.enm-drop__file {
  display: inline-flex; align-items: center; gap: 10px; width: fit-content; max-width: 220px;
  padding: 6px 8px; background: #fff;
  border: 0.5px solid rgba(0,0,0,.08); border-radius: 10px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}
.enm-drop__file img { width: 72px; height: 48px; object-fit: cover; border-radius: 6px; flex: none; }
.enm-drop__trash { margin-left: 0; border: 0; background: transparent; color: #A32D2D; cursor: pointer; font-size: 18px; padding: 4px; }

/* ── Menú lateral paleta viva (solo #enmSidebar.em-menu) ─────────────── */
@font-face {
  font-family: "Em Fredoka";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/fredoka-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Em Fredoka";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/fredoka-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Em Fredoka";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/fredoka-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Em Fredoka";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/fredoka-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Em Fredoka";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/fredoka-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Em Fredoka";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/fredoka-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

#enmSidebar.em-menu {
  --em-menu-font: "Em Fredoka", ui-rounded, system-ui, sans-serif;
  --em-menu-ink: #3a352d;
  --em-menu-mute: #6b6458;
  --em-menu-line: #e4ded3;
  --em-menu-surface: #fff;
  --em-menu-shadow: 0 6px 18px rgba(45, 74, 62, 0.1);
  --em-menu-cta-bg: #2d4a3e;
  --em-menu-cta-fg: #fff;
  --em-menu-item-fg: var(--em-menu-ink);
  --em-menu-item-hover: #f6fbf9;
  --em-menu-active-bg: #ddf3ec;
  --em-menu-active-fg: #1b5e4b;
  --em-menu-active-tile-bg: #2d4a3e;
  --em-menu-active-tile-fg: #fff;
  --em-menu-section: var(--em-menu-mute);
  --em-menu-user-bg: #f6fbf9;
  --em-menu-out-bg: #ddf3ec;
  --em-menu-out-fg: #1b5e4b;
  --em-menu-env-bg: #ece6ff;
  --em-menu-env-fg: #4b33b0;
  --em-menu-tg-bg: #f2eee7;
  --em-menu-tg-fg: #6b6458;
  font-family: var(--em-menu-font);
  background: var(--em-menu-surface);
  border-right: 0;
  box-shadow: var(--em-menu-shadow);
  border-radius: 0 24px 24px 0;
  padding: 16px 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(45, 74, 62, 0.22) transparent;
  -webkit-tap-highlight-color: transparent;
}
html[data-em-menu-tema="oscuro"] #enmSidebar.em-menu,
#enmSidebar.em-menu[data-tema="oscuro"] {
  --em-menu-surface: #2d4a3e;
  --em-menu-shadow: 0 6px 18px rgba(45, 74, 62, 0.25);
  --em-menu-ink: #e8f3ef;
  --em-menu-mute: #9fd3c4;
  --em-menu-line: rgba(255, 255, 255, 0.12);
  --em-menu-cta-bg: #ddf3ec;
  --em-menu-cta-fg: #1b5e4b;
  --em-menu-item-fg: #e8f3ef;
  --em-menu-item-hover: rgba(255, 255, 255, 0.08);
  --em-menu-active-bg: #fff;
  --em-menu-active-fg: #2d4a3e;
  --em-menu-active-tile-bg: #ddf3ec;
  --em-menu-active-tile-fg: #1b5e4b;
  --em-menu-section: #9fd3c4;
  --em-menu-user-bg: rgba(255, 255, 255, 0.08);
  --em-menu-out-bg: transparent;
  --em-menu-out-fg: #fff;
  --em-menu-env-bg: rgba(255, 255, 255, 0.14);
  --em-menu-env-fg: #e1f2ec;
  --em-menu-tg-bg: rgba(255, 255, 255, 0.12);
  --em-menu-tg-fg: #fff;
  background: linear-gradient(180deg, #2d4a3e, #223a31);
  color: var(--em-menu-ink);
}
#enmSidebar.em-menu::-webkit-scrollbar { width: 6px; }
#enmSidebar.em-menu::-webkit-scrollbar-thumb {
  background: rgba(45, 74, 62, 0.2);
  border-radius: 999px;
}
html[data-em-menu-tema="oscuro"] #enmSidebar.em-menu::-webkit-scrollbar-thumb,
#enmSidebar.em-menu[data-tema="oscuro"]::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
}

.em-menu-shell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 100%;
}
#enmSidebar.em-menu .enm-sidebar-logo {
  border-bottom: 0;
  padding: 0 4px 6px;
  align-items: center;
}
#enmSidebar.em-menu .enm-logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3a6a5d, #2d4a3e);
}
#enmSidebar.em-menu .enm-logo-name {
  font-family: var(--em-menu-font);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--em-menu-ink);
}
.em-menu-env {
  display: inline-block;
  margin-top: 2px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--em-menu-env-bg);
  color: var(--em-menu-env-fg);
}
#enmSidebar.em-menu .enm-logo-sub:not(.em-menu-env) {
  font-size: 11px;
  color: var(--em-menu-mute);
}
.em-menu-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  margin: 6px 0 4px;
  padding: 0 16px;
  width: 100%;
  border: 0;
  border-radius: 999px;
  font-family: var(--em-menu-font);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  background: var(--em-menu-cta-bg);
  color: var(--em-menu-cta-fg);
  box-shadow: 0 6px 14px rgba(45, 74, 62, 0.25);
  transition: background 220ms ease, color 220ms ease, box-shadow 220ms ease;
}
.em-menu-cta:hover { filter: brightness(1.03); color: var(--em-menu-cta-fg); }
.em-menu-cta--sec {
  margin-bottom: 8px;
  background: transparent;
  color: var(--em-menu-cta-bg);
  border: 1px solid color-mix(in srgb, var(--em-menu-cta-bg) 55%, transparent);
}
.em-menu-cta--sec:hover { filter: none; background: color-mix(in srgb, var(--em-menu-cta-bg) 8%, transparent); }
.em-menu-cta.active {
  outline: 2px solid var(--em-menu-active-fg);
  outline-offset: 2px;
}
#enmSidebar.em-menu .enm-nav {
  padding: 0;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}
#enmSidebar.em-menu .em-menu-foot {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 8px;
  border-top: 0.5px solid var(--em-menu-line);
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
#enmSidebar.em-menu .em-menu-foot__actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 0;
  width: auto;
  min-width: 0;
}
#enmSidebar.em-menu .em-menu-foot__actions .em-menu-logout-form {
  flex: none;
  width: auto;
  margin: 0;
  min-width: 0;
}
#enmSidebar.em-menu .em-menu-foot__actions .em-menu-tema,
#enmSidebar.em-menu .em-menu-foot__actions .em-menu-logout {
  flex: none;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  max-width: none;
  margin-top: 0;
  padding: 0;
  font-size: 1.05rem;
  box-sizing: border-box;
}
#enmSidebar.em-menu .em-menu-foot__actions .em-menu-tema__text,
#enmSidebar.em-menu .em-menu-foot__actions .em-menu-logout__text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
#enmSidebar.em-menu .enm-nav-section {
  margin: 10px 10px 2px;
  font-family: var(--em-menu-font);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--em-menu-section);
}
#enmSidebar.em-menu .enm-nav-item {
  gap: 12px;
  min-height: 48px;
  padding: 6px 10px;
  margin-bottom: 2px;
  border-radius: 16px;
  font-family: var(--em-menu-font);
  font-weight: 500;
  font-size: 0.97rem;
  color: var(--em-menu-item-fg);
  transition: background var(--tr), color var(--tr);
}
#enmSidebar.em-menu .enm-nav-item > i.ti { display: none; }
#enmSidebar.em-menu .enm-nav-item:hover {
  background: var(--em-menu-item-hover);
  color: var(--em-menu-item-fg);
}
#enmSidebar.em-menu .enm-nav-item.active {
  background: var(--em-menu-active-bg);
  color: var(--em-menu-active-fg);
  font-weight: 600;
}
#enmSidebar.em-menu .enm-nav-item:focus:not(:focus-visible) {
  outline: none;
}
#enmSidebar.em-menu .enm-nav-item:focus-visible {
  outline: 2px solid #2d4a3e;
  outline-offset: 2px;
}
html[data-em-menu-tema="oscuro"] #enmSidebar.em-menu .enm-nav-item:focus-visible,
#enmSidebar.em-menu[data-tema="oscuro"] .enm-nav-item:focus-visible {
  outline-color: #ddf3ec;
}
.em-menu-tile {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex: none;
  font-size: 18px;
  transition: background var(--tr), color var(--tr);
}
#enmSidebar.em-menu .enm-nav-item.active .em-menu-tile {
  background: var(--em-menu-active-tile-bg) !important;
  color: var(--em-menu-active-tile-fg) !important;
}
.em-menu-tile--mint { background: #ddf3ec; color: #2f8f7b; }
.em-menu-tile--pnk { background: #ffe3ee; color: #e8478b; }
.em-menu-tile--vio { background: #ece6ff; color: #7b5cf0; }
.em-menu-tile--blu { background: #ddf0ff; color: #2b8ce6; }
.em-menu-tile--ok { background: #ddf6e8; color: #1fa971; }
html[data-em-menu-tema="oscuro"] #enmSidebar.em-menu .em-menu-tile:not(.em-menu-tile--active),
#enmSidebar.em-menu[data-tema="oscuro"] .em-menu-tile:not(.em-menu-tile--active) {
  background: rgba(255, 255, 255, 0.1);
  color: #bfe8dc;
}
.em-menu-label { min-width: 0; }
#enmSidebar.em-menu .enm-sidebar-footer {
  border-top: 0;
  padding: 8px 0 0;
  margin-top: auto;
}
.em-menu-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 16px;
  background: var(--em-menu-user-bg);
  min-width: 0;
}
#enmSidebar.em-menu a.em-menu-user--solo {
  width: fit-content;
  max-width: 100%;
  padding: 4px;
  gap: 0;
  border-radius: 12px;
  background: transparent;
}
#enmSidebar.em-menu a.em-menu-user--solo:hover {
  background: var(--em-menu-item-hover, rgba(45, 74, 62, 0.08));
}
#enmSidebar.em-menu a.em-menu-user--solo.is-active {
  background: transparent;
  box-shadow: none;
}
#enmSidebar.em-menu a.em-menu-user--solo.is-active .enm-av {
  box-shadow: inset 0 0 0 2px var(--em-menu-active-fg, #ddf3ec);
}
#enmSidebar.em-menu a.em-menu-user--solo .enm-av {
  width: 36px;
  height: 36px;
  font-size: 0.68rem;
}
a.em-menu-user--link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background var(--tr), box-shadow var(--tr);
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}
a.em-menu-user--link:hover {
  background: var(--em-menu-item-hover, rgba(45, 74, 62, 0.08));
}
a.em-menu-user--link:focus-visible {
  outline: 2px solid #2d4a3e;
  outline-offset: 2px;
}
a.em-menu-user--link.is-active {
  box-shadow: inset 0 0 0 1px rgba(45, 74, 62, 0.22);
}
.em-menu-user__cfg {
  flex-shrink: 0;
  font-size: 1.1rem;
  color: var(--em-menu-mute);
  opacity: 0.85;
}
a.em-menu-user--link:hover .em-menu-user__cfg {
  color: var(--em-menu-ink);
  opacity: 1;
}
#enmSidebar.em-menu .enm-av {
  width: 36px;
  height: 36px;
  font-size: 0.75rem;
  font-weight: 500;
  font-family: var(--em-menu-font);
}
.em-menu-user__meta {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
}
.em-menu-user__name {
  display: block;
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--em-menu-mute);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#enmSidebar.em-menu .em-menu-user__email {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--em-menu-mute);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.em-menu-user__email {
  display: block;
  font-size: 0.78rem;
  color: var(--em-menu-mute);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.em-menu-tema {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  font-family: var(--em-menu-font);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  background: var(--em-menu-out-bg);
  color: var(--em-menu-out-fg);
  transition: background var(--tr), color var(--tr), border-color var(--tr);
}
html[data-em-menu-tema="oscuro"] #enmSidebar.em-menu .em-menu-tema,
#enmSidebar.em-menu[data-tema="oscuro"] .em-menu-tema {
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.em-menu-tema:focus:not(:focus-visible) {
  outline: none;
}
.em-menu-tema:focus-visible {
  outline: 2px solid #2d4a3e;
  outline-offset: 2px;
}
.em-menu-logout-form { margin: 8px 0 0; }
.em-menu-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  font-family: var(--em-menu-font);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  background: var(--em-menu-out-bg);
  color: var(--em-menu-out-fg);
  transition: background var(--tr), color var(--tr), border-color var(--tr);
}
html[data-em-menu-tema="oscuro"] #enmSidebar.em-menu .em-menu-logout,
#enmSidebar.em-menu[data-tema="oscuro"] .em-menu-logout {
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent;
}
.em-menu-logout:focus:not(:focus-visible) {
  outline: none;
}
.em-menu-logout:focus-visible {
  outline: 2px solid #2d4a3e;
  outline-offset: 2px;
}

/* Pie del menú: tema y salir mismo tamaño que el avatar (después de .em-menu-tema/.em-menu-logout). */
#enmSidebar.em-menu .em-menu-foot-form {
  margin: 0;
  width: auto;
  flex: none;
}
#enmSidebar.em-menu .em-menu-foot-btn {
  width: 36px;
  min-width: 36px;
  max-width: 36px;
  height: 36px;
  min-height: 36px;
  margin: 0;
  padding: 0;
  gap: 0;
  border-radius: 11px;
  flex-shrink: 0;
  box-sizing: border-box;
}
#enmSidebar.em-menu .em-menu-foot-btn .em-menu-tema__text,
#enmSidebar.em-menu .em-menu-foot-btn .em-menu-logout__text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}
html[data-em-menu-tema="oscuro"] #enmSidebar.em-menu .em-menu-foot-btn,
#enmSidebar.em-menu[data-tema="oscuro"] .em-menu-foot-btn {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
}

@media (min-width: 992px) {
  html:has(.enm-env-banner) #enmSidebar.em-menu {
    top: 33px;
    height: calc(100vh - 33px);
  }
  .em-mob-bar__menu,
  .em-mob-drawer__close {
    display: none !important;
  }
  .enm-topbar.em-mob-bar {
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    box-shadow: none;
    padding: 14px 22px;
  }
  .enm-topbar.em-mob-bar .enm-topbar-title {
    font-family: inherit;
    font-weight: 500;
    font-size: 16px;
    color: var(--text);
  }
  .enm-topbar.em-mob-bar .enm-topbar-sub {
    font-size: 12px;
    color: var(--text3);
    white-space: normal;
  }
  html.enm-nav-collapsed #enmSidebar.em-menu {
    width: var(--sidebar-rail-w);
    min-width: var(--sidebar-rail-w);
    max-width: var(--sidebar-rail-w);
    padding: 16px 8px;
    align-items: center;
    overflow: visible;
  }
  html.enm-nav-collapsed #enmSidebar.em-menu .em-menu-shell {
    overflow: hidden;
    width: 100%;
    max-width: 100%;
  }
  html.enm-nav-collapsed #enmSidebar.em-menu > .enm-nav-collapse.em-menu-tg {
    z-index: 260;
    top: 10px;
    right: auto;
    left: 50%;
    width: 34px;
    height: 34px;
    font-size: 16px;
    box-shadow: 0 2px 10px rgba(45, 74, 62, 0.18);
    transform: translateX(-50%);
  }
  html.enm-nav-collapsed #enmSidebar.em-menu > .enm-nav-collapse.em-menu-tg:hover {
    transform: translateX(-50%) scale(1.06);
  }
  html.enm-nav-collapsed #enmSidebar.em-menu > .enm-nav-collapse.em-menu-tg:active {
    transform: translateX(-50%) scale(0.96);
  }
  html.enm-nav-collapsed .enm-layout-main {
    margin-left: var(--sidebar-rail-w);
    width: calc(100% - var(--sidebar-rail-w));
    max-width: calc(100% - var(--sidebar-rail-w));
  }
  html.enm-nav-collapsed .enm-layout-main > .enm-topbar {
    padding-left: 28px;
  }
  html.enm-nav-collapsed #enmSidebar.em-menu .enm-nav {
    overflow-x: visible;
    overflow-y: auto;
    width: 100%;
    scrollbar-gutter: stable;
    padding-bottom: 10px;
    box-sizing: border-box;
  }
  html.enm-nav-collapsed:not(.enm-nav-animating) #enmSidebar.em-menu .enm-logo-text,
  html.enm-nav-collapsed:not(.enm-nav-animating) #enmSidebar.em-menu .em-menu-label,
  html.enm-nav-collapsed:not(.enm-nav-animating) #enmSidebar.em-menu .em-menu-cta .em-menu-label,
  html.enm-nav-collapsed:not(.enm-nav-animating) #enmSidebar.em-menu .em-menu-tema__text,
  html.enm-nav-collapsed:not(.enm-nav-animating) #enmSidebar.em-menu .em-menu-logout__text,
  html.enm-nav-collapsed:not(.enm-nav-animating) #enmSidebar.em-menu .em-menu-user__meta {
    display: none !important;
  }
  html.enm-nav-collapsed:not(.enm-nav-animating) #enmSidebar.em-menu .enm-sidebar-logo {
    flex-direction: column;
    padding: 46px 0 6px;
  }
  html.enm-nav-collapsed:not(.enm-nav-animating) #enmSidebar.em-menu .em-menu-cta {
    width: 48px;
    padding: 0;
    margin-left: auto;
    margin-right: auto;
  }
  html.enm-nav-collapsed:not(.enm-nav-animating) #enmSidebar.em-menu .enm-nav-item {
    justify-content: center;
    width: 48px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 4px;
    padding: 4px;
    gap: 0;
    overflow: visible;
  }
  html.enm-nav-collapsed:not(.enm-nav-animating) #enmSidebar.em-menu .enm-nav-item.active {
    background: transparent;
    color: var(--em-menu-item-fg);
    box-shadow: none;
  }
  html.enm-nav-collapsed:not(.enm-nav-animating) #enmSidebar.em-menu .enm-nav-item:focus {
    outline: none;
    box-shadow: none;
  }
  html.enm-nav-collapsed:not(.enm-nav-animating) #enmSidebar.em-menu .enm-nav-item:focus-visible {
    outline: 2px solid var(--em-menu-active-fg);
    outline-offset: -2px;
  }
  html.enm-nav-collapsed:not(.enm-nav-animating) #enmSidebar.em-menu .em-menu-cta:hover {
    filter: none;
  }
  html.enm-nav-collapsed:not(.enm-nav-animating) #enmSidebar.em-menu .em-menu-tile {
    width: 40px;
    height: 40px;
  }
  html.enm-nav-collapsed:not(.enm-nav-animating) #enmSidebar.em-menu .enm-nav-section {
    font-size: 0;
    line-height: 0;
    height: 1px;
    width: 28px;
    margin: 8px auto;
    padding: 0;
    background: var(--em-menu-line);
    letter-spacing: 0;
    overflow: hidden;
  }
  html.enm-nav-collapsed:not(.enm-nav-animating) #enmSidebar.em-menu .em-menu-user__cfg {
    display: none !important;
  }
  html.enm-nav-collapsed:not(.enm-nav-animating) #enmSidebar.em-menu a.em-menu-user--link {
    width: 48px;
    height: auto;
    margin: 0 auto;
    padding: 4px;
    justify-content: center;
    align-items: center;
    gap: 0;
    border-radius: 16px;
    overflow: visible;
  }
  html.enm-nav-collapsed:not(.enm-nav-animating) #enmSidebar.em-menu a.em-menu-user--link .enm-av {
    width: 40px;
    height: 40px;
    font-size: 0.75rem;
  }
  html.enm-nav-collapsed:not(.enm-nav-animating) #enmSidebar.em-menu .em-menu-user {
    padding: 0;
    background: transparent;
    justify-content: center;
  }
  html.enm-nav-collapsed:not(.enm-nav-animating) #enmSidebar.em-menu .em-menu-foot {
    padding-top: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }
  html.enm-nav-collapsed:not(.enm-nav-animating) #enmSidebar.em-menu .em-menu-foot__actions {
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: auto;
  }
  html.enm-nav-collapsed:not(.enm-nav-animating) #enmSidebar.em-menu .em-menu-foot__actions .em-menu-logout-form {
    flex: none;
    width: auto;
    margin: 0;
  }
  html.enm-nav-collapsed:not(.enm-nav-animating) #enmSidebar.em-menu .em-menu-foot-btn {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    margin: 0 auto;
    border-radius: 11px;
    border: 0;
    background: rgba(255, 255, 255, 0.1);
    color: #bfe8dc;
    box-shadow: none;
  }
  html.enm-nav-collapsed:not(.enm-nav-animating):not([data-em-menu-tema="oscuro"]) #enmSidebar.em-menu .em-menu-foot-btn,
  html.enm-nav-collapsed:not(.enm-nav-animating) #enmSidebar.em-menu[data-tema="claro"] .em-menu-foot-btn {
    background: #ddf3ec;
    color: #2f8f7b;
  }
  html.enm-nav-collapsed:not(.enm-nav-animating)[data-em-menu-tema="oscuro"] #enmSidebar.em-menu .em-menu-foot-btn,
  html.enm-nav-collapsed:not(.enm-nav-animating) #enmSidebar.em-menu[data-tema="oscuro"] .em-menu-foot-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #bfe8dc;
    border: 0;
  }

  /* Durante el cambio de ancho el texto no se parte ni se lee a medias. */
  #enmSidebar.em-menu .em-menu-label,
  #enmSidebar.em-menu .enm-logo-text,
  #enmSidebar.em-menu .enm-logo-name,
  #enmSidebar.em-menu .enm-nav-section,
  #enmSidebar.em-menu .em-menu-tema__text,
  #enmSidebar.em-menu .em-menu-logout__text {
    white-space: nowrap;
  }
  #enmSidebar.em-menu .enm-nav-item,
  #enmSidebar.em-menu .em-menu-cta,
  #enmSidebar.em-menu .enm-sidebar-logo,
  #enmSidebar.em-menu .em-menu-tema,
  #enmSidebar.em-menu .em-menu-logout {
    flex-wrap: nowrap;
    min-width: 0;
  }
  #enmSidebar.em-menu .em-menu-label,
  #enmSidebar.em-menu .enm-logo-text {
    min-width: 0;
    overflow: hidden;
  }
  html.enm-nav-collapsed.enm-nav-animating #enmSidebar.em-menu .em-menu-label,
  html.enm-nav-collapsed.enm-nav-animating #enmSidebar.em-menu .enm-logo-text,
  html.enm-nav-collapsed.enm-nav-animating #enmSidebar.em-menu .em-menu-user__meta,
  html.enm-nav-collapsed.enm-nav-animating #enmSidebar.em-menu .em-menu-tema__text,
  html.enm-nav-collapsed.enm-nav-animating #enmSidebar.em-menu .em-menu-logout__text,
  html.enm-nav-collapsed.enm-nav-animating #enmSidebar.em-menu .enm-nav-section {
    opacity: 0;
  }
  html.enm-nav-animating:not(.enm-nav-collapsed) #enmSidebar.em-menu .em-menu-label,
  html.enm-nav-animating:not(.enm-nav-collapsed) #enmSidebar.em-menu .enm-logo-text,
  html.enm-nav-animating:not(.enm-nav-collapsed) #enmSidebar.em-menu .em-menu-user__meta,
  html.enm-nav-animating:not(.enm-nav-collapsed) #enmSidebar.em-menu .em-menu-tema__text,
  html.enm-nav-animating:not(.enm-nav-collapsed) #enmSidebar.em-menu .em-menu-logout__text,
  html.enm-nav-animating:not(.enm-nav-collapsed) #enmSidebar.em-menu .enm-nav-section {
    animation: em-menu-label-in var(--em-nav-dur) linear both;
  }
}

@keyframes em-menu-label-in {
  0%, 32% { opacity: 0; }
  62%, 100% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  #enmSidebar.em-menu,
  #enmSidebar.em-menu .enm-nav-item,
  .em-menu-cta,
  .em-menu-tema,
  .em-menu-logout,
  .em-menu-tile,
  .enm-layout-main,
  .enm-layout-main > .enm-topbar,
  #enmSidebar.em-menu > .enm-nav-collapse.em-menu-tg,
  #enmSidebar.em-menu > .enm-nav-collapse.em-menu-tg i {
    transition: none !important;
    animation: none !important;
  }
}
