.sfm1-app {
    display: flex;
    height: 100vh;
    width: 100vw;
    background: rgba(255, 255, 255, 0.95);
}

/* Левая колонка - 200px */
.sfm1-sidebar {
    width: 200px;
    background: linear-gradient(180deg, #2d3748 0%, #1a202c 100%);
    color: white;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
}

.sfm1-logo {
    padding: 24px 16px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sfm1-logo h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.sfm1-logo span {
    font-size: 11px;
    opacity: 0.6;
}

.sfm1-nav {
    flex: 1;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sfm1-nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 10px 0;
}

.sfm1-nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 12px 16px;
    border-radius: 10px;
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-weight: 500;
}

.sfm1-nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(4px);
}

.sfm1-btn-start {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    font-weight: bold;
    font-size: 16px;
    text-align: center;
}

.sfm1-sidebar-footer {
    padding: 20px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    opacity: 0.7;
}

/* Правая колонка - основное содержимое */
.sfm1-main {
    flex: 1;
    overflow-y: auto;
    background: #f7f9fc;
    padding: 24px;
}

.sfm1-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
}

.sfm1-welcome-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.sfm1-welcome h1 {
    font-size: 32px;
    color: #2d3748;
    margin-bottom: 12px;
}

.sfm1-welcome p {
    color: #718096;
    font-size: 18px;
    margin-bottom: 32px;
}

.sfm1-features {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.sfm1-feature {
    background: white;
    padding: 12px 24px;
    border-radius: 40px;
    color: #667eea;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Файловый менеджер */
.sfm1-fm-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.sfm1-fm-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.sfm1-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.sfm1-breadcrumb-item {
    cursor: pointer;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    transition: all 0.2s;
    font-size: 13px;
}

.sfm1-breadcrumb-item:hover {
    background: rgba(255, 255, 255, 0.3);
}

.sfm1-breadcrumb-sep {
    opacity: 0.6;
}

.sfm1-toolbar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.sfm1-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.sfm1-btn-primary {
    background: #10b981;
    color: white;
}

.sfm1-btn-primary:hover {
    background: #059669;
    transform: translateY(-1px);
}

.sfm1-btn-secondary {
    background: #6c757d;
    color: white;
}

.sfm1-btn-secondary:hover {
    background: #5a6268;
}

.sfm1-btn-danger {
    background: #ef4444;
    color: white;
}

.sfm1-btn-danger:hover {
    background: #dc2626;
}

.sfm1-fm-content {
    padding: 24px;
}

.sfm1-file-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.sfm1-file-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #e9ecef;
}

.sfm1-file-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.sfm1-file-icon {
    font-size: 40px;
    text-align: center;
    margin-bottom: 12px;
}

.sfm1-file-name {
    font-weight: 500;
    text-align: center;
    word-break: break-all;
    margin-bottom: 8px;
    color: #2d3748;
}

.sfm1-file-meta {
    font-size: 11px;
    color: #718096;
    text-align: center;
}

.sfm1-file-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.sfm1-file-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.sfm1-file-action-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* Модальное окно */
.sfm1-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.sfm1-modal-content {
    background: white;
    margin: 10% auto;
    width: 90%;
    max-width: 500px;
    border-radius: 20px;
    animation: sfm1-modalSlideIn 0.3s ease;
}

@keyframes sfm1-modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.sfm1-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sfm1-modal-header h3 {
    font-size: 20px;
    color: #2d3748;
}

.sfm1-modal-close {
    font-size: 28px;
    cursor: pointer;
    color: #adb5bd;
    transition: color 0.2s;
}

.sfm1-modal-close:hover {
    color: #ef4444;
}

.sfm1-modal-body {
    padding: 24px;
    color: #4a5568;
    line-height: 1.6;
}

.sfm1-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Прогресс загрузки */
.sfm1-upload-progress {
    margin-top: 8px;
}

.sfm1-progress-bar {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
}

.sfm1-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s;
}

/* Toast уведомления */
.sfm1-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #2d3748;
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    z-index: 1100;
    display: none;
    animation: sfm1-slideInRight 0.3s ease;
}

@keyframes sfm1-slideInRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .sfm1-sidebar {
        width: 70px;
    }
    
    .sfm1-logo h2, .sfm1-nav-btn span, .sfm1-sidebar-footer {
        display: none;
    }
    
    .sfm1-nav-btn {
        text-align: center;
        font-size: 20px;
        padding: 12px;
    }
    
    .sfm1-file-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

.sfm1-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.sfm1-input:focus {
    outline: none;
    border-color: #667eea;
}

.sfm1-empty {
    text-align: center;
    padding: 60px;
    color: #adb5bd;
}



/* Добавьте эти стили в конец файла css/sfm1-style.css */

/* Информация о текущем маркете */
.sfm1-market-info {
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    display: inline-block;
    backdrop-filter: blur(4px);
}

/* Анимация для кнопок при загрузке */
.sfm1-nav-btn:active {
    transform: scale(0.98);
}

.sfm1-nav-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Улучшенные стили для хлебных крошек */
.sfm1-breadcrumb-item {
    cursor: pointer;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    transition: all 0.2s;
    font-size: 13px;
    display: inline-block;
}

