/* TFG PUSTAKA ASET - PENEMPATAN TOMBOL TAMBAH FIELD */

.tfg-add-specification-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    margin-top: 10px;
    margin-bottom: 4px;
}

.tfg-add-specification-actions .tfg-add-spec-button {
    margin: 0;
}

/* =========================================================
   TFG PUSTAKA ASET - KELAS ASET V1
   ========================================================= */

.tfg-manager-class-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;

    margin-top: 6px;
    margin-bottom: 12px;
}

.tfg-manager-class-note {
    min-width: 0;

    color: #8fa8bb;

    font-size: 9px;
    line-height: 1.35;
}

.tfg-manager-class-designer {
    flex: 0 0 auto;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 28px;

    padding: 0 9px;

    border:
        1px solid rgba(78, 154, 209, .42);

    border-radius: 6px;

    background:
        rgba(25, 118, 191, .14);

    color: #a9dcff;

    font-size: 9px;
    font-weight: 700;

    text-decoration: none;
}

.tfg-manager-class-designer:hover {
    background:
        rgba(25, 118, 191, .28);

    color: #ffffff;
}

.tfg-manager-class-designer[hidden] {
    display: none !important;
}

/* =========================================================
   TFG PUSTAKA ASET - HIERARKI KELAS V1
   Kategori > Tipe > Kelas > Template > Detail
   ========================================================= */

.tfg-asset-library-columns {
    grid-template-columns:
        155px
        170px
        190px
        220px
        minmax(280px, 1fr) !important;
}

.tfg-asset-class-unclassified {
    opacity: .82;
}

.tfg-asset-library-modal.manager-open
.tfg-asset-library-columns {
    grid-template-columns:
        140px
        150px
        165px
        195px
        275px !important;

    overflow-x: auto;
}

@media (max-width: 1100px) {

    .tfg-asset-library-columns {
        grid-template-columns:
            145px
            155px
            175px
            200px
            270px !important;

        overflow-x: auto;
    }
}

@media (max-width: 820px) {

    .tfg-asset-library-columns {
        grid-template-columns:
            145px
            155px
            175px
            200px
            270px !important;

        overflow-x: auto;
    }
}

/* =========================================================
   TFG PUSTAKA ASET - CRUD HIERARKI V1
   ========================================================= */

.tfg-library-column-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
}

.tfg-library-column-add {
    appearance: none;
    -webkit-appearance: none;

    min-height: 23px;

    padding: 0 6px;

    border:
        1px solid rgba(66, 151, 211, .42);

    border-radius: 5px;

    background:
        rgba(25, 118, 191, .14);

    color: #9edaff;

    cursor: pointer;

    font-size: 8px;
    font-weight: 700;

    white-space: nowrap;
}

.tfg-library-column-add:hover {
    background:
        rgba(25, 118, 191, .30);

    color: #ffffff;
}


/* Dialog Tambah Kategori / Jenis / Kelas */

.tfg-hierarchy-create-overlay {
    position: fixed;
    inset: 0;

    z-index: 9000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 14px;

    background:
        rgba(2, 10, 17, .68);

    /*
     * Hindari repaint mahal saat mengetik pada dialog
     * hierarchy. Overlay gelap sudah cukup memisahkan
     * dialog dari Pustaka Aset di belakangnya.
     */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.tfg-hierarchy-create-overlay[hidden] {
    display: none !important;
}

.tfg-hierarchy-create-dialog {
    width: min(
        410px,
        calc(100vw - 28px)
    );

    max-height:
        calc(100vh - 28px);

    display: flex;
    flex-direction: column;

    overflow: hidden;

    border:
        1px solid #35536a;

    border-radius: 9px;

    background: #0b2031;

    color: #eef7fc;

    box-shadow:
        0 18px 45px
        rgba(0, 0, 0, .42);
}

.tfg-hierarchy-create-header {
    flex: 0 0 auto;

    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;

    padding: 13px 14px;

    border-bottom:
        1px solid rgba(111, 158, 191, .20);

    background: #102a40;
}

.tfg-hierarchy-create-title {
    font-size: 14px;
    font-weight: 800;
}

.tfg-hierarchy-create-context {
    margin-top: 3px;

    color: #91aabd;

    font-size: 9px;
}

.tfg-hierarchy-create-close {
    width: 30px;
    height: 30px;

    border:
        1px solid rgba(116, 157, 185, .22);

    border-radius: 6px;

    background:
        rgba(255, 255, 255, .04);

    color: #dceaf3;

    cursor: pointer;

    font-size: 18px;
}

.tfg-hierarchy-create-body {
    padding: 14px;

    overflow-y: auto;
}

.tfg-hierarchy-create-label,
.tfg-hierarchy-dimensions label > span {
    display: block;

    margin-bottom: 5px;

    color: #a9bfce;

    font-size: 9px;
    font-weight: 700;
}

.tfg-hierarchy-create-input,
.tfg-hierarchy-create-textarea {
    width: 100%;

    border:
        1px solid #4b6b82;

    border-radius: 6px;

    background: #ffffff;

    color: #102536;

    outline: 0;
}

.tfg-hierarchy-create-input {
    height: 36px;

    margin-bottom: 12px;

    padding: 0 9px;
}

.tfg-hierarchy-create-textarea {
    min-height: 82px;

    padding: 8px;

    resize: vertical;
}

.tfg-hierarchy-dimensions {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    gap: 8px;

    margin-bottom: 12px;
}

.tfg-hierarchy-dimensions[hidden] {
    display: none !important;
}

.tfg-hierarchy-unit-input {
    height: 35px;

    display: flex;
    align-items: center;

    overflow: hidden;

    border:
        1px solid #4b6b82;

    border-radius: 6px;

    background: #ffffff;
}

.tfg-hierarchy-unit-input input {
    width: 100%;
    min-width: 0;
    height: 100%;

    padding: 0 8px;

    border: 0;
    outline: 0;

    background: transparent;

    color: #102536;
}

.tfg-hierarchy-unit-input b {
    padding-right: 7px;

    color: #6e8494;

    font-size: 9px;
}

.tfg-hierarchy-create-status {
    min-height: 24px;

    padding-top: 8px;

    color: #ffb5a8;

    font-size: 9px;
}

.tfg-hierarchy-create-footer {
    flex: 0 0 auto;

    display: flex;
    justify-content: flex-end;
    gap: 7px;

    padding: 11px 14px;

    border-top:
        1px solid rgba(111, 158, 191, .20);
}

.tfg-hierarchy-create-footer button {
    min-height: 34px;

    padding: 0 13px;

    border-radius: 6px;

    cursor: pointer;

    font-size: 10px;
    font-weight: 700;
}

.tfg-hierarchy-create-cancel {
    border:
        1px solid #46637a;

    background: #122d42;

    color: #d8e7f0;
}

.tfg-hierarchy-create-save {
    border:
        1px solid #278bcf;

    background: #1976bf;

    color: #ffffff;
}

/* =========================================================
   TFG PUSTAKA ASET - CRUD ACTION TOOLS V1
   ========================================================= */

.tfg-library-selection-tools {
    flex: 0 0 auto;

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    gap: 5px;

    padding: 7px;

    border-top:
        1px solid rgba(103, 144, 174, .18);

    background:
        rgba(8, 27, 42, .66);
}

.tfg-library-selection-tools[hidden] {
    display: none !important;
}

.tfg-library-selection-tools button {
    min-height: 28px;

    padding: 0 6px;

    border-radius: 5px;

    cursor: pointer;

    font-size: 8px;
    font-weight: 700;
}

.tfg-library-edit-action {
    border:
        1px solid rgba(62, 148, 209, .46);

    background:
        rgba(25, 118, 191, .15);

    color: #a5dcff;
}

.tfg-library-edit-action:hover {
    background:
        rgba(25, 118, 191, .30);

    color: #ffffff;
}

.tfg-library-delete-action {
    border:
        1px solid rgba(201, 91, 91, .42);

    background:
        rgba(155, 54, 54, .12);

    color: #ffb0aa;
}

.tfg-library-delete-action:hover {
    background:
        rgba(175, 60, 60, .28);

    color: #ffffff;
}

/* =========================================================
   TFG PUSTAKA ASET - SEARCH FILTER & CRUD ICONS V1
   ========================================================= */

.tfg-lib-tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.tfg-lib-tool-btn svg {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
}

.tfg-lib-searchbar {
    display: grid;
    gap: 8px;

    padding:
        8px
        10px
        10px;

    border-bottom:
        1px solid
        rgba(104, 151, 185, .16);

    background:
        linear-gradient(
            180deg,
            rgba(7, 29, 46, .70),
            rgba(5, 22, 36, .36)
        );
}

.tfg-lib-search-row,

.tfg-lib-search-row {
    grid-template-columns:
        minmax(0, 1fr)
        40px;
}

.tfg-lib-filter-row {
    grid-template-columns:
        minmax(0, 1fr)
        auto;
    align-items: center;
}

.tfg-lib-search-field {
    display: grid;
    grid-template-columns:
        34px
        minmax(0, 1fr);

    align-items: center;

    min-height: 38px;

    border:
        1px solid
        rgba(97, 154, 194, .24);

    border-radius: 10px;

    background:
        rgba(11, 34, 51, .72);

    overflow: hidden;
}

.tfg-lib-search-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: #89c9f3;
}

