/* Government Theme Colors */
:root {
  --government-primary: #1e3c72;
  --government-secondary: #2a5298;
  --government-accent: #ffd700;
  --government-light: #f8f9ff;
  --government-dark: #163056;
}

body {
  background-color: #f4f7f6;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
}

.sidebar-government {
  background: linear-gradient(180deg, var(--government-primary) 0%, var(--government-secondary) 100%);
  box-shadow: 4px 0 15px rgba(30, 60, 114, 0.2);

  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;

  width: 280px;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;

  padding: 20px;
}

/* Overlay pattern untuk tekstur sidebar */
.sidebar-government::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M0,0 L100,0 L100,100 L0,100 Z" fill="white" opacity="0.05"/></svg>');
  opacity: 0.1;
  pointer-events: none;
}

.sidebar-government .brand-section {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-align: left;
}

.sidebar-government .brand-title {
  font-size: 14px;
  font-weight: 600;
}

.sidebar-government .brand-subtitle {
  font-size: 16px;
  opacity: 0.9;
}

.sidebar-government .brand-text {
  color: white;
  margin-left: 0px;
  font-weight: 700;
  font-size: 1.1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Logo */
.logo-wrapper {
  width: 75px;
  height: 75px;
  border-radius: 50%;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.sidebar-government .nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  padding: 12px 16px;
  margin-bottom: 8px;
  border-radius: 12px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(5px);
  border: 1px solid transparent;
  display: flex;
  align-items: center;
}

/* Efek kilau saat hover */
.sidebar-government .nav-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.sidebar-government .nav-link:hover::before {
  left: 100%;
}

.sidebar-government .nav-link:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white !important;
  transform: translateX(8px);
  border-color: rgba(255, 215, 0, 0.5);
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

.sidebar-government .nav-link.active {
  background: linear-gradient(135deg, var(--government-accent) 0%, #ffed4e 100%);
  color: var(--government-primary) !important;
  font-weight: 600;
  border-color: var(--government-accent);
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
}

.sidebar-government .nav-link.active i {
  color: var(--government-primary) !important;
}

.sidebar-government .nav-link i {
  width: 20px;
  margin-right: 12px;
  text-align: center;
  font-size: 1.1rem;
}

.sidebar-government hr {
  border-color: rgba(255, 255, 255, 0.3);
  margin: 20px 0;
}

.btn-government-logout {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  border: none;
  color: white;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
  width: 100%;
  box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
  cursor: pointer;
}

.btn-government-logout:hover {
  background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

/* Mobile Navbar Styles */
.mobile-navbar-government {
  background: linear-gradient(135deg, var(--government-primary) 0%, var(--government-secondary) 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(30, 60, 114, 0.3);
  border-bottom: 3px solid var(--government-accent);
}

.mobile-navbar-government .navbar-brand {
  color: white !important;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Nav section headers */
.nav-section-header {
  color: var(--government-accent);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 20px 0 10px 0;
  padding-left: 16px;
}

/* User info section */
.user-info {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 20px;
  text-align: center;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-info .user-name {
  color: white;
  font-weight: 600;
  margin-bottom: 5px;
}

.user-info .user-role {
  color: var(--government-accent);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Responsive Main Content area adjustment */
.main-content {
  transition: margin 0.3s ease;
  padding: 20px;
}

@media (min-width: 769px) {
  .main-content {
    margin-left: 280px;
  }
}

@media (max-width: 768px) {
  .navbar-collapse {
    background: linear-gradient(135deg, var(--government-primary) 0%, var(--government-secondary) 100%);
    margin-top: 10px;
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  }
}

/* SweetAlert Custom Styles */
.swal-government-popup {
  border-radius: 15px !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2) !important;
  padding: 2rem !important;
}
.swal-government-title {
  color: #1e3c72 !important;
  font-weight: 600 !important;
}
.swal-government-confirm {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
  color: white !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 10px 24px !important;
  margin-left: 10px !important;
  font-weight: 600 !important;
}
.swal-government-cancel {
  background: #6c757d !important;
  color: white !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 10px 24px !important;
  font-weight: 600 !important;
}

/* ============================= */
/* MOBILE NAVBAR GOVERNMENT FIX */
/* ============================= */

.mobile-navbar-government {
  background: linear-gradient(135deg, var(--government-primary) 0%, var(--government-secondary) 100%);
  color: white;
  border-bottom: 3px solid var(--government-accent);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

/* Brand */
.mobile-navbar-government .navbar-brand {
  color: white !important;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-navbar-government .navbar-brand i {
  color: white !important;
  font-size: 1.4rem;
}

/* Hamburger button */
.mobile-navbar-government .navbar-toggler {
  border: none;
  background: rgba(255, 255, 255, 0.15);
  padding: 6px 10px;
  border-radius: 8px;
}

.mobile-navbar-government .navbar-toggler:focus {
  box-shadow: none;
}

.mobile-navbar-government .navbar-toggler-icon {
  filter: brightness(0) invert(1); /* bikin icon putih */
}

/* Collapse area */
@media (max-width: 768px) {
  .mobile-navbar-government .navbar-collapse {
    background: linear-gradient(180deg, var(--government-primary) 0%, var(--government-secondary) 100%);
    margin-top: 15px;
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
  }

  .mobile-navbar-government .nav-link {
    color: white !important;
    font-weight: 500;
    padding: 12px 14px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .mobile-navbar-government .nav-link i {
    color: white !important;
    font-size: 1.1rem;
  }

  .mobile-navbar-government .nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
  }

  .mobile-navbar-government .nav-link.active {
    background: linear-gradient(135deg, var(--government-accent) 0%, #ffed4e 100%);
    color: var(--government-primary) !important;
    font-weight: 600;
  }

  .mobile-navbar-government .nav-link.active i {
    color: var(--government-primary) !important;
  }
}

/* User Info */
.mobile-user-info {
  text-align: center;
  padding-bottom: 15px;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-user-info .user-name {
  color: var(--government-accent);
  font-weight: 600;
}

.mobile-user-info .user-role {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.8rem;
}

/* Logout button mobile */
.mobile-navbar-government .btn-government-logout {
  width: 100%;
  margin-top: 10px;
}

/* =========================
   LAPORAN
========================= */
body {
  background-color: #f4f7fa;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.card-government {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: white;
  border: none;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(30, 60, 114, 0.3);
  backdrop-filter: blur(10px);
}

.text-government-primary {
  color: #1e3c72 !important;
}

.bg-government-light {
  background: linear-gradient(135deg, #f8f9ff 0%, #e8f0ff 100%);
  border-radius: 12px;
}

.btn-government {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  border: none;
  color: white;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-government:hover {
  background: linear-gradient(135deg, #163056 0%, #1e4176 100%);
  color: white;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 5px 15px rgba(30, 60, 114, 0.4);
}

.table-modern {
  border: none;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  background: white;
}

.table-modern thead th {
  background: linear-gradient(135deg, #f8f9ff 0%, #e8f0ff 100%);
  color: #4a5568;
  border: none;
  font-weight: 600;
  padding: 18px 15px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table-modern tbody td {
  padding: 18px 15px;
  border: none;
  border-bottom: 1px solid #f7fafc;
  vertical-align: middle;
}

.table-modern tbody tr {
  transition: all 0.2s ease;
}

.table-modern tbody tr:hover {
  background: linear-gradient(135deg, #f8faff 0%, #e8f2ff 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.stats-card {
  border-radius: 15px;
  border: none;
  padding: 25px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

.stats-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  pointer-events: none;
}

.stats-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.stats-card .card-body {
  position: relative;
  z-index: 1;
}

.stats-card h5 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stats-card p {
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.filter-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
  border-radius: 15px;
  border: 1px solid rgba(30, 60, 114, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.form-control,
.form-select {
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  padding: 12px 15px;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.9);
}

.form-control:focus,
.form-select:focus {
  border-color: #1e3c72;
  box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
  background: white;
}

.btn-filter {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  border: none;
  color: white;
  border-radius: 8px;
  padding: 12px;
  transition: all 0.2s ease;
}

.btn-filter:hover {
  background: linear-gradient(135deg, #163056 0%, #1e4176 100%);
  transform: scale(1.05);
}

.badge {
  padding: 8px 12px;
  border-radius: 20px;
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: capitalize;
}

.page-header {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  border-radius: 15px;
  padding: 30px;
  margin-bottom: 30px;
  color: white;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  z-index: 0;
}

.page-header .content {
  position: relative;
  z-index: 1;
}

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

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

.container-fluid {
  padding: 20px;
}

/* DataTables Custom Styling */
.dataTables_wrapper {
  padding: 0;
}

.dataTables_length,
.dataTables_filter,
.dataTables_info,
.dataTables_paginate {
  margin-bottom: 15px;
}

.dataTables_length select,
.dataTables_filter input {
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  padding: 8px 12px;
  margin: 0 5px;
}

.dataTables_filter input {
  background: rgba(255, 255, 255, 0.9);
  width: 300px;
}

.dataTables_filter input:focus {
  border-color: #1e3c72;
  box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
  outline: none;
}

.page-link {
  border-radius: 6px;
  margin: 0 2px;
  border: 1px solid #e2e8f0;
  color: #1e3c72;
  padding: 8px 12px;
}

.page-link:hover {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: white;
  border-color: #1e3c72;
}

.page-item.active .page-link {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%) !important;
  border-color: #1e3c72 !important;
  color: white !important;
}

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

.table-responsive {
  border-radius: 12px;
  overflow: hidden;
}

.dt-buttons {
  margin-bottom: 15px;
}

.dt-button {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%) !important;
  border: none !important;
  color: white !important;
  border-radius: 6px !important;
  padding: 8px 16px !important;
  margin: 0 2px !important;
  font-size: 0.875rem !important;
}

.dt-button:hover {
  background: linear-gradient(135deg, #163056 0%, #1e4176 100%) !important;
}

.icon-box {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  margin-bottom: 1rem;
}

/* Penyesuaian Tombol Export */
.dt-buttons {
  display: inline-flex;
  border-radius: 6px;
  overflow: hidden;
}

/* semua tombol */
.dt-buttons .btn {
  border-radius: 0;
  border: none;
  padding: 8px 16px;
  background: #2f4b85;
  color: #fff;
  font-weight: 500;
}

/* separator effect */
.dt-buttons .btn + .btn {
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

/* hover */
.dt-buttons .btn:hover {
  background: #243b6a;
}
.btn-excel {
  background-color: #1a4b8c;
  color: white;
  border: none;
}
.btn-pdf {
  background-color: #1a4b8c;
  color: white;
  border: none;
}
.btn-print {
  background-color: #1a4b8c;
  color: white;
  border: none;
}
.btn-excel:hover,
.btn-pdf:hover,
.btn-print:hover {
  background-color: #153a6d;
  color: white;
}

/* Penyesuaian Tabel */
.table-modern thead th {
  background-color: #f8faff;
  color: #495057;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
  padding: 15px 10px;
  border-bottom: 2px solid #ebf1ff;
}

/* Badge Status Sesuai Gambar */
.badge-status {
  border-radius: 50px;
  padding: 7px 15px;
  font-weight: 500;
  font-size: 12px;
}
.bg-selesai {
  background-color: #198754;
  color: white;
}
.bg-tertunda {
  background-color: #ffc107;
  color: white;
}
.bg-diproses {
  background-color: #0dcaf0;
  color: white;
}
.bg-ditolak {
  background-color: #dc3545;
  color: white;
}

/* Tombol Aksi */
.btn-lihat {
  background-color: #2b4c8c;
  color: white;
  border-radius: 6px;
}
.btn-pengingat {
  background-color: #ffc107;
  color: #333;
  border-radius: 6px;
  border: none;
}

/* container */
.dataTables_length {
  display: flex;
  align-items: center;
}

/* PENTING: flex pada label */
.dataTables_length label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0; /* hilangkan turun */
  font-weight: 500;
}

/* dropdown */
.dataTables_length select {
  border-radius: 10px;
  padding: 6px 28px 6px 10px;
  border: 1px solid #dce1ea;
  background-color: #f4f6fa;
  height: 38px; /* samakan tinggi */
}

/* Hilangkan arrow dropdown bawaan */
.dataTables_length select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  background-image: none; /* extra safety */
  padding-right: 10px; /* rapikan spacing */
}

/* kanan atas (search) */
.dataTables_filter {
  display: flex;
  justify-content: flex-end;
}

.dataTables_filter label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

/* input search */
.dataTables_filter input {
  border-radius: 12px;
  border: 1px solid #dce1ea;
  background: #fbfbfc;
  padding: 8px 8px;
  width: 260px;
  transition: 0.2s;
}

.dataTables_filter input:focus {
  outline: none;
  background: #fff;
  border-color: #2c4e8a;
  box-shadow: 0 0 0 0.1rem rgba(44, 78, 138, 0.2);
}

/* ======================
   BOTTOM AREA
====================== */

/* info kiri bawah */
.dataTables_info {
  font-size: 0.95rem;
  color: #6c757d;
}

/* pagination kanan bawah */
.dataTables_paginate {
  display: flex;
  justify-content: flex-end;
}

/* active page */
.dataTables_paginate .paginate_button.current {
  background: #2c4e8a !important;
  color: #fff !important;
  border-color: #2c4e8a !important;
}

/* hover */
.dataTables_paginate .paginate_button:hover {
  background: #e9eef7 !important;
  color: #2c4e8a !important;
}

/* disable button */
.dataTables_paginate .paginate_button.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
