/* Pengaturan Dasar Sesuai Rancangan */
:root {
  --warna-biru: #1e4f7f;
  --warna-putih: #f8fbfb;
  --warna-teks: #333;
  --warna-border: #e0e0e0;
}

/* Reset Dasar */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Layout Body Utama */
body {
  font-family: "Poppins", sans-serif;
  background-color: var(--warna-putih);
  color: var(--warna-teks);
  display: flex;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

/* --- 1. Layout Sidebar (Menu Kiri) --- */
.sidebar {
  width: 260px;
  background-color: var(--warna-biru);
  color: var(--warna-putih);
  display: flex;
  flex-direction: column;
  height: 98vh;
  flex-shrink: 0;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1002;
  transition: transform 0.3s ease-in-out;
  margin-left: 15px;
  margin-top: 15px;
  border-radius: 15px;
}
.sidebar-header {
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.sidebar-header h2 {
  margin: 0;
  font-weight: 600;
}
.sidebar-menu {
  flex-grow: 1;
  overflow-y: auto;
}
.sidebar-menu ul {
  list-style: none;
  padding-top: 20px;
}
.sidebar-menu .menu-item a {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  color: var(--warna-putih);
  text-decoration: none;
  font-weight: 400;
  transition: background-color 0.2s ease;
}
.sidebar-menu .menu-item a .material-icons {
  margin-right: 15px;
  font-size: 22px;
}
.sidebar-menu .menu-item.active a,
.sidebar-menu .menu-item a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  font-weight: 500;
}

/* --- 2. Layout Konten Utama (Kanan) --- */
.main-wrapper {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  margin-left: 260px;
  width: calc(100% - 260px);
  transition: margin-left 0.3s ease-in-out, width 0.3s ease-in-out;
}

/* --- 3. Header (Top Bar) --- */
.header {
  background-color: transparent;
  padding: 0 20px 0 30px;
  height: 65px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  position: relative;
}
.header-search-container {
  display: flex;
  align-items: center;
  /* (PERBAIKAN) flex-grow: 1; dan margin-left: 10px; TELAH DIHAPUS */
}
.header-user-area {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}
.user-profile {
  display: flex;
  align-items: center;
  cursor: default;
}
.user-profile span {
  font-weight: 500;
}

/* --- 4. Konten Halaman (Area Putih) --- */
.content {
  flex-grow: 1;
  overflow-y: auto;
  padding: 30px;
}

/* --- 5. Style Halaman Login --- */
.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: var(--warna-biru);
  margin-left: 0;
  width: 100%;
}
.login-container {
  width: 100%;
  max-width: 400px;
  padding: 30px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
.login-form h2 {
  color: var(--warna-biru);
  text-align: center;
  margin-top: 0;
  font-weight: 700;
}
.login-form p {
  text-align: center;
  margin-bottom: 20px;
  font-size: 14px;
  color: #666;
}
.login-form hr {
  border: 0;
  border-top: 1px solid var(--warna-border);
  margin: 20px 0;
}
.login-error {
  background-color: #ffebee;
  color: #d32f2f;
  border: 1px solid #ffcdd2;
  padding: 10px 15px;
  border-radius: 4px;
  margin-bottom: 15px;
  font-size: 14px;
  text-align: center;
}

/* --- Style Form Umum --- */
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 14px;
}
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="date"],
.form-group input[type="file"],
.form-group select {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--warna-border);
  border-radius: 4px;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
}
.form-group input:disabled {
  background-color: #f5f5f5;
  cursor: not-allowed;
  color: #777;
}
.form-group input[type="file"] {
  padding: 9px;
}
.form-group small {
  font-size: 13px;
  color: #777;
  margin-top: 6px;
  display: block;
}
.btn-login {
  width: 100%;
  padding: 12px 15px;
  border: none;
  border-radius: 4px;
  background-color: var(--warna-biru);
  color: var(--warna-putih);
  font-family: "Poppins", sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.btn-login:hover {
  background-color: #153a5c;
}

/* --- 6. Style Tambahan untuk Register & Notifikasi --- */
.login-success {
  background-color: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
  padding: 10px 15px;
  border-radius: 4px;
  margin-bottom: 15px;
  font-size: 14px;
  text-align: center;
}
.login-register-link {
  text-align: center;
  font-size: 14px;
  margin-top: 20px;
  color: #666;
}
.login-register-link a {
  color: var(--warna-biru);
  text-decoration: none;
  font-weight: 500;
}
.login-register-link a:hover {
  text-decoration: underline;
}
.form-group select {
  background-color: #fff;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23666666%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-13%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2013l128%20128c3.6%203.6%207.8%205.4%2013%205.4s9.4-1.8%2013-5.4l128-128c3.6-3.6%205.4-7.8%205.4-13%200-5-1.8-9.4-5.4-13z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 10px 10px;
}

/* --- 7. Style Halaman Profil --- */
.profil-notification {
  background-color: #fff3cd;
  color: #664d03;
  border: 1px solid #ffecb5;
  padding: 15px 20px;
  border-radius: 4px;
  margin-bottom: 25px;
  font-size: 15px;
}
.profil-error {
  background-color: #f8d7da;
  color: #58151c;
  border: 1px solid #f1aeb5;
  padding: 10px 15px;
  border-radius: 4px;
  margin-bottom: 20px;
}
.profil-success {
  background-color: #d1e7dd;
  color: #0f5132;
  border: 1px solid #badbcc;
  padding: 10px 15px;
  border-radius: 4px;
  margin-bottom: 20px;
}
.card-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 20px;
}
.card {
  background-color: #fff;
  border: 1px solid var(--warna-border);
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}
.card-profil form {
  padding: 20px;
}
.card-header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--warna-border);
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}
.profil-pic-container {
  display: flex;
  align-items: center;
  gap: 15px;
}
#profil-pic-preview,
.profile-pic-small {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--warna-border);
  background-color: #eee;
}
.profile-pic-small {
  width: 36px;
  height: 36px;
  margin-right: 10px;
  border: none;
}
input[type="file"]#foto_profil {
  display: none;
}
.btn-upload {
  padding: 8px 15px;
  background-color: #f0f0f0;
  border: 1px solid var(--warna-border);
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}
.btn-upload:hover {
  background-color: #e9e9e9;
}
.btn-profil-save {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  background-color: var(--warna-biru);
  color: var(--warna-putih);
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.btn-profil-save:hover {
  background-color: #153a5c;
}
.menu-item-separator {
  height: 1px;
  background-color: rgba(255, 255, 255, 0.1);
  margin: 10px 20px;
}

/* --- 8. Style Tombol, Card, Tabel, dan Form --- */
.btn-logout {
  margin-left: 20px;
  color: #d32f2f;
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
}
.btn-logout:hover {
  color: #b71c1c;
}
.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}
.content-header h2 {
  margin: 0;
  font-weight: 600;
}
.btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border: none;
  border-radius: 5px;
  text-decoration: none;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease,
    color 0.2s ease;
}
.btn .material-icons {
  font-size: 18px;
  margin-right: 8px;
}
.btn-primary {
  background-color: var(--warna-biru);
  color: var(--warna-putih);
}
.btn-primary:hover {
  background-color: #153a5c;
}
.btn-secondary {
  background-color: #6c757d;
  color: var(--warna-putih);
}
.btn-secondary:hover {
  background-color: #5a6268;
}
.btn-danger-outline {
  background-color: transparent;
  color: #d32f2f;
  border: 1px solid #d32f2f;
}
.btn-danger-outline:hover {
  background-color: #ffebee;
}
.card-body {
  padding: 25px;
  overflow-x: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}