.tfg-lib-search-icon svg {
    width: 15px;
    height: 15px;
}

.tfg-lib-search-input {
    width: 100%;
    min-width: 0;
    height: 100%;

    padding:
        9px
        10px
        9px
        0;

    border: 0;
    outline: 0;

    background: transparent;
    color: #eef8ff;
    font-size: 12px;
}


.tfg-lib-search-input::placeholder {
    color: rgba(210, 232, 248, .62);
}

.tfg-lib-search-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    min-width: 40px;
    height: 38px;

    border:
        1px solid
        rgba(97, 154, 194, .24);

    border-radius: 10px;

    background:
        rgba(17, 49, 73, .88);

    color: #d9eefb;
    cursor: pointer;
}

.tfg-lib-search-clear svg {
    width: 15px;
    height: 15px;
}


@media (max-width: 1400px) {
    .tfg-lib-filter-row {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 768px) {
    .tfg-lib-search-row {
        grid-template-columns: 1fr 38px;
    }

    .tfg-lib-searchbar {
        padding:
            8px
            8px
            10px;
    }
}

/* TFG PUSTAKA ASET - SEARCH FILTER & CRUD ICONS V1 END */

/* =========================================================
   TFG PUSTAKA - CRUD RELIABILITY PATCH V3
   ========================================================= */

.tfg-lib-static-icon-btn,
.tfg-library-selection-tools
.tfg-lib-static-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 6px;
}

.tfg-lib-static-icon-btn svg {
    width: 13px;
    height: 13px;

    flex: 0 0 13px;
}

.tfg-library-selection-tools
.tfg-lib-static-icon-btn svg {
    width: 14px;
    height: 14px;

    flex-basis: 14px;
}


/*
 * Modal Pustaka berada pada lapisan 7000.
 * Dialog CRUD dibuat jelas di atasnya.
 */
.tfg-hierarchy-create-overlay {
    z-index: 12000 !important;
}


/*
 * Hindari dekorasi runtime menimpa
 * ikon statis yang sudah ada.
 */
.tfg-lib-static-icon-btn.tfg-lib-tool-btn svg {
    display: block;
}

/* TFG PUSTAKA - CRUD RELIABILITY PATCH V3 END */

/* =========================================================
   TFG PUSTAKA - SEMBUNYIKAN TRIGGER KELOLA PUSTAKA
   CRUD sekarang diakses langsung dari tiap kolom.
   ========================================================= */

#tfgManageLibraryButton {
    display: none !important;
}







/* =========================================================
   TFG TAMBAH KELAS - MOCKUP / TOP VIEW V1
   ========================================================= */

.tfg-hierarchy-topview {
    margin-bottom: 13px;

    padding: 10px;

    border:
        1px solid
        rgba(80, 154, 202, .24);

    border-radius: 7px;

    background:
        rgba(8, 31, 48, .52);
}

.tfg-hierarchy-topview[hidden] {
    display: none !important;
}

.tfg-hierarchy-topview-title {
    margin-bottom: 7px;

    color: #e9f6ff;

    font-size: 10px;
    font-weight: 800;
}

.tfg-hierarchy-topview-preview {
    min-height: 92px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 8px;

    border:
        1px dashed
        rgba(100, 172, 218, .34);

    border-radius: 6px;

    background:
        rgba(5, 22, 35, .56);

    color: #77c8f5;
}

.tfg-hierarchy-topview-preview svg {
    width: 150px;
    height: 56px;

    display: block;
}

.tfg-hierarchy-topview-preview-text {
    margin-top: 2px;

    color: #8faabb;

    font-size: 8px;
}

.tfg-hierarchy-topview-note {
    margin-top: 7px;

    color: #8ea8b9;

    font-size: 8px;
    line-height: 1.45;
}

.tfg-hierarchy-topview-option {
    display: flex;
    align-items: flex-start;
    gap: 7px;

    margin-top: 9px;

    padding: 7px 8px;

    border-radius: 6px;

    background:
        rgba(25, 111, 166, .12);

    color: #cae7f7;

    cursor: pointer;

    font-size: 9px;
    line-height: 1.4;
}

.tfg-hierarchy-topview-option input {
    margin: 2px 0 0;

    flex: 0 0 auto;
}

/* TFG TAMBAH KELAS - MOCKUP / TOP VIEW V1 END */





/* =========================================================
   TFG PUSTAKA - FINAL HEADER & CRUD LAYOUT V1
   ========================================================= */

/*
 * HEADER UTAMA
 *
 * Sediakan ruang tetap di kanan untuk:
 * [Rancang Mockup] [X]
 *
 * Ini sengaja menjadi override PALING AKHIR
 * dari aturan header lama.
 */
.tfg-asset-library-modal-header {
    position: relative;

    display: flex;
    align-items: center;
    gap: 12px;

    min-height: 60px;

    padding:
        10px
        225px
        10px
        18px
        !important;
}

.tfg-asset-library-heading {
    flex: 0 1 42%;
    min-width: 220px;
}

/*
 * Search hanya memakai ruang yang tersisa.
 */
.tfg-asset-library-modal-header
.tfg-lib-searchbar {
    flex: 1 1 420px;

    width: auto;
    max-width: 560px;
    min-width: 260px;

    margin:
        0
        0
        0
        auto;

    padding: 0;

    border: 0;

    background: transparent;
}

/*
 * Tombol Rancang Mockup:
 * tetap di kanan, tetapi punya ruang sendiri
 * dan tidak boleh masuk ke area Search.
 */
/*
 * Tombol Close selalu paling kanan.
 */
.tfg-asset-library-close {
    position: absolute !important;

    top: 50%;
    right: 16px;

    transform:
        translateY(-50%);

    margin: 0;

    z-index: 100;
}


/* =========================================================
   HEADER KATEGORI / TIPE / KELAS / ASET
   ========================================================= */

.tfg-lib-column-heading-row {
    display: flex !important;

    align-items: center !important;
    justify-content: space-between !important;

    gap: 8px !important;

    min-width: 0;
}

.tfg-lib-column-heading-row > :first-child {
    min-width: 0;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;
}

.tfg-lib-column-heading-row button {
    flex: 0 0 auto;

    margin-left: auto !important;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1100px) {

    .tfg-asset-library-modal-header {
        flex-wrap: wrap;

        row-gap:
            8px
            !important;

        padding:
            10px
            18px
            12px
            18px
            !important;
    }

    .tfg-asset-library-heading {
        flex:
            1 1
            calc(100% - 180px);

        padding-right:
            44px;
    }

    .tfg-asset-library-modal-header
    .tfg-lib-searchbar {
        order: 10;

        flex:
            1 1
            100%;

        max-width: none;
        min-width: 0;

        margin: 0;
    }

    .tfg-asset-library-close {
        top: 10px !important;
        right: 18px !important;
        bottom: auto !important;

        transform: none;
    }
}

