/* =============================================
   FILE MANAGER AVANZATO - MyBudget
   Coerente con lo stile del sito
   ============================================= */

/* Layout principale */
.file-manager-advanced {
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    min-height: 85vh;
    overflow: hidden;
}

/* Header */
.fm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    background: linear-gradient(90deg, rgba(132, 184, 152, 0.08), transparent);
    border-bottom: 2px solid var(--e-global-color-04fbcb9);
}

.fm-logo {
    display: flex;
    align-items: center;
    gap: 16px;
}

.fm-logo-icon {
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--e-global-color-21278c2);
    border-radius: 20px;
}

.fm-logo-icon i {
    font-size: 24px;
    color: var(--e-global-color-primary);
}

.fm-logo-text h4 {
    margin: 0;
    font-family: 'Lufga', sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--e-global-color-text);
}

.fm-logo-text span {
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

.fm-header-stats {
    display: flex;
    gap: 20px;
}

.fm-stat {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background-color: transparent;
    border: 1px solid var(--e-global-color-04fbcb9);
    border-radius: 30px;
    transition: all 0.3s ease;
}

.fm-stat:hover {
    border-color: #44474E;
    background-color: #44474E;
}

.fm-stat-storage {
    min-width: 180px;
}

.fm-stat-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--e-global-color-21278c2);
    border-radius: 12px;
}

.fm-stat-icon i {
    font-size: 18px;
    color: var(--e-global-color-primary);
}

.fm-stat-icon-docs i {
    color: var(--e-global-color-secondary);
}

.fm-stat-icon-folders i {
    color: #FFC107;
}

.fm-stat-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fm-stat-header {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.fm-stat-value {
    font-family: 'Lufga', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--e-global-color-text);
}

.fm-stat-max {
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.fm-stat-label {
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.5);
}

/* Storage Bar */
.fm-storage-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin: 4px 0;
}

.fm-storage-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--e-global-color-primary), var(--e-global-color-secondary));
    border-radius: 3px;
    transition: width 1s ease-out;
}

/* Toolbar */
.fm-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 30px;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid var(--e-global-color-04fbcb9);
}

.fm-toolbar-left,
.fm-toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Buttons - Stile coerente con il sito */
#file-manager .fm-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 12px 24px !important;
    border-radius: 30px !important;
    font-family: 'Lufga', sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease-in-out !important;
    border: 2px solid var(--e-global-color-primary) !important;
    background-color: transparent !important;
    color: var(--e-global-color-text) !important;
    outline: none !important;
    white-space: nowrap !important;
    box-shadow: none !important;
}

#file-manager .fm-btn:hover,
#file-manager .fm-btn:active,
#file-manager .fm-btn:focus {
    background-color: var(--e-global-color-primary) !important;
    box-shadow: none !important;
}

#file-manager .fm-btn i {
    font-size: 16px !important;
}

#file-manager .fm-btn-primary {
    border-color: var(--e-global-color-secondary) !important;
}

#file-manager .fm-btn-primary:hover {
    background-color: var(--e-global-color-secondary) !important;
}

#file-manager .fm-btn-secondary {
    border-color: var(--e-global-color-04fbcb9) !important;
}

#file-manager .fm-btn-secondary:hover {
    border-color: var(--e-global-color-primary) !important;
    background-color: var(--e-global-color-primary) !important;
}

#file-manager .fm-btn-danger {
    border-color: rgb(133, 41, 41) !important;
    color: rgb(133, 41, 41) !important;
    background-color: transparent !important;
}

#file-manager .fm-btn-danger:hover {
    background-color: rgb(133, 41, 41) !important;
    color: var(--e-global-color-text) !important;
}

#file-manager .fm-btn-small {
    padding: 6px 14px !important;
    font-size: 12px !important;
}

#file-manager .fm-btn-icon {
    padding: 0 !important;
    width: 40px !important;
    height: 40px !important;
    border-color: var(--e-global-color-04fbcb9) !important;
}

#file-manager .fm-btn-icon:hover {
    border-color: var(--e-global-color-primary) !important;
    background-color: var(--e-global-color-primary) !important;
}

#file-manager .fm-btn-block {
    width: 100% !important;
}

/* Bulk Actions */
.fm-bulk-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(132, 184, 152, 0.1);
    border-radius: 30px;
    border: 1px solid var(--e-global-color-primary);
}

.fm-bulk-count {
    font-family: 'Lufga', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--e-global-color-primary);
}

