/* ============================================
   MIHASKA - Modern Dashboard Styles
   ============================================ */

:root {
  --primary: #0f766e;
  --primary-light: #14b8a6;
  --primary-dark: #0d5c56;
  --sidebar-bg: #0f172a;
  --sidebar-hover: rgba(20, 184, 166, 0.1);
  --sidebar-active: rgba(20, 184, 166, 0.15);
  --sidebar-active-border: #14b8a6;
  --accent: #f59e0b;
  --danger: #ef4444;
  --bg-main: #f1f5f9;
  --bg-card: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: 280px;
  height: 100vh;
  background: var(--sidebar-bg);
  color: #fff;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: var(--transition);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

/* Sidebar Header */
.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  text-align: center;
}

.logo-container {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  box-shadow: 0 8px 24px rgba(15, 118, 110, 0.3);
  position: relative;
  overflow: hidden;
}

.logo-container::after {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.1) 50%, transparent 60%);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%) rotate(45deg); }
  100% { transform: translateX(100%) rotate(45deg); }
}

.logo-container i {
  width: 32px; height: 32px;
  color: white;
  position: relative;
  z-index: 1;
}

.sidebar-header h4 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.tahun-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(20, 184, 166, 0.15);
  color: var(--primary-light);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid rgba(20, 184, 166, 0.2);
}

/* Sidebar User */
.sidebar-user {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 42px; height: 42px;
  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.9rem;
  flex-shrink: 0;
}

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

.user-meta .name {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-meta .role {
  font-size: 0.7rem;
  color: var(--primary-light);
  opacity: 0.8;
}

/* Navigation */
.sidebar-nav { flex: 1; padding: 12px 0; }

.nav-section {
  padding: 8px 24px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.35);
  margin-top: 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 24px;
  margin: 2px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-link:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

.nav-link.active {
  background: var(--sidebar-active);
  color: var(--primary-light);
  border-left: 3px solid var(--sidebar-active-border);
  margin-left: 9px;
}

.nav-link i {
  width: 20px; height: 20px;
  flex-shrink: 0;
  stroke-width: 2;
}

/* Logout */
.logout-section {
  padding: 12px 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.logout-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.15);
  border-radius: var(--radius-sm);
  color: #fca5a5;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #fecaca;
}

.logout-btn i { width: 18px; height: 18px; }

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
  margin-left: 280px;
  min-height: 100vh;
  transition: var(--transition);
}

/* Top Navbar */
.top-navbar {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(241, 245, 249, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-left { display: flex; align-items: center; gap: 16px; }

.menu-toggle {
  display: none;
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.menu-toggle:hover { background: var(--bg-main); }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.breadcrumb a:hover { color: var(--primary); }

.breadcrumb .current {
  color: var(--text-primary);
  font-weight: 600;
}

.breadcrumb .sep { color: var(--text-secondary); opacity: 0.5; }

.nav-right { display: flex; align-items: center; gap: 12px; }

/* Search */
.search-bar {
  position: relative;
  display: flex;
  align-items: center;
}

.search-bar i {
  position: absolute;
  left: 12px;
  color: var(--text-secondary);
  opacity: 0.5;
}

.search-bar input {
  width: 240px;
  padding: 8px 14px 8px 38px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-card);
  font-size: 0.85rem;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}

.search-bar input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
  width: 300px;
}

.search-bar input::placeholder { color: var(--text-secondary); opacity: 0.6; }

/* Icon Buttons */
.icon-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
}

.icon-btn:hover {
  background: var(--bg-main);
  border-color: var(--primary-light);
}

.icon-btn i { color: var(--text-secondary); }

.icon-btn .badge {
  position: absolute;
  top: -2px; right: -2px;
  width: 18px; height: 18px;
  background: var(--danger);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-card);
}

/* User Dropdown */
.user-dropdown {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.user-dropdown:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-sm);
}

.user-dropdown .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;
}

