/* =====================================================================
   AFCI - Tampilan backend
   Konsep: Clean Grid -> Double Click -> Detail Popup -> Action per Permission
   ===================================================================== */

.afci-admin {
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr);
    min-height: 100vh;
}

/* ------------------------------ Sidebar ------------------------------ */
.afci-side {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #080B11;
    border-right: 1px solid var(--afci-line);
    overflow-y: auto;
}

.afci-side-brand {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: 1.15rem 1.2rem;
    border-bottom: 1px solid var(--afci-line-soft);
}

.afci-side-brand img { height: 40px; }

.afci-side-nav { padding: 1rem .8rem 2rem; flex: 1; }

.afci-side-group {
    margin: 1.3rem 0 .5rem;
    padding: 0 .5rem;
    font-family: var(--afci-head);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--afci-dim);
}

.afci-side-group:first-child { margin-top: 0; }

.afci-side-link {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .58rem .75rem;
    margin-bottom: .12rem;
    border-radius: var(--afci-radius-sm);
    color: var(--afci-muted);
    font-size: .92rem;
    font-weight: 500;
    transition: background .14s ease, color .14s ease;
}

.afci-side-link i { font-size: 1.05rem; width: 1.2rem; text-align: center; }
.afci-side-link:hover { background: rgba(255,255,255,.05); color: #fff; }

.afci-side-link.is-active {
    background: var(--afci-red-soft);
    color: #fff;
    box-shadow: inset 3px 0 0 var(--afci-red);
}

.afci-side-badge {
    margin-left: auto;
    min-width: 22px;
    padding: .05rem .35rem;
    border-radius: 999px;
    background: var(--afci-red);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    text-align: center;
}

/* ------------------------------- Topbar ------------------------------ */
.afci-main { display: flex; flex-direction: column; min-width: 0; }

.afci-top {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .85rem 1.8rem;
    background: rgba(8, 11, 17, .9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--afci-line);
}

.afci-top-title { font-family: var(--afci-head); font-size: 1.15rem; letter-spacing: .06em; text-transform: uppercase; margin: 0; }
.afci-top-spacer { margin-left: auto; }

.afci-top-scope {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .25rem .7rem;
    border: 1px solid var(--afci-line);
    border-radius: 999px;
    font-size: .8rem;
    color: var(--afci-muted);
}

.afci-user {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding-left: 1rem;
    border-left: 1px solid var(--afci-line);
}

.afci-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--afci-red);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--afci-head);
    font-size: 1rem;
    font-weight: 700;
}

.afci-user-info strong { display: block; font-size: .88rem; line-height: 1.2; }
.afci-user-info span { font-size: .76rem; color: var(--afci-dim); }

.afci-side-toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.4rem; cursor: pointer; }

/* ------------------------------ Konten ------------------------------- */
.afci-content { padding: 1.8rem; flex: 1; }

.afci-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.4rem;
    flex-wrap: wrap;
}

.afci-page-head h1 { font-size: 1.9rem; margin-bottom: .2rem; }
.afci-page-head p { margin: 0; color: var(--afci-muted); font-size: .92rem; max-width: 60ch; }

.afci-panel {
    background: var(--afci-panel);
    border: 1px solid var(--afci-line);
    border-radius: var(--afci-radius);
}

.afci-panel-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--afci-line-soft);
    flex-wrap: wrap;
}

.afci-panel-body { padding: 1.2rem; }

/* ------------------------ Baris pencarian & filter ------------------- */
.afci-toolbar {
    display: flex;
    align-items: flex-end;
    gap: .7rem;
    flex-wrap: wrap;
}

.afci-toolbar .afci-input,
.afci-toolbar .afci-select { min-width: 0; }

.afci-toolbar-search { flex: 1 1 260px; max-width: 380px; }
.afci-toolbar-filter { flex: 0 1 190px; }
.afci-toolbar label { font-size: .74rem; }

/* Petunjuk interaksi (Addendum pasal 29) */
.afci-hint-dblclick {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem .9rem;
    margin-bottom: .9rem;
    border: 1px dashed rgba(60, 123, 255, .35);
    border-radius: var(--afci-radius-sm);
    background: rgba(60, 123, 255, .06);
    color: #9FBEFF;
    font-size: .84rem;
}

/* ---------------- Grid: tabel standar Bootstrap 5 -------------------- */
.afci-grid-wrap { overflow-x: auto; }