/* Search Box - Stile coerente con i form del sito */
.fm-search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: transparent;
    border-radius: 30px;
    border: 1px solid var(--e-global-color-04fbcb9);
    transition: all 0.3s ease;
    min-width: 280px;
}

.fm-search-box:focus-within {
    border-color: var(--e-global-color-primary);
}

.fm-search-box i {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.4);
}

.fm-search-box input {
    flex: 1;
    background: none !important;
    border: none !important;
    outline: none !important;
    color: var(--e-global-color-text);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
}

.fm-search-box input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

#file-manager .fm-search-clear {
    padding: 4px !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    color: rgba(255, 255, 255, 0.4) !important;
    transition: color 0.2s !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#file-manager .fm-search-clear i {
    font-size: 12px !important;
}

#file-manager .fm-search-clear:hover {
    color: var(--e-global-color-text) !important;
}

/* Sort Dropdown */
.fm-sort-dropdown {
    position: relative;
}

.fm-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    min-width: 180px;
    background: var(--e-global-color-7459678);
    border: 1px solid var(--e-global-color-04fbcb9);
    border-radius: 15px;
    padding: 8px;
    box-shadow: rgba(32, 34, 44, 1) 0px 7px 29px 0px;
    z-index: 1000;
    display: none;
}

.fm-dropdown-menu.visible {
    display: block;
}

.fm-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fm-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--e-global-color-text);
}

.fm-dropdown-item.active {
    background: rgba(132, 184, 152, 0.15);
    color: var(--e-global-color-primary);
}

.fm-dropdown-item i {
    font-size: 14px;
    opacity: 0.7;
}

/* Filter chips */
#file-manager .fm-filters-bar {
    display: none;
    padding: 14px 30px !important;
    background: rgba(0, 0, 0, 0.1) !important;
    border-bottom: 1px solid var(--e-global-color-04fbcb9) !important;
}

#file-manager .fm-filter-group {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
}

#file-manager .fm-filter-group label {
    font-family: 'Outfit', sans-serif !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: rgba(255, 255, 255, 0.5) !important;
}

#file-manager .fm-filter-chips {
    display: flex !important;
    gap: 8px !important;
}

#file-manager .fm-chip {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 6px 12px !important;
    background: transparent !important;
    border: 1px solid var(--e-global-color-04fbcb9) !important;
    border-radius: 20px !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 12px !important;
    color: rgba(255, 255, 255, 0.7) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

#file-manager .fm-chip:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

#file-manager .fm-chip.active {
    background: rgba(132, 184, 152, 0.15) !important;
    border-color: var(--e-global-color-primary) !important;
    color: var(--e-global-color-primary) !important;
}

#file-manager .fm-chip i {
    font-size: 12px !important;
}

#file-manager .fm-chip-count {
    padding: 1px 6px !important;
    background: rgba(0, 0, 0, 0.2) !important;
    border-radius: 10px !important;
    font-size: 10px !important;
}

/* View Toggle */
#file-manager .fm-view-toggle {
    display: flex !important;
    background: transparent !important;
    border-radius: 30px !important;
    padding: 4px !important;
    border: 1px solid var(--e-global-color-04fbcb9) !important;
}

#file-manager .fm-view-btn {
    padding: 8px 12px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 25px !important;
    color: rgba(255, 255, 255, 0.4) !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    width: auto !important;
    height: auto !important;
}

#file-manager .fm-view-btn:hover {
    color: rgba(255, 255, 255, 0.7) !important;
    background: transparent !important;
}

#file-manager .fm-view-btn.active {
    background-color: var(--e-global-color-primary) !important;
    color: var(--e-global-color-text) !important;
}

#file-manager .fm-view-btn i {
    font-size: 14px !important;
}

/* Container */
.fm-container {
    display: flex;
    position: relative;
    align-items: stretch;
}

/* Sidebar */
.fm-sidebar {
    width: 280px;
    min-width: 280px;
    background: rgba(0, 0, 0, 0.1);
    border-right: 2px solid var(--e-global-color-04fbcb9);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.fm-sidebar-inner {
    display: flex;
    flex-direction: column;
    flex: 1;
    transition: none;
}

.fm-sidebar-inner.is-sticky {
    position: fixed;
    top: 0px;
    width: 278px; /* 280px - 2px border */
    max-height: calc(100vh - 100px);
}

.fm-sidebar-inner.is-stuck-bottom {
    position: absolute;
    bottom: 70px; /* Altezza storage info */
    top: auto;
    width: 278px;
    max-height: calc(100vh - 100px);
}

.fm-sidebar.collapsed {
    width: 0;
    min-width: 0;
    opacity: 0;
    overflow: hidden;
}

.fm-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid var(--e-global-color-04fbcb9);
    height: 64px;
}