.data-table th,
.data-table td {
  padding: 12px 15px;
  border-bottom: 1px solid var(--warna-border);
  text-align: left;
  vertical-align: middle;
}
.data-table th {
  background-color: var(--warna-putih);
  font-weight: 600;
  font-size: 14px;
  color: #555;
}
.data-table td {
  font-size: 14px;
}
.data-table .action-buttons {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.data-table .btn-icon {
  display: inline-flex;
  padding: 6px;
  border-radius: 50%;
  text-decoration: none;
  transition: background-color 0.2s ease;
  border: none;
}
.data-table .btn-icon .material-icons {
  font-size: 18px;
}
.btn-edit {
  color: #1976d2;
}
.btn-edit:hover {
  background-color: #e3f2fd;
}
.btn-delete {
  color: #d32f2f;
}
.btn-delete:hover {
  background-color: #ffebee;
}
.btn-view {
  color: #0288d1;
}
.btn-view:hover {
  background-color: #e1f5fe;
}
.btn-preview {
  color: #6a1b9a;
}
.btn-preview:hover {
  background-color: #f3e5f5;
}
.btn-download {
  color: #37474f;
}
.btn-download:hover {
  background-color: #eceff1;
}
.btn-disposisi {
  color: #ff6f00;
}
.btn-disposisi:hover {
  background-color: #fff8e1;
}
.form-container {
  width: 100%;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 30px;
}
.form-actions {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--warna-border);
  display: flex;
  gap: 15px;
}

