/* Import Font */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

:root {
  --primary: #007bff;
  --secondary: #6c757d;
  --success: #28a745;
  --danger: #dc3545;
  --warning: #ffc107;
  --info: #17a2b8;
  --light: #f8f9fa;
  --dark: #2c3e50;
  --bg-light: #f4f6f9;
  --card-shadow: 0 0.75rem 1.5rem rgba(18, 38, 63, 0.03);
  --sidebar-width: 260px;
  --header-height: 70px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background-color: var(--bg-light);
  color: #495057;
  min-height: 100vh;
  overflow-x: hidden;
}

/* === 1. LOGIN STYLE === */
.login-container {
  background: #ffffff;
  padding: 3rem 2.5rem;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  width: 90%;
  max-width: 420px;
  text-align: center;
  margin: 5vh auto;
  position: relative;
}
.login-logo {
  width: 100px !important;
  max-width: 40% !important;
  height: auto;
  object-fit: contain;
  margin-bottom: 1.5rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.form-group {
  margin-bottom: 1rem;
  text-align: left;
}
.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.9rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.95rem;
}

/* === 2. LAYOUT DASHBOARD === */
.wrapper {
  display: flex;
  width: 100%;
}

/* --- SIDEBAR FIXED DESKTOP (SCROLL FIX) --- */
.sidebar {
  width: var(--sidebar-width);
  background: var(--dark);
  color: #fff;
  height: 100vh; /* Tinggi Layar Penuh */
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;

  /* FLEXBOX UNTUK SCROLLING */
  display: flex;
  flex-direction: column;
  transition: all 0.3s;
  box-shadow: 4px 0 10px rgba(0, 0, 0, 0.05);
  overflow: hidden; /* Mencegah scrollbar ganda */
}

/* HEADER SIDEBAR (Static) */
.sidebar-header {
  padding: 2rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0; /* Jangan mengecil */
}
.header-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.sidebar-logo {
  width: 80px !important;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  margin: 0;
  display: block;
}
.brand-text {
  text-align: center;
}
.brand-text h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 2px;
  line-height: 1.2;
}
.brand-text p {
  font-size: 0.75rem;
  opacity: 0.7;
  margin: 0;
}

.menu-toggle {
  display: none;
} /* Sembunyi di Desktop */

/* MENU CONTAINER (Scrollable) */
.sidebar-content-wrapper {
  display: flex;
  flex-direction: column;
  flex-grow: 1; /* Mengisi sisa ruang */
  overflow: hidden; /* Bungkus overflow */
  width: 100%;
}

.sidebar-menu-container {
  flex-grow: 1; /* Mengisi ruang tengah */
  overflow-y: auto; /* Scroll jika panjang */
  padding: 1rem;
}
/* Custom Scrollbar */
.sidebar-menu-container::-webkit-scrollbar {
  width: 5px;
}
.sidebar-menu-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-menu li {
  margin-bottom: 0.5rem;
}
.sidebar-menu li a {
  display: flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: 0.3s;
  font-weight: 500;
}
.sidebar-menu li a:hover,
.sidebar-menu li.active a {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
  transform: translateX(5px);
}
.sidebar-menu li a.logout {
  color: #ff6b6b;
  margin-top: 1rem;
  border: 1px solid rgba(255, 107, 107, 0.2);
}
.sidebar-menu li a.logout:hover {
  background: #ff6b6b;
  color: white;
  transform: translateX(5px);
}

/* FOOTER SIDEBAR (Static Bottom) */
.sidebar-footer {
  padding: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.75rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.1);
  flex-shrink: 0; /* Jangan mengecil/hilang */
}
.padiweb-logo {
  width: 90px;
  max-width: 80%;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 10px auto 0;
  opacity: 0.8;
}

/* MAIN CONTENT (OFFSET) */
.main-content {
  width: calc(100% - var(--sidebar-width));
  margin-left: var(--sidebar-width);
  padding: 2rem;
  padding-top: calc(var(--header-height) + 2rem);
  min-height: 100vh;
}
.page-header {
  position: fixed;
  top: 0;
  right: 0;
  width: calc(100% - var(--sidebar-width));
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 900;
  border-bottom: 1px solid #eee;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}
.page-header h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
  margin: 0;
}
.user-badge {
  background: #e9ecef;
  padding: 0.5rem 1rem;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark);
}