/* Tema gelap untuk komponen .table bawaan Bootstrap. */
.afci-grid {
    --bs-table-bg: transparent;
    --bs-table-color: var(--afci-text);
    --bs-table-border-color: var(--afci-line-soft);
    --bs-table-hover-bg: rgba(255, 255, 255, .035);
    --bs-table-hover-color: var(--afci-text);

    width: 100%;
    margin: 0;
    font-size: .92rem;
}

.afci-grid thead th {
    position: sticky;
    top: 0;
    padding: .7rem .9rem;
    background: #0C1017;
    border-bottom: 1px solid var(--afci-line);
    font-family: var(--afci-head);
    font-size: .84rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--afci-muted);
    text-align: left;
    white-space: nowrap;
}

.afci-grid tbody td {
    padding: .72rem .9rem;
    border-bottom: 1px solid var(--afci-line-soft);
    vertical-align: middle;
}

.afci-grid tbody tr { cursor: pointer; }

/* Baris terpilih oleh single click (Addendum pasal 9).
   Warna dipasang pada sel agar tidak tertimpa aturan .table Bootstrap. */
.afci-grid tbody tr.is-selected > td { background-color: var(--afci-red-soft); }
.afci-grid tbody tr.is-selected > td:first-child { box-shadow: inset 3px 0 0 var(--afci-red); }

.afci-grid .afci-col-no { width: 56px; color: var(--afci-dim); text-align: right; }
.afci-grid .afci-col-main { font-weight: 600; color: #fff; }
.afci-grid .afci-align-center { text-align: center; }

.afci-grid-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border-top: 1px solid var(--afci-line-soft);
    flex-wrap: wrap;
}

.afci-grid-foot .afci-pager { margin-top: 0; }
.afci-grid-summary { color: var(--afci-muted); font-size: .86rem; }

/* ------------- Modal detail: Bootstrap 5 Modal bertema gelap --------- */
.afci-detail-modal .modal-content {
    background: var(--afci-panel);
    border: 1px solid var(--afci-line);
    border-radius: var(--afci-radius);
    box-shadow: var(--afci-shadow);
}

.afci-detail-modal .modal-header {
    align-items: flex-start;
    gap: 1rem;
    padding: 1.1rem 1.3rem;
    border-bottom: 1px solid var(--afci-line-soft);
}

.afci-detail-modal .modal-title {
    font-family: var(--afci-head);
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin: 0 0 .1rem;
}

.afci-modal-subtitle { margin: 0; color: var(--afci-muted); font-size: .92rem; }

.afci-detail-modal .btn-close { flex-shrink: 0; }

.afci-detail-modal .nav-tabs {
    gap: .2rem;
    padding: 0 1.3rem;
    border-bottom: 1px solid var(--afci-line-soft);
    flex-wrap: nowrap;
    overflow-x: auto;
}

