/* ============================================================
   SIAPIK - Premium Admin Dashboard
   Modern Glassmorphism UI + Background Premium
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── CSS VARIABLES ── */
:root {
  --primary:       #4f46e5;
  --primary-dark:  #3730a3;
  --primary-light: #818cf8;
  --secondary:     #7c3aed;
  --accent:        #06b6d4;
  --success:       #10b981;
  --danger:        #ef4444;
  --warning:       #f59e0b;
  --info:          #3b82f6;

  --sidebar-bg:    #0f0c29;
  --sidebar-w:     260px;
  --sidebar-w-sm:  72px;

  /* Background — solid dark gradient */
  --bg-image: none;

  --bg:            #f0f2ff;
  --white:         #ffffff;
  --card-bg:       rgba(255,255,255,0.82);
  --text:          #1e1b4b;
  --text-muted:    #6b7280;
  --border:        rgba(99,102,241,0.15);

  --shadow-sm:     0 2px 8px rgba(79,70,229,0.08);
  --shadow:        0 4px 20px rgba(79,70,229,0.12);
  --shadow-lg:     0 8px 40px rgba(79,70,229,0.18);

  --radius:        10px;
  --radius-lg:     16px;
  --radius-xl:     24px;

  --transition:    all 0.3s cubic-bezier(0.4,0,0.2,1);
}

/* Dark mode */
[data-theme="dark"] {
  --bg:       #0d0d1a;
  --white:    #1a1a2e;
  --card-bg:  rgba(26,26,46,0.9);
  --text:     #e2e8f0;
  --text-muted: #94a3b8;
  --border:   rgba(99,102,241,0.2);
}

* { margin:0; padding:0; box-sizing:border-box; }

html { scroll-behavior: smooth; }

/* ── BACKGROUND PREMIUM ── */
body {
  font-family: 'Poppins', 'Inter', sans-serif;
  color: var(--text);
  font-size: 13px;
  min-height: 100vh;
  background: #f0f2ff;
}

body::before { display: none; }
body::after  { display: none; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ── LAYOUT ── */
.wrapper { display: flex; min-height: 100vh; }

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w);
  background: rgba(15,12,41,0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid rgba(255,255,255,0.08);
  position: fixed; top: 0; left: 0; height: 100vh;
  z-index: 1000; display: flex; flex-direction: column;
  transition: var(--transition);
  box-shadow: 4px 0 32px rgba(0,0,0,0.4);
  overflow: hidden;
}

.sidebar.collapsed { width: var(--sidebar-w-sm); }

.sidebar-brand {
  padding: 20px 20px 16px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  min-height: 70px;
}

.sidebar-brand-icon {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: white;
  box-shadow: 0 4px 12px rgba(79,70,229,0.4);
}

.sidebar-brand-text { overflow: hidden; transition: var(--transition); }
.sidebar-brand-text h5 { color: white; font-size: 15px; font-weight: 700; white-space: nowrap; }
.sidebar-brand-text small { color: rgba(255,255,255,0.45); font-size: 10px; white-space: nowrap; }

.sidebar.collapsed .sidebar-brand-text { opacity: 0; width: 0; }

/* Menu */
.sidebar-menu { list-style: none; padding: 12px 0; flex: 1; overflow-y: auto; overflow-x: hidden; }

.sidebar-menu .menu-label {
  padding: 12px 20px 4px;
  font-size: 9px; font-weight: 700; letter-spacing: 1.5px;
  color: rgba(255,255,255,0.3); text-transform: uppercase;
  white-space: nowrap; overflow: hidden;
  transition: var(--transition);
}

.sidebar.collapsed .menu-label { opacity: 0; }

.sidebar-menu li a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 20px; color: rgba(255,255,255,0.6);
  text-decoration: none; font-size: 13px; font-weight: 500;
  border-radius: 0; transition: var(--transition);
  position: relative; white-space: nowrap;
  margin: 2px 10px; border-radius: var(--radius);
}