.user-dropdown .info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.user-dropdown .info .name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.user-dropdown .info .role {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.user-dropdown .chevron {
  color: var(--text-secondary);
  transition: var(--transition);
}

.user-dropdown:hover .chevron { transform: rotate(180deg); }

/* Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: var(--transition);
  z-index: 1001;
}

.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.85rem;
  text-decoration: none;
  transition: var(--transition);
}

.dropdown-menu a:hover { background: var(--bg-main); }

.dropdown-menu a.text-danger { color: var(--danger); }

.dropdown-menu a.text-danger:hover { background: rgba(239, 68, 68, 0.08); }

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

/* Content Area */
.content-area { padding: 28px; }

/* Overlay */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.sidebar-overlay.show { opacity: 1; visibility: visible; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    width: 260px;
  }
  .sidebar.show { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .menu-toggle { display: flex; }
  .search-bar input { width: 180px; }
  .search-bar input:focus { width: 220px; }
}

@media (max-width: 640px) {
  .top-navbar { padding: 12px 16px; }
  .search-bar { display: none; }
  .user-dropdown .info { display: none; }
  .content-area { padding: 16px; }
}

/* ============================================
   CARDS & COMPONENTS (Bonus)
   ============================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 1rem;
}

.card-body { padding: 24px; }

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: var(--transition);
}

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

.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon i { width: 24px; height: 24px; }

.stat-info h3 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.stat-info p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
}

.btn-primary-custom {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.875rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary-custom:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.3);
  color: white;
}

.table-modern {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table-modern th {
  background: var(--bg-main);
  padding: 14px 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.table-modern td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  vertical-align: middle;
}

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

.table-modern tbody tr {
  transition: var(--transition);
}

.table-modern tbody tr:hover { background: rgba(241, 245, 249, 0.5); }

.badge-modern {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success { background: rgba(34, 197, 94, 0.1); color: #16a34a; }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: #d97706; }
.badge-danger  { background: rgba(239, 68, 68, 0.1); color: #dc2626; }
.badge-info    { background: rgba(59, 130, 246, 0.1); color: #2563eb; }

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-title .icon-bg {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.25);
}

.page-title .icon-bg i { color: white; }

.page-title h1 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.page-title .subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ============================================
   STATS BAR
   ============================================ */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: var(--transition);
}

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

.stat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon i { width: 20px; height: 20px; }

.stat-icon.blue { background: rgba(59, 130, 246, 0.1); color: #2563eb; }
.stat-icon.green { background: rgba(34, 197, 94, 0.1); color: #16a34a; }
.stat-icon.amber { background: rgba(245, 158, 11, 0.1); color: #d97706; }
.stat-icon.purple { background: rgba(139, 92, 246, 0.1); color: #7c3aed; }

.stat-info h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.stat-info p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 4px;
  font-weight: 500;
}

/* ============================================
   TABLE COMPONENTS
   ============================================ */
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}

.toolbar-search {
  position: relative;
  flex: 1;
  max-width: 320px;
}

.toolbar-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  opacity: 0.5;
}

.toolbar-search input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-main);
  font-size: 0.85rem;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}

.toolbar-search input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
  background: var(--bg-card);
}

.toolbar-search input::placeholder { color: var(--text-secondary); opacity: 0.5; }

.toolbar-right { display: flex; align-items: center; gap: 8px; }

.btn-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
}

.btn-icon:hover {
  background: var(--primary-50);
  color: var(--primary);
  border-color: var(--primary-light);
}

.table-modern tbody tr { transition: background 0.2s; }
.table-modern tbody tr:hover td { background: rgba(241, 245, 249, 0.6); }

/* User cell */
.user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-name {
  font-weight: 600;
  color: var(--text-primary);
}

