/* ==========================================================================
   BSI MOBILE THEME & NU AESTHETIC - WACHID HASYIM PRESENSI
   ========================================================================== */

:root {
  --bsi-teal-dark: #006C5F;
  --bsi-teal: #008272;
  --bsi-teal-light: #00A39D;
  --bsi-teal-soft: #E6F6F5;
  --bsi-orange: #EB690B;
  --bsi-orange-gold: #F59E0B;
  --bsi-gold: #FBBF24;
  
  --nu-green: #007D40;
  --nu-green-light: #10B981;
  --nu-gold: #D97706;

  --status-hadir: #10B981;
  --status-hadir-bg: #D1FAE5;
  --status-lambat: #F59E0B;
  --status-lambat-bg: #FEF3C7;
  --status-sakit: #3B82F6;
  --status-sakit-bg: #DBEAFE;
  --status-izin: #8B5CF6;
  --status-izin-bg: #EDE9FE;
  --status-alpha: #EF4444;
  --status-alpha-bg: #FEE2E2;

  --bg-app: #F8FAF9;
  --card-bg: #FFFFFF;
  --text-primary: #1E293B;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;
  --border-color: #E2E8F0;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 130, 114, 0.12);
  --shadow-bsi: 0 8px 20px rgba(0, 108, 95, 0.18);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
}

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Plus Jakarta Sans', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  background-color: #F8FAFB;
  color: var(--text-primary);
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
  overflow-x: hidden;
}

/* Flexible Full-Width Responsive Container for Laptop & HP */
.app-container {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  background-color: #F8FAFB;
  position: relative;
  display: flex;
  flex-direction: column;
  padding-bottom: 95px; /* space for floating bottom nav */
  transition: all 0.3s ease;
  margin: 0;
  border: none;
  box-shadow: none;
}

/* Responsive View Panels (Memenuhi Layar Laptop dengan batas maksimal elegan) */
.view-panel {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 16px 20px 16px;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .view-panel {
    padding: 0 28px 26px 28px;
  }
}

@media (min-width: 1200px) {
  .view-panel {
    padding: 0 36px 32px 36px;
  }
}

/* ==========================================================================
   BEYOND BSI TOP HEADER (ROUNDED HIJAU TOSKA & EMAS ISLAMI ELEGAN)
   ========================================================================== */
.bsi-header {
  background: linear-gradient(135deg, #005A4E 0%, #008272 50%, #00A39D 100%);
  color: #FFFFFF;
  margin: 14px 16px 0 16px;
  padding: 24px 20px;
  border-radius: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 35px rgba(0, 108, 95, 0.22);
  text-align: center;
  border: 1px solid rgba(251, 191, 36, 0.28);
}

@media (min-width: 768px) {
  .bsi-header {
    max-width: 1440px;
    margin: 18px auto 0 auto;
    width: calc(100% - 56px);
    padding: 30px 36px;
    border-radius: 32px;
  }
}

@media (min-width: 1200px) {
  .bsi-header {
    width: calc(100% - 72px);
    padding: 34px 44px;
  }
}

/* Beyond BSI Islamic Arabesque & Gold Star Pattern Backdrop */
.bsi-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(circle at 88% 12%, rgba(251, 191, 36, 0.28) 0%, transparent 45%),
                    radial-gradient(circle at 12% 88%, rgba(16, 185, 129, 0.22) 0%, transparent 40%),
                    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 60%);
  pointer-events: none;
}

.bsi-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(45deg, rgba(255, 255, 255, 0.03) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.03) 75%),
    linear-gradient(45deg, rgba(255, 255, 255, 0.03) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.03) 75%);
  background-size: 32px 32px;
  background-position: 0 0, 16px 16px;
  opacity: 0.8;
  pointer-events: none;
}

/* Greeting Section */
.bsi-greeting-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  text-align: center;
}

.salam-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.94);
  font-weight: 600;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.user-name-title {
  font-size: 22px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

.sub-tagline {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 8px;
}

.header-clock {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(0, 0, 0, 0.14);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  display: inline-block;
  backdrop-filter: blur(4px);
}

/* ==========================================================================
   BSI FLOATING CARD (BALANCE CARD STYLE)
   ========================================================================== */
.bsi-floating-card-wrap {
  margin: -50px 16px 14px 16px;
  position: relative;
  z-index: 10;
}

.bsi-floating-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-bsi);
  border: 1px solid rgba(0, 163, 157, 0.12);
  position: relative;
  overflow: hidden;
}

.bsi-floating-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(235, 105, 11, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.card-title-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-title-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--bsi-teal-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.gps-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background-color: #F1F5F9;
  color: var(--text-secondary);
}

.gps-live-badge.in-radius {
  background-color: var(--status-hadir-bg);
  color: #065F46;
}

.gps-live-badge.out-radius {
  background-color: var(--status-alpha-bg);
  color: #991B1B;
}

.pulsing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: currentColor;
  animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

/* Attendance Quick Counters in Card */
.attendance-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
  background-color: #F8FAFC;
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid #EDF2F7;
}

.stat-item {
  text-align: center;
}

.stat-val {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
}

.stat-val.hadir { color: var(--status-hadir); }
.stat-val.lambat { color: var(--status-lambat); }
.stat-val.izin { color: var(--status-izin); }
.stat-val.alpha { color: var(--status-alpha); }