/* COMPONENTS */
.card {
  background: #ffffff;
  border-radius: 12px;
  border: none;
  box-shadow: var(--card-shadow);
  margin-bottom: 2rem;
  overflow: hidden;
  width: 100%;
}
.card-header {
  background: #fff;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #f1f1f1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.card-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--dark);
  margin: 0;
}
.card-body {
  padding: 1.5rem;
  overflow-x: auto;
}

.btn {
  border-radius: 8px;
  font-weight: 500;
  padding: 0.6rem 1.2rem;
  display: inline-block;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  text-align: center;
}
.btn-primary {
  background: linear-gradient(45deg, #007bff, #0056b3);
  color: white;
  box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}
.btn-danger {
  background: #dc3545;
  color: white;
}
.btn-warning {
  background: #ffc107;
  color: #212529;
}
.btn-success {
  background: #28a745;
  color: white;
}
.btn-info {
  background: #17a2b8;
  color: white;
}
.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}
.data-table th {
  background: #f8f9fa;
  color: #555;
  font-weight: 600;
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.8rem;
  text-transform: uppercase;
}
.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f1f1f1;
  color: #555;
  font-size: 0.9rem;
}
.badge {
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
}
.badge-success {
  background: var(--success);
}
.badge-warning {
  background: var(--warning);
  color: #333;
}
.badge-danger {
  background: var(--danger);
}
.badge-info {
  background: var(--info);
}
/* =============================================
   MOBILE RESPONSIVE FIXES (TOMBOL FIX)
   ============================================= */
