/* ==========================================================================
   JeGOS 3.0 — Portal Publik Minimalis & Clean (Pemkab Banyumas Style)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

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

:root {
  --font-base: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  
  --bg-page: #f8fafc;
  --surface: #ffffff;
  
  --navy-dark: #0f172a;
  --navy-header: #1e293b;
  --navy-accent: #1e3a8a;
  
  --blue-primary: #2563eb;
  --blue-hover: #1d4ed8;
  --blue-light: #eff6ff;
  
  --emerald-success: #10b981;
  --emerald-light: #ecfdf5;
  
  --amber-warning: #f59e0b;
  --amber-light: #fffbeb;
  
  --rose-danger: #ef4444;
  --rose-light: #fef2f2;
  
  --text-main: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: var(--font-base);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--blue-primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--blue-hover); text-decoration: none; }

/* ===== GRID SYSTEM FALLBACK ENGINE ===== */
.row {
  display: flex !important;
  flex-wrap: wrap !important;
  margin-left: -12px !important;
  margin-right: -12px !important;
}
.row > [class*="col-"] {
  padding-left: 12px !important;
  padding-right: 12px !important;
  box-sizing: border-box !important;
}
.col-12 { flex: 0 0 100% !important; max-width: 100% !important; }
.col-6 { flex: 0 0 50% !important; max-width: 50% !important; }
.col-4 { flex: 0 0 33.333333% !important; max-width: 33.333333% !important; }
.col-3 { flex: 0 0 25% !important; max-width: 25% !important; }
.col-8 { flex: 0 0 66.666667% !important; max-width: 66.666667% !important; }

@media (min-width: 576px) {
  .col-sm-6 { flex: 0 0 50% !important; max-width: 50% !important; }
  .col-sm-12 { flex: 0 0 100% !important; max-width: 100% !important; }
}
@media (min-width: 992px) {
  .col-lg-3 { flex: 0 0 25% !important; max-width: 25% !important; }
  .col-lg-4 { flex: 0 0 33.333333% !important; max-width: 33.333333% !important; }
  .col-lg-8 { flex: 0 0 66.666667% !important; max-width: 66.666667% !important; }
  .col-lg-12 { flex: 0 0 100% !important; max-width: 100% !important; }
}

/* Flex Utilities */
.d-flex { display: flex !important; }
.d-none { display: none !important; }
.flex-column { flex-direction: column !important; }
.align-items-center { align-items: center !important; }
.align-items-start { align-items: flex-start !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-end { justify-content: flex-end !important; }
.flex-grow-1, .flex-grow { flex-grow: 1 !important; }
.h-100 { height: 100% !important; }
.w-100 { width: 100% !important; }

/* Spacing Utilities */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 4px !important; }
.mb-2 { margin-bottom: 8px !important; }
.mb-3 { margin-bottom: 16px !important; }
.mb-4 { margin-bottom: 24px !important; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 4px !important; }
.mt-2 { margin-top: 8px !important; }
.mt-3 { margin-top: 16px !important; }
.mt-4 { margin-top: 24px !important; }
.mr-1 { margin-right: 4px !important; }
.mr-2 { margin-right: 8px !important; }
.mr-3 { margin-right: 16px !important; }
.ml-1 { margin-left: 4px !important; }
.ml-2 { margin-left: 8px !important; }
.pb-1 { padding-bottom: 4px !important; }
.pb-2 { padding-bottom: 8px !important; }
.pt-1 { padding-top: 4px !important; }
.pt-2 { padding-top: 8px !important; }
.px-3 { padding-left: 16px !important; padding-right: 16px !important; }
.py-1 { padding-top: 4px !important; padding-bottom: 4px !important; }
.py-2 { padding-top: 8px !important; padding-bottom: 8px !important; }