.stat-lbl {
  font-size: 9.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Quick Action Row in Floating Card */
.card-quick-actions {
  display: flex;
  gap: 8px;
}

.btn-card-action {
  flex: 1;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  border: none;
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-card-action.primary {
  background: linear-gradient(135deg, var(--bsi-teal), var(--bsi-teal-light));
  color: #FFFFFF;
  box-shadow: 0 3px 8px rgba(0, 130, 114, 0.25);
}

.btn-card-action.secondary {
  background: linear-gradient(135deg, #FFF7ED, #FFEDD5);
  color: var(--bsi-orange);
  border: 1px solid rgba(235, 105, 11, 0.2);
}

.btn-card-action:active {
  transform: scale(0.96);
}

/* ==========================================================================
   RUNNING MARQUEE BANNER
   ========================================================================== */
.bsi-marquee-wrap {
  margin: 0 16px 16px 16px;
  background: #FFFFFF;
  border-radius: var(--radius-md);
  padding: 7px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #E2E8F0;
  overflow: hidden;
}

.marquee-badge {
  background: linear-gradient(135deg, #F59E0B, #EB690B);
  color: #FFFFFF;
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  flex-shrink: 0;
  text-transform: uppercase;
}

.marquee-content {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}

.marquee-text {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
  animation: scrollText 24s linear infinite;
}

@keyframes scrollText {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* ==========================================================================
   ADMIN TABS HORIZONTAL NAV BAR & BULK DELETE STYLING
   ========================================================================== */
.admin-tabs-nav-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 12px 2px;
  margin-bottom: 14px;
  scrollbar-width: none;
}

.admin-tabs-nav-bar::-webkit-scrollbar {
  display: none;
}

.admin-tab-nav-btn {
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 700;
  background-color: #FFFFFF;
  color: var(--text-secondary);
  border: 1px solid #CBD5E1;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
  transition: all 0.2s ease;
}

.admin-tab-nav-btn:hover {
  background-color: var(--bsi-teal-soft);
  color: var(--bsi-teal-dark);
}

.admin-tab-nav-btn.active {
  background: linear-gradient(135deg, var(--bsi-teal), var(--bsi-teal-light));
  color: #FFFFFF;
  border-color: var(--bsi-teal);
  box-shadow: 0 4px 10px rgba(0, 130, 114, 0.25);
}

.bulk-delete-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   SIMPLE CLEAN BSI FEATURES (HANYA ICON + NAMA FITUR) - COMPACT NAN INDAH DI HP
   ========================================================================== */
.simple-features-container {
  padding: 14px 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  flex: 1;
  align-content: center;
  margin: 6px 0;
  width: 100%;
}

@media (min-width: 768px) {
  .simple-features-container {
    grid-template-columns: repeat(4, 1fr);
    max-width: 1200px;
    margin: 36px auto;
    padding: 24px 32px;
    gap: 20px;
  }
}

.simple-feature-card {
  background: #FFFFFF;
  border-radius: 20px;
  padding: 18px 12px;
  box-shadow: 0 4px 18px rgba(0, 108, 95, 0.08);
  border: 1px solid rgba(0, 130, 114, 0.12);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  text-align: center;
  position: relative;
  overflow: hidden;
}

@media (min-width: 768px) {
  .simple-feature-card {
    padding: 30px 18px;
    border-radius: 24px;
    gap: 16px;
  }
}

.simple-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(0, 108, 95, 0.14);
}

.simple-feature-card:active {
  transform: scale(0.96);
}

.simple-feature-card.guru {
  border-color: rgba(0, 163, 157, 0.25);
  background: linear-gradient(180deg, #FFFFFF 60%, #F0FDF4 100%);
}

.simple-feature-card.siswa {
  border-color: rgba(37, 99, 235, 0.25);
  background: linear-gradient(180deg, #FFFFFF 60%, #EFF6FF 100%);
}

.simple-feature-card.jurnal {
  border-color: rgba(217, 119, 6, 0.35);
  background: linear-gradient(180deg, #FFFFFF 55%, #FEF3C7 100%);
  box-shadow: 0 6px 20px rgba(180, 83, 9, 0.09);
}

.simple-feature-card.supervisi {
  border-color: rgba(124, 58, 237, 0.35);
  background: linear-gradient(180deg, #FFFFFF 55%, #F5F3FF 100%);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.09);
}

.simple-feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

@media (min-width: 768px) {
  .simple-feature-icon {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    font-size: 34px;
  }
}

.simple-feature-card.guru .simple-feature-icon {
  background: linear-gradient(135deg, var(--bsi-teal-dark), var(--bsi-teal-light));
  color: #FFFFFF;
  box-shadow: 0 6px 16px rgba(0, 130, 114, 0.25);
}

.simple-feature-card.siswa .simple-feature-icon {
  background: linear-gradient(135deg, #1D4ED8, #3B82F6);
  color: #FFFFFF;
  box-shadow: 0 6px 16px rgba(29, 78, 216, 0.25);
}

.simple-feature-card.jurnal .simple-feature-icon {
  background: linear-gradient(135deg, #B45309, #F59E0B);
  color: #FFFFFF;
  box-shadow: 0 6px 16px rgba(180, 83, 9, 0.25);
}

.simple-feature-card.supervisi .simple-feature-icon {
  background: linear-gradient(135deg, #6D28D9, #8B5CF6);
  color: #FFFFFF;
  box-shadow: 0 6px 16px rgba(109, 40, 217, 0.25);
}

.simple-feature-card:hover .simple-feature-icon {
  transform: scale(1.06) rotate(3deg);
}

.simple-feature-name {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.2px;
  line-height: 1.25;
}

@media (min-width: 768px) {
  .simple-feature-name {
    font-size: 15.5px;
  }
}

/* ==========================================================================
   MAIN MENU FEATURES (2 FITUR UTAMA)
   ========================================================================== */
.section-title {
  padding: 0 20px;
  margin-bottom: 12px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-title span.sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--bsi-teal);
  cursor: pointer;
}

/* 2 Main Big Feature Cards */
.main-two-features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 0 16px;
  margin-bottom: 18px;
}

.feature-big-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 16px 14px;
  box-shadow: var(--shadow-md);
  border: 1.5px solid transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-big-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.feature-big-card.guru-card {
  border-color: rgba(0, 163, 157, 0.25);
  background: linear-gradient(180deg, #FFFFFF 60%, #F0FDF4 100%);
}

.feature-big-card.siswa-card {
  border-color: rgba(59, 130, 246, 0.25);
  background: linear-gradient(180deg, #FFFFFF 60%, #EFF6FF 100%);
}

.feature-icon-badge {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 12px;
  position: relative;
}

.guru-card .feature-icon-badge {
  background: linear-gradient(135deg, #008272, #00A39D);
  color: #FFFFFF;
  box-shadow: 0 4px 10px rgba(0, 130, 114, 0.3);
}

.siswa-card .feature-icon-badge {
  background: linear-gradient(135deg, #2563EB, #3B82F6);
  color: #FFFFFF;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.feature-badge-top {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  text-transform: uppercase;
}

.guru-card .feature-badge-top {
  background-color: var(--status-hadir-bg);
  color: #065F46;
}

.siswa-card .feature-badge-top {
  background-color: var(--status-sakit-bg);
  color: #1E40AF;
}

.feature-card-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.feature-card-desc {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.35;
  flex-grow: 1;
}

.feature-card-footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #E2E8F0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  font-weight: 700;
}

.guru-card .feature-card-footer {
  color: var(--bsi-teal-dark);
}

.siswa-card .feature-card-footer {
  color: #1D4ED8;
}

/* ==========================================================================
   QUICK SERVICE GRID (BSI STYLE 4 COLUMNS)
   ========================================================================== */
.bsi-service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 0 16px;
  margin-bottom: 22px;
}

.service-item-btn {
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  text-align: center;
  padding: 6px 2px;
}

.service-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #FFFFFF;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--bsi-teal);
  border: 1px solid #EDF2F7;
  transition: all 0.2s ease;
}

.service-item-btn:hover .service-icon-circle {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background-color: var(--bsi-teal-soft);
}

.service-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

/* ==========================================================================
   TODAY RECENT ATTENDANCE FEED (FULL COLOR NAN BERSIH BERKORAK NU)
   ========================================================================== */
.attendance-feed-wrap {
  padding: 0 16px;
  margin-bottom: 20px;
}

.feed-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.feed-filter-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.pill-tab {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  background-color: #E2E8F0;
  color: var(--text-secondary);
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.2s;
}

.pill-tab.active {
  background-color: var(--bsi-teal);
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 130, 114, 0.25);
}

/* Attendance Card Item */
.feed-card {
  background: #FFFFFF;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #EDF2F7;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transition: 0.2s ease;
}

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

.feed-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #008272, #10B981);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
  border: 2px solid #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.feed-avatar.female {
  background: linear-gradient(135deg, #8B5CF6, #EC4899);
}

.feed-details {
  flex: 1;
  min-width: 0;
}

.feed-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-sub {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 1px;
}

.feed-time-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 10.5px;
  color: var(--text-muted);
}

.feed-status-side {
  text-align: right;
  flex-shrink: 0;
}

/* Clean Full Color NU Badges */
.status-badge-nu {
  display: inline-block;
  padding: 4px 9px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  text-transform: capitalize;
  letter-spacing: 0.2px;
}

.status-badge-nu.tepat-waktu,
.status-badge-nu.hadir-tepat-waktu {
  background-color: var(--status-hadir-bg);
  color: #065F46;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge-nu.lambat {
  background-color: var(--status-lambat-bg);
  color: #92400E;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-badge-nu.sakit {
  background-color: var(--status-sakit-bg);
  color: #1E40AF;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.status-badge-nu.idzin,
.status-badge-nu.izin,
.status-badge-nu.cuti {
  background-color: var(--status-izin-bg);
  color: #5B21B6;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.status-badge-nu.alpha {
  background-color: var(--status-alpha-bg);
  color: #991B1B;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ==========================================================================
   BOTTOM NAVIGATION BAR (FLOATING ROUNDED BSI STYLE)
   ========================================================================== */
.bsi-bottom-nav {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 28px);
  max-width: 580px;
  height: 68px;
  background: #FFFFFF;
  border-radius: 30px; /* Floating rounded bar */
  box-shadow: 0 10px 30px rgba(0, 70, 60, 0.15);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  padding: 0 12px;
  border: 1.5px solid rgba(0, 163, 157, 0.15);
  backdrop-filter: blur(12px);
}

.nav-item-btn {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  text-decoration: none;
}

.nav-item-btn i,
.nav-item-btn svg {
  font-size: 20px;
  transition: 0.2s;
}

.nav-item-btn:hover {
  color: var(--bsi-teal);
}

.nav-item-btn.active {
  color: var(--bsi-teal);
}

.nav-item-btn.active i,
.nav-item-btn.active svg {
  transform: scale(1.1);
  color: var(--bsi-teal);
}

/* Central WhatsApp Highlight Button */
.nav-item-wa {
  color: #10B981;
}

.nav-item-wa:hover {
  color: #059669;
}

/* ==========================================================================
   MODALS, SHEETS & VIEWS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  animation: modalPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-card.modal-lg {
  max-width: 780px;
}

@keyframes modalPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid #E2E8F0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: #FFFFFF;
  z-index: 10;
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}

.modal-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--bsi-teal-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close-btn {
  background: #F1F5F9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-secondary);
  transition: 0.2s;
}

.modal-close-btn:hover {
  background: #E2E8F0;
  color: var(--text-primary);
}

.modal-body {
  padding: 18px 20px;
  overflow-y: auto;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid #E2E8F0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background-color: #F8FAFC;
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

/* Form Styles */
.form-group {
  margin-bottom: 14px;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-label .required {
  color: #EF4444;
  margin-left: 2px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid #CBD5E1;
  font-size: 13.5px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
  background-color: #FFFFFF;
}

.form-control:focus {
  border-color: var(--bsi-teal);
  box-shadow: 0 0 0 3px rgba(0, 163, 157, 0.15);
}

/* Password Box With Eye Toggle */
.password-box-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-box-wrap .form-control {
  padding-right: 44px;
}

.eye-toggle-btn {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: 0.2s;
}

.eye-toggle-btn:hover {
  color: var(--bsi-teal);
  background-color: #F1F5F9;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, var(--bsi-teal), var(--bsi-teal-light));
  color: #FFFFFF;
  box-shadow: 0 4px 10px rgba(0, 130, 114, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--bsi-teal-dark), var(--bsi-teal));
}

.btn-secondary {
  background: #E2E8F0;
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: #CBD5E1;
}

.btn-orange {
  background: linear-gradient(135deg, #F59E0B, #EB690B);
  color: #FFFFFF;
  box-shadow: 0 4px 10px rgba(235, 105, 11, 0.25);
}

.btn-danger {
  background: #EF4444;
  color: #FFFFFF;
}

.btn-success {
  background: #10B981;
  color: #FFFFFF;
}

.btn-block {
  width: 100%;
}

/* ==========================================================================
   SIDEBAR DRAWER (ADMIN DASHBOARD MENU 3 BARIS)
   ========================================================================== */
.admin-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(3px);
  z-index: 1000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.admin-drawer-overlay.active {
  display: block;
  opacity: 1;
}

.admin-drawer {
  position: fixed;
  top: 0;
  left: -320px;
  width: 300px;
  height: 100%;
  background: #FFFFFF;
  z-index: 1001;
  box-shadow: 5px 0 25px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.admin-drawer.active {
  left: 0;
}

.drawer-header {
  background: linear-gradient(135deg, var(--bsi-teal-dark), var(--bsi-teal));
  color: #FFFFFF;
  padding: 22px 18px;
  position: relative;
}

.drawer-brand {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.drawer-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 2px;
}

.drawer-close-btn {
  position: absolute;
  top: 16px;
  right: 14px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #FFFFFF;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
}

.drawer-menu-list {
  padding: 12px 10px;
  flex: 1;
}

.drawer-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: 0.2s;
  margin-bottom: 3px;
}

.drawer-menu-item:hover, .drawer-menu-item.active {
  background-color: var(--bsi-teal-soft);
  color: var(--bsi-teal-dark);
}

.drawer-menu-item i,
.drawer-menu-item svg {
  font-size: 17px;
  width: 22px;
  color: var(--bsi-teal);
  text-align: center;
}

.drawer-menu-category {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 10px 14px 4px 14px;
  letter-spacing: 0.5px;
}

.drawer-footer {
  padding: 14px;
  border-top: 1px solid #E2E8F0;
  background-color: #F8FAFC;
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
}

/* ==========================================================================
   VIEW PANELS (PAGE SECTIONS)
   ========================================================================== */
.view-panel {
  display: none;
}

.view-panel.active {
  display: block;
}

/* ==========================================================================
   CAMERA BARCODE SCANNER (FOR SISWA)
   ========================================================================== */
.scanner-viewport-wrap {
  position: relative;
  width: 100%;
  background: #000000;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 12px;
  min-height: 260px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

#reader {
  width: 100% !important;
  border: none !important;
}

#reader video {
  width: 100% !important;
  border-radius: var(--radius-md) !important;
}

.scan-target-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  border: 2px dashed #10B981;
  border-radius: 16px;
  pointer-events: none;
  box-shadow: 0 0 0 2000px rgba(0, 0, 0, 0.45);
}

.scan-laser-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #10B981, transparent);
  box-shadow: 0 0 8px #10B981;
  animation: scanLaser 2s infinite ease-in-out;
}

@keyframes scanLaser {
  0% { top: 10%; opacity: 0.4; }
  50% { top: 85%; opacity: 1; }
  100% { top: 10%; opacity: 0.4; }
}

.camera-controls-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.scan-result-card {
  background: #FFFFFF;
  border-radius: var(--radius-md);
  padding: 14px;
  border: 1.5px solid var(--status-hadir);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: cardSlideUp 0.3s ease;
}

@keyframes cardSlideUp {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   OFFICIAL A4 PRINT STYLING (FOR KOP & OFFICIAL DOWNLOAD CENTER)
   ========================================================================== */
.a4-preview-container {
  background: #FFFFFF;
  padding: 22px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  color: #1E293B;
  max-width: 820px;
  margin: 0 auto;
}

.pdf-page-sheet {
  background: #FFFFFF;
  padding: 24px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 15px rgba(0,0,0,0.06);
  border: 1px solid #CBD5E1;
  margin-bottom: 26px;
  page-break-inside: avoid;
}

.page-break {
  page-break-before: always !important;
  break-before: page !important;
  margin-top: 24px;
}

.kop-official {
  border-bottom: 3.5px double #008272;
  padding-bottom: 12px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.kop-logo-img {
  width: 75px;
  height: 75px;
  object-fit: contain;
  flex-shrink: 0;
}

.kop-text-wrap {
  flex: 1;
}

.kop-line-1 {
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 2px;
  letter-spacing: 0.5px;
  color: #006C5F;
}

.kop-line-2 {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 2px;
  color: #0F172A;
}

.kop-line-3 {
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 2px;
  color: #475569;
}

.kop-line-4, .kop-line-5 {
  font-size: 10px;
  margin-bottom: 1px;
  color: #64748B;
}

/* Report Status Pills Full Color */
.report-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.pill-tepat { background: #D1FAE5; color: #065F46; border: 1px solid #A7F3D0; }
.pill-lambat { background: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; }
.pill-pulang-tepat { background: #CCFBF1; color: #115E59; border: 1px solid #99F6E4; }
.pill-pulang-cepat { background: #FFE4E6; color: #9F1239; border: 1px solid #FECDD3; }
.pill-idzin { background: #E0F2FE; color: #075985; border: 1px solid #BAE6FD; }
.pill-sakit { background: #EEF2FF; color: #3730A3; border: 1px solid #C7D2FE; }
.pill-alpha { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }

/* Podium Highlights for Leaderboard */
.podium-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 12px;
  align-items: flex-end;
  margin: 18px 0;
}

.podium-card {
  border-radius: 18px;
  padding: 16px 12px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.podium-card.rank-1 {
  background: linear-gradient(180deg, #FEF3C7 0%, #FFFFFF 100%);
  border: 2.5px solid #F59E0B;
  order: 2;
  transform: translateY(-8px);
}

.podium-card.rank-2 {
  background: linear-gradient(180deg, #F1F5F9 0%, #FFFFFF 100%);
  border: 2px solid #94A3B8;
  order: 1;
}

.podium-card.rank-3 {
  background: linear-gradient(180deg, #FFEDD5 0%, #FFFFFF 100%);
  border: 2px solid #D97706;
  order: 3;
}

/* Official Document Signature Section */
.doc-signature-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
  page-break-inside: avoid;
}

.doc-signature-box {
  width: 250px;
  text-align: center;
  font-size: 11px;
}

.doc-stamp-area {
  height: 75px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.barcode-stamp-img {
  height: 65px;
  width: 65px;
  object-fit: contain;
}

.doc-headmaster-name {
  font-weight: 800;
  text-decoration: underline;
  margin-top: 4px;
}

/* Class Filter Pills */
.class-filter-pill {
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 700;
  border: 1.5px solid #CBD5E1;
  background: #FFFFFF;
  color: var(--text-primary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.class-filter-pill:hover {
  border-color: var(--bsi-teal);
  color: var(--bsi-teal);
}

.class-filter-pill.active {
  background: linear-gradient(135deg, var(--bsi-teal), var(--bsi-teal-light));
  color: #FFFFFF;
  border-color: var(--bsi-teal-dark);
  box-shadow: 0 2px 8px rgba(0, 163, 157, 0.25);
}

/* ==========================================================================
   KARTU TANDA PELAJAR DIGITAL (UKURAN STANDAR KTP / ISO ID-1: 85.6mm x 54mm)
   ========================================================================== */
.ktp-student-card {
  width: 336px;
  height: 212px;
  background: linear-gradient(135deg, #004D40 0%, #006C5F 45%, #008272 100%);
  border: 2px solid #F59E0B;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  color: #FFFFFF;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  user-select: none;
  page-break-inside: avoid;
  margin: 0 auto;
}

.ktp-student-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.18) 0%, rgba(245, 158, 11, 0) 70%);
  pointer-events: none;
}

.ktp-student-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 55%;
  background: radial-gradient(circle at 10% 90%, rgba(255,255,255,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.ktp-card-header {
  min-height: 52px;
  padding: 4px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 2.5px double #F59E0B;
  background: rgba(0, 36, 28, 0.45);
  position: relative;
  z-index: 2;
  box-sizing: border-box;
}

.ktp-header-logo {
  width: 36px;
  height: 36px;
  background: #FFFFFF;
  border-radius: 50%;
  padding: 2px;
  object-fit: contain;
  box-shadow: 0 0 0 1.5px #F59E0B;
  flex-shrink: 0;
}

.ktp-header-text {
  flex: 1;
  line-height: 1.15;
  overflow: hidden;
}

.ktp-header-line1 {
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #FFFFFF;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ktp-header-line2 {
  font-size: 9px;
  font-weight: 900;
  color: #FDE68A;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ktp-header-line3 {
  font-size: 6.2px;
  font-weight: 700;
  color: #A7F3D0;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ktp-header-line4 {
  font-size: 5.6px;
  font-weight: 600;
  color: #E2E8F0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ktp-header-line5 {
  font-size: 5.4px;
  font-weight: 500;
  color: #CBD5E1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ktp-card-body {
  flex: 1;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 2;
  box-sizing: border-box;
}

.ktp-photo-col {
  width: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.ktp-photo-box {
  width: 58px;
  height: 72px;
  border-radius: 6px;
  border: 1.5px solid #F59E0B;
  background: #FFFFFF;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.ktp-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ktp-photo-placeholder {
  font-size: 24px;
  color: #006C5F;
}

.ktp-status-pill {
  font-size: 6.5px;
  font-weight: 800;
  background: #10B981;
  color: #FFFFFF;
  padding: 1px 5px;
  border-radius: 4px;
  margin-top: 3px;
  letter-spacing: 0.5px;
}

.ktp-info-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2.5px;
  font-size: 8px;
  line-height: 1.2;
  overflow: hidden;
}

.ktp-info-name {
  font-size: 10.5px;
  font-weight: 900;
  color: #FFFFFF;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ktp-info-row {
  display: flex;
  gap: 4px;
}

.ktp-info-label {
  width: 50px;
  color: #CBD5E1;
  font-weight: 600;
  flex-shrink: 0;
}

.ktp-info-val {
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ktp-info-val.highlight {
  color: #FDE68A;
}

.ktp-qr-col {
  width: 72px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.ktp-qr-box {
  background: #FFFFFF;
  padding: 3px;
  border-radius: 6px;
  border: 1.5px solid #F59E0B;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 66px;
  height: 66px;
}

.ktp-qr-box img, .ktp-qr-box canvas {
  width: 60px !important;
  height: 60px !important;
}

.ktp-qr-label {
  font-size: 6.5px;
  font-weight: 800;
  color: #FDE68A;
  margin-top: 2px;
  letter-spacing: 0.5px;
}

.ktp-qr-code-text {
  font-size: 6.5px;
  font-family: monospace;
  font-weight: 800;
  color: #E2E8F0;
}

.ktp-card-footer {
  height: 16px;
  padding: 0 10px;
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid rgba(245, 158, 11, 0.4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 6.5px;
  color: #CBD5E1;
  position: relative;
  z-index: 2;
}

/* Printable KTP Grid Sheet for A4 */
.ktp-print-sheet {
  background: #FFFFFF;
  padding: 10mm 8mm;
  page-break-after: always;
  break-after: page;
}

.ktp-print-grid {
  display: grid;
  grid-template-columns: repeat(2, 85.6mm);
  gap: 8mm 10mm;
  justify-content: center;
  align-items: center;
}

.ktp-cut-guide {
  position: relative;
  border: 1px dashed #CBD5E1;
  padding: 2px;
  border-radius: 14px;
}

/* Native Print Override for A4 Full Color */
@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  body {
    background-color: #FFFFFF !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .app-container,
  .bsi-bottom-nav,
  .bsi-header,
  .modal-header,
  .modal-footer,
  .toast-container,
  .no-print {
    display: none !important;
  }
  #printPdfContainer {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .pdf-page-sheet {
    box-shadow: none !important;
    border: 1px solid #CBD5E1 !important;
    padding: 16px !important;
    margin-bottom: 0 !important;
  }
  .pdf-page-sheet.page-break {
    page-break-before: always !important;
    break-before: page !important;
  }
  .ktp-student-card {
    width: 85.6mm !important;
    height: 53.98mm !important;
    max-width: 85.6mm !important;
    max-height: 53.98mm !important;
    box-shadow: none !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  @page {
    size: A4 portrait;
    margin: 8mm 10mm;
  }
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: 90%;
  max-width: 420px;
}

.toast {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: #1E293B;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.3s ease;
  pointer-events: auto;
}

.toast.success { background: #065F46; border-left: 4px solid #10B981; }
.toast.error { background: #991B1B; border-left: 4px solid #EF4444; }
.toast.warning { background: #92400E; border-left: 4px solid #F59E0B; }

@keyframes toastIn {
  0% { transform: translateY(-20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* ==========================================================================
   MULTI-BRANCH GPS SETTINGS STYLING
   ========================================================================== */
.gps-branch-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}

.gps-branch-card:hover {
  border-color: #CBD5E1;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.gps-branch-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #F1F5F9;
}

.gps-branch-badge {
  background: #E0F2FE;
  color: #0369A1;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
}

.btn-remove-branch {
  background: #FEE2E2;
  color: #B91C1C;
  border: 1px solid #FCA5A5;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-remove-branch:hover {
  background: #FECACA;
}

/* ==========================================================================
   JURNAL & NILAI UI COMPONENTS
   ========================================================================== */
.jurnal-att-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-bottom: 1px solid #F1F5F9;
  background: #FFFFFF;
  border-radius: 8px;
  margin-bottom: 4px;
  gap: 8px;
}

.jurnal-att-row:nth-child(even) {
  background: #F8FAFC;
}

.jurnal-att-name {
  font-size: 12px;
  font-weight: 700;
  color: #1E293B;
  flex: 1;
}

.jurnal-att-nisn {
  font-size: 10.5px;
  color: #64748B;
}

.jurnal-att-pill-group {
  display: flex;
  gap: 4px;
}

.att-pill-btn {
  padding: 4px 8px;
  min-width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  color: #64748B;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.att-pill-btn:hover {
  background: #F1F5F9;
  border-color: #94A3B8;
}

.att-pill-btn.active-H {
  background: #10B981;
  color: #FFFFFF;
  border-color: #059669;
}

.att-pill-btn.active-S {
  background: #F59E0B;
  color: #FFFFFF;
  border-color: #D97706;
}

.att-pill-btn.active-I {
  background: #3B82F6;
  color: #FFFFFF;
  border-color: #2563EB;
}

.att-pill-btn.active-A {
  background: #EF4444;
  color: #FFFFFF;
  border-color: #DC2626;
}

/* Jurnal 2x Attendance States */
.att-pill-btn.active-tepat {
  background: #10B981 !important;
  color: #FFFFFF !important;
  border-color: #059669 !important;
  font-weight: 800;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.25);
}

.att-pill-btn.active-lambat {
  background: #F59E0B !important;
  color: #FFFFFF !important;
  border-color: #D97706 !important;
  font-weight: 800;
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.25);
}

.att-pill-btn.active-sakit {
  background: #3B82F6 !important;
  color: #FFFFFF !important;
  border-color: #2563EB !important;
  font-weight: 800;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.25);
}

.att-pill-btn.active-idzin {
  background: #8B5CF6 !important;
  color: #FFFFFF !important;
  border-color: #7C3AED !important;
  font-weight: 800;
  box-shadow: 0 2px 4px rgba(139, 92, 246, 0.25);
}

.att-pill-btn.active-alpha {
  background: #EF4444 !important;
  color: #FFFFFF !important;
  border-color: #DC2626 !important;
  font-weight: 800;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.25);
}

.att-pill-btn.active-selesai {
  background: #0284C7 !important;
  color: #FFFFFF !important;
  border-color: #0369A1 !important;
  font-weight: 800;
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.25);
}

.att-pill-btn.active-sebagian {
  background: #64748B !important;
  color: #FFFFFF !important;
  border-color: #475569 !important;
  font-weight: 800;
  box-shadow: 0 2px 4px rgba(100, 116, 139, 0.25);
}

/* Pulsing Live Indicator for Timeline Cards */
.live-pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10B981;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-green 1.8s infinite;
}

@keyframes pulse-green {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.jurnal-grade-row {
  display: grid;
  grid-template-columns: 2fr 75px 1.5fr;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid #F1F5F9;
  background: #FFFFFF;
  border-radius: 8px;
  margin-bottom: 4px;
}

.jurnal-grade-row:nth-child(even) {
  background: #F8FAFC;
}

.jurnal-grade-input {
  text-align: center;
  font-weight: 800;
  color: #1E293B;
  padding: 6px 4px;
  font-size: 13px;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
}

/* ==========================================================================
   PODIUM JUARA VISUAL & LEADERBOARD PERINGKAT
   ========================================================================== */
.podium-container {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 12px;
  margin: 24px 0 16px 0;
  padding: 0 10px;
}

.podium-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 30%;
  max-width: 140px;
}

.podium-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 6px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
  border: 3px solid #FFFFFF;
}

.podium-block {
  width: 100%;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 8px 4px;
}

.podium-1 {
  order: 2;
}

.podium-1 .podium-avatar {
  background: linear-gradient(135deg, #F59E0B, #FBBF24);
  width: 60px;
  height: 60px;
  font-size: 30px;
}

.podium-1 .podium-block {
  height: 105px;
  background: linear-gradient(180deg, #F59E0B, #D97706);
}

.podium-2 {
  order: 1;
}

.podium-2 .podium-avatar {
  background: linear-gradient(135deg, #94A3B8, #CBD5E1);
}

.podium-2 .podium-block {
  height: 75px;
  background: linear-gradient(180deg, #94A3B8, #64748B);
}

.podium-3 {
  order: 3;
}

.podium-3 .podium-avatar {
  background: linear-gradient(135deg, #D97706, #B45309);
}

.podium-3 .podium-block {
  height: 55px;
  background: linear-gradient(180deg, #CD7F32, #A0522D);
}

.podium-name {
  font-size: 11.5px;
  font-weight: 800;
  color: #1E293B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.podium-score {
  font-size: 11px;
  font-weight: 700;
  color: #008272;
}

.leaderboard-rank-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
}

.rank-gold {
  background: #FEF3C7;
  color: #B45309;
  border: 1px solid #FDE68A;
}

.rank-silver {
  background: #F1F5F9;
  color: #475569;
  border: 1px solid #CBD5E1;
}

.rank-bronze {
  background: #FFEDD5;
  color: #9A3412;
  border: 1px solid #FDBA74;
}

.rank-other {
  background: #F8FAFC;
  color: #64748B;
  border: 1px solid #E2E8F0;
}

/* Page Break Helper for Multi-Page Official A4 Print */
.page-break {
  page-break-before: always;
  break-before: page;
  margin-top: 24px;
  padding-top: 14px;
}

/* ==========================================================================
   BEYOND BSI RESPONSIVE MULTI-COLUMN GRIDS & ELEVATED STYLES (HP & LAPTOP)
   ========================================================================== */
.jurnal-menu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  width: 100%;
}

@media (min-width: 992px) {
  .jurnal-menu-grid {
    grid-template-columns: 1fr 1.25fr;
    gap: 22px;
    align-items: start;
  }
}

.download-center-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: 100%;
}

@media (min-width: 992px) {
  .download-center-grid {
    grid-template-columns: 390px 1fr;
    gap: 24px;
    align-items: start;
  }
  .download-controls-col {
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
  }
}

.public-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  width: 100%;
}

@media (min-width: 768px) {
  .public-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(460px, 1fr));
    gap: 20px;
  }
}

/* Elevated Beyond BSI Floating Bottom Nav with Frosted Glass */
.bsi-bottom-nav {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(0, 130, 114, 0.12);
  box-shadow: 0 12px 35px rgba(0, 70, 60, 0.16);
  transition: all 0.3s ease;
}

/* Modern Card Glow and Interactive Polish */
.modal-card {
  border: 1px solid rgba(0, 130, 114, 0.08);
  box-shadow: 0 4px 18px rgba(0, 70, 60, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (hover: hover) {
  .modal-card:hover {
    box-shadow: 0 8px 26px rgba(0, 70, 60, 0.09);
  }
}

/* Elevated Table Styling */
.table-modern {
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #E2E8F0;
  background: #FFFFFF;
}

.table-modern thead th {
  background: #F8FAFC;
  color: #475569;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #E2E8F0;
}

.table-modern tbody tr {
  transition: background 0.15s ease;
}

.table-modern tbody tr:hover {
  background: #F1F5F9;
}

/* ==========================================================================
   SLIDING & SWIPABLE ATTENDANCE CONTROLS & AUTO-FILL STYLES
   ========================================================================== */
.att-scroll-track {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 3px 2px;
  cursor: grab;
  user-select: none;
  scroll-snap-type: x mandatory;
}

.att-scroll-track:active {
  cursor: grabbing;
}

.att-scroll-track::-webkit-scrollbar {
  display: none;
}

.att-scroll-track .att-pill-btn {
  scroll-snap-align: start;
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 10px;
  padding: 3px 7px;
  border-radius: 8px;
  font-weight: 700;
  height: 26px;
  line-height: 1;
}

/* Mini Slider Range for Digeser */
.att-range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 4px;
  background: #E2E8F0;
  outline: none;
  transition: all 0.2s ease;
  cursor: pointer;
  margin: 4px 0 2px 0;
}

.att-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #008272;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 130, 114, 0.4);
  border: 2px solid #FFFFFF;
  transition: transform 0.15s ease, background 0.2s ease;
}

.att-range-slider::-webkit-slider-thumb:hover,
.att-range-slider::-webkit-slider-thumb:active {
  transform: scale(1.25);
  background: #00A39D;
}

.att-range-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #008272;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 130, 114, 0.4);
  border: 2px solid #FFFFFF;
}

/* Auto-fill Flash Animation */
@keyframes autoFillFlash {
  0% {
    background-color: #FEF08A !important;
    border-color: #EAB308 !important;
    transform: scale(1.03);
  }
  100% {
    background-color: #FFFFFF;
    border-color: #CBD5E1;
    transform: scale(1);
  }
}

.auto-filled-flash {
  animation: autoFillFlash 0.45s ease;
}

/* ==========================================================================
   MENU HAPUS DATA & SUPERVISI GURU STYLES
   ========================================================================== */

.nav-item-btn.nav-item-danger {
  color: #DC2626 !important;
}

.nav-item-btn.nav-item-danger:hover {
  color: #B91C1C !important;
  background: rgba(239, 68, 68, 0.08);
}

.supervisi-item-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.supervisi-item-card:hover {
  border-color: #C4B5FD;
  box-shadow: 0 4px 14px rgba(109, 40, 217, 0.08);
}

.supervisi-item-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.supervisi-item-num {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, #6D28D9, #8B5CF6);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.supervisi-item-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #1E293B;
  line-height: 1.35;
}

.supervisi-item-category {
  font-size: 10.5px;
  color: #6D28D9;
  background: #F5F3FF;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
  display: inline-block;
  margin-top: 3px;
}

.supervisi-inputs-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px;
  align-items: center;
}

@media (max-width: 580px) {
  .supervisi-inputs-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.supervisi-select-hasil {
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 10px;
  padding: 8px 10px;
  transition: all 0.2s ease;
}

.supervisi-select-hasil.terlaksana {
  background-color: #F0FDF4;
  border-color: #86EFAC;
  color: #166534;
}

.supervisi-select-hasil.belum {
  background-color: #FEF2F2;
  border-color: #FECACA;
  color: #991B1B;
}

/* Print Sheet A4 Supervisi */
@media print {
  .no-print-supervisi {
    display: none !important;
  }
  .print-page-a4 {
    background: #FFFFFF !important;
    padding: 20mm 15mm !important;
    font-size: 12pt !important;
    color: #000000 !important;
  }
}

/* ==========================================================================
   RESPONSIVE LAYOUT FOR LAPTOP & HP ADAPTIVITY (FLEKSIBEL HP & LAPTOP)
   ========================================================================== */
@media (max-width: 440px) {
  .bsi-bottom-nav {
    width: calc(100% - 16px);
    padding: 0 4px;
    height: 64px;
    bottom: 8px;
    border-radius: 24px;
  }
  .nav-item-btn {
    padding: 3px 6px;
    font-size: 10px;
    gap: 2px;
  }
  .nav-item-btn span:first-child {
    font-size: 18px !important;
  }
}

@media (max-width: 360px) {
  .nav-item-btn {
    padding: 2px 3px;
    font-size: 9px;
  }
  .nav-item-btn span:first-child {
    font-size: 16px !important;
  }
}

/* Responsive Laptop & Desktop Split Grids */
@media (min-width: 992px) {
  .laptop-split-grid {
    display: grid;
    grid-template-columns: 460px 1fr;
    gap: 24px;
    align-items: start;
  }
  .laptop-supervisi-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 24px;
    align-items: start;
  }
}

/* Fluid Responsive Form Helpers on Mobile */
@media (max-width: 480px) {
  .section-title {
    font-size: 11px;
    padding: 0 4px 6px 4px;
  }
}

/* ==========================================================================
   ELEGANT COMPACT MOBILE HP OPTIMIZATIONS (LEBIH KECIL, RAMPING & INDAH)
   ========================================================================== */
@media (max-width: 600px) {
  /* Container & Views */
  .app-container {
    padding-bottom: 74px;
  }
  .view-panel {
    padding: 0 10px 16px 10px !important;
  }

  /* Compact BSI Header on Mobile */
  .bsi-header {
    margin: 8px 10px 0 10px !important;
    padding: 14px 14px 12px 14px !important;
    border-radius: 20px !important;
  }
  .salam-text {
    font-size: 11px !important;
    gap: 4px !important;
    margin-bottom: 2px !important;
  }
  .user-name-title {
    font-size: 16.5px !important;
    letter-spacing: 0.3px !important;
    margin-bottom: 2px !important;
  }
  .sub-tagline {
    font-size: 10.5px !important;
    margin-bottom: 6px !important;
  }
  .header-clock {
    font-size: 9.5px !important;
    padding: 2px 10px !important;
  }

  /* Compact Cards across all Features */
  .modal-card {
    border-radius: 16px !important;
    margin-bottom: 12px !important;
  }
  .modal-header {
    padding: 10px 12px !important;
  }
  .modal-header .modal-title {
    font-size: 12px !important;
  }
  .modal-body {
    padding: 12px !important;
  }

  /* Compact Inputs & Form Controls */
  .form-group {
    margin-bottom: 10px !important;
  }
  .form-label {
    font-size: 11px !important;
    margin-bottom: 3px !important;
    font-weight: 700 !important;
  }
  .form-control {
    font-size: 12px !important;
    padding: 7px 10px !important;
    min-height: 38px !important;
    height: auto !important;
    border-radius: 10px !important;
  }
  .btn {
    font-size: 12px !important;
    padding: 8px 12px !important;
    border-radius: 10px !important;
  }
  .btn-block {
    padding: 10px 14px !important;
  }

  /* Compact Supervisi Form on HP */
  .supervisi-item-card {
    padding: 10px 10px !important;
    margin-bottom: 8px !important;
    border-radius: 12px !important;
  }
  .supervisi-item-header {
    gap: 8px !important;
    margin-bottom: 6px !important;
  }
  .supervisi-item-num {
    width: 22px !important;
    height: 22px !important;
    font-size: 10.5px !important;
    border-radius: 8px !important;
  }
  .supervisi-item-title {
    font-size: 12px !important;
    line-height: 1.3 !important;
  }
  .supervisi-item-category {
    font-size: 9.5px !important;
    padding: 1px 6px !important;
  }
  .supervisi-inputs-row {
    grid-template-columns: 110px 1fr !important;
    gap: 6px !important;
  }
  .supervisi-select-hasil {
    font-size: 11.5px !important;
    padding: 6px 8px !important;
    min-height: 34px !important;
  }
  .supervisi-input-catatan {
    font-size: 11.5px !important;
    padding: 6px 8px !important;
    min-height: 34px !important;
  }

  /* Compact Tables on HP */
  table {
    font-size: 11px !important;
  }
  th, td {
    padding: 6px 6px !important;
  }

  /* Bottom Navigation Sleek & Compact */
  .bsi-bottom-nav {
    height: 58px !important;
    border-radius: 20px !important;
    bottom: 6px !important;
  }
  .nav-item-btn {
    padding: 2px 4px !important;
    font-size: 9.5px !important;
    gap: 2px !important;
  }
  .nav-item-btn span:first-child {
    font-size: 17px !important;
  }
}
