/* ═══════════════════════════════════════════════════════════════════════════
   KOPDOSKAR — Custom CSS
   Koperasi Dosen dan Karyawan UNISBA
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Google Fonts ───────────────────────────────────────────────────────────*/
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ─── CSS Variables (Design Tokens) ─────────────────────────────────────────*/
:root {
  /* Primary — Biru Profesional */
  --primary:        #1a3c6e;
  --primary-light:  #2a5298;
  --primary-hover:  #153165;
  --primary-rgb:    26, 60, 110;

  /* Accent */
  --accent:         #f0a500;
  --accent-light:   #ffc107;

  /* Sidebar */
  --sidebar-bg:     #0d2444;
  --sidebar-width:  260px;
  --sidebar-collapsed: 72px;
  --sidebar-text:   #a8b8d0;
  --sidebar-active: #2a5298;
  --sidebar-hover:  rgba(255,255,255,0.08);

  /* Backgrounds */
  --bg-light:       #f0f4f8;
  --bg-card:        #ffffff;
  --bg-dark:        #0d1b2e;

  /* Text */
  --text-dark:      #1e2d40;
  --text-muted:     #6b7a8d;
  --text-light:     #ffffff;

  /* Border & Shadow */
  --border:         #e1e8f0;
  --shadow-sm:      0 2px 8px rgba(26,60,110,0.08);
  --shadow-md:      0 4px 20px rgba(26,60,110,0.12);
  --shadow-lg:      0 8px 40px rgba(26,60,110,0.16);
  --shadow-card:    0 2px 12px rgba(26,60,110,0.08);

  /* Status Colors */
  --success:    #198754;
  --danger:     #dc3545;
  --warning:    #f0a500;
  --info:       #0dcaf0;

  /* Transitions */
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;

  /* Radius */
  --radius-sm:  6px;
  --radius:     10px;
  --radius-lg:  16px;
  --radius-xl:  24px;
}

/* ─── Reset & Base ───────────────────────────────────────────────────────────*/
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  color: var(--text-dark);
  background: var(--bg-light);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── Scrollbar Custom ───────────────────────────────────────────────────────*/
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #b0bec5; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-light); }

/* ═══════════════════════════════════════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════════════════════════════════════ */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  background: linear-gradient(135deg, var(--sidebar-bg) 0%, var(--primary) 50%, var(--primary-light) 100%);
  position: relative;
  overflow: hidden;
}

.login-wrapper::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
  top: -200px;
  left: -200px;
}

.login-wrapper::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  bottom: -100px;
  right: -100px;
}

.login-brand-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  color: white;
  position: relative;
  z-index: 1;
}

.login-brand-panel .brand-logo {
  width: 90px;
  height: 90px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.login-brand-panel h1 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.login-brand-panel p {
  font-size: 1rem;
  opacity: 0.8;
  text-align: center;
  max-width: 300px;
  line-height: 1.6;
}

.login-feature-list {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  width: 100%;
  max-width: 320px;
}

.login-feature-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  font-size: 0.9rem;
  opacity: 0.85;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.login-feature-list li:last-child { border-bottom: none; }
.login-feature-list li .bi { font-size: 1.1rem; color: var(--accent-light); }

.login-form-panel {
  width: 440px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 48px;
  position: relative;
  z-index: 1;
}

.login-form-inner {
  width: 100%;
  max-width: 340px;
}

.login-form-inner h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.login-form-inner p.sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 36px;
}

/* Form Controls */
.form-group-custom {
  margin-bottom: 20px;
  position: relative;
}

.form-group-custom label {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 8px;
}

.form-group-custom .input-icon-wrap {
  position: relative;
}

.form-group-custom .input-icon-wrap .bi {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
}

.form-group-custom .form-control {
  height: 48px;
  padding-left: 44px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text-dark);
  background: #fafcff;
  transition: var(--transition);
  width: 100%;
}

.form-group-custom .form-control:focus {
  border-color: var(--primary-light);
  background: white;
  box-shadow: 0 0 0 4px rgba(42,82,152,0.1);
  outline: none;
}