/* Text Utilities */
.text-right { text-align: right !important; }
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.font-weight-bold { font-weight: 700 !important; }
.font-weight-extrabold { font-weight: 800 !important; }
.text-muted { color: #64748b !important; }
.text-primary { color: #2563eb !important; }
.text-success { color: #10b981 !important; }
.text-danger { color: #ef4444 !important; }
.text-info { color: #06b6d4 !important; }
.text-warning { color: #f59e0b !important; }
.border-bottom { border-bottom: 1px solid #e2e8f0 !important; }

@media (min-width: 768px) {
  .d-md-flex { display: flex !important; }
  .d-md-block { display: block !important; }
  .d-md-none { display: none !important; }
}
@media (min-width: 992px) {
  .mb-lg-0 { margin-bottom: 0 !important; }
}

/* ==========================================================================
   HEADER BANNER BIRU / NAVY PEMKAB BANYUMAS
   ========================================================================== */
.jg-header-banner {
  background: linear-gradient(135deg, #7f1d1d 0%, #b91c1c 50%, #ef4444 100%);
  color: #ffffff;
  padding: 20px 32px;
  box-shadow: 0 4px 12px rgba(185, 28, 28, 0.3);
}

.jg-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.jg-brand-block {
  display: flex;
  align-items: center;
  gap: 16px;
}

.jg-brand-badge {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: var(--transition);
}
.jg-brand-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.5);
}

.jg-brand-logo img {
  height: 48px;
  width: auto;
}

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

.jg-brand-subtitle {
  font-size: 0.8rem;
  color: #94a3b8;
  font-weight: 500;
}

.jg-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.jg-year-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-radius: var(--r-sm);
  padding: 8px 16px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition);
}
.jg-year-pill:hover {
  background: rgba(255, 255, 255, 0.2);
}

.jg-year-drop {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #ffffff;
  border-radius: var(--r-sm);
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  padding: 6px;
  min-width: 170px;
  z-index: 2000;
}
.jg-year-drop.open { display: block; }
.jg-year-drop a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 6px;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.88rem;
}
.jg-year-drop a:hover {
  background: var(--blue-light);
  color: var(--blue-primary);
}

/* Visitor Pills in Header */
.jg-visitor-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--r-sm);
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.jg-v-item {
  font-size: 0.78rem;
  font-weight: 600;
  color: #cbd5e1;
}
.jg-v-item span {
  color: #ffffff;
  font-weight: 800;
}
.jg-v-divider {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   TAB MENU TERSTRUKTUR
   ========================================================================== */
.jg-nav-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.jg-nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
}

.jg-nav-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin-bottom: 0 !important;
  padding-left: 0 !important;
}

.jg-nav-tab {
  position: relative;
}

.jg-tab-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 3px solid transparent;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
}
.jg-tab-link i { font-size: 1.15rem; color: var(--text-muted); transition: var(--transition); }

.jg-tab-link:hover {
  color: var(--blue-primary);
  background: rgba(37, 99, 235, 0.04);
}
.jg-tab-link:hover i { color: var(--blue-primary); }

.jg-nav-tab.active .jg-tab-link {
  color: var(--blue-primary);
  font-weight: 700;
  border-bottom-color: var(--blue-primary);
  background: var(--blue-light);
}
.jg-nav-tab.active .jg-tab-link i { color: var(--blue-primary); }

/* Submenu */
.jg-tab-sub {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--surface);
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  border-top: none;
  padding: 6px;
  min-width: 160px;
  z-index: 1500;
}
.jg-nav-tab:hover .jg-tab-sub { display: block; }
.jg-tab-sub a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 6px;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.88rem;
}
.jg-tab-sub a:hover {
  background: var(--blue-light);
  color: var(--blue-primary);
}

/* ==========================================================================
   MAIN CONTENT AREA
   ========================================================================== */
.jg-body-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 32px 48px;
}

/* ==========================================================================
   CARD PUTIH BORDER TIPIS (CLEAN MINIMALIST)
   ========================================================================== */
.card, .jg-clean-card {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--r-md) !important;
  box-shadow: var(--shadow-sm) !important;
  transition: var(--transition) !important;
  overflow: hidden;
}
.card:hover, .jg-clean-card:hover {
  box-shadow: var(--shadow-md) !important;
}

