/* ==========================================================================
   SMART RAPOR PENDIDIKAN - Modern Professional Design System
   Created by @armadayogie (https://www.tiktok.com/@armadayogi)
   ========================================================================== */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --secondary: #475569;
  --success: #10b981;
  --success-light: #ecfdf5;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --info: #06b6d4;
  --info-light: #ecfeff;
  --dark: #0f172a;
  --sidebar-bg: #0f172a;
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 72px;
  --topbar-height: 64px;
  --bottombar-height: 68px;
  --bg-main: #f8fafc;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.07);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.08);
}

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

[v-cloak] {
  display: none !important;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   DESKTOP FIXED SIDEBAR (Does NOT scroll with page)
   ========================================================================== */

#app-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  color: #f1f5f9;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 4px 0 16px rgba(0, 0, 0, 0.08);
  overflow-y: auto;
  overflow-x: hidden;
}

#app-sidebar::-webkit-scrollbar {
  width: 4px;
}
#app-sidebar::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}

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

.sidebar-header {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow: hidden;
  text-decoration: none;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  white-space: nowrap;
}

.brand-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
  line-height: 1.2;
}

.brand-sub {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-menu {
  flex: 1;
  padding: 1.25rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  list-style: none;
}

.menu-category {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  font-weight: 700;
  padding: 0.75rem 0.75rem 0.25rem;
  white-space: nowrap;
}

.menu-item a {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 0.875rem;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.menu-item a i {
  font-size: 1.15rem;
  flex-shrink: 0;
  width: 22px;
  text-align: center;
}

.menu-item a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
}

.menu-item.active a {
  color: #ffffff;
  background: var(--primary);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.sidebar-user {
  padding: 1rem 0.875rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.2);
}

.user-avatar {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  white-space: nowrap;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff;
  text-overflow: ellipsis;
  overflow: hidden;
}

.user-role-badge {
  font-size: 0.68rem;
  color: #38bdf8;
  font-weight: 500;
}

/* ==========================================================================
   MAIN CONTENT LAYOUT
   ========================================================================== */

#main-wrapper {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#app-sidebar.collapsed ~ #main-wrapper {
  margin-left: var(--sidebar-collapsed-width);
}

