/* ============================================
   Peminjaman Sepeda UNJANI — Light Minimalist
   Modern Design System v2.0
   ============================================ */

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

/* ============ CSS Variables ============ */
:root {
  --primary:        #4f46e5;
  --primary-light:  #6366f1;
  --primary-dark:   #3730a3;
  --primary-50:     #eef2ff;
  --primary-100:    #e0e7ff;
  --primary-glow:   rgba(79, 70, 229, 0.12);

  --secondary:      #0ea5e9;
  --secondary-50:   #f0f9ff;

  --success:        #10b981;
  --success-50:     #ecfdf5;
  --success-100:    #d1fae5;
  --warning:        #f59e0b;
  --warning-50:     #fffbeb;
  --warning-100:    #fef3c7;
  --danger:         #ef4444;
  --danger-50:      #fef2f2;
  --danger-100:     #fee2e2;
  --info:           #06b6d4;
  --info-50:        #ecfeff;

  /* Light theme surfaces */
  --bg-body:        #f8fafc;
  --bg-card:        #ffffff;
  --bg-card-hover:  #f8fafc;
  --bg-sidebar:     #ffffff;
  --bg-input:       #ffffff;
  --bg-topbar:      rgba(255,255,255,0.9);

  --border-color:   #e2e8f0;
  --border-light:   #f1f5f9;
  --border-focus:   var(--primary-light);

  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;
  --text-white:     #ffffff;

  --shadow-xs:  0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm:  0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md:  0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg:  0 10px 25px -3px rgba(15, 23, 42, 0.10), 0 4px 10px -4px rgba(15, 23, 42, 0.05);
  --shadow-xl:  0 20px 40px -6px rgba(15, 23, 42, 0.12);
  --shadow-primary: 0 8px 25px rgba(79, 70, 229, 0.25);

  --radius-xs:  6px;
  --radius-sm:  10px;
  --radius-md:  14px;
  --radius-lg:  18px;
  --radius-xl:  24px;
  --radius-2xl: 32px;

  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-width: 260px;
}

/* ============ Global Reset ============ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: var(--primary);
  transition: var(--transition);
}
a:hover { color: var(--primary-dark); }

/* ============ Scrollbar ============ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #cbd5e1; }

/* ============ Animations ============ */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }
@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(79,70,229,0.3); }
  70% { box-shadow: 0 0 0 10px rgba(79,70,229,0); }
  100% { box-shadow: 0 0 0 0 rgba(79,70,229,0); }
}
@keyframes bounce-in {
  0% { transform: scale(0.85); opacity: 0; }
  60% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes count-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.fade-in { animation: fadeInUp 0.45s cubic-bezier(0.4, 0, 0.2, 1) both; }
.slide-in { animation: slideInLeft 0.35s cubic-bezier(0.4, 0, 0.2, 1) both; }
.scale-in { animation: scaleIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) both; }

/* Staggered children animation */
.fade-in > * { animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) both; }
.fade-in > *:nth-child(1) { animation-delay: 0.05s; }
.fade-in > *:nth-child(2) { animation-delay: 0.10s; }
.fade-in > *:nth-child(3) { animation-delay: 0.15s; }
.fade-in > *:nth-child(4) { animation-delay: 0.20s; }
.fade-in > *:nth-child(5) { animation-delay: 0.25s; }

/* ============ Login Page ============ */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-50) 0%, #f0f9ff 50%, var(--primary-50) 100%);
  position: relative;
  overflow: hidden;
  padding: 24px;
}

.login-wrapper::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(99,102,241,0.14) 0%, transparent 70%);
  top: -150px; right: -150px;
  border-radius: 50%;
  animation: float 10s ease-in-out infinite;
}
.login-wrapper::after {
  content: '';
  position: absolute;
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(14,165,233,0.10) 0%, transparent 70%);
  bottom: -80px; left: -80px;
  border-radius: 50%;
  animation: float 8s ease-in-out infinite reverse;
}

/* Decorative dots */
.login-wrapper .dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, #c7d2fe 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: 0.4;
  pointer-events: none;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-2xl);
  padding: 48px 44px;
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-xl);
  animation: bounce-in 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.login-logo {
  text-align: center;
  margin-bottom: 36px;
}

