:root {
    --app-font-family: "PublpageNotoSansKR", "Noto Sans KR", "Segoe UI", system-ui, sans-serif;
    --app-bg: #f5f7fa;
    --app-surface: #ffffff;
    --app-surface-muted: #f8fafc;
    --app-surface-hover: #eff4ff;
    --app-input-bg: #ffffff;
    --app-table-head-bg: #f8fafc;
    --app-text: #141824;
    --app-text-secondary: #31374a;
    --app-text-muted: #6e7891;
    --app-icon-muted: #8a94ad;
    --app-line: #e3e6ed;
    --app-primary: #3874ff;
    --app-primary-hover: #2f65df;
    --app-primary-soft: #eff4ff;
    --app-focus: rgba(56, 116, 255, 0.25);
}

.documents-shell {
    --documents-sidebar-width: 260px;
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--documents-sidebar-width) 8px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    background: var(--app-bg);
    color: var(--app-text);
    font-family: var(--app-font-family);
}

.documents-page-header {
    grid-column: 3;
    grid-row: 1;
    margin: 28px 28px 24px;
}

.documents-sidebar {
    grid-column: 1;
    grid-row: 1 / span 2;
    position: sticky;
    top: 0;
    height: 100vh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 16px;
    border-right: 1px solid var(--app-line);
    background: var(--app-surface);
    padding: 18px 14px;
    overflow: auto;
}

.documents-resize-handle {
    grid-column: 2;
    grid-row: 1 / span 2;
    position: sticky;
    top: 0;
    z-index: 5;
    height: 100vh;
    border-right: 1px solid var(--app-line);
    background: linear-gradient(to right, #ffffff 0, #ffffff 3px, #e6ebf3 3px, #e6ebf3 4px, #ffffff 4px);
    cursor: col-resize;
}

.documents-resize-handle:hover,
.documents-resize-handle:focus-visible,
body.documents-resizing .documents-resize-handle {
    background: linear-gradient(to right, #ffffff 0, #ffffff 2px, #85a9ff 2px, #85a9ff 5px, #ffffff 5px);
}

body.documents-resizing {
    cursor: col-resize;
    user-select: none;
}

.documents-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--app-text);
    font-size: 17px;
    font-weight: 900;
    text-decoration: none;
}

.documents-brand:hover {
    color: var(--app-text);
}

.documents-mobile-brand {
    display: none;
}

.documents-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: var(--app-primary);
    color: #fff;
    font-weight: 900;
}

.documents-brand-mark {
    width: 32px;
    height: 32px;
}

.documents-brand-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex: 0 0 auto;
}

.documents-upload-body label {
    display: grid;
    gap: 6px;
    color: var(--app-text-muted);
    font-size: 11px;
    font-weight: 800;
}

.documents-tree {
    border: 1px solid var(--app-line);
    border-radius: 6px;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(227, 230, 237, 0.35);
    overflow: hidden;
}

.documents-tree-root {
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 12px;
    border-bottom: 1px solid #e8ebf1;
    background: #eef0f2;
    color: #111827;
    font-size: 12px;
    font-weight: 900;
}

.documents-tree-root-action {
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: rgba(37, 99, 235, 0.68);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
}

.documents-tree-root-actions {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.documents-tree-root-action:hover {
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
}

.documents-tree-root-action:disabled {
    cursor: default;
    opacity: 0.42;
}

.documents-tree-root-action:disabled:hover {
    background: transparent;
    color: rgba(37, 99, 235, 0.68);
}

.documents-tree-list {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 8px 8px 12px 20px;
    list-style: none;
}

.documents-tree-list.children {
    gap: 0;
    margin: -1px 0 2px 13px;
    padding: 0 0 0 13px;
}

.documents-tree-branch {
    min-width: 0;
    list-style: none;
}

.documents-tree-item {
    position: relative;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    min-height: 23px;
    padding-left: 10px;
}

.documents-tree-item-create {
    margin: 2px 0;
}

.documents-tree-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: -1px;
    bottom: -1px;
    border-left: 1px dotted #b9c0cc;
}

.documents-tree-item::after {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    width: 10px;
    border-top: 1px dotted #b9c0cc;
}

.documents-tree-document {
    position: relative;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    min-height: 22px;
    padding-left: 10px;
    list-style: none;
}

.documents-tree-document::before {
    content: "";
    position: absolute;
    left: 0;
    top: -1px;
    bottom: -1px;
    border-left: 1px dotted #b9c0cc;
}

.documents-tree-document::after {
    content: "";
    position: absolute;
    left: 0;
    top: 11px;
    width: 10px;
    border-top: 1px dotted #b9c0cc;
}

.documents-tree-link {
    min-width: 0;
    min-height: 23px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #252a36;
    display: grid;
    grid-template-columns: 12px minmax(0, auto) auto;
    align-items: center;
    justify-content: start;
    gap: 5px;
    padding: 2px 5px;
    font: 800 12px/1.2 var(--app-font-family);
    text-align: left;
}

.documents-tree-document-link {
    min-width: 0;
    min-height: 22px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #3a4151;
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr);
    align-items: center;
    justify-content: start;
    gap: 5px;
    padding: 2px 5px;
    font: 800 11px/1.2 var(--app-font-family);
    text-align: left;
}

.documents-tree-link:hover,
.documents-tree-item.active .documents-tree-link,
.documents-tree-document-link:hover,
.documents-tree-document.active .documents-tree-document-link {
    background: #f3f6fb;
    color: #111827;
}