/* Topbar */
.main-topbar {
  height: var(--topbar-height);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1020;
  box-shadow: var(--shadow-sm);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-sidebar-toggle {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--secondary);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

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

.page-breadcrumb {
  display: flex;
  flex-direction: column;
}

.breadcrumb-main {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

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

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Page Content - 100% Fullscreen Layout with Zero Empty Dead Space */
.page-content {
  flex: 1;
  padding: 1.25rem 1.5rem;
  max-width: 100% !important;
  width: 100% !important;
  margin: 0;
}

/* Sticky Left Columns for Wide Data Tables (Excel-like frozen columns) */
.table-sticky-left th.sticky-col-npsn,
.table-sticky-left td.sticky-col-npsn {
  position: sticky;
  left: 0;
  z-index: 10;
  background-color: #ffffff;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.05);
}

.table-sticky-left th.sticky-col-nama,
.table-sticky-left td.sticky-col-nama {
  position: sticky;
  left: 95px;
  z-index: 10;
  background-color: #ffffff;
  box-shadow: 3px 0 8px rgba(0, 0, 0, 0.06);
}

.table-sticky-left th.sticky-col-npsn,
.table-sticky-left th.sticky-col-nama {
  background-color: #f1f5f9;
  z-index: 20;
}

.table-sticky-left tr:hover td.sticky-col-npsn,
.table-sticky-left tr:hover td.sticky-col-nama {
  background-color: #f8fafc;
}

.indicator-cell-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  white-space: nowrap;
  display: inline-block;
  text-align: center;
  min-width: 65px;
}
.ind-baik { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.ind-sedang { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.ind-kurang { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.ind-na { background: #f1f5f9; color: #94a3b8; border: 1px solid #e2e8f0; }

/* ==========================================================================
   CARDS & METRICS
   ========================================================================== */

.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  height: 100%;
}

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

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

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

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stat-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Content Cards */
.content-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.content-card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  background: #ffffff;
}

.content-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.content-card-body {
  padding: 1.25rem;
}

/* ==========================================================================
   TABLES & FILTERS (Search, Filter, Pagination, Export)
   ========================================================================== */

.filter-toolbar {
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}

.search-input-group {
  position: relative;
  min-width: 260px;
  flex: 1;
  max-width: 380px;
}

.search-input-group i {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input-group input {
  padding-left: 2.35rem;
  padding-right: 0.875rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  height: 38px;
  font-size: 0.875rem;
  width: 100%;
  background: #ffffff;
}

.filter-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.filter-controls select {
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
  padding: 0 0.75rem;
  background-color: #ffffff;
  color: var(--text-main);
}

.btn-reset-filter {
  height: 38px;
  padding: 0 0.875rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-reset-filter:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.btn-export-excel {
  height: 38px;
  padding: 0 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: #059669;
  border: 1px solid #047857;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.btn-export-excel:hover {
  background: #047857;
  color: #ffffff;
}

/* Modern Data Table */
.table-responsive {
  width: 100% !important;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-modern,
.data-table {
  width: 100% !important;
  min-width: 100% !important;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
  margin: 0;
}

.table-modern th {
  background: #f8fafc;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.85rem 1rem;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
  vertical-align: middle;
}

.table-modern td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
}

.table-modern tr:hover td {
  background-color: #f8fafc;
}

/* Badges */
.badge-status {
  padding: 0.3rem 0.65rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

.badge-baik {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.badge-sedang {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.badge-kurang {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.badge-naik {
  color: #15803d;
  font-weight: 600;
}
.badge-turun {
  color: #b91c1c;
  font-weight: 600;
}

/* Pagination Bar */
.pagination-wrapper {
  padding: 0.875rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
}

.pagination-info {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
}

.pagination-controls button {
  min-width: 34px;
  height: 34px;
  padding: 0 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.pagination-controls button:hover:not(:disabled) {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.pagination-controls button.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  font-weight: 600;
}

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

/* ==========================================================================
   FOOTER (Must be createdby@armadayogie with tiktok hyperlink)
   ========================================================================== */

.app-footer {
  margin-top: auto;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.app-footer a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.app-footer a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* ==========================================================================
   MOBILE BOTTOM NAVIGATION BAR (< 768px)
   ========================================================================== */

.mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  #app-sidebar {
    display: none !important;
  }

  #main-wrapper {
    margin-left: 0 !important;
    padding-bottom: calc(var(--bottombar-height) + 1rem);
  }

  .main-topbar {
    padding: 0 1rem;
  }

  .btn-sidebar-toggle {
    display: none;
  }

  .page-content {
    padding: 1rem 0.75rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .filter-toolbar {
    padding: 0.75rem;
    flex-direction: column;
    align-items: stretch;
  }

  .search-input-group {
    max-width: 100%;
    min-width: 100%;
  }

  .filter-controls {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .btn-reset-filter, .btn-export-excel {
    width: 100%;
    justify-content: center;
  }

  .pagination-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  /* Mobile Bottom Navigation Bar */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottombar-height);
    background: #0f172a;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    justify-content: space-around;
    align-items: center;
    padding: 0 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 500;
    padding: 0.35rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    flex: 1;
    text-align: center;
  }

  .mobile-nav-item i {
    font-size: 1.25rem;
    margin-bottom: 0.15rem;
  }

  .mobile-nav-item.active {
    color: #38bdf8;
    font-weight: 700;
  }

  .mobile-nav-item.active i {
    transform: translateY(-2px);
  }
}

/* ==========================================================================
   PERBANDINGAN ANTAR SEKOLAH (KOMPARASI MULTI-SATDIK)
   ========================================================================== */

.compare-hero-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0369a1 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.25);
  position: relative;
  overflow: hidden;
}

.compare-hero-banner::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.compare-picker-tray {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.compare-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 50rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transition: all 0.2s ease;
}

.compare-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

.compare-chip .btn-remove-chip {
  background: rgba(255, 255, 255, 0.25);
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  cursor: pointer;
  padding: 0;
  font-size: 0.7rem;
  line-height: 1;
  transition: background 0.15s;
}

.compare-chip .btn-remove-chip:hover {
  background: rgba(255, 255, 255, 0.45);
}

.compare-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  max-height: 320px;
  overflow-y: auto;
  z-index: 1060;
  margin-top: 4px;
}

.compare-search-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.compare-search-item:hover {
  background: #f8fafc;
}

.school-summary-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 100%;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.school-summary-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.school-summary-card .card-stripe {
  height: 5px;
  width: 100%;
}

.matrix-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.86rem;
}

.matrix-table th, .matrix-table td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid #e2e8f0;
}

.matrix-table thead th {
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 2px solid #cbd5e1;
}

.matrix-table tbody tr:hover td {
  background-color: #f8fafc;
}

.matrix-table .sticky-indicator-col {
  position: sticky;
  left: 0;
  background: #ffffff;
  font-weight: 600;
  z-index: 5;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.04);
  min-width: 240px;
}

.matrix-table thead th.sticky-indicator-col {
  background: #f8fafc;
  z-index: 15;
}

.matrix-table .school-data-cell {
  min-width: 190px;
  text-align: center;
}

.badge-top-performer {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  border-radius: 50rem;
  padding: 0.15rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
}

/* ==========================================================================
   RANKING & LEADERBOARD SATUAN PENDIDIKAN
   ========================================================================== */

.ranking-hero-banner {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #0284c7 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 25px -5px rgba(30, 27, 75, 0.3);
  position: relative;
  overflow: hidden;
}

.ranking-hero-banner::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.25) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.metric-nav-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  background: #ffffff;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.metric-nav-item {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 50rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.metric-nav-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.metric-nav-item.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border-color: #1d4ed8;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

/* Podium Cards */
.podium-section {
  margin-bottom: 1.75rem;
}

.podium-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.25s, box-shadow 0.25s;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.podium-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.podium-gold {
  border: 2px solid #fbbf24;
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 100%);
}