.card .card-body, .jg-clean-card .card-body {
  padding: 24px !important;
}

.card-title {
  font-size: 1rem !important;
  font-weight: 700 !important;
  color: var(--text-main) !important;
}

/* Stat Cards in Top Grid */
.jg-stat-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
  height: 100%;
}
.jg-stat-box:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.jg-stat-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.jg-stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 4px;
  line-height: 1.2;
}

.jg-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.jg-stat-icon.primary { background: var(--blue-light); color: var(--blue-primary); }
.jg-stat-icon.success { background: var(--emerald-light); color: var(--emerald-success); }
.jg-stat-icon.warning { background: var(--amber-light); color: var(--amber-warning); }
.jg-stat-icon.danger  { background: var(--rose-light); color: var(--rose-danger); }

/* Progress Meter Row inside Cards */
.jg-progress-item {
  margin-top: 14px;
}
.jg-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.jg-progress-bar-wrap {
  height: 8px;
  background: var(--border-light);
  border-radius: 10px;
  overflow: hidden;
}
.jg-progress-bar-inner {
  height: 100%;
  border-radius: 10px;
  transition: width 0.6s ease;
}
.jg-progress-bar-inner.blue { background: var(--blue-primary); }
.jg-progress-bar-inner.emerald { background: var(--emerald-success); }
.jg-progress-bar-inner.rose { background: var(--rose-danger); }

/* Badges */
.badge {
  display: inline-block !important;
  padding: 4px 10px !important;
  border-radius: 20px !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
}

/* ==========================================================================
   TABLES & DATATABLES OVERRIDE (SUPER CLEAN & NEAT)
   ========================================================================== */
.table-responsive {
  border-radius: var(--r-sm) !important;
  border: 1px solid var(--border) !important;
  overflow: hidden !important;
}

.table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin-bottom: 0 !important;
}

.table thead th {
  background: #f8fafc !important;
  color: var(--text-muted) !important;
  font-weight: 700 !important;
  font-size: 0.78rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  padding: 14px 16px !important;
  border-bottom: 2px solid var(--border) !important;
  border-top: none !important;
}

.table tbody td {
  padding: 14px 16px !important;
  vertical-align: middle !important;
  border-bottom: 1px solid var(--border-light) !important;
  font-size: 0.88rem !important;
  color: var(--text-main) !important;
}

.table tbody tr:hover {
  background: #f8fafc !important;
}

/* DataTables Specific Controls Override */
.dataTables_wrapper {
  padding: 8px 0 0 !important;
  font-family: var(--font-base) !important;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
  margin-bottom: 16px !important;
  color: var(--text-muted) !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
  display: inline-flex !important;
  align-items: center !important;
  margin-bottom: 0 !important;
  font-weight: 600 !important;
  color: var(--text-muted) !important;
}

/* Remove weird lines/dashes before or after labels */
.dataTables_wrapper .dataTables_filter label::before,
.dataTables_wrapper .dataTables_filter label::after,
.dataTables_wrapper .dataTables_length label::before,
.dataTables_wrapper .dataTables_length label::after {
  display: none !important;
  content: "" !important;
}

.dataTables_wrapper .dataTables_length select {
  height: 38px !important;
  padding: 4px 12px !important;
  border-radius: var(--r-sm) !important;
  border: 1px solid var(--border) !important;
  background-color: #ffffff !important;
  font-size: 0.85rem !important;
  color: var(--text-main) !important;
  outline: none !important;
  margin: 0 8px !important;
  cursor: pointer !important;
}

