/* Kustomisasi kecil di atas Bootstrap 5 — aksen "desa": biru institusional +
   hijau untuk aksi utama. Detail sistem desain lengkap lihat Fase 7. */

:root {
  --bs-primary: #1b4b8f;
  --bs-primary-rgb: 27, 75, 143;
  --navy: #0d1f3c;
  --navy-light: #16325a;
}

/* Font sama seperti desain acuan kita (D:\xampp88\htdocs\CUTI): Inter untuk
   teks isi, Manrope untuk judul/heading — supaya tidak "beda sendiri". */
body {
  font-family: 'Inter', Arial, sans-serif;
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Manrope', Arial, sans-serif;
}

body {
  font-size: 1rem;
  overflow-x: hidden; /* jaring pengaman: badan halaman tidak boleh scroll ke samping */
}

/* Ikon Material Symbols Outlined — dipakai berdampingan dengan Bootstrap
   Icons (bi-*) yang sudah lama dipakai di seluruh portal staf/warga; halaman
   publik (public/*.php) dan data kategori_surat.icon memakai set ini supaya
   sama persis dengan desain acuan. Snippet resmi dari Google Fonts. */
/* Badge status berbentuk "stempel resmi" (dari D:\xampp88\htdocs\CUTI) —
   dipakai di tabel data warga/pengajuan supaya status terasa seperti stempel
   dokumen pemerintahan, bukan badge SaaS generik. */