@media (max-width: 992px) {
  .wrapper {
    flex-direction: column !important;
  }

  /* 1. Sidebar Layout */
  .sidebar {
    width: 100% !important;
    height: auto !important;
    min-height: auto !important;
    position: relative !important;
    position: fixed;
    top: 0;
    left: 0;
    padding: 0;
    margin: 0;
    z-index: 1001;
    background: var(--dark);
  }

  /* 2. HEADER */
  .sidebar-header {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 15px 20px !important; /* Area sentuh diperbesar */
    width: 100%;
    position: relative;
    z-index: 1002; /* Header di atas konten */
  }

  .header-brand {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 15px !important;
    width: auto !important;
  }

  .sidebar-logo {
    width: 40px !important;
    margin: 0 !important;
  }
  .brand-text {
    text-align: left !important;
  }

  /* 3. TOMBOL TOGGLE (FIXED Z-INDEX) */
  .menu-toggle {
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
    width: 35px;
    height: 25px; /* Ukuran sedikit diperbesar */
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 9999; /* PALING ATAS */
    pointer-events: auto; /* Pastikan bisa diklik */
  }
  .menu-toggle span {
    width: 100%;
    height: 3px;
    background: #fff;
    border-radius: 2px;
  }

  /* 4. CONTENT WRAPPER (ANIMASI) */
  .sidebar-content-wrapper {
    display: none;
    padding-bottom: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
    width: 100%;
  }

  .sidebar.active .sidebar-content-wrapper {
    display: block !important;
  }

  /* 5. MENU & FOOTER GRID */
  .sidebar-menu {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 15px 20px 0 20px;
    margin-top: 0;
  }
  .sidebar-menu li {
    margin: 0 !important;
    width: 100% !important;
  }
  .sidebar-menu li a {
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    height: 45px;
    padding: 0;
    border-radius: 8px;
    width: 100% !important;
    display: flex;
    align-items: center;
  }
  .sidebar-menu li a.active {
    background: var(--primary);
    color: white;
    transform: none;
  }

  .sidebar-menu li a.logout {
    margin-top: 0 !important;
    height: 45px;
    width: 100% !important;
    border: 1px solid rgba(255, 107, 107, 0.3);
    background: rgba(220, 53, 69, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Footer Bersih */
  .sidebar-footer {
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 2rem 0 1rem 0;
    margin: 0;
    width: 100% !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }
  .sidebar-footer div {
    font-size: 0.7rem;
    opacity: 0.5;
    color: #fff;
  }
  .padiweb-logo {
    width: 60px !important;
    margin: 0 !important;
    opacity: 0.7;
  }

  /* 6. CONTENT */
  .main-content {
    width: 100% !important;
    margin-left: 0 !important;
    padding: 1rem;
    padding-top: 0 !important;
    margin-top: 0 !important;
  }
  .page-header {
    display: none !important;
  }
  .card-body form[style*="display: flex"],
  .card-header form[style*="display: flex"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }
  .card-body form .form-group,
  .card-header form select {
    width: 100% !important;
    margin: 0 !important;
  }
  .card-body form button,
  .card-header form button {
    width: 100% !important;
    margin-top: 5px;
  }
}

/* =========================================
   DASHBOARD NEW LAYOUT (RESPONSIVE)
   ========================================= */

/* 1. GRID STATISTIK (KARTU ATAS) */
.dashboard-stats {
  display: grid;
  /* Auto-fit: Mengisi ruang yang ada, minimal lebar 220px */
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  border: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: transform 0.2s;
  min-width: 0; /* Mencegah overflow flex item */
}
.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
}

.stat-icon-box {
  width: 50px;
  height: 50px; /* Ukuran fix */
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0; /* Jangan mengecil */
}

/* Warna Icon */
.icon-blue {
  background: #e3f2fd;
  color: #007bff;
}
.icon-green {
  background: #e8f5e9;
  color: #28a745;
}
.icon-orange {
  background: #fff3e0;
  color: #ff9800;
}
.icon-red {
  background: #ffebee;
  color: #dc3545;
}
.icon-purple {
  background: #f3e5f5;
  color: #9c27b0;
}
.icon-teal {
  background: #e0f2f1;
  color: #009688;
}
.icon-warning {
  background: #fff3cd;
  color: #856404;
}

.stat-details {
  overflow: hidden; /* Mencegah teks panjang merusak layout */
}
.stat-details h3 {
  font-size: 1.5rem;
  margin: 0;
  color: var(--dark);
  line-height: 1.1;
}
.stat-details p {
  margin: 3px 0 0 0;
  color: #888;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 2. GRID KONTEN UTAMA (KIRI - KANAN) */
.dashboard-content-grid {
  display: grid;
  /* Kolom Kiri 70% (2.5fr), Kanan 30% (1fr) */
  grid-template-columns: 2.5fr 1fr;
  gap: 25px;
  align-items: start; /* Agar kolom kanan tidak melar tingginya */
}

/* Pastikan kolom di dalam grid mengisi penuh */
.left-column,
.right-column {
  width: 100%;
  min-width: 0; /* CSS Grid hack untuk mencegah overflow konten dalam grid */
}

/* 3. LIST GROUP & STATUS */
.list-group {
  list-style: none;
  padding: 0;
  margin: 0;
}
.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  border-bottom: 1px solid #f1f1f1;
}
.list-item:last-child {
  border-bottom: none;
}

.class-badge {
  background: var(--primary);
  color: #fff;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
}

.status-dot {
  height: 10px;
  width: 10px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
}
.status-active {
  background-color: #28a745;
  box-shadow: 0 0 4px #28a745;
}

/* PROGRESS BAR STYLE */
.progress-box {
  text-align: center;
  padding: 15px;
}
.progress-percentage {
  font-size: 2rem;
  font-weight: 800;
  color: var(--success);
  margin-bottom: 5px;
  line-height: 1;
}
.progress-label {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 15px;
}
.progress-track {
  width: 100%;
  height: 10px;
  background-color: #e9ecef;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #28a745, #20c997);
  border-radius: 10px;
  transition: width 1s ease-in-out;
}
.status-detail {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #eee;
  padding-top: 15px;
}
.status-item {
  text-align: center;
  flex: 1;
}
.status-item h4 {
  font-size: 1.1rem;
  margin: 0;
  color: var(--dark);
}
.status-item span {
  font-size: 0.7rem;
  color: #999;
  text-transform: uppercase;
  font-weight: 600;
}
.border-right {
  border-right: 1px solid #eee;
}

/* =============================================
   MOBILE RESPONSIVE FIXES (DASHBOARD KHUSUS)
   ============================================= */
@media (max-width: 992px) {
  /* 1. Ubah Grid Utama Jadi Satu Kolom (Stack) */
  .dashboard-content-grid {
    display: flex; /* Ganti Grid jadi Flex */
    flex-direction: column; /* Susun Atas Bawah */
    gap: 20px;
    width: 100%;
  }

  .left-column,
  .right-column {
    width: 100%; /* Lebar Penuh */
  }

  /* 2. Perbaiki Grid Statistik (Kartu Atas) */
  .dashboard-stats {
    /* Paksa jadi 2 kolom di Tablet/HP Besar */
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px;
  }

  /* 3. Perbaiki Tabel agar bisa discroll horizontal */
  .card-body {
    overflow-x: auto; /* Scroll jika tabel lebar */
  }

  /* 4. Header Kartu Flex Wrap */
  .card-header {
    flex-wrap: wrap;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  /* HP Kecil: Statistik jadi 1 kolom ke bawah */
  .dashboard-stats {
    grid-template-columns: 1fr !important;
  }

  .stat-card {
    padding: 15px;
  }

  .page-header h1 {
    font-size: 1.2rem;
  }

  /* Perkecil Grafik di HP */
  .card-body canvas {
    max-height: 250px !important;
  }
}

/* LIVE MONITORING STYLES */
.badge-live {
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-block;
  min-width: 100px;
  text-align: center;
}
.badge-live.belum {
  background: #e9ecef;
  color: #495057;
  border: 1px solid #ced4da;
}
.badge-live.sedang {
  background: #e3f2fd;
  color: #0d47a1;
  border: 1px solid #bbdefb;
  animation: pulse 2s infinite;
}
.badge-live.melanggar {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
  font-weight: 800;
}
.badge-live.blokir {
  background: #343a40;
  color: #fff;
  border: 1px solid #000;
}
.badge-live.selesai {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}
/* Status Tambahan */
.badge-live.offline {
  background: #f8f9fa;
  color: #6c757d;
  border: 1px dashed #adb5bd;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(13, 71, 161, 0.4);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(13, 71, 161, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(13, 71, 161, 0);
  }
}

.monitor-card {
  text-align: center;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #eee;
  background: #fff;
}
.monitor-number {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 5px;
}
.monitor-label {
  font-size: 0.8rem;
  color: #666;
  text-transform: uppercase;
  font-weight: 600;
}

/* =========================================
   DASHBOARD UPGRADE (HERO & SHORTCUTS)
   ========================================= */

/* 1. HERO BANNER (SAPAAN) */
.dashboard-hero {
  background: linear-gradient(135deg, #003366, #0056b3);
  color: white;
  padding: 2rem;
  border-radius: 16px;
  margin-bottom: 30px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 51, 102, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Hiasan Lingkaran Background */
.dashboard-hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  pointer-events: none;
}
.dashboard-hero::after {
  content: "";
  position: absolute;
  bottom: -50%;
  left: -5%;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  pointer-events: none;
}

.hero-text h2 {
  font-size: 1.8rem;
  margin: 0 0 5px 0;
  font-weight: 700;
}
.hero-text p {
  font-size: 1rem;
  margin: 0;
  opacity: 0.9;
  font-weight: 300;
}
.hero-date {
  text-align: right;
  z-index: 1;
}
.hero-time {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}
.hero-day {
  font-size: 1rem;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* 2. QUICK SHORTCUTS */
.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}
.shortcut-item {
  background: #fff;
  padding: 15px;
  border-radius: 12px;
  text-align: center;
  transition: 0.3s;
  border: 1px solid #f0f0f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  text-decoration: none;
  color: var(--dark);
  display: block;
}
.shortcut-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  border-color: var(--primary);
}
.shortcut-icon {
  width: 45px;
  height: 45px;
  margin: 0 auto 10px auto;
  background: #f8f9fa;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--primary);
  transition: 0.3s;
}
.shortcut-item:hover .shortcut-icon {
  background: var(--primary);
  color: #fff;
}
.shortcut-label {
  font-size: 0.8rem;
  font-weight: 600;
}

/* 3. UPGRADE KARTU STATISTIK (GRADIENT) */
/* Timpa style stat-icon-box yang lama */
.stat-card {
  border: none;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  position: relative;
}
.stat-card::after {
  /* Garis aksen bawah */
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: currentColor;
  opacity: 0.3;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .dashboard-hero {
    flex-direction: column;
    text-align: center;
    gap: 15px;
    padding: 1.5rem;
  }
  .hero-date {
    text-align: center;
  }
  .shortcut-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* DASHBOARD PRO STYLES */

/* 1. Live Stats Grid */
.live-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
}

.live-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  border-left: 5px solid #ccc;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.live-card h3 {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0;
  line-height: 1;
}
.live-card span {
  font-size: 0.85rem;
  font-weight: 600;
  color: #777;
  text-transform: uppercase;
  margin-top: 5px;
}
.live-icon {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 1.5rem;
  opacity: 0.2;
}

