
/* === User === */
    .poms-user {
      position: relative;
      display: flex;
      align-items: center;
      gap: 0.3rem;
      /* (BARU) Tambahkan padding & border-radius untuk 'active' state */
      padding: 0.25rem;
      border-radius: 6px;
      transition: background-color 0.2s ease;
    }
    
    /* (BARU) Style untuk menandai profil aktif */
    .poms-user.active {
        background-color: #f5f5f5; /* Latar abu-abu (sama seperti menu) */
    }
    .poms-user.active .poms-user-link span {
        font-weight: 600; /* Tebalkan username */
    }

    /* ================================================= */
    /* ATURAN RESPONSIVE BERDASARKAN TOMBOL HAMBURGER */
    /* ================================================= */

    /* Untuk tampilan mobile (di bawah 1024px) */
    @media (max-width: 1023px) {
        body {
            padding-top: 52px;
        }

        /* Tampilkan tombol hamburger */
        .hamburger-menu-btn {
            display: inline-block !important; /* atau 'block' */
        }

        /* Sembunyikan navigasi desktop */
        header#main-header nav {
            display: none !important;
        }
    }

    /* Untuk tampilan desktop (1024px ke atas) */
    @media (min-width: 1024px) {
        body {
            padding-top: 79px;
        }

        /* Sembunyikan tombol hamburger */
        .hamburger-menu-btn {
            display: none !important;
        }

        /* Tampilkan navigasi desktop */
        header#main-header nav {
            display: grid !important;
        }
    }
	
	.header-unread-indicator {
      position: relative;
    }

    .header-unread-count {
      position: absolute;
      top: -5px;
      right: -5px;
      background-color: red;
      color: white;
      font-size: 10px;
      min-width: 16px;
      height: 16px;
      padding: 0 4px;
      border-radius: 999px;
      text-align: center;
      line-height: 16px;
      font-weight: bold;
      z-index: 10;
    }

	
	
	/* 1. Pengaturan Dasar (Warna & Transisi) */
    .header-unread-indicator {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        text-decoration: none;
        color: #4b5563; /* Warna ikon default (abu-abu) */
        background-color: transparent; /* Latar belakang transparan */
        transition: background-color 0.2s ease, color 0.2s ease;
    }

    /* 2. Pengaturan Saat Kursor di Atas (Hover) */
    .header-unread-indicator:hover {
        background-color: #e5e7eb; /* Latar belakang abu-abu muda */
        color: #1f2937; /* Warna ikon lebih gelap */
    }

    /* 3. Pengaturan Saat Menu Aktif/Terpilih (Selected/Active) */
    .header-unread-indicator.active {
        background-color: #eff6ff; /* Latar belakang biru muda */
        color: #1d4ed8; /* Warna ikon biru */
    }

    /* 4. Pengaturan Ukuran Responsif */

    /* Ukuran untuk layar BESAR (1200px ke atas) */
    @media (min-width: 1200px) {
        .header-unread-indicator {
            width: 40px;
            height: 40px;
        }
        /* Mengatur ukuran ikon di dalamnya */
        .header-unread-indicator .fa-solid {
            font-size: 20px;
        }
    }

    /* Ukuran untuk layar KECIL (di bawah 1200px) */
    @media (max-width: 1199px) {
        .header-unread-indicator {
            width: 36px;
            height: 36px;
        }
        /* Mengatur ukuran ikon di dalamnya menjadi lebih kecil */
        .header-unread-indicator .fa-solid {
            font-size: 18px;
        }
    }

    /* === PoMS Header Navigation (isolated) === */
    .poms-nav {
      background: #fff;
      position: relative;
      z-index: 50;
      font-family: 'Inter', sans-serif;
    }

    /* === Kiri === */
    .poms-left {
      align-items: center;
      gap: 1rem;
    }

.poms-logo {
      font-weight: 700;
      font-size: 1.3rem;
      color: #333;
      text-decoration: none;
      margin-right: 1rem;
      transition: color 0.3s;
      font-family: 'Montserrat', sans-serif; /* <-- UBAH KE INI */
    }
    .poms-logo:hover {
      color: #007bff;
    }

    .poms-menu {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      list-style: none;
      margin: 0;
      padding: 0;
    }
	