.stamp {
  display: inline-flex; align-items: center; gap: .25rem; padding: .25rem .625rem;
  border: 1.5px dashed currentColor; border-radius: .375rem; transform: rotate(-2deg);
  font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap;
}
.stamp-approved { color: #15803d; background: rgba(21, 128, 61, .08); }
.stamp-pending { color: #b45309; background: rgba(180, 83, 9, .08); }
.stamp-rejected { color: #b91c1c; background: rgba(185, 28, 28, .08); }
.stamp-revisi { color: #1d4ed8; background: rgba(29, 78, 216, .08); }

/* Tabel data super optimal (pencarian + paging) — avatar inisial + toolbar,
   dipola dari tabel Persetujuan Cuti CUTI. */
.data-toolbar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.data-search { position: relative; max-width: 320px; width: 100%; }
.data-search .material-symbols-outlined { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); font-size: 20px; color: #94a3b8; }
.data-search input { padding-left: 2.5rem; border-radius: 50px; }
.avatar-inisial {
  width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: #eef3fb; color: var(--navy); font-weight: 700; font-size: .8rem; flex-shrink: 0;
}
.table-pagination { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1rem 1.25rem; }
.table-pagination .page-link { border-radius: 8px !important; margin: 0 .15rem; }

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  font-size: 24px;
  line-height: 1;
  vertical-align: middle;
  user-select: none;
}

.btn-desa {
  --bs-btn-color: #fff;
  --bs-btn-bg: #1e7e34;
  --bs-btn-border-color: #1e7e34;
  --bs-btn-hover-bg: #176429;
  --bs-btn-hover-border-color: #176429;
}

/* ===== Beranda: hero kop-surat pemerintah + panel mengambang ===== */
.hero-beranda {
  position: relative;
  color: #fff;
  padding: 1.5rem 0 6rem;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(27, 75, 143, .88), rgba(30, 126, 52, .82)),
    url('../img/header-bg.png') center 20% / cover no-repeat;
}
.hero-beranda .hero-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem; }
.hero-beranda .hero-logo img { height: 52px; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .35)); }
.hero-beranda h1 { font-weight: 800; font-size: 2.1rem; margin: 1.8rem 0 .5rem; text-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
.hero-beranda p.lead { color: rgba(255, 255, 255, .92); text-shadow: 0 1px 6px rgba(0, 0, 0, .3); }

.btn-pill-light { background: rgba(255, 255, 255, .92); color: #1b4b8f; font-weight: 600; border: 0; border-radius: 50px; padding: .5rem 1.3rem; }
.btn-pill-light:hover { background: #fff; color: #1b4b8f; }
.btn-pill-outline { border-radius: 50px; }

/* Portal Staf — pill navy solid, sengaja beda dari tombol warga (putih)
   supaya dua portal terlihat jelas berbeda, bukan cuma varian warna sama. */
.btn-pill-navy { background: var(--navy); color: #fff; font-weight: 600; border: 2px solid var(--navy); border-radius: 50px; padding: .5rem 1.3rem; }
.btn-pill-navy:hover { background: #081326; border-color: #081326; color: #fff; }

/* Tombol "kaca buram" — lebih terlihat di atas foto latar yang ramai
   dibanding outline-light polos (kontras rendah di area foto yang terang). */
.btn-pill-frosted { background: rgba(255, 255, 255, .18); color: #fff; font-weight: 600; border: 2px solid rgba(255, 255, 255, .85); border-radius: 50px; padding: .5rem 1.3rem; backdrop-filter: blur(3px); }
.btn-pill-frosted:hover { background: rgba(255, 255, 255, .3); border-color: #fff; color: #fff; }

.floating-card { position: relative; z-index: 2; margin-top: -3.5rem; background: #fff; border-radius: 18px; box-shadow: 0 12px 30px rgba(27, 75, 143, .18); padding: 1.5rem; }

.card-layanan { border: 0; border-radius: 16px; box-shadow: 0 4px 16px rgba(13, 31, 60, .08); transition: transform .2s ease, box-shadow .2s ease; }
.card-layanan:hover { transform: translateY(-5px); box-shadow: 0 16px 32px rgba(13, 31, 60, .16); }
.card-layanan .icon-wrap {
  width: 64px; height: 64px; border-radius: 18px; display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; color: #fff; margin: 0 auto;
  background: linear-gradient(135deg, var(--navy), var(--bs-primary));
  box-shadow: 0 8px 18px rgba(13, 31, 60, .28);
}

.panel-beranda { border: 0; border-radius: 18px; box-shadow: 0 4px 16px rgba(13, 31, 60, .08); padding: 1.5rem; background: #fff; }

.btn-cta-gradient { background: linear-gradient(135deg, #1b4b8f, #1e7e34); border: 0; border-radius: 50px; color: #fff; font-weight: 600; padding: .65rem 1.6rem; }
.btn-cta-gradient:hover { color: #fff; box-shadow: 0 8px 18px rgba(27, 75, 143, .3); }

.footer-beranda { padding: 2rem 0; color: #b9c6da; font-size: .85rem; background: #10233f; }
.footer-beranda a { color: #d7e2f2; text-decoration: none; }
.footer-beranda a:hover { color: #fff; }

/* ===== Dashboard informasi (statistik) & langkah pengajuan ===== */
.stat-card {
  border: 0; border-radius: 16px; padding: 1.25rem 1rem; text-align: center; height: 100%;
  background: linear-gradient(160deg, #fff, #f3f6fb);
  box-shadow: 0 4px 16px rgba(13, 31, 60, .08);
  transition: transform .2s ease, box-shadow .2s ease;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(13, 31, 60, .16); }
.stat-card .stat-icon {
  width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: #fff; margin: 0 auto .6rem;
  background: linear-gradient(135deg, var(--navy), var(--bs-primary));
  box-shadow: 0 6px 14px rgba(13, 31, 60, .3);
}
.stat-card .stat-number { font-weight: 800; font-size: 1.9rem; color: var(--navy); line-height: 1.1; }
.stat-card .stat-label { color: #6c757d; font-size: .8rem; font-weight: 500; }

/* Judul section dengan garis aksen — dipakai tiap blok konten beranda */
.section-title { font-weight: 800; color: var(--navy); }
.section-title::after {
  content: ''; display: block; width: 60px; height: 4px; margin: .6rem auto 0;
  background: linear-gradient(135deg, var(--bs-primary), #1e7e34); border-radius: 2px;
}
.section-title.text-start::after { margin: .6rem 0 0; }

/* Pita latar lembut untuk memisahkan blok "Cara Mengurus Surat" secara visual */
.section-band { background: linear-gradient(180deg, #eef3fb, #f8f9fc); border-radius: 24px; padding: 2.5rem 1.5rem; }

.step-card {
  text-align: center; padding: 1.75rem 1.25rem; height: 100%; background: #fff; border-radius: 18px;
  box-shadow: 0 6px 18px rgba(13, 31, 60, .07); transition: transform .2s ease, box-shadow .2s ease;
}
.step-card:hover { transform: translateY(-5px); box-shadow: 0 16px 30px rgba(13, 31, 60, .14); }
.step-card .step-number {
  width: 54px; height: 54px; border-radius: 50%; color: #fff; font-weight: 800; font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem;
  background: linear-gradient(135deg, var(--navy), var(--bs-primary));
  box-shadow: 0 8px 16px rgba(13, 31, 60, .32);
}
.step-card h3 { font-size: 1rem; color: var(--navy); font-weight: 700; }
.step-card p { font-size: .85rem; color: #64748b; margin-bottom: 0; }

/* "Kenapa Mengurus Surat Online" — aksen emas (identitas login/portal staf)
   dipakai sebagai pembeda dari .step-card yang navy, supaya aksen emas kita
   terasa dipakai konsisten di seluruh situs, bukan cuma di halaman login. */
.benefit-card {
  text-align: center; padding: 1.75rem 1.25rem; height: 100%; background: #fff; border-radius: 18px;
  box-shadow: 0 6px 18px rgba(13, 31, 60, .07); border-top: 3px solid #ffcc00;
  transition: transform .2s ease, box-shadow .2s ease;
}
.benefit-card:hover { transform: translateY(-5px); box-shadow: 0 16px 30px rgba(13, 31, 60, .14); }
.benefit-card .benefit-icon {
  width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem; background: #fff7d9; color: #8a6d00; font-size: 1.4rem; border: 2px solid #ffcc00;
}
.benefit-card h3 { font-size: 1rem; color: var(--navy); font-weight: 700; }
.benefit-card p { font-size: .85rem; color: #64748b; margin-bottom: 0; }

.badge-gold {
  display: inline-block; background: #fff7d9; color: #8a6d00; border: 1px solid #ffcc00;
  font-size: .72rem; font-weight: 700; border-radius: 20px; padding: .25rem .7rem;
}

/* Pratinjau "gambar contoh surat" di katalog layanan — BUKAN gambar statis,
   tapi template surat asli (isi_html + data contoh) yang sama persis
   dipakai admin & PDF resmi, diskalakan jadi mini halaman A4 lewat container
   query units. Otomatis selalu sesuai template aktif terbaru, tidak pernah
   basi seperti screenshot yang disimpan terpisah. */
.surat-thumb {
  container-type: inline-size;
  width: 100%; aspect-ratio: 210 / 297; overflow: hidden; position: relative;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
  box-shadow: inset 0 0 0 4px #fff, 0 2px 8px rgba(13, 31, 60, .06);
}
.surat-thumb-caption {
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: #8a94a6; margin-bottom: .5rem;
}
.surat-thumb-inner {
  width: 750px; padding: 26px; box-sizing: border-box;
  transform: scale(calc(100cqw / 750px));
  transform-origin: top left;
  color: #000;
}
.surat-thumb-fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 35%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .96));
  pointer-events: none;
}
.surat-thumb-empty {
  height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #94a3b8; font-size: .78rem; text-align: center; padding: 1rem;
}

/* Kop halaman katalog layanan (public/layanan.php) — identitas dinas yang
   sama dengan beranda, dipakai supaya halaman katalog terasa satu kesatuan,
   bukan halaman bootstrap polos yang lepas dari identitas situs. */
.layanan-header {
  background: linear-gradient(135deg, var(--navy), var(--bs-primary) 55%, #1e7e34);
  padding: 2.25rem 0;
}
.layanan-header-back { color: rgba(255, 255, 255, .8); text-decoration: none; font-weight: 600; font-size: .85rem; }
.layanan-header-back:hover { color: #fff; }
.layanan-header-icon {
  width: 60px; height: 60px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: #fff; background: rgba(255, 255, 255, .12); border: 2px solid rgba(255, 255, 255, .3);
  flex-shrink: 0;
}

/* ===== Halaman login (Portal Staf / Masuk Warga) — foto instansi + scrim
   gelap + kartu "kaca buram" + input putih + aksen emas, pola desain login
   lama kita, diadaptasi ke foto & logo sendiri. ===== */
.auth-back-link { color: #fff; opacity: .85; text-decoration: none; font-weight: 600; font-size: .9rem; }
.auth-back-link:hover { color: #fff; opacity: 1; }
/* Dipakai juga di dalam .auth-split-form (surface terang di desktop) —
   warna disesuaikan supaya tetap kebaca, putih hanya saat panel jadi foto
   (mobile, lihat media query .auth-split-form di bawah). */
.auth-split-form .auth-back-link { color: var(--navy); opacity: 1; }
.auth-split-form .auth-back-link:hover { color: var(--bs-primary); }

/* Masuk Warga / Portal Staf — tata letak dua panel (brand kiri + form
   kanan), persis pola desain login lama kita (foto instansi + scrim gelap +
   kartu "kaca buram" + input putih + aksen emas), diadaptasi ke foto & logo
   kita sendiri (bukan foto instansi lain) supaya identitasnya tetap benar. */
.auth-split { min-height: 100vh; display: flex; }
.auth-photo-bg {
  background-image:
    linear-gradient(160deg, rgba(13, 31, 60, .93) 0%, rgba(27, 75, 143, .85) 55%, rgba(13, 31, 60, .95) 100%),
    url('../img/header-bg.png');
  background-size: cover;
  background-position: center 30%;
}
.auth-split-brand {
  flex: 1 1 50%; position: relative; overflow: hidden; color: #fff;
  padding: 3rem; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-split-form {
  flex: 1 1 50%; display: flex; align-items: center; justify-content: center;
  padding: 2.5rem 1rem; background: #f8f9ff;
}
@media (max-width: 767.98px) {
  .auth-split-form {
    min-height: 100vh;
    background-image:
      linear-gradient(160deg, rgba(13, 31, 60, .93) 0%, rgba(27, 75, 143, .85) 55%, rgba(13, 31, 60, .95) 100%),
      url('../img/header-bg.png');
    background-size: cover;
    background-position: center 30%;
  }
  .auth-split-form .auth-back-link { color: #fff; opacity: .85; }
  .auth-split-form .auth-back-link:hover { color: #fff; opacity: 1; }
}

.auth-glass-card {
  position: relative; z-index: 2; width: 100%; max-width: 440px; min-width: 0; color: #fff;
  background: rgba(13, 31, 60, .92); border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 1.5rem; box-shadow: 0 24px 55px rgba(13, 31, 60, .35);
  padding: 2.25rem 2rem; backdrop-filter: blur(8px); box-sizing: border-box;
}
.auth-glass-card label { color: #fff; }

/* Input putih solid (bukan kaca gelap) — persis desain login lama: field
   harus kontras jelas di atas kartu navy, bukan menyatu jadi gelap-atas-gelap. */
.auth-glass-card .form-control,
.auth-glass-card .input-group-text {
  background: #fff; border: 1px solid #c3c6d1; color: #0d1c2e; min-width: 0;
  padding: .65rem .9rem; border-radius: .5rem;
}
.auth-glass-card .input-group-text { border-right: 0; color: #43474f; padding-right: .5rem; }
.auth-glass-card .input-group .form-control { border-left: 0; padding-left: .25rem; }
.auth-glass-card .input-group > :not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.auth-glass-card .input-group > :not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.auth-glass-card .btn-toggle-pw { background: #fff; border: 1px solid #c3c6d1; border-left: 0; color: #43474f; }
.auth-glass-card .form-control::placeholder { color: #6b7280; }
.auth-glass-card .form-control:focus {
  background: #fff; border-color: var(--bs-primary); color: #0d1c2e;
  box-shadow: 0 0 0 .2rem rgba(27, 75, 143, .18);
}

/* Kotak centang "Ingat saya" — bulat, bukan kotak, dan berwarna emas saat
   dicentang (sama seperti referensi lama). */
.auth-glass-card .form-check-input {
  width: 1rem; height: 1rem; border-radius: 50%;
  background-color: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .4);
}
.auth-glass-card .form-check-input:checked { background-color: #ffcc00; border-color: #ffcc00; }
.auth-glass-card .form-check-input:focus { box-shadow: 0 0 0 .2rem rgba(255, 204, 0, .25); }
.auth-glass-card .form-check-label { color: rgba(255, 255, 255, .75); font-size: .85rem; }

/* Aksen emas — tombol utama & link penting, identik dengan referensi lama. */
.btn-gold { background: #ffcc00; color: #6e5700; font-weight: 700; border: 0; border-radius: 1rem; padding: .65rem 1.5rem; }
.btn-gold:hover { background: #e6b800; color: #6e5700; }
.auth-link-gold { color: #ffcc00; text-decoration: none; font-weight: 600; }
.auth-link-gold:hover { color: #fff; text-decoration: underline; }

/* Panel Pengumuman & Berita — aksen navy supaya senada dgn identitas resmi */
.panel-pengumuman { border-top: 4px solid var(--navy); }
.pengumuman-item {
  border-left: 4px solid #f0ad4e; background: #fff8e9; border-radius: 0 12px 12px 0;
  padding: .9rem 1.1rem; margin-bottom: .75rem;
}
.pengumuman-item strong { color: var(--navy); }

.berita-card { overflow: hidden; }
.berita-card .berita-img-wrap { overflow: hidden; border-radius: 16px 16px 0 0; }
.berita-card .berita-img-wrap img { transition: transform .35s ease; display: block; }
.berita-card:hover .berita-img-wrap img { transform: scale(1.08); }
.berita-card .berita-date-badge {
  display: inline-block; background: #eef3fb; color: var(--navy); font-size: .72rem; font-weight: 600;
  padding: .2rem .6rem; border-radius: 20px; margin-top: .35rem;
}

/* ===== Portal Staf & Portal Warga — sidebar kiri (desktop) + laci geser
   (mobile) + bottom tab bar (mobile), pola "desain kita" (lihat
   D:\xampp88\htdocs\CUTI/includes/sidebar.php|topbar.php|mobile-nav.php).
   Sengaja TIDAK mengubah struktur tiap halaman admin/warga satu-satu —
   sidebar position:fixed, dan body diberi kelas via inline <script> di
   includes/admin-nav.php / warga-nav.php sendiri, jadi cukup dua file nav
   ini + CSS di sini untuk berlaku di semua halaman portal itu. */
:root { --sidebar-w: 264px; --sidebar-w-collapsed: 76px; --topbar-h: 64px; --bottombar-h: 64px; }

body.portal-sidebar { padding-bottom: var(--bottombar-h); }
@media (min-width: 992px) {
  body.portal-sidebar { padding-bottom: 0; padding-left: var(--sidebar-w); transition: padding-left .2s ease; }
  body.portal-sidebar.sidebar-collapsed { padding-left: var(--sidebar-w-collapsed); }
}

.app-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w); z-index: 1040;
  background: linear-gradient(180deg, var(--navy), #081226);
  display: flex; flex-direction: column; padding: 1.25rem 0;
  transform: translateX(-100%); transition: transform .25s ease, width .2s ease;
}
body.portal-sidebar.sidebar-open .app-sidebar { transform: translateX(0); box-shadow: 8px 0 24px rgba(0, 0, 0, .3); }
@media (min-width: 992px) {
  .app-sidebar { transform: translateX(0); }
  body.portal-sidebar.sidebar-collapsed .app-sidebar { width: var(--sidebar-w-collapsed); }
  body.portal-sidebar.sidebar-collapsed .app-sidebar:hover { width: var(--sidebar-w); box-shadow: 8px 0 24px rgba(0, 0, 0, .3); }
  body.portal-sidebar.sidebar-collapsed .app-sidebar:not(:hover) .sidebar-label { display: none; }
  body.portal-sidebar.sidebar-collapsed .app-sidebar:not(:hover) .sidebar-submenu { display: none !important; }
}

.app-sidebar-brand { display: flex; align-items: center; gap: .65rem; padding: 0 1.25rem 1.25rem; margin-bottom: .5rem; border-bottom: 1px solid rgba(255, 255, 255, .1); min-width: 0; }
.app-sidebar-brand img { height: 34px; flex-shrink: 0; }
.app-sidebar-brand .sidebar-label { min-width: 0; line-height: 1.2; }
.app-sidebar-brand .sidebar-label .nama { color: #fff; font-weight: 800; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-sidebar-brand .sidebar-label .sub { color: rgba(255, 255, 255, .55); font-size: .72rem; white-space: nowrap; }
.sidebar-collapse-btn {
  margin-left: auto; flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .7); display: none; align-items: center; justify-content: center;
}
.sidebar-collapse-btn:hover { background: rgba(255, 255, 255, .16); color: #fff; }
@media (min-width: 992px) { .sidebar-collapse-btn { display: flex; } }

.app-sidebar-nav { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; padding: 0 .75rem; }
.sidebar-link {
  display: flex; align-items: center; gap: .75rem; padding: .65rem .75rem; margin-bottom: .15rem;
  border-radius: 0 10px 10px 0; border-left: 3px solid transparent; color: rgba(255, 255, 255, .65);
  text-decoration: none; font-size: .88rem; font-weight: 500; background: none; width: 100%; text-align: left; cursor: pointer;
}
.sidebar-link i { font-size: 1.05rem; width: 20px; flex-shrink: 0; text-align: center; }
.sidebar-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sidebar-link.active { border-left-color: #ffcc00; background: rgba(255, 255, 255, .08); color: #fff; font-weight: 700; }
.sidebar-link .chevron { margin-left: auto; transition: transform .15s ease; font-size: .8rem; }
.sidebar-group.open .sidebar-link .chevron { transform: rotate(180deg); }
.sidebar-submenu { display: none; flex-direction: column; padding-left: 2.2rem; margin-bottom: .25rem; }
.sidebar-group.open .sidebar-submenu { display: flex; }
.sidebar-submenu a { display: block; padding: .5rem .6rem; border-radius: 8px; color: rgba(255, 255, 255, .6); text-decoration: none; font-size: .84rem; }
.sidebar-submenu a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sidebar-submenu a.active { background: rgba(255, 255, 255, .1); color: #fff; font-weight: 600; }

.app-sidebar-footer { padding: 1rem 1.25rem 0; margin-top: .5rem; border-top: 1px solid rgba(255, 255, 255, .1); }
.app-sidebar-footer a { display: flex; align-items: center; gap: .75rem; color: rgba(255, 255, 255, .65); text-decoration: none; font-size: .88rem; font-weight: 500; }
.app-sidebar-footer a:hover { color: #ff8787; }
.app-sidebar-footer a i { font-size: 1.05rem; width: 20px; text-align: center; }

.sidebar-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 1035; display: none; }
body.portal-sidebar.sidebar-open .sidebar-backdrop { display: block; }
@media (min-width: 992px) { .sidebar-backdrop { display: none !important; } }

.app-topbar {
  position: sticky; top: 0; z-index: 1020; height: var(--topbar-h); display: flex; align-items: center; gap: .75rem;
  padding: 0 1rem; background: var(--navy); border-bottom: 1px solid rgba(255, 255, 255, .1);
}
@media (min-width: 992px) { .app-topbar { background: #fff; border-bottom: 1px solid #e9edf3; } }
.sidebar-toggle-btn { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: #fff; font-size: 1.3rem; flex-shrink: 0; }
.sidebar-toggle-btn:hover { background: rgba(255, 255, 255, .12); }
@media (min-width: 992px) { .sidebar-toggle-btn { display: none; } }
.app-topbar-brand { display: flex; align-items: center; gap: .5rem; color: #fff; font-weight: 700; min-width: 0; text-decoration: none; }
.app-topbar-brand:hover { color: #fff; }
.app-topbar-brand img { height: 26px; }
.app-topbar-brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 992px) { .app-topbar-brand { display: none; } }
.app-topbar-user { display: none; text-align: right; line-height: 1.2; }
.app-topbar-user .nama { font-weight: 700; color: var(--navy); font-size: .88rem; }
.app-topbar-user .sub { color: #6c757d; font-size: .76rem; }
@media (min-width: 992px) { .app-topbar-user { display: block; margin-left: auto; } }
.app-topbar-avatar {
  width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .15); color: #fff; font-weight: 700; font-size: .82rem; flex-shrink: 0; margin-left: .5rem;
}
@media (min-width: 992px) { .app-topbar-avatar { background: #eef3fb; color: var(--navy); } }
.app-topbar-logout-mobile { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; color: #fff; flex-shrink: 0; }
.app-topbar-logout-mobile:hover { background: rgba(255, 0, 0, .15); }
@media (min-width: 992px) { .app-topbar-logout-mobile { display: none; } }

.app-topbar-icon-btn { position: relative; width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; text-decoration: none; flex-shrink: 0; margin-left: auto; }
.app-topbar-icon-btn:hover { background: rgba(255, 255, 255, .12); color: #fff; }
@media (min-width: 992px) {
  .app-topbar-icon-btn { color: var(--navy); margin-left: .5rem; }
  .app-topbar-icon-btn:hover { background: #eef3fb; color: var(--navy); }
}

.app-bottombar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1030; height: var(--bottombar-h);
  background: var(--navy); border-top: 1px solid rgba(255, 255, 255, .1); display: flex;
}
@media (min-width: 992px) { .app-bottombar { display: none; } }
.app-bottombar a {
  flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem;
  color: rgba(255, 255, 255, .55); text-decoration: none; font-size: .68rem; font-weight: 600; border-top: 3px solid transparent;
}
.app-bottombar a i { font-size: 1.2rem; }
.app-bottombar a.active { color: #fff; border-top-color: #ffcc00; }