.user-nip {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.amount {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Action buttons */
.action-btns {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

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

.btn-action:hover { transform: scale(1.1); }
.btn-action.edit:hover { background: var(--primary-50); color: var(--primary); border-color: var(--primary-light); }
.btn-action.delete:hover { background: var(--danger-light); color: var(--danger); border-color: var(--danger); }

/* Table Footer & Pagination */
.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination button {
  min-width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination button:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}

.pagination button.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border-color: var(--primary);
}

.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.show { opacity: 1; visibility: visible; }

.modal-box {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(10px);
  transition: var(--transition);
}

.modal-overlay.show .modal-box {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

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

.modal-header h3 .icon-bg {
  width: 36px; height: 36px;
  background: var(--primary-50);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-header h3 .icon-bg i { color: var(--primary); }

.modal-close {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
}

.modal-close:hover { background: var(--bg-main); color: var(--danger); }

.modal-body { padding: 24px; }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-main);
  border-radius: 0 0 var(--radius) var(--radius);
}

/* Form Grid */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-label .required { color: var(--danger); margin-left: 2px; }

.form-input {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  font-size: 0.875rem;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
  font-family: inherit;
}

.form-input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

.form-input::placeholder { color: var(--text-secondary); opacity: 0.4; }

.btn-secondary {
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.btn-secondary:hover { background: var(--bg-main); }

/* Alert */
.alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  animation: slideDown 0.4s ease;
}

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

.alert-success {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  color: #16a34a;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #dc2626;
}

.alert-close {
  margin-left: auto;
  width: 24px; height: 24px;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
  opacity: 0.5;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.alert-close:hover { opacity: 1; }

/* Responsive */
@media (max-width: 1024px) {
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .form-grid { grid-template-columns: 1fr; }
  .table-toolbar { flex-direction: column; align-items: stretch; }
  .toolbar-search { max-width: 100%; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 12px; }
}

@media (max-width: 480px) {
  .stats-bar { grid-template-columns: 1fr; }
  .table-footer { flex-direction: column; gap: 12px; }
  
  
  /* ============================================
   SISWA PAGE SPECIFIC
   ============================================ */

/* Class Badge */
.badge-class {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(15, 118, 110, 0.08);
  color: var(--primary);
  border: 1px solid rgba(15, 118, 110, 0.15);
}

.badge-class::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--primary);
  border-radius: 50%;
  display: inline-block;
}

/* Filter Select */
.filter-select {
  padding: 9px 14px 9px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-main);
  font-size: 0.85rem;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  min-width: 160px;
}

.filter-select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
  background: var(--bg-card);
}

/* Toolbar Left */
.toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

/* Purple Button Override */
.btn-purple {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.btn-purple:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

/* Responsive Toolbar */
@media (max-width: 768px) {
  .toolbar-left {
    flex-direction: column;
    align-items: stretch;
  }
  .toolbar-search, .filter-select {
    max-width: 100%;
    width: 100%;
  }
}
}

/* ============================================
   SETTINGS PAGE SPECIFIC
   ============================================ */

/* Card Header with Icon */
.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 1rem;
}

.card-header .icon-bg {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-header .icon-bg i {
  width: 18px;
  height: 18px;
}

/* Info Items */
.info-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}

.info-item:hover {
  background: rgba(241, 245, 249, 0.5);
}

.info-item:last-child {
  border-bottom: none;
}

.info-item .icon-sm {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-item .icon-sm i {
  width: 14px;
  height: 14px;
}

/* Form with icon label */
.form-label i {
  display: inline;
  vertical-align: middle;
  margin-right: 6px;
}

/* Tips Card */
.tips-card {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), rgba(251, 191, 36, 0.05));
  border-color: rgba(245, 158, 11, 0.2);
}

/* Select styling */
select.form-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* Button group */
.btn-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Amber theme override for settings */
.btn-amber {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  text-decoration: none;
}

.btn-amber:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* Responsive */
@media (max-width: 992px) {
  .row.g-4 {
    flex-direction: column;
  }
  .col-lg-8, .col-lg-4 {
    width: 100%;
  }
}

/* ============================================
   HONOR PAGE SPECIFIC
   ============================================ */

/* Green theme for finance */
.btn-green-custom {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #059669, #10b981);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  text-decoration: none;
}

.btn-green-custom:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