/* --- 9. Style Sidebar Tambahan --- */
.menu-section-title {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 15px 20px 5px 20px;
  margin-top: 10px;
}

/* --- 10. Style Halaman Master Data (Tabs) --- */
.tab-nav {
  display: flex;
  border-bottom: 2px solid var(--warna-border);
  margin-bottom: 25px;
}
.tab-link {
  padding: 10px 20px;
  text-decoration: none;
  color: #555;
  font-weight: 500;
  font-size: 15px;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}
.tab-link:hover {
  color: var(--warna-biru);
}
.tab-link.active {
  color: var(--warna-biru);
  border-bottom-color: var(--warna-biru);
}
.form-master-inline {
  display: flex;
  align-items: flex-end;
  gap: 20px;
}
.form-master-inline .form-group {
  flex-grow: 1;
  margin-bottom: 0;
}
.form-master-inline .btn {
  flex-shrink: 0;
}
.form-separator {
  margin: 25px 0;
  border: 0;
  border-top: 1px solid var(--warna-border);
}
.btn-sm {
  padding: 8px 12px;
  font-size: 13px;
}
.btn-sm .material-icons {
  font-size: 16px;
  margin-right: 5px;
}

/* --- 11. Tampilan Form Edit Inline --- */
.edit-form-row td {
  background-color: #fdfdfd;
  border-bottom: 2px solid var(--warna-biru);
  padding: 20px !important;
}
.form-edit-inline {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  width: 100%;
}
.form-edit-inline .form-group {
  flex-grow: 1;
  margin-bottom: 0;
}
.form-actions-inline {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

/* --- 12. Style Halaman Manajemen Pengguna --- */
.btn-verify {
  color: #0f5132;
}
.btn-verify:hover {
  background-color: #d1e7dd;
}
.btn-icon:disabled,
.btn-icon[disabled] {
  color: #adb5bd;
  cursor: not-allowed;
  background-color: transparent !important;
  border: none !important;
}
.btn-icon:disabled .material-icons,
.btn-icon[disabled] .material-icons {
  color: #adb5bd;
}
.status-badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}
.status-badge.status-verified {
  background-color: #d1e7dd;
  color: #0f5132;
}
.status-badge.status-pending {
  background-color: #fff3cd;
  color: #664d03;
}
.status-badge.status-log {
  background-color: #eceff1;
  color: #37474f;
  font-weight: 600;
}

/* --- 13. Style Halaman Detail Surat & Disposisi --- */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
.detail-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.detail-list li {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--warna-border);
}
.detail-list li:last-child {
  border-bottom: none;
}
.detail-list li strong {
  font-weight: 500;
  color: #555;
  flex-shrink: 0;
  margin-right: 15px;
}
.detail-list li span {
  font-weight: 400;
  color: var(--warna-teks);
  text-align: right;
}
.detail-list li span.status-badge {
  text-align: left;
}
.file-viewer-body {
  padding: 0;
  min-height: 700px;
}
.file-viewer-body iframe {
  display: block;
  width: 100%;
  height: 700px;
  border: none;
}
.file-download-box {
  padding: 50px 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 500px;
}
.file-download-box .material-icons {
  font-size: 80px;
  color: #adb5bd;
}
.file-download-box p {
  font-size: 16px;
  color: #555;
  margin: 15px 0 25px 0;
}
textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--warna-border);
  border-radius: 4px;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  resize: vertical;
  min-height: 80px;
}
.instruksi-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.instruksi-item {
  display: flex;
  align-items: center;
}
.instruksi-item input[type="radio"] {
  width: auto;
  margin-right: 8px;
}
.instruksi-item label {
  margin-bottom: 0;
  font-weight: 400;
}
.checkbox-list {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  border: 1px solid var(--warna-border);
  padding: 15px;
  border-radius: 4px;
  max-height: 250px;
  overflow-y: auto;
}
.checkbox-item {
  display: flex;
  align-items: center;
}
.checkbox-item input[type="checkbox"] {
  width: auto;
  margin-right: 10px;
}
.checkbox-item label {
  margin-bottom: 0;
  font-weight: 400;
}
.read-only-box {
  background-color: #f8f9fa;
  border: 1px solid var(--warna-border);
  border-radius: 4px;
  padding: 12px 15px;
  min-height: 100px;
  font-size: 14px;
  color: #555;
}

