/* Documentos — explorador estilo Odoo (morado + cards densas) */
.doc-odo {
    width: 100%;
}

.doc-odo-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 0;
    min-height: 72vh;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
}

.doc-odo-sidebar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 10px;
    border-right: 1px solid #e5e7eb;
    background: #f8f9fa;
}

.doc-odo-new {
    position: relative;
}

.doc-odo-new__btn {
    width: 100%;
    background: #714B67 !important;
    border-color: #714B67 !important;
    color: #fff !important;
    font-weight: 600;
}

.doc-odo-new__btn:hover {
    background: #5c3d54 !important;
    border-color: #5c3d54 !important;
}

.doc-odo-new__menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 30;
    display: none;
    flex-direction: column;
    padding: 4px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}

.doc-odo-new__menu:not([hidden]) {
    display: flex;
}

.doc-odo-new__menu[hidden] {
    display: none !important;
}

.doc-odo-new__item {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: #212529;
    text-align: left;
    text-decoration: none;
    font: inherit;
    font-size: 0.875rem;
    cursor: pointer;
}

.doc-odo-new__item:hover {
    background: #f3eef2;
    color: #714B67;
}

.doc-odo-new__sep {
    height: 1px;
    margin: 4px 0;
    background: #e5e7eb;
}

.doc-odo-nav {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.doc-odo-nav__item {
    display: block;
    padding: 7px 10px;
    border-radius: 3px;
    color: #212529;
    text-decoration: none;
    font-size: 0.875rem;
}

.doc-odo-nav__item:hover,
.doc-odo-nav__item.is-active {
    background: #f3eef2;
    color: #714B67;
    font-weight: 600;
}

.doc-odo-tree > summary {
    list-style: none;
    cursor: pointer;
}

.doc-odo-tree > summary::-webkit-details-marker {
    display: none;
}

.doc-odo-tree > summary.doc-odo-nav__item {
    display: flex;
    align-items: center;
}

.doc-odo-tree > summary a {
    color: inherit;
    text-decoration: none;
    flex: 1;
}

.doc-odo-mini-tree,
.doc-odo-mini-tree ul {
    margin: 0;
    padding: 0 0 0 10px;
    list-style: none;
}

.doc-odo-mini-tree a {
    display: block;
    padding: 4px 8px;
    border-radius: 3px;
    color: #6c757d;
    text-decoration: none;
    font-size: 0.8125rem;
}

.doc-odo-mini-tree li.is-active > a,
.doc-odo-mini-tree a:hover {
    background: #fff;
    color: #714B67;
}

.doc-odo-main {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 12px 16px 20px;
    min-width: 0;
    background: #fff;
}

.doc-odo-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.doc-odo-crumbs {
    flex: 0 1 auto;
    min-width: 100px;
}

.doc-odo-crumbs strong {
    display: block;
    color: #212529;
    font-size: 1.05rem;
    font-weight: 600;
}

.doc-odo-path {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 2px;
    color: #6c757d;
    font-size: 0.75rem;
}

.doc-odo-path a {
    color: inherit;
    text-decoration: none;
}

.doc-odo-search {
    flex: 1 1 240px;
    max-width: 480px;
}

.doc-odo-search input {
    width: 100%;
    height: 36px;
    padding: 0 12px 0 32px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%236c757d' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242.656a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E") 10px center no-repeat;
    font-size: 0.875rem;
}

.doc-odo-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    color: #6c757d;
    font-size: 0.8125rem;
}

.doc-odo-views {
    display: inline-flex;
    gap: 2px;
    padding: 2px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.doc-odo-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 28px;
    border-radius: 3px;
    color: #6c757d;
    text-decoration: none;
    font-size: 0.9rem;
}

.doc-odo-view-btn.is-active,
.doc-odo-view-btn:hover {
    background: #f3eef2;
    color: #714B67;
}

.doc-odo-section__title {
    margin: 0 0 8px;
    color: #6c757d;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.doc-odo-folders {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 8px;
}

.doc-odo-folder-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: 72px;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: border-color .12s ease, box-shadow .12s ease;
}

.doc-odo-folder-card:hover {
    border-color: #c4a8bc;
    box-shadow: 0 2px 8px rgba(113, 75, 103, .08);
}

.doc-odo-folder-card__icon {
    font-size: 1.25rem;
    line-height: 1;
    margin-bottom: 2px;
    opacity: 0.85;
}

.doc-odo-folder-card__name {
    color: #212529;
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.25;
}

.doc-odo-folder-card__parent {
    color: #6c757d;
    font-size: 0.75rem;
}

.doc-odo-files {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 10px;
}

.doc-odo-files.is-list {
    grid-template-columns: 1fr;
}

.doc-odo-file-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 150px;
    padding: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    background: #fff;
    color: inherit;
    text-decoration: none;
}

.doc-odo-files.is-list .doc-odo-file-card {
    flex-direction: row;
    align-items: center;
    min-height: 0;
    gap: 12px;
}

.doc-odo-file-card__thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 96px;
    border-radius: 3px;
    background: #f1f3f5;
    overflow: hidden;
}

.doc-odo-files.is-list .doc-odo-file-card__thumb {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
}

.doc-odo-file-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.doc-odo-file-card__mime {
    color: #714B67;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: .04em;
}

.doc-odo-file-card__name {
    color: #212529;
    font-weight: 600;
    font-size: 0.8125rem;
    line-height: 1.25;
}

.doc-odo-file-card__meta {
    margin-top: auto;
    color: #6c757d;
    font-size: 0.7rem;
}

.doc-odo-empty {
    margin: 0;
    color: #6c757d;
    font-size: 0.875rem;
}

.doc-odo-folder-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 12px;
    border: 1px dashed #ced4da;
    border-radius: 4px;
}

.doc-odo-folder-form .form-control {
    flex: 1 1 200px;
    max-width: 320px;
}

@media (max-width: 860px) {
    .doc-odo-layout {
        grid-template-columns: 1fr;
    }

    .doc-odo-sidebar {
        border-right: 0;
        border-bottom: 1px solid #e5e7eb;
    }
}