/* ==========================================
   FONT LOKAL POPPINS (Dari CSS1)
   ========================================== */
@font-face {
  font-family: 'Poppins';
  src: url('/assets/fonts/Poppins-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'AmiriArabic';
  src: url('/assets/fonts/Amiri-Regular.woff2') format('woff2');
}


/* ==========================================
   GLOBAL STYLE (Gabungan)
   ========================================== */
/* Paksa SEMUA TEKS ke Poppins */
body,
p, span, div,
td, th, li,
a, label,
input, textarea, button {
  font-family: 'Poppins', sans-serif,
               "Segoe UI Emoji",
               "Apple Color Emoji",
               "Noto Color Emoji" !important;
}

/* Pulihkan Font Awesome (FA5) */
.fa, .fas, .far, .fab,
i.fa, i.fas, i.far, i.fab {
  font-family: "Font Awesome 5 Free", "Font Awesome 5 Brands" !important;
  font-weight: 900; /* wajib untuk solid icons (fas) */
}


/* Semua variasi bahasa Arab */
[lang|="ar"] {
  font-family: 'AmiriArabic', 'Amiri', serif !important;
  direction: rtl;
  unicode-bidi: isolate;
  font-size: 1.2em;
  font-weight: 600;
}

/* Heading Styles */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #222;
}

/* Links */
a {
  color: #007bff;
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: #0056b3;
  text-decoration: none;
}

/* ==========================================
   CARD STYLING (Dari CSS1)
   ========================================== */
