/* PBUHub UI kongsi — banner tajuk & tab (warna sama seperti sidebar). Sama untuk web & telefon. */

:root {
    --pbu-side-1: #06275a;
    --pbu-side-2: #07356f;
    --pbu-side-3: #0b4a93;
    --pbu-gold-1: #F8B814;
    --pbu-gold-2: #FFC94B;
}

/* ---------- Banner tajuk ---------- */
.pbu-banner {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding: 22px 26px;
    border-radius: 20px;
    color: #FFFFFF;
    background: linear-gradient(135deg, var(--pbu-side-1) 0%, var(--pbu-side-2) 58%, var(--pbu-side-3) 100%);
    box-shadow: 0 14px 34px rgba(6, 39, 90, .18);
    isolation: isolate;
}
.pbu-banner::before,
.pbu-banner::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}
.pbu-banner::before {
    width: 280px; height: 280px; right: -70px; top: -150px;
    border: 1px solid rgba(248, 184, 20, .28);
    box-shadow: 0 0 0 34px rgba(255, 255, 255, .04), 0 0 0 68px rgba(255, 255, 255, .025);
}
.pbu-banner::after {
    width: 180px; height: 180px; left: 38%; bottom: -120px;
    background: radial-gradient(circle, rgba(255, 255, 255, .08), transparent 70%);
}
.pbu-banner-main { display: flex; align-items: center; gap: 16px; min-width: 0; flex: 1 1 380px; }
.pbu-banner-icon {
    flex: none;
    width: 54px; height: 54px;
    display: grid; place-items: center;
    border-radius: 16px;
    font-size: 1.45rem;
    color: #082347;
    background: linear-gradient(135deg, var(--pbu-gold-1), var(--pbu-gold-2));
    box-shadow: 0 8px 20px rgba(248, 184, 20, .3);
}
.pbu-banner-eyebrow {
    display: block;
    margin-bottom: 3px;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--pbu-gold-2);
}
.pbu-banner h1, .pbu-banner h2 {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.2;
    color: #FFFFFF;
}
.pbu-banner-title-line {
    display: block;
    width: 64px; height: 3px;
    margin-top: 8px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--pbu-gold-1), rgba(248, 184, 20, .15));
}
.pbu-banner p { margin: 8px 0 0; font-size: .86rem; color: #C9D6EE; max-width: 760px; }
.pbu-banner-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pbu-banner-meta .badge { font-weight: 700; }
.pbu-banner-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; position: relative; }

/* Butang dalam banner */
.btn-gold {
    border: 0;
    font-weight: 700;
    color: #082347;
    background: linear-gradient(135deg, var(--pbu-gold-1), var(--pbu-gold-2));
    box-shadow: 0 8px 20px rgba(248, 184, 20, .25);
}
.btn-gold:hover, .btn-gold:focus { color: #082347; filter: brightness(1.04); }
.btn-ghost-light {
    font-weight: 700;
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, .35);
    background: rgba(255, 255, 255, .08);
}
.btn-ghost-light:hover, .btn-ghost-light:focus { color: #FFFFFF; background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .55); }
.pbu-banner-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: .78rem; font-weight: 700;
    color: #FFFFFF;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
}

