/* File info styling for all files view */
.file-info {
    line-height: 1.4;
}

.file-info strong {
    color: #2c3e50;
    font-weight: 600;
}

.file-info small {
    color: #6c757d;
    font-size: 0.85em;
    display: block;
    margin-top: 2px;
}

/* All files button styling */
#allFilesBtn {
    transition: all 0.3s ease;
}

#allFilesBtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

#allFilesBtn.btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

#allFilesBtn.btn-warning:hover {
    background-color: #e0a800;
    border-color: #d39e00;
}

/* File info styling for all files view */
.file-info {
    line-height: 1.4;
}

.file-info strong {
    color: #2c3e50;
    font-weight: 600;
}

.file-info small {
    color: #6c757d;
    font-size: 0.85em;
    display: block;
    margin-top: 2px;
}

/* All files button styling */
#allFilesBtn {
    transition: all 0.3s ease;
}

#allFilesBtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

#allFilesBtn.btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

#allFilesBtn.btn-warning:hover {
    background-color: #e0a800;
    border-color: #d39e00;
}

/* Base Styles - Modern Gradient Design */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    color: #333;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1400px;
    padding: 0 15px;
    margin: 0 auto;
}

/* Header with glass morphism effect */
.app-header {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 20px 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.app-title {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(45deg, #fff, #f8f9fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

/* Enhanced header styles */
.header-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.app-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    margin-top: 5px;
}

.btn-text {
    margin-left: 8px;
}

/* Modern button styles */
.btn {
    border-radius: 12px;
    padding: 8px 16px;
    font-weight: 500;
    border: none;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    position: relative;
    overflow: hidden;
}

.btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover:before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.btn-success {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
}

.btn-warning {
    background: linear-gradient(45deg, #ff9800, #f57c00);
    color: white;
}

.btn-outline-info {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.btn-outline-info:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-primary {
    background: linear-gradient(45deg, #2196F3, #1976D2);
    color: white;
}

.btn-info {
    background: linear-gradient(45deg, #00BCD4, #0097A7);
    color: white;
}

.content-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.folder-selector {
    min-width: 250px;
}

.folder-actions {
    display: flex;
    gap: 8px;
}

/* Buttons */
.btn {
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: #3c90df;
    border-color: #3c90df;
}

.btn-primary:hover {
    background-color: #2a7cc7;
    border-color: #2a7cc7;
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.btn-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
}

.btn-info:hover {
    background-color: #138496;
    border-color: #117a8b;
}

.btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background-color: #e0a800;
    border-color: #d39e00;
    color: #212529;
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

.btn-outline-secondary {
    color: #6c757d;
    border-color: #ced4da;
}

.btn-outline-secondary:hover {
    background-color: #f8f9fa;
    color: #495057;
}

/* DataTables Styling */
.dataTables_wrapper {
    padding: 0;
}

table.dataTable {
    border-collapse: collapse !important;
    margin: 20px 0 !important;
}

table.dataTable thead th {
    padding: 12px 10px;
    font-weight: 500;
    color: #495057;
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

table.dataTable tbody td {
    padding: 12px 10px;
    vertical-align: middle;
    border-bottom: 1px solid #e9ecef;
}

table.dataTable.hover tbody tr:hover {
    background-color: #f8f9fa;
}

/* Batch Actions Form */
.batch-actions {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Folder Display */
.folder-display {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: #f8f9fa;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
    font-size: 0.9rem;
    color: #495057;
}

/* Vlastní "dropdown" třídy (aby nekolidovaly s Bootstrap dropdown) */
.my-dropdown {
    position: relative;
    display: inline-block;
}

/* Tlačítko toggle */
.my-dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    text-align: left;
    background-color: #fff;
    border: 1px solid #ced4da;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.my-dropdown-toggle::after {
    display: inline-block;
    margin-left: 0.255em;
    vertical-align: 0.255em;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
}

/* Vlastní menu */
.my-dropdown-menu {
    position: absolute;
    pointer-events: auto;
    width: 100%;
    max-height: 400px;
    overflow: auto;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    display: none;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
}

/* Když je otevřené, zobrazíme */
.my-dropdown-menu.show {
    display: block;
    z-index: 1060;
}

/* Custom Scrollbar */
.my-dropdown-menu {
    scrollbar-width: thin;
    scrollbar-color: #6c757d #f8f9fa;
}

.my-dropdown-menu::-webkit-scrollbar {
    width: 6px;
}
.my-dropdown-menu::-webkit-scrollbar-track {
    background: #f8f9fa;
}
.my-dropdown-menu::-webkit-scrollbar-thumb {
    background-color: #6c757d;
    border-radius: 3px;
}

/* Hover and Selection States */
.hover-bg-light:hover,
.folder-item:hover {
    background-color: #f8f9fa !important;
}

.folder-item.selected {
    background-color: #e9ecef !important;
}

/* Z-index Hierarchy pro modální okna */
.modal-backdrop {
    z-index: 1040;
}
.modal {
    z-index: 1050;
}
.my-dropdown-menu {
    z-index: 1060;
}

/* Modal Styling */
.modal-content {
    border: none;
    border-radius: 8px;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.2);
}

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    padding: 15px 20px;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 15px 20px;
}

/* File row buttons spacing */
.file-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.file-actions .btn {
    margin: 0;
    white-space: nowrap;
}

/* Icons */
.fa-folder,
.fa-folder-open {
    margin-right: 8px;
    color: #ffc107;
}

/* Card styles with modern design */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.5);
}

.card-header {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border-radius: 20px 20px 0 0;
    padding: 20px 25px;
    font-weight: 600;
    border: none;
}

.card-body {
    padding: 25px;
}

/* Table styles */
.table {
    background: transparent;
    margin-bottom: 0;
}

.table thead th {
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    border: none;
    font-weight: 600;
    color: #495057;
    padding: 15px 12px;
}

.table tbody tr {
    transition: background-color 0.3s ease;
}

.table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.1);
}

.table td {
    padding: 12px;
    border-color: rgba(0,0,0,0.05);
    vertical-align: middle;
}

/* Form controls */
.form-control, .form-select {
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 15px;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    background: white;
}

/* Alert styles */
.alert {
    border-radius: 15px;
    border: none;
    padding: 20px 25px;
    margin-bottom: 25px;
}

.alert-success {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
}

.alert-info {
    background: linear-gradient(45deg, #2196F3, #1976D2);
    color: white;
}

.alert-warning {
    background: linear-gradient(45deg, #ff9800, #f57c00);
    color: white;
}

.alert-danger {
    background: linear-gradient(45deg, #f44336, #d32f2f);
    color: white;
}

/* Mobile-first responsive design */
@media (max-width: 768px) {
    .app-header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .app-title {
        font-size: 1.75rem;
        margin-bottom: 15px;
    }
    
    .navbar-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .btn {
        margin: 2px;
        font-size: 0.9rem;
        padding: 10px 14px;
        min-width: 120px;
    }
    
    .content-section {
        padding: 20px 15px;
        margin-bottom: 20px;
        border-radius: 15px;
    }
    
    .toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .toolbar-group {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .table-responsive {
        border-radius: 15px;
        overflow: hidden;
    }
    
    .table td {
        padding: 8px 6px;
        font-size: 0.9rem;
    }
    
    .table .btn {
        margin: 2px 1px;
        padding: 6px 10px;
        font-size: 0.8rem;
        min-width: auto;
    }
    
    .card-header {
        padding: 15px 20px;
        font-size: 1.1rem;
    }
    
    .card-body {
        padding: 15px;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 10px;
    }
    
    .app-header {
        margin: 10px 0 20px;
        padding: 15px;
    }
    
    .app-title {
        font-size: 1.5rem;
    }
    
    .btn {
        font-size: 0.85rem;
        padding: 8px 12px;
        min-width: 100px;
    }
    
    .content-section {
        padding: 15px 10px;
        border-radius: 12px;
    }
    
    .table td {
        font-size: 0.8rem;
        padding: 6px 4px;
    }
    
    .table .btn {
        font-size: 0.75rem;
        padding: 4px 8px;
        margin: 1px;
    }
    
    /* Stack action buttons vertically on very small screens */
    .table .btn-group-vertical .btn {
        display: block;
        width: 100%;
        margin: 2px 0;
    }
}

/* Loading and progress indicators */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(102, 126, 234, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Progress bars */
.progress {
    height: 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.3);
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    border-radius: 10px;
    transition: width 0.3s ease;
}

/* Navigation breadcrumbs */
.breadcrumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 12px 20px;
    margin-bottom: 20px;
}

.breadcrumb-item a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: #f8f9fa;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.8);
}

/* File type icons enhancement */
.file-icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* Tooltip enhancements */
.tooltip {
    font-size: 0.875rem;
}

.tooltip-inner {
    background: rgba(0, 0, 0, 0.9);
    border-radius: 8px;
    padding: 8px 12px;
}

/* Modal improvements */
.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border-radius: 20px 20px 0 0;
    border: none;
    padding: 20px 25px;
}

.modal-body {
    padding: 25px;
}

/* Search and filter inputs */
.search-container {
    position: relative;
    margin-bottom: 20px;
}

.search-input {
    padding-left: 45px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .folder-selector {
        width: 100%;
    }
    
    .batch-actions {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .navbar-actions {
        margin-top: 15px;
    }
    
    .app-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .app-title {
        margin-bottom: 15px;
    }
}

/* Styles for target folder dropdown */
.folder-dropdown {
    width: 100%;
    max-height: 400px;
    overflow-y: auto;
    padding: 8px 0;
}

.folder-dropdown .dropdown-item {
    white-space: normal;
    word-break: break-word;
}

.folder-dropdown .dropdown-item:hover {
    background-color: #f8f9fa;
}

.folder-dropdown .dropdown-item.active {
    background-color: #e9ecef;
    color: #212529;
}

#targetFolderDropdown {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

/* Folder Tree Styles */
.folder-tree-item {
    margin: 2px 0;
}

.folder-select-link {
    padding: 6px 10px;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    display: block;
    flex-grow: 1;
}

.folder-select-link:hover {
    background-color: #f0f0f0;
    text-decoration: none;
    color: #333;
}

.folder-toggle {
    color: #6c757d;
    width: 20px;
    height: 20px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.folder-toggle:hover {
    color: #495057;
}

.folder-tree-item .fa-folder {
    color: #ffc107;
}

#folderTreeContainer {
    min-width: 280px;
}

/* Mobile-first improvements */
.file-name-cell {
    min-width: 200px;
}

.file-name {
    font-weight: 500;
    color: #495057;
}

.file-title {
    font-style: italic;
    margin-top: 2px;
}

.mobile-file-info {
    margin-top: 8px;
    padding: 4px 0;
    border-top: 1px solid #e9ecef;
}

.mobile-file-info .badge {
    margin-right: 6px;
    font-size: 0.75rem;
}

/* Responsive table improvements */
@media (max-width: 767px) {
    .app-header {
        padding: 12px 16px;
    }
    
    .app-title {
        font-size: 1.5rem;
    }
    
    .navbar-actions {
        gap: 6px;
    }
    
    .navbar-actions .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .content-section {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .toolbar-group {
        justify-content: space-between;
    }
    
    .folder-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .batch-actions {
        padding: 10px;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .batch-actions .input-group {
        max-width: none !important;
    }
    
    .file-actions {
        flex-direction: column;
        gap: 3px;
        width: 100%;
    }
    
    .file-actions .btn {
        justify-content: center;
        width: 100%;
        margin: 0;
    }
    
    .file-actions .btn-group {
        width: 100%;
    }
    
    .file-actions .btn-group .btn {
        width: auto;
        flex: 1;
    }
    
    .dataTables_wrapper .dataTables_filter {
        text-align: left;
        margin-bottom: 15px;
    }
    
    .dataTables_wrapper .dataTables_length {
        margin-bottom: 15px;
    }
    
    .dataTables_wrapper .dataTables_info {
        text-align: center;
        margin-top: 15px;
    }
    
    .dataTables_wrapper .dataTables_paginate {
        text-align: center;
        margin-top: 15px;
    }
}

/* Small mobile phones */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .app-header {
        padding: 10px 12px;
    }
    
    .content-section {
        padding: 10px;
    }
    
    .navbar-actions .btn {
        padding: 0.2rem 0.4rem;
        font-size: 0.75rem;
    }
    
    .file-name-cell {
        min-width: 150px;
    }
    
    #targetFolderDropdown {
        max-width: 200px;
    }
}

/* Enhanced button styles for mobile */
@media (max-width: 767px) {
    .btn-sm {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .file-actions .btn-sm {
        padding: 0.4rem 0.8rem;
        min-height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .file-actions .dropdown-toggle::after {
        margin-left: auto;
    }
}

/* Fix for DataTables responsive buttons */
.dtr-details {
    background-color: #f8f9fa !important;
}

.dtr-details li {
    border-bottom: 1px solid #dee2e6;
    padding: 8px 0;
}

/* Card-like appearance for mobile */
@media (max-width: 767px) {
    .table-responsive {
        border: none;
    }
    
    #filesTable tbody tr {
        border: 1px solid #dee2e6;
        border-radius: 8px;
        margin-bottom: 10px;
        background: #fff;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }
    
    #filesTable tbody tr td {
        border: none;
    }
    
    #filesTable tbody tr:first-child td {
        border-top: none;
    }
}

/* Geometry info styles */
.alert-info {
    border-left: 4px solid #17a2b8;
}

.alert-info h6 {
    color: #0c5460;
    margin-bottom: 12px;
}

.alert-info code {
    background-color: rgba(23, 162, 184, 0.1);
    color: #0c5460;
    padding: 2px 6px;
    border-radius: 3px;
}

/* File actions mobile optimization */
@media (max-width: 767px) {
    .file-actions .btn-group .dropdown-menu {
        position: static !important;
        transform: none !important;
        width: 100%;
        border-radius: 0.25rem;
        margin-top: 4px;
    }
}

/* Header improvements for mobile */
@media (max-width: 575px) {
    .app-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .navbar-actions {
        justify-content: center;
        margin-top: 12px;
    }
    
    .navbar-actions .dropdown {
        width: 100%;
    }
    
    .navbar-actions .dropdown .btn {
        width: 100%;
        margin-bottom: 4px;
    }
}

/* Better spacing for mobile tables */
@media (max-width: 767px) {
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        width: 100%;
        text-align: left;
    }
    
    .dataTables_wrapper .dataTables_filter input {
        width: 100%;
        margin-left: 0;
        margin-top: 5px;
    }
    
    .dataTables_wrapper .dataTables_paginate {
        float: none !important;
        text-align: center;
    }
    
    .dataTables_wrapper .dataTables_info {
        float: none !important;
        text-align: center;
        padding-top: 10px;
    }
}

/* Touch-friendly elements */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .btn-sm {
        min-height: 38px;
        min-width: 38px;
    }
    
    .file-actions .btn {
        margin: 2px;
    }
    
    .dropdown-item {
        padding: 12px 20px;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* Enhanced dropdown styles */
.dropdown-menu {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    padding: 10px 0;
}

.dropdown-item {
    padding: 10px 20px;
    transition: background-color 0.3s ease;
    border-radius: 0;
}

.dropdown-item:hover {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

/* File type specific styling */
.file-type-csv { color: #28a745; }
.file-type-xlsx { color: #20c997; }
.file-type-geojson { color: #ffc107; }
.file-type-shp { color: #fd7e14; }
.file-type-gpkg { color: #6f42c1; }
.file-type-parquet { color: #e83e8c; }
.file-type-json { color: #17a2b8; }

/* Action buttons in table */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-start;
}

.action-buttons .btn {
    font-size: 0.75rem;
    padding: 4px 8px;
    margin: 1px;
    min-width: auto;
}

/* DataTable enhancements */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    margin-bottom: 10px;
}

.dataTables_wrapper .dataTables_filter input {
    border-radius: 20px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    padding: 8px 15px;
    margin-left: 10px;
}

.dataTables_wrapper .dataTables_length select {
    border-radius: 10px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    padding: 5px 10px;
    margin: 0 5px;
}

.page-link {
    border-radius: 8px;
    border: none;
    margin: 0 2px;
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    transition: all 0.3s ease;
}

.page-link:hover, .page-item.active .page-link {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Enhanced header styles */
.header-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.app-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    margin-top: 5px;
}

.btn-text {
    margin-left: 8px;
}

/* Mobile optimization for buttons */
@media (max-width: 768px) {
    .btn-text {
        display: none;
    }
    
    .btn {
        min-width: 44px;
        justify-content: center;
    }
    
    .navbar-actions {
        gap: 8px;
    }
    
    .header-content {
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .app-title {
        font-size: 1.3rem;
    }
    
    .app-subtitle {
        font-size: 0.8rem;
    }
    
    .btn {
        min-width: 40px;
        padding: 8px 10px;
    }
}

/* File type badges */
.file-type-badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
}

/* Responsive file names */
.file-name {
    word-break: break-word;
    display: inline-block;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .file-name {
        max-width: 120px;
    }
}

/* Enhanced folder styling */
.folder-name {
    word-break: break-word;
    text-align: left;
}

/* Improved action buttons layout */
@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-buttons .btn {
        width: 100%;
        margin: 2px 0;
        justify-content: flex-start;
    }
    
    .action-buttons .btn i {
        width: 20px;
    }
}

/* DataTable mobile improvements */
@media (max-width: 768px) {
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        text-align: center;
        margin-bottom: 15px;
    }
    
    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        text-align: center;
        margin-top: 15px;
    }
    
    .dataTables_wrapper .dataTables_filter input {
        width: 100%;
        max-width: 200px;
    }
}

/* Enhanced empty state */
.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-state i {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 20px;
}

.empty-state h5 {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
}

.empty-state p {
    color: rgba(255, 255, 255, 0.6);
}

/* Scrollable table for mobile */
@media (max-width: 576px) {
    .table-responsive {
        font-size: 0.8rem;
    }
    
    .table th,
    .table td {
        padding: 8px 4px;
        vertical-align: middle;
    }
    
    .table th {
        font-size: 0.75rem;
        white-space: nowrap;
    }
}

/* Button group improvements for mobile */
@media (max-width: 576px) {
    .btn-group-vertical {
        width: 100%;
    }
    
    .btn-group-vertical .btn {
        border-radius: 8px;
        margin: 2px 0;
    }
}

/* Loading states */
.table-loading {
    position: relative;
    opacity: 0.6;
}

.table-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

/* Improved focus states for accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .app-header,
    .navbar-actions,
    .btn,
    .action-buttons {
        display: none !important;
    }
    
    .content-section {
        background: white !important;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    body {
        background: white !important;
    }
}

/* Notification system styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 15px 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 300px;
    animation: slideInRight 0.3s ease;
}

.notification-success {
    border-left: 4px solid #4CAF50;
}

.notification-error {
    border-left: 4px solid #f44336;
}

.notification-info {
    border-left: 4px solid #2196F3;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #666;
    margin-left: auto;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Dark theme support */
.dark-theme {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
}

.dark-theme .content-section,
.dark-theme .card {
    background: rgba(52, 73, 94, 0.9) !important;
    color: #ecf0f1;
}

.dark-theme .app-header {
    background: rgba(44, 62, 80, 0.9) !important;
}

.dark-theme .table {
    color: #ecf0f1;
}

.dark-theme .table thead th {
    background: rgba(52, 73, 94, 0.8) !important;
    color: #ecf0f1;
}

/* Additional responsive improvements */
@media (max-width: 480px) {
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .app-title {
        font-size: 1.2rem;
    }
    
    .app-subtitle {
        font-size: 0.75rem;
    }
}
