@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── Custom Scrollbar ─────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ── DataTables overrides for Tailwind look ───────── */
.dataTables_wrapper .dataTables_filter input {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.875rem;
  outline: none;
  transition: border-color .2s;
}
.dataTables_wrapper .dataTables_filter input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.dataTables_wrapper .dataTables_length select {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 5px 28px 5px 10px;
  font-size: 0.875rem;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: 6px !important;
  border: none !important;
  padding: 4px 10px !important;
  margin: 0 2px !important;
  font-size: 0.85rem;
  color: #374151 !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: #6366f1 !important;
  color: #fff !important;
  border: none !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.current) {
  background: #f1f5f9 !important;
  color: #374151 !important;
}
.dataTables_wrapper .dataTables_info { font-size: 0.8rem; color: #6b7280; }

/* ── Alert Animations ─────────────────────────────── */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.alert-animate { animation: slideDown 0.3s ease forwards; }

/* ── Login Page Animations ────────────────────────── */
@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-24px) scale(1.03); }
}
@keyframes floatReverse {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(24px) scale(1.03); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.orb-1 { animation: float 8s ease-in-out infinite; }
.orb-2 { animation: floatReverse 9s ease-in-out infinite; }
.orb-3 { animation: float 11s ease-in-out infinite 2s; }
.fade-in-up { animation: fadeInUp 0.5s ease forwards; }

/* ── Sidebar transition helpers ───────────────────── */
#layoutSidenav_nav {
  transition: width 0.3s cubic-bezier(0.4,0,0.2,1),
              transform 0.3s cubic-bezier(0.4,0,0.2,1);
}
#layoutSidenav_content {
  transition: margin-left 0.3s cubic-bezier(0.4,0,0.2,1);
}

/* ── Tooltip on collapsed sidebar icons ───────────── */
.sidebar-tooltip {
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.nav-item-wrap:hover .sidebar-tooltip {
  opacity: 1;
}

/* ── Active nav indicator ─────────────────────────── */
.nav-link-active {
  background: rgba(99,102,241,0.18) !important;
  border-left: 3px solid #818cf8 !important;
  color: #e0e7ff !important;
}

/* ── Card hover lift ──────────────────────────────── */
.card-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-lift:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.10) !important;
}

/* ── Badge pulse ──────────────────────────────────── */
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.3); opacity: 0.7; }
}
.badge-pulse { animation: pulse-dot 1.8s ease-in-out infinite; }

body.pwa-standalone {
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

@media (max-width: 640px) {
  [data-pwa-notifications] {
    min-height: 40px;
    white-space: nowrap;
  }

  .panel-head {
    gap: 0.75rem;
  }

  #offlineQueueBadge {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
  }
}