.podium-silver {
  border: 2px solid #cbd5e1;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.podium-bronze {
  border: 2px solid #fed7aa;
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%);
}

.podium-medal {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.medal-gold {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
}

.medal-silver {
  background: linear-gradient(135deg, #94a3b8, #64748b);
  color: #ffffff;
}

.medal-bronze {
  background: linear-gradient(135deg, #ea580c, #c2410c);
  color: #ffffff;
}

.score-bubble {
  display: inline-flex;
  align-items: baseline;
  gap: 0.2rem;
  padding: 0.3rem 0.75rem;
  border-radius: 50rem;
  font-weight: 800;
  font-family: monospace;
}

.score-bubble-high {
  background: #dcfce7;
  color: #166534;
}

.score-bubble-med {
  background: #fef9c3;
  color: #854d0e;
}

.score-bubble-low {
  background: #fee2e2;
  color: #991b1b;
}

/* Rank table styling */
.rank-badge-cell {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.92rem;
  font-family: monospace;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.rank-top-1 {
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #ffffff;
}

.rank-top-2 {
  background: linear-gradient(135deg, #94a3b8, #64748b);
  color: #ffffff;
}

.rank-top-3 {
  background: linear-gradient(135deg, #f97316, #c2410c);
  color: #ffffff;
}

.rank-top-10 {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.rank-standard {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.score-meter {
  width: 100%;
  max-width: 120px;
  height: 7px;
  background: #e2e8f0;
  border-radius: 50rem;
  overflow: hidden;
  margin-top: 4px;
}

.score-meter-fill {
  height: 100%;
  border-radius: 50rem;
  transition: width 0.4s ease;
}

/* Fullscreen Proportional Ranking Table */
.ranking-table {
  width: 100% !important;
  min-width: 100% !important;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.88rem;
  margin: 0;
}

.ranking-table th {
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.95rem 1rem;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
  vertical-align: middle;
}

.ranking-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
  background-color: #ffffff;
}

.ranking-table tbody tr:hover td {
  background-color: #f8fafc;
}

.ranking-table .col-rank {
  width: 70px;
  min-width: 65px;
  text-align: center;
}

.ranking-table .col-school {
  min-width: 280px;
  width: auto;
}

.ranking-table .col-jenjang {
  width: 150px;
  min-width: 130px;
}

.ranking-table .col-kecamatan {
  width: 160px;
  min-width: 140px;
}

.ranking-table .col-predikat {
  width: 130px;
  min-width: 115px;
  text-align: center;
}

.ranking-table .col-score {
  width: 130px;
  min-width: 115px;
  text-align: center;
}

.ranking-table .col-indicator {
  width: 110px;
  min-width: 100px;
  text-align: center;
  white-space: nowrap;
}

.ranking-table .col-aksi {
  width: 120px;
  min-width: 110px;
  text-align: right;
}

/* ==========================================================================
   PROPORTIONAL FILTER TOOLBAR FOR RANKING & LEADERBOARD
   ========================================================================== */
.filter-toolbar-ranking {
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.filter-toolbar-ranking .search-group {
  position: relative;
  flex: 2 1 280px;
  min-width: 240px;
}

.filter-toolbar-ranking .search-group i {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.filter-toolbar-ranking .search-group input {
  padding-left: 2.35rem;
  padding-right: 0.875rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  height: 38px;
  font-size: 0.875rem;
  width: 100%;
  background: #ffffff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-toolbar-ranking .search-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}

.filter-toolbar-ranking .filter-select {
  flex: 1 1 135px;
  min-width: 125px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
  padding: 0 0.75rem;
  background-color: #ffffff;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.filter-toolbar-ranking .filter-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.filter-toolbar-ranking .filter-limit {
  flex: 0 0 115px;
  min-width: 105px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
  padding: 0 0.75rem;
  background-color: #ffffff;
  color: var(--text-main);
  cursor: pointer;
}

.filter-toolbar-ranking .btn-reset-filter {
  flex: 0 0 auto;
  height: 38px;
  padding: 0 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.filter-toolbar-ranking .btn-reset-filter:hover {
  background: #e2e8f0;
  color: #1e293b;
}




