.table--potensi .td--kec { min-width: 180px; }
.table--potensi .td--req { min-width: 100px; text-align: center; }
.table--potensi .td--act { min-width: 90px; text-align: center; }
.table--potensi .td--short { min-width: 110px; text-align: center; }
.table--potensi .td--murid { min-width: 160px; text-align: center; }
.table--potensi .td--penerima { min-width: 160px; text-align: center; }
/* MBG Dashboard Styles - Based on Reference Code */
:root {
  --bg: #f7fafc;
  --bg-elev: #ffffff;
  --bg-elev-2: #f4f7fb;
  --text: #0f172a;
  --muted: #5b728a;
  --brand: #22c55e;
  --brand-ink: #052e16;
  --border: #e5e7eb;
  --card: #ffffff;
  --skeleton: #e9eef5;
  --chip: #eef2f7;
  --shadow: 0 6px 20px rgba(2,6,23,0.35);
}

/* Light theme only - dark mode removed */

/* Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  transition: background-color 0.3s, color 0.3s;
}

/* Body padding for fixed navbar */
body.has-fixed-navbar {
  padding-top: 80px;
}

.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Brand/Logo Styles */
.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand__logo {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 8px 32px rgba(34, 197, 94, 0.3);
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.brand__logo::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand__logo:hover::before {
  left: 100%;
}

.brand__logo:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(34, 197, 94, 0.4);
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand__title {
  font-weight: 700;
  color: #ffffff;
  font-size: 20px;
  letter-spacing: -0.5px;
}

.brand__subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  letter-spacing: 0.2px;
}

/* Button Styles */
.btn {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn--muted {
  color: var(--muted);
}

.btn--pagination {
  padding: 6px 12px;
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}

.btn--pagination:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Header/Reportbar Styles */
.reportbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(135deg, #0f172a, #1e293b, #334155);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  padding: 20px 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  height: 80px;
  position: relative;
  overflow: hidden;
}

/* Fixed navbar for index.html */
.reportbar.fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.reportbar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, 
    rgba(34, 197, 94, 0.1) 0%, 
    transparent 20%, 
    transparent 80%, 
    rgba(34, 197, 94, 0.1) 100%);
  opacity: 0.6;
  pointer-events: none;
}

