* {
  font-family: "Inter", system-ui, sans-serif;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

[data-tab-panel] {
  display: none;
}

[data-tab-panel].active {
  display: block;
}

/* ── Sidebar nav links ── */
.nav-btn {
  color: #94a3b8;
  text-decoration: none;
  display: flex;
}

.nav-btn.active {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
}

[data-acc-body] {
  display: none;
}

[data-acc-body].open {
  display: block;
}

.chevron-icon {
  transition: transform 0.2s ease;
}

.chevron-icon.open {
  transform: rotate(90deg);
}

.kpi-number {
  font-size: 20px;
  letter-spacing: -0.02em;
}

.req-number {
  font-size: 18px;
  letter-spacing: -0.03em;
}

.pulse-dot {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.toast {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  min-width: 300px;
  max-width: 420px;
  background: #1e293b;
  color: #f8fafc;
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  transform: translateX(120%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.toast.show {
  transform: translateX(0);
}

.toast-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 500;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open {
  display: flex;
}

@media (max-width: 768px) {
  #sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    bottom: 0;
    z-index: 200;
    transition: left 0.3s ease;
  }

  #sidebar.open {
    left: 0;
  }

  #mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 199;
  }

  #mobile-overlay.open {
    display: block;
  }
}

/* ── Responsive: Table ── */
@media (max-width: 640px) {
  .acc-perf-table th,
  .acc-perf-table td {
    padding-left: 12px;
    padding-right: 12px;
    padding-top: 10px;
    padding-bottom: 10px;
    font-size: 13px;
  }

  .acc-perf-table thead th {
    font-size: 12px;
  }

  .acc-perf-table tbody tr {
    height: auto;
  }
}

/* ── Responsive: Charts / table horizontal scroll ── */
.overflow-x-auto::-webkit-scrollbar {
  height: 4px;
}

/* ── Batch history: KPI numbers scale down on very small screens ── */
@media (max-width: 400px) {
  #bh-session,
  #bh-total,
  #bh-exc,
  #bh-reqs {
    font-size: 1rem;
    line-height: 1.5rem;
  }
}

/* ── Batch history table: tighter spacing on mobile ── */
@media (max-width: 640px) {
  .bh-col-header {
    padding-left: 12px;
    padding-right: 12px;
    padding-top: 8px;
    padding-bottom: 8px;
    gap: 8px;
  }
  #batch-history-list {
    padding-left: 8px;
    padding-right: 8px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  #batch-history-list > div {
    padding-top: 10px;
    padding-bottom: 10px;
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* ── Batch history: Sent/Dispatched column — visual separator from Created At ── */
.bh-col-header > div:nth-child(5),
#batch-history-list > div > div:nth-child(5) {
  border-left: 1px solid #f0f1f3;
  padding-left: 14px;
  margin-left: 4px;
}

/* ── Templates Export Center: column header min-width tidy scrollbar ── */
.tec-col-header {
  min-width: 640px;
}
#tec-list {
  min-width: 640px;
}
@media (max-width: 640px) {
  .tec-col-header {
    padding-left: 12px;
    padding-right: 12px;
  }
  #tec-list > div {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* ── Certificates page KPI numbers scale on very small screens ── */
@media (max-width: 400px) {
  #kpi-live-req,
  #kpi-ready,
  #kpi-exceptions {
    font-size: 1rem;
    line-height: 1.5rem;
  }
}
