/* ==========================================================================
   Profil Pejabat PPID (application/views/dashboard/profil_pejabat.php)
   Kartu profil horizontal + popup poster, memakai palet tema navy-emas-merah.
   ========================================================================== */

/* ---------- Kartu profil ---------- */
.pj-card {
    --pj-bg: #0b1530;
    --pj-text: #fff;
    --pj-muted: #cbd5e1;
    --pj-accent: #f5b301;
    display: flex;
    height: 100%;
    min-height: 230px;
    border-radius: 1.1rem;
    overflow: hidden;
    background: var(--pj-bg);
    box-shadow: 0 10px 28px rgba(15, 23, 42, .12);
    transition: transform .25s ease, box-shadow .25s ease;
}
.pj-card:hover { transform: translateY(-5px); box-shadow: 0 20px 40px rgba(15, 23, 42, .2); }

/* Variasi warna panel (bergantian) */
.pj-card.is-navy  { --pj-bg: linear-gradient(150deg, #0b1530, #12244f); }
.pj-card.is-royal { --pj-bg: linear-gradient(150deg, #1e3a8a, #12244f); }
.pj-card.is-red   { --pj-bg: linear-gradient(150deg, #a11d1d, #7f1d1d); }
.pj-card.is-light { --pj-bg: #fff; --pj-text: #0f172a; --pj-muted: #475569; --pj-accent: #b91c1c; border: 1px solid #e2e8f0; }

.pj-photo {
    position: relative;
    flex: 0 0 38%;
    background: #e2e8f0;
    overflow: hidden;
}
.pj-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 22%;
    transition: transform .4s ease;
}
.pj-card:hover .pj-photo img { transform: scale(1.05); }
.pj-photo .pj-initial {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.6rem;
    font-weight: 800;
    color: #94a3b8;
}

.pj-body {
    position: relative;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    padding: 1.2rem 1rem 1.05rem 1.1rem;
    background: var(--pj-bg);
    color: var(--pj-text);
    min-width: 0;
    container-type: inline-size;   /* tombol menyesuaikan lebar panel teks */
}
.pj-logo {
    position: absolute;
    right: .8rem;
    top: .8rem;
    width: 30px;
    height: 30px;
    object-fit: contain;
    opacity: .9;
    background: #fff;
    border-radius: 8px;
    padding: 3px;
}
.pj-role {
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--pj-accent);
    margin-bottom: .45rem;
    padding-right: 2.2rem;   /* ruang untuk logo di pojok kanan atas */
}
.pj-name {
    font-size: 1.12rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.3px;
    color: var(--pj-text);
    margin: 0 0 .55rem;
}
.pj-line { width: 36px; height: 3px; border-radius: 3px; background: var(--pj-accent); margin-bottom: .6rem; }
.pj-struct { font-size: .82rem; color: var(--pj-muted); line-height: 1.45; margin: 0; }
.pj-more {
    margin-top: auto;
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .85rem;
    white-space: nowrap;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .3);
    background: rgba(255, 255, 255, .08);
    color: var(--pj-text);
    font-size: .78rem;
    font-weight: 700;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.pj-card.is-light .pj-more { border-color: #cbd5e1; background: #f8fafc; }
.pj-more:hover, .pj-more:focus-visible { background: #f5b301; border-color: #f5b301; color: #0b1530; outline: none; }
.pj-more i { transition: transform .15s ease; }
.pj-more { max-width: 100%; }
.pj-more-short { display: none; }
/* Panel sempit: tombol mengecil, lalu teks dipersingkat agar tidak keluar dari kartu */
@container (max-width: 185px) {
    .pj-more { font-size: .72rem; padding: .4rem .7rem; gap: .3rem; }
}
@container (max-width: 169px) {
    .pj-more-long { display: none; }
    .pj-more-short { display: inline; }
}
.pj-more:hover i { transform: translateX(3px); }

/* ---------- Popup poster ---------- */
.pj-modal .modal-content {
    border: 0;
    border-radius: 1.25rem;
    overflow: hidden;
    background: transparent;
    box-shadow: 0 30px 70px rgba(0, 0, 0, .45);
}
.pj-poster {
    position: relative;
    display: grid;
    grid-template-columns: 44% 1fr;
    min-height: 520px;
    color: #fff;
    background:
        radial-gradient(600px 300px at 90% 0%, rgba(56, 189, 248, .18), transparent 60%),
        linear-gradient(140deg, #0b1530 0%, #12244f 55%, #1e3a8a 100%);
}
.pj-poster::before {
    /* bingkai emas di dalam poster */
    content: "";
    position: absolute;
    inset: 16px;
    border: 2px solid #f5b301;
    border-radius: .8rem;
    pointer-events: none;
    z-index: 3;
}
.pj-poster::after {
    /* motif titik halus */
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px);
    background-size: 22px 22px;
    pointer-events: none;
}
.pj-poster-photo {
    position: relative;
    overflow: hidden;
    z-index: 1;
}
.pj-poster-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
}
.pj-poster-photo::after {
    /* foto memudar ke latar navy */
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 55%, #12244f 100%), linear-gradient(0deg, rgba(11, 21, 48, .55), transparent 40%);
}
.pj-poster-brand {
    position: absolute;
    top: 34px;
    left: 34px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .35rem .7rem .35rem .35rem;
    border-radius: 999px;
    background: rgba(11, 21, 48, .65);
    backdrop-filter: blur(4px);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.pj-poster-brand img { width: 26px; height: 26px; object-fit: contain; background: #fff; border-radius: 50%; padding: 2px; }
.pj-poster-body {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3.2rem 3rem 3.2rem 1.2rem;
    min-width: 0;
}
.pj-poster-kicker { font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #f5b301; margin-bottom: .6rem; }
.pj-poster-name {
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.5px;
    color: #fff;
    margin: 0 0 1rem;
}
.pj-poster-ribbon {
    align-self: flex-start;
    margin-left: -1.2rem;
    padding: .5rem 1.2rem .5rem 1.2rem;
    background: #fff;
    color: #0b1530;
    font-size: .95rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    border-radius: 0 .5rem .5rem 0;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .25);
    border-left: 5px solid #b91c1c;
}
.pj-poster-struct {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 1rem 0 1.1rem;
    font-size: .9rem;
    font-weight: 600;
    color: #e2e8f0;
}
.pj-poster-struct i { color: #f5b301; }
.pj-poster-text {
    font-size: .88rem;
    line-height: 1.75;
    color: #cbd5e1;
    text-align: justify;
    white-space: pre-line;
    max-height: 230px;
    overflow-y: auto;
    padding-right: .5rem;
    margin: 0;
}
.pj-poster-text::-webkit-scrollbar { width: 5px; }
.pj-poster-text::-webkit-scrollbar-thumb { background: rgba(245, 179, 1, .6); border-radius: 5px; }
.pj-poster-close {
    position: absolute;
    top: 26px;
    right: 26px;
    z-index: 5;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color .15s ease, color .15s ease;
}
.pj-poster-close:hover, .pj-poster-close:focus-visible { background: #f5b301; color: #0b1530; outline: none; }
.pj-poster-nav {
    position: absolute;
    bottom: 30px;
    right: 34px;
    z-index: 5;
    display: flex;
    gap: .4rem;
}
.pj-poster-nav button {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .3);
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font-size: .8rem;
}
.pj-poster-nav button:hover { background: #f5b301; border-color: #f5b301; color: #0b1530; }

@media (max-width: 767.98px) {
    .pj-card { min-height: 200px; }
    .pj-poster { grid-template-columns: 1fr; min-height: 0; }
    .pj-poster-photo { height: 300px; }
    .pj-poster-photo::after { background: linear-gradient(0deg, #12244f 0%, transparent 55%); }
    .pj-poster-body { padding: 0 2rem 4.5rem; margin-top: -3rem; }
    .pj-poster-ribbon { margin-left: 0; border-radius: .5rem; }
    .pj-poster-text { max-height: none; text-align: left; }
}
@media (max-width: 400px) {
    .pj-photo { flex-basis: 38%; }
    .pj-name { font-size: 1rem; }
}

/* ==========================================================================
   Halaman menu Profil PPID: Profil Singkat, Visi Misi, Struktur, Tugas & Fungsi, Kontak
   ========================================================================== */

/* ---------- Navigasi antarhalaman profil ---------- */
.pf-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .45rem;
    margin: -1rem auto 2rem;
    padding: .45rem;
    max-width: max-content;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}
.pf-nav a {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .5rem 1rem;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease;
}
.pf-nav a i { color: #94a3b8; font-size: .82rem; }
.pf-nav a:hover { background: #eef2ff; color: #1e3a8a; }
.pf-nav a:hover i { color: #1e3a8a; }
.pf-nav a.active { background: #1e3a8a; color: #fff; box-shadow: 0 6px 14px rgba(30, 58, 138, .25); }
.pf-nav a.active i { color: #f5b301; }
@media (max-width: 767.98px) {
    .pf-nav { border-radius: 1rem; max-width: none; justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .pf-nav::-webkit-scrollbar { display: none; }
    .pf-nav a { white-space: nowrap; }
}

/* ---------- Kartu umum ---------- */
.pf-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1.1rem;
    box-shadow: 0 6px 20px rgba(15, 23, 42, .05);
    overflow: hidden;
}
.pf-card::before {
    content: "";
    display: block;
    height: 3px;
    background: linear-gradient(90deg, #b91c1c 0 33.3%, #f5b301 33.3% 66.6%, #38bdf8 66.6% 100%);
}
.pf-card-body { padding: 1.8rem 1.9rem; }
.pf-kicker { font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #b91c1c; margin-bottom: .45rem; }
.pf-title { font-size: 1.35rem; font-weight: 800; color: #0f172a; letter-spacing: -.3px; margin: 0 0 1rem; }
.pf-text { color: #334155; font-size: .98rem; line-height: 1.85; text-align: justify; }
.pf-text p { margin-bottom: 1rem; }
.pf-text p:first-child::first-letter {
    float: left;
    font-size: 3.1rem;
    line-height: .9;
    font-weight: 800;
    color: #1e3a8a;
    margin: .35rem .55rem 0 0;
}

/* ---------- Landasan hukum / daftar bernomor ---------- */
.pf-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; counter-reset: pf; }
.pf-list li {
    counter-increment: pf;
    position: relative;
    display: flex;
    gap: .9rem;
    padding: 1rem 1.1rem;
    border: 1px solid #e2e8f0;
    border-radius: .9rem;
    background: #fbfcfe;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.pf-list li:hover { border-color: #c7d2fe; box-shadow: 0 8px 20px rgba(30, 58, 138, .08); transform: translateX(3px); }
.pf-list li::before {
    content: counter(pf, decimal-leading-zero);
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: .7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: .85rem;
    color: #1e3a8a;
    background: #eef2ff;
}
.pf-list strong { display: block; color: #0f172a; font-size: .95rem; margin-bottom: .2rem; }
.pf-list span { color: #475569; font-size: .88rem; line-height: 1.6; }
.pf-list.is-icon li::before { display: none; }
.pf-list .pf-ico {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: .7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    color: #1e3a8a;
}

/* ---------- Kolom samping ---------- */
.pf-aside { position: sticky; top: 100px; display: grid; gap: 1rem; }
.pf-identity {
    position: relative;
    text-align: center;
    padding: 2rem 1.5rem;
    color: #fff;
    border-radius: 1.1rem;
    overflow: hidden;
    background: radial-gradient(400px 200px at 90% 0%, rgba(56, 189, 248, .2), transparent 60%), linear-gradient(140deg, #0b1530, #12244f 55%, #1e3a8a);
}
.pf-identity img { width: 96px; height: 96px; object-fit: contain; background: #fff; border-radius: 1.2rem; padding: .5rem; box-shadow: 0 10px 24px rgba(0, 0, 0, .25); margin-bottom: 1rem; }
.pf-identity h3 { font-size: 1.15rem; font-weight: 800; color: #fff; margin-bottom: .25rem; }
.pf-identity p { color: #cbd5e1; font-size: .85rem; margin: 0; }
.pf-identity .pf-badge { display: inline-block; margin-top: .9rem; padding: .3rem .8rem; border-radius: 999px; background: rgba(245, 179, 1, .15); border: 1px solid rgba(245, 179, 1, .4); color: #f5b301; font-size: .72rem; font-weight: 700; }
.pf-links { list-style: none; margin: 0; padding: .6rem; }
.pf-links a { display: flex; align-items: center; gap: .7rem; padding: .7rem .8rem; border-radius: .7rem; color: #1e293b; font-weight: 600; font-size: .9rem; text-decoration: none; }
.pf-links a i:first-child { width: 30px; height: 30px; border-radius: .55rem; display: inline-flex; align-items: center; justify-content: center; background: #f1f5f9; color: #475569; font-size: .8rem; }
.pf-links a i:last-child { margin-left: auto; color: #cbd5e1; font-size: .75rem; }
.pf-links a:hover { background: #eef2ff; color: #1e3a8a; }
.pf-links a:hover i:first-child { background: #1e3a8a; color: #fff; }

/* ---------- Visi & Misi ---------- */
.pf-visi {
    position: relative;
    padding: 2.6rem 2.4rem;
    border-radius: 1.3rem;
    color: #fff;
    overflow: hidden;
    background: radial-gradient(600px 260px at 100% 0%, rgba(56, 189, 248, .2), transparent 60%), linear-gradient(140deg, #0b1530, #12244f 55%, #1e3a8a);
    box-shadow: 0 18px 40px rgba(15, 23, 42, .18);
}
.pf-visi::before { content: "\201C"; position: absolute; top: -1.5rem; right: 1.5rem; font-size: 11rem; line-height: 1; color: rgba(245, 179, 1, .18); font-family: Georgia, serif; }
.pf-visi .pf-kicker { color: #f5b301; }
.pf-visi blockquote { font-size: clamp(1.25rem, 2.6vw, 1.75rem); font-weight: 700; line-height: 1.45; margin: 0; max-width: 820px; }
.pf-visi img { position: absolute; right: 2rem; bottom: 1.6rem; width: 64px; height: 64px; object-fit: contain; background: #fff; border-radius: 1rem; padding: .35rem; opacity: .95; }
.pf-misi { height: 100%; padding: 1.5rem 1.4rem; border: 1px solid #e2e8f0; border-radius: 1.1rem; background: #fff; transition: transform .2s ease, box-shadow .2s ease; }
.pf-misi:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(15, 23, 42, .08); }
.pf-misi .num { font-size: 2.2rem; font-weight: 800; line-height: 1; color: #f5b301; margin-bottom: .7rem; }
.pf-misi p { color: #334155; font-size: .95rem; line-height: 1.65; margin: 0; }
.pf-motto { margin-top: 1.5rem; text-align: center; color: #475569; font-size: .95rem; }
.pf-motto strong { color: #1e3a8a; }

/* ---------- Struktur ---------- */
.pf-frame { padding: 1.2rem; background: #f8fafc; }
.pf-frame img { display: block; width: 100%; height: auto; border-radius: .8rem; box-shadow: 0 6px 18px rgba(15, 23, 42, .08); background: #fff; cursor: zoom-in; }
.pf-frame-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem 1.4rem; border-top: 1px solid #e2e8f0; }
.pf-frame-bar span { color: #64748b; font-size: .85rem; }
.pf-btn { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem 1.05rem; border-radius: 999px; background: #1e3a8a; color: #fff !important; font-weight: 700; font-size: .85rem; text-decoration: none !important; border: 0; }
.pf-btn:hover { background: #12244f; }
.pf-btn.is-ghost { background: #eef2ff; color: #1e3a8a !important; }
.pf-btn.is-ghost:hover { background: #e0e7ff; }

/* ---------- Tugas pokok ---------- */
.pf-highlight {
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
    padding: 1.6rem 1.7rem;
    border-radius: 1.1rem;
    background: linear-gradient(120deg, #fffbeb, #fff);
    border: 1px solid #fde68a;
    border-left: 5px solid #f5b301;
}
.pf-highlight .pf-ico-lg { flex: 0 0 auto; width: 54px; height: 54px; border-radius: 1rem; background: #1e3a8a; color: #f5b301; display: inline-flex; align-items: center; justify-content: center; font-size: 1.35rem; }
.pf-highlight h2 { font-size: 1.15rem; font-weight: 800; color: #0f172a; margin-bottom: .4rem; }
.pf-highlight p { color: #334155; line-height: 1.75; margin: 0; }

/* ---------- Kontak ---------- */
.pf-contact { display: flex; gap: 1rem; align-items: flex-start; padding: 1.2rem 1.3rem; border: 1px solid #e2e8f0; border-radius: 1rem; background: #fff; height: 100%; text-decoration: none !important; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
a.pf-contact:hover { border-color: #c7d2fe; box-shadow: 0 10px 24px rgba(30, 58, 138, .08); transform: translateY(-2px); }
.pf-contact .pf-ico { flex: 0 0 auto; width: 46px; height: 46px; border-radius: .9rem; display: inline-flex; align-items: center; justify-content: center; background: #eef2ff; color: #1e3a8a; font-size: 1.1rem; }
.pf-contact small { display: block; font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #94a3b8; margin-bottom: .2rem; }
.pf-contact strong { display: block; color: #0f172a; font-size: .95rem; font-weight: 700; line-height: 1.45; word-break: break-word; }
.pf-social { display: flex; flex-wrap: wrap; gap: .6rem; }
.pf-social a { display: inline-flex; align-items: center; gap: .5rem; padding: .6rem 1.05rem; border-radius: 999px; font-weight: 700; font-size: .86rem; text-decoration: none; color: #fff; }
.pf-social .fb { background: #1877f2; } .pf-social .ig { background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af); } .pf-social .yt { background: #e00; } .pf-social .web { background: #1e3a8a; }
.pf-social a:hover { filter: brightness(1.08); transform: translateY(-1px); }
.pf-map { border-radius: 1.1rem; overflow: hidden; border: 1px solid #e2e8f0; height: 100%; min-height: 380px; box-shadow: 0 6px 20px rgba(15, 23, 42, .05); }
.pf-map iframe { width: 100%; height: 100%; min-height: 380px; border: 0; display: block; }

@media (max-width: 991.98px) { .pf-aside { position: static; } }
@media (max-width: 575.98px) {
    .pf-card-body { padding: 1.4rem 1.2rem; }
    .pf-text { text-align: left; }
    .pf-visi { padding: 2rem 1.4rem 5.5rem; }
    .pf-highlight { flex-direction: column; }
}

/* =========================================================
   Bagan Struktur Organisasi (dashboard/struktur.php)
   Desktop: jalur utama di tengah, cabang Wakil di kanan, 3 divisi di bawah.
   HP: bertumpuk dengan garis di kiri.
   ========================================================= */
.sc-chart { --sc-line: #cbd5e1; --sc-gap: 22px; position: relative; max-width: 1040px; margin: 0 auto; }
.sc-level {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 330px) minmax(0, 1fr);
    align-items: center;
}
.sc-mid { grid-column: 2; position: relative; padding: var(--sc-gap) 0; display: flex; justify-content: center; }
.sc-mid::before { /* garis tegak jalur utama */
    content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--sc-line);
}
.sc-level.is-first .sc-mid::before { top: 50%; }
.sc-mid.has-side::after { /* garis mendatar ke cabang kanan */
    content: ""; position: absolute; left: 50%; right: -28px; top: 50%; height: 2px; margin-top: -1px; background: var(--sc-line);
}
.sc-side { grid-column: 3; padding-left: 28px; }

/* Kartu jabatan */
.sc-node {
    position: relative; z-index: 1;
    width: 100%;
    display: flex; align-items: center; gap: .85rem;
    padding: .9rem 1rem;
    border-radius: 1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
    color: #0f172a;
    text-decoration: none !important;
    transition: transform .2s ease, box-shadow .2s ease;
}
a.sc-node:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(15, 23, 42, .12); }
.sc-avatar {
    flex: 0 0 auto; width: 58px; height: 58px; border-radius: 50%; overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center;
    background: #eef2ff; color: #1e3a8a; font-weight: 800; font-size: 1.05rem;
    border: 3px solid #fff; box-shadow: 0 0 0 2px #f5b301;
}
.sc-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.sc-text { min-width: 0; display: flex; flex-direction: column; }
.sc-role { font-size: .66rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #b91c1c; margin-bottom: .15rem; }
.sc-text strong { font-size: .92rem; font-weight: 800; line-height: 1.3; }
.sc-text small { font-size: .78rem; color: #64748b; margin-top: .1rem; }

.sc-node.is-navy, .sc-node.is-royal, .sc-node.is-sky { border: 0; color: #fff; }
.sc-node.is-navy  { background: linear-gradient(140deg, #0b1530, #12244f); }
.sc-node.is-royal { background: linear-gradient(140deg, #12244f, #1e3a8a); }
.sc-node.is-sky   { background: linear-gradient(140deg, #1e3a8a, #2563eb); }
.sc-node:is(.is-navy, .is-royal, .is-sky) .sc-role { color: #f5b301; }
.sc-node:is(.is-navy, .is-royal, .is-sky) small { color: #cbd5e1; }
.sc-node:is(.is-navy, .is-royal, .is-sky) .sc-avatar { background: rgba(255, 255, 255, .15); color: #fff; border-color: rgba(255, 255, 255, .25); }

.sc-node.is-small { padding: .6rem .75rem; gap: .6rem; box-shadow: none; }
.sc-node.is-small .sc-avatar { width: 40px; height: 40px; font-size: .8rem; border-width: 2px; box-shadow: 0 0 0 1px #cbd5e1; }
.sc-node.is-small strong { font-size: .8rem; }
.sc-node.is-small small { font-size: .7rem; }
.sc-node.is-small .sc-role { font-size: .6rem; }

/* Kelompok Wakil (cabang kanan) */
.sc-group { position: relative; z-index: 1; padding: .8rem; border-radius: 1rem; background: #f8fafc; border: 1px dashed #cbd5e1; }
.sc-group-title { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #1e3a8a; margin: 0 0 .55rem .2rem; }
.sc-group-title i { color: #f5b301; margin-right: .3rem; }
.sc-group-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }

/* Baris kelompok lebar (Wakil PPID Utama): jalur utama tetap tersambung di belakangnya */
.sc-level.is-group { position: relative; display: block; padding: 0; }
.sc-level.is-group::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--sc-line); }
.sc-group.is-wide { background: #f8fafc; }
.sc-group.is-wide .sc-group-title { text-align: center; margin-left: 0; }
.sc-group.is-wide .sc-group-grid { grid-template-columns: repeat(var(--sc-cols, 4), minmax(0, 1fr)); }

/* Divisi */
.sc-divisions { --sc-cols: 3; --sc-dgap: 1rem; position: relative; display: grid; grid-template-columns: repeat(var(--sc-cols), minmax(0, 1fr)); gap: var(--sc-dgap); padding-top: 30px; margin-top: var(--sc-gap); }
.sc-divisions::before { /* garis mendatar penghubung divisi: dari tengah kolom pertama ke tengah kolom terakhir */
    content: ""; position: absolute; top: 0; height: 2px; background: var(--sc-line);
    left: calc((100% - (var(--sc-cols) - 1) * var(--sc-dgap)) / (2 * var(--sc-cols)));
    right: calc((100% - (var(--sc-cols) - 1) * var(--sc-dgap)) / (2 * var(--sc-cols)));
}
.sc-divisions::after { /* garis dari jalur utama ke garis mendatar */
    content: ""; position: absolute; left: 50%; top: calc(var(--sc-gap) * -1); height: var(--sc-gap); width: 2px; margin-left: -1px; background: var(--sc-line);
}
.sc-division {
    position: relative; text-align: center;
    padding: 1.1rem .9rem 1rem;
    border-radius: 1rem;
    background: #eef2ff; border: 1px solid #c7d2fe;
}
.sc-division::before { /* garis turun ke tiap divisi */
    content: ""; position: absolute; top: -30px; left: 50%; width: 2px; height: 30px; margin-left: -1px; background: var(--sc-line);
}
.sc-division-ico {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: .9rem; margin-bottom: .6rem;
    background: #1e3a8a; color: #f5b301; font-size: 1.05rem;
}
.sc-division strong { display: block; font-size: .86rem; line-height: 1.35; color: #0f172a; margin-bottom: .55rem; }
.sc-division small { display: block; font-size: .78rem; color: #475569; line-height: 1.5; }

/* Daftar nama anggota (unit & divisi) */
.sc-division ol, .sc-unit ol { list-style: none; counter-reset: sc; margin: 0; padding: 0; text-align: left; display: grid; gap: .3rem; }
.sc-division li, .sc-unit li {
    counter-increment: sc; position: relative; padding: .38rem .5rem .38rem 1.9rem;
    font-size: .78rem; line-height: 1.4; color: #1e293b; background: #fff; border-radius: .55rem; border: 1px solid #e0e7ff;
}
.sc-division li::before, .sc-unit li::before {
    content: counter(sc); position: absolute; left: .45rem; top: .4rem;
    width: 1.05rem; height: 1.05rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    font-size: .62rem; font-weight: 800; background: #1e3a8a; color: #fff;
}
.sc-division li em, .sc-unit li em { display: block; font-style: normal; font-size: .68rem; color: #b91c1c; font-weight: 700; }

/* PPID Pelaksana unit / fakultas */
.sc-units { --sc-cols: 4; display: grid; grid-template-columns: repeat(var(--sc-cols), minmax(0, 1fr)); gap: .6rem; }
.sc-unit { padding: .75rem; border-radius: .9rem; background: #fff; border: 1px solid #e2e8f0; }
.sc-unit strong { display: block; font-size: .8rem; font-weight: 800; color: #1e3a8a; margin-bottom: .45rem; text-align: center; letter-spacing: .02em; }
.sc-unit li { background: #f8fafc; border-color: #e2e8f0; }

/* SK penetapan */
.sc-sk-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.sc-sk-ico { flex: 0 0 auto; width: 54px; height: 54px; border-radius: 1rem; display: inline-flex; align-items: center; justify-content: center; background: #1e3a8a; color: #f5b301; font-size: 1.35rem; }
.sc-sk-info { flex: 1 1 320px; min-width: 0; }
.sc-sk-title { font-size: 1.05rem; font-weight: 800; color: #0f172a; margin: 0 0 .2rem; word-break: break-word; }
.sc-sk-info p { color: #475569; font-size: .88rem; }
.sc-sk-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.sc-sk-viewer { margin-top: 1.2rem; }
.sc-sk-viewer iframe { width: 100%; height: 80vh; min-height: 520px; border: 1px solid #e2e8f0; border-radius: .9rem; background: #f8fafc; }

/* Desktop sempit: divisi dibungkus beberapa baris tanpa garis mendatar */
@media (max-width: 1199.98px) {
    .sc-divisions { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
    .sc-divisions::before, .sc-division::before { display: none; }
    .sc-divisions::after { top: calc(var(--sc-gap) * -1); height: calc(var(--sc-gap) + 30px); }
}

/* Layar sedang: cabang Wakil diletakkan di bawah jabatan induknya */
@media (max-width: 991.98px) {
    .sc-group.is-wide .sc-group-grid, .sc-units { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sc-level { grid-template-columns: 1fr; justify-items: center; }
    .sc-mid, .sc-side { grid-column: 1; width: 100%; max-width: 420px; }
    .sc-mid.has-side::after { display: none; }
    .sc-side { padding: 0 0 var(--sc-gap); position: relative; }
    .sc-side::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--sc-line); }
}
@media (max-width: 767.98px) {
    .sc-divisions { grid-template-columns: 1fr; gap: .9rem; max-width: 420px; margin-left: auto; margin-right: auto; }
    .sc-division { text-align: left; }
    .sc-division-ico { width: 38px; height: 38px; margin-bottom: .4rem; }
    .sc-group-grid, .sc-group.is-wide .sc-group-grid, .sc-units { grid-template-columns: 1fr; }
    .sc-sk-viewer iframe { height: 70vh; min-height: 420px; }
    .sc-sk-actions { width: 100%; }
    .sc-sk-actions .pf-btn { flex: 1 1 auto; justify-content: center; }
}

/* =========================================================
   Maklumat Pelayanan (layanan/maklumat.php)
   ========================================================= */
.mk-hero {
    position: relative; isolation: isolate; overflow: hidden;
    display: grid; grid-template-columns: minmax(260px, 360px) 1fr; gap: 2.5rem; align-items: center;
    padding: 2.6rem;
    border-radius: 1.6rem;
    color: #fff;
    background:
        radial-gradient(520px 320px at 100% 0%, rgba(56, 189, 248, .22), transparent 60%),
        radial-gradient(420px 300px at 0% 100%, rgba(245, 179, 1, .16), transparent 60%),
        linear-gradient(140deg, #0b1530, #12244f 55%, #1e3a8a);
    box-shadow: 0 24px 50px rgba(15, 23, 42, .2);
}
.mk-hero::before { /* pita tiga warna di atas */
    content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
    background: linear-gradient(90deg, #b91c1c 0 33.3%, #f5b301 33.3% 66.6%, #38bdf8 66.6% 100%);
}
.mk-hero::after { /* tanda kutip besar samar */
    content: "\201C"; position: absolute; right: 2rem; top: -2.2rem; z-index: -1;
    font-family: Georgia, serif; font-size: 16rem; line-height: 1; color: rgba(245, 179, 1, .12);
}

/* Foto */
.mk-photo { position: relative; }
.mk-photo-frame {
    position: relative; aspect-ratio: 4 / 5; border-radius: 1.4rem; overflow: hidden;
    background: rgba(255, 255, 255, .08);
    box-shadow: 0 0 0 3px rgba(245, 179, 1, .85), 0 0 0 10px rgba(245, 179, 1, .12), 0 20px 40px rgba(0, 0, 0, .35);
}
.mk-photo-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.mk-photo-frame::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(0deg, rgba(11, 21, 48, .85), transparent); }
.mk-photo-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 4rem; color: rgba(255, 255, 255, .4); }
.mk-nameplate {
    position: absolute; left: 1rem; right: 1rem; bottom: 1rem; z-index: 1;
    padding: .75rem .95rem; border-radius: 1rem;
    background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.mk-nameplate span { display: block; font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #f5b301; }
.mk-nameplate strong { display: block; font-size: 1rem; font-weight: 800; line-height: 1.3; }
.mk-nameplate small { display: block; font-size: .78rem; color: #cbd5e1; }

/* Isi */
.mk-kicker { display: inline-flex; align-items: center; gap: .5rem; font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: #f5b301; margin-bottom: .6rem; }
.mk-title { font-size: clamp(1.5rem, 2.8vw, 2.2rem); font-weight: 800; line-height: 1.2; letter-spacing: -.02em; margin: 0 0 1.4rem; color: #fff; }
.mk-quote { margin: 0 0 1.6rem; padding: 0 0 0 1.2rem; border-left: 3px solid #f5b301; }
.mk-quote p { font-size: clamp(1rem, 1.5vw, 1.15rem); line-height: 1.85; color: #e2e8f0; margin: 0 0 .8rem; text-align: justify; }
.mk-quote p:last-child { margin-bottom: 0; }
.mk-sign { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.4rem; }
.mk-sign-line { flex: 0 0 48px; height: 3px; border-radius: 3px; background: #f5b301; }
.mk-sign div { flex: 1 1 auto; min-width: 0; }
.mk-sign small { display: block; font-size: .78rem; color: #cbd5e1; }
.mk-sign strong { display: block; font-size: 1.1rem; font-weight: 800; color: #fff; }
.mk-sign span { display: block; font-size: .82rem; color: #94a3b8; }
.mk-seal { flex: 0 0 auto; width: 58px; height: 58px; object-fit: contain; padding: .35rem; border-radius: 1rem; background: #fff; }
.mk-values { display: flex; flex-wrap: wrap; gap: .5rem; }
.mk-values span {
    padding: .4rem .85rem; border-radius: 999px; font-size: .8rem; font-weight: 700;
    color: #fff; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22);
}
.mk-values span:nth-child(3n+1) { color: #fde68a; }
.mk-values span:nth-child(3n+2) { color: #bae6fd; }
.mk-values span:nth-child(3n+3) { color: #fecaca; }

/* Tautan layanan di bawah maklumat */
.mk-cta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.mk-cta-item {
    display: flex; align-items: center; gap: .9rem; padding: 1rem 1.1rem;
    border-radius: 1rem; background: #fff; border: 1px solid #e2e8f0;
    text-decoration: none !important; color: #0f172a;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.mk-cta-item:hover { transform: translateY(-3px); border-color: #c7d2fe; box-shadow: 0 12px 26px rgba(30, 58, 138, .1); }
.mk-cta-item > i { flex: 0 0 auto; width: 44px; height: 44px; border-radius: .85rem; display: inline-flex; align-items: center; justify-content: center; background: #eef2ff; color: #1e3a8a; font-size: 1.05rem; }
.mk-cta-item strong { display: block; font-size: .92rem; }
.mk-cta-item small { display: block; font-size: .78rem; color: #64748b; }

@media (max-width: 991.98px) {
    .mk-hero { grid-template-columns: 1fr; gap: 2rem; padding: 2rem 1.5rem; }
    .mk-photo { max-width: 320px; margin: 0 auto; width: 100%; }
    .mk-cta { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
    .mk-hero { padding: 1.6rem 1.1rem; border-radius: 1.2rem; }
    .mk-quote { padding-left: .9rem; }
    .mk-quote p { text-align: left; }
    .mk-seal { width: 48px; height: 48px; }
}

/* =========================================================
   SPBE (dashboard/spbe.php): kotak biru pengantar + kartu putih per sistem
   ========================================================= */
.sp-intro {
    position: relative; overflow: hidden;
    display: flex; align-items: center; gap: 1.4rem;
    padding: 1.8rem 2rem; margin-bottom: 2rem;
    border-radius: 1.3rem; color: #fff;
    background:
        radial-gradient(480px 240px at 100% 0%, rgba(56, 189, 248, .22), transparent 60%),
        linear-gradient(140deg, #0b1530, #12244f 55%, #1e3a8a);
    box-shadow: 0 18px 40px rgba(15, 23, 42, .16);
}
.sp-intro::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, #b91c1c 0 33.3%, #f5b301 33.3% 66.6%, #38bdf8 66.6% 100%); }
.sp-intro-ico { flex: 0 0 auto; width: 58px; height: 58px; border-radius: 1rem; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); color: #f5b301; font-size: 1.4rem; }
.sp-intro .pf-kicker { color: #f5b301; }
.sp-intro h2 { font-size: 1.35rem; font-weight: 800; margin: 0 0 .35rem; }
.sp-intro p { color: #cbd5e1; font-size: .92rem; line-height: 1.7; margin: 0; max-width: 820px; }
.sp-intro-count { flex: 0 0 auto; margin-left: auto; text-align: center; padding: .7rem 1.1rem; border-radius: 1rem; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); }
.sp-intro-count strong { display: block; font-size: 1.9rem; font-weight: 800; line-height: 1; color: #f5b301; }
.sp-intro-count small { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: #cbd5e1; }

.sp-card {
    position: relative; overflow: hidden; height: 100%;
    display: flex; flex-direction: column;
    padding: 1.5rem 1.4rem 1.4rem;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 1.1rem;
    box-shadow: 0 6px 20px rgba(15, 23, 42, .05);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.sp-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, #b91c1c 0 33.3%, #f5b301 33.3% 66.6%, #38bdf8 66.6% 100%); }
.sp-card:hover { transform: translateY(-4px); border-color: #c7d2fe; box-shadow: 0 16px 34px rgba(30, 58, 138, .1); }
.sp-card-top { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.sp-ico { width: 52px; height: 52px; border-radius: 1rem; display: inline-flex; align-items: center; justify-content: center; background: #1e3a8a; color: #f5b301; font-size: 1.25rem; }
.sp-tag { padding: .3rem .7rem; border-radius: 999px; font-size: .7rem; font-weight: 800; letter-spacing: .04em; color: #1e3a8a; background: #eef2ff; }
.sp-card h3 { font-size: 1.15rem; font-weight: 800; color: #0f172a; margin: 0 0 .35rem; }
.sp-card p { font-size: .88rem; line-height: 1.6; color: #475569; margin: 0 0 1rem; }
.sp-meta { margin: auto 0 1.1rem; padding-top: .9rem; border-top: 1px dashed #e2e8f0; display: grid; gap: .35rem; }
.sp-meta div { display: flex; justify-content: space-between; gap: .6rem; font-size: .78rem; }
.sp-meta dt { font-weight: 600; color: #94a3b8; }
.sp-meta dd { margin: 0; font-weight: 700; color: #334155; text-align: right; word-break: break-all; }
.sp-btn { justify-content: center; }

@media (max-width: 767.98px) {
    .sp-intro { flex-direction: column; align-items: flex-start; padding: 1.5rem 1.2rem; }
    .sp-intro-count { margin-left: 0; display: flex; align-items: baseline; gap: .5rem; }
}

/* Tata cara pengaduan (layanan/pengaduan.php): ajakan di bawah langkah */
.pg-cta {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem 1.5rem; flex-wrap: wrap;
    padding: 1.2rem 1.4rem; border-radius: 1.1rem; background: #fff; border: 1px solid #e2e8f0;
    box-shadow: 0 6px 20px rgba(15, 23, 42, .05);
}
.pg-cta-text { display: flex; align-items: flex-start; gap: .85rem; flex: 1 1 360px; }
.pg-cta-text > i { color: #1e3a8a; font-size: 1.2rem; margin-top: .15rem; }
.pg-cta-text strong { display: block; color: #0f172a; font-size: .98rem; }
.pg-cta-text span { display: block; color: #64748b; font-size: .88rem; }
.pg-cta-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
@media (max-width: 575.98px) {
    .pg-cta-actions { width: 100%; }
    .pg-cta-actions .pf-btn { flex: 1 1 auto; justify-content: center; }
}

/* =========================================================
   Ringkasan Permohonan Informasi (permohonan_informasi/ringkasan.php)
   ========================================================= */
.rk-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.rk-stat {
    display: flex; align-items: center; gap: .85rem; padding: 1.1rem 1.15rem;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 1.1rem;
    box-shadow: 0 6px 20px rgba(15, 23, 42, .05);
}
.rk-stat-ico { flex: 0 0 auto; width: 46px; height: 46px; border-radius: .9rem; display: inline-flex; align-items: center; justify-content: center; font-size: 1.05rem; background: #eef2ff; color: #1e3a8a; }
.rk-stat strong { display: block; font-size: 1.6rem; font-weight: 800; line-height: 1.05; color: #0f172a; }
.rk-stat small { display: block; font-size: .78rem; font-weight: 600; color: #64748b; }
.rk-stat.is-total { background: linear-gradient(140deg, #0b1530, #1e3a8a); border-color: transparent; }
.rk-stat.is-total .rk-stat-ico { background: rgba(255, 255, 255, .14); color: #f5b301; }
.rk-stat.is-total strong { color: #fff; }
.rk-stat.is-total small { color: #cbd5e1; }
.rk-stat.is-diproses .rk-stat-ico { background: #fef3c7; color: #b45309; }
.rk-stat.is-diterima .rk-stat-ico { background: #dcfce7; color: #15803d; }
.rk-stat.is-ditolak .rk-stat-ico  { background: #fee2e2; color: #b91c1c; }

.rk-time-figures { display: flex; gap: .6rem; margin-left: auto; flex: 0 0 auto; }
.rk-time-figures .sp-intro-count { margin-left: 0; min-width: 104px; }

.rk-days { display: inline-block; padding: .25rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.rk-days.is-ok   { background: #dcfce7; color: #166534; }
.rk-days.is-run  { background: #eef2ff; color: #1e3a8a; }
.rk-days.is-late { background: #fee2e2; color: #991b1b; }

.rk-alasan { min-width: 220px; font-size: .82rem; line-height: 1.5; color: #7f1d1d; }
.rk-note { display: flex; gap: .8rem; align-items: flex-start; margin-top: 1rem; padding: 1rem 1.15rem; border-radius: 1rem; background: #eef2ff; color: #1e3a8a; }
.rk-note i { font-size: 1.15rem; margin-top: .15rem; }
.rk-note p { margin: 0; font-size: .87rem; line-height: 1.6; }
.rk-note a { font-weight: 700; }

@media (max-width: 1199.98px) { .rk-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767.98px) {
    .rk-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rk-stat.is-total { grid-column: 1 / -1; }
    .rk-time-figures { margin-left: 0; width: 100%; }
    .rk-time-figures .sp-intro-count { flex: 1 1 0; }
}