.pages-nav {
  display: flex;
  gap: 12px;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  padding: 8px;
  border-radius: 20px;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mobile nav select (hidden on desktop) */
.mobile-nav-select { display: none; }

/* Mobile hamburger menu */
.mobile-menu-button {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

.mobile-drawer {
  display: none;
  position: fixed;
  top: 80px;
  right: 12px;
  left: 12px;
  z-index: 1200;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(2,6,23,0.35);
  padding: 14px;
  backdrop-filter: blur(8px);
}

.mobile-drawer a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: #0f172a;
  border: 1px solid rgba(15,23,42,0.08);
  margin-bottom: 10px;
  text-align: center;
  text-decoration: none;
  background: linear-gradient(180deg, #ffffff, #f5f7fb);
  box-shadow: 0 6px 16px rgba(2,6,23,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.mobile-drawer a:hover {
  transform: translateY(-1px);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(2,6,23,0.14);
}

.mobile-drawer.show { display: block; }

/* Subtle dark overlay behind the drawer */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(2,6,23,0.45);
  z-index: 1190;
  backdrop-filter: blur(2px);
}
.mobile-overlay.show { display: block; }

.page-tab {
  appearance: none;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  padding: 14px 24px;
  border-radius: 16px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
              opacity 0.2s ease-in-out,
              visibility 0.2s ease-in-out;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  letter-spacing: 0.3px;
  font-weight: 600;
  font-size: 14px;
}

.page-tab::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-tab:hover::before {
  opacity: 1;
}

.page-tab:hover {
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  text-decoration: none;
}

.page-tab.is-active {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 8px 32px rgba(34, 197, 94, 0.4);
  transform: translateY(-1px);
}

.page-tab.is-active::before {
  opacity: 0;
}

/* Hide admin button by default */
a[href="admin-masukan.html"] {
  display: none !important;
}

/* Show admin button only when user is authenticated */
body.user-authenticated a[href="admin-masukan.html"] {
  display: block !important;
}

/* Mobile drawer admin button */
body.user-authenticated #mobileDrawer a[href="admin-masukan.html"] {
  display: block !important;
}

/* Light theme styling removed */

/* Dark mode toggle removed */

/* Toolbar Styles */
.toolbar {
  position: sticky;
  top: var(--reportbar-h, 56px);
  z-index: 15;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 12px 16px;
}

/* Toolbar positioning for fixed navbar */
.toolbar.with-fixed-navbar {
  top: 80px;
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

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

.control__label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.input {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px dashed var(--border);
  color: var(--text);
  background: var(--bg-elev);
  transition: all 0.3s ease;
}

/* Make school search input border clearer */
#schoolNameSearch.input {
  border: 2px solid var(--border, #9CA3AF);
}

#schoolNameSearch.input:focus {
  border-color: var(--brand, #22c55e);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
  outline: none;
}

.input--ghost {
  background: transparent;
}

.input--select {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  cursor: pointer;
  min-width: 120px;
}

.input--select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
  outline: none;
}

.input--select option {
  background: var(--bg-elev);
  color: var(--text);
  padding: 8px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #94a3b8;
}

.dot--success {
  background: var(--brand);
}

/* Content Styles */
.content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
}

/* Card Styles */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card--wide {
  grid-column: 1/-1;
}

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

.card__header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.chip-row {
  display: flex;
  gap: 10px;
}

.chip {
  height: 28px;
  border-radius: 999px;
  background: var(--chip);
  padding: 0 10px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
}

/* Header Section Styles */
.ls-header {
  background: #2e7d32;
  color: #fff;
  border-radius: 12px;
  padding: 16px 20px;
  border: 1px solid rgba(0,0,0,0.1);
}

.ls-header h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.4;
  text-align: center;
}

/* Light theme styling removed */

/* Stat Card Styles */
.stat-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  background: var(--bg-elev);
}

