/* ============================================================
   Banner judul halaman (gaya "Slip Gaji") - Izin/Sakit, Cuti, DP3, Edit Profil.
   Murni tampilan: tidak mengubah markup/JS. Tiap halaman beda warna & ikon.
   ============================================================ */
#page-izin .izin-header,
#page-cuti .cuti-header,
#page-dp3 .dp3-header,
#page-profile .settings-header {
    position: relative; overflow: hidden; color: #fff;
    padding: 20px 22px; border-radius: 18px; margin-bottom: 18px;
    align-items: center;
}
#page-izin .izin-header > *, #page-cuti .cuti-header > *,
#page-dp3 .dp3-header > *, #page-profile .settings-header > * { position: relative; z-index: 1; }

/* blok ikon + judul */
#page-izin .izin-info, #page-cuti .cuti-info,
#page-dp3 .dp3-header > div:first-child, #page-profile .settings-header {
    display: grid; grid-template-columns: 52px 1fr; column-gap: 14px; align-items: center;
}
#page-izin .izin-info::before, #page-cuti .cuti-info::before,
#page-dp3 .dp3-header > div:first-child::before, #page-profile .settings-header::before {
    grid-row: 1 / span 2; width: 52px; height: 52px; border-radius: 16px;
    background: rgba(255, 255, 255, .25); display: flex; align-items: center; justify-content: center;
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", sans-serif; font-weight: 900; font-size: 1.3rem;
}
#page-izin .izin-info h2, #page-cuti .cuti-info h2,
#page-dp3 .dp3-header h2, #page-profile .settings-header h2 {
    color: #fff; margin: 0 0 3px; font-size: 1.3rem; font-weight: 700;
}
#page-izin .izin-info p, #page-cuti .cuti-info p,
#page-dp3 .dp3-header p, #page-profile .settings-header p {
    color: #fff; opacity: .95; margin: 0; font-size: .86rem;
}

/* kartu sisa kuota di dalam banner: kaca transparan agar tidak menyatu */
#page-izin .balance-card, #page-cuti .balance-card {
    background: rgba(255, 255, 255, .2); box-shadow: none; border: 1px solid rgba(255, 255, 255, .35);
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
#page-izin .balance-icon, #page-cuti .balance-icon { background: rgba(255, 255, 255, .25); }

/* ── Izin / Sakit : hijau teal ── */
#page-izin .izin-header {
    background: radial-gradient(circle at 92% -20%, rgba(255,255,255,.22) 0 120px, transparent 121px),
                linear-gradient(135deg, #0D9488 0%, #14B8A6 60%, #5EEAD4 100%);
    box-shadow: 0 10px 28px rgba(13, 148, 136, .28);
}
#page-izin .izin-info::before { content: "\f477"; } /* file-medical */

/* ── Cuti : biru ── */
#page-cuti .cuti-header {
    background: radial-gradient(circle at 6% 130%, rgba(255,255,255,.22) 0 110px, transparent 111px),
                radial-gradient(circle at 96% 120%, rgba(255,255,255,.14) 0 90px, transparent 91px),
                linear-gradient(135deg, #1D4ED8 0%, #3B82F6 60%, #60A5FA 100%);
    box-shadow: 0 10px 28px rgba(37, 99, 235, .28);
}
#page-cuti .cuti-info::before { content: "\f5ca"; } /* umbrella-beach */

/* ── DP3 : ungu ── */
#page-dp3 .dp3-header {
    background: repeating-linear-gradient(135deg, rgba(255,255,255,.07) 0 14px, transparent 14px 28px),
                linear-gradient(135deg, #6D28D9 0%, #8B5CF6 60%, #A78BFA 100%);
    box-shadow: 0 10px 28px rgba(109, 40, 217, .28);
}
#page-dp3 .dp3-header > div:first-child::before { content: "\f080"; } /* chart-bar */
#page-dp3 .dp3-year { color: #fff; font-weight: 500; }

/* ── Edit Profil : merah muda (rose) ── */
#page-profile .settings-header {
    background: radial-gradient(circle at 94% 10%, rgba(255,255,255,.2) 0 70px, transparent 71px),
                radial-gradient(circle at 80% 120%, rgba(255,255,255,.14) 0 80px, transparent 81px),
                linear-gradient(135deg, #BE123C 0%, #F43F5E 60%, #FB7185 100%);
    box-shadow: 0 10px 28px rgba(225, 29, 72, .28);
}
#page-profile .settings-header::before { content: "\f2bd"; } /* circle-user */

@media (max-width: 992px) {
    #page-izin .izin-header, #page-cuti .cuti-header { flex-direction: column; align-items: stretch; gap: 14px; }
}
@media (max-width: 600px) {
    #page-izin .izin-header, #page-cuti .cuti-header,
    #page-dp3 .dp3-header, #page-profile .settings-header { padding: 16px; }
    #page-izin .izin-info, #page-cuti .cuti-info,
    #page-dp3 .dp3-header > div:first-child, #page-profile .settings-header { grid-template-columns: 44px 1fr; column-gap: 12px; }
    #page-izin .izin-info::before, #page-cuti .cuti-info::before,
    #page-dp3 .dp3-header > div:first-child::before, #page-profile .settings-header::before { width: 44px; height: 44px; font-size: 1.1rem; border-radius: 14px; }
    #page-izin .izin-info h2, #page-cuti .cuti-info h2,
    #page-dp3 .dp3-header h2, #page-profile .settings-header h2 { font-size: 1.15rem; }
}