.fm-sidebar-header h6 {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.4);
}

#file-manager .fm-sidebar-toggle {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    min-height: 26px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    border-radius: 6px !important;
    color: rgba(255, 255, 255, 0.4) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

#file-manager .fm-sidebar-toggle i {
    font-size: 12px !important;
}

#file-manager .fm-sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--e-global-color-text) !important;
}

/* Sidebar Restore Button */
#file-manager .fm-sidebar-restore {
    position: absolute;
    left: 0;
    top: 250px;
    transform: translateY(-50%) translateX(-100%);
    width: 24px !important;
    height: 48px !important;
    min-width: 24px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--e-global-color-04fbcb9) !important;
    border: none !important;
    border-radius: 0 8px 8px 0 !important;
    color: rgba(255, 255, 255, 0.6) !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    opacity: 0;
    visibility: hidden;
    z-index: 100;
}

#file-manager .fm-sidebar-restore.visible {
    transform: translateY(-50%) translateX(0);
    opacity: 1;
    visibility: visible;
}

#file-manager .fm-sidebar-restore i {
    font-size: 12px !important;
}

#file-manager .fm-sidebar-restore:hover {
    background: var(--e-global-color-primary) !important;
    color: var(--e-global-color-text) !important;
    width: 28px !important;
}

/* Quick Access */
.fm-quick-access {
    padding: 12px;
}

.fm-quick-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.fm-quick-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.fm-quick-item.active {
    background-color: var(--e-global-color-21278c2);
}

.fm-quick-item i {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.6);
    width: 20px;
    text-align: center;
}

.fm-quick-item.active i {
    color: var(--e-global-color-primary);
}

.fm-quick-item span:first-of-type {
    flex: 1;
    font-family: 'Lufga', sans-serif;
    font-size: 13px;
    font-weight: 500;
}

.fm-quick-count {
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.6);
}

.fm-sidebar-divider {
    height: 1px;
    background: var(--e-global-color-04fbcb9);
    margin: 8px 16px;
}

.fm-sidebar-section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px 8px;
}

.fm-sidebar-section-title span {
    font-family: 'Outfit', sans-serif;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.4);
}

#file-manager .fm-add-folder-btn {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: none !important;
    border-radius: 6px !important;
    color: rgba(255, 255, 255, 0.5) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

#file-manager .fm-add-folder-btn i {
    font-size: 11px !important;
}

#file-manager .fm-add-folder-btn:hover {
    background: var(--e-global-color-primary) !important;
    color: var(--e-global-color-text) !important;
}

/* Folder Tree */
.fm-folder-tree {
    flex: 1;
    overflow-y: auto;
    padding: 0 8px 12px;
}

.fm-folder-tree::-webkit-scrollbar {
    width: 5px;
}

.fm-folder-tree::-webkit-scrollbar-track {
    background: transparent;
}

.fm-folder-tree::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.folder-tree-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.folder-tree-list .folder-tree-list {
    padding-left: 18px;
    display: none;
}

.folder-tree-list .folder-tree-list.expanded {
    display: block;
}

.folder-item {
    margin: 2px 0;
}

.folder-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.folder-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.folder-row.active {
    background-color: var(--e-global-color-21278c2);
}

.folder-toggle {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.folder-toggle i {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    transition: transform 0.2s ease;
}

.folder-toggle.expanded i {
    transform: rotate(90deg);
}

.folder-toggle-placeholder {
    width: 18px;
    flex-shrink: 0;
}

.folder-icon {
    font-size: 16px;
    color: var(--e-global-color-secondary);
    flex-shrink: 0;
}

.folder-name {
    font-family: 'Lufga', sans-serif;
    font-size: 13px;
    font-weight: 500;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.folder-count {
    font-family: 'Outfit', sans-serif;
    font-size: 10px;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.5);
}

/* Sidebar Storage */
.fm-sidebar-storage {
    padding: 16px;
    border-top: 1px solid var(--e-global-color-04fbcb9);
    background: rgba(0, 0, 0, 0.2);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.fm-storage-info {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 8px;
}

.fm-storage-used {
    font-family: 'Lufga', sans-serif;
    font-size: 14px;
    font-weight: 600;
}

.fm-storage-of {
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

.fm-storage-bar-mini {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.fm-storage-progress-mini {
    height: 100%;
    background: linear-gradient(90deg, var(--e-global-color-primary), var(--e-global-color-secondary));
    border-radius: 2px;
}

/* Main Content */
.fm-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.05);
    min-width: 0;
}

/* Breadcrumb */
.fm-breadcrumb {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 28px;
    background: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid var(--e-global-color-04fbcb9);
    height: 64px;
}

.fm-breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.fm-breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-family: 'Lufga', sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.fm-breadcrumb-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.8);
    border-color: var(--e-global-color-04fbcb9);
}