/* Menghapus margin-bottom khusus untuk item menu & ikon di header */
.poms-menu > li,
.poms-icons > li {
    margin-bottom: 0;
}

    /* === PERUBAHAN ELEGANCE (DIMULAI) === */
    .poms-item {
      font-size: 0.9rem;
      color: #444; /* Warna teks default */
      font-weight: 500;
      text-decoration: none;
      padding: 0.4rem 0.6rem; /* Padding agar background terlihat bagus */
      border-radius: 6px; /* Membuat sudut lebih halus */
      transition: background-color 0.2s ease, color 0.2s ease;
    }
    
    .poms-item:hover {
      color: #007bff; /* Teks menjadi biru saat di-hover */
      background-color: #e5e5e5; /* Latar "lebih gelap lagi" */
    }
    
    .poms-item.active {
      color: #444; /* Teks "tetap sama" (default) */
      font-weight: 600;
      background-color: #f5f5f5; /* Latar "agak menggelap" */
    }
    /* === PERUBAHAN ELEGANCE (SELESAI) === */

    .poms-dropdown {
      position: relative;
    }
    .poms-dropdown-menu {
      position: absolute;
      top: 100%;
      left: 0;
      background: #fff;
      border: 1px solid #ddd;
      border-radius: 6px;
      box-shadow: 0 4px 10px rgba(0,0,0,0.05);
      /* display: flex; <-- INI DIHAPUS (PERBAIKAN BUG) */
      flex-direction: column;
      width: 180px;
      padding: 0.3rem 0;
    }
    .poms-dropdown-menu a {
      padding: 0.5rem 1rem;
      color: #333;
      text-decoration: none;
      font-size: 0.9rem;
      transition: background 0.2s;
    }
    .poms-dropdown-menu a:hover {
      background: #f7f7f7;
      color: #007bff;
    }

    /* === Tengah === */
    .poms-center {
      text-align: center;
    }

    /* === Kanan === */
    .poms-right {
      align-items: center;
      gap: 0.5rem;
    }

.poms-icons {
  display: flex;
  gap: 5px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center; /* <-- 1. TAMBAHKAN INI */
}
.poms-icons a {
  color: #555;
  font-size: 1.1rem;
  position: relative;
  transition: color 0.2s;
  /* 2. TAMBAHKAN DUA BARIS DI BAWAH */
  padding: 0.25rem 0.5rem; 
  display: inline-block; 
}
.poms-icons a:hover,
.poms-icons a.active {
  color: #007bff;
}
.poms-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  background: #ff3b3b;
  color: #fff;
  font-size: 10px;
  border-radius: 999px;
  padding: 1px 4px;
}

    .poms-divider {
      width: 1px;
      height: 22px;
      background: #ddd;
      margin: 0 0.5rem;
    }

    /* === User === */
    .poms-user {
      position: relative;
      display: flex;
      align-items: center;
      gap: 0.3rem;
    }
    .poms-user-link {
      display: flex;
      align-items: center;
      gap: 0.4rem;
      text-decoration: none;
      color: #444;
    }
    .poms-avatar {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      object-fit: cover;
      border: 1px solid #ccc;
    }
    .poms-user-link span {
      font-size: 0.9rem;
      font-weight: 500;
    }
    .poms-user-link:hover span {
      color: #007bff;
    }
    .verified {
      color: #1da1f2;
      margin-left: 3px;
    }

    .poms-menu-btn {
      background: none;
      border: none;
      color: #666;
      font-size: 1.1rem;
      cursor: pointer;
      padding: 0.25rem;
      border-radius: 50%;
      transition: background 0.2s;
    }
    .poms-menu-btn:hover {
      background: #f2f2f2;
    }

    .poms-user-menu {
      position: absolute;
      right: 0;
      top: 110%;
      background: #fff;
      border: 1px solid #ddd;
      border-radius: 6px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.1);
      width: 180px;
    }
    .poms-user-menu ul {
      list-style: none;
      margin: 0;
      padding: 0.4rem 0;
    }
    .poms-user-menu a {
      display: flex;
      align-items: center;
      gap: 0.4rem;
      padding: 0.4rem 1rem;
      color: #333;
      text-decoration: none;
      font-size: 0.9rem;
    }
    .poms-user-menu a:hover {
      background: #f5f5f5;
    }
    .poms-user-menu .logout {
      color: #c00;
    }
    .poms-user-menu .logout:hover {
      background: #ffeaea;
    }

    /* === Login === */
    .poms-login-btn {
      background: #007bff;
      color: #fff;
      border: none;
      border-radius: 999px;
      padding: 0.5rem 1rem;
      font-size: 0.9rem;
      font-weight: 500;
      display: flex;
      align-items: center;
      gap: 0.4rem;
      cursor: pointer;
      transition: background 0.2s;
    }
    .poms-login-btn:hover {
      background: #005fc7;
    }
	
