* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    min-height: 100vh;
}

#app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.1);
    position: relative;
}

.header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.btn-logout {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.btn-logout:hover {
    background: rgba(255,255,255,0.3);
}

.breadcrumb {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 0.9rem;
    opacity: 0.9;
}

.path-item {
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.path-item:hover {
    background: rgba(255,255,255,0.1);
}

.path-item:not(:last-child)::after {
    content: '›';
    margin-left: 10px;
    opacity: 0.5;
}

.toolbar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.sort-controls {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-controls label {
    color: #999;
    font-size: 0.9rem;
}

.sort-controls select {
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.sort-controls select:hover {
    border-color: #667eea;
}

.sort-controls select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.icon {
    font-size: 1.2rem;
}

.dropzone {
    border: 2px dashed #667eea;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    margin-bottom: 30px;
    background: rgba(102, 126, 234, 0.05);
    transition: all 0.3s;
}

.dropzone.active {
    background: rgba(102, 126, 234, 0.1);
    border-color: #764ba2;
    transform: scale(1.02);
}

.dropzone-content p {
    color: #999;
    font-size: 1.1rem;
}

.file-list {
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.file-list-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 2px solid #2a2a2a;
    background: #141414;
    font-weight: 600;
    color: #999;
}

.header-name {
    flex: 1;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-info {
    display: flex;
    gap: 20px;
}

.header-size,
.header-date {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 100px;
}

.header-name:hover,
.header-size:hover,
.header-date:hover {
    color: #667eea;
}

.sort-indicator {
    font-size: 0.8rem;
    opacity: 0.6;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #2a2a2a;
    transition: all 0.2s;
    cursor: default;
}

.file-item[onclick] {
    cursor: pointer;
}

.file-item:hover {
    background: #2a2a2a;
}

.file-icon {
    font-size: 1.5rem;
    margin-right: 15px;
}

.file-name {
    flex: 1;
    font-weight: 500;
}

.file-info {
    display: flex;
    gap: 20px;
    color: #666;
    font-size: 0.9rem;
}

.file-info span:first-child {
    min-width: 100px;
    text-align: right;
}

.file-info span:last-child {
    min-width: 100px;
}

.file-actions {
    display: flex;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.2s;
}

.file-item:hover .file-actions {
    opacity: 1;
}

.action-btn {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.2s;
}

.action-btn:hover {
    background: rgba(102, 126, 234, 0.1);
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.empty {
    text-align: center;
    padding: 60px;
    color: #666;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #1a1a1a;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    min-width: 400px;
    border: 1px solid #667eea;
}

.modal-header {
    margin-bottom: 20px;
}

.modal-header h2 {
    color: white;
    font-size: 1.5rem;
}

.modal-body input {
    width: 100%;
    padding: 12px;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    color: white;
    font-size: 1rem;
    margin-bottom: 20px;
}

.modal-body input:focus {
    outline: none;
    border-color: #667eea;
}

.error-message {
    color: #ff4444;
    font-size: 0.9rem;
    margin-top: -10px;
    margin-bottom: 15px;
    display: none;
}

.error-message.show {
    display: block;
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.upload-progress {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #1a1a1a;
    border: 1px solid #667eea;
    border-radius: 8px;
    padding: 15px 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    z-index: 1000;
    min-width: 300px;
}

.upload-progress-text {
    color: #fff;
    margin-bottom: 8px;
}

.upload-progress-bar {
    height: 4px;
    background: #2a2a2a;
    border-radius: 2px;
    overflow: hidden;
}

.upload-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0;
    transition: width 0.3s ease;
}

.file-item[onclick]:hover .file-icon {
    transform: scale(1.1);
}

.file-item[onclick]:hover .file-name {
    color: #667eea;
}

/* New Status Modal Styles */
.status-modal .modal-content {
    max-width: 900px;
    width: 90%;
    background: #141414;
    border: 2px solid #667eea;
    position: relative;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.status-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
}

.close-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.close-btn:hover {
    color: white;
    background: rgba(255,255,255,0.1);
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.status-item {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #2a2a2a;
    transition: all 0.3s;
}

.status-item:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
}

/* Special styling for deviation status */
.status-item.status-deviation:hover {
    border-color: #f59e0b;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.2);
}

.status-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.status-icon {
    font-size: 1.5rem;
}

.status-item h3 {
    color: #fff;
    font-size: 1.2rem;
}

.status-item p {
    color: #999;
    font-size: 0.95rem;
    margin-bottom: 15px;
    line-height: 1.5;
}

.status-owner {
    font-size: 0.9rem;
    color: #666;
}

.company-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    margin-left: 4px;
}

.company-tag.advansia {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
}

.company-tag.ayfie {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
}

/* Folder Tree Styles for Move Dialog */
.folder-tree {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    background: #2a2a2a;
    padding: 10px;
}

.folder-tree-item-wrapper {
    position: relative;
}

.folder-tree-item {
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    margin-bottom: 2px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.folder-tree-item:hover {
    background: rgba(102, 126, 234, 0.1);
}

.folder-tree-item.selected {
    background: rgba(102, 126, 234, 0.2);
    border: 1px solid #667eea;
}

.folder-expand-icon {
    font-size: 0.8rem;
    cursor: pointer;
    padding: 2px;
    user-select: none;
    color: #999;
    transition: transform 0.2s;
    min-width: 16px;
    text-align: center;
}

.folder-expand-icon:hover {
    color: #fff;
}

.folder-expand-icon.expanded {
    transform: rotate(0deg);
}

.folder-expand-placeholder {
    display: inline-block;
    width: 20px;
}

.folder-tree-icon {
    font-size: 1.2rem;
}

.folder-tree-name {
    flex: 1;
}

.subfolder-container {
    margin-left: 0;
}

.subfolder-container .loading {
    color: #666;
    font-size: 0.9rem;
}

.btn-secondary {
    background: #3a3a3a;
    color: white;
}

.btn-secondary:hover {
    background: #4a4a4a;
    transform: translateY(-1px);
}

#confirmMoveBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#confirmMoveBtn:disabled:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Tablet Responsive */
@media (max-width: 1024px) {
    .toolbar {
        gap: 10px;
    }
    
    .btn {
        padding: 10px 18px;
        font-size: 0.95rem;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .toolbar {
        justify-content: center;
        gap: 10px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .btn .icon {
        font-size: 1.1rem;
    }
    
    .sort-controls {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
    }
    
    .file-list-header {
        display: none;
    }
    
    .file-info span:first-child {
        min-width: auto;
    }
    
    .file-actions {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .action-btn {
        font-size: 0.8rem;
        padding: 3px 8px;
    }
    
    .status-grid {
        grid-template-columns: 1fr;
    }
    
    .status-modal .modal-content {
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .folder-tree {
        max-height: 300px;
    }
}