/* Warna Live Card */
.live-belum {
  border-color: #6c757d;
}
.live-belum h3 {
  color: #6c757d;
}
.live-sedang {
  border-color: #007bff;
}
.live-sedang h3 {
  color: #007bff;
}
.live-selesai {
  border-color: #28a745;
}
.live-selesai h3 {
  color: #28a745;
}
.live-melanggar {
  border-color: #ffc107;
  background: #fffbf2;
}
.live-melanggar h3 {
  color: #ffc107;
}
.live-blokir {
  border-color: #dc3545;
  background: #fff5f5;
}
.live-blokir h3 {
  color: #dc3545;
}

/* 2. Problem Table */
.problem-table-container {
  border: 1px solid #ffcdd2;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  margin-bottom: 20px;
}
.problem-header {
  background: #ffebee;
  padding: 15px;
  border-bottom: 1px solid #ffcdd2;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.problem-header h2 {
  color: #c62828;
  margin: 0;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Animasi Pulse untuk Pelanggaran */
.row-warning {
  animation: bg-pulse-yellow 2s infinite;
}
.row-danger {
  animation: bg-pulse-red 2s infinite;
}

@keyframes bg-pulse-yellow {
  0% {
    background: #fff;
  }
  50% {
    background: #fffbe6;
  }
  100% {
    background: #fff;
  }
}
@keyframes bg-pulse-red {
  0% {
    background: #fff;
  }
  50% {
    background: #fff5f5;
  }
  100% {
    background: #fff;
  }
}

/* Variabel Warna Profesional */
:root {
  --primary: #4f46e5; /* Indigo Modern */
  --primary-hover: #4338ca;
  --secondary: #64748b;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --bg-light: #f8fafc;
  --border-color: #e2e8f0;
  --text-dark: #1e293b;
  --text-muted: #64748b;
}

body {
  background-color: var(--bg-light);
  color: var(--text-dark);
}

/* Card Modern */
.card-modern {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05),
    0 2px 4px -1px rgba(0, 0, 0, 0.03);
  border: 1px solid var(--border-color);
  margin-bottom: 24px;
  overflow: hidden;
}