.stat-card--accent {
  background: linear-gradient(180deg, #34d39922, #10b98122);
}

.stat-card--info {
  background: linear-gradient(180deg, #60a5fa22, #22d3ee22);
}

.stat-card--primary {
  background: linear-gradient(180deg, #6366f122, #22c55e22);
}

.stat-card--amber {
  background: linear-gradient(180deg, #f59e0b22, #fde68a22);
}

.stat-card--red {
  background: linear-gradient(180deg, #ef444422, #fca5a522);
}

.stat-card--teal {
  background: linear-gradient(180deg, #14b8a622, #99f6e422);
}

.stat__title {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat__value {
  height: 32px;
  margin-top: 8px;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

/* Grid Layouts */
.grid--3cols-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr;
  row-gap: 32px;
  column-gap: 16px;
}

.mini-chart {
  height: 180px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Chart Container Styles */
.chart-container {
  padding: 16px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-container canvas {
  max-width: 100%;
  max-height: 100%;
}

/* Larger variant for big charts (e.g., Pie) */
.chart-container--lg {
  height: 320px;
}

/* Jenjang Chips Styles */
.jenjang-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
}

.chip-pill {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  border-radius: 999px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
}

.chip--pospaud {
  background: linear-gradient(135deg, #fce7f3, #fdf2f8);
  border-color: #ec4899;
  color: #be185d;
}

.chip--kb {
  background: linear-gradient(135deg, #fce7f3, #fdf2f8);
  border-color: #ec4899;
  color: #be185d;
}

.chip--tk {
  background: linear-gradient(135deg, #fce7f3, #fdf2f8);
  border-color: #ec4899;
  color: #be185d;
}

.chip--ra {
  background: linear-gradient(135deg, #fce7f3, #fdf2f8);
  border-color: #ec4899;
  color: #be185d;
}

.chip--sd {
  background: linear-gradient(135deg, #fee2e2, #fef2f2);
  border-color: #ef4444;
  color: #dc2626;
}

.chip--mi {
  background: linear-gradient(135deg, #fee2e2, #fef2f2);
  border-color: #ef4444;
  color: #dc2626;
}

.chip--smp {
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
  border-color: #3b82f6;
  color: #2563eb;
}

.chip--mts {
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
  border-color: #3b82f6;
  color: #2563eb;
}

.chip--sma {
  background: linear-gradient(135deg, #f3f4f6, #f9fafb);
  border-color: #6b7280;
  color: #374151;
}

.chip--smk {
  background: linear-gradient(135deg, #f3f4f6, #f9fafb);
  border-color: #6b7280;
  color: #374151;
}

.chip--ma {
  background: linear-gradient(135deg, #f3f4f6, #f9fafb);
  border-color: #6b7280;
  color: #374151;
}

.chip--pkbm {
  background: linear-gradient(135deg, #dcfce7, #f0fdf4);
  border-color: #22c55e;
  color: #16a34a;
}

.pill {
  background: var(--brand);
  color: var(--brand-ink);
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

/* Simple Chart Styles */
.simple-chart {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chart-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bar-label {
  min-width: 60px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.bar-container {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.bar {
  height: 24px;
  background: linear-gradient(90deg, var(--brand), var(--brand-ink));
  border-radius: 12px;
  min-width: 20px;
  transition: width 0.3s ease;
}

.bar-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  min-width: 40px;
  text-align: right;
}

/* Grid Layouts */
.grid--aside {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  row-gap: 32px;
  column-gap: 16px;
}

.aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.grid--with-side {
  display: grid;
  grid-template-columns: 2fr 1fr;
  row-gap: 32px;
  column-gap: 16px;
}

.metrics-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.filters-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 8px 0 24px;
}

.chart {
  height: 280px;
}

.map {
  height: 360px;
}

.bars {
  height: 360px;
}

.bars-h {
  height: 360px;
}

.donut {
  height: 360px;
}

.grid {
  display: grid;
  row-gap: 32px;
  column-gap: 16px;
}

.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Page Styles */
.page {
  display: none;
}

.page.is-active {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* Table Styles */
.table {
  display: flex;
  flex-direction: column;
}

.table__head, .tr {
  display: grid;
  /* Default: 11 columns with Aksi column */
  /* Columns: No | Nama SPPG | Alamat | Kecamatan SPPG | Nama Sekolah | Kecamatan Sekolah | Kelurahan Sekolah | NPSN | Jumlah Siswa | Jenjang | Aksi */
  grid-template-columns: 60px 1fr 1.4fr 1.2fr 1.6fr 1.2fr 1.2fr 120px 120px 100px 80px;
  gap: 0;
}

/* When user is not logged in, hide aksi column and expand other columns */
.table--no-aksi .table__head, 
.table--no-aksi .tr {
  /* 10 columns without Aksi column - redistribute space */
  /* Columns: No | Nama SPPG | Alamat | Kecamatan SPPG | Nama Sekolah | Kecamatan Sekolah | Kelurahan Sekolah | NPSN | Jumlah Siswa | Jenjang */
  grid-template-columns: 60px 1.2fr 1.6fr 1.4fr 1.8fr 1.4fr 1.4fr 140px 140px 120px;
}

.table__head {
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
}

.th, .td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  text-align: center;
}

.th--right, .td.th--right {
  text-align: center;
}

.table__body {
  /* Use more of the viewport height so the table fills the card */
  max-height: 65vh;
  overflow-y: auto;
}

.table__footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-elev-2);
}

.pagination-info {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  font-weight: 500;
}

.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/* Potensi page table responsiveness - full width with horizontal scroll when needed */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table--potensi { width: max-content; min-width: 100%; }

.table--potensi .table__head,
.table--potensi .tr {
  display: grid;
  grid-template-columns: minmax(180px, auto) 120px 100px 120px minmax(180px, auto) minmax(180px, auto);
}

.table--potensi .th, .table--potensi .td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  text-align: center;
}

/* Ensure only the outer wrapper handles horizontal scroll */
.table--potensi .table__body {
  overflow-y: auto;
  overflow-x: hidden;
}

@media (max-width: 768px) {
  .table--potensi .table__head,
  .table--potensi .tr {
    grid-template-columns: minmax(160px, auto) 100px 90px 110px minmax(160px, auto) minmax(160px, auto);
  }
}

/* List Styles */
.list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
}

.list__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-elev);
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 12px;
}

.list-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-elev-2);
}

.badge {
  background: var(--brand);
  color: var(--brand-ink);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
}

/* Footer Styles */
.footer {
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  gap: 16px;
  color: var(--muted);
}

/* Skeleton Loading Styles */
.skeleton {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  animation: sheen 1.6s infinite;
  border-radius: 10px;
}

.skeleton--text {
  height: 18px;
  display: block;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.09), transparent);
}

.skeleton--chip {
  width: 64px;
}

.skeleton--pill {
  height: 20px;
  width: 70px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.09), transparent);
}

@keyframes sheen {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Responsive Design */
@media (max-width: 1280px) {
  .grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  .grid--3cols-top {
    grid-template-columns: 1fr;
  }
  
  .grid--aside, .grid--with-side {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .content {
    padding: 16px;
  }
  
  .grid--2 {
    grid-template-columns: 1fr;
  }
  
  .table__head, .tr {
    /* Compact 11-column layout incl. Kelurahan dan Aksi */
    grid-template-columns: 50px 120px 1fr 1fr 1fr 1fr 1fr 90px 90px 70px 60px;
    font-size: 11px;
  }
  
  /* Tablet: 10 columns without Aksi */
  .table--no-aksi .table__head, 
  .table--no-aksi .tr {
    grid-template-columns: 50px 140px 1.2fr 1.2fr 1.2fr 1.2fr 1.2fr 100px 100px 80px;
    font-size: 11px;
  }
  
  .th, .td {
    padding: 8px 4px;
  }
  
  .toolbar {
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .control-group {
    min-width: 120px;
  }
}

@media (max-width: 768px) {
  .reportbar {
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    height: auto;
    min-height: 100px;
  }
  
  /* Adjust body padding for mobile fixed navbar */
  body.has-fixed-navbar {
    padding-top: 100px;
  }
  
  /* On mobile, make toolbar non-sticky (not floating) */
  .toolbar,
  .toolbar.with-fixed-navbar {
    position: static;
    top: auto;
    z-index: auto;
  }
  
  .pages-nav { display: none !important; }
  .mobile-menu-button { display: inline-flex; margin-left: auto; }
  .mobile-nav-select { display: none !important; }
  
  .page-tab {
    padding: 12px 20px;
    font-size: 13px;
  }
  
  .brand__logo {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  
  .brand__title {
    font-size: 18px;
  }
  
  .brand__subtitle {
    font-size: 12px;
  }
  
  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  /* Keep Export button inside viewport */
  .toolbar .control-group:last-child {
    margin-left: 0 !important;
    width: 100%;
    display: flex;
    align-items: stretch;
  }
  #exportBtn {
    width: 100%;
    max-width: 100%;
    justify-content: center;
  }

  /* Wrap long SPPG names in dropdown on mobile */
  #sppgFilter {
    width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  #sppgFilter option {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.3;
  }
  
  .control-group {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    min-width: auto;
  }
  
  .ls-header h1 {
    font-size: 16px;
  }
  
  .jenjang-chips {
    justify-content: center;
  }
  
  .chip-pill {
    font-size: 11px;
    padding: 4px 8px;
  }
  
  .pagination-controls {
    flex-direction: column;
    gap: 8px;
  }

  /* Show dropdown on mobile and align to right */
  .mobile-nav-select {
    display: inline-block;
    width: 100%;
    max-width: 220px;
    margin-left: auto;
    align-self: center;
  }
}

@media (max-width: 480px) {
  .content {
    padding: 12px;
  }
  
  .ls-header {
    padding: 12px 16px;
  }
  
  .ls-header h1 {
    font-size: 14px;
  }
  
  .stat-card {
    padding: 12px;
  }
  
  .card__header {
    padding: 12px;
  }
  
  .reportbar {
    padding: 12px;
    gap: 12px;
    height: auto;
    min-height: 120px;
  }
  
  /* Adjust body padding for small mobile fixed navbar */
  body.has-fixed-navbar {
    padding-top: 120px;
  }
  
  /* Also non-sticky on small mobile */
  .toolbar,
  .toolbar.with-fixed-navbar {
    position: static;
    top: auto;
  }
  
  .pages-nav {
    padding: 4px;
    gap: 6px;
  }
  
  .page-tab {
    padding: 10px 16px;
    font-size: 12px;
  }
  
  .brand__logo {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
  
  .brand__title {
    font-size: 16px;
  }
  
  .brand__subtitle {
    font-size: 11px;
  }
  
  /* Dark mode toggle removed */
  
  .table__head, .tr {
    grid-template-columns: 40px 90px 1fr 1fr 1fr 1fr 1fr 70px 70px 50px 50px;
    font-size: 10px;
  }
  
  /* Mobile: 10 columns without Aksi */
  .table--no-aksi .table__head, 
  .table--no-aksi .tr {
    grid-template-columns: 40px 100px 1.2fr 1.2fr 1.2fr 1.2fr 1.2fr 80px 80px 60px;
    font-size: 10px;
  }
  
  .th, .td {
    padding: 4px 2px;
  }
  
  .input--select {
    min-width: 100px;
    font-size: 12px;
  }
}

/* Loading Indicator Styles */
.loading-indicator {
  position: fixed;
  top: calc(var(--reportbar-h, 80px) + 10px);
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 25px;
  padding: 12px 20px;
  box-shadow: var(--shadow);
  z-index: 1101; /* above fixed navbar (1000) */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

/* Ensure navbar consistency across all pages */
.reportbar {
  /* Force consistent navbar styling */
  background: linear-gradient(135deg, #0f172a, #1e293b, #334155) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
  height: 80px !important;
  padding: 20px 24px !important;
}

.brand__logo {
  /* Force consistent logo styling */
  background: linear-gradient(135deg, #22c55e, #16a34a) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 32px rgba(34, 197, 94, 0.3) !important;
}

.brand__title,
.brand__subtitle {
  /* Force consistent text styling */
  color: #ffffff !important;
}

.page-tab.is-active {
  /* Force consistent active tab styling */
  background: linear-gradient(135deg, #22c55e, #16a34a) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 32px rgba(34, 197, 94, 0.4) !important;
}

/* Dark mode toggle removed */

.loading-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.loading-text {
  color: var(--text);
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
}

.loading-indicator .spinner-border {
  width: 1rem;
  height: 1rem;
  color: var(--brand) !important;
  border-width: 0.15em;
}

/* Loading indicator animation */
.loading-indicator.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  animation: loadingSlideDown 0.28s ease-out both;
}

.loading-indicator.hide {
  opacity: 0;
  transform: translateX(-50%) translateY(-20px);
}

@keyframes loadingSlideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Error Alert Styles */
.error-alert-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9998;
  max-width: 400px;
  pointer-events: none;
}

.error-alert {
  background-color: var(--bg-elev);
  color: var(--brand-ink);
  border: 1px solid var(--brand-ink);
  border-radius: 10px;
  padding: 15px 20px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
  animation: slideInRight 0.3s ease-out;
  backdrop-filter: blur(10px);
}

.error-alert i {
  font-size: 1.1rem;
  color: var(--brand-ink);
}

.error-close-btn {
  background: none;
  border: none;
  color: var(--brand-ink);
  cursor: pointer;
  padding: 5px;
  border-radius: 5px;
  transition: all 0.2s ease;
  margin-left: auto;
}

.error-close-btn:hover {
  background-color: rgba(220, 53, 69, 0.1);
}

/* Error alert animation */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