.btn-login {
  width: 100%;
  height: 50px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border: none;
  border-radius: var(--radius);
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-login::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary-light), var(--primary-hover));
  opacity: 0;
  transition: var(--transition);
}

.btn-login:hover::before { opacity: 1; }
.btn-login:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-login:active { transform: translateY(0); }
.btn-login span { position: relative; z-index: 1; }

/* ═══════════════════════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════════════════════ */
#sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#sidebar.collapsed {
  width: var(--sidebar-collapsed);
}

/* Sidebar Brand */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  min-height: 72px;
  overflow: hidden;
}

.sidebar-brand .brand-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: white;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.sidebar-brand .brand-text {
  overflow: hidden;
  transition: var(--transition);
}

.sidebar-brand .brand-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: white;
  line-height: 1;
  white-space: nowrap;
}

.sidebar-brand .brand-sub {
  font-size: 0.65rem;
  color: var(--sidebar-text);
  white-space: nowrap;
  margin-top: 3px;
}

#sidebar.collapsed .brand-text { opacity: 0; width: 0; }

/* Sidebar Nav */
.sidebar-nav {
  flex: 1;
  padding: 16px 0 24px;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
}

.sidebar-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(168,184,208,0.5);
  padding: 12px 20px 6px;
  white-space: nowrap;
  overflow: hidden;
  transition: var(--transition);
}

#sidebar.collapsed .sidebar-section-label {
  opacity: 0;
  padding: 12px 20px 6px;
}

.nav-item-wrapper { padding: 2px 10px; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius);
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}

.sidebar-link .nav-icon {
  font-size: 1.05rem;
  min-width: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-link .nav-text {
  flex: 1;
  transition: var(--transition);
  overflow: hidden;
}

.sidebar-link .nav-badge {
  background: var(--danger);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  min-width: 20px;
  text-align: center;
}

.sidebar-link .nav-arrow {
  font-size: 0.7rem;
  transition: var(--transition);
}

.sidebar-link:hover {
  background: var(--sidebar-hover);
  color: white;
}

.sidebar-link.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(26,60,110,0.4);
}

.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  background: var(--accent);
  border-radius: 0 4px 4px 0;
}

/* Collapsed sidebar — hide text */
#sidebar.collapsed .nav-text,
#sidebar.collapsed .nav-badge,
#sidebar.collapsed .nav-arrow,
#sidebar.collapsed .sidebar-section-label { opacity: 0; }

/* Sub-menu */
.submenu {
  padding-left: 48px;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}

.submenu.open { max-height: 400px; }

.submenu .sidebar-link {
  font-size: 0.82rem;
  padding: 8px 12px;
  color: rgba(168,184,208,0.8);
}

.submenu .sidebar-link::before { display: none; }
.submenu .sidebar-link.active { background: rgba(255,255,255,0.1); }

/* Sidebar Footer */
.sidebar-footer {
  padding: 16px 10px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  transition: var(--transition);
  cursor: pointer;
  overflow: hidden;
}

.sidebar-user:hover { background: var(--sidebar-hover); }

.sidebar-user .user-avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: white;
  overflow: hidden;
}

.sidebar-user .user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-user .user-info { overflow: hidden; transition: var(--transition); }
.sidebar-user .user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.sidebar-user .user-role {
  font-size: 0.68rem;
  color: var(--sidebar-text);
  white-space: nowrap;
}

#sidebar.collapsed .user-info { opacity: 0; width: 0; }

/* ═══════════════════════════════════════════════════════════════════════════
   MAIN CONTENT AREA
   ═══════════════════════════════════════════════════════════════════════════ */
#main-content {
  margin-left: var(--sidebar-width);
  transition: var(--transition);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#main-content.expanded {
  margin-left: var(--sidebar-collapsed);
}

/* ─── Top Navbar ─────────────────────────────────────────────────────────────*/
.top-navbar {
  background: white;
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: 0 1px 0 var(--border), var(--shadow-sm);
}

.btn-toggle-sidebar {
  width: 38px;
  height: 38px;
  border: none;
  background: var(--bg-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-dark);
  font-size: 1.1rem;
  transition: var(--transition);
  flex-shrink: 0;
}

