/* ============================================================
   E-CLASS STYLE SHEET (Final Version)
   Berlaku untuk seluruh halaman:
   index.php, dashboard-guru.php, dashboard-murid.php, kelas-detail.php
   ============================================================ */

/* ===== Simple custom styles for e-Class prototype ===== */
body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background-color: #f8f9fa;
  color: #212529;
  margin: 0;
  padding: 0;
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Navbar ===== */
.navbar {
  background-color: #ffffff;
  border-bottom: 1px solid #dee2e6;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.navbar-brand {
  font-weight: 600;
}

/* ===== Cards ===== */
.card {
  border-radius: 0.8rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.card-title {
  font-weight: 600;
}

.card-text {
  color: #555;
}

/* ===== Buttons ===== */
.btn-lg, .btn {
  border-radius: 8px;
  transition: all 0.2s ease-in-out;
}

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

.btn-outline-success {
  border-radius: 0.6rem;
  font-weight: 500;
}

.btn-outline-success:hover {
  background-color: #198754;
  color: #fff;
}

.btn-primary {
  background-color: #0d6efd;
  border-color: #0d6efd;
}

.btn-success {
  background-color: #198754;
  border-color: #198754;
}

.btn-outline-secondary {
  border-radius: 8px;
}

/* ===== Layout ===== */
.container {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

main.container {
  animation: fadeIn 0.3s ease;
}

/* ===== Typography ===== */
h3, h4, h5, h6 {
  font-weight: 600;
}

.text-primary {
  color: #0d6efd !important;
}

.text-muted {
  color: #6c757d !important;
}

/* ===== Tables ===== */
.table th, .table td {
  vertical-align: middle;
}

/* ===== Tabs ===== */
.nav-tabs .nav-link {
  color: #0d6efd;
  border-radius: 8px 8px 0 0;
}

.nav-tabs .nav-link:hover {
  background-color: #e9f2ff;
}

.nav-tabs .nav-link.active {
  font-weight: 600;
  background-color: #fff;
  border-color: #0d6efd #0d6efd #fff;
  color: #0d6efd;
}

/* ===== Presensi Table ===== */
form select.form-select-sm {
  width: 150px;
}

/* ===== Index Page ===== */
.index-card {
  max-width: 420px;
  width: 100%;
}

.index-title {
  font-weight: 700;
  color: #0d6efd;
}

hr {
  opacity: 0.2;
}

/* ===== Utilities ===== */
.shadow-sm {
  box-shadow: 0 2px 6px rgba(0,0,0,0.08) !important;
}

.shadow-lg {
  box-shadow: 0 4px 16px rgba(0,0,0,0.15) !important;
}

.fade-in {
  animation: fadeIn 0.4s ease-in-out;
}

/* ===== Footer (optional if used later) ===== */
footer {
  background-color: #fff;
  text-align: center;
  padding: 1rem;
  color: #777;
  border-top: 1px solid #e0e0e0;
  margin-top: 2rem;
}

/* ===== Mobile View ===== */
@media (max-width: 576px) {
  .navbar .me-3 {
    display: none;
  }

  .card {
    margin-bottom: 1rem;
  }
}

/* ============================================================
   BK (Bimbingan Konseling) STYLES
   Berlaku untuk: bk.php & detail_bk.php
   ============================================================ */

/* Container BK */
.bk-container {
  background: #fff;
  border-radius: 0.8rem;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  animation: fadeIn 0.4s ease-in-out;
}

/* Search Bar */
.bk-search {
  max-width: 400px;
  margin-bottom: 1rem;
}

.bk-search input {
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ced4da;
  width: 100%;
}

/* Tabel daftar siswa */
.bk-table th {
  background-color: #0d6efd;
  color: #fff;
  font-weight: 600;
}

.bk-table td {
  vertical-align: middle;
}

/* Tombol detail siswa */
.btn-detail {
  background-color: #198754;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  transition: 0.2s;
}

.btn-detail:hover {
  background-color: #157347;
}

/* Tabel presensi detail siswa */
.presensi-table th {
  background-color: #e9f2ff;
  color: #0d6efd;
  font-weight: 600;
}

/* Back button */
.btn-back {
  background-color: #6c757d;
  color: #fff;
  border-radius: 6px;
  padding: 6px 12px;
}

.btn-back:hover {
  background-color: #5a6268;
}

/* ===== BK Action Links ===== */
.bk-table a {
  transition: color 0.2s ease-in-out;
}

.bk-table a:hover {
  text-decoration: underline;
}

.bk-table a.text-primary:hover {
  color: #0a58ca;
}

.bk-table a.text-success:hover {
  color: #157347;
}

/* ===== Catatan BK ===== */
textarea.form-control {
  border-radius: 8px;
  resize: vertical;
}

.table-danger th {
  background-color: #dc3545 !important;
  color: #fff !important;
}

/* ===== Admin Users Page ===== */
.table-primary th {
  background-color: #0d6efd !important;
  color: #fff !important;
}

a.text-danger:hover {
  color: #bb2d3b !important;
}

a.text-success:hover {
  color: #146c43 !important;
}

/* ============================================================
   KELAS-DETAIL PAGE (Materi, Tugas, Presensi, Nilai)
   Dijadikan satu dengan style.css utama
   ============================================================ */

/* Wrapper utama */
.kelas-wrapper {
  display: flex;
  animation: fadeIn 0.3s ease-in-out;
  min-height: calc(100vh - 70px);
}

/* Sidebar kiri */
.kelas-sidebar {
  width: 240px;
  background: #fff;
  border-right: 1px solid #dee2e6;
  padding: 1.5rem 1rem;
  box-shadow: 2px 0 6px rgba(0,0,0,0.05);
}

.kelas-sidebar h5 {
  font-weight: 700;
  color: #0d6efd;
  margin-bottom: 1rem;
}

.kelas-sidebar a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  color: #333;
  font-weight: 500;
  text-decoration: none;
  margin-bottom: 6px;
  transition: all 0.2s ease;
}

.kelas-sidebar a:hover,
.kelas-sidebar a.active {
  background-color: #e9f2ff;
  color: #0d6efd;
  transform: translateX(3px);
}

/* Konten kanan */
.kelas-content {
  flex: 1;
  padding: 2rem;
}

/* Judul section */
.section-title {
  font-weight: 600;
  color: #0d6efd;
  margin-bottom: 1rem;
}

/* Table styling */
.table-kelas th {
  background-color: #0d6efd !important;
  color: #fff !important;
}

.table-kelas td {
  vertical-align: middle;
}

/* Card style (materi, tugas, presensi) */
.kelas-card, .card-class {
  background-color: #fff;
  border-radius: 0.8rem;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: 0.2s;
  margin-bottom: 1.5rem;
}

.kelas-card:hover, .card-class:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Header info kelas */
.kelas-info {
  padding: 1rem 0;
  border-bottom: 1px solid #ddd;
  margin-bottom: 1.5rem;
}

.kelas-info h4 {
  font-weight: 700;
}

.kelas-info small {
  color: #6c757d;
}

/* List file materi */
.materi-list a {
  color: #0d6efd;
  text-decoration: none;
  font-weight: 500;
}

.materi-list a:hover {
  text-decoration: underline;
}

/* Untuk mobile */
@media (max-width: 768px) {
  .kelas-wrapper {
    flex-direction: column;
  }

  .kelas-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #dee2e6;
    box-shadow: none;
  }
}