.documents-tree-item.drop-enabled .documents-tree-link {
    outline: 1px dashed transparent;
    outline-offset: 2px;
}

.documents-tree-item.drop-over .documents-tree-link {
    background: #eff6ff;
    color: #1d4ed8;
    outline-color: #93c5fd;
}

.documents-tree-document[draggable="true"] .documents-tree-document-link,
.documents-list-table tr[draggable="true"] .documents-list-title {
    cursor: grab;
}

.documents-tree-document[draggable="true"]:active .documents-tree-document-link,
.documents-list-table tr.dragging .documents-list-title {
    cursor: grabbing;
}

.documents-list-table tr.dragging td {
    background: #eff6ff;
}

.tree-file-icon {
    position: relative;
    width: 9px;
    height: 11px;
    border: 1px solid #aeb7c7;
    border-radius: 1px;
    background: #ffffff;
}

.tree-file-icon::before,
.tree-file-icon::after {
    content: "";
    position: absolute;
    left: 2px;
    right: 2px;
    height: 1px;
    background: #aeb7c7;
}

.tree-file-icon::before {
    top: 3px;
}

.tree-file-icon::after {
    top: 6px;
}

.tree-bootstrap-icon {
    width: 12px;
    color: #8a94ad;
    font-size: 11px;
    line-height: 1;
    text-align: center;
}

.tree-document-type-icon.markdown {
    color: #7c9ce6;
}

.tree-document-type-icon.html {
    color: #d69a72;
}

.tree-document-type-icon.code {
    color: #6b8fdc;
}

.tree-document-type-icon.script {
    color: #c3a21f;
}

.tree-document-type-icon.style {
    color: #6d8ee8;
}

.tree-document-type-icon.data {
    color: #5ca892;
}

.tree-document-type-icon.pdf {
    color: #d85f5f;
}

.tree-document-type-icon.document {
    color: #5c86cf;
}

.tree-document-type-icon.sheet {
    color: #4f9a6d;
}

.tree-document-type-icon.slide {
    color: #ce7b45;
}

.tree-document-type-icon.image {
    color: #a775d9;
}

.tree-document-type-icon.media {
    color: #c66aa1;
}

.tree-document-type-icon.archive,
.tree-document-type-icon.font,
.tree-document-type-icon.executable {
    color: #8a94ad;
}

.documents-tree-item.active .tree-bootstrap-icon,
.documents-tree-document.active .tree-bootstrap-icon {
    color: #3b6eea;
}

.documents-tree-document.active .tree-document-type-icon.markdown {
    color: #3f6fd8;
}

.documents-tree-document.active .tree-document-type-icon.html {
    color: #c77a43;
}

.documents-tree-document.active .tree-document-type-icon.code,
.documents-tree-document.active .tree-document-type-icon.style {
    color: #3f6fd8;
}

.documents-tree-document.active .tree-document-type-icon.script {
    color: #a47d00;
}

.documents-tree-document.active .tree-document-type-icon.data {
    color: #2f8f79;
}

.documents-tree-document.active .tree-document-type-icon.pdf {
    color: #c43f3f;
}

.documents-tree-document.active .tree-document-type-icon.document {
    color: #2f63bd;
}

.documents-tree-document.active .tree-document-type-icon.sheet {
    color: #2f7d4f;
}

.documents-tree-document.active .tree-document-type-icon.slide {
    color: #b45f28;
}

.documents-tree-document.active .tree-document-type-icon.image {
    color: #8a56c4;
}

.documents-tree-document.active .tree-document-type-icon.media {
    color: #ab4b86;
}

.tree-document-icon {
    position: relative;
    width: 9px;
    height: 11px;
    border: 1px solid #b8c1d1;
    border-radius: 1px;
    background: #ffffff;
}

.tree-document-icon::before {
    content: "";
    position: absolute;
    right: -1px;
    top: -1px;
    width: 4px;
    height: 4px;
    border-left: 1px solid #b8c1d1;
    border-bottom: 1px solid #b8c1d1;
    background: #eef4ff;
}

.tree-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tree-count {
    color: #ff5a1f;
    font-size: 10px;
    font-weight: 900;
}

.documents-tree-actions {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    opacity: 0;
    pointer-events: none;
}

.documents-tree-item:hover .documents-tree-actions,
.documents-tree-item:focus-within .documents-tree-actions,
.documents-tree-document:hover .documents-tree-actions,
.documents-tree-document:focus-within .documents-tree-actions {
    opacity: 1;
    pointer-events: auto;
}

.tree-action {
    min-height: 21px;
    border: 1px solid #d7dde8;
    border-radius: 4px;
    background: #fff;
    color: #64748b;
    padding: 0 5px;
    font-size: 10px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.tree-action:hover {
    border-color: #9eb8ff;
    background: #eff4ff;
    color: #1d4ed8;
}

.tree-action.danger:hover {
    border-color: #fecaca;
    background: #fff1f2;
    color: #b91c1c;
}

.tree-action.confirm {
    color: #1d4ed8;
}

.documents-tree-edit {
    grid-column: 1 / 3;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 4px;
    align-items: center;
    padding: 2px 0;
}

.documents-folder-rename {
    height: 26px;
    min-width: 0;
    font-size: 11px;
}

.documents-main {
    grid-column: 3;
    grid-row: 2;
    min-width: 0;
    padding: 0 28px 28px;
}

.top-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.documents-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.documents-language-toggle {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--app-text-muted);
    padding: 0 14px;
    font: 800 13px/1 var(--app-font-family);
    cursor: pointer;
}