/* ---------- Tab (aktif = emas seperti sidebar) ---------- */
.pbu-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
    padding: 6px;
    border: 1px solid #E6EBF2;
    border-radius: 16px;
    background: #FFFFFF;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.pbu-tabs a, .pbu-tabs span.pbu-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 15px;
    border-radius: 11px;
    font-size: .82rem;
    font-weight: 700;
    color: #3B4A66;
    text-decoration: none;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.pbu-tabs a:hover { background: #EEF3FB; color: var(--pbu-side-1); }
.pbu-tabs a.is-active {
    color: #082347;
    background: linear-gradient(135deg, var(--pbu-gold-1), var(--pbu-gold-2));
    box-shadow: 0 6px 16px rgba(248, 184, 20, .25);
}
.pbu-tabs span.pbu-tab.is-disabled { color: #A0AABB; cursor: not-allowed; }
.pbu-tab-count {
    min-width: 22px;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 800;
    text-align: center;
    background: #EEF3FB;
    color: var(--pbu-side-2);
}
.pbu-tabs a.is-active .pbu-tab-count { background: rgba(8, 35, 71, .14); color: #082347; }

/* Bar alat di bawah tab (cth carian) */
.pbu-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.pbu-toolbar .pbu-tabs { margin-bottom: 0; }

@media (max-width: 767.98px) {
    .pbu-banner { padding: 18px 16px; border-radius: 16px; }
    .pbu-banner-icon { width: 44px; height: 44px; font-size: 1.15rem; border-radius: 13px; }
    .pbu-banner h1, .pbu-banner h2 { font-size: 1.25rem; }
    .pbu-banner-actions { width: 100%; }
    .pbu-banner-actions .btn { flex: 1 1 auto; }
    .pbu-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .pbu-tabs::-webkit-scrollbar { display: none; }
    .pbu-tabs a, .pbu-tabs span.pbu-tab { flex: none; padding: 8px 12px; }
}

/* ---------- Carian langsung (cadangan semasa menaip) ---------- */
.live-search-host { position: relative; }
.live-search-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 1080;
    width: max(100%, 340px);
    max-width: min(520px, calc(100vw - 32px));
    max-height: 420px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid #E6EBF2;
    border-radius: 14px;
    background: #FFFFFF;
    box-shadow: 0 18px 40px rgba(6, 39, 90, .16);
}
.live-search-group {
    padding: 8px 10px 4px;
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--pbu-side-2);
}
.live-search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    color: #0F2347;
    text-decoration: none;
}
.live-search-item:hover, .live-search-item.is-active { background: #EEF3FB; color: #0F2347; }
.live-search-item.is-active { box-shadow: inset 3px 0 0 var(--pbu-gold-1); }
.live-search-icon {
    flex: none;
    width: 30px; height: 30px;
    display: grid; place-items: center;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--pbu-side-1), var(--pbu-side-3));
    color: var(--pbu-gold-2);
    font-size: .85rem;
}
.live-search-text { min-width: 0; display: flex; flex-direction: column; }
.live-search-text strong { font-size: .82rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-search-text small { font-size: .7rem; color: #64748B; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-search-item mark { padding: 0 1px; border-radius: 3px; background: #FFF1C2; color: inherit; }
.live-search-empty { padding: 12px; font-size: .8rem; color: #64748B; }
.live-search-foot { padding: 8px 10px 4px; border-top: 1px solid #EEF1F6; margin-top: 4px; font-size: .7rem; color: #64748B; }
.live-search-foot kbd { padding: 1px 5px; font-size: .65rem; background: var(--pbu-side-2); }
@media (max-width: 767.98px) { .live-search-menu { width: 100%; min-width: 0; } }

/* ===== Fasa 4: pemilih skop paparan (topbar) & banner "Lihat Sebagai" ===== */
.scope-picker { position: relative; }
.scope-chip {
    display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px;
    border: 1px solid #DCE5F2; border-radius: 999px; background: #F5F8FD; color: #07356f;
    font-size: .74rem; font-weight: 600; white-space: nowrap;
}
.scope-chip:hover, .scope-chip[aria-expanded="true"] { background: #EAF1FC; border-color: #BFD0EA; }
.scope-chip strong { color: #06275a; }
.scope-chip > .bi-binoculars { color: #C99308; font-size: .95rem; }
.scope-menu { min-width: 200px; border-radius: 12px; border-color: #E2E8F0; box-shadow: 0 14px 34px rgba(6, 39, 90, .14); padding: 6px; }
.scope-menu form { margin: 0; }
.scope-menu .dropdown-item { border-radius: 8px; font-size: .82rem; font-weight: 600; }
.scope-menu .dropdown-item.active { background: linear-gradient(135deg, #F8B814, #FFC94B); color: #06275a; }
.view-as-banner {
    display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 12px 16px;
    border-radius: 14px; background: linear-gradient(135deg, #FDE68A, #FCD34D); color: #422006;
    border: 1px solid #F59E0B; box-shadow: 0 8px 22px rgba(245, 158, 11, .25);
}
.view-as-banner > .bi { font-size: 1.6rem; }
.view-as-banner strong { display: block; font-size: .9rem; }
.view-as-banner small { font-size: .74rem; }
.view-as-banner form { margin: 0; }
.scope-panel { display: flex; align-items: center; gap: 14px; }
.scope-panel .scope-icon {
    width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex: 0 0 auto;
    background: linear-gradient(135deg, #06275a, #0b4a93); color: #F8B814; font-size: 1.3rem;
}
@media (max-width: 767px) {
    .scope-chip-label { display: none; }
    .scope-chip { width: 38px; padding: 0; justify-content: center; }
    .scope-chip > .bi-chevron-down { display: none; }
    .view-as-banner { flex-wrap: wrap; }
    .view-as-banner form, .view-as-banner form .btn { width: 100%; }
}

/* ===== Fasa 5: sesi aktif & tahun operasi (topbar) ===== */
.context-chip {
    display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 6px 0 12px;
    border-radius: 999px; background: linear-gradient(135deg, #06275a, #0b4a93); color: #E2E8F0;
    font-size: .72rem; white-space: nowrap; text-decoration: none;
}
a.context-chip:hover { color: #fff; box-shadow: 0 6px 16px rgba(6, 39, 90, .25); }
.context-chip > .bi { color: #F8B814; }
.context-chip strong { color: #fff; font-weight: 700; }
.context-week { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: rgba(248, 184, 20, .18); color: #FFD66B; font-weight: 700; }
.context-year { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 999px; background: linear-gradient(135deg, #F8B814, #FFC94B); color: #06275a; font-weight: 800; }
@media (max-width: 991px) { .context-chip-label { display: none; } .context-chip { padding: 0 4px 0 10px; } }

/* Sidebar modul (05/11): kumpulan boleh lipat dalam module-sidebar — sama gaya dengan hub-sidebar */
.module-sidebar .sidebar-group{margin:3px 0}
.module-sidebar .sidebar-group-toggle{width:100%;border:0;background:transparent;text-align:left}
.module-sidebar .sidebar-submenu .sidebar-link{min-height:38px;padding:8px 10px 8px 42px;font-size:.76rem}
.module-sidebar .sidebar-section-title{color:#cfc3ee}
.module-sidebar .sidebar-badge{margin-left:auto}
.module-sidebar .estaf-role-switcher-menu small{display:block;font-weight:500;opacity:.8}

/* Modal borang (05/11) — tiada borang di tepi; tambahan maklumat dalam popup. Kepala warna banner. */
.pbu-modal .modal-content{border:0;border-radius:18px;overflow:hidden;box-shadow:0 24px 60px rgba(8,35,71,.28)}
.pbu-modal .pbu-modal-head{background:linear-gradient(135deg,#082347,#123a73 60%,#1b4d8f);color:#fff;border-bottom:3px solid #F8B814;padding:14px 18px}
.pbu-modal .modal-title{display:flex;align-items:center;gap:10px;font-weight:800;margin:0}
.pbu-modal .pbu-modal-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:linear-gradient(135deg,#F8B814,#FFC94B);color:#082347;font-size:1rem}
.pbu-modal .modal-body{padding:18px}
.pbu-modal .modal-body .form-label{font-weight:600;font-size:.82rem;margin-bottom:2px}
.pbu-modal .modal-footer{border-top:1px solid #eef2f7;padding:12px 18px}

/* Warna sidebar setiap modul (05/11) — diambil dari PBUHub lama (estaf-sidebar.css, app.css ecot/generic, einovasi.css, egreen-admin.css, eeksa.css). */
#sidebar.module-sidebar--e-staf{background:linear-gradient(180deg,#211047 0%,#3d247b 52%,#24134f 100%)}
#sidebar.module-sidebar--e-staf .module-identity-icon{background:#f5efff;color:#7842ff}
/* e-COT (arahan pemilik 11/11): UNGU warna utama; hijau hanya sebagai padanan lembut di bawah ("sidebar nampak contrast sangat").
   Peralihan ikut roda warna ungu → indigo → biru → teal pudar (tiada lompatan terus ungu ke hijau) + cahaya teal lembut di sudut bawah. */
#sidebar.module-sidebar--e-cot{background:
    radial-gradient(110% 32% at 0% 100%,rgba(32,178,170,.30) 0%,rgba(32,178,170,0) 70%),
    radial-gradient(90% 26% at 100% 0%,rgba(168,85,247,.16) 0%,rgba(168,85,247,0) 70%),
    linear-gradient(180deg,#251044 0%,#331860 34%,#3a1f6e 54%,#33296f 70%,#29396f 82%,#1f4f6c 92%,#1a5e66 100%)}
#sidebar.module-sidebar--e-cot .module-identity-icon{background:linear-gradient(135deg,#7c4ddf 0%,#5b3fc4 55%,#1f9a92 100%);color:#fff}
#sidebar.module-sidebar--e-cot .sidebar-section-title{color:#9fe3dc}
#sidebar.module-sidebar--e-cot .sidebar-link.is-active{background:linear-gradient(90deg,#5a32b5 0%,#4b3aa6 60%,#2f6f86 100%);color:#fff;border-color:transparent;border-left:3px solid #7fe0d8;box-shadow:0 6px 16px rgba(37,16,68,.35)}
#sidebar.module-sidebar--e-cot .sidebar-link.is-active>i{color:#fff}
#sidebar.module-sidebar--e-cot .sidebar-logout{color:#ffc4c8}
#sidebar.module-sidebar--e-inovasi{background:linear-gradient(180deg,#09985F 0%,#248E9E 30%,#447FB3 52%,#6668BA 76%,#8254C1 100%)}
#sidebar.module-sidebar--e-inovasi .module-identity-icon{background:#ede9fe;color:#6d28d9}
#sidebar.module-sidebar--e-inovasi .sidebar-link.is-active{background:#ede9fe;color:#4c1d95;border-left:3px solid #8b5cf6;box-shadow:none}
#sidebar.module-sidebar--e-green{background:linear-gradient(165deg,#166534,#15803d 55%,#0d5140)}
#sidebar.module-sidebar--e-green .module-identity-icon{background:#dcfce7;color:#15803d}
#sidebar.module-sidebar--e-green .sidebar-link.is-active{background:#dcfce7;color:#14532d;border-left:3px solid #86efac;box-shadow:none}
#sidebar.module-sidebar--e-eksa{background:linear-gradient(180deg,#1F4D33 0%,#2F6644 55%,#1F4D33 100%)}
#sidebar.module-sidebar--e-eksa .module-identity-icon{background:linear-gradient(135deg,#2F6644,#2E9B52);color:#fff}
#sidebar.module-sidebar--e-eksa .sidebar-link.is-active{background:#EAF4E6;color:#2F6644;border-left:3px solid #8CC63F;box-shadow:none}
#sidebar.module-sidebar--e-pelajar{background:linear-gradient(180deg,#123b66,#176b78 58%,#0f4658)}
#sidebar.module-sidebar--e-pelajar .module-identity-icon{background:#e0f2fe;color:#0f4c81}
.module-sidebar .sidebar-section-title{color:rgba(255,255,255,.72)}

/* e-Kejayaan (Fasa 14) — sidebar emas/ambar (trofi) + bar ringkas */
#sidebar.module-sidebar--e-kejayaan{background:linear-gradient(180deg,#0E9F6E 0%,#0F9A8A 30%,#1487B8 62%,#1D5FBF 100%)}
#sidebar.module-sidebar--e-kejayaan .module-identity-icon{background:#dcfce7;color:#047857}
#sidebar.module-sidebar--e-kejayaan .sidebar-link.is-active{background:#e0f7f4;color:#0b4f6c;border-left:3px solid #34d399;box-shadow:none}
.kj-bar{display:grid;grid-template-columns:minmax(90px,34%) 1fr auto;gap:.5rem;align-items:center;font-size:.82rem;padding:.2rem 0}
.kj-bar-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#334155}
.kj-bar-track{height:.55rem;background:#eef2f7;border-radius:99px;overflow:hidden}
.kj-bar-fill{display:block;height:100%;background:linear-gradient(90deg,#b45309,#f5b301);border-radius:99px}
/* Carian langsung dalam modal: menu mengalir dalam badan modal (tidak terpotong oleh overflow modal-body). */
.pbu-modal .live-search-menu{position:static;margin-top:4px;max-height:240px;overflow:auto}
/* e-Dashboard: tema "campuran 3 biru" (arahan pemilik 10/11 malam) — biru gelap + kecerunan teal → biru → indigo. */
#sidebar.module-sidebar--e-dashboard{background:linear-gradient(180deg,#0f1f45 0%,#1a2f62 55%,#132a5c 100%)}
#sidebar.module-sidebar--e-dashboard .module-identity-icon{background:linear-gradient(135deg,#12a89e,#2f7fe4 55%,#5048d6);color:#fff}
#sidebar.module-sidebar--e-dashboard .sidebar-link.is-active{background:linear-gradient(90deg,#12a89e 0%,#2f7fe4 58%,#5048d6 100%);color:#fff;box-shadow:0 8px 20px rgba(47,127,228,.3)}
#sidebar.module-sidebar--e-dashboard .sidebar-link.is-active>i{color:#fff}

/* =========================================================================================================
   Banner halaman (arahan pemilik 10/11): SATU gaya untuk semua halaman — gaya "Dashboard Politeknik" e-Staf
   (kotak ikon lut sinar, tajuk besar, bulatan hiasan, panel kanan). Warna ikut sidebar modul semasa:
   .app-shell.module-theme--{slug} menetapkan --mb-1/2/3 (kecerunan), --mb-eyebrow, --mb-shadow.
   ========================================================================================================= */
.app-shell { --mb-1: #06275a; --mb-2: #0b3f86; --mb-3: #1d5fc4; --mb-eyebrow: #FFD66B; --mb-shadow: rgba(6, 39, 90, .24); }
.module-theme--e-staf { --mb-1: #21113f; --mb-2: #3d247b; --mb-3: #6a3fd0; --mb-eyebrow: #ffdc53; --mb-shadow: rgba(33, 17, 63, .3); }
.module-theme--e-cot { --mb-1: #251044; --mb-2: #351963; --mb-3: #168f89; --mb-eyebrow: #67ddd7; --mb-shadow: rgba(37, 16, 68, .3); }
.module-theme--e-inovasi { --mb-1: #09985F; --mb-2: #447FB3; --mb-3: #8254C1; --mb-eyebrow: #ecfccb; --mb-shadow: rgba(68, 127, 179, .3); }
.module-theme--e-green { --mb-1: #14532d; --mb-2: #15803d; --mb-3: #22a35a; --mb-eyebrow: #bbf7d0; --mb-shadow: rgba(21, 128, 61, .28); }
.module-theme--e-eksa { --mb-1: #1F4D33; --mb-2: #2F6644; --mb-3: #2E9B52; --mb-eyebrow: #d9f99d; --mb-shadow: rgba(31, 77, 51, .3); }
.module-theme--e-pelajar { --mb-1: #123b66; --mb-2: #176b78; --mb-3: #1b8fa0; --mb-eyebrow: #a5f3fc; --mb-shadow: rgba(18, 59, 102, .28); }
.module-theme--e-kejayaan { --mb-1: #0E9F6E; --mb-2: #1289A7; --mb-3: #1D5FBF; --mb-eyebrow: #d9f99d; --mb-shadow: rgba(18, 137, 167, .3); }
.module-theme--e-dashboard { --mb-1: #0f1f45; --mb-2: #2f7fe4; --mb-3: #5048d6; --mb-eyebrow: #8ff0e4; --mb-shadow: rgba(15, 31, 69, .28); }

.pbu-banner {
    padding: 30px 32px;
    border-radius: 22px;
    gap: 22px;
    margin-bottom: 22px;
    background: linear-gradient(120deg, var(--mb-1) 0%, var(--mb-2) 55%, var(--mb-3) 100%);
    box-shadow: 0 16px 36px var(--mb-shadow);
}
.pbu-banner::before { width: 360px; height: 360px; right: -70px; top: -120px; border: 0; box-shadow: none; background: rgba(255, 255, 255, .07); }
.pbu-banner::after { width: 220px; height: 220px; left: auto; right: 220px; bottom: -150px; background: rgba(255, 255, 255, .04); }
.pbu-banner-main { gap: 22px; }
.pbu-banner-icon {
    width: 84px; height: 84px; border-radius: 24px; font-size: 2.2rem;
    color: #FFFFFF; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); box-shadow: none;
}
.pbu-banner-eyebrow { font-size: .72rem; letter-spacing: .14em; color: var(--mb-eyebrow); margin-bottom: 4px; }
.pbu-banner h1, .pbu-banner h2 { font-size: clamp(1.35rem, 2.3vw, 1.95rem); letter-spacing: -.01em; }
.pbu-banner-title-line { display: none; }
.pbu-banner p { font-size: .9rem; color: rgba(255, 255, 255, .86); max-width: 720px; margin-top: 6px; }
.pbu-banner-actions { position: relative; z-index: 1; }
/* Panel kanan (cth Tahun data / jumlah) — sama seperti ad-banner-meta e-Staf. */
.pbu-banner-panel { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; padding: 12px 18px;
    border-radius: 14px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); color: #FFFFFF; }
.pbu-banner-panel small { font-size: .72rem; color: rgba(255, 255, 255, .75); text-transform: uppercase; letter-spacing: .06em; }
.pbu-banner-panel strong { font-size: 1.15rem; font-weight: 800; }

/* Banner / hero e-Staf (pf-hero, ep-banner, ad-banner, ss-hero) mengikut warna modul yang sama. */
.app-shell .pf-hero, .app-shell .ep-banner, .app-shell .ad-banner, .app-shell .ss-hero, .app-shell .ec-banner {
    background: linear-gradient(120deg, var(--mb-1) 0%, var(--mb-2) 55%, var(--mb-3) 100%) !important;
    box-shadow: 0 16px 36px var(--mb-shadow) !important;
}
.app-shell .pf-hero .pf-eyebrow, .app-shell .ss-hero .ss-eyebrow { color: var(--mb-eyebrow) !important; }
.app-shell .pf-hero::after { width: 340px; height: 340px; right: -70px; top: -110px; }

@media (max-width: 767.98px) {
    .pbu-banner { padding: 20px 18px; border-radius: 18px; gap: 14px; }
    .pbu-banner-main { gap: 14px; }
    .pbu-banner-icon { width: 56px; height: 56px; font-size: 1.5rem; border-radius: 16px; }
    .pbu-banner-panel { align-items: flex-start; width: 100%; }
}

/* ── Butang tindakan piawai (x-doc-actions, arahan pemilik 10/11) ─────────────────────────────
   Kembali di kiri; Lihat / Excel / Word / PDF / Cetak di KANAN. Butang paling kanan = tindakan utama (warna modul). */
.pbu-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 16px; }
.pbu-actions-end { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.pbu-act {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; padding: 0 16px;
    border-radius: 11px; border: 1px solid #d8e0ec; background: #fff; color: #334766;
    font-size: .84rem; font-weight: 700; line-height: 1; text-decoration: none; white-space: nowrap; cursor: pointer;
    transition: background .15s, border-color .15s, filter .15s;
}
.pbu-act:hover, .pbu-act:focus-visible { background: #f5f7fb; border-color: #c3cfe2; color: #1c2f52; }
.pbu-act i { font-size: 1rem; }
.pbu-act--view i { color: var(--mb-3, #1d5fc4); }
.pbu-act--excel i { color: #15803d; }
.pbu-act--word i { color: #2563eb; }
.pbu-act--pdf i { color: #dc2626; }
.pbu-act--primary, .pbu-act--primary:hover, .pbu-act--primary:focus-visible {
    background: var(--mb-2, #0b3f86); border-color: transparent; color: #fff; box-shadow: 0 6px 16px var(--mb-shadow, rgba(6, 39, 90, .24));
}
.pbu-act--primary i { color: #fff; }
.pbu-act--primary:hover, .pbu-act--primary:focus-visible { filter: brightness(1.12); }
.pbu-act--back { border-color: transparent; background: transparent; color: #475877; padding: 0 12px 0 6px; }
.pbu-act--back:hover, .pbu-act--back:focus-visible { background: #eaf0f8; border-color: transparent; }
.pbu-act-banner { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.pbu-banner-actions { justify-content: flex-end; }
@media (max-width: 575px) {
    .pbu-actions-end { width: 100%; }
    .pbu-actions-end .pbu-act { flex: 1 1 auto; }
}
@media print { .pbu-actions, .pbu-actions-end { display: none !important; } }

/* ── Suis PERANAN + PAPARAN dalam kepala sidebar modul (gaya e-Staf; guna semula oleh modul lain, cth e-PI) ──
   Asas (.estaf-role-context-row / .estaf-role-switcher*) dalam responsive.css; di sini hanya pembahagian dua bahagian. */
#sidebar .module-switch-current { min-height: 56px; align-content: center; gap: 5px; }
#sidebar .module-switch-current strong { display: block; font-size: .9rem; line-height: 1.25; color: #ffdc53; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#sidebar .module-switch-chip { justify-self: start; display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .26); color: #fff; font-size: .62rem; font-weight: 700; }
#sidebar .module-switch-chip i { font-size: .66rem; }
#sidebar .module-switch-menu { width: min(234px, calc(100vw - 48px)); max-height: min(520px, 65dvh); overflow-y: auto; padding: 6px; }
#sidebar .module-switch-section { padding: 4px 2px 6px; }
#sidebar .module-switch-section + .module-switch-section { margin-top: 4px; border-top: 1px solid rgba(255, 255, 255, .14); padding-top: 8px; }
#sidebar .module-switch-section > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 8px 7px; border: 0; }
#sidebar .module-switch-section > header strong { display: inline-flex; align-items: center; gap: 6px; font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; }
#sidebar .module-switch-section > header strong::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: currentColor; }
#sidebar .module-switch-section > header small { font-size: .6rem; opacity: .8; }
#sidebar .module-switch-section.is-role > header strong, #sidebar .module-switch-section.is-role button > i { color: #ffab5c; }
#sidebar .module-switch-section.is-view > header strong, #sidebar .module-switch-section.is-view button > i { color: #ffdc53; }
#sidebar .module-switch-section.is-role button:disabled { background: #ffab5c; color: #2b1300; }
#sidebar .module-switch-section.is-view button:disabled { background: #ffdc53; color: #261146; }
#sidebar .module-switch-section button:disabled > i, #sidebar .module-switch-section button:disabled small { color: inherit; }