@media (max-width: 700px) {

    .tfg-asset-library-modal-header {
        padding:
            10px
            12px
            12px
            12px
            !important;
    }

    .tfg-asset-library-heading {
        flex-basis: 100%;

        padding-right:
            44px;
    }

    .tfg-asset-library-close {
        top: 10px !important;
        right: 12px !important;
        bottom: auto !important;
    }
}

/* TFG PUSTAKA - FINAL HEADER & CRUD LAYOUT V1 END */

/* =========================================================
   TFG PUSTAKA - CLOSE CLICK FIX V1
   ========================================================= */

.tfg-asset-library-close,
.tfg-lib-search-clear {
    pointer-events: auto !important;
    cursor: pointer !important;
}

.tfg-asset-library-close {
    touch-action: manipulation;
}

.tfg-lib-search-clear {
    touch-action: manipulation;
}

/* TFG PUSTAKA - CLOSE CLICK FIX V1 END */



/* =========================================================
   TFG PUSTAKA - SEARCH INPUT CLEAR INSIDE V1
   ========================================================= */

.tfg-lib-search-field {
    position: relative;
}

.tfg-lib-search-input {
    padding-right:
        38px
        !important;
}

.tfg-lib-search-field
.tfg-lib-search-clear {
    position: absolute;

    top: 50%;
    right: 6px;

    transform:
        translateY(-50%);

    width: 28px;
    min-width: 28px;
    height: 28px;

    padding: 0;

    border: 0;

    border-radius: 7px;

    background:
        transparent;

    color:
        rgba(
            220,
            239,
            250,
            .82
        );

    font-size: 18px;
    line-height: 1;

    z-index: 5;
}

.tfg-lib-search-field
.tfg-lib-search-clear:hover {
    transform:
        translateY(-50%)
        !important;

    background:
        rgba(
            92,
            151,
            190,
            .16
        );
}

.tfg-lib-search-field
.tfg-lib-search-clear[hidden] {
    display: none !important;
}

/* TFG PUSTAKA - SEARCH INPUT CLEAR INSIDE V1 END */

/* =========================================================
   TFG PUSTAKA - SEARCH ALIGN RIGHT V3
   ========================================================= */

.tfg-asset-library-modal-header
.tfg-lib-searchbar {
    margin-left:
        auto
        !important;

    margin-right:
        10px
        !important;

    max-width:
        500px
        !important;
}

/*
 * Search lebih dekat ke tombol tutup,
 * tetapi tetap menyisakan ruang aman.
 */
.tfg-asset-library-modal-header {
    column-gap:
        8px
        !important;
}

@media (max-width: 1100px) {

    .tfg-asset-library-modal-header
    .tfg-lib-searchbar {
        margin-right:
            0
            !important;

        max-width:
            none
            !important;
    }
}

/* TFG PUSTAKA - SEARCH ALIGN RIGHT V3 END */


/* =========================================================
   TFG PUSTAKA - DETAIL MOCKUP ACTION FRAME V2
   ========================================================= */

.tfg-template-mockup-frame-v1 {
    position: relative;
    display: flex !important;
    flex-direction: column;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 10px;
    height: auto !important;
    min-height: 155px;
    padding: 14px !important;
    overflow: hidden;
}

.tfg-template-mockup-frame-v1 > svg {
    display: block;
    width: 100% !important;
    height: 88px !important;
    min-height: 88px;
    flex: 0 0 88px;
}

.tfg-template-mockup-frame-v1
.tfg-template-mockup-inline-actions {
    position: static;
    width: 100%;
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    box-sizing: border-box;
    padding-top: 10px;
    margin: 0 !important;
    border-top: 1px solid rgba(120, 169, 198, .18);
}

.tfg-template-mockup-frame-v1
.tfg-template-mockup-inline-btn {
    width: auto !important;
    min-width: 118px;
    margin: 0 !important;
    padding: 8px 14px !important;
    font-size: 11px;
    line-height: 1.15;
}

.tfg-template-mockup-frame-v1
.tfg-template-mockup-inline-btn-danger {
    border-color: rgba(194, 76, 76, .45) !important;
}

@media (max-width: 900px) {
    .tfg-template-mockup-frame-v1 {
        min-height: 150px;
    }

    .tfg-template-mockup-frame-v1
    .tfg-template-mockup-inline-actions {
        justify-content: flex-start;
    }

    .tfg-template-mockup-frame-v1
    .tfg-template-mockup-inline-btn {
        min-width: 0;
        flex: 1 1 auto;
    }
}

/* TFG PUSTAKA - DETAIL MOCKUP ACTION FRAME V2 END */

/* =========================================================
   TFG PUSTAKA - HIDE DUPLICATE CLASS DESIGNER V1
   ========================================================= */

/*
 * Saat detail template menampilkan aksi mockup
 * di dalam frame preview, tombol Perancang kelas
 * lama menggunakan atribut hidden.
 *
 * Beberapa style tombol lama mengalahkan perilaku
 * default browser [hidden], sehingga dipaksa hilang.
 */
#tfgAssetClassDesignerV3[hidden] {
    display: none !important;
}

/* TFG PUSTAKA - HIDE DUPLICATE CLASS DESIGNER V1 END */





/* =========================================================
   TFG ASSET WORKSPACE - LIBRARY / DESIGNER V1
   ========================================================= */

/*
 * Overlay Perancang lama tidak digunakan lagi.
 */
#tfgTopViewDesignerOverlay {
    display: none !important;
}


/*
 * Ketika shell Pustaka masuk mode Perancang,
 * shell yang sama menjadi workspace editor.
 */
#tfgAssetLibraryModalV3
.tfg-asset-library-modal.tfg-asset-workspace-designer-mode {
    display: flex;
    flex-direction: column;
}


/*
 * Toolbar khusus Perancang pada header Pustaka.
 */
.tfg-asset-workspace-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.tfg-asset-workspace-actions[hidden] {
    display: none !important;
}


.tfg-asset-workspace-back,
.tfg-asset-workspace-save {
    min-height: 36px;
    padding: 0 14px;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}


.tfg-asset-workspace-back {
    border:
        1px solid
        rgba(125, 178, 207, .30);

    background:
        rgba(255, 255, 255, .035);

    color:
        #d9edf8;
}


.tfg-asset-workspace-back:hover {
    background:
        rgba(255, 255, 255, .075);
}


.tfg-asset-workspace-save {
    border:
        1px solid
        rgba(64, 181, 239, .55);

    background:
        #188fca;

    color:
        #ffffff;
}


.tfg-asset-workspace-save:hover {
    background:
        #1b9fdf;
}


/*
 * Area iframe Perancang berada di dalam shell modal
 * Pustaka, bukan di overlay terpisah.
 */
.tfg-asset-workspace-designer-host {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    overflow: hidden;
    background: #061b2b;
}


.tfg-asset-workspace-designer-host[hidden] {
    display: none !important;
}


.tfg-asset-workspace-designer-frame-wrap {
    width: 100%;
    height: 100%;
    min-height: 0;
}


.tfg-asset-workspace-designer-frame-wrap
#tfgTopViewDesignerFrame {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
    background: #061b2b;
}


@media (max-width: 900px) {

    .tfg-asset-workspace-actions {
        gap: 5px;
    }

    .tfg-asset-workspace-back,
    .tfg-asset-workspace-save {
        padding:
            0 9px;
    }
}

/* TFG ASSET WORKSPACE - LIBRARY / DESIGNER V1 END */

/* =========================================================
   TFG ASSET WORKSPACE - HEADER ACTION CLUSTER V2
   ========================================================= */

#tfgAssetLibraryModalV3
.tfg-asset-library-modal-header {
    display: flex;
    align-items: center;
}


/*
 * Grup aksi kanan dibuat rapat dan menyatu.
 */
#tfgAssetLibraryModalV3
.tfg-asset-workspace-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    margin-left: auto;
    margin-right: 7px;
}


/*
 * Kembali dan Simpan dibuat setinggi tombol tutup.
 */
#tfgAssetLibraryModalV3
.tfg-asset-workspace-back,
#tfgAssetLibraryModalV3
.tfg-asset-workspace-save {
    height: 38px;
    min-height: 38px;
    box-sizing: border-box;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    padding: 0 15px;
    margin: 0;

    white-space: nowrap;

    border-radius: 8px;

    font-size: 11px;
    line-height: 1;
    font-weight: 700;
}