.login-logo .icon-circle {
  width: 76px; height: 76px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: var(--shadow-primary);
  animation: pulse-ring 2.5s infinite;
}

.login-logo .icon-circle svg {
  width: 38px; height: 38px;
  color: white;
}

.login-logo h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: -0.3px;
}

.login-logo p {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
}

/* ============ Form Styles ============ */
.form-label {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.825rem;
  margin-bottom: 6px;
  letter-spacing: 0.2px;
}

.form-control-custom {
  background: var(--bg-input) !important;
  border: 1.5px solid var(--border-color) !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius-sm) !important;
  padding: 12px 16px !important;
  font-size: 0.9rem !important;
  font-weight: 500 !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  transition: var(--transition) !important;
  height: auto !important;
  box-shadow: var(--shadow-xs) !important;
}

.form-control-custom:focus {
  border-color: var(--primary-light) !important;
  box-shadow: 0 0 0 3px var(--primary-glow), var(--shadow-xs) !important;
  outline: none !important;
}

.form-control-custom::placeholder { color: var(--text-muted) !important; font-weight: 400 !important; }

.form-select-custom {
  background-color: var(--bg-input) !important;
  border: 1.5px solid var(--border-color) !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius-sm) !important;
  padding: 11px 16px !important;
  font-size: 0.9rem !important;
  font-weight: 500 !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  transition: var(--transition) !important;
  box-shadow: var(--shadow-xs) !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23475569' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
}

.form-select-custom:focus {
  border-color: var(--primary-light) !important;
  box-shadow: 0 0 0 3px var(--primary-glow), var(--shadow-xs) !important;
  outline: none !important;
}

/* ============ Buttons ============ */
.btn-primary-custom {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 22px;
  font-weight: 700;
  font-size: 0.875rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.1px;
}

.btn-primary-custom:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-primary);
  color: white;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.btn-primary-custom:active { transform: translateY(0); box-shadow: none; }

.btn-success-custom {
  background: linear-gradient(135deg, var(--success), #059669);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  font-weight: 700;
  font-size: 0.82rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.btn-success-custom:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(16,185,129,0.3); color: white; }

.btn-danger-custom {
  background: linear-gradient(135deg, var(--danger), #dc2626);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  font-weight: 700;
  font-size: 0.82rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.btn-danger-custom:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(239,68,68,0.3); color: white; }

.btn-warning-custom {
  background: linear-gradient(135deg, var(--warning), #d97706);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  font-weight: 700;
  font-size: 0.82rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.btn-warning-custom:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(245,158,11,0.3); color: white; }

.btn-outline-custom {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-weight: 600;
  font-size: 0.875rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.btn-outline-custom:hover {
  background: var(--bg-body);
  color: var(--text-primary);
  border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
}

.btn-sm { padding: 7px 14px !important; font-size: 0.78rem !important; }

/* ============ Layout: Sidebar + Content ============ */
.app-wrapper { display: flex; min-height: 100vh; }

/* ============ Sidebar ============ */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: var(--transition-slow);
  overflow-y: auto;
  box-shadow: var(--shadow-sm);
}

.sidebar-brand {
  padding: 22px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-brand .brand-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(79,70,229,0.25);
}

.sidebar-brand .brand-icon svg { width: 22px; height: 22px; color: white; }

.sidebar-brand h5 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.2px;
}

.sidebar-brand small {
  color: var(--text-muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 600;
}

.sidebar-menu { padding: 16px 12px; flex: 1; }

.sidebar-menu-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--text-muted);
  padding: 8px 12px;
  font-weight: 700;
  margin-top: 4px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--transition);
  margin-bottom: 2px;
  position: relative;
}

.sidebar-link svg { width: 19px; height: 19px; flex-shrink: 0; transition: var(--transition); }

.sidebar-link:hover {
  background: var(--primary-50);
  color: var(--primary);
}
.sidebar-link:hover svg { color: var(--primary); transform: scale(1.08); }

.sidebar-link.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  box-shadow: var(--shadow-primary);
}
.sidebar-link.active svg { color: white; }