/* --- 14. Style Riwayat Disposisi --- */
.disposisi-history {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.history-item {
  border: 1px solid var(--warna-border);
  border-radius: 8px;
  background-color: #fdfdfd;
}
.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  background-color: #f8f9fa;
  border-bottom: 1px solid var(--warna-border);
}
.history-actor {
  font-weight: 600;
  color: var(--warna-biru);
}
.history-date {
  font-size: 13px;
  color: #555;
}
.history-body {
  padding: 15px;
}
.history-body p {
  margin: 0 0 10px 0;
  font-size: 14px;
}
.history-body p strong {
  font-weight: 500;
  color: #333;
}
.btn-link {
  text-decoration: none;
  color: var(--warna-biru);
  font-weight: 500;
  font-size: 14px;
}
.btn-link:hover {
  text-decoration: underline;
}
.history-tujuan-list {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px dashed var(--warna-border);
}
.history-tujuan-list > strong {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 10px;
  display: block;
}
.tujuan-item {
  background-color: #fff;
  border: 1px solid #eee;
  border-radius: 5px;
  padding: 10px;
  margin-bottom: 10px;
}
.tujuan-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.tujuan-unit {
  font-weight: 600;
  font-size: 14px;
}
.tujuan-status {
  display: flex;
  gap: 5px;
}
.tujuan-catatan {
  font-size: 13px;
  color: #333;
  padding: 8px;
  background-color: #f8f9fa;
  border-radius: 4px;
  margin-top: 10px;
}
.tujuan-catatan strong {
  font-weight: 600;
}
.tujuan-catatan small {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: #777;
  font-style: italic;
}

/* --- 15. Style Halaman Laporan --- */
.form-filter-inline {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}
.form-filter-inline .form-group {
  flex-grow: 1;
  margin-bottom: 0;
}
.form-filter-inline .btn {
  flex-shrink: 0;
  margin-bottom: 1px;
}
.rekap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}
.rekap-item {
  position: relative;
  background-color: #f8f9fa;
  border: 1px solid var(--warna-border);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}
.rekap-value {
  font-size: 36px;
  font-weight: 600;
  color: var(--warna-teks);
}
.rekap-label {
  font-size: 15px;
  font-weight: 500;
  color: #555;
  margin-top: 5px;
}
.rekap-icon {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 40px;
  opacity: 0.15;
}

/* --- 16. Style Lupa Password --- */
.form-group-extra {
  margin-bottom: 20px;
  margin-top: -10px;
  text-align: right;
}
.forgot-password-link {
  font-size: 13px;
  color: #555;
  text-decoration: none;
  font-weight: 500;
}
.forgot-password-link:hover {
  color: var(--warna-biru);
  text-decoration: underline;
}
.lupa-password-info {
  font-size: 14px;
  color: #333;
  line-height: 1.6;
  margin-bottom: 25px;
  text-align: left;
}
.lupa-password-info p {
  text-align: left;
  margin-bottom: 15px;
}
.lupa-password-info strong {
  display: block;
  margin-top: 15px;
  font-weight: 600;
}
.lupa-password-info a {
  color: var(--warna-biru);
  font-weight: 500;
  text-decoration: none;
}
.lupa-password-info a:hover {
  text-decoration: underline;
}
.btn-kembali {
  display: inline-flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  padding: 10px 15px;
  border: 1px solid var(--warna-border);
  border-radius: 4px;
  background-color: #f0f0f0;
  color: #333;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s ease;
}
.btn-kembali .material-icons {
  margin-right: 8px;
  font-size: 18px;
}
.btn-kembali:hover {
  background-color: #e9e9e9;
}

