:root {
  --primary-color: #0d6efd;
  --sidebar-width: 260px;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #f4f6f9;
  color: #333;
}

.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background-color: #1e293b;
  color: #cbd5e1;
  transition: all 0.3s;
}

.sidebar .nav-link {
  color: #94a3b8;
  padding: 0.65rem 1rem;
  font-size: 0.92rem;
  border-radius: 0.375rem;
  margin: 0.15rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar .nav-link:hover, .sidebar .nav-link.active {
  color: #fff;
  background-color: #334155;
}

.sidebar .nav-link i {
  font-size: 1.15rem;
}

.sidebar .nav-header {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  padding: 1rem 1.25rem 0.25rem;
  letter-spacing: 0.05em;
}

.main-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.75rem 1.5rem;
}

.card {
  border: 1px solid #e2e8f0;
  border-radius: 0.625rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.stat-card {
  border-left: 4px solid var(--primary-color);
}

.stat-card.stat-success { border-left-color: #198754; }
.stat-card.stat-warning { border-left-color: #ffc107; }
.stat-card.stat-danger { border-left-color: #dc3545; }
.stat-card.stat-info { border-left-color: #0dcaf0; }

.badge-status {
  font-size: 0.85em;
  padding: 0.35em 0.65em;
}

/* Scanner styles */
#reader {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
}

#reader video {
  border-radius: 8px;
  object-fit: cover;
}

/* Printable ID Cards styling */
@media print {
  .no-print, .sidebar, .topbar, .btn, .card-header-actions {
    display: none !important;
  }
  body, .main-content {
    background: #fff !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .card-print-container {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    page-break-after: always;
  }
  .id-card {
    page-break-inside: avoid !important;
    border: 1.5px solid #000 !important;
    box-shadow: none !important;
  }
  .table {
    border-color: #000 !important;
  }
}

.id-card {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  width: 100%;
  max-width: 340px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.id-card-header {
  border-bottom: 2px solid #0d6efd;
  padding-bottom: 6px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.id-card-body {
  display: flex;
  gap: 12px;
  align-items: center;
}

.id-card-qr {
  width: 110px;
  height: 110px;
  object-fit: contain;
}
