/* Archivo generado al dividir styles.css en bloques. */

/* =========================================================
   CBAT APP
   BLOQUE 2 — HEADER + BRANDING
   D1.1 · cabecera más compacta y más app
   ========================================================= */

/* ===== HEADER GENERAL ===== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--shell-header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--shell-header-border);
  box-shadow: var(--shadow-header);
}

.site-header__inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 12px 16px;
}

/* ===== BRAND ===== */

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand__logo {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 14px;
  background: var(--shell-header-logo-bg);
  border: 1px solid var(--shell-header-logo-border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 6px 14px rgba(18, 34, 55, 0.10);
}

.brand__logo img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
}

.brand__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand__text h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.08;
  color: var(--shell-header-text);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand__text p {
  margin: 0;
  font-size: 12px;
  line-height: 1.25;
  color: var(--shell-header-text-soft);
  font-weight: 500;
}

/* ===== VARIANTE MÁS APP ===== */

.site-header--compact .site-header__inner {
  padding-top: 10px;
  padding-bottom: 10px;
}

.site-header--compact .brand {
  gap: 10px;
}

.site-header--compact .brand__logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.site-header--compact .brand__logo img {
  width: 32px;
  height: 32px;
}

.site-header--compact .brand__text h1 {
  font-size: 17px;
}

.site-header--compact .brand__text p {
  font-size: 11px;
}

/* ===== RESPONSIVE HEADER ===== */

@media (max-width: 640px) {
  .site-header__inner {
    padding: 10px 14px;
  }

  .brand {
    gap: 10px;
  }

  .brand__logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .brand__logo img {
    width: 32px;
    height: 32px;
  }

  .brand__text h1 {
    font-size: 16px;
  }

  .brand__text p {
    font-size: 11px;
    line-height: 1.2;
  }
}

/* =========================================================
   CBAT APP
   BLOQUE 3 — BOTTOM NAV / TABS
   MENÚ INFERIOR MEJORADO
   ========================================================= */

/* ===== CONTENEDOR FIJO INFERIOR ===== */

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 120;
  width: 100%;
  margin: 0;
  padding: 0;
  background: var(--shell-nav-bg);
  border-top: 1px solid var(--shell-nav-border);
  box-shadow: var(--shadow-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ===== CONTENIDO INTERIOR ===== */

.bottom-nav__inner {
  width: 100%;
  margin: 0;
  padding:
    0 calc(env(safe-area-inset-left) + 6px)
    calc(env(safe-area-inset-bottom) + 6px)
    calc(env(safe-area-inset-right) + 6px);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 6px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* ===== BOTÓN TAB ===== */

.bottom-nav__tab {
  position: relative;
  appearance: none;
  border: 0;
  outline: none;
  background: transparent;
  min-height: 64px;
  padding: 10px 8px 12px;
  margin: 0;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  color: var(--shell-nav-text);
  font: inherit;
  font-weight: 700;
  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

/* quitamos la sensación de separador rígido */
.bottom-nav__tab + .bottom-nav__tab {
  border-left: 0;
}

.bottom-nav__tab:hover {
  background: var(--shell-nav-hover);
}

.bottom-nav__tab:active {
  transform: scale(0.98);
}

.bottom-nav__tab:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.28);
  outline-offset: -2px;
}

/* ===== ICONO Y TEXTO ===== */

.bottom-nav__icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.18s ease;
}

.bottom-nav__icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.bottom-nav__label {
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
  white-space: nowrap;
}

/* ===== TAB ACTIVA ===== */

.bottom-nav__tab.is-active {
  background: var(--shell-nav-active-bg);
  color: var(--shell-nav-text-active);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.bottom-nav__tab.is-active .bottom-nav__icon {
  transform: translateY(-1px);
}

.bottom-nav__tab.is-active .bottom-nav__label {
  font-weight: 800;
}

.bottom-nav__tab.is-active::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 3px;
  border-radius: 999px;
  background: var(--shell-nav-active-border);
}

/* ===== PANELES ===== */

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

/* ===== AJUSTE MÓVIL ===== */

@media (max-width: 480px) {
  .bottom-nav__inner {
    gap: 4px;
    padding:
      0 calc(env(safe-area-inset-left) + 4px)
      calc(env(safe-area-inset-bottom) + 4px)
      calc(env(safe-area-inset-right) + 4px);
  }

  .bottom-nav__tab {
    min-height: 60px;
    padding: 8px 6px 10px;
    border-radius: 14px;
    gap: 5px;
  }

  .bottom-nav__icon,
  .bottom-nav__icon svg {
    width: 18px;
    height: 18px;
  }

  .bottom-nav__label {
    font-size: 11px;
  }

  .main-content {
    padding-bottom: 86px;
  }
}