.fm-breadcrumb-item.active {
    background: var(--e-global-color-21278c2);
    color: var(--e-global-color-primary);
}

.fm-breadcrumb-item i {
    font-size: 14px;
}

.fm-breadcrumb-separator {
    color: rgba(255, 255, 255, 0.2);
    font-size: 10px;
}

.fm-breadcrumb-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.fm-files-count {
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

/* Dropzone - Stile coerente con file upload del sito */
.fm-dropzone {
    margin: 24px 28px;
    padding: 50px 40px;
    border: 2px dashed var(--e-global-color-secondary);
    border-radius: 30px;
    background: transparent;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: none;
}

.fm-dropzone.visible {
    display: block;
}

.fm-dropzone:hover,
.fm-dropzone.dragover {
    border-color: var(--e-global-color-primary);
    background: rgba(132, 184, 152, 0.05);
}

.fm-dropzone.dragover {
    transform: scale(1.01);
}

.fm-dropzone-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--e-global-color-21278c2);
    border-radius: 50%;
}

.fm-dropzone-icon i {
    font-size: 36px;
    color: rgba(255, 255, 255, 0.2);
}

.fm-dropzone-content h5 {
    margin: 0 0 8px;
    font-family: 'Lufga', sans-serif;
    font-size: 20px;
    font-weight: 600;
}

.fm-dropzone-content p {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

.fm-dropzone-link {
    color: var(--e-global-color-primary);
    text-decoration: underline;
}

.fm-dropzone-formats {
    margin-top: 16px;
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
}

/* Subfolders */
.fm-subfolders {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding: 28px 20px;
}

.fm-subfolders:empty {
    display: none;
}

.fm-subfolder-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: transparent;
    border: 1px solid var(--e-global-color-04fbcb9);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
}

.fm-subfolder-card:hover {
    border-color: var(--e-global-color-secondary);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-2px);
}

.fm-subfolder-card i {
    font-size: 28px;
    color: var(--e-global-color-secondary);
}

.fm-subfolder-info {
    display: flex;
    flex-direction: column;
}

.fm-subfolder-name {
    font-family: 'Lufga', sans-serif;
    font-size: 14px;
    font-weight: 600;
}

.fm-subfolder-count {
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
}

/* Content Area */
.fm-content {
    padding: 28px 28px;
}

.fm-content::-webkit-scrollbar {
    width: 8px;
}

.fm-content::-webkit-scrollbar-track {
    background: transparent;
}

.fm-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}

.fm-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Files Grid */
.fm-files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
    padding-top: 4px;
}

.fm-file-card {
    display: flex;
    flex-direction: column;
    background: transparent;
    border: 1px solid var(--e-global-color-04fbcb9);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.fm-file-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-3px);
    box-shadow: rgba(32, 34, 44, 1) 0px 7px 20px 0px;
}

.fm-file-card.selected {
    border-color: var(--e-global-color-primary);
    background: rgba(132, 184, 152, 0.08);
}

.fm-file-card-preview {
    height: 85px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.08);
    position: relative;
}

.fm-file-card-preview i {
    font-size: 38px;
    transition: all 0.3s ease;
}

.fm-file-card:hover .fm-file-card-preview i {
    transform: scale(1.08);
}

.fm-file-card-checkbox {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    opacity: 0;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fm-file-card:hover .fm-file-card-checkbox,
.fm-file-card.selected .fm-file-card-checkbox {
    opacity: 1;
}

.fm-file-card.selected .fm-file-card-checkbox {
    background: var(--e-global-color-primary);
    border-color: var(--e-global-color-primary);
}

.fm-file-card.selected .fm-file-card-checkbox::after {
    content: '\2714';
    color: #fff;
    font-size: 12px;
}

/* Pulsante stella sulla card */
#file-manager .fm-file-card-star {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(0, 0, 0, 0.6) !important;
    border: none !important;
    border-radius: 5px !important;
    color: rgba(255, 255, 255, 0.5) !important;
    cursor: pointer !important;
    opacity: 0 !important;
    transition: all 0.2s ease !important;
}

#file-manager .fm-file-card-star i {
    font-size: 12px !important;
}

