/* AFN Logistics Modern Styles */
:root {
  --primary-color: #0d6efd;
  --primary-hover: #0b5ed7;
  --secondary-color: #6c757d;
  --dark-bg: #1e293b;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #f1f5f9;
  color: #334155;
}

.bg-login {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
}

.login-card {
  width: 100%;
  max-width: 440px;
  border-radius: 1rem;
  background: #ffffff;
}

.login-brand-icon {
  width: 64px;
  height: 64px;
  background: #eff6ff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Navbar */
.navbar-brand {
  font-weight: 700;
  letter-spacing: -0.5px;
}

/* Dashboard Cards */
.stat-card {
  border: none;
  border-radius: 0.75rem;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}

.stat-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Upload Dropzone */
.upload-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 1rem;
  padding: 3rem 2rem;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.25s ease;
}

.upload-dropzone:hover, .upload-dropzone.dragover {
  border-color: #0d6efd;
  background: #eff6ff;
}

.upload-icon-circle {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.25rem;
  background: #e2e8f0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease;
}

.upload-dropzone:hover .upload-icon-circle {
  background: #dbeafe;
}

/* Table styles */
.table-custom th {
  background-color: #f8fafc;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  border-bottom: 2px solid #e2e8f0;
}

.table-custom td {
  font-size: 0.9rem;
  vertical-align: middle;
}

.badge-scanned {
  background-color: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
  font-weight: 600;
}

.badge-pending {
  background-color: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  font-weight: 600;
}

/* Navigation pills */
.nav-pills .nav-link {
  color: #64748b;
  font-weight: 500;
  border-radius: 0.5rem;
  padding: 0.6rem 1.25rem;
}

.nav-pills .nav-link.active {
  background-color: #0d6efd;
  color: #ffffff;
}

.nav-pills .nav-link:hover:not(.active) {
  background-color: #e2e8f0;
  color: #1e293b;
}

/* Progress indicator */
.progress-thin {
  height: 8px;
  border-radius: 4px;
}

/* Global Busy / Sync Animation Overlay */
.busy-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999999;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s ease-in-out;
}

.busy-card {
  width: 100%;
  max-width: 360px;
  background: #ffffff;
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  animation: busyPopIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes busyPopIn {
  from {
    transform: scale(0.92);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.busy-spinner-wrapper {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px solid #e2e8f0;
  border-top-color: #0d6efd;
  border-right-color: #3b82f6;
  animation: busySpin 0.9s linear infinite;
}

@keyframes busySpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.busy-logo-center {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: contain;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  background: #ffffff;
  padding: 4px;
}

/* Spin animation for refresh icons */
.fa-spin-fast {
  animation: fa-spin 0.75s infinite linear;
}

/* User Badge in Navbar */
.navbar-user-pill {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.2);
  transition: all 0.2s ease;
}

.navbar-user-pill:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(148, 163, 184, 0.4);
}

/* Filter bar input group */
.filter-search-group .input-group-text,
.filter-search-group .form-control,
.filter-search-group .btn {
  height: 33px;
}