.sidebar-menu li a:hover {
  color: white; background: rgba(255,255,255,0.08);
}

.sidebar-menu li a.active {
  color: white;
  background: linear-gradient(135deg, rgba(79,70,229,0.8), rgba(124,58,237,0.6));
  box-shadow: 0 4px 12px rgba(79,70,229,0.3);
}

.sidebar-menu li a.active::before {
  content: ''; position: absolute; left: -10px; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 60%; background: var(--primary-light);
  border-radius: 0 4px 4px 0;
}

.sidebar-menu li a i {
  width: 20px; text-align: center; font-size: 15px; flex-shrink: 0;
}

.sidebar-menu li a .menu-text { transition: var(--transition); overflow: hidden; }
.sidebar.collapsed .menu-text { opacity: 0; width: 0; }

.sidebar-menu li a .badge-menu {
  margin-left: auto; background: var(--danger); color: white;
  font-size: 10px; font-weight: 700; padding: 2px 6px;
  border-radius: 20px; flex-shrink: 0;
  transition: var(--transition);
}

.sidebar.collapsed .badge-menu { opacity: 0; }

/* Submenu */
.has-submenu > a .arrow {
  margin-left: auto; font-size: 10px; transition: transform 0.3s;
}
.has-submenu.open > a .arrow { transform: rotate(90deg); }

.submenu {
  list-style: none; max-height: 0; overflow: hidden;
  transition: max-height 0.35s ease;
}
.has-submenu.open .submenu { max-height: 300px; }

.submenu li a {
  padding: 8px 20px 8px 52px !important;
  font-size: 12px !important; color: rgba(255,255,255,0.5) !important;
  margin: 1px 10px !important;
}
.submenu li a:hover { color: white !important; }
.submenu li a.active { color: white !important; background: rgba(255,255,255,0.08) !important; }

/* Sidebar footer */
.sidebar-footer {
  padding: 16px; border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-footer a {
  display: flex; align-items: center; gap: 10px;
  color: rgba(255,255,255,0.5); text-decoration: none;
  font-size: 13px; padding: 10px; border-radius: var(--radius);
  transition: var(--transition);
}
.sidebar-footer a:hover { color: var(--danger); background: rgba(239,68,68,0.1); }
.sidebar.collapsed .sidebar-footer a span { opacity: 0; width: 0; overflow: hidden; }

/* ── MAIN CONTENT ── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1; display: flex; flex-direction: column;
  min-height: 100vh; transition: var(--transition);
}

.sidebar.collapsed ~ .main-content { margin-left: var(--sidebar-w-sm); }

/* ── NAVBAR ── */
.navbar {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px; height: 68px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .navbar {
  background: rgba(26,26,46,0.95);
  border-bottom-color: rgba(255,255,255,0.06);
}

.toggle-btn {
  width: 38px; height: 38px; border-radius: var(--radius);
  background: var(--bg); border: 1px solid var(--border);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--text-muted); transition: var(--transition);
}
.toggle-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }

.navbar-center { flex: 1; max-width: 400px; margin: 0 24px; }

.search-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 30px; padding: 8px 16px;
  transition: var(--transition);
}
.search-bar:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }
.search-bar i { color: var(--text-muted); font-size: 13px; }
.search-bar input { border: none; background: none; outline: none; font-size: 13px; color: var(--text); width: 100%; font-family: 'Poppins', sans-serif; }
.search-bar input::placeholder { color: var(--text-muted); }

.navbar-right { display: flex; align-items: center; gap: 8px; }

.nav-icon-btn {
  width: 38px; height: 38px; border-radius: var(--radius);
  background: var(--bg); border: 1px solid var(--border);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: var(--text-muted); transition: var(--transition);
  position: relative; text-decoration: none;
}
.nav-icon-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
.nav-icon-btn .notif-dot {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px; background: var(--danger);
  border-radius: 50%; border: 2px solid white;
}