/* Active indicator dot */
.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 24px;
  background: var(--primary);
  border-radius: 0 4px 4px 0;
}

.sidebar-footer {
  padding: 14px 12px;
  border-top: 1px solid var(--border-light);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.sidebar-user:hover { background: var(--primary-100); }

.sidebar-user .user-avatar {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(79,70,229,0.25);
}

.sidebar-user .user-info { flex: 1; min-width: 0; }

.sidebar-user .user-info .user-name {
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--text-primary);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user .user-info .user-role {
  font-size: 0.68rem;
  color: var(--primary);
  text-transform: capitalize;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* ============ Main Content ============ */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-body);
}

/* ============ Topbar ============ */
.topbar {
  background: var(--bg-topbar);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-xs);
}

.topbar-title h4 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.2px;
}

.topbar-title p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
  font-weight: 500;
}

.topbar-actions { display: flex; align-items: center; gap: 10px; }

.btn-logout {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  background: var(--danger-50);
  color: var(--danger);
  border: 1.5px solid #fecaca;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  transition: var(--transition);
  cursor: pointer;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.btn-logout:hover {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
  box-shadow: 0 4px 12px rgba(239,68,68,0.25);
  transform: translateY(-1px);
}

.btn-logout svg { width: 15px; height: 15px; }

/* Mobile sidebar toggle */
.sidebar-toggle {
  display: none;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}
.sidebar-toggle:hover { background: var(--primary-50); border-color: var(--primary-100); }

/* ============ Page Content ============ */
.page-content { padding: 28px 32px; flex: 1; }

/* ============ Stat Cards ============ */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: default;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  border-radius: 0 var(--radius-md) 0 100%;
  opacity: 0.06;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.stat-card.stat-primary { border-top: 3px solid var(--primary); }
.stat-card.stat-primary::after { background: var(--primary); }
.stat-card.stat-success { border-top: 3px solid var(--success); }
.stat-card.stat-success::after { background: var(--success); }
.stat-card.stat-warning { border-top: 3px solid var(--warning); }
.stat-card.stat-warning::after { background: var(--warning); }
.stat-card.stat-danger { border-top: 3px solid var(--danger); }
.stat-card.stat-danger::after { background: var(--danger); }
.stat-card.stat-info { border-top: 3px solid var(--info); }
.stat-card.stat-info::after { background: var(--info); }
.stat-card.stat-secondary { border-top: 3px solid var(--secondary); }
.stat-card.stat-secondary::after { background: var(--secondary); }

.stat-card .stat-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.stat-card.stat-primary .stat-icon { background: var(--primary-50); color: var(--primary); }
.stat-card.stat-success .stat-icon { background: var(--success-50); color: var(--success); }
.stat-card.stat-warning .stat-icon { background: var(--warning-50); color: var(--warning); }
.stat-card.stat-danger .stat-icon { background: var(--danger-50); color: var(--danger); }
.stat-card.stat-info .stat-icon { background: var(--info-50); color: var(--info); }
.stat-card.stat-secondary .stat-icon { background: var(--secondary-50); color: var(--secondary); }

.stat-card .stat-icon svg { width: 22px; height: 22px; }

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
  letter-spacing: -0.5px;
  animation: count-up 0.6s both;
}

.stat-card .stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

/* ============ Data Card ============ */
.data-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.data-card:hover { box-shadow: var(--shadow-md); }

.data-card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: linear-gradient(135deg, #fafbff 0%, var(--bg-card) 100%);
}

.data-card-header h5 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.1px;
}

.data-card-header h5 svg { width: 18px; height: 18px; color: var(--primary); }

.data-card-body { padding: 0; }
.data-card-body.with-padding { padding: 24px; }

/* ============ Table ============ */
.table-custom { width: 100%; border-collapse: collapse; margin: 0; }

.table-custom thead th {
  background: #f8fafc;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.table-custom tbody tr {
  transition: background 0.15s;
  border-bottom: 1px solid #f8fafc;
}

.table-custom tbody tr:last-child { border-bottom: none; }
.table-custom tbody tr:hover { background: #f8fafe; }

.table-custom tbody td {
  padding: 13px 20px;
  font-size: 0.875rem;
  color: var(--text-primary);
  vertical-align: middle;
  font-weight: 500;
}

/* ============ Badges ============ */
.badge-custom {
  padding: 4px 11px;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.2px;
}

.badge-custom::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
}