.card-header-modern {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
}

.card-body-modern {
  padding: 24px;
}

/* Tombol Modern */
.btn-modern {
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.btn-primary-m {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 5px rgba(79, 70, 229, 0.3);
}
.btn-primary-m:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* Tabel Cantik */
.table-modern {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.table-modern th {
  background: #f1f5f9;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  border-top: 1px solid var(--border-color);
}
.table-modern td {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}
.table-modern tr:last-child td {
  border-bottom: none;
}
.table-modern tr:hover td {
  background-color: #f8fafc;
}

/* Badge Status */
.badge-m {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-blue {
  background: #e0e7ff;
  color: #3730a3;
}
.badge-green {
  background: #dcfce7;
  color: #166534;
}

/* Input Nilai Khusus */
.input-nilai-wrapper {
  position: relative;
}
.form-nilai {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  text-align: center;
  font-weight: 600;
  color: var(--text-dark);
  transition: 0.2s;
}
.form-nilai:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
  outline: none;
}
.catatan-input {
  text-align: left;
}

/* Sticky Column untuk Nama Siswa */
.sticky-col {
  position: sticky;
  left: 0;
  background: white;
  z-index: 10;
  border-right: 2px solid var(--border-color);
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
}
th.sticky-col {
  background: #f8fafc;
  z-index: 20;
}