/*
 * Ikon kiri tombol.
 */
#tfgAssetLibraryModalV3
.tfg-asset-workspace-back > span:first-child,
#tfgAssetLibraryModalV3
.tfg-asset-workspace-save > span:first-child {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 14px;

    font-size: 14px;
    line-height: 1;
}


/*
 * Kembali = aksi sekunder.
 */
#tfgAssetLibraryModalV3
.tfg-asset-workspace-back {
    border:
        1px solid
        rgba(125, 178, 207, .38);

    background:
        rgba(255, 255, 255, .035);

    color:
        #e1f1f9;
}

#tfgAssetLibraryModalV3
.tfg-asset-workspace-back:hover {
    border-color:
        rgba(125, 178, 207, .62);

    background:
        rgba(255, 255, 255, .075);
}


/*
 * Simpan = aksi utama.
 */
#tfgAssetLibraryModalV3
.tfg-asset-workspace-save {
    border:
        1px solid
        rgba(70, 188, 244, .62);

    background:
        #188fca;

    color:
        #ffffff;
}

#tfgAssetLibraryModalV3
.tfg-asset-workspace-save:hover {
    background:
        #1b9fdf;
}


/*
 * Tombol X tetap paling kanan dan tinggi sama.
 */
#tfgAssetLibraryModalV3
#tfgAssetLibraryCloseV3 {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px;
    min-height: 38px;

    flex: 0 0 38px;

    margin: 0 !important;

    display: inline-flex;
    align-items: center;
    justify-content: center;
}


/*
 * Saat mode Perancang, header kanan menjadi:
 *
 * [← Kembali] [▣ Simpan] [×]
 *
 * tanpa ruang kosong besar di antaranya.
 */
#tfgAssetLibraryModalV3
.tfg-asset-workspace-designer-mode
.tfg-asset-library-modal-header {
    gap: 0;
}


/*
 * Responsive.
 */
@media (max-width: 900px) {

    #tfgAssetLibraryModalV3
    .tfg-asset-workspace-actions {
        gap: 5px;
        margin-right: 5px;
    }

    #tfgAssetLibraryModalV3
    .tfg-asset-workspace-back,
    #tfgAssetLibraryModalV3
    .tfg-asset-workspace-save {
        height: 36px;
        min-height: 36px;
        padding: 0 10px;
        gap: 5px;
        font-size: 10px;
    }

    #tfgAssetLibraryModalV3
    #tfgAssetLibraryCloseV3 {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px;
        min-height: 36px;
        flex-basis: 36px;
    }
}

/* TFG ASSET WORKSPACE - HEADER ACTION CLUSTER V2 END */

/* =========================================================
   TFG ASSET WORKSPACE - FINAL HEADER ALIGNMENT V1
   ========================================================= */

/*
 * Header utama selalu memakai pola:
 *
 * [Judul]  ruang fleksibel  [aksi/search] [X]
 */
#tfgAssetLibraryModalV3
.tfg-asset-library-modal-header {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
}


/*
 * Judul hanya mengambil ruang yang diperlukan.
 * margin-right:auto mendorong seluruh kontrol
 * berikutnya ke sisi kanan.
 */
#tfgAssetLibraryModalV3
.tfg-asset-library-heading {
    flex: 0 1 auto !important;
    min-width: 220px;
    margin-right: auto !important;
}


/*
 * Search Pustaka ditempatkan di sisi kanan,
 * dekat dengan tombol X.
 *
 * :has() dipakai agar kita tidak tergantung
 * pada nama class wrapper pencarian lama.
 */
#tfgAssetLibraryModalV3
.tfg-asset-library-modal-header
> *:has(
    input[placeholder*="Cari"]
) {
    flex: 0 1 500px !important;
    width: min(500px, 42vw) !important;
    max-width: 500px !important;
    min-width: 260px !important;

    margin-left: 0 !important;
    margin-right: 0 !important;
}


/*
 * Input pencarian memenuhi wrapper-nya.
 */
#tfgAssetLibraryModalV3
.tfg-asset-library-modal-header
input[placeholder*="Cari"] {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box;
}


/*
 * MODE PERANCANG
 *
 * Aksi workspace harus berada tepat sebelum X,
 * bukan di tengah header.
 */
#tfgAssetLibraryModalV3
.tfg-asset-workspace-actions {
    flex: 0 0 auto !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;

    gap: 7px !important;

    margin-left: 0 !important;
    margin-right: 0 !important;
}


/*
 * Jika action group disembunyikan pada mode Pustaka,
 * jangan biarkan rule display:flex di atas
 * mengalahkan atribut hidden.
 */
#tfgAssetLibraryModalV3
.tfg-asset-workspace-actions[hidden] {
    display: none !important;
}


/*
 * Tombol X selalu elemen paling kanan.
 */
#tfgAssetLibraryModalV3
#tfgAssetLibraryCloseV3 {
    flex: 0 0 38px !important;

    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;

    margin-left: 0 !important;
    margin-right: 0 !important;
}


/*
 * Khusus mode Perancang:
 * jangan ada elemen lain mengambil ruang
 * di antara judul dan action cluster.
 */
#tfgAssetLibraryModalV3
.tfg-asset-workspace-designer-mode
.tfg-asset-library-heading {
    margin-right: auto !important;
}


/*
 * Desktop lebar:
 * search cukup lebar tetapi tetap menempel
 * ke kelompok kontrol kanan.
 */
@media (min-width: 1200px) {

    #tfgAssetLibraryModalV3
    .tfg-asset-library-modal-header
    > *:has(
        input[placeholder*="Cari"]
    ) {
        width: 500px !important;
        flex-basis: 500px !important;
    }
}


/*
 * Layar lebih kecil:
 * search boleh mengecil agar tidak menekan judul.
 */
@media (max-width: 900px) {

    #tfgAssetLibraryModalV3
    .tfg-asset-library-heading {
        min-width: 150px;
    }

    #tfgAssetLibraryModalV3
    .tfg-asset-library-modal-header
    > *:has(
        input[placeholder*="Cari"]
    ) {
        flex-basis: 300px !important;
        width: min(300px, 36vw) !important;
        min-width: 180px !important;
    }

    #tfgAssetLibraryModalV3
    .tfg-asset-workspace-actions {
        gap: 5px !important;
    }
}

/* TFG ASSET WORKSPACE - FINAL HEADER ALIGNMENT V1 END */

/* =========================================================
   TFG ASSET WORKSPACE - RESPONSIVE FINAL V1
   ========================================================= */

/*
 * DESKTOP / LAPTOP
 * Workspace lebar tetapi tidak menempel tepi viewport.
 */
#tfgAssetLibraryModalV3
.tfg-asset-library-modal {
    width: min(1460px, calc(100vw - 48px));
    height: min(900px, calc(100dvh - 48px));
    max-width: 1460px;
    max-height: 900px;
}


/*
 * Header desktop.
 */
:is(
    #tfgAssetLibraryModalV3,
    #tfgHelpModal
)
.tfg-asset-library-modal-header {
    min-height: 66px;
    padding-left: 18px;
    padding-right: 14px;
}


/*
 * TABLET
 */
@media
(max-width: 1100px) {

    #tfgAssetLibraryModalV3
    .tfg-asset-library-modal {
        width: calc(100vw - 24px);
        height: calc(100dvh - 24px);
        max-width: none;
        max-height: none;
    }

    :is(
        #tfgAssetLibraryModalV3,
        #tfgHelpModal
    )
    .tfg-asset-library-modal-header {
        min-height: 62px;
        padding:
            10px 12px;
    }

    :is(
        #tfgAssetLibraryModalV3,
        #tfgHelpModal
    )
    .tfg-asset-library-heading {
        min-width: 170px !important;
    }

    #tfgAssetLibraryModalV3
    .tfg-asset-workspace-back,
    #tfgAssetLibraryModalV3
    .tfg-asset-workspace-save {
        height: 36px;
        min-height: 36px;
        padding:
            0 11px !important;
    }
}


/*
 * SMARTPHONE
 */