.documents-language-toggle:hover {
    background: #eaf1ff;
    color: #1d4ed8;
}

.documents-language-toggle .active {
    color: #1d4ed8;
}

.documents-language-toggle .divider {
    color: #cbd5e1;
}

.top-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 900;
}

.top-header p {
    margin: 8px 0 0;
    color: var(--app-text-muted);
    font-size: 14px;
}

.panel {
    background: var(--app-surface);
    border: 1px solid var(--app-line);
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.panel + .panel {
    margin-top: 16px;
}

.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--app-line);
    padding: 14px 16px;
}

.panel-header h2 {
    margin: 0;
    color: var(--app-text);
    font-size: 17px;
    font-weight: 900;
}

.panel-header p {
    margin: 5px 0 0;
    color: var(--app-text-muted);
    font-size: 12px;
}

.documents-list-header-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.documents-upload-body {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
    padding: 16px;
}

.documents-upload-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.documents-upload-security-note {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    color: var(--app-text-muted);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.35;
}

.documents-upload-security-note i {
    color: #64748b;
    font-size: 13px;
}

.documents-upload-security-note span,
.documents-preview-security-note span {
    min-width: 0;
}

.documents-upload-file-field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.documents-upload-file-label {
    color: var(--app-text-muted);
    font-size: 11px;
    font-weight: 800;
}

.documents-upload-picker {
    position: relative;
    min-width: 0;
    min-height: 78px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    border: 1.5px dashed #a9c1f7;
    border-radius: 8px;
    background: #f7fbff;
    color: var(--app-text);
    padding: 14px 16px;
    cursor: pointer;
    overflow: hidden;
}

.documents-upload-picker:hover {
    border-color: #6f96f2;
    background: #eef6ff;
}

.documents-upload-picker i {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #e8f0ff;
    color: #2563eb;
    font-size: 17px;
}

.documents-upload-picker-text {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.documents-upload-picker-text strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #1f3f82;
    font-size: 13px;
    font-weight: 900;
}

.documents-upload-picker em {
    color: #60708a;
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
    line-height: 1.45;
}

.documents-upload-picker small {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #fff;
    color: #315fc4;
    padding: 0 10px;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

.documents-upload-picker input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    font-size: 100px;
}

input,
select,
textarea {
    border: 1px solid var(--app-line);
    border-radius: 6px;
    background: var(--app-input-bg);
    color: var(--app-text);
    padding: 0 10px;
    font: 800 12px/1.2 var(--app-font-family);
}

input,
select {
    height: 34px;
}

input[type="file"] {
    height: auto;
    min-height: 34px;
    padding: 7px 10px;
}

.documents-upload-help {
    margin: 0;
    color: var(--app-text-muted);
    font-size: 11px;
    line-height: 1.45;
    font-weight: 700;
}

.documents-toggle {
    min-height: 34px;
    grid-auto-flow: column;
    align-items: center;
    justify-content: start;
    color: var(--app-text);
}

.documents-toggle input {
    width: 16px;
    height: 16px;
}

.btn {
    border: 0;
    border-radius: 6px;
    min-height: 36px;
    padding: 0 12px;
    font-weight: 800;
    cursor: pointer;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
}

.btn .bi {
    font-size: 14px;
    line-height: 1;
}

.btn.primary {
    background: var(--app-primary);
    color: #fff;
}

.btn.primary:hover {
    background: var(--app-primary-hover);
}

.btn.tiny {
    min-height: 34px;
    padding: 0 10px;
    background: var(--app-surface-muted);
    border: 1px solid var(--app-line);
    color: var(--app-text);
}

.btn.tiny.active {
    border-color: #85a9ff;
    background: var(--app-primary-soft);
    color: #1d4ed8;
}

.btn.danger {
    border: 1px solid rgba(220, 38, 38, 0.28);
    background: #fff1f2;
    color: #b91c1c;
}

.btn.icon-only {
    width: 36px;
    min-width: 36px;
    padding: 0;
    font-size: 11px;
}

.btn.icon-only .bi {
    margin: 0;
}

.btn:disabled {
    border-color: #cbd5e1;
    background: #f1f5f9;
    color: #94a3b8;
    cursor: no-drop;
    opacity: 1;
}

.documents-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
    padding: 16px;
}

.document-card {
    min-width: 0;
    border: 1px solid var(--app-line);
    border-radius: 8px;
    background: var(--app-surface);
    padding: 16px;
}

.document-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.document-card h3 {
    margin: 0;
    color: var(--app-text);
    font-size: 16px;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.document-card p {
    margin: 6px 0 0;
    color: var(--app-text-muted);
    font-size: 12px;
    font-weight: 800;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    border-radius: 999px;
    padding: 0 8px;
    font-size: 10px;
    font-weight: 900;
    white-space: nowrap;
}

.status-badge.published {
    background: #f0fdf4;
    color: #15803d;
}

.status-badge.private {
    background: #f8fafc;
    color: #64748b;
}

.status-badge.password {
    background: #eff6ff;
    color: #1d4ed8;
}

.file-type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 22px;
    border: 1px solid transparent;
    border-radius: 7px;
    padding: 0 8px;
    font-size: 10px;
    font-weight: 950;
    line-height: 1;
    letter-spacing: 0;
    white-space: nowrap;
}

.documents-branch-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 22px;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    background: #f0fdf4;
    color: #166534;
    padding: 0 8px;
    font-size: 10px;
    font-weight: 950;
    line-height: 1;
    white-space: nowrap;
}