.card {
  background: #fff;
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.card-header {
  background-color: #007bff;
  color: #fff;
  font-weight: 600;
  font-size: 1.1rem;
  border-bottom: none;
}

.card-body {
  background-color: #fff;
  color: #333;
}

.card-title {
  font-weight: 600;
  font-size: 1.1rem;
  color: #222;
}

.card-text {
  font-size: 0.9rem;
  color: #6c757d;
}

/* ==========================================
   BUTTON (Dari CSS1)
   ========================================== */
.btn {
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-primary {
  background-color: #007bff;
  border: none;
  color: #fff;
}
.btn-primary:hover {
  background-color: #0069d9;
  color: #fff;
}

.btn-secondary {
  background-color: #6c757d;
  border: none;
  color: #fff;
}
.btn-secondary:hover {
  background-color: #5a6268;
  color: #fff;
}

.btn-outline-danger {
  border-radius: 8px;
  transition: all 0.2s ease;
}
.btn-outline-danger:hover {
  background-color: #dc3545;
  color: #fff;
  border-color: #dc3545;
}

/* ==========================================
   FORM (Dari CSS1)
   ========================================== */
.form-control {
  border-radius: 8px;
  border: 1px solid #ced4da;
  color: #333;
}

label {
  font-weight: 500;
  color: #333;
}

/* ==========================================
   TABLE (Dari CSS1)
   ========================================== */
.table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: 0.95rem;
  color: #333;
}

.table thead th {
  background-color: #e9ecef;
  color: #333;
  font-weight: 600;
  border-bottom: 2px solid #dee2e6;
}

.table tbody tr:nth-child(odd) {
  background-color: #ffffff;
}
.table tbody tr:nth-child(even) {
  background-color: #f8f9fa;
}

.table tbody tr:hover {
  background-color: #e3f2fd;
  transition: background-color 0.25s ease;
}

/* ==========================================
   HEADER / NAVBAR - WARNA BIRU TEMA ASLI DENGAN ICON EMAS
   ========================================== */
/* Navbar Modern Biru */
.navbar-modern-blue {
  background: linear-gradient(135deg, #1e3a8a, #1e40af) !important;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.15) !important;
  border-bottom: 3px solid rgba(212, 175, 55, 0.3) !important; /* Emas untuk border */
  transition: all 0.3s ease !important;
}

.navbar-modern-blue:hover {
  background: linear-gradient(135deg, #1e40af, #1d4ed8) !important;
  box-shadow: 0 6px 16px rgba(30, 58, 138, 0.2) !important;
}

.navbar-brand {
  font-weight: 700;
  color: #ffffff !important;
  transition: color 0.3s ease !important;
}

.navbar-brand:hover {
  color: #fef3c7 !important; /* Kuning muda untuk hover */
}

.navbar-brand i {
  color: #fbbf24 !important; /* Emas untuk icon brand */
  margin-right: 8px;
}

.navbar-brand .fw-light {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 300;
}

.navbar-text {
  color: rgba(255, 255, 255, 0.9) !important;
  margin-right: 15px !important;
}

.navbar-text i {
  color: #fbbf24 !important; /* Emas untuk icon di navbar text */
  margin-right: 5px;
}

.navbar-text strong {
  color: #ffffff !important;
}

.role-badge {
  background: linear-gradient(135deg, #fbbf24, #f59e0b) !important; /* Gradient emas */
  color: #78350f !important; /* Coklat gelap untuk kontras */
  font-weight: 600;
  padding: 0.25em 0.6em !important; /* Diperkecil */
  border-radius: 10px !important; /* Radius lebih kecil */
  font-size: 0.8rem !important; /* Font lebih kecil */
  border: 1px solid rgba(255, 215, 0, 0.3); /* Border emas transparan */
  margin-left: 6px;
  box-shadow: 0 1px 3px rgba(123, 81, 9, 0.2); /* Shadow lebih kecil */
}

/* TOMBOL LOGOUT DENGAN TEMA MERAH LEBIH KOMPAK */
.btn-logout {
  border: 2px solid #ef4444 !important; /* Border merah solid */
  color: #ffffff !important;
  background: linear-gradient(135deg, #dc2626, #b91c1c) !important; /* Gradient merah solid */
  padding: 0.25rem 0.75rem !important; /* DIKECILKAN: dari 0.4rem 1rem */
  font-weight: 600 !important;
  border-radius: 6px !important; /* Radius lebih kecil */
  transition: all 0.2s ease-in-out !important; /* Animasi lebih cepat */
  text-decoration: none !important;
  position: relative;
  overflow: hidden;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
  box-shadow: 0 3px 5px rgba(220, 38, 38, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  font-size: 0.9rem !important; /* Font sedikit lebih kecil */
  line-height: 1.2 !important; /* Line height lebih ketat */
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 32px !important; /* Tinggi minimum */
}

.btn-logout:hover {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important; /* Gradient merah lebih terang */
  color: #ffffff !important;
  border-color: #f87171 !important; /* Border merah muda */
  transform: translateY(-1px) scale(1.03); /* Efek lebih kecil */
  box-shadow: 0 4px 8px rgba(220, 38, 38, 0.4), 
              0 0 0 2px rgba(239, 68, 68, 0.1), /* Outer glow lebih tipis */
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
  padding: 0.25rem 0.8rem !important; /* Sedikit lebih lebar saat hover */
}

.btn-logout:active {
  transform: translateY(0) scale(1);
  box-shadow: 0 1px 3px rgba(220, 38, 38, 0.3), 
              inset 0 1px 2px rgba(0, 0, 0, 0.2);
  padding: 0.25rem 0.7rem !important; /* Kembali ke ukuran normal */
}

.btn-logout i {
  color: #ffffff !important; /* Putih untuk icon logout */
  margin-right: 6px !important; /* DIKECILKAN: dari 8px */
  transition: all 0.2s ease;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
  font-size: 0.9em !important; /* Icon lebih kecil */
}

.btn-logout:hover i {
  color: #fecaca !important; /* Merah muda saat hover */
  transform: rotate(-5deg) scale(1.05); /* Rotasi lebih kecil */
  animation: logout-shake 0.4s ease-in-out;
}

/* Animasi shake untuk icon logout */
@keyframes logout-shake {
  0%, 100% { transform: rotate(-5deg) scale(1.05); }
  25% { transform: rotate(-8deg) scale(1.05); }
  50% { transform: rotate(-2deg) scale(1.05); }
  75% { transform: rotate(-8deg) scale(1.05); }
}

/* Efek pulsating merah pada tombol logout */
@keyframes red-pulse {
  0% {
    box-shadow: 0 3px 5px rgba(220, 38, 38, 0.3), 
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
  50% {
    box-shadow: 0 3px 8px rgba(220, 38, 38, 0.4), 
                0 0 10px rgba(239, 68, 68, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
  100% {
    box-shadow: 0 3px 5px rgba(220, 38, 38, 0.3), 
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
}

.btn-logout {
  animation: red-pulse 3s infinite;
}

/* Efek glow merah di sekitar tombol */
.btn-logout::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 4px; /* Radius lebih kecil */
  background-color: rgba(239, 68, 68, 0.08); /* Lebih transparan */
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
  z-index: -1;
}

.btn-logout:hover::before {
  width: 110%; /* Lebih kecil */
  height: 110%;
}

/* Navbar Toggler untuk Mobile */
.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.3) !important;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28251, 191, 36, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important; /* Warna emas */
}

.navbar-toggler:hover {
  border-color: #fbbf24 !important; /* Emas */
  background-color: rgba(251, 191, 36, 0.1) !important; /* Background emas transparan */
}

/* Responsive Navbar */
@media (max-width: 991.98px) {
  .navbar-collapse {
    text-align: center;
    border-top: 1px solid rgba(251, 191, 36, 0.2); /* Border emas transparan */
    margin-top: 0.5rem;
    padding-top: 0.5rem;
  }
  
  .navbar-text {
    margin-right: 0 !important;
    margin-bottom: 8px; /* Lebih kecil */
    display: block;
    font-size: 0.95rem; /* Text sedikit lebih kecil */
  }
  
  .btn-logout {
    width: auto !important; /* Tidak full width */
    justify-content: center;
    margin-top: 8px; /* Lebih kecil */
    padding: 0.2rem 0.6rem !important; /* Lebih kecil di mobile */
    font-size: 0.85rem !important; /* Lebih kecil di mobile */
  }
  
  /* Hilangkan efek before pada mobile */
  .btn-logout::before {
    display: none;
  }
  
  .role-badge {
    padding: 0.2em 0.5em !important; /* Lebih kecil di mobile */
    font-size: 0.75rem !important; /* Lebih kecil di mobile */
  }
}

/* Efek tambahan untuk icon emas */
.navbar-brand i.fa-solid {
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.4); /* Glow emas */
}

.navbar-text i.fa-solid {
  animation: subtle-glow 2s infinite alternate;
}

@keyframes subtle-glow {
  from {
    text-shadow: 0 0 5px rgba(251, 191, 36, 0.3);
  }
  to {
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.6);
  }
}

/* Efek tambahan untuk hover navbar text */
.navbar-text:hover {
  color: #fbbf24 !important; /* Warna emas saat hover */
}

/* Kontras untuk "Logout" text */
.btn-logout span {
  font-weight: 700;
  letter-spacing: 0.3px; /* Lebih rapat */
  white-space: nowrap; /* Mencegah wrap */
}

/* Kompensasi margin untuk tombol yang lebih kecil */
.navbar .d-flex {
  gap: 8px !important; /* Jarak antar elemen lebih rapat */
}

/* ==========================================
   UTILITIES (Dari CSS1)
   ========================================== */
.text-muted {
  color: #6c757d !important;
}

.shadow-sm {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}