@media
(max-width: 640px) {

    #tfgAssetLibraryModalV3 {
        padding: 0 !important;
    }

    #tfgAssetLibraryModalV3
    .tfg-asset-library-modal {
        width: 100vw !important;
        height: 100dvh !important;
        max-width: none !important;
        max-height: none !important;

        border-radius: 0 !important;
        border-left: 0;
        border-right: 0;
    }


    /*
     * Header mobile menjadi dua baris:
     *
     * Judul              X
     * Kembali     Simpan
     */
    #tfgAssetLibraryModalV3
    .tfg-asset-library-modal-header {
        min-height: auto !important;

        display: grid !important;
        grid-template-columns:
            minmax(0, 1fr)
            auto !important;

        grid-template-areas:
            "heading close"
            "actions actions";

        gap: 8px 10px !important;

        padding:
            10px 12px !important;
    }


    #tfgAssetLibraryModalV3
    .tfg-asset-library-heading {
        grid-area: heading;

        min-width: 0 !important;
        width: auto !important;
        margin: 0 !important;
    }


    #tfgAssetLibraryModalV3
    .tfg-asset-library-title {
        font-size: 15px;
        line-height: 1.15;
    }


    #tfgAssetLibraryModalV3
    .tfg-asset-library-subtitle {
        margin-top: 2px;
        font-size: 9px;
        line-height: 1.25;
    }


    #tfgAssetLibraryModalV3
    #tfgAssetLibraryCloseV3 {
        grid-area: close;

        width: 36px !important;
        min-width: 36px !important;
        height: 36px !important;
    }


    #tfgAssetLibraryModalV3
    .tfg-asset-workspace-actions {
        grid-area: actions;

        width: 100%;

        display: grid !important;
        grid-template-columns:
            minmax(0, 1fr)
            minmax(0, 1fr);

        gap: 7px !important;

        margin: 0 !important;
    }


    #tfgAssetLibraryModalV3
    .tfg-asset-workspace-back,
    #tfgAssetLibraryModalV3
    .tfg-asset-workspace-save {
        width: 100% !important;
        min-width: 0 !important;

        height: 36px;
        min-height: 36px;

        padding:
            0 8px !important;

        font-size: 10px;
    }


    /*
     * Search pada mode Pustaka juga memakai
     * baris kedua penuh pada mobile.
     */
    #tfgAssetLibraryModalV3
    .tfg-asset-library-modal-header
    > *:has(
        input[placeholder*="Cari"]
    ) {
        grid-column: 1 / -1;

        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;

        flex: none !important;

        margin: 0 !important;
    }
}

/* TFG ASSET WORKSPACE - RESPONSIVE FINAL V1 END */









/* =========================================================
   TFG ASSET WORKSPACE - CLOSE BUTTON FINAL
   ========================================================= */

/*
 * Satu sumber final tombol X untuk:
 * - Pustaka Aset
 * - Perancang Mockup
 * - desktop
 * - tablet
 * - smartphone
 *
 * Tombol tidak ikut flow flex/grid dan tidak berubah
 * posisi ketika hover/focus/active.
 */

#tfgAssetLibraryModalV3
.tfg-asset-library-modal-header {
    position: relative !important;

    /*
     * Sisakan ruang permanen untuk X.
     */
    padding-right: 62px !important;
}


#tfgAssetLibraryModalV3
#tfgAssetLibraryCloseV3,
#tfgAssetLibraryModalV3
#tfgAssetLibraryCloseV3:hover,
#tfgAssetLibraryModalV3
#tfgAssetLibraryCloseV3:focus,
#tfgAssetLibraryModalV3
#tfgAssetLibraryCloseV3:focus-visible,
#tfgAssetLibraryModalV3
#tfgAssetLibraryCloseV3:active {
    position: absolute !important;

    top: 10px !important;
    right: 12px !important;

    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;

    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    flex: none !important;

    grid-area: unset !important;

    align-self: unset !important;
    justify-self: unset !important;

    padding: 0 !important;
    margin: 0 !important;

    border-radius: 8px !important;

    line-height: 1 !important;

    transform: none !important;
    translate: none !important;

    z-index: 50 !important;
}


#tfgAssetLibraryModalV3
#tfgAssetLibraryCloseV3:hover,
#tfgAssetLibraryModalV3
#tfgAssetLibraryCloseV3:focus,
#tfgAssetLibraryModalV3
#tfgAssetLibraryCloseV3:focus-visible {
    box-shadow:
        0 0 0 1px
        rgba(120, 190, 255, .18),

        0 8px 18px
        rgba(0, 0, 0, .18)
        !important;
}


/*
 * Search dan action cluster berhenti sebelum X.
 */
#tfgAssetLibraryModalV3
.tfg-asset-workspace-actions {
    margin-right: 0 !important;
}


#tfgAssetLibraryModalV3
.tfg-asset-library-modal-header
> *:has(
    input[placeholder*="Cari"]
) {
    margin-right: 0 !important;
}


/* TABLET */

@media (max-width: 1100px) {

    #tfgAssetLibraryModalV3
    .tfg-asset-library-modal-header {
        padding-right: 58px !important;
    }


    #tfgAssetLibraryModalV3
    #tfgAssetLibraryCloseV3,
    #tfgAssetLibraryModalV3
    #tfgAssetLibraryCloseV3:hover,
    #tfgAssetLibraryModalV3
    #tfgAssetLibraryCloseV3:focus,
    #tfgAssetLibraryModalV3
    #tfgAssetLibraryCloseV3:focus-visible,
    #tfgAssetLibraryModalV3
    #tfgAssetLibraryCloseV3:active {
        top: 10px !important;
        right: 11px !important;

        width: 36px !important;
        min-width: 36px !important;
        max-width: 36px !important;

        height: 36px !important;
        min-height: 36px !important;
        max-height: 36px !important;
    }
}


/* SMARTPHONE */

@media (max-width: 640px) {

    #tfgAssetLibraryModalV3
    .tfg-asset-library-modal-header {
        padding-right: 58px !important;
    }


    #tfgAssetLibraryModalV3
    #tfgAssetLibraryCloseV3,
    #tfgAssetLibraryModalV3
    #tfgAssetLibraryCloseV3:hover,
    #tfgAssetLibraryModalV3
    #tfgAssetLibraryCloseV3:focus,
    #tfgAssetLibraryModalV3
    #tfgAssetLibraryCloseV3:focus-visible,
    #tfgAssetLibraryModalV3
    #tfgAssetLibraryCloseV3:active {
        top: 9px !important;
        right: 10px !important;

        width: 36px !important;
        min-width: 36px !important;
        max-width: 36px !important;

        height: 36px !important;
        min-height: 36px !important;
        max-height: 36px !important;
    }
}


/* HP SANGAT KECIL */

@media (max-width: 400px) {

    #tfgAssetLibraryModalV3
    .tfg-asset-library-modal-header {
        padding-right: 56px !important;
    }


    #tfgAssetLibraryModalV3
    #tfgAssetLibraryCloseV3,
    #tfgAssetLibraryModalV3
    #tfgAssetLibraryCloseV3:hover,
    #tfgAssetLibraryModalV3
    #tfgAssetLibraryCloseV3:focus,
    #tfgAssetLibraryModalV3
    #tfgAssetLibraryCloseV3:focus-visible,
    #tfgAssetLibraryModalV3
    #tfgAssetLibraryCloseV3:active {
        top: 9px !important;
        right: 9px !important;
    }
}

/* TFG ASSET WORKSPACE - CLOSE BUTTON FINAL END */

/* =========================================================
   TFG PUSTAKA - CRUD ACTION FINAL
   ========================================================= */

#tfgAssetLibraryModalV3
.tfg-asset-library-column {
    display: flex;
    flex-direction: column;

    min-height: 0;
}


#tfgAssetLibraryModalV3
.tfg-asset-library-list {
    flex: 1 1 auto;

    min-height: 0;
}