.dataTables_wrapper .dataTables_filter input {
  height: 38px !important;
  padding: 6px 14px !important;
  border-radius: var(--r-sm) !important;
  border: 1px solid var(--border) !important;
  background-color: #ffffff !important;
  font-size: 0.88rem !important;
  color: var(--text-main) !important;
  outline: none !important;
  box-shadow: none !important;
  margin-left: 8px !important;
}
.dataTables_wrapper .dataTables_filter input:focus {
  border-color: var(--blue-primary) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

.dataTables_wrapper .dataTables_info {
  padding-top: 16px !important;
  font-size: 0.82rem !important;
  color: var(--text-muted) !important;
  font-weight: 600 !important;
}

.dataTables_wrapper .dataTables_paginate {
  padding-top: 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 4px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  padding: 6px 12px !important;
  border-radius: var(--r-sm) !important;
  border: 1px solid var(--border) !important;
  background: #ffffff !important;
  color: var(--text-main) !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: var(--transition) !important;
  margin: 0 2px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: var(--blue-light) !important;
  color: var(--blue-primary) !important;
  border-color: #bfdbfe !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: var(--blue-primary) !important;
  color: #ffffff !important;
  border-color: var(--blue-primary) !important;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.25) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  background: #f8fafc !important;
  color: var(--text-muted) !important;
  border-color: var(--border) !important;
}

/* Rank Badges */
.rank-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  font-weight: 800 !important;
  font-size: 0.85rem !important;
}
.rank-badge-1 { background: #fef3c7 !important; color: #b45309 !important; border: 1px solid #fde68a !important; }
.rank-badge-2 { background: #f1f5f9 !important; color: #475569 !important; border: 1px solid #e2e8f0 !important; }
.rank-badge-3 { background: #ffedd5 !important; color: #c2410c !important; border: 1px solid #fed7aa !important; }
.rank-badge-other { background: #ffffff !important; color: var(--text-muted) !important; border: 1px solid var(--border) !important; }

/* ==========================================================================
   FORM CONTROLS & BUTTONS
   ========================================================================== */
.form-control, .select2-container--default .select2-selection--single {
  height: 42px !important;
  border-radius: var(--r-sm) !important;
  border: 1px solid var(--border) !important;
  padding: 0 14px !important;
  font-family: var(--font-base) !important;
  font-size: 0.88rem !important;
  color: var(--text-main) !important;
  background: #ffffff !important;
}
.form-control:focus {
  border-color: var(--blue-primary) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
  outline: none !important;
}

.btn-primary {
  background: var(--blue-primary) !important;
  border: none !important;
  border-radius: var(--r-sm) !important;
  font-weight: 600 !important;
  font-size: 0.88rem !important;
  padding: 9px 20px !important;
  color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2) !important;
}
.btn-primary:hover {
  background: var(--blue-hover) !important;
  color: #ffffff !important;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.jg-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 20px 32px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ==========================================================================
   MOBILE & RESPONSIVE SYSTEM OVERRIDES (JEGOS 3.0)
   ========================================================================== */

/* Mobile Hamburger Toggle Button */
.jg-mobile-toggle {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  transition: var(--transition);
  outline: none !important;
  margin-right: 4px;
}
.jg-mobile-toggle:hover, .jg-mobile-toggle:focus {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Off-Canvas Mobile Drawer & Overlay */
.jg-mobile-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 2999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.jg-mobile-backdrop.show {
  opacity: 1;
  visibility: visible;
}

.jg-mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 310px;
  max-width: 85vw;
  height: 100vh;
  background: #0f172a;
  color: #f8fafc;
  z-index: 3000;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 6px 0 30px rgba(0, 0, 0, 0.4);
}
.jg-mobile-drawer.open {
  transform: translateX(0);
}

.jg-mobile-drawer-header {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1e293b;
}

.jg-mobile-drawer-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
}
.jg-mobile-drawer-close:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.jg-mobile-drawer-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.jg-mobile-section-title {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin-bottom: 12px;
}

.jg-mobile-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.jg-mobile-menu li {
  margin-bottom: 4px;
}

.jg-mobile-menu li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--r-sm);
  color: #f1f5f9 !important;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}
.jg-mobile-menu li a:hover,
.jg-mobile-menu li.active > a {
  background: rgba(37, 99, 235, 0.25) !important;
  color: #60a5fa !important;
}

.jg-mobile-menu li a i {
  font-size: 1.25rem;
  color: #94a3b8;
}

.jg-mobile-submenu {
  display: none;
  padding-left: 32px;
  padding-top: 4px;
  margin-bottom: 8px;
}
.jg-mobile-submenu.open {
  display: block;
}
.jg-mobile-submenu a {
  padding: 8px 12px !important;
  font-size: 0.85rem !important;
}

.sub-icon {
  transition: transform 0.2s ease;
}
.sub-icon.rotate {
  transform: rotate(180deg);
}

.jg-mobile-visitor-card {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-md);
  padding: 16px;
  font-size: 0.82rem;
  color: #94a3b8;
}
.jg-mobile-visitor-card strong {
  color: #ffffff;
}

/* ==========================================================================
   BREAKPOINTS & RESPONSIVE RULES
   ========================================================================== */

/* Tablet & Smaller (<= 991px) */
@media (max-width: 991.98px) {
  .jg-header-banner {
    padding: 14px 20px;
  }
  
  .jg-header-inner {
    gap: 12px;
  }

  .jg-brand-title {
    font-size: 1.25rem;
  }
  
  .jg-brand-subtitle {
    font-size: 0.75rem;
  }

  .jg-nav-container {
    padding: 0 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
  }
  .jg-nav-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
  }

  .jg-nav-tabs {
    white-space: nowrap;
    flex-wrap: nowrap;
    min-width: max-content;
  }

  .jg-tab-link {
    padding: 12px 14px;
    font-size: 0.85rem;
  }

  .jg-body-content {
    padding: 20px 16px 36px;
  }

  .card-body, .jg-clean-card .card-body {
    padding: 18px !important;
  }

  .jg-stat-box {
    padding: 16px;
  }

  .jg-stat-value {
    font-size: 1.18rem;
  }

  .jg-stat-icon {
    width: 42px;
    height: 42px;
    font-size: 1.3rem;
  }
}