.badge-success { background: var(--success-100); color: #065f46; }
.badge-success::before { background: var(--success); }
.badge-warning { background: var(--warning-100); color: #92400e; }
.badge-warning::before { background: var(--warning); }
.badge-danger { background: var(--danger-100); color: #991b1b; }
.badge-danger::before { background: var(--danger); }
.badge-info { background: var(--info-50); color: #155e75; }
.badge-info::before { background: var(--info); }
.badge-primary { background: var(--primary-100); color: var(--primary-dark); }
.badge-primary::before { background: var(--primary); }

/* ============ Alert Flash ============ */
.alert-custom {
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: fadeInDown 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.alert-success-custom {
  background: var(--success-50);
  color: #065f46;
  border-left: 4px solid var(--success);
}

.alert-danger-custom {
  background: var(--danger-50);
  color: #991b1b;
  border-left: 4px solid var(--danger);
}

/* ============ Form Card ============ */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 32px;
  max-width: 620px;
  box-shadow: var(--shadow-sm);
}

.form-card .form-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.2px;
}

.form-card .form-title svg {
  width: 22px; height: 22px;
  color: var(--primary);
  background: var(--primary-50);
  padding: 4px;
  border-radius: 8px;
  box-sizing: content-box;
}

/* ============ Action Buttons ============ */
.action-btns { display: flex; gap: 6px; align-items: center; }

.action-btn {
  width: 33px; height: 33px;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-muted);
  transition: var(--transition);
  cursor: pointer;
}

.action-btn svg { width: 15px; height: 15px; }

.action-btn.edit:hover {
  background: var(--warning-100);
  color: #92400e;
  border-color: var(--warning);
  transform: scale(1.08);
}

.action-btn.delete:hover {
  background: var(--danger-100);
  color: #991b1b;
  border-color: var(--danger);
  transform: scale(1.08);
}

.action-btn.view:hover {
  background: var(--info-50);
  color: #155e75;
  border-color: var(--info);
  transform: scale(1.08);
}

.action-btn.return:hover {
  background: var(--success-100);
  color: #065f46;
  border-color: var(--success);
  transform: scale(1.08);
}

/* ============ Empty State ============ */
.empty-state {
  text-align: center;
  padding: 56px 20px;
  color: var(--text-muted);
}

.empty-state svg {
  width: 60px; height: 60px;
  margin-bottom: 16px;
  opacity: 0.25;
  color: var(--text-muted);
}

.empty-state h5 {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 700;
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* ============ Detail Card ============ */
.detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.detail-header {
  padding: 22px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #fafbff 0%, var(--bg-card) 100%);
}

.detail-body { padding: 24px; }

.detail-row {
  display: flex;
  padding: 11px 0;
  border-bottom: 1px solid var(--border-light);
}

.detail-row:last-child { border-bottom: none; }

.detail-label {
  width: 180px;
  color: var(--text-muted);
  font-size: 0.825rem;
  font-weight: 600;
  flex-shrink: 0;
}

.detail-value {
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
}

/* ============ Modal ============ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

.modal-custom {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: scaleIn 0.28s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.modal-custom-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #fafbff 0%, var(--bg-card) 100%);
}

.modal-custom-header h5 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-custom-header h5 svg { color: var(--primary); }

.modal-close-btn {
  background: transparent;
  border: 1.5px solid var(--border-color);
  color: var(--text-muted);
  width: 32px; height: 32px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close-btn:hover {
  background: var(--danger-50);
  color: var(--danger);
  border-color: var(--danger);
  transform: scale(1.08);
}

.modal-custom-body { padding: 24px; }

/* ============ Import Steps ============ */
.import-info { margin-bottom: 22px; }

.import-step {
  display: flex;
  gap: 13px;
  margin-bottom: 16px;
  align-items: flex-start;
}
.import-step:last-child { margin-bottom: 0; }

.step-number {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  box-shadow: 0 2px 8px rgba(79,70,229,0.25);
}

.step-content { flex: 1; }
.step-content strong {
  font-size: 0.875rem;
  color: var(--text-primary);
  display: block;
  font-weight: 700;
  margin-bottom: 3px;
}
.step-content p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0 0 8px 0;
  line-height: 1.5;
  font-weight: 500;
}
.step-content code {
  background: var(--primary-50);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 0.76rem;
  font-weight: 600;
  border: 1px solid var(--primary-100);
}

/* ============ Upload Area ============ */
.upload-area {
  position: relative;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: #fafbff;
}

.upload-area:hover {
  border-color: var(--primary);
  background: var(--primary-50);
}

.upload-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.upload-placeholder svg { color: #c7d2fe; margin-bottom: 4px; }
.upload-placeholder p { margin: 0; font-size: 0.875rem; color: var(--text-secondary); font-weight: 600; }
.upload-placeholder small { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }

.upload-file-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--success);
}
.upload-file-info svg { flex-shrink: 0; }
.upload-file-info span { font-size: 0.875rem; font-weight: 700; }

/* ============ 404 ============ */
.page-404 {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: 40px;
}

.page-404 h1 {
  font-size: 8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.page-404 p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-top: 12px;
  margin-bottom: 24px;
}

/* ============ Page Header ============ */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}
.page-header-text h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.3px;
  margin: 0 0 4px 0;
}
.page-header-text p {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  margin: 0;
}