#file-manager .fm-file-card:hover .fm-file-card-star {
    opacity: 1 !important;
}

#file-manager .fm-file-card-star.starred,
#file-manager .fm-file-card-star:hover {
    opacity: 1 !important;
    color: #FFC107 !important;
    background: rgba(255, 193, 7, 0.2) !important;
}

/* Container azioni card */
#file-manager .fm-file-card-actions {
    position: absolute !important;
    bottom: 8px !important;
    right: 8px !important;
    display: flex !important;
    gap: 4px !important;
    opacity: 0 !important;
    transition: opacity 0.2s ease !important;
}

#file-manager .fm-file-card:hover .fm-file-card-actions {
    opacity: 1 !important;
}

/* Pulsanti azione card - Stile piccolo coerente con .btn-action-table */
#file-manager .fm-file-card-action {
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    color: var(--e-global-color-text) !important;
    background-color: rgba(0, 0, 0, 0.6) !important;
    border-radius: 5px !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    opacity: 0.7 !important;
    transition: all 0.3s ease !important;
}

#file-manager .fm-file-card-action i {
    font-size: 11px !important;
}

#file-manager .fm-file-card-action:hover {
    opacity: 1 !important;
    background-color: var(--e-global-color-primary) !important;
    border-color: var(--e-global-color-primary) !important;
}

#file-manager .fm-file-card-action.delete:hover {
    border-color: #a01414 !important;
    background-color: #a01414 !important;
}

