/* style.css - Main Stylesheet */

:root {
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --success-color: #4cc9f0;
    --danger-color: #f72585;
    --warning-color: #f8961e;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --sidebar-width: 250px;
}

body {
    background-color: #f5f7fb;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Sidebar */
.sidebar {
    background: white;
    border-right: 1px solid #e0e0e0;
    height: calc(100vh - 56px);
    position: sticky;
    top: 56px;
    overflow-y: auto;
    padding: 20px 15px;
}

.sidebar .card {
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed #4361ee;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    background: #f8f9ff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-zone.dragover {
    background: #e8eaff;
    border-color: #3a0ca3;
}

.upload-zone:hover {
    background: #e8eaff;
}

/* File Table */
#fileTable th {
    font-weight: 600;
    color: #6c757d;
    border-bottom: 2px solid #dee2e6;
}

#fileTable tr:hover {
    background-color: #f8f9fa;
}

.file-icon {
    font-size: 1.2em;
    margin-right: 10px;
}

/* Progress Bars */
.progress {
    height: 8px;
    border-radius: 4px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 4px;
    background: linear-gradient(90deg, #4361ee, #3a0ca3);
}

/* Context Menu */
.context-menu {
    position: fixed;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    z-index: 1000;
    display: none;
    min-width: 180px;
}

.context-item {
    display: block;
    padding: 8px 15px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
}

.context-item:hover {
    background: #f8f9fa;
    color: #4361ee;
    text-decoration: none;
}

/* Breadcrumbs */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item a {
    color: #4361ee;
    text-decoration: none;
}

.breadcrumb-item.active {
    color: #6c757d;
}

/* Badges */
.badge {
    padding: 4px 8px;
    font-weight: 500;
}

/* Cards */
.card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.card-header {
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    color: white;
    border-radius: 8px 8px 0 0 !important;
    font-weight: 600;
    padding: 12px 20px;
}

/* Buttons */
.btn {
    border-radius: 5px;
    font-weight: 500;
    padding: 8px 16px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3a0ca3 0%, #4361ee 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(58, 12, 163, 0.2);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Directory Tree */
.directory-tree {
    list-style: none;
    padding-left: 0;
}

.directory-tree ul {
    list-style: none;
    padding-left: 20px;
}

.tree-item {
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}

.tree-item:hover {
    background: #f8f9fa;
}

.tree-item.active {
    background: #e8eaff;
    color: #4361ee;
    font-weight: 500;
}

.tree-toggle {
    margin-right: 5px;
    color: #6c757d;
    transition: transform 0.3s;
}

.tree-toggle.collapsed {
    transform: rotate(-90deg);
}

/* File Icons */
.fa-folder {
    color: #ffc107;
}

.fa-file-pdf {
    color: #f40f02;
}

.fa-file-image, .fa-file-video, .fa-file-audio {
    color: #00b894;
}

.fa-file-word {
    color: #2b579a;
}

.fa-file-excel {
    color: #217346;
}

.fa-file-powerpoint {
    color: #d24726;
}

.fa-file-archive {
    color: #6f42c1;
}

.fa-file-code {
    color: #fd7e14;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        height: auto;
        position: static;
    }
    
    .card-header {
        padding: 10px 15px;
    }
    
    .upload-zone {
        padding: 20px 10px;
    }
}

/* Loading Spinner */
.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Modal Customization */
.modal-content {
    border-radius: 10px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.modal-header {
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    color: white;
    border-radius: 10px 10px 0 0;
}

/* Color Display */
.color-display {
    border-radius: 8px;
    border: 2px solid #dee2e6;
}

/* Quill Editor Customization */
.ql-toolbar {
    border-radius: 8px 8px 0 0;
    border-color: #dee2e6 !important;
}

.ql-container {
    border-radius: 0 0 8px 8px;
    border-color: #dee2e6 !important;
    font-family: inherit;
}

/* Iro.js Color Picker Customization */
.IroSlider,
.IroWheel {
    border-radius: 8px;
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Status Indicators */
.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.status-online {
    background-color: #00b894;
}

.status-offline {
    background-color: #d63031;
}

.status-away {
    background-color: #fdcb6e;
}

/* File Upload Items */
.upload-item {
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    margin-bottom: 5px;
    background: #f8f9fa;
}

.upload-success {
    border-color: #00b894;
    background: #d1f7ed;
}

.upload-error {
    border-color: #d63031;
    background: #ffcccc;
}