.dark-toggle {
  width: 38px; height: 38px; border-radius: var(--radius);
  background: var(--bg); border: 1px solid var(--border);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: var(--text-muted); transition: var(--transition);
}
.dark-toggle:hover { background: var(--warning); color: white; border-color: var(--warning); }

/* Profile dropdown */
.profile-dropdown { position: relative; }

.profile-btn {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15);
  cursor: pointer; padding: 6px 14px 6px 6px;
  border-radius: 30px; transition: var(--transition); color: white;
}
.profile-btn:hover { border-color: var(--primary-light); background: rgba(255,255,255,0.18); box-shadow: 0 0 0 3px rgba(79,70,229,0.25); }

.profile-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }

.profile-info { display: flex; flex-direction: column; gap: 1px; }
.profile-name { font-size: 12px; font-weight: 600; line-height: 1; color: white; }
.profile-chevron { font-size: 10px; color: rgba(255,255,255,0.6); transition: transform 0.25s; }

.profile-menu {
  display: none; position: absolute; top: calc(100% + 10px); right: 0;
  background: rgba(15,12,41,0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg); box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  min-width: 230px; z-index: 300; overflow: hidden;
  animation: dropIn 0.18s ease;
}
@keyframes dropIn { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }
.profile-menu.open { display: block; }

.profile-menu-header {
  padding: 16px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; gap: 12px;
}
.profile-menu-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.2); color: white;
  font-weight: 700; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255,255,255,0.4); overflow: hidden;
}
.profile-menu-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-menu-name  { font-weight: 700; font-size: 14px; color: white; }
.profile-menu-email { font-size: 11px; color: rgba(255,255,255,0.7); margin-top: 2px; }

.profile-menu-divider { height: 1px; background: rgba(255,255,255,0.08); margin: 4px 0; }