.btn-toggle-sidebar:hover {
  background: var(--primary);
  color: white;
}

.navbar-breadcrumb {
  flex: 1;
}

.navbar-breadcrumb h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
  line-height: 1;
}

.navbar-breadcrumb .breadcrumb {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.navbar-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  content: '›';
  color: var(--text-muted);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-navbar-action {
  width: 38px;
  height: 38px;
  border: none;
  background: var(--bg-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1.05rem;
  transition: var(--transition);
  position: relative;
  text-decoration: none;
}

.btn-navbar-action:hover {
  background: var(--primary);
  color: white;
}

.btn-navbar-action .notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid white;
}

.navbar-divider {
  width: 1px;
  height: 28px;
  background: var(--border);
}

.navbar-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 4px;
  border-radius: 40px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}

.navbar-profile:hover {
  background: var(--bg-light);
  border-color: var(--primary-light);
}

.navbar-profile .avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: white;
  overflow: hidden;
}

.navbar-profile .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.navbar-profile .prof-info .prof-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.2;
}

.navbar-profile .prof-info .prof-role {
  font-size: 0.7rem;
  color: var(--text-muted);
}

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

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.page-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
}

.page-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 4px 0 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════════════════════ */
.card {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  background: var(--bg-card);
  overflow: hidden;
}

.card-header {
  background: transparent;
  border-bottom: 1px solid var(--border);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-header h5 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
}

.card-body { padding: 22px; }

/* Stat Cards */
.stat-card {
  border-radius: var(--radius-lg);
  padding: 16px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-card);
  border: none;
  height: 100%;
}