/* ================================================== */
/* CSS FOKUS: Pop-up NOTIFIKASI (Layout Grid 2 Baris) */
/* ================================================== */

/* 1. Tombol Pemicu (Berlaku untuk Notif & Pesan) */
.poms-icon-btn {
    color: #555;
    font-size: 1.1rem;
    position: relative;
    transition: color 0.2s;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}
.poms-icon-btn:hover,
.poms-icon-btn.active {
    color: #007bff;
}

/* 2. Kontainer Dropdown (NOTIFIKASI) */
.poms-notif-dropdown {
    position: absolute;
    right: 0;
    top: 130%;
    width: 380px; /* Lebar untuk notifikasi */
    max-height: 400px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    z-index: 60;
    flex-direction: column;
}

/* 3. Header & Footer (NOTIFIKASI) */
.poms-notif-header,
.poms-notif-footer {
    padding: 0.75rem 1rem;
    font-weight: 600;
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}
.poms-notif-footer {
    padding: 0.6rem 1rem;
    border-top: 1px solid #eee;
    border-bottom: none;
    text-align: center;
    font-size: 0.85rem;
}
.poms-notif-footer a {
    color: #555;
    font-weight: 500;
    text-decoration: none;
}
.poms-notif-footer a:hover {
    color: #111;
    text-decoration: underline;
}

/* 4. Konten & Placeholder (NOTIFIKASI) */
.poms-notif-content {
    overflow-y: auto; /* Scroll Atas-Bawah */
    flex-grow: 1;
}
.poms-notif-loading, .poms-notif-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: #777;
    font-size: 0.9rem;
}

/* 5. Item Layout (NOTIFIKASI - Sesuai notification.php) */
.poms-notif-dropdown .poms-notif-item { /* <-- Dibuat lebih spesifik */
    display: flex !important; /* <-- Dipaksa 'flex' */
    flex-direction: row !important; /* <-- Eksplisit satu baris */
    align-items: flex-start !important; /* Sejajar di atas */
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s;
}
.poms-notif-item:last-child {
    border-bottom: none;
}
.poms-notif-item:hover {
    background-color: #f7f7f7;
}

/* 6. Grid Kiri: Avatar/Ikon */
.poms-notif-avatar-wrapper {
    flex-shrink: 0; /* Mencegah ikon gepeng */
    margin-top: 2px;
}
.poms-notif-avatar,
.poms-notif-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.poms-notif-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 7. Grid Kanan: Konten Wrapper */
.poms-notif-content-wrapper {
    flex-grow: 1; /* Mengisi sisa ruang */
    min-width: 0; /* Penting untuk flexbox */
}

/* 8. Baris 1: Username & Waktu */
.poms-notif-header-row {
    display: flex;
    /* justify-content: space-between; <-- DIHAPUS */
    align-items: baseline;
    gap: 0.5rem;
}
.poms-notif-username {
    font-size: 0.9rem;
    font-weight: 600; /* Ditebalkan oleh <strong> */
    white-space: nowrap; /* Jangan wrap username */
    overflow: hidden;
    text-overflow: ellipsis;
}
.poms-notif-time {
    font-size: 0.75rem; /* Tipis */
    color: #666;
    flex-shrink: 0; /* Jangan biarkan waktu gepeng */
    white-space: nowrap;
}

