/* ============================================================
   Activa Portal - Escala global 100% + Soporte Mobile (iOS/Android)
   Vista tamano completo en desktop, optimizado para mobile.
   ============================================================ */

/* ====== Desktop: vista al 100% (tamano completo) ====== */
@media (min-width: 1280px) {
  html { zoom: 1; }
}

/* ====== Laptop / pantallas medianas: 100% ====== */
@media (min-width: 1024px) and (max-width: 1279px) {
  html { zoom: 1; }
}

/* ====== Tablet: 100% ====== */
@media (min-width: 769px) and (max-width: 1023px) {
  html { zoom: 1; }
}

/* ====== Mobile (Android/iOS): vista 100% optimizada ====== */
@media (max-width: 768px) {
  html { zoom: 1 !important; }
  html, body {
    max-width: 100vw;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    text-size-adjust: 100%;
  }
  body {
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  /* Prevenir auto-zoom de iOS al hacer focus en inputs */
  input, select, textarea {
    font-size: 16px !important;
  }
  /* Touch targets minimos de 40px para Android/iOS */
  button, .btn, .nav-item, .sn-tab, .sn-btn, a[role="button"], a.nav-item {
    min-height: 40px;
  }
  /* Sidebar y overlays adaptables */
  .sidebar { width: 85vw !important; max-width: 320px !important; }
  /* Modals: usar todo el ancho disponible */
  .sn-modal, .modal-content, .modal-dialog { width: 96vw !important; max-width: 96vw !important; }
  /* Containers fluidos */
  .container, .main-content, .content-area { padding-left: 12px !important; padding-right: 12px !important; }
  /* Mejor scroll touch */
  body, .scroll, .sn-bd, .table-container { -webkit-overflow-scrolling: touch; }
  /* Texto base mas legible en mobile */
  body { font-size: 14px; }
  /* Reducir paddings excesivos */
  .card, .panel { padding: 12px !important; }
}

/* ====== iOS Safari especifico ====== */
@supports (-webkit-touch-callout: none) {
  body {
    -webkit-text-size-adjust: 100%;
  }
  /* Prevenir bounce/elastic scroll en iOS */
  html, body {
    overscroll-behavior-y: contain;
  }
}

/* ====== SIDEBAR FULL HEIGHT (sin compensacion porque ya no hay zoom) ====== */
@media (min-width: 769px) {
  .sidebar {
    height: 100vh !important;
    min-height: 100vh !important;
  }
}