/* Warning badge */
.badge-warning {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

/* Total row highlight */
.total-row {
  background: rgba(5, 150, 105, 0.05);
  font-weight: 700;
}

.total-row td {
  border-top: 2px solid rgba(5, 150, 105, 0.2);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px;
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  background: rgba(148, 163, 184, 0.1);
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.empty-state-icon i {
  width: 32px;
  height: 32px;
  color: #94a3b8;
}

/* Info box */
.info-box {
  background: rgba(5, 150, 105, 0.05);
  border: 1px solid rgba(5, 150, 105, 0.15);
  border-radius: 8px;
  padding: 14px;
}

/* Amount column */
.amount {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Responsive table */
@media (max-width: 1200px) {
  .table-modern th,
  .table-modern td {
    padding: 10px 12px;
    font-size: 0.75rem;
  }
}

/* ============================================
   JADWAL PAGE - INTERACTIVE CALENDAR
   ============================================ */

/* Schedule Container */
.schedule-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.schedule-header {
  display: grid;
  grid-template-columns: 60px repeat(6, 1fr);
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-bottom: 1px solid var(--border);
}

.schedule-header-cell {
  padding: 14px 8px;
  text-align: center;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  border-right: 1px solid var(--border);
  transition: var(--transition);
}

.schedule-header-cell:last-child { border-right: none; }

.schedule-header-cell.active {
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  color: white;
}

.schedule-body {
  display: grid;
  grid-template-columns: 60px repeat(6, 1fr);
}

.time-slot {
  padding: 8px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
}

.schedule-cell {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 6px;
  min-height: 100px;
  position: relative;
  transition: background 0.2s;
}

.schedule-cell:hover {
  background: rgba(59, 130, 246, 0.02);
}

.schedule-cell.dimmed {
  opacity: 0.3;
  background: #f8fafc;
}

.schedule-cell:last-child { border-right: none; }

/* Schedule Card */
.schedule-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.schedule-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #3b82f6, #60a5fa);
  border-radius: 8px 0 0 8px;
}

.schedule-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #3b82f6;
}

.schedule-card .subject {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.3;
  padding-right: 40px;
}

.schedule-card .teacher {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.schedule-card .class-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.65rem;
  font-weight: 600;
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.schedule-card .jtm-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: rgba(241, 245, 249, 0.9);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Mapel Color Variants */
.schedule-card.math::before { background: linear-gradient(180deg, #ef4444, #f87171); }
.schedule-card.math .class-badge { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

.schedule-card.science::before { background: linear-gradient(180deg, #10b981, #34d399); }
.schedule-card.science .class-badge { background: rgba(16, 185, 129, 0.1); color: #10b981; }

.schedule-card.social::before { background: linear-gradient(180deg, #f59e0b, #fbbf24); }
.schedule-card.social .class-badge { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }

.schedule-card.language::before { background: linear-gradient(180deg, #8b5cf6, #a78bfa); }
.schedule-card.language .class-badge { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }

.schedule-card.religion::before { background: linear-gradient(180deg, #06b6d4, #22d3ee); }
.schedule-card.religion .class-badge { background: rgba(6, 182, 212, 0.1); color: #06b6d4; }

.schedule-card.sports::before { background: linear-gradient(180deg, #ec4899, #f472b6); }
.schedule-card.sports .class-badge { background: rgba(236, 72, 153, 0.1); color: #ec4899; }

.schedule-card.arts::before { background: linear-gradient(180deg, #84cc16, #a3e635); }
.schedule-card.arts .class-badge { background: rgba(132, 204, 22, 0.1); color: #84cc16; }

/* Add Slot Button */
.add-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 60px;
  border: 2px dashed var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  opacity: 0;
}

.schedule-cell:hover .add-slot {
  opacity: 1;
}

.add-slot:hover {
  border-color: #3b82f6;
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}

/* View Toggle */
.view-toggle {
  display: flex;
  gap: 4px;
  background: var(--bg-main);
  padding: 4px;
  border-radius: 8px;
  margin-bottom: 20px;
  width: fit-content;
}

.view-toggle button {
  padding: 8px 16px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.view-toggle button.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.view-toggle button i { width: 16px; height: 16px; }

/* View Sections */
.view-section { display: none; }
.view-section.active { display: block; }

/* Day Badges */
.day-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
}

.day-badge.senin { background: rgba(239, 68, 68, 0.08); color: #dc2626; }
.day-badge.selasa { background: rgba(245, 158, 11, 0.08); color: #d97706; }
.day-badge.rabu { background: rgba(16, 185, 129, 0.08); color: #059669; }
.day-badge.kamis { background: rgba(59, 130, 246, 0.08); color: #2563eb; }
.day-badge.jumat { background: rgba(139, 92, 246, 0.08); color: #7c3aed; }
.day-badge.sabtu { background: rgba(6, 182, 212, 0.08); color: #0891b2; }

/* Filter Bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 1024px) {
  .schedule-header, .schedule-body {
    grid-template-columns: 50px repeat(6, 1fr);
  }
  .schedule-header-cell { font-size: 0.7rem; padding: 10px 4px; }
  .schedule-card { padding: 8px 10px; }
  .schedule-card .subject { font-size: 0.75rem; }
  .add-slot { opacity: 1; min-height: 40px; }
}

@media (max-width: 768px) {
  .schedule-container { overflow-x: auto; }
  .schedule-header, .schedule-body {
    min-width: 800px;
  }
  .page-header { flex-direction: column; align-items: flex-start; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-select { width: 100%; }
  .view-toggle { width: 100%; }
  .view-toggle button { flex: 1; justify-content: center; }
}