/* 9. Baris 2: Isi Notifikasi */
.poms-notif-message-row {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #333;
    margin-top: 2px;
    
    /* FIX: Anti-Scroll Horizontal */
    white-space: normal;
    word-break: break-word;
    
    /* Batasi teks hingga 2 baris */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ======================================= */
/* CSS BARU: Pop-up PESAN (Layout 3-Grid) */
/* ======================================= */

/* 1. Kontainer Dropdown (PESAN) */
.poms-msg-dropdown {
    position: absolute;
    right: 0;
    top: 130%;
    width: 360px; /* Lebar terpisah */
    max-height: 400px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    z-index: 60;
    flex-direction: column;
}

/* 2. Header & Footer (PESAN) */
.poms-msg-header,
.poms-msg-footer {
    padding: 0.75rem 1rem;
    font-weight: 600;
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}
.poms-msg-footer {
    padding: 0.6rem 1rem;
    border-top: 1px solid #eee;
    border-bottom: none;
    text-align: center;
    font-size: 0.85rem;
}
.poms-msg-footer a {
    color: #555;
    font-weight: 500;
    text-decoration: none;
}
.poms-msg-footer a:hover {
    color: #111;
    text-decoration: underline;
}

/* 3. Konten (PESAN) */
.poms-msg-content {
    overflow-y: auto;
    flex-grow: 1;
}

/* 4. Item Layout (PESAN - 3 Grid Flexbox) */
.poms-msg-dropdown .poms-msg-item { 
    display: flex !important; 
    flex-direction: row !important; 
    align-items: center !important; 
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s;
}
.poms-msg-item:last-child {
    border-bottom: none;
}
.poms-msg-item:hover {
    background-color: #f7f7f7;
}

/* 5. Grid 1: Avatar (Kiri) */
.poms-msg-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* 6. Grid 2: Username (Tengah, mengisi 80%) */
.poms-msg-username {
    flex-grow: 1; /* <-- KUNCI: Mengisi sisa ruang */
    min-width: 0; /* <-- KUNCI: Agar bisa mengecil */
    font-size: 0.9rem;
    color: #333;
    /* KUNCI: Otomatis terpotong */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 7. Grid 3: Badge (Kanan) */
.poms-msg-badge {
    background: #ff3b3b;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 999px;
    height: 16px;
    line-height: 14px;
    flex-shrink: 0;
    margin-left: 0.5rem; /* Jarak dari username */
}




/* ================================================== */
/* CSS FOKUS: Pop-up SEARCH HEADER BARU (Desktop)     */
/* ================================================== */

/* 1. Kontainer <li> baru, untuk transisi */
#header-search-container {
    
    /* Kondisi awal: tersembunyi */
    width: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap; /* Jaga agar tetap satu baris */
}

/* 2. State 'active' (saat di-klik) */
#header-search-container.search-active {
    width: 240px; /* Lebar form saat muncul */
    opacity: 1;
    margin-right: 8px; /* Jarak antara form dan ikon search */
}

/* 3. Form di dalamnya (DENGAN ID PARENT) */
#header-search-container .header-search-form {
    display: flex;
    align-items: center;
    width: 100%;
    border: 1px solid #ddd; /* Border abu-abu tipis */
    border-radius: 999px; /* Bentuk kapsul */
    overflow: hidden; /* Agar border-radius rapi */
	z-index: 10;
}

/* 4. Input field (DENGAN ID PARENT) */
#header-search-container .header-search-input {
    border: none;
    outline: none;
    padding: 7px 14px; /* Padding (atas/bawah 7px, kiri/kanan 14px) */
    font-size: 0.9rem;
    width: 100%; /* Mengisi sisa ruang */
    min-width: 0; /* Perbaikan untuk flexbox */
    color: #333;
    
    /* (Reset style global) */
    margin: 0; /* Membatalkan 'margin: 10px 0' dari style.css */
}
#header-search-container .header-search-input::placeholder {
    color: #888;
}

/* 5. Tombol Filter (kanan) (DENGAN ID PARENT) */
#header-search-container .header-search-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    color: #666; /* Warna ikon filter */
    text-decoration: none;
    border-left: 1px solid #eee; /* Garis pemisah tipis */
    transition: color 0.2s, background-color 0.2s;
}
#header-search-container .header-search-filter-btn:hover {
    color: #007bff; /* Warna biru saat hover */
    background-color: #e9e9e9;
}

/* ================================================== */
/* CSS FOKUS: SEMBUNYIKAN IKON SAAT SEARCH AKTIF      */
/* ================================================== */

/* 1. Sembunyikan elemen-elemen ini... */
.poms-right.search-mode-active #header-notif-li,
.poms-right.search-mode-active #header-msg-li,
.poms-right.search-mode-active .poms-divider,
.poms-right.search-mode-active .poms-user {
    display: none;
}

/* 2. Beri transisi yang lebih mulus untuk search bar */
#header-search-container.search-active {
    width: 320px; /* Beri lebar sedikit lebih besar */
}
