/* ── Hub & Spoke — cards reutilizables ────────────────────────────────────── */
.hub-card {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 14px;
  padding: 20px;
  transition: border-color .15s, transform .15s;
  height: 100%;
  display: block;
  text-decoration: none;
}
.hub-card:hover {
  border-color: #1a3a6b;
  transform: translateY(-2px);
  text-decoration: none;
}
.hub-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 14px;
}
.hub-name {
  font-size: 14px;
  font-weight: 600;
  color: #0a1628;
  margin-bottom: 6px;
}
.hub-desc {
  font-size: 12px;
  color: #6c757d;
  line-height: 1.6;
}

/* ── Hub & Spoke — secciones con contexto (Forma B) ──────────────────────── */
.hub-section {
  margin-bottom: 28px;
}
.hub-section:last-child {
  margin-bottom: 0;
}
.hub-section-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: #f8f9fa;
  border-left: 3px solid #1a3a6b;
  border-radius: 0 8px 8px 0;
  margin-bottom: 14px;
}
.hub-section-icon {
  font-size: 22px;
  color: #1a3a6b;
  flex-shrink: 0;
  margin-top: 2px;
}
.hub-section-title {
  font-size: 14px;
  font-weight: 600;
  color: #0a1628;
  margin-bottom: 4px;
}
.hub-section-desc {
  font-size: 12px;
  color: #6c757d;
  line-height: 1.6;
  margin: 0;
}
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

/* ── Centro de Ayuda — pestañas del diagrama ───────────────────────────────── */
.btn-ayuda-tab {
  padding: 5px 14px;
  font-size: 12px;
  border-radius: 100px;
  border: 1px solid #dee2e6;
  background: #f8f9fa;
  color: #495057;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  outline: none;
}
.btn-ayuda-tab:hover {
  background: #e8f0fe;
  border-color: #1a3a6b;
  color: #0a2463;
}
.btn-ayuda-tab.active {
  background: #1a3a6b;
  border-color: #1a3a6b;
  color: white;
}

/* ── PWA install button — sidebar colapsado ────────────────────────────────── */
.pwa-btn-collapsed { display: none !important; }
.pwa-btn-expanded  { display: block !important; }

.sidebar-mini.sidebar-collapse .pwa-btn-expanded {
  display: none !important;
}
.sidebar-mini.sidebar-collapse .pwa-btn-collapsed {
  display: flex !important;
  align-items: center;
  justify-content: center;
}
.sidebar-mini.sidebar-collapse .pwa-install-wrap {
  padding: 4px !important;
  display: flex;
  justify-content: center;
}

/* ── Navbar móvil ──────────────────────────────────────────────────────────── */
/* Ícono ❓ sin padding extra */
.main-header .nav-item a[href*="ayuda"] {
  padding: 0 6px !important;
}

/* Dropdown del usuario — no se sale de la pantalla en móvil */
@media (max-width: 767px) {
  .user-menu .dropdown-menu {
    min-width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
    right: -10px !important;
    left: auto !important;
  }
}

/* Búsqueda global — oculta en pantallas muy pequeñas */
@media (max-width: 480px) {
  #global-search-wrap {
    display: none !important;
  }
}

/* ── Portal padre — mobile first ──────────────────────────────────────────── */
@media (max-width: 767px) {
  body.role-padre .main-sidebar {
    display: none !important;
  }
  body.role-padre .content-wrapper {
    margin-left: 0 !important;
  }
}