/* Mobile Screens (<= 767px) */
@media (max-width: 767.98px) {
  .jg-header-banner {
    padding: 12px 16px;
  }

  .jg-year-pill {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .jg-year-drop {
    right: 0;
    left: auto;
  }

  .jg-body-content {
    padding: 16px 12px 28px;
  }

  .card-body, .jg-clean-card .card-body {
    padding: 16px !important;
  }

  /* Force table responsive scrolling */
  .table-responsive {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    margin-bottom: 12px !important;
  }

  .table th, .table td {
    padding: 10px 12px !important;
    font-size: 0.82rem !important;
    white-space: nowrap;
  }

  /* DataTables Mobile Controls */
  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_filter {
    float: none !important;
    text-align: left !important;
    width: 100% !important;
    margin-bottom: 12px !important;
  }

  .dataTables_wrapper .dataTables_filter label {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
  }

  .dataTables_wrapper .dataTables_filter input {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .dataTables_wrapper .dataTables_paginate {
    justify-content: center !important;
    flex-wrap: wrap !important;
  }

  .dataTables_wrapper .dataTables_info {
    text-align: center !important;
  }

  /* Select2 Mobile Fix */
  .select2-container {
    width: 100% !important;
  }
}

/* Extra Small Phones (<= 480px) */
@media (max-width: 480px) {
  .jg-brand-title {
    font-size: 1.1rem;
  }
  
  .jg-brand-subtitle {
    display: none;
  }

  .jg-year-pill span {
    font-size: 0.78rem;
  }

  .jg-stat-box {
    padding: 12px 14px;
  }

  .jg-stat-label {
    font-size: 0.72rem;
  }

  .jg-stat-value {
    font-size: 1.05rem !important;
  }

  .jg-stat-icon {
    width: 36px;
    height: 36px;
    font-size: 1.15rem;
  }

  .btn {
    width: 100%;
    margin-bottom: 8px;
  }
}

