.mt-tree-layout{
    display:flex;
    gap:16px;
}

.mt-tree-left{
    flex:0 0 var(--mt-tree-left-width, 30%);
    max-width:var(--mt-tree-left-width, 30%);
    border-right:1px solid #d6d1c4;
    padding-right:12px;
    min-width:260px;
}

.mt-tree-right{
    flex:1;
    padding-left:12px;
    min-width:0;
}

.mt-tree-toolbar{
    margin-bottom:10px;
}

.mt-tree-filter-wrap{
    display:flex;
    flex-direction:column;
    gap:8px;
    margin:0 0 12px 0;
    font-size:14px;
}

.mt-tree-filter-option{
    display:inline-flex;
    align-items:center;
    gap:8px;
    cursor:pointer;
    user-select:none;
}

.mt-tree-filter-option input[type="radio"]{
    margin:0;
}

.mt-tree-search{
    width:100%;
    box-sizing:border-box;
    padding:7px 10px;
    border:1px solid #cfc8b9;
    border-radius:4px;
    background:#fff;
    font-size:13px;
    line-height:1.3;
}

.mt-tree-search:focus{
    outline:none;
    border-color:#8fb3de;
    box-shadow:0 0 0 2px rgba(143,179,222,0.18);
}

.mt-tree{
    font-size:13px;
    line-height:1.35;
    color:#222;
    overflow:auto;
}

.mt-tree-node,
.mt-tree-leaf{
    margin:0;
    position:relative;
}

.mt-tree summary{
    cursor:pointer;
}

.mt-tree-summary{
    list-style:none;
    display:flex;
    align-items:flex-start;
    gap:6px;
    padding:1px 4px;
    border-radius:3px;
    min-height:22px;
    position:relative;
}

.mt-tree-summary::-webkit-details-marker{
    display:none;
}

.mt-tree-node > .mt-tree-summary::before{
    content:"📁";
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:18px;
    min-width:18px;
    font-size:14px;
    line-height:1;
    transform:translateY(1px);
    position:relative;
    z-index:2;
}

.mt-tree-node[open] > .mt-tree-summary::before{
    content:"📂";
}

.mt-tree-node > .mt-tree-summary .mt-tree-select{
    color:#000;
    font-weight:500;
}

.mt-tree > .mt-tree-node > .mt-tree-summary .mt-tree-select{
    font-weight:600;
}

.mt-tree-select{
    all:unset;
    cursor:pointer;
    color:#1f5fa8;
    display:inline-block;
    padding:1px 2px;
    border-radius:2px;
    word-break:break-word;
    position:relative;
    z-index:2;
}

.mt-tree-select:hover{
    text-decoration:underline;
}

.mt-tree-select.is-active{
    font-weight:600;
    color:#000;
    background:#dce9f9;
    text-decoration:none;
    padding:1px 4px;
    border-radius:3px;
}

.mt-tree-summary:hover,
.mt-tree-leaf:hover{
    background:#f3f1ea;
    border-radius:3px;
}

.mt-tree-children{
    margin-left:9px;
    padding-left:12px;
    border-left:1px solid #e6e1d6;
    position:relative;
}

.mt-tree-node > .mt-tree-summary::after{
    content:"";
    position:absolute;
    left:-10px;
    top:11px;
    width:10px;
    border-top:1px solid #e6e1d6;
    z-index:1;
}

.mt-tree-leaf{
    display:flex;
    align-items:flex-start;
    gap:6px;
    margin-left:0;
    padding:1px 4px 1px 24px;
    min-height:22px;
    position:relative;
    border-radius:3px;
}

.mt-tree-leaf::after{
    content:"";
    position:absolute;
    left:-1px;
    top:11px;
    width:14px;
    border-top:1px solid #e6e1d6;
    z-index:1;
}

.mt-tree-leaf::before{
    content:"📄";
    position:absolute;
    left:5px;
    top:2px;
    font-size:14px;
    line-height:1;
    z-index:2;
}

.mt-tree-hidden{
    display:none !important;
}

.mt-tree-detail{
    min-height:120px;
    overflow:auto;
}

.mt-tree-detail table{
    width:100%;
    border-collapse:collapse;
    background:transparent;
}

.mt-tree-detail th,
.mt-tree-detail td{
    padding:10px 12px;
    border:1px solid #d9d2c3;
    vertical-align:top;
}

.mt-tree-detail th{
    text-align:left;
    width:26%;
    white-space:nowrap;
}

.mt-rightpane-title{
    margin:0 0 10px;
}

.mt-grid{
    width:100%;
    border-collapse:collapse;
}

.mt-grid th,
.mt-grid td{
    padding:8px 10px;
    border:1px solid #d9d2c3;
    vertical-align:top;
}

.mt-grid-action-col{
    width:44px;
    text-align:center;
    white-space:nowrap;
}

.rp-detail{
    cursor:pointer;
}

@media (max-width: 900px){
    .mt-tree-layout{
        flex-direction:column;
    }

    .mt-tree-left{
        flex:1 1 auto;
        max-width:none;
        min-width:0;
        border-right:0;
        border-bottom:1px solid #d6d1c4;
        padding-right:0;
        padding-bottom:12px;
    }

    .mt-tree-right{
        padding-left:0;
        padding-top:12px;
    }
}

/* ---------- Leaf / form view ---------- */

.mt-leafpane{
    max-width:900px;
}

.mt-leafpane-title{
    margin:0 0 18px;
    font-size:2rem;
}

.mt-leafpane-fields{
    display:grid;
    grid-template-columns: 220px 1fr;
    column-gap:20px;
    row-gap:10px;
}

.mt-leafpane-row{
    display:contents;
}

.mt-leafpane-label{
    font-weight:600;
    color:#333;
    padding:6px 0;
}

.mt-leafpane-value{
    padding:6px 0;
    word-break:break-word;
}

.mt-leafpane-row:not(:last-child) .mt-leafpane-label,
.mt-leafpane-row:not(:last-child) .mt-leafpane-value{
    border-bottom:1px solid #e4ded1;
}

.mt-leafpane-image{
    max-width:420px;
    height:auto;
    display:block;
    margin:6px 0;
}

.mt-leafpane-link{
    color:#c7254e;
    text-decoration:underline;
}

/* mobil */

@media (max-width:700px){

    .mt-leafpane-fields{
        grid-template-columns:1fr;
        row-gap:6px;
    }

    .mt-leafpane-label{
        font-weight:700;
        padding-top:10px;
    }

    .mt-leafpane-value{
        padding-bottom:6px;
    }

}

.mt-tree-title{
    margin:0 0 14px 0;
    font-size:28px;
    font-weight:700;
}