.afci-detail-modal .nav-tabs .nav-link {
    padding: .7rem .95rem;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: none;
    color: var(--afci-muted);
    font-family: var(--afci-head);
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.afci-detail-modal .nav-tabs .nav-link:hover { color: #fff; border-bottom-color: var(--afci-line); }
.afci-detail-modal .nav-tabs .nav-link.active { color: #fff; background: none; border-bottom-color: var(--afci-red); }

.afci-detail-modal .modal-body { padding: 1.3rem; }

.afci-detail-modal .modal-footer {
    justify-content: flex-start;
    gap: .6rem;
    padding: 1rem 1.3rem;
    border-top: 1px solid var(--afci-line-soft);
}

.afci-detail-modal .modal-footer > * { margin: 0; }
.afci-detail-modal .afci-foot-right { margin-left: auto; display: flex; gap: .6rem; }

/* Daftar label/nilai pada tab Informasi */
.afci-detail-list { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 0; }

.afci-detail-list dt {
    padding: .55rem .9rem .55rem 0;
    border-bottom: 1px solid var(--afci-line-soft);
    color: var(--afci-muted);
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.afci-detail-list dd {
    margin: 0;
    padding: .55rem 0;
    border-bottom: 1px solid var(--afci-line-soft);
    word-break: break-word;
}

.afci-detail-longtext { color: #CBD3DF; font-size: .93rem; line-height: 1.7; }
.afci-detail-thumb { width: 110px; border-radius: var(--afci-radius-sm); border: 1px solid var(--afci-line); }
.afci-detail-subhead { font-size: .9rem; margin: 1.1rem 0 .5rem; color: var(--afci-muted); }
.afci-detail-subhead:first-child { margin-top: 0; }

/* --------------------- Pengelola media (tab lampiran) ---------------- */
.afci-media-stage {
    position: relative;
    aspect-ratio: 16 / 9;
    /* Dibatasi agar deretan thumbnail tetap terlihat tanpa menggulir. */
    max-height: 38vh;
    background: #0A0E15;
    border: 1px solid var(--afci-line);
    border-radius: var(--afci-radius-sm);
    overflow: hidden;
}

.afci-media-stage img { width: 100%; height: 100%; object-fit: contain; }

.afci-media-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border: 1px solid var(--afci-line);
    border-radius: 50%;
    background: rgba(5, 7, 12, .72);
    color: #fff;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}

.afci-media-nav:hover { background: var(--afci-red); border-color: var(--afci-red); }
.afci-media-prev { left: .6rem; }
.afci-media-next { right: .6rem; }

.afci-media-counter {
    position: absolute;
    right: .6rem;
    bottom: .6rem;
    padding: .1rem .55rem;
    border-radius: 999px;
    background: rgba(5, 7, 12, .78);
    color: var(--afci-muted);
    font-size: .76rem;
}

.afci-media-caption {
    margin: .6rem 0 1rem;
    color: var(--afci-muted);
    font-size: .88rem;
    text-align: center;
}

.afci-media-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: .7rem;
}

.afci-media-thumb {
    position: relative;
    margin: 0;
    border: 1px solid var(--afci-line);
    border-radius: var(--afci-radius-sm);
    background: var(--afci-bg-alt);
    overflow: hidden;
    transition: border-color .15s ease;
}

.afci-media-thumb.is-active { border-color: var(--afci-red); box-shadow: 0 0 0 1px var(--afci-red); }

.afci-media-pick {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    padding: 0;
    border: 0;
    background: #0A0E15;
    cursor: pointer;
}

.afci-media-pick img { width: 100%; height: 100%; object-fit: cover; }

.afci-media-badge {
    position: absolute;
    top: .35rem;
    left: .35rem;
    padding: .1rem .45rem;
    border-radius: 3px;
    background: var(--afci-red);
    color: #fff;
    font-family: var(--afci-head);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.afci-media-thumb figcaption {
    display: flex;
    align-items: center;
    gap: .3rem;
    padding: .3rem .4rem;
    border-top: 1px solid var(--afci-line-soft);
}

.afci-media-size { font-size: .72rem; color: var(--afci-dim); }
.afci-media-tools { margin-left: auto; display: flex; gap: .1rem; }

.afci-media-tools button {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: none;
    color: var(--afci-muted);
    font-size: .95rem;
    line-height: 1;
    cursor: pointer;
}

.afci-media-tools button:hover { background: rgba(255,255,255,.08); color: #fff; }
.afci-media-tools button.is-danger:hover { background: var(--afci-red); color: #fff; }

/* Daftar dokumen (bukan gambar) */
.afci-doclist { display: grid; gap: .5rem; }

.afci-docitem {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .6rem .8rem;
    background: var(--afci-bg-alt);
    border: 1px solid var(--afci-line);
    border-radius: var(--afci-radius-sm);
}

.afci-docitem > i { font-size: 1.4rem; color: var(--afci-red); }
.afci-docitem-info { min-width: 0; }
.afci-docitem-info a { display: block; font-size: .9rem; font-weight: 600; }
.afci-docitem-info a:hover { color: var(--afci-red); }
.afci-docitem-info span { font-size: .76rem; color: var(--afci-dim); }

.afci-docitem-del {
    margin-left: auto;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 4px;
    background: none;
    color: var(--afci-muted);
    cursor: pointer;
}

.afci-docitem-del:hover { background: var(--afci-red); color: #fff; }

/* Tab riwayat */
.afci-timeline { list-style: none; margin: 0; padding: 0 0 0 1.1rem; border-left: 1px solid var(--afci-line); }

.afci-timeline li { position: relative; padding: 0 0 1.1rem 1.1rem; }

.afci-timeline li::before {
    content: '';
    position: absolute;
    left: -1.42rem;
    top: .42rem;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--afci-red);
    border: 2px solid var(--afci-panel);
}

.afci-timeline strong { display: block; font-size: .92rem; }
.afci-timeline span { font-size: .8rem; color: var(--afci-dim); }

/* Statistik ringkas di dalam modal */
.afci-statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: .8rem; }

.afci-statgrid-item {
    padding: .9rem;
    text-align: center;
    background: var(--afci-bg-alt);
    border: 1px solid var(--afci-line);
    border-radius: var(--afci-radius-sm);
}

.afci-statgrid-value { display: block; font-family: var(--afci-head); font-size: 1.7rem; line-height: 1; }
.afci-statgrid-label { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--afci-dim); }

/* ------------------------------ Dasbor ------------------------------- */
.afci-cardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; margin-bottom: 1.6rem; }

.afci-statcard {
    display: block;
    padding: 1.2rem;
    background: var(--afci-panel);
    border: 1px solid var(--afci-line);
    border-radius: var(--afci-radius);
    transition: border-color .15s ease, transform .15s ease;
}

.afci-statcard:hover { border-color: rgba(225,37,44,.5); transform: translateY(-2px); color: inherit; }
.afci-statcard i { font-size: 1.3rem; color: var(--afci-red); }
.afci-statcard strong { display: block; font-family: var(--afci-head); font-size: 2.2rem; line-height: 1.1; margin: .5rem 0 .1rem; }
.afci-statcard .afci-statcard-label { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--afci-muted); }
.afci-statcard .afci-statcard-sub { display: block; margin-top: .35rem; font-size: .8rem; color: var(--afci-dim); }

.afci-twocol { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.2rem; align-items: start; }

.afci-bars { display: flex; align-items: stretch; gap: .6rem; height: 200px; padding-top: .5rem; }

.afci-bars-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .45rem;
}

/* Jalur setinggi sisa ruang, agar tinggi batang dalam persen punya acuan. */
.afci-bars-track {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.afci-bars-fill {
    width: 100%;
    max-width: 46px;
    background: linear-gradient(180deg, var(--afci-red) 0%, rgba(225,37,44,.35) 100%);
    border-radius: 4px 4px 0 0;
    min-height: 4px;
}

.afci-bars-label { font-size: .74rem; color: var(--afci-dim); }

/* ------------------------------- Login ------------------------------- */
.afci-blank {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.2rem;
    background:
        radial-gradient(900px 460px at 78% 12%, rgba(225, 37, 44, .16), transparent 62%),
        radial-gradient(760px 420px at 12% 86%, rgba(60, 123, 255, .12), transparent 60%),
        var(--afci-bg);
}

.afci-login {
    width: min(420px, 100%);
    padding: 2.2rem;
    background: rgba(17, 21, 30, .92);
    border: 1px solid var(--afci-line);
    border-radius: var(--afci-radius);
    box-shadow: var(--afci-shadow);
}

.afci-login img { height: 54px; margin-bottom: 1.6rem; }
.afci-login h1 { font-size: 1.5rem; margin-bottom: .3rem; }
.afci-login .afci-login-lead { color: var(--afci-muted); font-size: .9rem; margin-bottom: 1.6rem; }

.afci-errorpage {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.afci-errorpage-code {
    font-family: var(--afci-head);
    font-size: 6rem;
    font-weight: 800;
    line-height: 1;
    color: var(--afci-red);
    margin: 0;
}

.afci-errorpage h1 { font-size: 1.8rem; margin-bottom: .5rem; }

/* --------------------------- Form backend ---------------------------- */
.afci-formfoot {
    display: flex;
    gap: .7rem;
    padding-top: 1.2rem;
    margin-top: .4rem;
    border-top: 1px solid var(--afci-line-soft);
    flex-wrap: wrap;
}

.afci-filepreview {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin-bottom: .5rem;
}

.afci-filepreview img { width: 82px; border-radius: var(--afci-radius-sm); border: 1px solid var(--afci-line); }

.afci-permgroup {
    border: 1px solid var(--afci-line);
    border-radius: var(--afci-radius-sm);
    margin-bottom: .9rem;
    overflow: hidden;
}

.afci-permgroup-head {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .6rem .9rem;
    background: var(--afci-bg-alt);
    border-bottom: 1px solid var(--afci-line-soft);
    font-family: var(--afci-head);
    font-size: .92rem;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.afci-permgroup-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .3rem .9rem; padding: .8rem .9rem; }

.afci-check { display: flex; align-items: flex-start; gap: .5rem; font-size: .88rem; cursor: pointer; }
.afci-check input { margin-top: .28rem; accent-color: var(--afci-red); }
.afci-check code { font-size: .74rem; }

/* Tab modul pada halaman sampah */
.afci-tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.2rem; }

.afci-tab {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .9rem;
    border: 1px solid var(--afci-line);
    border-radius: 999px;
    background: var(--afci-panel);
    color: var(--afci-muted);
    font-size: .88rem;
}

.afci-tab:hover { color: #fff; border-color: var(--afci-red); }
.afci-tab.is-active { background: var(--afci-red); border-color: var(--afci-red); color: #fff; }
.afci-tab .afci-tab-count { font-size: .78rem; opacity: .8; }

/* ------------------------------ Responsif ---------------------------- */
@media (max-width: 1100px) {
    .afci-twocol { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
    .afci-admin { grid-template-columns: 1fr; }

    /* Sidebar disembunyikan; navigasi berpindah ke menu mengambang */
    .afci-side { display: none; }
    .afci-top-logo { display: block; }

    .afci-content { padding: 1.1rem; }
    .afci-detail-list { grid-template-columns: 1fr; }
    .afci-detail-list dt { border-bottom: 0; padding-bottom: 0; padding-top: .7rem; }

    /* Topbar dirapatkan: judul + tombol menu + tombol keluar saja */
    .afci-top { padding: .7rem 1rem; gap: .7rem; }
    /* Ruang di bawah agar konten terakhir tidak tertutup tombol menu */
    .afci-content { padding-bottom: 6rem; }
    .afci-top-scope { display: none; }
    .afci-user { padding-left: .6rem; }
    .afci-user-info { display: none; }

    .afci-page-head { gap: .8rem; margin-bottom: 1rem; }
    .afci-page-head h1 { font-size: 1.45rem; }
    .afci-page-head .afci-btn { width: 100%; }

    .afci-toolbar { gap: .5rem; }
    .afci-toolbar-search { flex: 1 1 100%; max-width: none; }
    .afci-toolbar-filter { flex: 1 1 calc(50% - .25rem); }

    .afci-grid-foot { justify-content: center; text-align: center; }
    .afci-cardgrid { grid-template-columns: repeat(2, 1fr); gap: .7rem; }
    .afci-statcard { padding: .9rem; }
    .afci-statcard strong { font-size: 1.7rem; }

    .afci-modal-body { padding: 1rem; }
    .afci-detail-modal .modal-footer { padding: .8rem 1rem; }
    .afci-detail-modal .modal-footer .afci-btn { flex: 1 1 auto; justify-content: center; }
    .afci-detail-modal .afci-foot-right { width: 100%; }
    .afci-media-stage { max-height: 32vh; }
    .afci-media-thumbs { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }

    .afci-permgroup-body { grid-template-columns: 1fr; }
    .afci-tabs { gap: .3rem; }
    .afci-tab { padding: .38rem .7rem; font-size: .82rem; }
}

@media (max-width: 560px) {
    .afci-cardgrid { grid-template-columns: 1fr; }
    .afci-formgrid > [class*="afci-col-"] { grid-column: span 12; }
    .afci-formfoot .afci-btn { flex: 1 1 auto; justify-content: center; }
    .afci-grid { font-size: .86rem; }
    .afci-grid thead th, .afci-grid tbody td { padding: .6rem .55rem; }
}

/* ---------- Logo pada topbar (tampil saat sidebar disembunyikan) ------ */
.afci-top-logo { display: none; flex-shrink: 0; }
.afci-top-logo img { height: 30px; display: block; }

/* ---------- Panel menu mengambang khusus backend ---------------------- */
.afci-fab-wide .afci-fab-panel {
    display: block;
    width: min(300px, calc(100vw - 2rem));
    max-height: min(70vh, 560px);
    padding: 0;
    background: #0B0E15;
    border: 1px solid var(--afci-line);
    border-radius: var(--afci-radius);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
    overflow: hidden;

    /* Menyembul dari sudut tombol */
    transform-origin: bottom right;
    transform: scale(.86) translateY(10px);
    opacity: 0;
    transition: opacity .18s ease, transform .18s ease;
}

.afci-fab-wide.is-open .afci-fab-panel { opacity: 1; transform: none; }
.afci-fab-wide .afci-fab-panel[hidden] { display: none; }

.afci-fab-panel-head {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .9rem 1rem;
    border-bottom: 1px solid var(--afci-line-soft);
    background: var(--afci-panel);
}

.afci-fab-panel-head .afci-user-info { display: block; min-width: 0; }
.afci-fab-panel-head .afci-user-info strong { font-size: .9rem; }
.afci-fab-panel-head .afci-user-info span { font-size: .74rem; color: var(--afci-dim); }

.afci-fab-panel-nav {
    padding: .6rem .6rem .8rem;
    max-height: calc(min(70vh, 560px) - 128px);
    overflow-y: auto;
}

.afci-fab-panel-nav .afci-side-group { margin: .9rem 0 .35rem; }
.afci-fab-panel-nav .afci-side-group:first-child { margin-top: 0; }

.afci-fab-panel-foot {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
    padding: .7rem .8rem;
    border-top: 1px solid var(--afci-line-soft);
    background: var(--afci-panel);
}

.afci-fab-panel-foot .afci-btn { justify-content: center; }