/* ============ Info Box ============ */
.info-box {
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.82rem;
  color: var(--primary-dark);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

/* ============ SweetAlert2 Custom Theme ============ */
.swal2-popup {
  border-radius: var(--radius-lg) !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  padding: 2rem !important;
  box-shadow: var(--shadow-xl) !important;
}
.swal2-title {
  font-size: 1.2rem !important;
  font-weight: 800 !important;
  color: var(--text-primary) !important;
  letter-spacing: -0.2px !important;
}
.swal2-html-container {
  font-size: 0.875rem !important;
  color: var(--text-secondary) !important;
  font-weight: 500 !important;
}
.swal2-confirm {
  background: linear-gradient(135deg, var(--primary), var(--primary-light)) !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 700 !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  padding: 10px 22px !important;
  box-shadow: none !important;
  font-size: 0.875rem !important;
}
.swal2-confirm:focus { box-shadow: 0 0 0 3px var(--primary-glow) !important; }
.swal2-cancel {
  background: var(--bg-body) !important;
  color: var(--text-secondary) !important;
  border: 1.5px solid var(--border-color) !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 700 !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  padding: 10px 22px !important;
  font-size: 0.875rem !important;
}
.swal2-cancel:hover { background: #f1f5f9 !important; }
.swal2-deny {
  background: linear-gradient(135deg, var(--danger), #dc2626) !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 700 !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  padding: 10px 22px !important;
  font-size: 0.875rem !important;
}
.swal2-icon { border: none !important; margin: 0 auto 1rem !important; }
.swal2-icon.swal2-success { color: var(--success) !important; }
.swal2-icon.swal2-error { color: var(--danger) !important; }
.swal2-icon.swal2-warning { color: var(--warning) !important; }
.swal2-icon.swal2-question { color: var(--primary) !important; }
.swal2-actions { gap: 10px !important; margin-top: 1.5rem !important; }
.swal2-timer-progress-bar { background: var(--primary) !important; }

/* ============ Responsive ============ */
@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }
  .sidebar.show {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }
  .main-content { margin-left: 0; }
  .sidebar-toggle { display: flex; }
  .page-content { padding: 20px 16px; }
  .topbar { padding: 12px 16px; }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    z-index: 999;
  }
  .sidebar-overlay.show { display: block; }
}

@media (max-width: 768px) {
  .stat-card .stat-value { font-size: 1.6rem; }
  .table-custom { font-size: 0.82rem; }
  .form-card { padding: 20px 16px; }
  .login-card { padding: 32px 24px; margin: 16px; }
  .page-content { padding: 16px; }
}

/* ============ Utility ============ */
.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--primary-50);
  color: var(--primary);
  border: 1px solid var(--primary-100);
}

.divider {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 20px 0;
}

/* Loading spinner */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
  margin-right: 8px;
}