.fm-file-card-info {
    padding: 10px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.fm-file-card-name {
    font-family: 'Lufga', sans-serif;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fm-file-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Outfit', sans-serif;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.45);
}

.fm-file-type-badge {
    display: inline-flex;
    padding: 1px 6px;
    border-radius: 20px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
}

/* File Type Colors */
.fm-filetype-pdf { color: #E5252A; }
.fm-filetype-pdf .fm-file-type-badge { background: rgba(229, 37, 42, 0.15); color: #E5252A; }
.fm-filetype-doc, .fm-filetype-docx { color: #2B579A; }
.fm-filetype-doc .fm-file-type-badge, .fm-filetype-docx .fm-file-type-badge { background: rgba(43, 87, 154, 0.15); color: #4A90D9; }
.fm-filetype-xls, .fm-filetype-xlsx { color: #217346; }
.fm-filetype-xls .fm-file-type-badge, .fm-filetype-xlsx .fm-file-type-badge { background: rgba(33, 115, 70, 0.15); color: #33B76F; }
.fm-filetype-ppt, .fm-filetype-pptx { color: #D04423; }
.fm-filetype-ppt .fm-file-type-badge, .fm-filetype-pptx .fm-file-type-badge { background: rgba(208, 68, 35, 0.15); color: #D04423; }
.fm-filetype-zip, .fm-filetype-rar { color: #F7CC4C; }
.fm-filetype-zip .fm-file-type-badge, .fm-filetype-rar .fm-file-type-badge { background: rgba(247, 204, 76, 0.15); color: #F7CC4C; }
.fm-filetype-jpg, .fm-filetype-jpeg, .fm-filetype-png, .fm-filetype-gif, .fm-filetype-webp { color: #B208F9; }
.fm-filetype-jpg .fm-file-type-badge, .fm-filetype-jpeg .fm-file-type-badge, 
.fm-filetype-png .fm-file-type-badge, .fm-filetype-gif .fm-file-type-badge,
.fm-filetype-webp .fm-file-type-badge { background: rgba(178, 8, 249, 0.15); color: #B208F9; }
.fm-filetype-txt { color: #8E8E93; }
.fm-filetype-txt .fm-file-type-badge { background: rgba(142, 142, 147, 0.15); color: #8E8E93; }
.fm-filetype-default { color: #64748b; }
.fm-filetype-default .fm-file-type-badge { background: rgba(100, 116, 139, 0.15); color: #64748b; }

/* Files List View - Stile coerente con datatables del sito */
.fm-files-list {
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: visible;
}

.fm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.fm-table th {
    padding: 10px 12px 10px 0;
    text-align: left;
    font-family: 'Lufga', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--e-global-color-text);
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.fm-table th.fm-sortable {
    cursor: pointer;
    transition: color 0.2s ease;
}

.fm-table th.fm-sortable:hover {
    color: var(--e-global-color-primary);
}

.fm-sort-icon {
    font-size: 10px;
    margin-left: 4px;
    opacity: 0.4;
}

.fm-table td {
    padding: 5px 12px 5px 0;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    border: none;
    border-bottom: none;
    vertical-align: middle;
    background: transparent !important;
}

.fm-table tbody tr {
    transition: all 0.25s ease-in-out;
    cursor: pointer;
    background-color: transparent;
}

.fm-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.07);
}

.fm-table tbody tr.selected {
    background-color: rgba(132, 184, 152, 0.1);
}

.fm-table .fm-th-check {
    width: 40px;
    padding-left: 0;
}

.fm-table .fm-th-type {
    width: 45px;
}

.fm-table .fm-th-actions {
    width: 80px;
    text-align: right;
    padding-right: 0;
}

.fm-table td.fm-td-actions {
    text-align: right;
    padding-right: 0;
}

#file-manager .fm-table-file-icon:before {
    font-size: 20px !important;
}

#file-manager .fm-table-file-icon.mybudget:before {
    font-size: 20px !important;
}

#file-manager .fm-table td i.fm-table-file-icon:before {
    font-size: 20px !important;
}

.fm-table-file-name {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.fm-table-file-name strong {
    font-family: 'Lufga', sans-serif;
    font-weight: 500;
    font-size: 14px;
}

.fm-table-file-name span {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

#file-manager .fm-table-actions {
    display: flex !important;
    gap: 5px !important;
    justify-content: flex-end !important;
}

/* Pulsanti azione tabella - Stile coerente con .btn-action-table */
#file-manager .fm-table-action-btn {
    border: 1px solid var(--e-global-color-text) !important;
    color: var(--e-global-color-text) !important;
    background-color: transparent !important;
    border-radius: 6px !important;
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    min-height: 26px !important;
    max-width: 26px !important;
    max-height: 26px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    opacity: 0.3 !important;
    transition: all 0.3s ease !important;
}

#file-manager .fm-table-action-btn i {
    font-size: 12px !important;
}

#file-manager .fm-table-action-btn:hover {
    opacity: 0.9 !important;
}

#file-manager .fm-table-action-btn.delete:hover {
    border: 1px solid #a01414 !important;
    background-color: #a01414 !important;
}

/* Custom Checkbox */
.fm-checkbox-wrapper {
    display: block;
    position: relative;
    cursor: pointer;
}

.fm-checkbox-wrapper input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.fm-checkbox-custom {
    display: block;
    width: 20px;
    height: 20px;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    transition: all 0.2s ease;
}

.fm-checkbox-wrapper:hover .fm-checkbox-custom {
    border-color: rgba(255, 255, 255, 0.4);
}

.fm-checkbox-wrapper input:checked ~ .fm-checkbox-custom {
    background: var(--e-global-color-primary);
    border-color: var(--e-global-color-primary);
}

.fm-checkbox-wrapper input:checked ~ .fm-checkbox-custom::after {
    content: '\2714';
    display: block;
    color: #fff;
    font-size: 12px;
    text-align: center;
    line-height: 16px;
}

/* Empty State */
.fm-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    text-align: center;
}

.fm-empty-illustration {
    position: relative;
    margin-bottom: 30px;
}

.fm-empty-folder {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--e-global-color-21278c2);
    border-radius: 30px;
}

.fm-empty-folder i {
    font-size: 56px;
    color: rgba(255, 255, 255, 0.2);
}

.fm-empty-sparkles {
    display: none;
}

.fm-empty-state h5 {
    margin: 0 0 10px;
    font-family: 'Lufga', sans-serif;
    font-size: 22px;
    font-weight: 600;
}

.fm-empty-state p {
    margin: 0 0 30px;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    max-width: 320px;
}

.fm-empty-actions {
    display: flex;
    gap: 12px;
}

/* Loading State */
.fm-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    gap: 16px;
}

.fm-loading-spinner {
    width: 60px;
    aspect-ratio: 2;
    --_g: no-repeat radial-gradient(circle closest-side,var(--e-global-color-primary) 90%, transparent);
    background: 
      var(--_g) 0%   50%,
      var(--_g) 50%  50%,
      var(--_g) 100% 50%;
    background-size: calc(100%/3) 50%;
    animation: fmLoader 1s infinite linear;
}

@keyframes fmLoader {
    20%{background-position:0%   0%, 50%  50%,100%  50%}
    40%{background-position:0% 100%, 50%   0%,100%  50%}
    60%{background-position:0%  50%, 50% 100%,100%   0%}
    80%{background-position:0%  50%, 50%  50%,100% 100%}
}

.fm-loading-state span {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

/* Preview Panel */
.fm-preview-panel {
    width: 340px;
    min-width: 340px;
    background: rgba(0, 0, 0, 0.15);
    border-left: 2px solid var(--e-global-color-04fbcb9);
    transition: all 0.35s ease;
    position: relative;
}

.fm-preview-panel:not(.visible) {
    width: 0;
    min-width: 0;
    opacity: 0;
    overflow: hidden;
}

.fm-preview-inner {
    display: flex;
    flex-direction: column;
    transition: none;
}

#file-manager .fm-preview-inner.is-sticky {
    max-height: 100vh !important;
    z-index: 1000 !important;
    overflow-y: auto;
}

#file-manager .fm-preview-inner.is-stuck-bottom {
    position: absolute !important;
    bottom: 0 !important;
    top: auto !important;
    right: 0 !important;
    left: auto !important;
    width: 340px !important;
    max-height: 100vh;
    background: var(--e-global-color-7459678) !important;
}

.fm-preview-panel.visible {
    opacity: 1;
}

.fm-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid var(--e-global-color-04fbcb9);
    height: 64px;
}

.fm-preview-header h6 {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.4);
}

#file-manager .fm-preview-close {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    border-radius: 8px !important;
    color: rgba(255, 255, 255, 0.4) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

#file-manager .fm-preview-close i {
    font-size: 14px !important;
}

#file-manager .fm-preview-close:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--e-global-color-text) !important;
}

.fm-preview-content {
    flex: 1;
    padding: 24px 22px;
    overflow-y: auto;
}

.fm-preview-content::-webkit-scrollbar {
    width: 5px;
}

.fm-preview-content::-webkit-scrollbar-track {
    background: transparent;
}

.fm-preview-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

/* Preview Empty State */
.fm-preview-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 40px 30px;
    text-align: center;
}

