/* DocWin public styles - Professional Design */
:root {
    --docwin-primary: #2563eb;
    --docwin-primary-dark: #1d4ed8;
    --docwin-bg-light: #f8fafc;
    --docwin-border: #e2e8f0;
    --docwin-text: #1e293b;
    --docwin-text-light: #64748b;
    --docwin-text-muted: #94a3b8;
    --docwin-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    --docwin-shadow-hover: 0 4px 6px rgba(0, 0, 0, 0.1);
    --docwin-radius: 8px;
    --docwin-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Grouped subfolders */
.docwin-groups {
    display: block;
}

.docwin-group {
    border: 1px solid var(--docwin-border);
    border-radius: var(--docwin-radius);
    background: #fff;
    margin-bottom: 12px;
    overflow: hidden;
}

.docwin-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--docwin-bg-light);
    border-bottom: 1px solid var(--docwin-border);
}

.docwin-group-toggle {
    width: 28px;
    height: 28px;
    border: 1px solid var(--docwin-border);
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    line-height: 1;
}

.docwin-group-icon {
    width: 22px;
    height: 16px;
    display: inline-block;
    margin-right: 8px;
    background-repeat: no-repeat;
    background-position: center left;
    background-size: 22px 16px;
    /* Windows 11 style folder (blue) */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='16' viewBox='0 0 22 16'><defs><linearGradient id='g' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%23bcd4ff'/><stop offset='1' stop-color='%230e73e4'/></linearGradient></defs><path d='M1.5 3.5a2 2 0 0 1 2-2h3.6a2 2 0 0 1 1.4.6l1.1 1.1a2 2 0 0 0 1.4.6H18.5a2 2 0 0 1 2 2v6.9a2 2 0 0 1-2 2H3.5a2 2 0 0 1-2-2V3.5Z' fill='url(%23g)'/><rect x='1.5' y='4.5' rx='1.6' ry='1.6' width='19' height='10' fill='%230e73e4' opacity='0.18'/></svg>");
}

/* Red variant for subfolders (level >= 1) */
.docwin-group-icon-red {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='16' viewBox='0 0 22 16'><defs><linearGradient id='g' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%23ffc3c3'/><stop offset='1' stop-color='%23dc2626'/></linearGradient></defs><path d='M1.5 3.5a2 2 0 0 1 2-2h3.6a2 2 0 0 1 1.4.6l1.1 1.1a2 2 0 0 0 1.4.6H18.5a2 2 0 0 1 2 2v6.9a2 2 0 0 1-2 2H3.5a2 2 0 0 1-2-2V3.5Z' fill='url(%23g)'/><rect x='1.5' y='4.5' rx='1.6' ry='1.6' width='19' height='10' fill='%23dc2626' opacity='0.18'/></svg>");
}

/* Orange for deeper levels */
.docwin-group-icon-orange {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='16' viewBox='0 0 22 16'><defs><linearGradient id='g' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%fff1e6'/><stop offset='1' stop-color='%23ea580c'/></linearGradient></defs><path d='M1.5 3.5a2 2 0 0 1 2-2h3.6a2 2 0 0 1 1.4.6l1.1 1.1a2 2 0 0 0 1.4.6H18.5a2 2 0 0 1 2 2v6.9a2 2 0 0 1-2 2H3.5a2 2 0 0 1-2-2V3.5Z' fill='url(%23g)'/><rect x='1.5' y='4.5' rx='1.6' ry='1.6' width='19' height='10' fill='%23ea580c' opacity='0.18'/></svg>");
}

.docwin-group-title {
    font-weight: 700;
}

.docwin-group-count {
    margin-left: auto;
    font-size: 12px;
    color: var(--docwin-text-light);
}

.docwin-group-body {
    padding: 0;
}

.docwin-wrap {
    margin: 2rem 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--docwin-text);
}

.docwin-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--docwin-text);
    border-bottom: 2px solid var(--docwin-primary);
    padding-bottom: 0.5rem;
    display: inline-block;
}

/* Empty state styling */
.docwin-empty-state {
    padding: 3rem 1rem;
    text-align: center;
    background: var(--docwin-bg-light);
    border-radius: var(--docwin-radius);
    border: 1px dashed var(--docwin-border);
}

.docwin-empty-icon {
    margin: 0 auto 1rem;
    color: var(--docwin-text-light);
}

.docwin-empty-state p {
    font-size: 1rem;
    color: var(--docwin-text-light);
    margin: 0;
}

/* Search box styling */
.docwin-search-container {
    margin-bottom: 1.5rem;
}

.docwin-search-box {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

.docwin-search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--docwin-text-light);
    pointer-events: none;
}

.docwin-search-input {
    width: 100%;
    padding: 12px 44px 12px 16px;
    border: 1px solid var(--docwin-border);
    border-radius: var(--docwin-radius);
    background: #ffffff;
    color: var(--docwin-text);
    font-size: 0.95rem;
    transition: var(--docwin-transition);
}

