.doc-tree {
    display: flex;
    flex-direction: column;
}

.doc-node {
    margin-bottom: 6px;
}

.doc-node-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.doc-node-name {
    font-weight: 500;
    color: #a1086c;
    font-size: 24px;
    font-family: Optima;
}

.doc-node.depth-0 > .doc-node-header .doc-node-name {
    font-size: 24px;
    font-family: Optima;
}

.doc-file-list {
    list-style: none;
    margin: 0 0 4px 0;
    padding: 0;
}

.doc-file-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 0;
}

.doc-file-item a {
    color: #337ab7;
    text-decoration: none;
    font-size: 20px;
    font-family: Optima;
}

.doc-file-item a:hover {
    text-decoration: underline;
}

.doc-header-actions,
.doc-document-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.doc-inline-form {
    display: inline-flex;
    margin: 0;
}

.doc-header-node {
    margin: 6px 0;
    border-left: 2px solid #e5e5e5;
    padding-left: 12px;
}

.doc-header-row {
    display: flex;
    align-items: center;
    background: #f7f7f7;
    border: 1px solid #e2e2e2;
    border-radius: 4px;
    padding: 6px 10px;
}

.doc-header-toggle {
    cursor: pointer;
    margin-right: 8px;
    color: #888;
}

.doc-header-name {
    font-weight: 600;
    flex-grow: 1;
}

.doc-header-actions {
    white-space: nowrap;
}

    .doc-header-actions .btn,
    .doc-document-actions .btn {
        margin-left: 4px;
    }

.doc-header-body {
    padding-left: 8px;
    margin-top: 4px;
}

.doc-document-list {
    list-style: none;
    padding-left: 20px;
    margin: 6px 0;
}

.doc-document-item {
    display: flex;
    align-items: center;
    padding: 4px 0;
}

    .doc-document-item a {
        margin-left: 6px;
        flex-grow: 1;
    }

.doc-document-actions {
    white-space: nowrap;
}

.doc-inline-form {
    display: inline;
}

/* Публичная страница /Home/Documents */
.doc-public-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 10px 0 40px;
}

.doc-public-title {
    font-size: 30px;
    font-weight: 600;
    margin-bottom: 28px;
    color: #2c3e50;
}

.doc-public-tree {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.doc-node {
    position: relative;
}

.doc-node-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.doc-node-icon {
    color: #f0ad4e;
    font-size: 16px;
}

.doc-node-title {
    font-weight: 600;
    color: #2c3e50;
}

.doc-node.depth-0 > .doc-node-header {
    border-bottom: 2px solid #337ab7;
    padding-bottom: 8px;
    margin-bottom: 4px;
}

    .doc-node.depth-0 > .doc-node-header .doc-node-title {
        font-size: 20px;
        color: #1a3a5c;
    }

    .doc-node.depth-0 > .doc-node-header .doc-node-icon {
        color: #337ab7;
        font-size: 18px;
    }

.doc-node.depth-1 > .doc-node-header .doc-node-title {
    font-size: 17px;
}

.doc-node.depth-2 > .doc-node-header .doc-node-title,
.doc-node.depth-3 > .doc-node-header .doc-node-title {
    font-size: 15px;
    font-weight: 500;
    color: #444;
}

.doc-node-body {
    margin-top: 10px;
    padding-left: 22px;
    border-left: 2px solid #e6e6e6;
}

.doc-node.depth-0 > .doc-node-body {
    border-left-color: #cfe2f3;
}

.doc-children {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 12px;
}

.doc-file-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.doc-file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    border-radius: 4px;
    transition: background 0.15s;
}

    .doc-file-item:hover {
        background: #f5f8fb;
    }

.doc-file-icon {
    color: #999;
    font-size: 13px;
}

.doc-file-link {
    color: #337ab7;
    text-decoration: none;
    font-size: 14px;
}

    .doc-file-link:hover {
        color: #23527c;
        text-decoration: underline;
    }
