/* ==========================================================================
   SOBAT-AI - Responsive & Mobile-First Stylesheet
   Breakpoints:
   - Mobile: < 768px (iPhone 390x844, etc.)
   - Tablet: 768px - 1024px
   - Laptop / Desktop: > 1024px
   ========================================================================== */

/* Tablet & Mobile Breakpoints */
@media (max-width: 991.98px) {
  .app-sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }

  .app-sidebar.show {
    transform: translateX(0);
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.25);
  }

  .app-main {
    margin-left: 0 !important;
  }

  /* Overlay backdrop when sidebar is open */
  .sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
    z-index: 1035;
  }

  .sidebar-backdrop.show {
    display: block;
  }

  .content-wrapper {
    padding: 1rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-value {
    font-size: 1.5rem;
  }
}

/* Mobile Specific (Smartphones, e.g. 390px - 576px) */
@media (max-width: 575.98px) {
  .app-navbar {
    padding: 0 0.85rem;
  }

  .system-title-tag .subtitle {
    display: none;
  }

  .page-header {
    margin-bottom: 1rem;
  }

  .page-title {
    font-size: 1.15rem;
  }

  .card-body-modern {
    padding: 1rem;
  }

  .network-container {
    height: 320px;
  }

  .checkin-emoji-group {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .emoji-option {
    min-width: 28%;
  }

  /* Mobile bottom bar if needed */
  .hide-on-mobile {
    display: none !important;
  }

  .role-pill {
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
  }

  .table-modern thead th,
  .table-modern tbody td {
    padding: 0.65rem 0.75rem;
    font-size: 0.8rem;
  }
}

/* Desktop Collapse Mode */
body.sidebar-collapsed .app-sidebar {
  width: 72px;
}

body.sidebar-collapsed .brand-title,
body.sidebar-collapsed .brand-subtitle,
body.sidebar-collapsed .menu-category,
body.sidebar-collapsed .nav-link-custom span,
body.sidebar-collapsed .nav-badge,
body.sidebar-collapsed .user-details {
  display: none !important;
}

body.sidebar-collapsed .app-main {
  margin-left: 72px;
}

body.sidebar-collapsed .nav-link-custom {
  justify-content: center;
  padding: 0.65rem 0;
}

body.sidebar-collapsed .nav-link-custom i {
  font-size: 1.25rem;
  margin: 0;
}

/* Print Optimization for Reports */
@media print {
  .app-sidebar,
  .app-navbar,
  .app-footer,
  .btn,
  .toast-container-custom,
  .no-print {
    display: none !important;
  }

  .app-main {
    margin-left: 0 !important;
    padding: 0 !important;
  }

  .content-wrapper {
    padding: 0 !important;
  }

  .card-modern {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    page-break-inside: avoid;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
}