.docwin-search-input:focus {
    outline: none;
    border-color: var(--docwin-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Professional Document Table */
.docwin-table {
    width: 100%;
    background: #ffffff;
    border-radius: var(--docwin-radius);
    box-shadow: var(--docwin-shadow);
    overflow: hidden;
    border-collapse: collapse;
    border: 1px solid var(--docwin-border);
}

.docwin-document-item {
    transition: var(--docwin-transition);
    cursor: pointer;
    border: none;
    border-bottom: 1px solid var(--docwin-border);
}

.docwin-document-item:last-child {
    border-bottom: none;
}

.docwin-document-item:hover {
    background-color: var(--docwin-bg-light);
    box-shadow: inset 3px 0 0 var(--docwin-primary);
}

.docwin-icon-cell {
    width: auto;
    padding: 16px 20px;
    border: none;
    vertical-align: middle;
    text-align: left;
}

.docwin-content-cell {
    padding: 16px 20px 16px 20px;
    border: none;
    vertical-align: middle;
    width: 100%;
    text-align: left;
}

.docwin-document-icon {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 64px;
    border-radius: 10px;
    margin-right: 16px;
    flex-shrink: 0;
    position: relative;
    vertical-align: middle;
    transition: var(--docwin-transition);
}

.docwin-document-item:hover .docwin-document-icon {
    transform: scale(1.08);
}

.docwin-document-icon svg {
    margin-bottom: 1px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.08));
}

.docwin-file-ext {
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-top: 2px;
    padding: 1px 5px;
    border-radius: 3px;
    line-height: 1.3;
}

/* File type icon containers + extension badge colors */
.docwin-file-pdf {
    background: linear-gradient(145deg, #fff5f5, #fee2e2);
    border: 1.5px solid #fecaca;
}
.docwin-file-pdf .docwin-file-ext {
    color: #fff;
    background: #dc2626;
}

.docwin-file-word {
    background: linear-gradient(145deg, #eff6ff, #dbeafe);
    border: 1.5px solid #bfdbfe;
}
.docwin-file-word .docwin-file-ext {
    color: #fff;
    background: #2563eb;
}

.docwin-file-excel {
    background: linear-gradient(145deg, #f0fdf4, #dcfce7);
    border: 1.5px solid #bbf7d0;
}
.docwin-file-excel .docwin-file-ext {
    color: #fff;
    background: #16a34a;
}

.docwin-file-powerpoint {
    background: linear-gradient(145deg, #fffbeb, #fef3c7);
    border: 1.5px solid #fde68a;
}
.docwin-file-powerpoint .docwin-file-ext {
    color: #fff;
    background: #d97706;
}

.docwin-file-archive {
    background: linear-gradient(145deg, #fefce8, #fef9c3);
    border: 1.5px solid #fde047;
}
.docwin-file-archive .docwin-file-ext {
    color: #fff;
    background: #92400e;
}

.docwin-file-text {
    background: linear-gradient(145deg, #f8fafc, #f1f5f9);
    border: 1.5px solid #e2e8f0;
}
.docwin-file-text .docwin-file-ext {
    color: #fff;
    background: #64748b;
}

.docwin-file-generic {
    background: linear-gradient(145deg, #f9fafb, #f3f4f6);
    border: 1.5px solid #e5e7eb;
}
.docwin-file-generic .docwin-file-ext {
    color: #fff;
    background: #9ca3af;
}

.docwin-document-content {
    display: inline-block;
    vertical-align: middle;
    min-width: 0;
}

.docwin-document-title {
    display: inline-block;
    font-size: 16px;
    font-weight: 600;
    color: var(--docwin-text);
    text-decoration: none;
    line-height: 1.4;
    margin-bottom: 4px;
    transition: var(--docwin-transition);
    vertical-align: middle;
}

.docwin-document-title:hover {
    color: var(--docwin-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.docwin-document-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--docwin-text-light);
}

.docwin-file-size {
    font-weight: 500;
}

.docwin-download-hint {
    color: var(--docwin-text-muted);
    font-size: 12px;
    opacity: 0;
    transition: var(--docwin-transition);
}

.docwin-document-item:hover .docwin-download-hint {
    opacity: 1;
}

/* Stiluri eliminate pentru simplificare */

/* Responsive adjustments */
@media (max-width: 768px) {
    .docwin-document-item {
        padding: 12px 16px;
    }
    
    .docwin-document-icon {
        width: 52px;
        height: 56px;
        margin-right: 12px;
    }
    
    .docwin-document-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .docwin-document-title {
        font-size: 15px;
    }
    
    .docwin-document-meta {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .docwin-search-box {
        max-width: 100%;
    }
    
    .docwin-document-item {
        padding: 10px 12px;
    }
    
    .docwin-document-icon {
        width: 44px;
        height: 48px;
        margin-right: 10px;
        border-radius: 8px;
    }
    
    .docwin-document-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .docwin-file-ext {
        font-size: 7px;
        padding: 1px 3px;
    }
    
    .docwin-download-hint {
        display: none;
    }
}