#tfgAssetLibraryModalV3
.tfg-library-selection-tools {
    display: grid !important;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        ) !important;

    align-items: stretch !important;

    gap: 10px !important;

    width: 100%;

    min-height: 58px !important;

    margin:
        auto
        0
        0 !important;

    padding:
        10px
        12px
        12px !important;

    box-sizing:
        border-box !important;

    border:
        0 !important;

    outline:
        0 !important;

    box-shadow:
        none !important;

    background:
        transparent !important;

    background-image:
        none !important;
}


#tfgAssetLibraryModalV3
.tfg-library-selection-tools[hidden] {
    display:
        none !important;
}


#tfgAssetLibraryModalV3
.tfg-library-selection-tools::before,

#tfgAssetLibraryModalV3
.tfg-library-selection-tools::after {
    content:
        none !important;

    display:
        none !important;
}


#tfgAssetLibraryModalV3
.tfg-library-selection-tools
.tfg-library-edit-action,

#tfgAssetLibraryModalV3
.tfg-library-selection-tools
.tfg-library-delete-action {
    width:
        100% !important;

    min-width:
        0 !important;

    height:
        38px !important;

    min-height:
        38px !important;

    max-height:
        38px !important;

    display:
        inline-flex !important;

    align-items:
        center !important;

    justify-content:
        center !important;

    gap:
        8px !important;

    margin:
        0 !important;

    padding:
        0
        10px !important;

    box-sizing:
        border-box !important;

    line-height:
        1 !important;

    white-space:
        nowrap !important;
}


#tfgAssetLibraryModalV3
.tfg-library-selection-tools
.tfg-lib-static-icon-btn
svg {
    flex:
        0 0
        14px !important;

    width:
        14px !important;

    height:
        14px !important;

    display:
        block !important;

    margin:
        0 !important;
}


#tfgAssetLibraryModalV3
.tfg-library-selection-tools
.tfg-lib-static-icon-btn
span {
    line-height:
        1 !important;

    white-space:
        nowrap !important;
}


@media (max-width: 768px) {

    #tfgAssetLibraryModalV3
    .tfg-library-selection-tools {
        gap:
            8px !important;

        min-height:
            54px !important;

        padding:
            9px
            10px !important;
    }


    #tfgAssetLibraryModalV3
    .tfg-library-selection-tools
    .tfg-library-edit-action,

    #tfgAssetLibraryModalV3
    .tfg-library-selection-tools
    .tfg-library-delete-action {
        height:
            36px !important;

        min-height:
            36px !important;

        max-height:
            36px !important;
    }
}

/* TFG PUSTAKA - CRUD ACTION FINAL END */

/* =========================================================
   TFG PUSTAKA - MODE PEMILIHAN ASET
   ========================================================= */

#tfgAssetLibraryModalV3
.tfg-asset-picker-guide {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    overflow-x: auto;
    border-bottom: 1px solid rgba(112, 177, 220, 0.15);
    background: rgba(5, 23, 37, 0.76);
    color: #93b1c5;
    font-size: 10px;
    white-space: nowrap;
}

#tfgAssetLibraryModalV3
.tfg-asset-picker-guide span {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    padding: 0 8px;
    border: 1px solid rgba(91, 161, 207, 0.22);
    border-radius: 999px;
    background: rgba(44, 115, 159, 0.11);
}

#tfgAssetLibraryModalV3
.tfg-asset-picker-guide span::after {
    content: ">";
    margin-left: 9px;
    color: #56b9ef;
    font-size: 15px;
    line-height: 1;
}

#tfgAssetLibraryModalV3
.tfg-asset-picker-guide span:last-child::after {
    display: none;
}

/*
 * CRUD hierarchy sekarang mengikuti permission server-side.
 *
 * Developer menerima markup Tambah / Sunting / Hapus langsung
 * pada tiap kolom Pustaka Aset.
 *
 * Non-Developer tidak menerima markup CRUD dari Blade, sehingga
 * tidak diperlukan lagi gate visual melalui class manager-open.
 *
 * Class manager-open tetap khusus untuk panel editor Aset lama
 * yang masih digunakan oleh Tambah/Sunting template Aset.
 */

#tfgAssetLibraryModalV3
.tfg-asset-library-modal:not(.manager-open)
.tfg-asset-template-card.active {
    border-color: rgba(86, 188, 239, 0.78);
    background: linear-gradient(
        135deg,
        rgba(24, 104, 154, 0.7),
        rgba(10, 47, 76, 0.82)
    );
    box-shadow: inset 3px 0 0 #56b9ef;
}

@media (max-width: 640px) {

    #tfgAssetLibraryModalV3
    .tfg-asset-picker-guide {
        padding: 8px 12px;
    }
}

/* =========================================================
   TFG PUSTAKA - LEGACY CLASS TOOLS DISABLED
   ========================================================= */

/*
 * Wrapper Perancang kelas lama dipertahankan sementara
 * di DOM untuk kompatibilitas JavaScript.
 *
 * UI Mockup aktif sekarang berada pada panel Detail.
 */
#tfgAssetLibraryModalV3
#tfgAssetClassToolsV3 {
    display: none !important;
}

/* TFG PUSTAKA - LEGACY CLASS TOOLS DISABLED END */

/* TFG SYSTEM MONITORING HEADER RESPONSIVE FIX */

#tfgSystemMonitoringModal
.tfg-asset-library-modal-header {
    position: relative !important;

    min-height: 60px !important;

    padding:
        10px
        62px
        10px
        18px
        !important;

    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;

    gap: 12px !important;
}

#tfgSystemMonitoringModal
.tfg-asset-library-heading {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

#tfgSystemMonitoringModal
#tfgSystemMonitoringModalClose {
    position: absolute !important;

    top: 10px !important;
    right: 16px !important;
    bottom: auto !important;

    transform: none !important;

    margin: 0 !important;
    flex: none !important;
}

@media (max-width: 700px) {

    #tfgSystemMonitoringModal
    .tfg-asset-library-modal-header {
        padding:
            10px
            56px
            10px
            12px
            !important;
    }

    #tfgSystemMonitoringModal
    #tfgSystemMonitoringModalClose {
        top: 10px !important;
        right: 12px !important;
        bottom: auto !important;
    }
}

/* TFG SYSTEM MONITORING HEADER RESPONSIVE FIX END */


/* ==========================================================
   TFG HIERARCHY MOCKUP THUMBNAIL V1
   ========================================================== */

.tfg-hierarchy-mockup-thumb {
    width: 34px;
    min-width: 34px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 5px;
    vertical-align: middle;
    margin-right: 7px;
}

.tfg-hierarchy-mockup-thumb svg {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 34px;
    max-height: 28px;
}

.tfg-hierarchy-mockup-placeholder {
    font-size: 17px;
    line-height: 1;
    opacity: .42;
}

.tfg-asset-library-option {
    display: flex;
    align-items: center;
}

.tfg-asset-library-option > .tfg-asset-library-count {
    margin-left: auto;
}

/* Domain memakai thumbnail sebagai visual utama. */
.tfg-asset-domain-tab > .tfg-hierarchy-mockup-thumb {
    width: 28px;
    min-width: 28px;
    height: 24px;
    margin-right: 5px;
}

/* TFG HIERARCHY MOCKUP THUMBNAIL V1 END */

/* =========================================================
   TFG DOMAIN TOOLBAR + HIERARCHY LIST OVERFLOW V2
   ========================================================= */

#tfgAssetLibraryModalV3
.tfg-domain-tabs-toolbar-v2 {
    display: flex;
    align-items: center;
    gap: 8px;

    width: 100%;
    min-width: 0;

    padding:
        6px
        10px;

    box-sizing: border-box;

    border-bottom:
        1px solid
        rgba(112, 177, 220, 0.12);
}


#tfgAssetLibraryModalV3
.tfg-domain-tabs-toolbar-v2
.tfg-asset-domain-tabs {
    flex:
        1 1 auto;

    min-width: 0;

    padding:
        0 !important;
}


#tfgAssetLibraryModalV3
.tfg-domain-edit-active-v2 {
    appearance: none;
    -webkit-appearance: none;

    flex:
        0 0 34px;

    width: 34px;
    min-width: 34px;
    height: 32px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border:
        1px solid
        rgba(73, 166, 226, 0.48);

    border-radius: 7px;

    background:
        rgba(15, 78, 116, 0.38);

    color:
        #a9ddfa;

    cursor: pointer;
}