.fm-preview-empty-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px dashed var(--e-global-color-04fbcb9);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.fm-preview-empty-icon i {
    font-size: 32px;
    color: rgba(255, 255, 255, 0.2);
}

.fm-preview-empty h6 {
    margin: 0 0 8px 0;
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
}

.fm-preview-empty p {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.35);
    line-height: 1.5;
}

.fm-preview-visual {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.fm-preview-icon {
    width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 20px;
    border: 1px solid var(--e-global-color-04fbcb9);
}

.fm-preview-icon i {
    font-size: 64px;
}

.fm-preview-title-section {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.fm-preview-title-section h5 {
    flex: 1;
    margin: 0;
    font-family: 'Lufga', sans-serif;
    font-size: 18px;
    font-weight: 600;
    word-break: break-word;
    line-height: 1.4;
}

#file-manager .fm-star-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: 1px solid var(--e-global-color-04fbcb9) !important;
    border-radius: 8px !important;
    color: rgba(255, 255, 255, 0.4) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
}

#file-manager .fm-star-btn i {
    font-size: 14px !important;
}

#file-manager .fm-star-btn:hover {
    border-color: var(--e-global-color-secondary) !important;
    color: var(--e-global-color-secondary) !important;
    background: transparent !important;
}

#file-manager .fm-star-btn.starred {
    background: rgba(255, 193, 7, 0.2) !important;
    border-color: #FFC107 !important;
    color: #FFC107 !important;
}

.fm-preview-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.fm-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-family: 'Lufga', sans-serif;
    font-size: 11px;
    font-weight: 600;
}

.fm-badge-type {
    background: rgba(229, 37, 42, 0.12);
    color: #E5252A;
}

.fm-badge-size {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
}

.fm-preview-meta {
    margin-bottom: 28px;
}

.fm-preview-meta-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--e-global-color-04fbcb9);
}

.fm-preview-meta-item:last-child {
    border-bottom: none;
}

.fm-meta-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--e-global-color-21278c2);
    border-radius: 10px;
    flex-shrink: 0;
}

.fm-meta-icon i {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

.fm-meta-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fm-meta-content .label {
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: rgba(255, 255, 255, 0.4);
}

.fm-meta-content .value {
    font-family: 'Lufga', sans-serif;
    font-size: 14px;
    font-weight: 500;
}

.fm-preview-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fm-preview-actions-row {
    display: flex;
    gap: 10px;
}

.fm-preview-actions-row .fm-btn {
    flex: 1;
}

/* Context Menu */
.fm-context-menu {
    position: fixed;
    background: var(--e-global-color-7459678);
    border: 1px solid var(--e-global-color-04fbcb9);
    border-radius: 15px;
    padding: 8px;
    min-width: 200px;
    box-shadow: rgba(32, 34, 44, 1) 0px 7px 29px 0px,
                rgba(0, 0, 0, 0.3) 0px 3px 10px;
    z-index: 10000;
    display: none;
}

.fm-context-menu.visible {
    display: block;
}

.fm-context-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.fm-context-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--e-global-color-text);
}

