:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #dbeafe;
  --accent: #22c55e;
  --danger-soft: #fee2e2;
  --bg-soft: #f3f4f6;
  --text-muted: #6b7280;
}

/* ====== GLOBAL ====== */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9rem;
  background:
    radial-gradient(circle at top left, #dbeafe 0, #eff6ff 40%, #f9fafb 70%, #ffffff 100%);
  color: #111827;
  min-height: 100vh;
}

a {
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

/* ====== NAVBAR ====== */
.main-navbar {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.navbar-brand .brand-title {
  font-size: 1rem;
}

.navbar-brand .brand-subtitle {
  font-size: 0.7rem;
  opacity: 0.85;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #eff6ff;
  font-size: 1.2rem;
}

.navbar .nav-link {
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.9;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  opacity: 1;
}

/* avatar user di navbar */
.avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #111827;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.badge.bg-soft {
  background-color: var(--primary-soft);
  color: var(--primary-dark);
  border-radius: 999px;
}

/* ====== CARD & LAYOUT ====== */
.container {
  max-width: 1200px;
}

.card {
  border-radius: 1rem;
  border: none;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.card-header {
  border-radius: 1rem 1rem 0 0 !important;
}

.card-header.bg-primary {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary)) !important;
  border: none;
}

/* kartu statistik di dashboard admin */
.card-stat {
  border-radius: 1rem;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #eff6ff;
  overflow: hidden;
}

.card-stat .stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  background: rgba(255, 255, 255, 0.18);
}

.card-stat .stat-label {
  font-size: 0.8rem;
  opacity: 0.9;
}

.card-stat .stat-value {
  font-size: 1.4rem;
  font-weight: 700;
}

/* efek hover halus untuk semua card */
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  transition: all 0.18s ease-out;
}

/* ====== TABEL ====== */
.table {
  margin-bottom: 0;
}

.table thead {
  background-color: var(--primary-soft);
}

.table thead th {
  border-bottom: none;
  font-size: 0.8rem;
  font-weight: 600;
  color: #1f2937;
}

.table tbody tr:hover {
  background-color: #eff6ff;
}

.table-sm td,
.table-sm th {
  padding: 0.35rem 0.5rem;
}

/* ====== FORM & BUTTON ====== */
.form-control,
.form-select {
  border-radius: 0.7rem;
  border-color: #d1d5db;
  font-size: 0.85rem;
}

.form-control:focus,
.form-select:focus {
  box-shadow: 0 0 0 0.15rem rgba(37, 99, 235, 0.25);
  border-color: var(--primary);
}

.btn {
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border: none;
}

.btn-primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.35);
}

.btn-outline-primary {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.btn-outline-primary:hover {
  background-color: var(--primary-soft);
  border-color: var(--primary-dark);
  color: var(--primary-dark);
}

.btn-success {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  border: none;
}

/* ====== LOGIN PAGE ====== */
.card-login {
  border-radius: 1.4rem;
}

.card-login .card-body {
  padding: 2.25rem;
}

.login-hero-title {
  font-size: 1.3rem;
  font-weight: 700;
}

.login-hero-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ====== SCAN BARCODE / QR ====== */
#reader {
  border-radius: 1rem;
  overflow: hidden;
  border: 1px dashed #cbd5f5;
  background: #f9fafb;
}

#scan-result .badge {
  font-size: 0.75rem;
}

/* ====== CETAK / PRINT REKAP ====== */
@media print {
  body {
    background: #ffffff;
  }
  .navbar,
  .container > .alert,
  .btn,
  .no-print {
    display: none !important;
  }
  .container {
    max-width: 100%;
  }
}

/* ====== UTILITIES KECIL ====== */
.text-muted-soft {
  color: var(--text-muted);
}

.section-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}