#tfgAssetLibraryModalV3
.tfg-domain-edit-active-v2:hover {
    border-color:
        rgba(95, 199, 255, 0.75);

    background:
        rgba(19, 108, 158, 0.50);

    color:
        #ffffff;
}


#tfgAssetLibraryModalV3
.tfg-domain-edit-active-v2 svg {
    display: block;

    width: 15px;
    height: 15px;
}


/*
 * Semua kolom hierarchy harus tetap berada
 * di dalam grid masing-masing.
 */
#tfgAssetLibraryModalV3
.tfg-asset-library-column {
    min-width: 0;

    overflow:
        hidden;
}


/*
 * List hanya boleh scroll vertikal.
 * Scroll horizontal putih seperti pada Kategori
 * tidak boleh muncul.
 */
#tfgAssetLibraryModalV3
.tfg-asset-library-list {
    min-width: 0;
    max-width: 100%;

    overflow-x:
        hidden !important;

    overflow-y:
        auto;
}


/*
 * Item tidak boleh memperlebar kolom.
 */
#tfgAssetLibraryModalV3
.tfg-asset-library-option {
    width: 100%;
    min-width: 0;
    max-width: 100%;

    box-sizing:
        border-box;

    overflow:
        hidden;
}


/*
 * Thumbnail tidak mengecil,
 * nama boleh membungkus.
 */
#tfgAssetLibraryModalV3
.tfg-hierarchy-mockup-thumb {
    flex:
        0 0 auto;
}


#tfgAssetLibraryModalV3
.tfg-asset-library-option {
    white-space:
        normal;
}


#tfgAssetLibraryModalV3
.tfg-asset-library-option
span {
    min-width: 0;

    overflow-wrap:
        anywhere;
}


/*
 * Badge jumlah tetap di sisi kanan
 * dan tidak mendorong lebar item.
 */
#tfgAssetLibraryModalV3
.tfg-asset-library-count {
    flex:
        0 0 auto;

    margin-left:
        auto;
}


/*
 * Rule lama tidak lagi digunakan.
 */
#tfgAssetLibraryModalV3
.tfg-domain-selection-tools-v1 {
    display:
        none !important;
}

/* TFG DOMAIN TOOLBAR + HIERARCHY LIST OVERFLOW V2 END */

/* =========================================================
   TFG ASSET MANAGER V2
   ========================================================= */

#tfgAssetLibraryModalV3
.tfg-manager-legacy-compat-v2 {
    display: none !important;
}

#tfgAssetLibraryModalV3
#tfgManagerClassDesigner {
    display: none !important;
}

#tfgAssetLibraryModalV3
#tfgManagerDomainContext {
    display: none !important;
}

#tfgAssetLibraryModalV3
.tfg-asset-manager-v2 {
    width: min(620px, 100%);
}

#tfgAssetLibraryModalV3
.tfg-asset-manager-subtitle-v2 {
    margin-top: 3px;
    font-size: 10px;
    color: #8eafc4;
}

#tfgAssetLibraryModalV3
.tfg-asset-manager-context-v2 {
    margin-bottom: 14px;
    padding: 9px 11px;
    border: 1px solid rgba(80, 158, 207, .25);
    border-radius: 8px;
    background: rgba(14, 50, 73, .38);
    color: #9fcae4;
    font-size: 11px;
    line-height: 1.45;
}

#tfgAssetLibraryModalV3
.tfg-asset-manager-section-v2 {
    margin-bottom: 14px;
    padding: 13px;
    border: 1px solid rgba(82, 148, 190, .23);
    border-radius: 9px;
    background: rgba(3, 25, 40, .34);
}

#tfgAssetLibraryModalV3
.tfg-asset-manager-section-title-v2 {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(93, 165, 210, .18);
    color: #a8dcfb;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .02em;
}

#tfgAssetLibraryModalV3
.tfg-asset-manager-grid-v2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

#tfgAssetLibraryModalV3
.tfg-asset-manager-field-v2 {
    margin-bottom: 10px;
}

#tfgAssetLibraryModalV3
.tfg-asset-manager-textarea-v2 {
    min-height: 72px;
    resize: vertical;
}

#tfgAssetLibraryModalV3
.tfg-asset-manager-mockup-v2 {
    padding: 10px;
    border: 1px dashed rgba(91, 164, 210, .27);
    border-radius: 8px;
    background: rgba(5, 30, 47, .50);
}

#tfgAssetLibraryModalV3
.tfg-asset-manager-mockup-status-v2 {
    margin-bottom: 10px;
    color: #9db7c7;
    font-size: 11px;
    line-height: 1.5;
}

#tfgAssetLibraryModalV3
.tfg-asset-manager-mockup-actions-v2 {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 700px) {

    #tfgAssetLibraryModalV3
    .tfg-asset-manager-grid-v2 {
        grid-template-columns: 1fr;
    }
}

/* TFG ASSET MANAGER V2 END */

/* =========================================================
   TFG ASSET MANAGER CLASS SCOPE V3
   ========================================================= */

/*
 * Kategori, Tipe dan Kelas tidak dipilih ulang
 * pada form Aset.
 *
 * Ketiganya diwarisi dari hierarchy Pustaka
 * tempat tombol Tambah/Sunting Aset dipanggil.
 *
 * Elemen select tetap berada di DOM hanya untuk
 * menjaga kontrak internal save yang sudah stabil.
 */
#tfgAssetLibraryModalV3
.tfg-asset-manager-scope-hidden-v3 {
    display: none !important;
}


/*
 * Breadcrumb merupakan satu-satunya representasi
 * hierarchy pada form Aset.
 */
#tfgAssetLibraryModalV3
.tfg-asset-manager-context-v2 {
    display: block;
    margin-bottom: 14px;
    padding: 10px 12px;
    font-weight: 700;
}

/* TFG ASSET MANAGER CLASS SCOPE V3 END */

/* =========================================================
   TFG HIERARCHY MOCKUP BEFORE SAVE V6
   ========================================================= */

#tfgAssetLibraryModalV3
.tfg-hierarchy-mockup-edit-now-v6 {
    width: 100%;
    margin-top: 10px;
    padding: 10px 14px;
    border: 1px solid rgba(67, 169, 231, .55);
    border-radius: 8px;
    background: rgba(20, 115, 176, .28);
    color: #d9f2ff;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

#tfgAssetLibraryModalV3
.tfg-hierarchy-mockup-edit-now-v6:hover:not(:disabled) {
    background: rgba(26, 137, 207, .42);
}

#tfgAssetLibraryModalV3
.tfg-hierarchy-mockup-edit-now-v6:disabled {
    cursor: not-allowed;
    opacity: .45;
}

#tfgAssetLibraryModalV3
.tfg-hierarchy-mockup-edit-note-v6 {
    margin-top: 7px;
    color: #8eafc4;
    font-size: 10px;
    line-height: 1.45;
}

/* TFG HIERARCHY MOCKUP BEFORE SAVE V6 END */

/* =========================================================
   TFG HIERARCHY MOCKUP CLEAN UI V7
   ========================================================= */

/*
 * Preview Mockup legacy tidak lagi ditampilkan
 * pada modal Tambah/Sunting hierarchy.
 *
 * Elemen tetap berada di DOM sementara karena
 * renderTopViewDialog() masih menggunakannya
 * sebagai compatibility bridge.
 */
#tfgHierarchyCreateOverlayV3
.tfg-hierarchy-topview-preview {
    display: none !important;
}

#tfgHierarchyCreateOverlayV3
#tfgHierarchyTopViewNoteV3 {
    display: none !important;
}


/*
 * Bagian Mockup sekarang cukup:
 *
 * Mockup
 * [ Buat/Sunting Mockup Sekarang ]
 * catatan singkat
 */
#tfgHierarchyCreateOverlayV3
#tfgHierarchyTopViewV3 {
    padding: 12px !important;
}

#tfgHierarchyCreateOverlayV3
.tfg-hierarchy-mockup-edit-now-v6 {
    display: block;
    width: 100%;
    margin: 4px 0 0;
    padding: 10px 14px;

    border: 1px solid rgba(67, 169, 231, .55);
    border-radius: 7px;

    background: rgba(20, 115, 176, .30);
    color: #d9f2ff;

    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;

    text-align: center;
    cursor: pointer;
}