/* --- 17. Style Notifikasi --- */
.notification-wrapper {
  position: relative;
}
.notification-bell {
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.notification-bell .material-icons {
  font-size: 26px;
  color: #555;
}
.notification-bell:hover .material-icons {
  color: var(--warna-biru);
}
.notification-badge {
  position: absolute;
  top: 0;
  right: 0;
  width: 18px;
  height: 18px;
  background-color: #d32f2f;
  color: white;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}
.notification-dropdown {
  position: absolute;
  top: 50px;
  right: 0;
  width: 350px;
  max-height: 400px;
  background-color: #fff;
  border: 1px solid var(--warna-border);
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  z-index: 100;
  display: none;
  flex-direction: column;
}
.notification-wrapper.open .notification-dropdown {
  display: flex;
}
.dropdown-header {
  padding: 12px 15px;
  font-weight: 600;
  border-bottom: 1px solid var(--warna-border);
}
.dropdown-body {
  max-height: 300px;
  overflow-y: auto;
}
.notif-item {
  display: flex;
  padding: 12px 15px;
  text-decoration: none;
  color: #333;
  border-bottom: 1px solid #f0f0f0;
}
.notif-item:last-child {
  border-bottom: none;
}
.notif-item:hover {
  background-color: #f8f9fa;
}
.notif-item.empty {
  text-align: center;
  color: #777;
  padding: 20px;
  font-size: 14px;
}
.notif-icon {
  margin-right: 15px;
  color: var(--warna-biru);
}
.notif-content p {
  font-size: 14px;
  margin: 0 0 5px 0;
  line-height: 1.4;
}
.notif-content small {
  font-size: 12px;
  color: #777;
}
.dropdown-footer {
  padding: 10px 15px;
  text-align: center;
  border-top: 1px solid var(--warna-border);
  background-color: #f8f9fa;
}
.dropdown-footer a {
  font-size: 13px;
  font-weight: 500;
  color: var(--warna-biru);
  text-decoration: none;
}

/* --- (BARU) 20. Style Search Bar Header --- */
/* Form Pencarian di Header */
.header-search-bar {
  display: flex;
  align-items: center;
}
.header-search-bar form {
  position: relative;
  display: flex;
  align-items: center;
}
.search-input {
  width: 350px;
  height: 40px;
  padding: 8px 45px 8px 15px; /* Sisakan ruang untuk ikon tombol */
  border: 1px solid var(--warna-border);
  border-radius: 20px; /* Buat oval */
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  background-color: var(
    --warna-putih
  ); /* (PERBAIKAN) Harusnya #F8FBFB atau #fff */
  transition: all 0.2s ease;
}
.search-input:focus {
  background-color: #fff;
  border-color: var(--warna-biru);
  box-shadow: 0 0 0 2px rgba(30, 79, 127, 0.1);
  outline: none;
}
.search-btn {
  position: absolute;
  right: 5px;
  top: 5px;
  bottom: 5px;
  width: 30px;
  height: 30px;
  background-color: var(--warna-biru);
  color: var(--warna-putih);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}
.search-btn:hover {
  background-color: #153a5c;
}
.search-btn .material-icons {
  font-size: 20px;
}
/* --- AKHIR STYLE 20 --- */

/* --- 19. Style Tombol Share & Modal --- */
.btn-share {
  color: #4caf50;
  cursor: pointer;
}
.btn-share:hover {
  background-color: #e8f5e9;
}
.modal-overlay {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
}
.modal-content {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  width: 90%;
  max-width: 500px;
  animation: modalFadeIn 0.3s ease;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid var(--warna-border);
}
.modal-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}
.modal-close {
  font-size: 28px;
  font-weight: 300;
  color: #777;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover {
  color: #000;
}
.modal-body {
  padding: 20px;
}
.modal-warning {
  font-size: 14px;
  color: #d32f2f;
  background-color: #ffebee;
  border: 1px solid #ffcdd2;
  padding: 10px 15px;
  border-radius: 4px;
  margin: 0 0 15px 0;
  text-align: center;
}
.share-input-group {
  display: flex;
  gap: 10px;
}
.share-input-group input[type="text"] {
  flex-grow: 1;
  font-size: 14px;
  background-color: #f0f0f0;
}
.share-input-group .btn {
  flex-shrink: 0;
}
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* --- 21. Style Tambahan Laporan --- */
.status-badge-na {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  background-color: #f8f9fa;
  color: #6c757d;
  border: 1px solid #dee2e6;
}

