.edocman-treelist-module {
    --edtm-primary: #034ca1;
    --edtm-accent: #00aeed;
    --edtm-muted: #ada998;
    --edtm-border: #e5eaf0;
    --edtm-soft: #f7f9fc;
    --edtm-text: #263442;
    width: 100%;
}

.edocman-treelist-module .edtm-item {
    margin: 0 0 10px;
    border: 1px solid var(--edtm-border);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(20, 47, 75, 0.04);
}

.edocman-treelist-module .edtm-heading {
    margin: 0;
    padding: 0;
    font-size: inherit;
    line-height: inherit;
}

.edocman-treelist-module .edtm-toggle {
    appearance: none;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 54px;
    margin: 0;
    padding: 12px 16px 12px calc(16px + (var(--edtm-level, 0) * 18px));
    border: 0;
    border-radius: 0;
    background: #fff;
    color: var(--edtm-primary);
    font: inherit;
    font-size: 18px;
    font-weight: 650;
    text-align: left;
    cursor: pointer;
    transition: background-color .18s ease, color .18s ease;
}

.edocman-treelist-module .edtm-toggle:hover,
.edocman-treelist-module .edtm-toggle:focus-visible {
    background: rgba(0, 174, 237, 0.07);
    color: var(--edtm-primary);
}

.edocman-treelist-module .edtm-toggle:focus-visible {
    outline: 3px solid rgba(0, 174, 237, 0.25);
    outline-offset: -3px;
}

.edocman-treelist-module .edtm-icon {
    position: relative;
    flex: 0 0 22px;
    width: 22px;
    height: 17px;
    border-radius: 3px;
    background: var(--edtm-primary);
    opacity: .94;
}

.edocman-treelist-module .edtm-icon::before {
    content: "";
    position: absolute;
    left: 2px;
    top: -4px;
    width: 9px;
    height: 5px;
    border-radius: 3px 3px 0 0;
    background: inherit;
}

.edocman-treelist-module .edtm-title {
    flex: 1 1 auto;
    min-width: 0;
}

.edocman-treelist-module .edtm-count {
    flex: 0 0 auto;
    min-width: 28px;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--edtm-soft);
    color: #607080;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.edocman-treelist-module .edtm-chevron {
    flex: 0 0 9px;
    width: 9px;
    height: 9px;
    margin-left: 3px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .2s ease;
    opacity: .75;
}

.edocman-treelist-module .edtm-item.is-open .edtm-chevron {
    transform: rotate(225deg) translate(-1px, -1px);
}

.edocman-treelist-module .edtm-item.is-open .edtm-toggle {
    background: rgba(3, 76, 161, 0.035);
}

.edocman-treelist-module .edtm-panel {
    border-top: 1px solid var(--edtm-border);
    transition: height .28s ease;
}

.edocman-treelist-module .edtm-panel-inner {
    padding: 8px 12px 12px;
    background: #fff;
}

.edocman-treelist-module .edtm-empty {
    padding: 14px 16px;
    border: 1px solid var(--edtm-border);
    border-radius: 10px;
    background: var(--edtm-soft);
    color: var(--edtm-text);
}

/* Scope light visual cleanup to this module only. EDocman's own document logic remains untouched. */
.edocman-treelist-module .table-document {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    background: transparent;
}

.edocman-treelist-module .table-document > thead > tr > th,
.edocman-treelist-module .table-document > tbody > tr > td {
    background: transparent;
    border-color: #edf0f3;
}

.edocman-treelist-module .table-document > tbody > tr:hover > td {
    background: rgba(0, 174, 237, 0.035);
}

.edocman-treelist-module .edocman-document-title-td a,
.edocman-treelist-module .edocman-document-title-link {
    color: var(--edtm-primary);
    text-decoration: none;
}

.edocman-treelist-module .edocman-document-title-td a:hover,
.edocman-treelist-module .edocman-document-title-link:hover {
    color: var(--edtm-accent);
    text-decoration: none;
}

.edocman-treelist-module .edocman-download-link {
    border-radius: 6px;
}

@media (max-width: 640px) {
    .edocman-treelist-module .edtm-toggle {
        min-height: 50px;
        padding-top: 10px;
        padding-bottom: 10px;
        font-size: 16px;
    }

    .edocman-treelist-module .edtm-panel-inner {
        padding-left: 6px;
        padding-right: 6px;
    }
}

/* v1.1 lazy loading */
.edocman-treelist-module .edtm-loading,
.edocman-treelist-module .edtm-load-error {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 10px 8px;
    color: #607080;
    font-size: 14px;
}

.edocman-treelist-module .edtm-load-error {
    color: #8b2f2f;
}

.edocman-treelist-module .edtm-spinner {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    border: 2px solid rgba(3, 76, 161, 0.18);
    border-top-color: var(--edtm-primary);
    border-radius: 50%;
    animation: edtm-spin .75s linear infinite;
}

.edocman-treelist-module .edtm-item.is-loading .edtm-chevron {
    opacity: .35;
}

@keyframes edtm-spin {
    to { transform: rotate(360deg); }
}