.fm-context-item i {
    font-size: 15px;
    width: 20px;
    text-align: center;
    opacity: 0.6;
}

.fm-context-danger {
    color: rgb(133, 41, 41);
}

.fm-context-danger:hover {
    background: rgba(133, 41, 41, 0.15);
    color: #ff6b6b;
}

.fm-context-divider {
    height: 1px;
    background: var(--e-global-color-04fbcb9);
    margin: 6px 8px;
}

/* File Upload Hint */
.file-upload-hint {
    display: block;
    margin-top: 8px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
}

#custom-text {
    display: block;
    max-width: 100%;
    word-wrap: break-word;
}

#custom-text small {
    display: block;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
    max-height: 60px;
    overflow-y: auto;
}

/* Responsive */
@media screen and (max-width: 1400px) {
    .fm-preview-panel {
        width: 300px;
        min-width: 300px;
    }
}

@media screen and (max-width: 1200px) {
    .fm-sidebar {
        width: 260px;
        min-width: 260px;
    }
    .fm-header-stats {
        gap: 14px;
    }
    .fm-stat {
        padding: 12px 16px;
    }
    .fm-stat-storage {
        min-width: 160px;
    }
}

@media screen and (max-width: 992px) {
    .fm-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding: 24px;
    }
    .fm-logo {
        justify-content: center;
    }
    .fm-header-stats {
        flex-wrap: wrap;
        justify-content: center;
    }
    .fm-toolbar {
        flex-direction: column;
        gap: 14px;
        padding: 16px 24px;
    }
    .fm-toolbar-left,
    .fm-toolbar-right {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    .fm-search-box {
        min-width: 100%;
    }
    .fm-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 1000;
        background: var(--e-global-color-7459678);
        box-shadow: 4px 0 30px rgba(0, 0, 0, 0.4);
        transform: translateX(-100%);
    }
    .fm-sidebar.visible {
        transform: translateX(0);
    }
    .fm-preview-panel {
        position: fixed;
        right: 0;
        top: 0;
        bottom: 0;
        z-index: 1000;
        background: var(--e-global-color-7459678);
        width: 100%;
        max-width: 360px;
    }
    .fm-content {
        padding: 0 20px 20px;
    }
    .fm-breadcrumb,
    .fm-dropzone,
    .fm-subfolders {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* ==============================================
   SELECTED FILES LIST (Upload Dialog)
   ============================================== */
.selected-files-list {
    margin-top: 12px;
    max-height: 200px;
    overflow-y: auto;
    border-radius: 12px;
}

.selected-files-list:empty {
    display: none;
}

.selected-file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.selected-file-item:last-child {
    margin-bottom: 0;
}

.selected-file-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

.selected-file-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--e-global-color-04fbcb9);
    border-radius: 8px;
}

.selected-file-icon i {
    color: var(--e-global-color-primary);
    font-size: 18px;
}

.selected-file-icon i::before {
    font-size: 18px !important;
}

.selected-file-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.selected-file-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--e-global-color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.selected-file-meta {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.selected-file-remove {
    flex-shrink: 0 !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    color: rgba(255, 255, 255, 0.4) !important;
    cursor: pointer !important;
    transition: color 0.2s ease !important;
    box-shadow: none !important;
    outline: none !important;
}

.selected-file-remove:hover {
    background: transparent !important;
    border: none !important;
    color: var(--e-global-color-secondary) !important;
}

.selected-file-remove:focus {
    outline: none !important;
    box-shadow: none !important;
}

.selected-file-remove i {
    line-height: 1 !important;
}

.selected-file-remove i::before {
    font-size: 14px !important;
}

/* Upload area con file selezionati */
.file-upload-custom.has-files {
    border-style: solid;
    border-color: var(--e-global-color-primary);
    background: rgba(74, 144, 226, 0.05);
}

.file-upload-custom.has-files .file-upload-icon {
    transform: scale(0.9);
}

.file-upload-custom.has-files .file-upload-icon i {
    color: var(--e-global-color-primary);
}

@media screen and (max-width: 768px) {
    .fm-files-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
    .fm-file-card-preview {
        height: 100px;
    }
    .fm-file-card-preview i {
        font-size: 42px;
    }
    .fm-subfolder-card {
        min-width: 150px;
        padding: 12px 16px;
    }
    .fm-subfolder-card i {
        font-size: 22px;
    }
}