/* --- 22. Style Dashboard Widget --- */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
}
.dashboard-col {
  display: flex;
  flex-direction: column;
  gap: 25px;
}
.dashboard-widget {
  background-color: #fff;
  border: 1px solid var(--warna-border);
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}
.widget-header {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid var(--warna-border);
}
.widget-header .material-icons {
  color: var(--warna-biru);
  margin-right: 10px;
}
.widget-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}
.widget-body {
  padding: 20px;
  flex-grow: 1;
}
.widget-rekap-angka {
  font-size: 40px;
  font-weight: 600;
  color: var(--warna-biru);
  line-height: 1;
}
.widget-body p {
  font-size: 14px;
  color: #555;
  margin: 5px 0 0 0;
}
.widget-body .btn {
  margin-top: 15px;
}
.widget-admin {
  background-color: #fff3cd;
  border-color: #ffecb5;
}
.widget-admin .widget-header .material-icons,
.widget-admin .widget-header h3,
.widget-admin .widget-rekap-angka {
  color: #664d03;
}
.widget-tabel .widget-body {
  padding: 0;
}
canvas {
  max-width: 100%;
}

/* --- 23. Style Widget Dashboard Dinamis --- */
.widget-info {
  background-color: #e3f2fd;
  border-color: #bbdefb;
}
.widget-info .widget-header .material-icons,
.widget-info .widget-header h3,
.widget-info .widget-rekap-angka {
  color: #1e88e5;
}
.widget-warning {
  background-color: #fff8e1;
  border-color: #ffecb3;
}
.widget-warning .widget-header .material-icons,
.widget-warning .widget-header h3,
.widget-warning .widget-rekap-angka {
  color: #ff6f00;
}

/* --- 24. Style Widget Feed Dashboard --- */
.widget-tabel .widget-body {
  padding: 0;
}
.feed-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.feed-item {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid var(--warna-border);
  text-decoration: none;
  color: var(--warna-teks);
}
.feed-item:last-child {
  border-bottom: none;
}
.feed-item:hover {
  background-color: #f8f9fa;
}
.feed-icon {
  font-size: 24px;
  margin-right: 15px;
}
.feed-content {
  flex-grow: 1;
}
.feed-content p {
  font-size: 14px;
  margin: 0 0 2px 0;
  font-weight: 500;
}
.feed-content p strong {
  font-weight: 600;
}
.feed-content small {
  font-size: 12px;
  color: #777;
}
.feed-link {
  color: #999;
  text-decoration: none;
}
.feed-link:hover {
  color: var(--warna-biru);
}

/* --- 25. Style Foto Profil Topbar --- */
.topbar-profile-link {
  display: inline-block;
  margin-right: 10px;
  line-height: 0;
}
.topbar-profile-pic {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--warna-border);
  background-color: #eee;
  transition: transform 0.2s ease;
}
.topbar-profile-link:hover .topbar-profile-pic {
  transform: scale(1.1);
}

/* --- 26. Style Logo Sidebar --- */
.sidebar-header {
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.sidebar-logo {
  width: 160px;
  height: 160px;
  object-fit: contain;
  margin-bottom: 10px;
  margin-top: 30px;
}
.sidebar-header h2 {
  margin: 0;
  font-weight: 600;
}

/* --- 27. Fondasi Responsif (Desktop-First Hide) --- */
.hamburger-btn,
.sidebar-close-btn,
.mobile-search-btn,
.search-close-btn,
#sidebar-overlay {
  display: none;
}
.hamburger-btn {
  background: none;
  border: none;
  padding: 5px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}