.documents-branch-badge:not(:has(span)),
.documents-clone-badge:not(:has(span)) {
    width: 24px;
    padding: 0;
}

.documents-branch-source-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    min-height: 22px;
    border: 1px solid #ddd6fe;
    border-radius: 999px;
    background: #f5f3ff;
    color: #6d28d9;
    padding: 0;
    font-size: 10px;
    font-weight: 950;
    line-height: 1;
    white-space: nowrap;
}

.documents-branch-source-badge i {
    color: #6d28d9;
    font-size: 11px;
}

.documents-branch-badge i {
    color: #15803d;
    font-size: 11px;
}

.documents-branch-badge.summary {
    background: #ecfdf5;
    border-color: #86efac;
}

.documents-clone-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 22px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    padding: 0 8px;
    font-size: 10px;
    font-weight: 950;
    line-height: 1;
    white-space: nowrap;
}

.documents-clone-badge i {
    color: #2563eb;
    font-size: 11px;
}

.documents-clone-badge.summary {
    background: #eef2ff;
    border-color: #c7d2fe;
}

.documents-like-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 22px;
    border: 1px solid #fbcfe8;
    border-radius: 999px;
    background: #fff5f9;
    color: #be185d;
    padding: 0 8px;
    font-size: 10px;
    font-weight: 950;
    line-height: 1;
    white-space: nowrap;
}

.documents-like-badge i {
    color: #be185d;
    font-size: 11px;
}

.documents-preview-meta-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
}

.file-type-markdown {
    background: #edf4ff;
    border-color: #c6dbff;
    color: #315fc4;
}

.file-type-html,
.file-ext-html,
.file-ext-htm {
    background: #fff3e8;
    border-color: #ffd7b8;
    color: #b45309;
}

.file-type-code,
.file-ext-cs,
.file-ext-razor,
.file-ext-cshtml {
    background: #eef5ff;
    border-color: #bdd5ff;
    color: #1d4ed8;
}

.file-type-script,
.file-ext-js,
.file-ext-mjs,
.file-ext-cjs,
.file-ext-jsx,
.file-ext-ts,
.file-ext-tsx {
    background: #fff8db;
    border-color: #fde68a;
    color: #9a6700;
}

.file-type-style,
.file-ext-css,
.file-ext-scss,
.file-ext-sass {
    background: #f1efff;
    border-color: #d7ceff;
    color: #5b4dc4;
}

.file-type-data,
.file-ext-json,
.file-ext-xml,
.file-ext-xaml,
.file-ext-yml,
.file-ext-yaml,
.file-ext-sql,
.file-ext-csv {
    background: #e9fbf5;
    border-color: #b8ebda;
    color: #047864;
}

.file-type-pdf,
.file-ext-pdf {
    background: #fff0f0;
    border-color: #ffc7c7;
    color: #c24141;
}

.file-type-document,
.file-ext-doc,
.file-ext-docx,
.file-ext-txt {
    background: #eef6ff;
    border-color: #c7defa;
    color: #2563a8;
}

.file-type-sheet,
.file-ext-xls,
.file-ext-xlsx {
    background: #ecfdf3;
    border-color: #bdeccf;
    color: #167348;
}

.file-type-slide,
.file-ext-ppt,
.file-ext-pptx {
    background: #fff4e6;
    border-color: #ffd7a8;
    color: #af5f00;
}

.file-type-image,
.file-ext-png,
.file-ext-jpg,
.file-ext-jpeg,
.file-ext-gif,
.file-ext-svg,
.file-ext-webp {
    background: #f7efff;
    border-color: #dfc7ff;
    color: #7e3fb8;
}

.file-type-media {
    background: #fff0f8;
    border-color: #ffc8e4;
    color: #ad3b78;
}

.file-type-archive,
.file-type-font,
.file-type-executable,
.file-type-default {
    background: #f5f7fb;
    border-color: #d8dee9;
    color: #596579;
}

.document-meta {
    display: grid;
    gap: 8px;
    margin: 14px 0;
}

.document-meta div {
    min-width: 0;
}

.document-meta dt {
    color: var(--app-text-muted);
    font-size: 11px;
    font-weight: 900;
}