.stat-card::after {
  content: '';
  position: absolute;
  right: -20px;
  top: -20px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  pointer-events: none;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat-card.bg-primary-grad {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
}
.stat-card.bg-success-grad {
  background: linear-gradient(135deg, #1a6b3e 0%, #28a745 100%);
}
.stat-card.bg-warning-grad {
  background: linear-gradient(135deg, #b37700 0%, #f0a500 100%);
}
.stat-card.bg-info-grad {
  background: linear-gradient(135deg, #0a7a9e 0%, #17a2b8 100%);
}
.stat-card.bg-danger-grad {
  background: linear-gradient(135deg, #a01a2a 0%, #dc3545 100%);
}

.stat-card .stat-icon {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: white;
}

.stat-card .stat-info { 
  flex: 1; 
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.stat-card .stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-card .stat-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: white;
  line-height: 1.2;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-card .stat-change {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-card .stat-change.up   { color: #a8ffca; }
.stat-card .stat-change.down { color: #ffb3b3; }

/* ═══════════════════════════════════════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════════════════════════════════════ */
.table-wrapper {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.table {
  margin: 0;
  font-size: 0.85rem;
}

.table thead th {
  background: #f8fafd;
  border-bottom: 2px solid var(--border);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 14px 16px;
  white-space: nowrap;
}

.table tbody td {
  padding: 13px 16px;
  vertical-align: middle;
  border-bottom: 1px solid #f0f4f8;
  color: var(--text-dark);
}

.table tbody tr:last-child td { border-bottom: none; }

.table tbody tr:hover { background: #f8faff; }

/* Avatar in table */
.tbl-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.tbl-avatar-text {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  font-weight: 700;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */
.btn {
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.85rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border: none;
  box-shadow: 0 4px 12px rgba(26,60,110,0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover), var(--primary));
  box-shadow: 0 6px 16px rgba(26,60,110,0.4);
}

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

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

.btn-action {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--transition);
  padding: 0;
}

.btn-action:hover { transform: scale(1.1); }

/* ═══════════════════════════════════════════════════════════════════════════
   FORM
   ═══════════════════════════════════════════════════════════════════════════ */
.form-label {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.form-control, .form-select {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  padding: 10px 14px;
  transition: var(--transition);
  color: var(--text-dark);
  background: #fafcff;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(42,82,152,0.12);
  background: white;
}

.input-group .input-group-text {
  background: #f0f4f8;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════════════════════════════════════ */
.modal-content {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.modal-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 18px 24px;
  border-bottom: none;
}

.modal-header .modal-title {
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-header .btn-close {
  filter: brightness(0) invert(1);
  opacity: 0.8;
}

.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  gap: 10px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BADGES & PILLS
   ═══════════════════════════════════════════════════════════════════════════ */
.badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 20px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ALERT / FLASH MESSAGE
   ═══════════════════════════════════════════════════════════════════════════ */
.alert-custom {
  border: none;
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  animation: slideDown 0.35s ease;
}

@keyframes slideDown {
  from { transform: translateY(-10px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.alert-custom .alert-icon {
  font-size: 1.3rem;
  margin-top: 1px;
  flex-shrink: 0;
}

.alert-custom .alert-body h6 {
  font-weight: 700;
  margin: 0 0 3px;
  font-size: 0.9rem;
}

.alert-custom .alert-body p {
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.9;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════════════════════════════════════ */
.pagination .page-link {
  border: none;
  border-radius: var(--radius) !important;
  margin: 0 2px;
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 14px;
  transition: var(--transition);
}

.pagination .page-link:hover {
  background: var(--primary);
  color: white;
}

.pagination .page-item.active .page-link {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-color: transparent;
  box-shadow: 0 4px 10px rgba(26,60,110,0.3);
}

/* ═══════════════════════════════════════════════════════════════════════════
   KASIR / POS
   ═══════════════════════════════════════════════════════════════════════════ */
.pos-wrapper {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  height: calc(100vh - 128px);
}

.pos-products {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pos-cart {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pos-product-grid {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  align-content: start;
}

.pos-product-item {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  background: #fafcff;
  position: relative;
}

.pos-product-item:hover {
  border-color: var(--primary-light);
  background: #eef4ff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.pos-product-item .prod-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 10px;
}

.pos-product-item .prod-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
  line-height: 1.3;
}

.pos-product-item .prod-price {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
}

.pos-product-item .prod-stok {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Cart Items */
.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.cart-item:hover { background: #f8faff; }

.cart-qty-btn {
  width: 26px;
  height: 26px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  transition: var(--transition);
}

.cart-qty-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PRODUCT CARDS (TOKO)
   ═══════════════════════════════════════════════════════════════════════════ */
.product-card {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: var(--transition);
  background: white;
  height: 100%;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.product-card .product-img-wrap {
  height: 180px;
  overflow: hidden;
  position: relative;
  background: #f0f4f8;
}

.product-card .product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-img-wrap img {
  transform: scale(1.06);
}

.product-card .badge-unggulan {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--accent);
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}

.product-card .badge-diskon {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--danger);
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}

.product-card .product-body {
  padding: 16px;
}

.product-card .product-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
  line-height: 1.4;
}

.product-card .product-price {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary);
}

.product-card .product-price-old {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SEARCH BAR
   ═══════════════════════════════════════════════════════════════════════════ */
.search-bar-wrap {
  position: relative;
}

.search-bar-wrap .bi-search {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-bar-wrap input {
  padding-left: 42px;
  height: 42px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   UTILITY
   ═══════════════════════════════════════════════════════════════════════════ */
.divider { height: 1px; background: var(--border); margin: 16px 0; }

.text-primary { color: var(--primary) !important; }
.bg-primary   { background: var(--primary) !important; }

.fw-semibold { font-weight: 600; }
.fw-extrabold { font-weight: 800; }

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 992px) {
  #sidebar {
    transform: translateX(calc(-1 * var(--sidebar-width)));
    box-shadow: none;
  }

  #sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0,0,0,0.3);
  }

  #main-content {
    margin-left: 0 !important;
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    backdrop-filter: blur(2px);
  }

  .sidebar-overlay.active { display: block; }

  .pos-wrapper {
    grid-template-columns: 1fr;
    height: auto;
  }

  .login-brand-panel { display: none; }
  .login-form-panel { width: 100%; padding: 40px 28px; }
}

@media (max-width: 576px) {
  .page-content { padding: 18px 16px 32px; }
  .stat-card .stat-value { font-size: 1.3rem; }
}