#tfgHierarchyCreateOverlayV3
.tfg-hierarchy-mockup-edit-now-v6:hover:not(:disabled) {
    background: rgba(26, 137, 207, .46);
}

#tfgHierarchyCreateOverlayV3
.tfg-hierarchy-mockup-edit-now-v6:disabled {
    opacity: .45;
    cursor: not-allowed;
}

#tfgHierarchyCreateOverlayV3
.tfg-hierarchy-mockup-edit-note-v6 {
    display: block;

    margin: 7px 1px 0;

    color: #8eafc4;

    font-size: 9px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
}


/*
 * Jangan biarkan style generic modal
 * memperbesar teks note V6.
 */
#tfgHierarchyCreateOverlayV3
.tfg-hierarchy-mockup-edit-note-v6 * {
    font-size: inherit !important;
    font-weight: inherit !important;
}

/* TFG HIERARCHY MOCKUP CLEAN UI V7 END */

/* =========================================================
   TFG HIERARCHY HIDDEN HARD FIX V9
   ========================================================= */

/*
 * Beberapa rule overlay lama menetapkan display
 * secara eksplisit sehingga atribut HTML `hidden`
 * tidak cukup kuat.
 *
 * Modal hierarchy HARUS benar-benar hilang ketika
 * workspace Editor Visual sedang aktif.
 */
#tfgHierarchyCreateOverlayV3[hidden] {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* TFG HIERARCHY HIDDEN HARD FIX V9 END */

/* =========================================================
   TFG_LIBRARY_DESKTOP_COLUMN_BALANCE_V1

   Pustaka Aset - mode browse desktop.

   Tujuan:
   - Kategori tidak terlalu sempit.
   - Tipe mendapat ruang yang memadai.
   - Nama Kelas panjang lebih mudah dibaca.
   - Kolom Aset tetap nyaman.
   - Detail memakai sisa ruang.
   - Tidak memengaruhi manager-open / tablet / mobile.
   ========================================================= */

@media (min-width: 1200px) {

    #tfgAssetLibraryModalV3
    .tfg-asset-library-modal:not(.manager-open)
    .tfg-asset-library-columns {
        grid-template-columns:
            180px
            190px
            225px
            225px
            minmax(360px, 1fr) !important;

        min-width: 0 !important;
        overflow-x: auto !important;
    }

    /*
     * Jangan memecah nama menjadi potongan karakter
     * hanya karena kolom terlalu sempit.
     *
     * Contoh yang sebelumnya terlihat:
     *   Lainny
     *   a
     */
    #tfgAssetLibraryModalV3
    .tfg-asset-library-modal:not(.manager-open)
    .tfg-asset-library-option,
    #tfgAssetLibraryModalV3
    .tfg-asset-library-modal:not(.manager-open)
    .tfg-asset-library-option * {
        word-break: normal !important;
        overflow-wrap: normal !important;
        hyphens: none !important;
    }

    /*
     * Semua kolom hierarchy boleh menyusut sesuai
     * track grid-nya tanpa memaksa Detail keluar modal.
     */
    #tfgAssetLibraryModalV3
    .tfg-asset-library-modal:not(.manager-open)
    .tfg-asset-library-column {
        min-width: 0 !important;
    }

    /*
     * Detail tetap cukup luas untuk preview mockup
     * tetapi tidak lagi mengambil ruang berlebihan.
     */
    #tfgAssetLibraryModalV3
    .tfg-asset-library-modal:not(.manager-open)
    .tfg-asset-detail-column {
        min-width: 360px !important;
    }
}

/* TFG_LIBRARY_DESKTOP_COLUMN_BALANCE_V1_END */

/* ==========================================================
   TFG_ASSET_MANAGER_INLINE_DETAIL_V1
   Form Aset memakai kolom Detail, bukan panel/modal terpisah.
   ========================================================== */

.tfg-asset-detail-editor-host[hidden] {
    display: none !important;
}

.tfg-asset-detail-editor-host:not([hidden]) {
    flex: 1 1 auto;

    min-width: 0;
    min-height: 0;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    background: #071b2a;
}

.tfg-asset-detail-column
.tfg-library-detail[hidden] {
    display: none !important;
}

.tfg-asset-detail-column
.tfg-asset-detail-editor-host
.tfg-library-manager {
    position: static !important;

    inset: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;

    z-index: auto !important;

    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;

    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;

    margin: 0 !important;

    display: flex !important;
    flex-direction: column !important;

    overflow: hidden !important;

    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;

    transform: none !important;
    translate: none !important;

    border: 0 !important;
    border-radius: 0 !important;

    box-shadow: none !important;
}

.tfg-asset-detail-editor-host
.tfg-library-manager-header {
    flex: 0 0 auto;

    padding: 10px 12px !important;
}

.tfg-asset-detail-editor-host
.tfg-library-manager-body {
    flex: 1 1 auto;

    min-width: 0;
    min-height: 0;

    padding: 12px !important;

    overflow-x: hidden !important;
    overflow-y: auto !important;

    scrollbar-gutter: stable;
}

.tfg-asset-detail-editor-host
.tfg-asset-manager-section-v2,
.tfg-asset-detail-editor-host
.tfg-asset-manager-field-v2 {
    min-width: 0;
    max-width: 100%;
}

.tfg-asset-detail-editor-host
input,
.tfg-asset-detail-editor-host
select,
.tfg-asset-detail-editor-host
textarea,
.tfg-asset-detail-editor-host
button {
    max-width: 100%;
}

.tfg-asset-detail-editor-host
textarea {
    resize: vertical;
}

.tfg-asset-detail-editor-host
.tfg-manager-footer {
    flex: 0 0 auto;

    display: flex;
    flex-wrap: wrap;
    gap: 7px;

    padding: 10px 12px !important;
}

.tfg-asset-detail-editor-host
.tfg-manager-footer
button {
    flex: 1 1 105px;

    min-width: 0;
}

.tfg-asset-detail-editor-host
.tfg-manager-footer
.tfg-manager-save {
    flex-grow: 2;
}

.tfg-asset-detail-column.tfg-asset-detail-editor-open {
    min-width: 360px;
    overflow: hidden;
}

/*
 * Kelas manager-open lama tidak dipakai untuk form inline.
 * Grid Kategori/Tipe/Kelas/Aset tetap dalam keadaan normal.
 */
#tfgAssetLibraryModalV3
.tfg-asset-library-modal
.tfg-asset-detail-editor-host
.tfg-library-manager.active {
    display: flex !important;
}

/* TFG ASSET EDITOR HEADER ALIGNMENT V1 */
#tfgLibraryManager > .tfg-library-manager-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 16px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

#tfgLibraryManager > .tfg-library-manager-header > div {
    flex: 1 1 0%;
    min-width: 0;
}

#tfgLibraryManager .tfg-library-manager-title {
    white-space: normal !important;
    overflow-wrap: anywhere;
}

#tfgLibraryManager > .tfg-library-manager-header
> .tfg-library-manager-close {
    position: static !important;
    transform: none !important;
    translate: none !important;
    flex: 0 0 40px !important;
    align-self: flex-start !important;
    margin: 0 0 0 auto !important;
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 26px;
    line-height: 1;
}

/* TFG SELECTED ASSET EDITOR DATA SYNC V1 */
.tfg-detail-core-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 18px;
}

.tfg-detail-core-item {
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid rgba(91, 170, 214, 0.2);
    border-radius: 10px;
    background: rgba(15, 39, 54, 0.68);
}

.tfg-detail-core-item-wide {
    grid-column: 1 / -1;
}

.tfg-detail-core-label {
    margin-bottom: 4px;
    color: #8faabc;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
}

.tfg-detail-core-value {
    color: #eef8ff;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.4;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.tfg-detail-subsection-title {
    margin: 2px 0 10px;
    color: #9ed6f6;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

@media (max-width: 720px) {
    .tfg-detail-core-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .tfg-detail-core-item-wide {
        grid-column: auto;
    }
}