.document-meta dd {
    margin: 3px 0 0;
    color: var(--app-text-secondary);
    font-size: 12px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.document-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.document-actions .btn.icon-only {
    flex: 0 0 36px;
}

.document-actions.compact {
    gap: 6px;
}

.document-actions.compact .btn.tiny {
    width: 32px;
    min-width: 32px;
    flex: 0 0 32px;
    min-height: 28px;
    padding: 0;
    font-size: 11px;
}

.document-actions.compact .btn.tiny span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.documents-view-width-select {
    width: 78px;
    height: 36px;
    border-color: #b8ccff;
    background: #fff;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 900;
    text-align: center;
}

.document-file-button {
    position: relative;
    overflow: hidden;
}

.document-file-button input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.documents-preview-panel {
    min-height: 560px;
}

.documents-folder-list {
    min-width: 0;
}

.documents-list-table-wrap {
    overflow-x: auto;
}

.documents-list-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.documents-list-table th,
.documents-list-table td {
    border-bottom: 1px solid var(--app-line);
    padding: 10px 12px;
    color: var(--app-text-secondary);
    font-size: 12px;
    font-weight: 800;
    text-align: left;
    vertical-align: middle;
}

.documents-list-table th {
    background: var(--app-table-head-bg);
    color: var(--app-text-muted);
    font-size: 11px;
    font-weight: 900;
}

.documents-list-table th:nth-child(1) {
    width: 23%;
}

.documents-list-table th:nth-child(2) {
    width: 112px;
}

.documents-list-table th:nth-child(3) {
    width: 112px;
}

.documents-list-table th:nth-child(4) {
    width: 112px;
}

.documents-list-table th:nth-child(5) {
    width: 92px;
}

.documents-list-table th:nth-child(6) {
    width: 78px;
}

.documents-list-table th:nth-child(7) {
    width: 92px;
}

.documents-list-table th:nth-child(8) {
    width: 142px;
}

.documents-list-table th:nth-child(9) {
    width: 74px;
}

.documents-list-table th:nth-child(10) {
    width: 260px;
}

.documents-list-table tr:hover td {
    background: #fbfdff;
}

.documents-list-title-line {
    min-width: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.documents-list-metric-cell {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.documents-empty-metric {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 900;
}

.documents-rating-control {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    vertical-align: middle;
}

.documents-rating-star,
.documents-rating-clear {
    width: 18px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: #cbd5e1;
    padding: 0;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
}

.documents-rating-star.active {
    color: #f59e0b;
}

.documents-rating-star:hover,
.documents-rating-star:focus-visible {
    color: #d97706;
}

.documents-rating-clear {
    color: #94a3b8;
    margin-left: 2px;
}

.documents-rating-clear:hover,
.documents-rating-clear:focus-visible {
    color: #ef4444;
}

.documents-rating-control.compact {
    min-width: 94px;
}

.documents-list-title {
    flex: 1 1 220px;
    min-width: 0;
    max-width: 100%;
    border: 0;
    background: transparent;
    color: var(--app-text);
    display: inline-grid;
    grid-template-columns: 16px minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    padding: 0;
    font: 900 12px/1.25 var(--app-font-family);
    text-align: left;
}

.documents-list-title:hover {
    color: #1d4ed8;
}

.documents-list-type-icon {
    width: 16px;
    font-size: 13px;
    line-height: 1;
    text-align: center;
}

.documents-list-title span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.documents-preview {
    min-width: 0;
}

.documents-preview-summary {
    display: grid;
    gap: 10px;
    border-bottom: 1px solid var(--app-line);
    padding: 16px 18px;
}

.documents-preview-title-row {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.documents-preview-title-row h2 {
    margin: 0;
    color: var(--app-text);
    font-size: 20px;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.documents-preview-title-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

.documents-preview-back-to-list {
    color: #1d4ed8;
}

.documents-preview-title-row p {
    margin: 5px 0 0;
    color: var(--app-text-muted);
    font-size: 12px;
    font-weight: 900;
}

.documents-preview-action-row {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.documents-preview-url-row {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.documents-preview-url {
    min-width: 0;
    color: var(--app-text-secondary);
    font-size: 12px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.documents-preview-security-note {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: var(--app-text-muted);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.45;
}

.documents-preview-security-note i {
    color: #64748b;
    font-size: 13px;
}

.documents-markdown-editor {
    display: grid;
    gap: 12px;
    border-bottom: 1px solid var(--app-line);
    background: #f8fafc;
    padding: 16px 18px 18px;
}

.documents-markdown-editor-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.documents-markdown-editor-header strong,
.documents-markdown-editor-header span {
    display: block;
}

.documents-markdown-editor-header strong {
    color: var(--app-text);
    font-size: 15px;
    font-weight: 900;
}

.documents-markdown-editor-header span {
    margin-top: 4px;
    color: var(--app-text-muted);
    font-size: 12px;
    font-weight: 800;
}

.documents-markdown-title-field {
    display: grid;
    gap: 7px;
    color: var(--app-text-muted);
    font-size: 12px;
    font-weight: 900;
}

.documents-markdown-title-field input {
    width: min(520px, 100%);
    min-height: 38px;
    border: 1px solid #d7dde8;
    border-radius: 8px;
    background: #fff;
    color: var(--app-text);
    padding: 0 12px;
    font: 900 13px/1.2 var(--app-font-family);
    outline: none;
}

.documents-markdown-title-field input:focus {
    border-color: #93b4ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.documents-markdown-editor-tabs {
    display: none;
}

.documents-markdown-editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
}

.documents-markdown-editor-pane {
    min-width: 0;
    min-height: 420px;
}

.documents-markdown-editor-input {
    width: 100%;
    height: min(68vh, 720px);
    min-height: 420px;
    max-height: 760px;
    resize: vertical;
    border: 1px solid #d7dde8;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    padding: 14px;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.62;
    outline: none;
}

.documents-markdown-editor-input:focus {
    border-color: #93b4ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.documents-markdown-preview-body {
    height: min(68vh, 720px);
    min-height: 420px;
    overflow: auto;
    border: 1px solid #d7dde8;
    border-radius: 8px;
    background: #fff;
    color: #1f2937;
    padding: 20px;
    font-size: 14px;
    line-height: 1.68;
}

.documents-render-error,
.documents-render-empty {
    min-height: 420px;
    display: grid;
    align-content: center;
    gap: 7px;
    border: 1px solid #d7dde8;
    border-radius: 8px;
    background: #fff;
    padding: 18px;
}

.documents-render-error {
    border-color: #fecaca;
    background: #fff1f2;
    color: #991b1b;
}

.documents-render-empty {
    color: #64748b;
    text-align: center;
}

.documents-render-error strong,
.documents-render-empty strong,
.documents-render-error span,
.documents-render-empty span {
    display: block;
}

.documents-render-error strong,
.documents-render-empty strong {
    font-size: 14px;
    font-weight: 900;
}

.documents-render-error span,
.documents-render-empty span {
    font-size: 12px;
    font-weight: 800;
    line-height: 1.55;
}

.documents-preview-body {
    margin: 0 auto;
    padding: 26px;
    color: #1f2937;
    font-size: 15px;
    line-height: 1.72;
}

.documents-preview-body.width-70 {
    width: min(70vw, 1120px);
}

.documents-preview-body.width-80 {
    width: min(80vw, 1280px);
}

.documents-preview-body.width-90 {
    width: min(90vw, 1440px);
}

.documents-preview-body.width-100 {
    width: 100%;
}

.documents-preview-frame-wrap {
    margin: 0 auto;
    padding: 18px;
}

.documents-preview-frame-wrap.width-70 {
    width: min(70vw, 1120px);
}

.documents-preview-frame-wrap.width-80 {
    width: min(80vw, 1280px);
}

.documents-preview-frame-wrap.width-90 {
    width: min(90vw, 1440px);
}

.documents-preview-frame-wrap.width-100 {
    width: 100%;
}

.documents-preview-frame {
    width: 100%;
    min-height: 720px;
    border: 1px solid var(--app-line);
    border-radius: 8px;
    background: #fff;
}

.documents-preview-body h1,
.documents-preview-body h2,
.documents-preview-body h3,
.documents-preview-body h4 {
    color: #111827;
    line-height: 1.25;
    font-weight: 900;
}

.documents-preview-body h1 {
    font-size: 27px;
}

.documents-preview-body h2 {
    margin-top: 30px;
    font-size: 22px;
}

.documents-preview-body h3 {
    margin-top: 24px;
    font-size: 18px;
}

.documents-preview-body p {
    margin: 0 0 15px;
}

.documents-preview-body a {
    color: #2563eb;
    font-weight: 800;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.documents-preview-body ul,
.documents-preview-body ol {
    margin: 0 0 16px;
    padding-left: 24px;
}

.documents-preview-body li {
    margin: 4px 0;
}

.documents-preview-body li > p {
    margin: 0;
}

.documents-preview-body input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0 7px 0 -20px;
    vertical-align: -2px;
    accent-color: #2563eb;
}

.documents-preview-body blockquote {
    margin: 18px 0;
    border-left: 4px solid #bfdbfe;
    background: #f8fbff;
    color: #475569;
    padding: 12px 16px;
}

.documents-preview-body blockquote > :last-child {
    margin-bottom: 0;
}

.documents-preview-body hr {
    border: 0;
    border-top: 1px solid var(--app-line);
    margin: 28px 0;
}

.documents-preview-body .katex-display {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 0;
}

.documents-preview-body .katex {
    font-size: 1.02em;
}

.documents-preview-body img {
    max-width: 100%;
    height: auto;
}

.documents-preview-body table {
    display: block;
    width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    margin: 18px 0;
}

.documents-preview-body th,
.documents-preview-body td {
    border: 1px solid var(--app-line);
    padding: 8px 10px;
}

.documents-preview-body th {
    background: #f8fafc;
    color: var(--app-text-secondary);
    font-weight: 900;
}

.documents-preview-body pre {
    overflow-x: auto;
    border: 1px solid var(--app-line);
    border-radius: 8px;
    background: #0f172a;
    color: #e5e7eb;
    padding: 14px;
    margin: 18px 0;
}

.documents-preview-body .mermaid {
    overflow-x: auto;
    border: 1px solid var(--app-line);
    border-radius: 8px;
    background: #f8fbff;
    color: #334155;
    padding: 16px;
    margin: 18px 0;
    text-align: center;
}

.documents-preview-body .mermaid svg {
    max-width: 100%;
    height: auto;
}

.documents-preview-body .mermaid-error {
    border-color: #fecaca;
    background: #fff1f2;
    color: #b91c1c;
    text-align: left;
}

.documents-preview-body code {
    border-radius: 5px;
    background: #f1f5f9;
    color: #0f172a;
    padding: 2px 5px;
    font-size: 0.92em;
}

.documents-preview-body pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.documents-markdown-preview-body .pp-code-highlighted,
.documents-preview-body .pp-code-highlighted {
    background: #111827;
    color: #dbeafe;
}

.documents-markdown-preview-body .pp-code-with-lines,
.documents-preview-body .pp-code-with-lines {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.documents-markdown-preview-body .pp-code-with-lines code,
.documents-preview-body .pp-code-with-lines code {
    display: block;
    min-width: max-content;
}

.documents-markdown-preview-body .pp-code-line-numbers,
.documents-preview-body .pp-code-line-numbers {
    min-width: 28px;
    border-right: 1px solid rgba(148, 163, 184, 0.28);
    color: #64748b;
    padding-right: 12px;
    text-align: right;
    user-select: none;
    white-space: pre;
}

.documents-markdown-preview-body .pp-code-token.keyword,
.documents-preview-body .pp-code-token.keyword {
    color: #93c5fd;
}

.documents-markdown-preview-body .pp-code-token.type,
.documents-preview-body .pp-code-token.type {
    color: #67e8f9;
}

.documents-markdown-preview-body .pp-code-token.string,
.documents-preview-body .pp-code-token.string {
    color: #86efac;
}

.documents-markdown-preview-body .pp-code-token.number,
.documents-preview-body .pp-code-token.number {
    color: #fbbf24;
}

.documents-markdown-preview-body .pp-code-token.comment,
.documents-preview-body .pp-code-token.comment {
    color: #94a3b8;
    font-style: italic;
}

.documents-markdown-preview-body .pp-code-token.attribute,
.documents-markdown-preview-body .pp-code-token.property,
.documents-preview-body .pp-code-token.attribute,
.documents-preview-body .pp-code-token.property {
    color: #f9a8d4;
}

.documents-markdown-preview-body .pp-code-token.punctuation,
.documents-preview-body .pp-code-token.punctuation {
    color: #c4b5fd;
}

.form-message {
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 800;
}

.form-message.error {
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.form-message.success {
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
}

.empty-state {
    display: grid;
    gap: 6px;
    justify-items: center;
    padding: 34px 16px;
    color: var(--app-text-muted);
    text-align: center;
}

.empty-state strong {
    color: var(--app-text);
    font-size: 13px;
    font-weight: 900;
}

.empty-state span {
    font-size: 12px;
    line-height: 1.45;
}

.documents-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, 0.42);
    padding: 18px;
}

.documents-confirm-modal {
    width: min(420px, 100%);
    border: 1px solid var(--app-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
    padding: 18px;
}

.documents-confirm-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.documents-confirm-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #fff1f2;
    color: #dc2626;
    font-size: 18px;
    flex: 0 0 auto;
}

.documents-confirm-icon.move {
    background: #eff6ff;
    color: #1d4ed8;
}

.documents-confirm-header h2 {
    margin: 0;
    color: var(--app-text);
    font-size: 18px;
    font-weight: 900;
}

.documents-confirm-header p {
    margin: 5px 0 0;
    color: var(--app-text-muted);
    font-size: 12px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.documents-confirm-message {
    margin: 16px 0 0;
    color: var(--app-text-secondary);
    font-size: 13px;
    line-height: 1.55;
    font-weight: 800;
}

.documents-move-form {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.documents-move-form label {
    display: grid;
    gap: 7px;
    color: var(--app-text-muted);
    font-size: 12px;
    font-weight: 900;
}

.documents-move-form select,
.documents-move-form input {
    width: 100%;
    height: 38px;
    color: var(--app-text);
    font-size: 12px;
}

.documents-move-form .documents-confirm-message {
    margin-top: 0;
}

.documents-share-password-rules {
    display: grid;
    gap: 5px;
    margin: 0;
    padding-left: 18px;
    color: var(--app-text-secondary);
    font-size: 12px;
    line-height: 1.5;
    font-weight: 800;
}

.documents-share-password-rules li::marker {
    color: #2563eb;
}

.documents-share-password-input-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: center;
}

.documents-share-password-input-row .btn {
    width: 38px;
    min-width: 38px;
    min-height: 38px;
    padding: 0;
    white-space: nowrap;
}

.documents-share-password-input-row .btn span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.documents-share-password-copy-message {
    margin: -4px 0 0;
    color: #2563eb;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.45;
}

.documents-confirm-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 18px;
}

@media (max-width: 900px) {
    .documents-shell {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }

    .documents-page-header {
        grid-column: 1;
        grid-row: 1;
        margin: 0;
        padding: 20px 20px 0;
    }

    .documents-resize-handle {
        display: none;
    }

    .documents-sidebar {
        grid-column: 1;
        grid-row: 2;
        position: static;
        height: auto;
        border-right: 0;
        padding: 16px 20px 0;
        background: var(--app-bg);
    }

    .documents-tree {
        max-height: 260px;
        overflow: auto;
    }

    .documents-main {
        grid-column: 1;
        grid-row: 3;
        padding: 20px;
    }

    .top-header {
        flex-wrap: wrap;
    }

    .documents-mobile-brand {
        display: inline-flex;
        align-items: center;
        gap: 9px;
        color: var(--app-text);
        font-size: 17px;
        font-weight: 900;
        text-decoration: none;
    }

    .documents-sidebar > .documents-brand {
        display: none;
    }

    .documents-upload-body {
        grid-template-columns: 1fr;
    }

    .documents-upload-picker {
        min-height: 92px;
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .documents-upload-picker small {
        grid-column: 1 / -1;
        width: fit-content;
        margin-left: 46px;
    }

    .documents-markdown-editor-header {
        display: grid;
    }

    .documents-markdown-editor-tabs {
        display: inline-flex;
        width: fit-content;
        overflow: hidden;
        border: 1px solid #d7dde8;
        border-radius: 999px;
        background: #fff;
        padding: 3px;
    }

    .documents-markdown-editor-tabs button {
        min-height: 30px;
        border: 0;
        border-radius: 999px;
        background: transparent;
        color: #64748b;
        padding: 0 13px;
        font: 900 12px/1 var(--app-font-family);
        cursor: pointer;
    }

    .documents-markdown-editor-tabs button.active {
        background: #eaf1ff;
        color: #1d4ed8;
    }

    .documents-markdown-editor-layout {
        grid-template-columns: 1fr;
    }

    .documents-markdown-editor.editor-tab .documents-markdown-editor-pane.preview,
    .documents-markdown-editor.preview-tab .documents-markdown-editor-pane.editor {
        display: none;
    }
}

@media (max-width: 620px) {
    .documents-share-password-input-row {
        grid-template-columns: minmax(0, 1fr) auto auto;
    }

    .documents-page-header {
        padding: 16px 16px 0;
    }

    .documents-sidebar {
        padding: 14px 16px 0;
    }

    .documents-main {
        padding: 16px;
    }

    .top-header h1 {
        font-size: 24px;
    }

    .documents-page-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 18px 12px;
        align-items: center;
    }

    .documents-page-header > div:first-of-type {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .documents-header-actions {
        grid-column: 2;
        grid-row: 1;
        width: auto;
        justify-content: flex-end;
        margin-bottom: 0;
    }

    .documents-card-grid {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .documents-list-table-wrap {
        overflow: visible;
    }

    .documents-list-table,
    .documents-list-table tbody,
    .documents-list-table tr,
    .documents-list-table td {
        display: block;
    }

    .documents-list-table {
        table-layout: auto;
    }

    .documents-list-table thead {
        display: none;
    }

    .documents-list-table tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto 42px;
        grid-template-areas:
            "title rating type width"
            "branch clone like like"
            "status status date date"
            "actions actions actions actions";
        gap: 9px 10px;
        align-items: center;
        padding: 13px 12px;
        border-bottom: 1px solid var(--app-line);
    }

    .documents-list-table th,
    .documents-list-table td {
        border-bottom: 0;
        padding: 0;
    }

    .documents-list-table td:nth-child(1) {
        grid-area: title;
        min-width: 0;
    }

    .documents-list-table td:nth-child(2),
    .documents-list-table td:nth-child(3),
    .documents-list-table td:nth-child(4),
    .documents-list-table td:nth-child(5),
    .documents-list-table td:nth-child(6),
    .documents-list-table td:nth-child(7),
    .documents-list-table td:nth-child(9) {
        min-height: 24px;
        display: inline-flex;
        align-items: center;
    }

    .documents-list-table td:nth-child(2) {
        grid-area: rating;
        justify-self: start;
    }

    .documents-list-table td:nth-child(3) {
        grid-area: branch;
        justify-self: start;
    }

    .documents-list-table td:nth-child(4) {
        grid-area: clone;
        justify-self: start;
    }

    .documents-list-table td:nth-child(5) {
        grid-area: like;
        justify-self: start;
    }

    .documents-list-table td:nth-child(6) {
        grid-area: type;
        justify-self: start;
    }

    .documents-list-table td:nth-child(7) {
        grid-area: status;
        justify-self: start;
    }

    .documents-list-table td:nth-child(8) {
        grid-area: date;
        justify-self: start;
        color: var(--app-text-secondary);
        font-size: 12px;
        font-weight: 900;
        white-space: nowrap;
    }

    .documents-list-table td:nth-child(9) {
        grid-area: width;
        justify-self: end;
        justify-content: flex-end;
        white-space: nowrap;
    }

    .documents-list-table td:nth-child(10) {
        grid-area: actions;
        min-width: 0;
    }

    .documents-list-table td:nth-child(10) .document-actions {
        display: flex;
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 8px;
    }

    .documents-list-table tr:hover td {
        background: transparent;
    }

    .documents-list-title {
        width: 100%;
        grid-template-columns: 18px minmax(0, 1fr);
        font-size: 13px;
    }

    .documents-list-title span {
        white-space: normal;
        overflow-wrap: anywhere;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .document-actions .btn {
        flex: 1 1 128px;
    }

    .documents-list-table .document-actions .btn {
        width: 36px;
        min-width: 36px;
        flex: 0 0 36px;
        padding: 0;
    }

    .documents-list-table .document-actions .btn span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    .document-actions .btn.icon-only {
        flex: 0 0 36px;
    }

    .documents-preview-summary {
        padding: 14px;
    }

    .documents-preview-title-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
    }

    .documents-preview-title-actions {
        grid-column: 2;
        grid-row: 1;
        align-self: start;
    }

    .documents-preview-title-row h2 {
        font-size: 19px;
        line-height: 1.2;
    }

    .documents-preview-title-row p {
        line-height: 1.45;
    }

    .documents-preview-action-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        align-items: stretch;
    }

    .documents-preview-url-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 36px;
        gap: 8px;
        align-items: center;
    }

    .documents-preview-url {
        width: 100%;
        min-height: 34px;
        display: flex;
        align-items: center;
        border: 1px solid var(--app-line);
        border-radius: 6px;
        background: #fff;
        padding: 0 10px;
    }

    .documents-preview-action-row .document-actions {
        display: grid;
        grid-template-columns: 88px repeat(5, 36px);
        justify-content: start;
        align-items: center;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .documents-preview-action-row .documents-view-width-select {
        width: 88px;
        grid-column: 1;
    }

    .documents-preview-action-row .document-actions .btn,
    .documents-preview-action-row .document-actions .document-file-button {
        width: 36px;
        min-width: 36px;
        flex: 0 0 36px;
    }

    .documents-preview-body,
    .documents-preview-body.width-70,
    .documents-preview-body.width-80,
    .documents-preview-body.width-90,
    .documents-preview-body.width-100 {
        width: 100%;
        margin: 0;
        padding: 18px;
    }

    .documents-preview-frame-wrap,
    .documents-preview-frame-wrap.width-70,
    .documents-preview-frame-wrap.width-80,
    .documents-preview-frame-wrap.width-90,
    .documents-preview-frame-wrap.width-100 {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .documents-preview-frame {
        min-height: 70vh;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
    }

    .documents-markdown-editor-header .document-actions .btn {
        flex: 1 1 150px;
    }

    .documents-markdown-editor {
        padding: 14px;
    }

    .documents-markdown-editor-input,
    .documents-markdown-preview-body,
    .documents-render-error,
    .documents-render-empty {
        height: 58vh;
        min-height: 320px;
    }
}