.sfm1-breadcrumb-item:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
}

/* Стили для select в модальном окне */
.sfm1-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.2s;
    background: white;
}

.sfm1-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

select.sfm1-input {
    cursor: pointer;
}

/* Стили для пустого состояния */
.sfm1-empty {
    text-align: center;
    padding: 60px;
    color: #adb5bd;
    font-size: 16px;
}

/* Улучшенные стили для файлов */
.sfm1-file-name {
    font-weight: 500;
    text-align: center;
    word-break: break-all;
    margin-bottom: 8px;
    color: #2d3748;
    font-size: 13px;
}

.sfm1-file-meta {
    font-size: 11px;
    color: #718096;
    text-align: center;
}

/* Анимация загрузки */
@keyframes sfm1-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.sfm1-fm-container.loading {
    animation: sfm1-pulse 1s ease-in-out infinite;
}


/* Добавьте эти стили в конец файла */

/* Стили для кнопок в состоянии загрузки */
.sfm1-nav-btn.loading {
    opacity: 0.6;
    cursor: wait;
    pointer-events: none;
    position: relative;
}

.sfm1-nav-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: sfm1-spin 0.6s linear infinite;
}

@keyframes sfm1-spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Улучшенный код в подсказках */
code {
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
}



/* Добавьте все эти стили в конец файла css/sfm1-style.css */

/* Левая панель с деревом каталогов */
.sfm1-fm-wrapper {
    display: flex;
    gap: 20px;
    min-height: 500px;
}

.sfm1-tree-panel {
    width: 280px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    overflow-y: auto;
    max-height: 70vh;
    border: 1px solid #e9ecef;
}

.sfm1-tree-panel h4 {
    margin-bottom: 16px;
    color: #2d3748;
    font-size: 14px;
    font-weight: 600;
}

.sfm1-tree {
    list-style: none;
    padding-left: 0;
}

.sfm1-tree li {
    list-style: none;
    margin: 4px 0;
}

.sfm1-tree-node {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.sfm1-tree-node:hover {
    background: #e9ecef;
}

.sfm1-tree-node.active {
    background: #667eea;
    color: white;
}

.sfm1-tree-toggle {
    width: 20px;
    cursor: pointer;
    margin-right: 4px;
    user-select: none;
}

.sfm1-tree-icon {
    margin-right: 8px;
    font-size: 16px;
}

.sfm1-tree-label {
    flex: 1;
    font-size: 13px;
}

.sfm1-tree-children {
    padding-left: 24px;
    display: none;
}

.sfm1-tree-children.open {
    display: block;
}

/* Правая панель со списком файлов */
.sfm1-content-panel {
    flex: 1;
    overflow-x: auto;
}

/* Табличное представление файлов */
.sfm1-file-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.sfm1-file-table th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #2d3748;
    border-bottom: 2px solid #e9ecef;
    font-size: 13px;
}

.sfm1-file-table td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.sfm1-file-table tr:hover {
    background: #f8f9fa;
}

.sfm1-file-checkbox {
    width: 30px;
    text-align: center;
}

.sfm1-file-checkbox input {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.sfm1-file-icon {
    width: 40px;
    text-align: center;
    font-size: 24px;
}

.sfm1-file-name-cell {
    cursor: pointer;
    color: #4a5568;
}

.sfm1-file-name-cell:hover {
    color: #667eea;
    text-decoration: underline;
}

/* Групповые операции */
.sfm1-bulk-actions {
    margin-top: 20px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    display: flex;
    gap: 12px;
    transition: all 0.3s;
}

.sfm1-bulk-actions.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.sfm1-bulk-actions .sfm1-btn {
    padding: 8px 16px;
    font-size: 13px;
}

/* Модальное окно выбора каталога */
.sfm1-modal-large {
    max-width: 800px;
    width: 90%;
}

.sfm1-modal-body-scrollable {
    max-height: 60vh;
    overflow-y: auto;
}

.sfm1-folder-selector {
    display: flex;
    gap: 20px;
    min-height: 400px;
}

.sfm1-folder-tree-panel {
    width: 250px;
    border-right: 1px solid #e9ecef;
    padding-right: 16px;
    overflow-y: auto;
    max-height: 400px;
}

.sfm1-folder-content-panel {
    flex: 1;
}

.sfm1-folder-breadcrumbs {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
}

.sfm1-folder-list {
    max-height: 300px;
    overflow-y: auto;
}

.sfm1-folder-item {
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sfm1-folder-item:hover {
    background: #f8f9fa;
}

.sfm1-folder-item.selected {
    background: #667eea;
    color: white;
}

/* Индикатор глубины */
.sfm1-depth-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 12px;
}

/* Адаптивность для новой структуры */
@media (max-width: 768px) {
    .sfm1-fm-wrapper {
        flex-direction: column;
    }
    
    .sfm1-tree-panel {
        width: 100%;
        max-height: 300px;
    }
    
    .sfm1-folder-selector {
        flex-direction: column;
    }
    
    .sfm1-folder-tree-panel {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
        padding-bottom: 16px;
        margin-bottom: 16px;
    }
}