/* ============================================================
   ADMIN DASHBOARD STYLES
   Berlaku untuk: admin.php
   ============================================================ */

/* Kartu menu admin */
.menu-card {
  transition: transform 0.2s ease-in-out;
}

.menu-card:hover {
  transform: translateY(-5px);
}

/* Tombol aksi */
.btn-action {
  width: 100%;
}

/* Kartu statistik admin */
.admin-stat-card {
  border-radius: 0.8rem;
  padding: 1.5rem;
  color: #fff;
  text-align: center;
}

/* Modal admin */
#genericModal .modal-content {
  border-radius: 0.8rem;
}

/* Tabel log aktivitas */
#logAktivitas tr td {
  vertical-align: middle;
}

/* ============================================================
   FIX TABEL USER DI kelola-akun.php
   ============================================================ */

.table-users {
  width: 100% !important;
  border-collapse: collapse !important;
  table-layout: auto !important;
}

.table-users thead tr,
.table-users tbody tr {
  display: table-row !important;
  margin: 0 !important;
  padding: 0 !important;
}

.table-users th,
.table-users td {
  display: table-cell !important;
  vertical-align: middle !important;
  padding: 0.55rem 0.75rem !important;
  background: none !important;
  border: 1px solid #dee2e6 !important;
  color: #212529 !important;
  white-space: nowrap;
}

.table-users .badge {
  font-size: 0.75rem !important;
  padding: 0.35em 0.55em !important;
}

.table-users td.text-nowrap {
  white-space: nowrap !important;
}