/* ── Filter riwayat Izin & Cuti (karyawan): judul di atas, filter satu baris di bawahnya ── */
#page-cuti .cuti-history-card .card-header,
#page-izin .izin-history-card .card-header { flex-wrap: wrap; gap: 10px; }
#page-cuti .cuti-history-card .header-actions { display: flex; gap: 8px; align-items: center; }
#page-cuti .cuti-history-card .header-actions select,
#page-izin .izin-history-card .card-header select {
    height: 38px; padding: 0 10px; border: 1px solid var(--border-color, #e5e7eb); border-radius: 10px;
    font-size: .85rem; background: #fff; min-width: 0; max-width: none !important;
}
@media (max-width: 600px) {
    #page-cuti .cuti-history-card .card-header h3,
    #page-izin .izin-history-card .card-header h3 { flex: 0 0 100%; margin: 0; }
    #page-cuti .cuti-history-card .header-actions { flex: 0 0 100%; width: 100%; }
    #page-cuti .cuti-history-card .header-actions select { flex: 1 1 0; width: 0; }
    #page-izin .izin-history-card .card-header select { flex: 0 0 100%; width: 100%; }
}

/* ============================================================
   Kartu Riwayat Pengajuan Izin & Cuti (karyawan) - tampilan modern.
   Murni CSS (tanpa ubah markup/JS). Warna aksen mengikuti status.
   ============================================================ */
#page-izin .izin-list, #page-cuti .leave-list { display: flex; flex-direction: column; gap: 12px; padding: 14px; }

#page-izin .izin-item, #page-cuti .leave-item {
    --acc: #F59E0B; --acc-soft: rgba(245, 158, 11, .14); --acc-ink: #B45309;
    position: relative; background: #fff; border: 1px solid #eef0f4; border-radius: 16px;
    padding: 14px 14px 14px 18px; gap: 12px; overflow: hidden;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .05);
    transition: box-shadow .2s ease, transform .2s ease;
}
#page-izin .izin-item::before, #page-cuti .leave-item::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--acc);
}
#page-izin .izin-item:hover, #page-cuti .leave-item:hover {
    background: #fff; border-radius: 16px; box-shadow: 0 6px 18px rgba(15, 23, 42, .09); transform: translateY(-1px);
}
#page-izin .izin-item:last-child, #page-cuti .leave-item:last-child { border-bottom: 1px solid #eef0f4; }

/* warna per status (didukung browser modern; tanpa :has tetap oranye) */
#page-izin .izin-item:has(.izin-status.approved), #page-cuti .leave-item:has(.leave-status.approved) {
    --acc: #10B981; --acc-soft: rgba(16, 185, 129, .14); --acc-ink: #047857; }
#page-izin .izin-item:has(.izin-status.rejected), #page-cuti .leave-item:has(.leave-status.rejected) {
    --acc: #EF4444; --acc-soft: rgba(239, 68, 68, .12); --acc-ink: #B91C1C; }
#page-izin .izin-item:has(.izin-status.cancelled), #page-cuti .leave-item:has(.leave-status.cancelled) {
    --acc: #9CA3AF; --acc-soft: rgba(107, 114, 128, .14); --acc-ink: #4B5563; }

/* ikon: kotak lembut berwarna */
#page-izin .izin-icon, #page-izin .izin-icon.sick, #page-izin .izin-icon.permission, #page-izin .izin-icon.emergency,
#page-cuti .leave-icon {
    width: 44px; height: 44px; border-radius: 14px; background: var(--acc-soft); color: var(--acc-ink); font-size: 1.05rem;
}

/* judul + status */
#page-izin .izin-header-row, #page-cuti .leave-header { gap: 8px 10px; margin-bottom: 8px; align-items: flex-start; }
#page-izin .izin-type, #page-cuti .leave-type { font-size: 1rem; font-weight: 700; color: #1e293b; margin: 0; line-height: 1.3; }

#page-izin .izin-status, #page-cuti .leave-status {
    display: inline-flex; align-items: center; gap: 6px; max-width: 100%; text-align: left;
    padding: 5px 12px; border-radius: 999px; font-size: .76rem; font-weight: 700; line-height: 1.3;
    background: var(--acc-soft); color: var(--acc-ink);
}
#page-izin .izin-status::before, #page-cuti .leave-status::before {
    content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0;
}

/* tanggal sebagai chip */
#page-izin .izin-details, #page-cuti .leave-details { margin-bottom: 8px; }
#page-izin .izin-date, #page-cuti .leave-date {
    display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px;
    background: #f8fafc; border: 1px solid #eef0f4; font-size: .8rem; font-weight: 500; color: #475569;
}
#page-izin .izin-date i, #page-cuti .leave-date i { color: var(--acc); }

/* alasan: gelap & mudah dibaca */
#page-izin .izin-reason, #page-cuti .leave-reason { color: #334155; font-size: .88rem; line-height: 1.5; margin: 0; }

/* tombol aksi di dalam kartu: bentuk pil */
#page-izin .izin-content .btn-small, #page-cuti .leave-content .btn-small {
    border-radius: 999px; padding: 7px 14px; font-size: .78rem; font-weight: 600;
}

@media (max-width: 600px) {
    #page-izin .izin-list, #page-cuti .leave-list { padding: 10px; gap: 10px; }
    #page-izin .izin-item, #page-cuti .leave-item { flex-wrap: nowrap; padding: 12px 12px 12px 16px; }
    #page-izin .izin-content, #page-cuti .leave-content { min-width: 0; }
    #page-izin .izin-header-row, #page-cuti .leave-header { flex-direction: column; align-items: flex-start; flex-wrap: nowrap; }
}
