﻿/* ============================================
   VFS (Virtual File System) Browser Styles
   ============================================

   Centralizzazione degli stili per i componenti VFS:
   - c/vfs/browser.vue (main file browser component)
   - c/vfs/treenode.vue (tree navigation)
   - c/vfs/image_builder.vue (image builder tool)

   Data: 2026-02-21
   Righe estratte: 1084 (da <style scoped>)
   Classi -sm rimosse: 2 (form-control-sm, btn-sm)
   ============================================ */

    .vfs-root {
        display: flex;
        height: 100%;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        font-size: 13px;
        color: #1f2937;
        background: #fafbfc;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    /* VFS Form Controls - Design Premium */
    .vfs-root .form-control,
    .vfs-root .form-select {
        padding: 0.5rem 0.875rem;
        font-size: 0.8125rem;
        line-height: 1.5;
        border-radius: 0.5rem;
        border: 1px solid #e5e7eb;
        background: #ffffff;
        color: #1f2937;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    }

    .vfs-root .form-control:hover {
        border-color: #d1d5db;
    }

    .vfs-root .form-control:focus,
    .vfs-root .form-select:focus {
        border-color: #3b82f6;
        background: #ffffff;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.05);
        outline: none;
    }

    .vfs-root .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
        font-weight: 500;
        line-height: 1.5;
        border-radius: 0.5rem;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    }

    .vfs-root .btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    }

    .vfs-root .btn:active {
        transform: translateY(0);
        box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    }

    .vfs-root .btn-sm {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }

    /* SIDEBAR */
    .vfs-sidebar {
        width: 240px;
        border-right: 1px solid #e5e7eb;
        padding: 0px;
        box-sizing: border-box;
        background: #ffffff;
        box-shadow: inset -1px 0 0 0 rgba(0, 0, 0, 0.05);
    }

    .vfs-tree {
        margin-top: 10px;
        font-size: 13px;
        padding: 4px 4px 8px 4px;
    }

    .vfs-tree-drive-icon {
        margin-right: 6px;
        color: #111827;
        font-size: 13px;
    }

    .vfs-tree-drive + .vfs-tree-drive {
        margin-top: 4px;
    }

    .vfs-tree-root {
        display: block;
    }

    /* MAIN */
    .vfs-main {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-width: 0;
        background: #fff;
        box-shadow: -2px 0 6px rgba(15, 23, 42, 0.05);
    }

    /* TOP BAR */
    .vfs-topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #e5e7eb;
        background: #ffffff;
        min-height: 56px;
        box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    }

    .vfs-breadcrumb {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 2px;
    }

    .vfs-bc-wrapper {
        display: inline-flex;
        align-items: center;
    }

    .vfs-bc-item {
        font-weight: 500;
    }

    .vfs-bc-drive {
        padding: 0.375rem 0.75rem;
        border-radius: 0.375rem;
        background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
        color: #ffffff;
        font-size: 0.75rem;
        font-weight: 600;
        letter-spacing: 0.025em;
        box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    }

    .vfs-bc-clickable {
        cursor: pointer;
    }

        .vfs-bc-clickable:hover {
            text-decoration: underline;
        }

    .vfs-bc-sep {
        margin: 0 4px;
        color: #9ca3af;
    }

    /* TOPBAR RIGHT */
    .vfs-topbar-right {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    /* BADGE SELEZIONE */
    .vfs-selection-badge {
        display: inline-flex;
        align-items: center;
        gap: 0.375rem;
        padding: 0.375rem 0.75rem;
        border-radius: 0.5rem;
        background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
        color: #0c4a6e;
        font-size: 0.75rem;
        font-weight: 600;
        border: 1px solid #7dd3fc;
        height: 32px;
        box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    }

        .vfs-selection-badge i {
            font-size: 0.75rem;
        }

    .vfs-selection-badge-multi {
        background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
        border-color: #86efac;
        color: #14532d;
    }

    /* AREA SALVATAGGIO */
    .vfs-savebox {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        background: #ffffff;
        border-radius: 0.5rem;
        padding: 0.375rem 0.75rem;
        border: 1px solid #e5e7eb;
        box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
        height: 38px;
    }

    .vfs-savebox-input {
        border: none;
        outline: none;
        background: transparent;
        font-size: 0.8125rem;
        min-width: 180px;
        color: #1f2937;
    }

    .vfs-savebox-input::placeholder {
        color: #9ca3af;
    }

    .vfs-savebox-input:focus {
        outline: none;
    }

    .vfs-savebox-btn {
        border: none;
        background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
        color: #ffffff;
        border-radius: 0.375rem;
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
        font-weight: 600;
        display: inline-flex;
        align-items: center;
        gap: 0.25rem;
        cursor: pointer;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    }

        .vfs-savebox-btn:hover {
            background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
            transform: translateY(-1px);
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
        }

        .vfs-savebox-btn:active {
            transform: translateY(0);
            box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
        }

        .vfs-savebox-btn i {
            font-size: 0.75rem;
        }

    /* MENU AZIONI */
    .vfs-actions-wrapper {
        position: relative;
    }

    .vfs-actions-btn {
        border: none;
        background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
        color: #ffffff;
        border-radius: 0.5rem;
        padding: 0.5rem 1rem;
        height: 36px;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.375rem;
        font-size: 0.8125rem;
        font-weight: 600;
        box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }

        .vfs-actions-btn > i {
            color: #fff;
            font-size: 0.875rem;
        }

        .vfs-actions-btn:hover {
            background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
            transform: translateY(-1px);
        }

        .vfs-actions-btn:active {
            transform: translateY(0);
            box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
        }

    .vfs-actions-menu {
        position: absolute;
        right: 0;
        margin-top: 4px;
        min-width: 190px;
        background: #ffffff;
        border-radius: 8px;
        box-shadow: 0 10px 25px rgba(15, 23, 42, 0.18);
        border: 1px solid #e5e7eb;
        padding: 4px 0;
        z-index: 40;
        animation: vfs-menu-fade 80ms ease-out;
    }

    /* View toggle */
    .vfs-view-toggle {
        display: inline-flex;
        border: 1px solid #e5e7eb;
        border-radius: 0.5rem;
        overflow: hidden;
        background: #f9fafb;
        box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
        height: 36px;
    }

    .vfs-view-btn {
        padding: 0.5rem 0.75rem;
        border: none;
        background: transparent;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 36px;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
    }

        .vfs-view-btn > i {
            font-size: 0.875rem;
            color: #6b7280;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .vfs-view-btn:hover {
            background: #ffffff;
        }

        .vfs-view-btn:hover > i {
            color: #374151;
        }

        .vfs-view-btn + .vfs-view-btn {
            border-left: 1px solid #e5e7eb;
        }

        .vfs-view-btn.active {
            background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
            box-shadow: inset 0 1px 2px 0 rgba(0, 0, 0, 0.05);
        }

        .vfs-view-btn.active > i {
            color: #ffffff;
        }

    /* CONTENT */
    .vfs-content {
        position: relative;
        flex: 1;
        padding: 10px 12px;
        overflow: auto;
        max-height: calc(100vh - 300px);
        min-height: calc(100vh - 300px);
    }

    .vfs-state {
        padding: 8px 10px;
        color: #6b7280;
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 6px;
        border-radius: 6px;
        background: #fef3c7;
        border: 1px solid #fde68a;
    }

    .vfs-state-icon {
        font-size: 16px;
    }

    .vfs-state-error {
        color: #b91c1c;
        background: #fee2e2;
        border-color: #fecaca;
    }

    /* Loading overlay */
    .vfs-loading-overlay {
        position: absolute;
        inset: 0;
        background: rgba(255, 255, 255, 0.6);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10;
        pointer-events: all;
    }

    .vfs-loading-box {
        padding: 10px 14px;
        border-radius: 8px;
        background: #ffffff;
        border: 1px solid #d1d5db;
        display: flex;
        align-items: center;
        gap: 8px;
        box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
        color: #374151;
    }

    /* Upload bar */
    .vfs-upload-bar {
        margin-bottom: 8px;
        padding: 6px 8px;
        border-radius: 8px;
        background: #eff6ff;
        border: 1px solid #bfdbfe;
        box-shadow: 0 1px 3px rgba(37, 99, 235, 0.12);
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        grid-template-areas:
            "info abort"
            "extra abort"
            "progress progress";
        gap: 2px 8px;
        align-items: center;
    }

    .vfs-upload-info {
        grid-area: info;
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 12px;
        margin-bottom: 2px;
        color: #1d4ed8;
        flex-wrap: wrap;
    }

        .vfs-upload-info i {
            font-size: 13px;
        }

    .vfs-upload-extra {
        grid-area: extra;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        font-size: 11px;
        color: #1f2937;
        margin-bottom: 4px;
    }

    .vfs-upload-extra-sep {
        color: #9ca3af;
    }

    .vfs-upload-progress {
        grid-area: progress;
        width: 100%;
        height: 4px;
        border-radius: 999px;
        background: #dbeafe;
        overflow: hidden;
        margin-top: 2px;
    }

    .vfs-upload-progress-inner {
        height: 100%;
        border-radius: 999px;
        background: #2563eb;
        transition: width 0.12s linear;
    }

    .vfs-upload-abort-btn {
        grid-area: abort;
        border: none;
        background: transparent;
        display: inline-flex;
        align-items: center;
        gap: 4px;
        font-size: 11px;
        color: #991b1b;
        cursor: pointer;
        padding: 2px 6px;
        border-radius: 999px;
    }

        .vfs-upload-abort-btn:hover {
            background: rgba(248, 113, 113, 0.12);
        }

        .vfs-upload-abort-btn i {
            font-size: 11px;
        }

    /* LIST VIEW */
    .vfs-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 0.8125rem;
        background: #ffffff;
        border-radius: 0.75rem;
        overflow: hidden;
        box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
        border: 1px solid #e5e7eb;
    }

        .vfs-table thead {
            background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
            border-bottom: 2px solid #e5e7eb;
        }

        .vfs-table th {
            padding: 0.375rem 0.75rem;
            text-align: left;
            font-weight: 600;
            color: #374151;
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .vfs-table td {
            padding: 0.375rem 0.75rem;
            border-bottom: 1px solid #f3f4f6;
            color: #1f2937;
        }

            .vfs-table th > span,
            .vfs-table td > span {
                cursor: default;
            }

            .vfs-table th.vfs-th-sortable {
                cursor: pointer;
                user-select: none;
                white-space: nowrap;
            }

    .vfs-sort-icon {
        margin-left: 6px;
        opacity: 0.75;
        font-size: 12px;
    }

    .vfs-col-name {
        width: auto;
    }

    .vfs-col-size {
        width: 110px;
    }

    .vfs-col-date {
        width: 120px;
    }

    .vfs-col-actions {
        width: 10%;
        text-align: right;
    }

    .vfs-row {
        cursor: default;
        transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    }

        .vfs-row:hover {
            background-color: #f9fafb;
        }

        .vfs-row:last-child td {
            border-bottom: none;
        }

    .vfs-row-selected {
        position: relative;
        background: linear-gradient(90deg, #eff6ff 0%, #dbeafe 100%);
        box-shadow: inset 4px 0 0 #2563eb;
    }

        .vfs-row-selected > td {
            background: linear-gradient(90deg, #eff6ff 0%, #dbeafe 100%);
            color: #0f172a;
            font-weight: 600;
        }

        .vfs-row-selected > td:first-child {
            box-shadow: inset 4px 0 0 #2563eb;
        }

        .vfs-row-selected:hover {
            background: linear-gradient(90deg, #dbeafe 0%, #bfdbfe 100%);
        }

        .vfs-row-selected:hover > td {
            background: linear-gradient(90deg, #dbeafe 0%, #bfdbfe 100%);
        }

    /* Cells */
    .vfs-cell-name {
        display: flex;
        align-items: center;
        gap: 8px;
        cursor: pointer;
        min-width: 0;
    }

    .vfs-cell-name > span {
        cursor: pointer !important;
    }

    .vfs-cell-actions {
        text-align: right !important;
        display: inline-block;
        width: 120px;
    }

    .vfs-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .vfs-cell-date{
        width:160px;
    }
    .vfs-title {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 550px;
        min-width: 0;
        line-height: 1.2;
    }

    .vfs-fa-icon {
        font-size: 1.5rem !important;
    }

    .vfs-fa-folder {
        color: #f59e0b;
        font-size: 1.5rem !important;
    }

    /* Pulsante azioni speciali (tabella + griglia) */
    .vfs-item-actions-btn {
        border: none;
        background: #e5e7eb;
        color: #4b5563;
        border-radius: 999px;
        width: 24px;
        height: 24px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        padding: 0;
        font-size: 12px;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
        transition: background 100ms ease, box-shadow 100ms ease, transform 60ms ease;
    }

        .vfs-item-actions-btn:hover {
            background: #d1d5db;
            box-shadow: 0 2px 4px rgba(15, 23, 42, 0.16);
            transform: translateY(-1px);
        }

        .vfs-item-actions-btn:active {
            transform: translateY(0);
            box-shadow: 0 0 0 rgba(15, 23, 42, 0.16);
        }

    /* GRID VIEW */
    .vfs-gridview {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        padding-top: 4px;
    }

    .vfs-card {
        position: relative;
        width: 150px;
        height: 150px;
        border-radius: 0.75rem;
        border: 1px solid #e5e7eb;
        background: #ffffff;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        cursor: default;
        box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        overflow: hidden;
    }

        .vfs-card:hover {
            border-color: #d1d5db;
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
            transform: translateY(-2px);
            cursor: pointer;
        }

    .vfs-card-selected {
        border-color: #3b82f6;
        background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
        box-shadow:
            0 0 0 3px rgba(37, 99, 235, 0.18),
            0 0 0 6px rgba(59, 130, 246, 0.08),
            0 12px 24px rgba(37, 99, 235, 0.12),
            0 1px 3px 0 rgba(0, 0, 0, 0.1);
        transform: translateY(-1px);
    }

        .vfs-card-selected:hover {
            border-color: #1d4ed8;
            box-shadow:
                0 0 0 3px rgba(37, 99, 235, 0.22),
                0 0 0 7px rgba(59, 130, 246, 0.12),
                0 14px 28px rgba(37, 99, 235, 0.16),
                0 1px 3px 0 rgba(0, 0, 0, 0.12);
        }

    .vfs-card-selected .vfs-card-name,
    .vfs-card-selected .vfs-card-icon i {
        color: #1d4ed8;
    }

    .vfs-card-icon {
        width: 100%;
        height: 90px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 6px;
    }

    .vfs-card-icon-has-thumb {
        padding: 4px;
    }

    .vfs-card-icon i {
        font-size: 36px;
    }

    .vfs-card-thumb {
        width: 100%;
        height: 100%;
        /*border-radius: 10px;*/
        object-fit: cover;
        /*box-shadow: 0 1px 3px rgba(15, 23, 42, 0.15);*/
    }

    .vfs-card-name {
        max-width: 130px;
        text-align: center;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-weight: 500;
        color: #111827;
    }

    /* Pulsante azioni sulla card */
    .vfs-card-actions {
        position: absolute;
        top: 6px;
        right: 6px;
        z-index: 5;
    }

    /* MENU AZIONI SPECIALI (build_image, ecc.) */
    .vfs-special-menu {
        position: fixed;
        z-index: 55;
        min-width: 160px;
        background: #ffffff;
        border-radius: 8px;
        box-shadow: 0 10px 25px rgba(15, 23, 42, 0.25);
        border: 1px solid #e5e7eb;
        padding: 4px 0;
        animation: vfs-menu-fade 80ms ease-out;
        backdrop-filter: blur(4px);
    }

    .vfs-special-menu-item {
        padding: 6px 10px;
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 13px;
        cursor: pointer;
    }

        .vfs-special-menu-item i {
            width: 16px;
            text-align: center;
            opacity: 0.9;
        }

        .vfs-special-menu-item:hover {
            background: #eff6ff;
        }


    .vfs-link-btn {
        border: none;
        background: transparent;
        padding: 4px 6px;
        cursor: pointer;
        border-radius: 4px;
        font-size: 14px;
        margin-right: 4px;
    }

        .vfs-link-btn:hover {
            background: rgba(0,0,0,0.08);
        }

    .vfs-link-permanent i {
        color: #1a73e8; /* blu link permanente */
    }

    .vfs-link-dynamic i {
        color: #e67e22; /* arancione dinamico */
    }


    .vfs-card-link-btn {
        position: absolute;
        top: 4px;
        right: 32px; /* uno si posiziona qui */
        z-index: 10;
        border: none;
        background: rgba(255,255,255,0.85);
        padding: 4px 6px;
        border-radius: 4px;
        cursor: pointer;
        font-size: 13px;
    }

        .vfs-card-link-btn:hover {
            background: rgba(255,255,255,1);
        }

    .vfs-card-link-permanent {
        right: 32px;
    }

    .vfs-card-link-dynamic {
        right: 4px;
    }

    .vfs-card-link-permanent i {
        color: #1a73e8;
    }

    .vfs-card-link-dynamic i {
        color: #e67e22;
    }



    /* Pulsantino azioni speciali */
    .vfs-special-btn, .vfs-card-special-btn {
        width: 24px;
        height: 24px;
        border: none;
        outline: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        padding: 0;
        margin: 0;
        transition: background 0.12s ease, box-shadow 0.12s ease;
        box-shadow: 0 1px 4px rgba(37,99,235,0.35);
        border-radius: 3px;
        margin-right: 5px;
    }

        .vfs-special-btn i, .vfs-card-special-btn i {
            font-size: 12px;
            color: #000;
        }


        .vfs-special-btn:active, .vfs-card-special-btn:active {
            transform: scale(0.95);
        }

    /*    .vfs-card-special-btn {
        position: absolute;
        right: 8px;
        top: 24px;
    }*/

    /* VFS Toolbar */
    .vfs-toolbar {
        padding: 0.75rem 12px;
        background: #ffffff;
        border-bottom: 1px solid #e5e7eb;
    }

    .vfs-search {
        position: relative;
    }

    .vfs-search .form-control {
        padding: 0.5rem 2.75rem 0.5rem 1rem;
        height: 34px;
        background: #f9fafb;
        border: 1px solid #e5e7eb;
        border-radius: 0.5rem;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    }

    .vfs-search .form-control::placeholder {
        color: #9ca3af;
    }

    .vfs-search .form-control:hover {
        border-color: #d1d5db;
    }

    .vfs-search .form-control:focus {
        background: #ffffff;
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    }

    .vfs-toolbar .btn {
        height: 34px;
        min-width: 34px;
        padding: 0 1rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 0.875rem;
        line-height: 1;
        border-radius: 0.5rem;
    }

    .vfs-toolbar .btn-outline-secondary {
        border-color: #e5e7eb;
        color: #6b7280;
        background: #f9fafb;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .vfs-toolbar .btn-outline-secondary:hover {
        background: #fee2e2;
        border-color: #fecaca;
        color: #dc2626;
        transform: translateY(-1px);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    }

    .vfs-toolbar .btn-outline-secondary:active {
        transform: translateY(0);
        box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    }

    /* CONTEXT MENU */
    .vfs-context-menu {
        position: fixed;
        z-index: 50;
        min-width: 220px;
        background: #ffffff;
        border-radius: 0.625rem;
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        border: 1px solid #e5e7eb;
        padding: 0.375rem;
        animation: vfs-menu-fade 150ms cubic-bezier(0.4, 0, 0.2, 1);
        backdrop-filter: blur(8px);
    }

    .vfs-context-item {
        padding: 0.5rem 0.75rem;
        display: flex;
        align-items: center;
        gap: 0.625rem;
        font-size: 0.8125rem;
        cursor: pointer;
        border-radius: 0.375rem;
        transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
        color: #374151;
    }

        .vfs-context-item i {
            width: 1rem;
            text-align: center;
            color: #6b7280;
            transition: color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .vfs-context-item:hover {
            background: #f3f4f6;
        }

        .vfs-context-item:hover i {
            color: #374151;
        }

    .vfs-context-shortcut {
        margin-left: auto;
        font-size: 11px;
        color: #9ca3af;
    }

    .vfs-context-separator {
        height: 1px;
        background: #e5e7eb;
        margin: 4px 0;
    }

    .vfs-context-disabled {
        opacity: 0.5;
        cursor: default;
    }

        .vfs-context-disabled:hover {
            background: transparent;
        }

    .vfs-context-danger {
        color: #b91c1c;
    }

        .vfs-context-danger i {
            color: #b91c1c;
        }

    /* HEADER DEL CONTEXT MENU */
    .vfs-context-header {
        padding: 6px 10px 4px 10px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .vfs-context-header-icon i {
        width: 18px;
        text-align: center;
    }

    .vfs-context-header-name {
        font-weight: 600;
        font-size: 13px;
        max-width: 210px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* TREE VIEW (sidebar) */
    .vfs-tree-node {
        margin-left: 0;
    }

    .vfs-tree-children {
        margin-left: 14px;
        border-left: 1px dashed #e5e7eb;
        padding-left: 6px;
        margin-top: 2px;
    }

    .vfs-tree-row {
        display: flex;
        align-items: center;
        padding: 0.375rem 0.5rem;
        margin: 0.125rem 0.25rem;
        border-radius: 0.375rem;
        cursor: pointer;
        transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    }

        .vfs-tree-row:hover {
            background: #f3f4f6;
        }

        .vfs-tree-row.is-current {
            background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
            color: #1e40af;
            font-weight: 600;
            box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.2);
        }

        .vfs-tree-row.is-current:hover {
            background: linear-gradient(135deg, #bfdbfe 0%, #93c5fd 100%);
        }

    .vfs-tree-expander {
        width: 14px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-right: 2px;
        color: #6b7280;
        font-size: 11px;
    }

    .vfs-tree-expander-placeholder {
        width: 14px;
        margin-right: 2px;
    }

    .vfs-tree-folder-icon {
        margin-right: 6px;
        color: #2563eb;
        font-size: 13px;
    }

    .vfs-tree-label {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* SUBMENU CONTEXT (New object...) */
    .vfs-context-has-submenu {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .vfs-context-label {
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

    .vfs-context-submenu-arrow {
        font-size: 10px;
        color: #9ca3af;
    }

    .vfs-context-submenu {
        position: absolute;
        top: 0;
        left: 98%;
        margin-left: 4px;
        min-width: 230px;
        background: #ffffff;
        border-radius: 8px;
        box-shadow: 0 10px 25px rgba(15, 23, 42, 0.25);
        border: 1px solid #e5e7eb;
        padding: 4px 0;
        display: none;
        z-index: 60;
    }

    /* Flip a sinistra quando il menu parent e' troppo vicino al bordo destro
       della viewport (pagine full-page tipo sysadmin VFS). Applicato via
       v-bind class :class="{ 'vfs-context-submenu--flip': submenuOpensLeft }". */
    .vfs-context-submenu.vfs-context-submenu--flip {
        left: auto;
        right: 98%;
        margin-left: 0;
        margin-right: 4px;
    }

    /* Group label + separator dentro al submenu "nuovo oggetto" */
    .vfs-context-submenu .vfs-context-group-label {
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: #94a3b8;
        padding: 6px 12px 4px;
        user-select: none;
    }

    .vfs-context-submenu .vfs-context-group-label + .vfs-context-group-label {
        margin-top: 4px;
    }

    .vfs-context-has-submenu:hover > .vfs-context-submenu {
        display: block;
    }

    /* MODALI */
    .vfs-modal-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.35);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 60;
    }

    .vfs-modal {
        width: 400px;
        max-width: 90%;
        background: #ffffff;
        border-radius: 0.75rem;
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        overflow: hidden;
        border: 1px solid #e5e7eb;
        animation: vfs-modal-appear 200ms cubic-bezier(0.4, 0, 0.2, 1);
    }

    @keyframes vfs-modal-appear {
        from {
            opacity: 0;
            transform: scale(0.95) translateY(-10px);
        }
        to {
            opacity: 1;
            transform: scale(1) translateY(0);
        }
    }

    .vfs-modal-header {
        padding: 1rem 1.25rem;
        border-bottom: 1px solid #e5e7eb;
        font-weight: 600;
        font-size: 0.9375rem;
        background: linear-gradient(180deg, #fafbfc 0%, #f9fafb 100%);
        color: #111827;
    }

    .vfs-modal-header-danger {
        background: #fef2f2;
        border-bottom-color: #fecaca;
        color: #b91c1c;
    }

    .vfs-modal-body {
        padding: 1.25rem;
        font-size: 0.875rem;
        color: #374151;
    }

    .vfs-modal-label {
        display: block;
        margin-bottom: 6px;
        font-weight: 500;
    }

    .vfs-modal-input {
        width: 100%;
        box-sizing: border-box;
        padding: 7px 10px;
        border-radius: 6px;
        border: 1px solid #d1d5db;
        font-size: 13px;
        outline: none;
        transition: all 0.15s ease;
        background: #f9fafb;
    }

        .vfs-modal-input:focus {
            background: #ffffff;
            border-color: #2563eb;
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
        }

    .vfs-modal-hint {
        margin-top: 6px;
        font-size: 11px;
        color: #6b7280;
        display: flex;
        align-items: center;
        gap: 6px;
        word-break: break-all;
    }

        .vfs-modal-hint i {
            font-size: 12px;
        }

    .vfs-modal-text {
        margin: 0 0 6px 0;
        font-size: 13px;
    }

    .vfs-modal-checkbox {
        margin-top: 8px;
        font-size: 12px;
        color: #374151;
    }

        .vfs-modal-checkbox input {
            margin-right: 5px;
        }

    .vfs-modal-footer {
        padding: 8px 12px;
        border-top: 1px solid #e5e7eb;
        display: flex;
        justify-content: flex-end;
        gap: 6px;
        background: #f9fafb;
    }

    .vfs-btn {
        padding: 0.5rem 1rem;
        border-radius: 0.5rem;
        font-size: 0.875rem;
        border: 1px solid transparent;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        gap: 0.375rem;
        font-weight: 500;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    }

    .vfs-btn-primary {
        background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
        color: #ffffff;
    }

        .vfs-btn-primary:hover {
            background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
            transform: translateY(-1px);
        }

        .vfs-btn-primary:active {
            transform: translateY(0);
            box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
        }

    .vfs-btn-secondary {
        background: #ffffff;
        color: #374151;
        border-color: #d1d5db;
    }

        .vfs-btn-secondary:hover {
            background: #f9fafb;
            border-color: #9ca3af;
        }

    .vfs-btn-danger {
        background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
        color: #ffffff;
    }

        .vfs-btn-danger:hover {
            background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
            transform: translateY(-1px);
        }

        .vfs-btn-danger:active {
            transform: translateY(0);
            box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
        }

    /* Animazioni */
    @keyframes vfs-menu-fade {
        from {
            opacity: 0;
            transform: translateY(-2px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .vfs-hidden-file-input {
        position: absolute;
        input .value = null;
        left: -9999px;
        top: 0;
        width: 1px;
        height: 1px;
        opacity: 0;
        pointer-events: none;
    }