.hamburger-btn .material-icons {
  font-size: 28px;
  color: #555;
}
.hamburger-btn:hover .material-icons {
  color: var(--warna-biru);
}
.sidebar-close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  position: absolute;
  top: 10px;
  right: 15px;
  cursor: pointer;
  display: none;
}
.mobile-search-btn {
  background: none;
  border: none;
  padding: 5px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}
.mobile-search-btn .material-icons {
  font-size: 26px;
  color: #555;
}
.mobile-search-btn:hover .material-icons {
  color: var(--warna-biru);
}
.search-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
}
.search-close-btn .material-icons {
  font-size: 24px;
  color: #777;
}
#sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1001;
  display: none;
}

/* --- 28. Media Query Responsif --- */
@media (max-width: 992px) {
  /* --- 1. Sembunyikan Sidebar --- */
  .sidebar {
    transform: translateX(-110%); /* Sembunyikan di kiri */
    z-index: 1003; /* Paling atas */
  }
  .main-wrapper {
    margin-left: 0; /* Konten ambil lebar penuh */
    width: 100%;
  }

  /* --- 2. Tampilkan Kontrol Mobile --- */
  .hamburger-btn,
  .mobile-search-btn {
    display: flex; /* Tampilkan tombol hamburger & search mobile */
  }
  .sidebar-close-btn {
    display: block; /* Tampilkan tombol close di sidebar */
  }

  /* --- 3. Sembunyikan Search Desktop --- */
  .header-search-container {
    display: none; /* Sembunyikan search bar desktop */
  }
  .header {
    padding: 0 15px; /* Sesuaikan padding header mobile */
  }

  /* --- 4. Logika Buka Sidebar --- */
  body.sidebar-mobile-open .sidebar {
    transform: translateX(0); /* Munculkan sidebar */
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
  }
  body.sidebar-mobile-open #sidebar-overlay {
    display: block; /* Tampilkan overlay gelap */
  }

  /* --- 5. Logika Buka Search Mobile --- */
  body.search-mobile-open .header {
    padding-left: 15px;
  }
  body.search-mobile-open .header-search-container {
    display: flex; /* Tampilkan search bar */
    position: absolute; /* Ambil alih header */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    z-index: 5;
    padding: 0 10px;
  }
  body.search-mobile-open .search-input {
    width: 100%;
    height: 45px;
    padding-left: 45px; /* Beri ruang untuk tombol close */
    border-radius: 8px;
    border-color: var(--warna-biru);
  }
  body.search-mobile-open .search-btn {
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
  }
  body.search-mobile-open .search-close-btn {
    display: flex; /* Tampilkan tombol close */
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
  }
  body.search-mobile-open .hamburger-btn,
  body.search-mobile-open .header-user-area {
    display: none; /* Sembunyikan semua ikon lain */
  }

  /* --- 6. Perbaikan Tampilan Card & Tabel --- */
  .card-container,
  .form-grid,
  .detail-layout,
  .rekap-grid {
    grid-template-columns: 1fr; /* Tumpuk semua grid jadi 1 kolom */
  }

  .card-body .data-table {
    min-width: 700px; /* Paksa tabel jadi lebar */
  }
  .card-body {
    overflow-x: auto; /* (PINDAH KE SINI) */
  }

  /* Form filter di laporan jadi vertikal */
  .form-filter-inline {
    flex-direction: column;
    align-items: stretch; /* Lebar penuh */
  }
  .form-filter-inline .form-group {
    flex-grow: 0;
    margin-bottom: 15px;
  }
  .form-filter-inline .btn {
    margin-bottom: 0;
    width: 100%;
    justify-content: center;
  }

  /* Form master data jadi vertikal */
  .form-master-inline {
    flex-direction: column;
    align-items: stretch;
  }
  .form-master-inline .form-group {
    margin-bottom: 15px;
  }
  .form-master-inline .btn {
    width: 100%;
    justify-content: center;
  }

  /* Form edit inline jadi vertikal */
  .form-edit-inline {
    flex-direction: column;
    align-items: stretch;
  }
  .form-edit-inline .form-group {
    margin-bottom: 15px;
  }
  .form-actions-inline {
    justify-content: flex-end;
  }

  /* Konten jadi padding lebih kecil */
  .content {
    padding: 20px;
  }
  .card-body {
    padding: 20px;
    overflow-x: auto;
  }
}
