/* style-content.css */
:root {
  --primary-color: #0d6efd;
  --bg-color: #f0f2f5;
  --card-radius: 16px;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--bg-color);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  color: #333;
}

/* Navbar Modern - Override */
.navbar {
  background: linear-gradient(135deg, #0d6efd, #0a58ca);
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.2);
}

.navbar-brand h4 {
  font-size: 1.2rem;
  letter-spacing: 0.5px;
}

/* Main Container */
.main-container {
  flex: 1;
  padding: 2rem 1rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* Header Section */
.header-section {
  text-align: center;
  margin-bottom: 30px;
}

.header-section h2 {
  font-weight: 700;
  color: #333;
}

/* Action Bar */
.action-bar {
  background: #fff;
  padding: 20px;
  border-radius: var(--card-radius);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
  justify-content: space-between;
}

.search-wrapper {
  flex-grow: 1;
  position: relative;
  min-width: 250px;
}

.search-input {
  width: 100%;
  padding: 12px 20px 12px 45px;
  border-radius: 50px;
  border: 1px solid #e0e0e0;
  background-color: #f8f9fa;
  transition: all 0.3s;
}

.search-input:focus {
  background-color: #fff;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.1);
  outline: none;
}

.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #aaa;
}

.button-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-action {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  cursor: pointer;
  position: relative;
}

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

/* Tooltip Custom */
.btn-action[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: -35px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 10;
}

.btn-reset {
  background: #dc3545;
}
.btn-download {
  background: #0d6efd;
}
.btn-update {
  background: #198754;
}
.btn-upload {
  background: #ffc107;
  color: #333;
}

/* Table Card */
.table-card {
  background: #fff;
  border-radius: var(--card-radius);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  border: none;
  position: relative;
}

.table-responsive {
  margin-bottom: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  margin-bottom: 0;
  vertical-align: middle;
  white-space: nowrap;
}

.table thead th {
  background-color: #0a58ca;
  color: white;
  font-weight: 600;
  border-bottom: none;
  padding: 15px;
  font-size: 0.95rem;
}

.table tbody td {
  padding: 12px 15px;
  border-bottom: 1px solid #f0f0f0;
  color: #555;
  font-size: 0.9rem;
}

.table tbody tr:hover {
  background-color: #f8f9fa;
}

/* Pagination */
.pagination {
  margin: 20px 0 0 0;
  justify-content: center;
}

.page-link {
  color: var(--primary-color);
  border-radius: 50%;
  margin: 0 3px;
  border: none;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-item.active .page-link {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

/* Modal */
.modal-content {
  border-radius: 15px;
  border: none;
}
.modal-header {
  background: var(--primary-color);
  color: white;
  border-radius: 15px 15px 0 0;
}

/* Footer */
footer {
  background-color: #0a58ca;
  margin-top: auto;
  color: white;
  padding: 1rem 0;
  text-align: center;
}

footer a {
  color: #ffc107;
  text-decoration: none;
}

/* === PERBAIKAN NAVBAR MENTOK & STICKY === */

/* 1. Hilangkan jarak bawaan browser */
body {
  margin: 0 !important;
  padding: 0 !important;
}

/* 2. Setting Header Utama */
header {
  /* Membuat menempel di atas saat scroll */
  position: sticky !important;
  top: 0 !important;
  left: 0;
  width: 100%;
  z-index: 9999; /* Pastikan selalu di paling depan */

  /* Menghilangkan jarak putih akibat class 'py-2' */
  padding: 0 !important;

  /* Memindahkan warna biru ke sini agar full mentok atas */
  background: linear-gradient(135deg, #0d6efd, #0a58ca);
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.2);
}

/* 3. Reset Navbar (karena warna sudah dipindah ke Header) */
.navbar {
  background: transparent !important; /* Hapus background di sini */
  box-shadow: none !important; /* Hapus bayangan di sini */
  padding-top: 10px; /* Beri sedikit napas di dalam */
  padding-bottom: 10px; /* Beri sedikit napas di dalam */
}

/* 4. Pastikan konten utama tidak tertutup jika menggunakan position fixed */
/* Jika sticky tidak jalan, ganti 'position: sticky' di atas menjadi 'position: fixed' */
/* dan aktifkan padding-top di bawah ini: */

/* body {
    padding-top: 0; 
} 
*/

/* Responsive */
@media (max-width: 768px) {
  header img {
    width: 50px !important;
  }
  .navbar-brand h4 {
    font-size: 1rem;
  }
  .action-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .button-group {
    justify-content: center;
    margin-top: 10px;
  }
}