.profile-menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,0.8); text-decoration: none;
  transition: var(--transition); cursor: pointer;
  border: none; background: none; width: 100%; text-align: left;
}
.profile-menu-item i { width: 18px; text-align: center; font-size: 14px; color: rgba(255,255,255,0.4); transition: var(--transition); }
.profile-menu-item:hover { background: rgba(79,70,229,0.2); color: white; }
.profile-menu-item:hover i { color: var(--primary-light); }
.profile-menu-item.danger:hover { background: rgba(239,68,68,0.15); color: #fca5a5; }
.profile-menu-item.danger:hover i { color: #fca5a5; }

/* ── CONTENT ── */
.content { padding: 24px; flex: 1; }

.page-title {
  font-size: 20px; font-weight: 700; color: white;
  margin-bottom: 20px; display: flex; align-items: center; gap: 10px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.page-title i { color: var(--primary-light); }

/* ── STAT CARDS ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px; margin-bottom: 24px;
}

.stat-card {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-lg);
  padding: 22px; display: flex; align-items: center; gap: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  transition: var(--transition);
  text-decoration: none; color: white;
  position: relative; overflow: hidden;
}

.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 2px; background: linear-gradient(90deg, var(--primary-light), var(--secondary));
  opacity: 0; transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-6px);
  background: rgba(255,255,255,0.16);
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
  border-color: rgba(255,255,255,0.25);
}
.stat-card:hover::before { opacity: 1; }

.stat-icon {
  width: 54px; height: 54px; border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}

.stat-icon.blue   { background: rgba(79,70,229,0.3);  color: #a5b4fc; }
.stat-icon.green  { background: rgba(16,185,129,0.3); color: #6ee7b7; }
.stat-icon.red    { background: rgba(239,68,68,0.3);  color: #fca5a5; }
.stat-icon.yellow { background: rgba(245,158,11,0.3); color: #fcd34d; }
.stat-icon.cyan   { background: rgba(6,182,212,0.3);  color: #67e8f9; }
.stat-icon.purple { background: rgba(124,58,237,0.3); color: #c4b5fd; }

.stat-info h3 { font-size: 24px; font-weight: 800; line-height: 1; color: white; }
.stat-info p  { font-size: 12px; color: rgba(255,255,255,0.6); margin-top: 4px; }
.stat-info .stat-change {
  font-size: 11px; font-weight: 600; margin-top: 4px;
  display: flex; align-items: center; gap: 3px;
}
.stat-change.up   { color: #6ee7b7; }
.stat-change.down { color: #fca5a5; }

/* ── CARDS ── */
.card {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  overflow: hidden; margin-bottom: 20px;
  transition: var(--transition);
}

.card:hover {
  background: rgba(255,255,255,0.13);
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  border-color: rgba(255,255,255,0.18);
}

.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
  background: rgba(255,255,255,0.04);
}

.card-header h3 { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; color: white; }
.card-header h3 i { color: var(--primary-light); }
.card-header .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.card-body { padding: 22px; }

/* ── TABLES ── */
.table-responsive { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 12px; }

thead th {
  background: rgba(79,70,229,0.05);
  padding: 12px 16px; text-align: left;
  font-weight: 700; color: var(--text-muted);
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.8px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  vertical-align: middle; color: var(--text);
}

tbody tr:last-child td { border-bottom: none; }

tbody tr {
  transition: var(--transition);
}

tbody tr:hover { background: rgba(79,70,229,0.03); }

/* ── BADGES ── */
.badge {
  padding: 4px 12px; border-radius: 20px;
  font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px;
}

.badge-pending   { background: rgba(245,158,11,0.12); color: var(--warning); }
.badge-disetujui { background: rgba(16,185,129,0.12); color: var(--success); }
.badge-ditolak   { background: rgba(239,68,68,0.12);  color: var(--danger); }

.badge-role { padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-role.admin { background: rgba(79,70,229,0.12); color: var(--primary); }
.badge-role.user  { background: rgba(16,185,129,0.12); color: var(--success); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border: none; border-radius: var(--radius);
  font-size: 12px; font-weight: 600; cursor: pointer;
  transition: var(--transition); text-decoration: none;
  font-family: 'Poppins', sans-serif;
}

.btn-primary   { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: white; box-shadow: 0 4px 12px rgba(79,70,229,0.3); }
.btn-primary:hover   { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(79,70,229,0.4); }
.btn-success   { background: linear-gradient(135deg, #10b981, #059669); color: white; box-shadow: 0 4px 12px rgba(16,185,129,0.3); }
.btn-success:hover   { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(16,185,129,0.4); }
.btn-danger    { background: linear-gradient(135deg, #ef4444, #dc2626); color: white; box-shadow: 0 4px 12px rgba(239,68,68,0.3); }
.btn-danger:hover    { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(239,68,68,0.4); }
.btn-warning   { background: linear-gradient(135deg, #f59e0b, #d97706); color: white; box-shadow: 0 4px 12px rgba(245,158,11,0.3); }
.btn-warning:hover   { transform: translateY(-1px); }
.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--primary); color: white; border-color: var(--primary); }

.btn-sm { padding: 6px 12px; font-size: 11px; }
.btn-block { width: 100%; justify-content: center; }

/* ── FORMS ── */
.form-group { margin-bottom: 16px; }

.form-group label {
  display: block; font-size: 12px; font-weight: 600;
  margin-bottom: 6px; color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius); font-size: 13px;
  background: var(--white); color: var(--text);
  transition: var(--transition);
  font-family: 'Poppins', sans-serif;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}

/* ── ALERTS ── */
.alert {
  padding: 14px 18px; border-radius: var(--radius);
  margin-bottom: 16px; font-size: 13px;
  display: flex; align-items: center; gap: 10px;
  border-left: 4px solid;
}
.alert-success { background: rgba(16,185,129,0.08); color: #065f46; border-color: var(--success); }
.alert-danger  { background: rgba(239,68,68,0.08);  color: #991b1b; border-color: var(--danger); }
.alert-warning { background: rgba(245,158,11,0.08); color: #92400e; border-color: var(--warning); }

/* ── MODALS ── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(15,12,41,0.6);
  backdrop-filter: blur(4px);
  z-index: 500; align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; }

.modal {
  background: var(--white); border-radius: var(--radius-xl);
  padding: 28px; width: 100%; max-width: 480px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,0.25);
  animation: modalIn 0.25s ease;
  border: 1px solid var(--border);
}

@keyframes modalIn {
  from { opacity:0; transform:scale(0.95) translateY(10px); }
  to   { opacity:1; transform:scale(1) translateY(0); }
}

.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 16px; font-weight: 700; }
.modal-close {
  width: 32px; height: 32px; border-radius: var(--radius);
  background: var(--bg); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--text-muted); transition: var(--transition);
  text-decoration: none;
}
.modal-close:hover { background: var(--danger); color: white; }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty-state i { font-size: 52px; margin-bottom: 14px; opacity: 0.25; display: block; }
.empty-state p { font-size: 14px; }

/* ── UTILITIES ── */
.text-right  { text-align: right; }
.text-center { text-align: center; }
.mb-3        { margin-bottom: 12px; }
.link-small  { font-size: 12px; color: var(--primary); text-decoration: none; }
.link-small:hover { text-decoration: underline; }
.search-input { padding: 8px 14px; border: 1.5px solid var(--border); border-radius: var(--radius); font-size: 13px; font-family: 'Poppins', sans-serif; background: var(--white); color: var(--text); outline: none; transition: var(--transition); }
.search-input:focus { border-color: var(--primary); }
.code-tag { background: rgba(79,70,229,0.08); color: var(--primary); padding: 2px 8px; border-radius: 6px; font-family: monospace; font-size: 12px; }
.text-muted-sm { font-size: 11px; color: var(--text-muted); }
.file-input { width: 100%; padding: 8px; border: 1.5px solid var(--border); border-radius: var(--radius); font-size: 13px; }

/* ── LOGIN PAGE ── */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
  position: relative; overflow: hidden;
}

.login-page::before {
  content: ''; position: absolute; width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(79,70,229,0.3) 0%, transparent 70%);
  top: -200px; right: -200px; border-radius: 50%;
}

.login-page::after {
  content: ''; position: absolute; width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(124,58,237,0.2) 0%, transparent 70%);
  bottom: -100px; left: -100px; border-radius: 50%;
}

.login-card {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  padding: 44px 40px; width: 100%; max-width: 420px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.2);
  position: relative; z-index: 1;
  animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
  from { opacity:0; transform:translateY(20px); }
  to   { opacity:1; transform:translateY(0); }
}

.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo .logo-icon {
  width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: white;
  box-shadow: 0 8px 24px rgba(79,70,229,0.4);
}
.login-logo h2 { font-size: 22px; font-weight: 800; color: var(--text); }
.login-logo p  { color: var(--text-muted); font-size: 13px; margin-top: 4px; }

/* ── THEME PICKER ── */
.theme-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.theme-option {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 8px; border: 2px solid var(--border); border-radius: var(--radius);
  background: var(--white); cursor: pointer; transition: var(--transition);
  font-size: 12px; color: var(--text);
}
.theme-option:hover  { border-color: var(--primary); transform: translateY(-2px); }
.theme-option.active { border-color: var(--primary); background: rgba(79,70,229,0.06); }
.theme-preview { width: 100%; height: 36px; border-radius: 6px; }

/* ── PROFILE AVATAR (profil page) ── */
.profil-avatar-wrap {
  width: 90px; height: 90px; border-radius: 50%; overflow: hidden;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto; border: 3px solid var(--border);
  box-shadow: 0 4px 16px rgba(79,70,229,0.25);
}
.profil-avatar-wrap img { width:100%; height:100%; object-fit:cover; }
.profil-avatar-initial  { color:white; font-size:36px; font-weight:700; }
.profil-camera-btn {
  position:absolute; bottom:2px; right:2px;
  width:28px; height:28px; background:var(--primary); color:white;
  border-radius:50%; display:flex; align-items:center; justify-content:center;
  font-size:12px; cursor:pointer; border:2px solid white; transition:var(--transition);
}
.profil-camera-btn:hover { background:var(--secondary); }

/* ── KARTU STOK TABLE ── */
.kartu-table thead th { background: linear-gradient(135deg, #14532d, #166534); color: white; }
.kartu-table tbody tr.row-masuk      { background: rgba(16,185,129,0.04); }
.kartu-table tbody tr.row-keluar     { background: rgba(239,68,68,0.04); }
.kartu-table tbody tr.row-retur      { background: rgba(245,158,11,0.04); }
.kartu-table tbody tr.row-penyesuaian { background: rgba(6,182,212,0.04); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.mobile-open { transform: translateX(0); }
  .main-content { margin-left: 0 !important; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .content { padding: 16px; }
  .navbar-center { display: none; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .modal { margin: 16px; }
  .login-card { padding: 28px 20px; margin: 16px; }
}

/* ── PRINT ── */
@media print {
  .sidebar, .navbar, .card-header .btn, .card-header form,
  .card-header .actions, form, .modal-overlay, .no-print { display: none !important; }
  .main-content { margin-left: 0 !important; }
  .content { padding: 0 !important; }
  body { font-size: 11px; }
  table { width: 100%; border-collapse: collapse; }
  thead th { background: #1e3a5f !important; color: white !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; padding: 6px 8px; }
  tbody td { padding: 5px 8px; border-bottom: 1px solid #ddd; }
  .stat-card, .stats-grid { display: none !important; }
}

/* ── ANIMATIONS ── */
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes slideInLeft { from { opacity:0; transform:translateX(-20px); } to { opacity:1; transform:translateX(0); } }

.fade-in { animation: fadeIn 0.4s ease; }
.slide-in { animation: slideInLeft 0.4s ease; }

/* ── DROP ZONE ── */
.drop-zone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 24px; text-align: center; cursor: pointer; transition: var(--transition);
}
.drop-zone:hover { border-color: var(--primary); background: rgba(79,70,229,0.03); }
.drop-zone-icon { font-size: 32px; color: var(--text-muted); margin-bottom: 8px; display: block; }
.drop-zone-text { color: var(--text-muted); font-size: 14px; margin: 0; }
.file-preview { background: rgba(16,185,129,0.06); border-radius: var(--radius); padding: 12px; margin-bottom: 12px; font-size: 13px; border: 1px solid rgba(16,185,129,0.2); }

/* ── ROW TOTAL ── */
.row-total { background: rgba(79,70,229,0.04) !important; font-weight: 700; border-top: 2px solid var(--primary) !important; }

/* ============================================================
   GLASS DARK OVERRIDE — Background Premium
   ============================================================ */

/* Tables */
thead th {
  background: rgba(79,70,229,0.2) !important;
  color: rgba(255,255,255,0.7) !important;
  border-bottom: 1px solid rgba(255,255,255,0.1) !important;
}
tbody td {
  border-bottom: 1px solid rgba(255,255,255,0.06) !important;
  color: rgba(255,255,255,0.85) !important;
}
tbody tr:hover { background: rgba(255,255,255,0.06) !important; }

/* Badges */
.badge-pending   { background: rgba(245,158,11,0.2) !important; color: #fcd34d !important; border: 1px solid rgba(245,158,11,0.3) !important; }
.badge-disetujui { background: rgba(16,185,129,0.2) !important; color: #6ee7b7 !important; border: 1px solid rgba(16,185,129,0.3) !important; }
.badge-ditolak   { background: rgba(239,68,68,0.2)  !important; color: #fca5a5 !important; border: 1px solid rgba(239,68,68,0.3)  !important; }
.badge-role.admin { background: rgba(79,70,229,0.25) !important; color: #a5b4fc !important; }
.badge-role.user  { background: rgba(16,185,129,0.2) !important; color: #6ee7b7 !important; }

/* Forms */
.form-group label { color: rgba(255,255,255,0.8) !important; }
.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(255,255,255,0.08) !important;
  border-color: rgba(255,255,255,0.15) !important;
  color: white !important;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(255,255,255,0.35) !important; }
.form-group select option { background: #1e1b4b; color: white; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary-light) !important;
  background: rgba(255,255,255,0.12) !important;
  box-shadow: 0 0 0 3px rgba(79,70,229,0.2) !important;
}

/* Alerts */
.alert-success { background: rgba(16,185,129,0.15) !important; color: #6ee7b7 !important; }
.alert-danger  { background: rgba(239,68,68,0.15)  !important; color: #fca5a5 !important; }
.alert-warning { background: rgba(245,158,11,0.15) !important; color: #fcd34d !important; }

/* Modals */
.modal {
  background: rgba(15,12,41,0.92) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5) !important;
}
.modal-header { border-bottom-color: rgba(255,255,255,0.08) !important; }
.modal-header h3 { color: white !important; }
.modal-footer { border-top: 1px solid rgba(255,255,255,0.08); }

/* Empty state */
.empty-state { color: rgba(255,255,255,0.4) !important; }

/* Code tag */
.code-tag { background: rgba(79,70,229,0.2) !important; color: #a5b4fc !important; }

/* Text muted */
.text-muted-sm { color: rgba(255,255,255,0.4) !important; }

/* Search input */
.search-input {
  background: rgba(255,255,255,0.08) !important;
  border-color: rgba(255,255,255,0.15) !important;
  color: white !important;
}
.search-input::placeholder { color: rgba(255,255,255,0.35) !important; }
.search-input:focus { border-color: var(--primary-light) !important; }

/* Row total */
.row-total {
  background: rgba(79,70,229,0.15) !important;
  border-top: 2px solid rgba(79,70,229,0.5) !important;
}

/* Drop zone */
.drop-zone {
  border-color: rgba(255,255,255,0.15) !important;
  background: rgba(255,255,255,0.04) !important;
}
.drop-zone:hover { border-color: var(--primary-light) !important; background: rgba(79,70,229,0.1) !important; }
.drop-zone-text { color: rgba(255,255,255,0.4) !important; }

/* File preview */
.file-preview { background: rgba(16,185,129,0.1) !important; border-color: rgba(16,185,129,0.2) !important; color: #6ee7b7 !important; }

/* Login page override */
.login-card {
  background: rgba(15,12,41,0.88) !important;
  backdrop-filter: blur(32px) !important;
  -webkit-backdrop-filter: blur(32px) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
}
.login-logo h2 { color: white !important; }
.login-logo p  { color: rgba(255,255,255,0.5) !important; }

/* Background classes — disabled */

/* ============================================================
   LIGHT MODE OVERRIDE — Background Putih
   ============================================================ */

/* Navbar & buttons */
.toggle-btn, .nav-icon-btn, .dark-toggle {
  background: #f8fafc !important;
  border-color: var(--border) !important;
  color: var(--text-muted) !important;
}

.search-bar {
  background: #f8fafc !important;
  border-color: var(--border) !important;
}
.search-bar input { color: var(--text) !important; }
.search-bar input::placeholder { color: var(--text-muted) !important; }
.search-bar i { color: var(--text-muted) !important; }

/* Profile button */
.profile-btn {
  background: #f8fafc !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}
.profile-name { color: var(--text) !important; }
.profile-chevron { color: var(--text-muted) !important; }

/* Cards */
.card {
  background: #ffffff !important;
  border-color: var(--border) !important;
  box-shadow: 0 2px 12px rgba(79,70,229,0.06) !important;
}
.card-header { background: #fafbff !important; border-bottom-color: var(--border) !important; }
.card-header h3 { color: var(--text) !important; }

/* Stat cards */
.stat-card {
  background: #ffffff !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
  box-shadow: 0 2px 12px rgba(79,70,229,0.06) !important;
}
.stat-info h3 { color: var(--text) !important; }
.stat-info p  { color: var(--text-muted) !important; }

/* Tables */
thead th {
  background: #f1f5f9 !important;
  color: var(--text-muted) !important;
  border-bottom-color: var(--border) !important;
}
tbody td { color: var(--text) !important; border-bottom-color: var(--border) !important; }
tbody tr:hover { background: #f8fafc !important; }

/* Badges */
.badge-pending   { background: rgba(245,158,11,0.1) !important; color: var(--warning) !important; border: none !important; }
.badge-disetujui { background: rgba(16,185,129,0.1) !important; color: var(--success) !important; border: none !important; }
.badge-ditolak   { background: rgba(239,68,68,0.1)  !important; color: var(--danger)  !important; border: none !important; }
.badge-role.admin { background: rgba(79,70,229,0.1) !important; color: var(--primary) !important; border: none !important; }
.badge-role.user  { background: rgba(16,185,129,0.1) !important; color: var(--success) !important; border: none !important; }

/* Forms */
.form-group label { color: var(--text) !important; }
.form-group input,
.form-group select,
.form-group textarea {
  background: #ffffff !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted) !important; }
.form-group select option { background: #ffffff; color: var(--text); }

/* Alerts */
.alert-success { background: rgba(16,185,129,0.08) !important; color: #065f46 !important; }
.alert-danger  { background: rgba(239,68,68,0.08)  !important; color: #991b1b !important; }
.alert-warning { background: rgba(245,158,11,0.08) !important; color: #92400e !important; }

/* Modals */
.modal {
  background: #ffffff !important;
  border-color: var(--border) !important;
  box-shadow: 0 24px 80px rgba(0,0,0,0.15) !important;
}
.modal-header { border-bottom-color: var(--border) !important; }
.modal-header h3 { color: var(--text) !important; }

/* Profile menu */
.profile-menu {
  background: #ffffff !important;
  border-color: var(--border) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12) !important;
}
.profile-menu-item { color: var(--text) !important; }
.profile-menu-item i { color: var(--text-muted) !important; }
.profile-menu-item:hover { background: #f1f5f9 !important; color: var(--primary) !important; }
.profile-menu-item.danger:hover { background: #fef2f2 !important; color: var(--danger) !important; }
.profile-menu-divider { background: var(--border) !important; }

/* Page title */
.page-title { color: var(--text) !important; }

/* Empty state */
.empty-state { color: var(--text-muted) !important; }

/* Code tag */
.code-tag { background: rgba(79,70,229,0.08) !important; color: var(--primary) !important; }

/* Text muted */
.text-muted-sm { color: var(--text-muted) !important; }

/* Search input */
.search-input {
  background: #ffffff !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

/* Kartu stok rows */
.kartu-table tbody tr.row-masuk      td { background: rgba(16,185,129,0.05) !important; }
.kartu-table tbody tr.row-keluar     td { background: rgba(239,68,68,0.05)  !important; }
.kartu-table tbody tr.row-retur      td { background: rgba(245,158,11,0.05) !important; }
.kartu-table tbody tr.row-penyesuaian td { background: rgba(6,182,212,0.05) !important; }

/* Stat icon colors — tetap berwarna */
.stat-icon.blue   { background: rgba(79,70,229,0.1)  !important; color: var(--primary) !important; }
.stat-icon.green  { background: rgba(16,185,129,0.1) !important; color: var(--success) !important; }
.stat-icon.red    { background: rgba(239,68,68,0.1)  !important; color: var(--danger)  !important; }
.stat-icon.yellow { background: rgba(245,158,11,0.1) !important; color: var(--warning) !important; }
.stat-icon.cyan   { background: rgba(6,182,212,0.1)  !important; color: var(--accent)  !important; }
.stat-icon.purple { background: rgba(124,58,237,0.1) !important; color: var(--secondary) !important; }

/* Row total */
.row-total { background: rgba(79,70,229,0.05) !important; border-top-color: var(--primary) !important; }
.row-total td { color: var(--text) !important; }

/* Info barang card */
.card .card-body div[style*="color:white"],
.card .card-body div[style*="color: white"] { color: var(--text) !important; }
