/* ============================================================================
   ENHANCED TABLE STYLING - PHASE 1 & 2 IMPLEMENTATION
   ============================================================================
   
   @file public/assets/css/custom.css
   @version 19.0.0
   @description Enhanced table styling with sorting, filtering, and pagination
   @author AI Development Team
   @lastUpdated 2025-01-27
   
   Features:
   - Global search functionality
   - Enhanced sorting indicators
   - Advanced filtering UI
   - Beautiful pagination controls
   - Modern glassmorphism design
   ============================================================================ */

/* Global Search Component */
.global-search-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

.global-search-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmer 3s infinite;
}

.global-search-input {
    background: rgba(255,255,255,0.95);
    border: none;
    border-radius: 10px;
    padding: 15px 20px;
    font-size: 16px;
    width: 100%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.global-search-input:focus {
    outline: none;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    transform: translateY(-2px);
    background: rgba(255,255,255,1);
}

.global-search-input::placeholder {
    color: #666;
    font-style: italic;
}

.global-search-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    color: white;
    font-size: 14px;
}

.global-search-results {
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.global-search-clear {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.global-search-clear:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

/* Enhanced Table Styling */
.table-enhanced {
    background: rgba(255,255,255,0.95);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.table-enhanced .tabulator-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #dee2e6;
    padding: 0;
}

.table-enhanced .tabulator-col {
    background: transparent;
    border-right: 1px solid #dee2e6;
    padding: 12px 8px;
    font-weight: 600;
    color: #495057;
    transition: all 0.3s ease;
    position: relative;
}

.table-enhanced .tabulator-col:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.table-enhanced .tabulator-col.tabulator-sortable {
    cursor: pointer;
}

.table-enhanced .tabulator-col.tabulator-sortable:hover {
    background: rgba(102, 126, 234, 0.15);
}

.table-enhanced .tabulator-col.tabulator-sortable[aria-sort="asc"]::after,
.table-enhanced .tabulator-col.tabulator-sortable[aria-sort="desc"]::after {
    content: '';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
}

.table-enhanced .tabulator-col.tabulator-sortable[aria-sort="asc"]::after {
    border-bottom: 6px solid #28a745;
}

.table-enhanced .tabulator-col.tabulator-sortable[aria-sort="desc"]::after {
    border-top: 6px solid #dc3545;
}

.table-enhanced .tabulator-row {
    border-bottom: 1px solid #f8f9fa;
    transition: all 0.3s ease;
}

.table-enhanced .tabulator-row:hover {
    background: rgba(102, 126, 234, 0.05);
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.table-enhanced .tabulator-row.tabulator-row-even {
    background: rgba(248, 249, 250, 0.5);
}

.table-enhanced .tabulator-row.tabulator-row-even:hover {
    background: rgba(102, 126, 234, 0.08);
}

.table-enhanced .tabulator-cell {
    padding: 12px 8px;
    border-right: 1px solid #f8f9fa;
    font-size: 14px;
    color: #495057;
    transition: all 0.3s ease;
}

.table-enhanced .tabulator-cell[data-field="GLOBALID"],
.table-enhanced .tabulator-cell[data-field="OBJECTID"] {
    font-weight: 600;
    color: #6f42c1;
    background: rgba(111, 66, 193, 0.05);
    position: relative;
}

.table-enhanced .tabulator-cell[data-field="GLOBALID"]::before,
.table-enhanced .tabulator-cell[data-field="OBJECTID"]::before {
    content: '🔑';
    margin-right: 5px;
    font-size: 12px;
}

/* Enhanced Pagination Controls */
.pagination-controls {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.pagination-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #495057;
}

.pagination-size-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-size-selector select {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.pagination-size-selector select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.pagination-navigation {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pagination-btn {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 40px;
    text-align: center;
}

.pagination-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-1px);
}

.pagination-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
    font-weight: 600;
}

.pagination-btn:disabled {
    background: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
    transform: none;
}

/* Filter Chips */
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

.filter-chip {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.filter-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.filter-chip-remove {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 10px;
    transition: all 0.3s ease;
}

.filter-chip-remove:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .global-search-container {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .global-search-input {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .global-search-stats {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .pagination-controls {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .pagination-navigation {
        justify-content: center;
    }
    
    .filter-chips {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .global-search-container {
        padding: 10px;
    }
    
    .global-search-input {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .pagination-btn {
        padding: 6px 8px;
        font-size: 12px;
        min-width: 35px;
    }
    
    .filter-chip {
        padding: 4px 8px;
        font-size: 11px;
    }
}

/* ============================================================================
   FIELD MAPPING INTERFACE - PHASE 3 IMPLEMENTATION
   ============================================================================
   
   @file public/assets/css/custom.css
   @version 19.0.0
   @description Field mapping interface with drag and drop functionality
   @author AI Development Team
   @lastUpdated 2025-01-27
   
   Features:
   - Drag and drop field mapping
   - Visual mapping arrows
   - Field type indicators
   - Key field highlighting
   - Mapping validation
   ============================================================================ */

.field-mapping-interface {
    background: rgba(255,255,255,0.95);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin: 20px 0;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.mapping-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mapping-header h4 {
    margin: 0;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.mapping-controls {
    display: flex;
    gap: 10px;
}

.mapping-controls .btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.mapping-controls .btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

.mapping-content {
    padding: 20px;
}

.mapping-sections {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: start;
    margin-bottom: 20px;
}

.mapping-section {
    background: rgba(248, 249, 250, 0.8);
    border-radius: 10px;
    padding: 15px;
    border: 1px solid #dee2e6;
}

.mapping-section h5 {
    margin-bottom: 15px;
    color: #495057;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.field-search {
    margin-bottom: 15px;
}

.field-search input {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 8px 12px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.field-search input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.field-list {
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px;
    cursor: grab;
    transition: all 0.3s ease;
    position: relative;
}

.field-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.field-item.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
    cursor: grabbing;
}

.field-item.drag-over {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2);
}

.field-item.mapped {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.05);
}

.field-item.key-field {
    border-left: 4px solid #6f42c1;
    background: rgba(111, 66, 193, 0.05);
}

.field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.field-name {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.field-key-icon {
    color: #6f42c1;
    font-size: 12px;
}

.field-mapped-icon {
    color: #28a745;
    font-size: 12px;
    font-weight: bold;
}

.field-details {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.field-type {
    background: #e9ecef;
    color: #495057;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.field-required {
    color: #dc3545;
    font-weight: bold;
    font-size: 12px;
}

.field-description {
    color: #6c757d;
    font-size: 12px;
    line-height: 1.3;
}

.mapping-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    border: 2px dashed #dee2e6;
    position: relative;
}

.mapping-arrows {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.mapping-arrow {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.arrow-line {
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    position: relative;
}

.arrow-head {
    position: absolute;
    right: -8px;
    top: -3px;
    width: 0;
    height: 0;
    border-left: 8px solid #764ba2;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
}

.arrow-label {
    font-size: 10px;
    color: #495057;
    background: white;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mapping-info {
    text-align: center;
    color: #6c757d;
    font-size: 14px;
    z-index: 1;
}

.mapping-summary {
    background: rgba(248, 249, 250, 0.8);
    border-radius: 10px;
    padding: 15px;
    border: 1px solid #dee2e6;
}

.mapping-summary h6 {
    margin-bottom: 15px;
    color: #495057;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mapping-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 15px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mapping-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.mapping-actions .btn {
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.mapping-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Responsive Design */
@media (max-width: 768px) {
    .mapping-sections {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .mapping-zone {
        min-height: 100px;
    }
    
    .mapping-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .mapping-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .mapping-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .mapping-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .field-item {
        padding: 10px;
    }
    
    .field-name {
        font-size: 13px;
    }
    
    .field-description {
        font-size: 11px;
    }
    
    .mapping-controls .btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* Analytics containers visibility fix */
.error-hotspots,
.performance-bottlenecks {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 50px;
}

.error-item,
.bottleneck-item {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-bottom: 10px !important;
}

/* ============================================================================
   ADVANCED DIAGNOSTIC PAGE STYLES
   ============================================================================
   
   @file public/assets/css/custom.css
   @version 19.2.1
   @description Advanced Diagnostic page styles with fancy progress bar and side-by-side layout
   @author AI Development Team
   @lastUpdated 2025-01-27
   
   Features:
   - Fancy animated progress bar with shimmer effects
   - Side-by-side layout for form and results
   - Responsive design for all screen sizes
   - Status badges with gradients
   - Check result animations
   ============================================================================ */

/* Fancy Progress Bar Styles */
.fancy-progress-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.fancy-progress-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.fancy-progress-bar {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    height: 25px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.fancy-progress-fill {
    background: linear-gradient(90deg, #00d4ff, #00ff88, #00d4ff);
    background-size: 200% 100%;
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease-in-out;
    animation: gradientMove 2s ease infinite;
    position: relative;
}

.fancy-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.progress-text {
    color: white;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    margin-top: 10px;
}

.progress-percentage {
    color: white;
    font-weight: bold;
    font-size: 1.2em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Side-by-side layout */
.diagnostic-layout {
    display: flex;
    gap: 20px;
    min-height: 600px;
    align-items: stretch;
}

.diagnostic-form-panel {
    flex: 1;
    max-width: 400px;
    display: flex;
    flex-direction: column;
}

.diagnostic-results-panel {
    flex: 2;
    min-height: 600px;
    display: flex;
    flex-direction: column;
}

.diagnostic-form-panel .card,
.diagnostic-results-panel .card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.diagnostic-form-panel .card-body,
.diagnostic-results-panel .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.results-placeholder {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border: 2px dashed #ccc;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 400px;
    color: #666;
    font-size: 1.1em;
    text-align: center;
}

.results-placeholder i {
    font-size: 3em;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Check result animations */
.check-result {
    animation: slideIn 0.5s ease-out;
    transition: all 0.3s ease;
}

.check-result:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Status badges */
.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-passed {
    background: linear-gradient(135deg, #00ff88, #00d4ff);
    color: white;
}

.status-failed {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
}

.status-warning {
    background: linear-gradient(135deg, #ffa726, #ff7043);
    color: white;
}

.status-running {
    background: linear-gradient(135deg, #42a5f5, #1976d2);
    color: white;
    animation: pulse 1.5s infinite;
}

/* Responsive design for diagnostic layout */

/* Analytics & Insights Section Alignment */
#analyticsInsights .card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

#analyticsInsights .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#analyticsInsights .row {
    align-items: stretch;
}

#analyticsInsights .col-md-3 {
    display: flex;
    flex-direction: column;
}

#analyticsInsights .col-md-3 .card {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#analyticsInsights .col-md-3 .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* AI Decision Tracking Section Alignment */
#aiDecisionTracking .card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

#aiDecisionTracking .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#aiDecisionTracking .row {
    align-items: stretch;
    flex: 1;
}

#aiDecisionTracking .col-xl-6 {
    display: flex;
    flex-direction: column;
}

#aiDecisionTracking .col-xl-6 .form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#aiDecisionTracking .decision-stat {
    height: 100%;
    display: flex;
    flex-direction: column;
}

#aiDecisionTracking .decision-stat .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Performance Analysis Section Alignment */
#performanceAnalysis .card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

#performanceAnalysis .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Diagnostic Summary Section Alignment */
#diagnosticSummary .card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

#diagnosticSummary .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Ensure consistent card heights across sections */
.advanced-diagnostic-page .card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.advanced-diagnostic-page .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Fix for metric cards alignment */
.performance-metric,
.health-metric,
.behavior-analytic,
.error-analysis {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.performance-metric .card-body,
.health-metric .card-body,
.behavior-analytic .card-body,
.error-analysis .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
@media (max-width: 768px) {
    .diagnostic-layout {
        flex-direction: column;
    }
    
    .diagnostic-form-panel {
        max-width: none;
    }
}

.alert .btn-close {
  font-size: larger !important;
  line-height: 0 !important;
}

.footer-social {
  padding: 8px 20px !important;
  font-size: 18px;
}

.footer-social a {
  color: #90959F;
}

/* ============================================================================
   AI ANALYSIS PAGE STYLES - Neumorphic Design Implementation
   ============================================================================
   
   @file public/assets/css/custom.css
   @version 19.2.0
   @description AI Analysis page styles with beautiful neumorphic design
   @author AI Development Team
   @lastUpdated 2025-07-07
   
   Features:
   - Neumorphic upload zone with raised design
   - Beautiful gradients and shadows
   - Floating animations and hover effects
   - Progress indicators with shimmer effects
   - File preview with grid layout
   - AI-powered analysis interface
   - Responsive design for all screen sizes
   - Modern UI with neumorphic elements
   ============================================================================ */

/* AI Analysis Page - Bootstrap Grid Layout */
.ai-analysis-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #495057;
    margin-bottom: 0.5rem;
    text-align: center;
}

.ai-analysis-subtitle {
    font-size: 1.1rem;
    color: #6c757d;
    text-align: center;
    margin-bottom: 2rem;
}

/* Stats Cards - Bootstrap Grid Compatible */
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    height: 100%;
    margin-bottom: 1rem;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: white;
    font-size: 1.2rem;
}

.stat-content h6 {
    margin: 0;
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 600;
}

.stat-content span {
    font-size: 1.5rem;
    font-weight: bold;
    color: #212529;
    display: block;
    margin: 0.25rem 0;
}

.stat-content small {
    color: #28a745;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Training Snapshot Management Section */
.snapshot-management-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.snapshot-header {
    margin-bottom: 1.5rem;
}

.snapshot-header h5 {
    color: #495057;
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.snapshot-header p {
    color: #6c757d;
    margin: 0;
    font-size: 0.9rem;
}

.snapshot-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.snapshot-selector {
    margin-bottom: 1rem;
}

.snapshot-selector label {
    display: block;
    margin-bottom: 0.5rem;
    color: #495057;
    font-weight: 500;
}

.snapshot-selector .form-select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #f8f9fa;
}

.snapshot-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
}

.snapshot-current {
    color: #495057;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Upload and Results Columns */
.upload-column,
.results-column {
    height: 100%;
}

/* Responsive adjustments for Bootstrap grid */
@media (max-width: 768px) {
    .ai-analysis-title {
        font-size: 2rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .stat-content span {
        font-size: 1.25rem;
    }
    
    .snapshot-management-section {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    .snapshot-controls {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .snapshot-controls .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .snapshot-management-section {
        padding: 1rem;
    }
    
    .snapshot-header h5 {
        font-size: 1rem;
    }
    
    .snapshot-header p {
        font-size: 0.8rem;
    }
}

/* Full Width Stats Cards */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
    width: 100%;
}

/* Full Width Snapshot Management */
.snapshot-management-section {
    width: 100%;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Full Width Two Column Layout */
.ai-analysis-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    width: 100%;
    margin-top: 2rem;
}

/* Analysis Section - Updated for side-by-side layout */
.analysis-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    height: 100%;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.analysis-section h4 {
    color: #495057;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #6c757d;
    font-size: 1.1rem;
}

.loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #dee2e6;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    margin-top: 1rem;
}

.analysis-results {
    flex: 1;
    overflow-y: auto;
}

.result-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid #007bff;
}

.result-card h5 {
    color: #495057;
    margin-bottom: 1rem;
    font-weight: 600;
}

.component-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #dee2e6;
}

.component-item:last-child {
    border-bottom: none;
}

.component-name {
    font-weight: 500;
    color: #495057;
}

.component-confidence {
    background: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* --- Restore flip container and card styles for proper flip animation --- */
.flip-container {
    perspective: 1000px;
    height: 600px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    border-radius: 12px;
}

/* Ensure table container is visible and properly sized */
#Asset-table {
    width: 100% !important;
    min-height: 400px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1 !important;
}

/* Ensure flip card front is visible and table is rendered */
.flip-card-front {
    opacity: 1 !important;
    visibility: visible !important;
    transform: rotateY(0deg) !important;
}

.flip-card-front #Asset-table {
    width: 100% !important;
    min-height: 400px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1 !important;
}

/* Ensure Tabulator table is visible */
.tabulator {
    width: 100% !important;
    min-height: 400px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.flip-container.flipped {
    border-color: #007bff;
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.3);
}

.flip-card {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.4, 0.2, 0.2, 1);
    border-radius: 12px;
    overflow: hidden;
}

.flip-card.front,
.flip-card.back {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    backface-visibility: hidden;
    border-radius: 12px;
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.flip-card.front {
    transform: rotateY(0deg);
    z-index: 2;
    /* Ensure the front card is visible by default */
    opacity: 1 !important;
    visibility: visible !important;
}

.flip-card.back {
    transform: rotateY(180deg);
    z-index: 3;
}

.flip-container.flipped .flip-card {
    transform: rotateY(180deg);
}

.flip-container.flipped .flip-card.front {
    z-index: 1;
}

.flip-container.flipped .flip-card.back {
    z-index: 4;
}

/* --- Fixed Image fit and orientation --- */
#preview-image, .preview-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    border-radius: 12px;
    background: #f8fafc;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    max-width: 100%;
    max-height: 100%;
    transform: none !important;
    image-orientation: from-image;
}

/* Ensure preview image is visible when back side is shown */
.flip-container.flipped .preview-image {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Preview container to maintain aspect ratio */
.preview-container {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
}

/* Upload Zone Styles - Fixed positioning */
.upload-zone {
    background: white;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    box-sizing: border-box;
}

.upload-zone:hover {
    border-color: #007bff;
    background: #f8f9fa;
}

.upload-zone.dragover {
    border-color: #007bff;
    background: #e3f2fd;
}

.upload-icon {
    font-size: 3rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.upload-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.upload-subtext {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.file-input {
    display: none;
}

.upload-button {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.upload-button:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

/* Preview Styles - Fixed positioning */
.preview-container {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
}

.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.preview-container:hover .preview-overlay {
    opacity: 1;
}

.preview-actions {
    display: flex;
    gap: 1rem;
    z-index: 10;
}

.preview-action-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
}

.preview-action-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.preview-action-btn:first-child {
    background: rgba(220, 53, 69, 0.9);
    color: white;
}

.preview-action-btn:first-child:hover {
    background: rgba(220, 53, 69, 1);
}

/* AI Badge */
.ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1rem;
    box-shadow: 
        4px 4px 12px rgba(102, 126, 234, 0.3),
        -4px -4px 12px rgba(255,255,255,0.1);
}

/* Progress Container */
.progress-container {
    margin-top: 2rem;
    display: none;
}

.progress-label {
    color: #6c7b8a;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #d1dae6;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 
        inset 4px 4px 8px #c0c5cc,
        inset -4px -4px 8px #ffffff;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #9b59b6);
    border-radius: 6px;
    transition: width 0.3s ease;
    box-shadow: 
        2px 2px 4px rgba(52, 152, 219, 0.3),
        -2px -2px 4px rgba(255,255,255,0.5);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* File Preview Section */
.file-preview {
    margin-top: 2rem;
    display: none;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.preview-item {
    background: #e0e5ec;
    border-radius: 15px;
    padding: 1rem;
    box-shadow: 
        6px 6px 12px #c8cdd4,
        -6px -6px 12px #f8fdff;
    transition: all 0.3s ease;
    position: relative;
}

.preview-item:hover {
    box-shadow: 
        8px 8px 16px #c8cdd4,
        -8px -8px 16px #f8fdff;
    transform: translateY(-2px);
}

.preview-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.preview-name {
    color: #5a6c7d;
    font-weight: 600;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-size {
    color: #8a9ba8;
    font-size: 0.8rem;
}

/* Remove Button */
.remove-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #e0e5ec;
    border: none;
    color: #e74c3c;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 
        3px 3px 6px #c8cdd4,
        -3px -3px 6px #f8fdff;
    transition: all 0.3s ease;
    opacity: 0;
}

.preview-item:hover .remove-btn {
    opacity: 1;
}

.remove-btn:hover {
    box-shadow: 
        inset 3px 3px 6px #c8cdd4,
        inset -3px -3px 6px #f8fdff;
    color: #c0392b;
}

/* Analyze Button */
.analyze-btn {
    margin-top: 2rem;
    width: 100%;
    background: #e0e5ec;
    border: none;
    color: #5a6c7d;
    padding: 1rem 2rem;
    border-radius: 20px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 
        8px 8px 16px #c8cdd4,
        -8px -8px 16px #f8fdff;
    transition: all 0.3s ease;
    display: none;
}

.analyze-btn:hover {
    box-shadow: 
        inset 8px 8px 16px #c8cdd4,
        inset -8px -8px 16px #f8fdff;
    color: #3498db;
}

.analyze-btn:active {
    transform: scale(0.98);
}

/* Pulse Animation */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Results Display */
.analysis-results {
    display: grid;
    gap: 1rem;
}

.result-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.result-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.result-card h4 {
    color: #495057;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.components-found {
    display: grid;
    gap: 0.8rem;
}

.component-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    background: white;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

.component-name {
    font-weight: 600;
    color: #495057;
}

.component-confidence {
    background: #007bff;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Error and Success Messages */
.error-message, .success-message {
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
    text-align: center;
    font-weight: 500;
}

.error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

/* Responsive adjustments for full width */
@media (max-width: 1200px) {
    .ai-analysis-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .ai-analysis-container {
        padding: 1rem;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .snapshot-management-section {
        padding: 1.5rem;
    }
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.upload-zone:hover {
    border-color: #007bff;
    background: #f0f8ff;
}

.upload-zone.dragover {
    border-color: #28a745;
    background: #f0fff0;
}

.upload-content {
    pointer-events: none;
}

/* Preview Section */
.preview-section {
    text-align: center;
}

.preview-section.hidden {
    display: none;
}

#previewImage {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Results Container */
.results-container {
    min-height: 200px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    background: #f8f9fa;
}

/* Analysis Results */
.analysis-results h6 {
    color: #495057;
    margin-bottom: 15px;
}

.btn-group-vertical .btn {
    text-align: left;
    margin-bottom: 8px;
}

/* Detection Results */
.detection-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
}

.detection-item.pole { border-left: 4px solid #8B4513; }
.detection-item.crossArm { border-left: 4px solid #A0522D; }
.detection-item.transformer { border-left: 4px solid #32CD32; }
.detection-item.insulator { border-left: 4px solid #FFD700; }

.detection-label {
    font-weight: bold;
    color: #495057;
}

.detection-confidence {
    color: #28a745;
    font-size: 0.9em;
}

.detection-coordinates {
    color: #6c757d;
    font-size: 0.8em;
    font-family: monospace;
}

/* Progress Indicators */
.progress-container {
    margin: 20px 0;
}

.progress-step {
    display: inline-block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    text-align: center;
    line-height: 30px;
    margin: 0 5px;
    font-size: 12px;
    font-weight: bold;
}

.progress-step.active {
    background: #007bff;
    color: white;
}

.progress-step.completed {
    background: #28a745;
    color: white;
}

/* Notification System */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.notification.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.notification.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.notification.info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* AI Analysis Overlay System */
.ai-analysis-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.ai-analysis-overlay.active {
    opacity: 1;
    visibility: visible;
}

.ai-analysis-popup {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.ai-analysis-overlay.active .ai-analysis-popup {
    transform: scale(1);
}

.ai-analysis-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.ai-analysis-popup-title {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.ai-analysis-popup-close {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.ai-analysis-popup-close:hover {
    background: #f0f0f0;
    color: #333;
}

.ai-analysis-results {
    margin-bottom: 20px;
}

.ai-analysis-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.ai-analysis-result-item:last-child {
    border-bottom: none;
}

.ai-analysis-result-label {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #333;
}

.ai-analysis-result-icon {
    margin-right: 10px;
    font-size: 1.2em;
}

.ai-analysis-result-count {
    font-size: 1.3em;
    font-weight: bold;
    color: #007bff;
}

.ai-analysis-result-confidence {
    font-size: 0.9em;
    color: #666;
    margin-top: 4px;
}

.ai-analysis-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.ai-analysis-summary-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
}

.ai-analysis-summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.ai-analysis-summary-item:last-child {
    margin-bottom: 0;
}

.ai-analysis-summary-label {
    color: #666;
}

.ai-analysis-summary-value {
    font-weight: 600;
    color: #333;
}

/* Suppress TensorFlow.js warnings in console */
.tf-warning-suppress {
    /* This is a placeholder for potential CSS-based warning suppression */
}

/* Phase 5: UI/UX Enhancement Styles */

/* Statistics Dashboard */
.stat-card {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: white;
    font-size: 1.2rem;
}

.stat-content h6 {
    margin: 0;
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 600;
}

.stat-content span {
    font-size: 1.5rem;
    font-weight: bold;
    color: #212529;
}

/* Training Snapshots */
.snapshot-card {
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
}

.snapshot-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.snapshot-info {
    margin: 0.5rem 0;
}

.snapshot-info .badge {
    margin-right: 0.25rem;
    font-size: 0.75rem;
}

/* Progress Overlay */
.progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.progress-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.progress-content h5 {
    margin-bottom: 1rem;
    color: #212529;
}

.progress-content .progress {
    border-radius: 10px;
    overflow: hidden;
}

.progress-content .progress-bar {
    background: linear-gradient(90deg, #007bff, #0056b3);
}

/* Error Notifications */
#error-notifications {
    max-width: 400px;
}

#error-notifications .alert {
    margin-bottom: 0.5rem;
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .stat-card {
        margin-bottom: 1rem;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .stat-content span {
        font-size: 1.25rem;
    }
    
    .progress-content {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    #error-notifications {
        max-width: 100%;
        padding: 0.5rem;
    }
}

/* Enhanced Card Styles */
.card {
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

/* Enhanced Button Styles */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: none;
}

/* Enhanced Upload Zone */
#uploadZone {
    border-radius: 12px;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

#uploadZone:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Enhanced Results Section */
.alert {
    border-radius: 12px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state p {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.8;
}

/* Stats Cards */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: white;
    font-size: 1.2rem;
}

.stat-content h6 {
    margin: 0;
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 600;
}

.stat-content span {
    font-size: 1.5rem;
    font-weight: bold;
    color: #212529;
    display: block;
    margin: 0.25rem 0;
}

.stat-content small {
    color: #28a745;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Training Snapshot Management Section */
.snapshot-management-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.snapshot-header {
    margin-bottom: 1.5rem;
}

.snapshot-header h5 {
    color: #495057;
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.snapshot-header p {
    color: #6c757d;
    margin: 0;
    font-size: 0.9rem;
}

.snapshot-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.snapshot-selector {
    margin-bottom: 1rem;
}

.snapshot-selector label {
    display: block;
    margin-bottom: 0.5rem;
    color: #495057;
    font-weight: 500;
}

.snapshot-selector .form-select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #f8f9fa;
}

.snapshot-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
}

.snapshot-current {
    color: #495057;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Responsive Design for Stats Cards and Snapshot Management */
@media (max-width: 768px) {
    .stats-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin: 1rem 0;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .stat-content span {
        font-size: 1.25rem;
    }
    
    .snapshot-management-section {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    .snapshot-controls {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .snapshot-controls .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .snapshot-management-section {
        padding: 1rem;
    }
    
    .snapshot-header h5 {
        font-size: 1rem;
    }
    
    .snapshot-header p {
        font-size: 0.8rem;
    }
}

/* Large screen optimizations for full width */
@media (min-width: 1400px) {
    .stats-cards {
        grid-template-columns: repeat(4, 1fr);
        gap: 2.5rem;
    }
    
    .ai-analysis-layout {
        gap: 4rem;
    }
    
    .snapshot-management-section {
        padding: 2.5rem;
    }
}

/* Results Display */
.result-summary {
    background: #e3f2fd;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid #2196f3;
}

.result-summary h6 {
    color: #1976d2;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.result-summary p {
    color: #424242;
    margin: 0;
    font-size: 0.9rem;
}

/* Responsive Design for Stats Cards and Snapshot Management */
@media (max-width: 768px) {
    .stats-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin: 1rem 0;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .stat-content span {
        font-size: 1.25rem;
    }
    
    .snapshot-management-section {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    .snapshot-controls {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .snapshot-controls .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .snapshot-management-section {
        padding: 1rem;
    }
    
    .snapshot-header h5 {
        font-size: 1rem;
    }
    
    .snapshot-header p {
        font-size: 0.8rem;
    }
}

/* Large screen optimizations for full width */
@media (min-width: 1400px) {
    .stats-cards {
        grid-template-columns: repeat(4, 1fr);
        gap: 2.5rem;
    }
    
    .ai-analysis-layout {
        gap: 4rem;
    }
    
    .snapshot-management-section {
        padding: 2.5rem;
    }
}

/* Glassmorphism Table Styles */
.glassmorphism-table {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 1rem;
}

.table-header {
    background: rgba(255, 255, 255, 0.15);
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.table-header h5 {
    color: #495057;
    margin: 0 0 0.5rem 0;
    font-weight: 600;
    font-size: 1.1rem;
}

.table-header p {
    color: #6c757d;
    margin: 0;
    font-size: 0.9rem;
}

.table-body {
    padding: 0;
}

.table-row {
    display: flex;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.table-row:last-child {
    border-bottom: none;
}

.table-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.component-info {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.component-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}

.component-details h6 {
    color: #495057;
    margin: 0 0 0.25rem 0;
    font-weight: 600;
    font-size: 0.95rem;
}

.component-type {
    color: #6c757d;
    font-size: 0.8rem;
    font-weight: 500;
}

.component-stats {
    display: flex;
    gap: 1.5rem;
    margin: 0 1.5rem;
    flex-shrink: 0;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.stat-label {
    color: #6c757d;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    color: #495057;
    font-weight: 600;
    font-size: 0.9rem;
}

.component-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.training-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.training-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #495057;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.training-btn i {
    font-size: 0.9rem;
}

/* Default Results Display */
.default-results {
    display: block;
}

/* Responsive Design for Glassmorphism Table */
@media (max-width: 768px) {
    .table-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem;
    }
    
    .component-info {
        width: 100%;
    }
    
    .component-stats {
        width: 100%;
        justify-content: space-between;
        margin: 0;
    }
    
    .component-actions {
        align-self: flex-end;
    }
    
    .stat-item {
        min-width: 50px;
    }
}

@media (max-width: 480px) {
    .glassmorphism-table {
        border-radius: 12px;
    }
    
    .table-header {
        padding: 1rem;
    }
    
    .table-header h5 {
        font-size: 1rem;
    }
    
    .component-icon {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .component-details h6 {
        font-size: 0.9rem;
    }
    
    .component-type {
        font-size: 0.75rem;
    }
    
    .stat-value {
        font-size: 0.85rem;
    }
    
    .training-btn {
        width: 32px;
        height: 32px;
    }
    
    .training-btn i {
        font-size: 0.8rem;
    }
}

.hidden { display: none !important; }
.component-row.inactive { opacity: 0.5; pointer-events: none; }

/* Responsive: maintain aspect ratio on small screens */
/* ============================================================================
   NEW SETTINGS PAGE STYLES
   ============================================================================
   
   @file public/assets/css/custom.css
   @version 19.2.0
   @description New Settings page styles with standard dashboard template
   @author AI Development Team
   @lastUpdated 2025-07-06
   
   Features:
   - Standard dashboard template structure
   - Bootstrap grid layout compliance
   - Responsive design for all screen sizes
   - Project standards compliant styling
   ============================================================================ */

/* Advanced Diagnostic Page - Standard Template */
.advanced-diagnostic .card {
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.advanced-diagnostic .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.advanced-diagnostic .card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    border-radius: 12px 12px 0 0;
    padding: 1.5rem;
}

.advanced-diagnostic .card-title {
    color: #495057;
    font-weight: 600;
    margin: 0;
}

.advanced-diagnostic .card-text {
    color: #6c757d;
    margin: 0.5rem 0 0 0;
    font-size: 0.9rem;
}

.advanced-diagnostic .card-body {
    padding: 1.5rem;
}

/* Form Elements */
.advanced-diagnostic .form-label {
    color: #495057;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.advanced-diagnostic .form-control,
.advanced-diagnostic .form-select {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.advanced-diagnostic .form-control:focus,
.advanced-diagnostic .form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.advanced-diagnostic .form-range {
    height: 6px;
    border-radius: 3px;
    background: #e9ecef;
}

.advanced-diagnostic .form-range::-webkit-slider-thumb {
    background: #007bff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.advanced-diagnostic .form-check-input:checked {
    background-color: #007bff;
    border-color: #007bff;
}

/* Buttons */
.advanced-diagnostic .btn {
    border-radius: 6px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.advanced-diagnostic .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Summary Cards */
.advanced-diagnostic .summary-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.advanced-diagnostic .summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.advanced-diagnostic .summary-card .icon-box {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.advanced-diagnostic .summary-card h6 {
    margin: 0;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.8);
    font-weight: 500;
}

.advanced-diagnostic .summary-card h4 {
    margin: 0.5rem 0 0 0;
    font-weight: bold;
    color: white;
}

/* Priority Badge */
.advanced-diagnostic .badge {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .advanced-diagnostic .card-header {
        padding: 1rem;
    }
    
    .advanced-diagnostic .card-body {
        padding: 1rem;
    }
    
    .advanced-diagnostic .summary-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .advanced-diagnostic .summary-card .icon-box {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .advanced-diagnostic .card-title {
        font-size: 1.1rem;
    }
    
    .advanced-diagnostic .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .advanced-diagnostic .summary-card h4 {
        font-size: 1.25rem;
    }
}

/* Live Log Streaming Styles */
.live-log-container {
  position: relative;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  background: #f8f9fa;
}

.live-log-viewer {
  height: 400px;
  overflow-y: auto;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.4;
  padding: 10px;
  background: #1e1e1e;
  color: #d4d4d4;
}

.live-log-entry {
  margin-bottom: 2px;
  padding: 2px 0;
  border-bottom: 1px solid #2d2d2d;
}

.live-log-entry:hover {
  background: #2d2d2d;
}

.live-log-entry.error {
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.1);
}

.live-log-entry.warn {
  color: #ffd93d;
  background: rgba(255, 217, 61, 0.1);
}

.live-log-entry.success {
  color: #6bcf7f;
  background: rgba(107, 207, 127, 0.1);
}

.live-log-entry.info {
  color: #4dabf7;
  background: rgba(77, 171, 247, 0.1);
}

.live-log-entry.debug {
  color: #adb5bd;
  background: rgba(173, 181, 189, 0.1);
}

.live-log-timestamp {
  color: #868e96;
  font-size: 11px;
}

.live-log-level {
  font-weight: bold;
  margin-right: 8px;
}

.live-log-component {
  color: #74c0fc;
  font-weight: bold;
}

.live-log-function {
  color: #ffd43b;
}

.live-log-message {
  color: #e9ecef;
}

.live-stream-active {
  border-color: #28a745;
  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.live-stream-inactive {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.live-stream-connecting {
  border-color: #ffc107;
  box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.25);
}

/* Connection status indicators */
.connection-status {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
}

.connection-status.connected {
  background: #28a745;
  animation: pulse 2s infinite;
}

.connection-status.disconnected {
  background: #dc3545;
}

.connection-status.connecting {
  background: #ffc107;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

@media (max-width: 600px) {
  .flip-container {
    max-width: 100vw;
    height: 220px;
  }
}

/* ============================================================================
   ADVANCED DIAGNOSTIC - REAL-TIME MONITORING UI ENHANCEMENTS
   ============================================================================
   
   @file public/assets/css/custom.css
   @version 19.3.0
   @description Enhanced UI for real-time system monitoring
   @author AI Development Team
   @lastUpdated 2025-07-10
   
   Features:
   - Real-time monitoring cards with animations
   - Performance chart placeholder styling
   - Monitoring status indicators
   - Enhanced metric displays
   - Responsive design for monitoring UI
   ============================================================================ */

/* Real-Time Monitoring Section */
.real-time-monitoring .card {
  border: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.real-time-monitoring .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.real-time-monitoring .card-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px 12px 0 0;
}

.real-time-monitoring .card-title {
  margin: 0;
  font-weight: 600;
}

.real-time-monitoring .card-text {
  opacity: 0.9;
  margin: 0;
}

/* Monitoring Controls */
.monitoring-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.monitoring-controls .btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.monitoring-controls .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Monitoring Status Badge */
#monitoringStatus {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
  transition: all 0.3s ease;
}

#monitoringStatus.bg-success {
  animation: pulse 2s infinite;
}

#monitoringStatus.bg-secondary {
  opacity: 0.7;
}

/* Metric Cards */
.real-time-monitoring .card-body .card {
  border: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.real-time-monitoring .card-body .card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}

.real-time-monitoring .card-body .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.real-time-monitoring .card-body .card h6 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

.real-time-monitoring .card-body .card h4 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.real-time-monitoring .card-body .card small {
  font-size: 0.75rem;
  opacity: 0.8;
}

/* Performance Chart */
#performanceChart {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 2px dashed #dee2e6;
  border-radius: 8px;
  transition: all 0.3s ease;
}

#performanceChart:hover {
  border-color: #6c757d;
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

#performanceChart .text-muted {
  text-align: center;
  color: #6c757d !important;
}

#performanceChart .text-muted i {
  color: #adb5bd;
  margin-bottom: 0.5rem;
}

#performanceChart .text-muted p {
  margin: 0;
  font-size: 0.875rem;
}

/* Enhanced Summary Cards */
.diagnostic-summary .card {
  border: none;
  border-radius: 10px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.diagnostic-summary .card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
}

.diagnostic-summary .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.diagnostic-summary .card h6 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  opacity: 0.9;
}

.diagnostic-summary .card h4 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.diagnostic-summary .card small {
  font-size: 0.75rem;
  opacity: 0.8;
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
  .real-time-monitoring .card-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .monitoring-controls {
    justify-content: center;
  }
  
  .real-time-monitoring .card-body .card h4 {
    font-size: 1.25rem;
  }
  
  .diagnostic-summary .card h4 {
    font-size: 1.5rem;
  }
  
  /* Mobile responsive adjustments for diagnostic layout */
  .diagnostic-layout {
    flex-direction: column;
    gap: 15px;
  }
  
  .diagnostic-form-panel {
    max-width: 100%;
  }
  
  .diagnostic-results-panel {
    min-height: 400px;
  }
  
  /* Mobile responsive adjustments for analytics cards */
  #analyticsInsights .col-md-3 {
    margin-bottom: 15px;
  }
  
  #analyticsInsights .col-md-3 .card {
    min-height: 120px;
  }
  
  /* Mobile responsive adjustments for AI decision tracking */
  #aiDecisionTracking .row {
    flex-direction: column;
  }
  
  #aiDecisionTracking .col-xl-6 {
    margin-bottom: 20px;
  }
  
  /* Ensure cards don't stretch too much on mobile */
  .advanced-diagnostic-page .card {
    min-height: auto;
  }
}

@media (max-width: 480px) {
  .real-time-monitoring .card-header {
    padding: 1rem;
  }
  
  .monitoring-controls .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }
  
  .real-time-monitoring .card-body .card {
    margin-bottom: 1rem;
  }
  
  .real-time-monitoring .card-body .card h4 {
    font-size: 1.125rem;
  }
  
  .diagnostic-summary .card h4 {
    font-size: 1.25rem;
  }
}

/* --- EOD Report Configuration Page Styles --- */
html, body {
    overflow-y: scroll !important;
}
body.modal-open {
    padding-right: 0 !important;
    margin-right: 0 !important;
}
#eodPreviewModal .modal-dialog {
    position: fixed !important;
    top: 5vh !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 90vw !important;
    max-width: 90vw !important;
    margin: 0 !important;
    z-index: 1055 !important;
}
#eodPreviewModalBody iframe {
    max-width: 100vw;
    box-sizing: border-box;
    display: block;
    margin: 0 auto;
}
.modal-xl {
    max-width: 100vw !important;
    margin: 0;
}
.eod-preview {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    font-family: Arial, sans-serif;
}
.eod-preview h2 {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    margin-bottom: 20px;
}
.eod-preview .section {
    margin-bottom: 25px;
    padding: 15px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.eod-preview .section h3 {
    color: #34495e;
    margin-bottom: 10px;
    font-size: 16px;
}
.eod-preview .metric {
    display: inline-block;
    margin: 5px 15px 5px 0;
    padding: 8px 12px;
    background: #ecf0f1;
    border-radius: 4px;
    font-size: 14px;
}
.eod-preview .metric strong {
    color: #2c3e50;
}
.eod-preview .status-good {
    color: #27ae60;
}
.eod-preview .status-warning {
    color: #f39c12;
}
.eod-preview .status-error {
    color: #e74c3c;
}
.eod-preview .footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #bdc3c7;
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
}
.template-preview {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    background: #fafafa;
}
.recipient-tag {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    margin: 2px;
    font-size: 12px;
}
.recipient-tag .remove {
    margin-left: 5px;
    cursor: pointer;
    font-weight: bold;
}
/* --- End EOD Report Configuration Page Styles --- */

/* ============================================================================
   ASSET TABLE STYLES
   ============================================================================
   
   @file public/assets/css/custom.css
   @version 19.2.2
   @description Enhanced styling for asset tables with modern design
   @author AI Development Team
   @lastUpdated 2025-01-27
   
   Features:
   - Modern glassmorphism design
   - Enhanced typography and spacing
   - Hover effects and animations
   - Responsive design
   - Status indicators and badges
   ============================================================================ */

/* Asset Table Container */
.asset-table-container {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 30px;
    border: 1px solid #e9ecef;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Asset Table Header */
.asset-table-header {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px 25px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.asset-table-header h3 {
    color: #212529;
    font-weight: 600;
    font-size: 1.5rem;
    margin: 0;
}

.asset-table-header p {
    color: #6c757d;
    margin: 8px 0 0 0;
    font-size: 0.95rem;
    font-weight: 400;
}

/* Asset Stats Cards */
.asset-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.asset-stat-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
    position: relative;
}

.asset-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #007bff;
}

.asset-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.asset-stat-card .stat-icon {
    font-size: 2rem;
    margin-bottom: 12px;
    color: #007bff;
}

.asset-stat-card .stat-number {
    font-size: 1.75rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 5px;
}

.asset-stat-card .stat-label {
    color: #6c757d;
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Enhanced Tabulator Styling */
.tabulator {
    background: #ffffff !important;
    border-radius: 8px !important;
    border: 1px solid #e9ecef !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
    overflow: hidden !important;
}

.tabulator-header {
    background: #f8f9fa !important;
    border-bottom: 1px solid #e9ecef !important;
}

.tabulator-col {
    background: transparent !important;
    border-right: 1px solid #e9ecef !important;
    color: #495057 !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    padding: 12px 10px !important;
    transition: all 0.2s ease !important;
}

.tabulator-col:hover {
    background: #e9ecef !important;
}

.tabulator-col.tabulator-sortable:hover {
    background: #dee2e6 !important;
}

.tabulator-col.tabulator-sortable[aria-sort="asc"]::after,
.tabulator-col.tabulator-sortable[aria-sort="desc"]::after {
    color: #007bff !important;
    font-size: 1rem !important;
}

.tabulator-row {
    background: #ffffff !important;
    border-bottom: 1px solid #f1f3f4 !important;
    transition: all 0.2s ease !important;
}

.tabulator-row:hover {
    background: #f8f9fa !important;
}

.tabulator-row.tabulator-row-even {
    background: #f8f9fa !important;
}

.tabulator-row.tabulator-row-even:hover {
    background: #e9ecef !important;
}

.tabulator-cell {
    padding: 10px 12px !important;
    border-right: 1px solid #f1f3f4 !important;
    font-size: 0.875rem !important;
    color: #212529 !important;
    font-weight: 400 !important;
    vertical-align: middle !important;
}

/* Key Column Styling */
.tabulator-cell[data-field="GLOBALID"],
.tabulator-cell[data-field="ASSETGROUP"],
.tabulator-cell[data-field="ASSETTYPE"] {
    background: #f8f9fa !important;
    font-weight: 600 !important;
    color: #007bff !important;
    position: relative;
}

.tabulator-cell[data-field="GLOBALID"]::before,
.tabulator-cell[data-field="ASSETGROUP"]::before,
.tabulator-cell[data-field="ASSETTYPE"]::before {
    content: '🔑';
    margin-right: 6px;
    font-size: 0.75rem;
}

/* Status Badges */
.asset-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.asset-status.active {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.asset-status.inactive {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.asset-status.maintenance {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Tooltip Styling */
.tabulator-tooltip {
    background: rgba(44,62,80,0.95) !important;
    color: white !important;
    border-radius: 8px !important;
    padding: 10px 15px !important;
    font-size: 0.85rem !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    max-width: 300px !important;
}

/* Pagination Styling */
.tabulator-footer {
    background: #f8f9fa !important;
    border-top: 1px solid #e9ecef !important;
    padding: 12px 20px !important;
}

.tabulator-paginator {
    color: #495057 !important;
    font-weight: 500 !important;
}

.tabulator-page {
    background: #ffffff !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 4px !important;
    padding: 6px 10px !important;
    margin: 0 2px !important;
    transition: all 0.2s ease !important;
    color: #495057 !important;
    font-weight: 500 !important;
}

.tabulator-page:hover {
    background: #007bff !important;
    color: white !important;
    border-color: #007bff !important;
}

.tabulator-page.tabulator-page-active {
    background: #007bff !important;
    color: white !important;
    border-color: #007bff !important;
}

/* Search and Filter Styling */
.tabulator-input-filter {
    background: rgba(255,255,255,0.9) !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    font-size: 0.9rem !important;
    transition: all 0.3s ease !important;
}

.tabulator-input-filter:focus {
    background: white !important;
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1) !important;
    outline: none !important;
}

/* Loading State */
.tabulator-loading {
    background: rgba(255,255,255,0.9) !important;
    backdrop-filter: blur(10px) !important;
}

.tabulator-loading::after {
    border: 3px solid rgba(102,126,234,0.2) !important;
    border-top: 3px solid #667eea !important;
    border-radius: 50% !important;
    width: 30px !important;
    height: 30px !important;
    animation: spin 1s linear infinite !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .asset-table-container {
        padding: 15px;
        border-radius: 15px;
    }
    
    .asset-table-header {
        padding: 15px 20px;
    }
    
    .asset-table-header h3 {
        font-size: 1.5rem;
    }
    
    .asset-stats {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .asset-stat-card {
        padding: 15px;
    }
    
    .asset-stat-card .stat-icon {
        font-size: 2rem;
    }
    
    .asset-stat-card .stat-number {
        font-size: 1.5rem;
    }
    
    .tabulator-col {
        padding: 10px 8px !important;
        font-size: 0.8rem !important;
    }
    
    .tabulator-cell {
        padding: 8px 10px !important;
        font-size: 0.85rem !important;
    }
}

@media (max-width: 480px) {
    .asset-stats {
        grid-template-columns: 1fr;
    }
    
    .asset-stat-card {
        padding: 12px;
    }
    
    .tabulator-col {
        padding: 8px 6px !important;
        font-size: 0.75rem !important;
    }
    
    .tabulator-cell {
        padding: 6px 8px !important;
        font-size: 0.8rem !important;
    }
}

/* ============================================================================
   ASSET TABLE BUTTON STYLES
   ============================================================================
   
   @file public/assets/css/custom.css
   @version 19.2.3
   @description Professional button styling for asset table interface
   @author AI Development Team
   @lastUpdated 2025-01-27
   
   Features:
   - Professional button design system
   - Consistent spacing and typography
   - Hover effects and transitions
   - Icon integration
   - Responsive design
   ============================================================================ */

/* Button Container */
.asset-button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* Base Button Styles */
.asset-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.5;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.asset-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.asset-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.asset-btn i {
    margin-right: 6px;
    font-size: 0.875rem;
}

/* Download Buttons */
.asset-btn-download {
    background: #ffffff;
    border-color: #dee2e6;
    color: #495057;
}

.asset-btn-download:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    color: #212529;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.asset-btn-download:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* CSV Download */
.asset-btn-csv {
    background: #ffffff;
    border-color: #28a745;
    color: #28a745;
}

.asset-btn-csv:hover {
    background: #28a745;
    border-color: #28a745;
    color: #ffffff;
}

/* JSON Download */
.asset-btn-json {
    background: #ffffff;
    border-color: #6c757d;
    color: #6c757d;
}

.asset-btn-json:hover {
    background: #6c757d;
    border-color: #6c757d;
    color: #ffffff;
}

/* XLSX Download */
.asset-btn-xlsx {
    background: #ffffff;
    border-color: #17a2b8;
    color: #17a2b8;
}

.asset-btn-xlsx:hover {
    background: #17a2b8;
    border-color: #17a2b8;
    color: #ffffff;
}

/* PDF Download */
.asset-btn-pdf {
    background: #ffffff;
    border-color: #dc3545;
    color: #dc3545;
}

.asset-btn-pdf:hover {
    background: #dc3545;
    border-color: #dc3545;
    color: #ffffff;
}

/* Action Buttons */
.asset-btn-action {
    background: #007bff;
    border-color: #007bff;
    color: #ffffff;
}

.asset-btn-action:hover {
    background: #0056b3;
    border-color: #0056b3;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.asset-btn-action:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 123, 255, 0.3);
}

/* Secondary Action Buttons */
.asset-btn-secondary {
    background: #6c757d;
    border-color: #6c757d;
    color: #ffffff;
}

.asset-btn-secondary:hover {
    background: #545b62;
    border-color: #545b62;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.3);
}

/* Success Action Buttons */
.asset-btn-success {
    background: #28a745;
    border-color: #28a745;
    color: #ffffff;
}

.asset-btn-success:hover {
    background: #1e7e34;
    border-color: #1e7e34;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

/* Warning Action Buttons */
.asset-btn-warning {
    background: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

.asset-btn-warning:hover {
    background: #e0a800;
    border-color: #e0a800;
    color: #212529;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.3);
}

/* Info Action Buttons */
.asset-btn-info {
    background: #17a2b8;
    border-color: #17a2b8;
    color: #ffffff;
}

.asset-btn-info:hover {
    background: #138496;
    border-color: #138496;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(23, 162, 184, 0.3);
}

/* Dark Action Buttons */
.asset-btn-dark {
    background: #343a40;
    border-color: #343a40;
    color: #ffffff;
}

.asset-btn-dark:hover {
    background: #23272b;
    border-color: #23272b;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(52, 58, 64, 0.3);
}

/* Button Sizes */
.asset-btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.asset-btn-lg {
    padding: 12px 24px;
    font-size: 1rem;
}

/* Button with Loading State */
.asset-btn-loading {
    position: relative;
    color: transparent !important;
}

.asset-btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Form Controls */
.asset-form-select {
    display: inline-block;
    padding: 8px 12px;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    background-color: #ffffff;
    border: 1px solid #ced4da;
    border-radius: 6px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    margin-left: 8px;
    min-width: 140px;
}

.asset-form-select:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.asset-form-select:hover {
    border-color: #adb5bd;
}

/* Button Groups */
.asset-btn-group {
    display: inline-flex;
    border-radius: 6px;
    overflow: hidden;
}

.asset-btn-group .asset-btn {
    border-radius: 0;
    border-right-width: 0;
}

.asset-btn-group .asset-btn:first-child {
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

.asset-btn-group .asset-btn:last-child {
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
    border-right-width: 1px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .asset-button-group {
        flex-direction: column;
        gap: 6px;
    }
    
    .asset-btn {
        width: 100%;
        justify-content: flex-start;
    }
    
    .asset-form-select {
        width: 100%;
        margin-left: 0;
        margin-top: 8px;
    }
}

@media (max-width: 480px) {
    .asset-btn {
        padding: 10px 12px;
        font-size: 0.8rem;
    }
    
    .asset-btn i {
        margin-right: 4px;
        font-size: 0.8rem;
    }
}

/* Button Animation Keyframes */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ====================================
   MODERN COLUMN CHOOSER STYLES
   ====================================
   
   @file public/assets/css/custom.css
   @version 19.2.1
   @description Modern column chooser modal styles for asset management
   @author AI Development Team
   @lastUpdated 2025-01-27
   
   Features:
   - Professional modal overlay with backdrop blur
   - Search functionality for columns
   - Category filtering system
   - Column statistics display
   - Modern toggle switches
   - Responsive design
   - Dark theme support
   ==================================== */

.column-chooser-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1050;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.column-chooser-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.column-chooser-modal {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid #e9ecef;
}

.column-chooser-overlay.active .column-chooser-modal {
    transform: scale(1) translateY(0);
}

.column-chooser-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px 32px;
    position: relative;
}

.column-chooser-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.column-chooser-header .close-btn {
    position: absolute;
    top: 20px;
    right: 24px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
}

.column-chooser-header .close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.column-chooser-body {
    padding: 32px;
    max-height: 60vh;
    overflow-y: auto;
}

.column-chooser-search {
    margin-bottom: 24px;
    position: relative;
}

.column-chooser-search input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.2s ease;
    background: #f8f9fa;
}

.column-chooser-search input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.column-chooser-search i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 16px;
}

.column-chooser-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.column-item-modern {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.column-item-modern:hover {
    border-color: #667eea;
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.column-item-modern.active {
    border-color: #28a745;
    background: linear-gradient(135deg, #f8fff9 0%, #e8f5e8 100%);
}

.column-item-modern.priority {
    border-color: #ffc107;
    background: linear-gradient(135deg, #fffbf0 0%, #fff3cd 100%);
}

.column-item-modern.required {
    border-color: #dc3545;
    background: linear-gradient(135deg, #fff5f5 0%, #f8d7da 100%);
}

.column-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.column-item-title {
    font-weight: 600;
    color: #212529;
    font-size: 14px;
    margin: 0;
    flex: 1;
}

.column-item-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    background: #dee2e6;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.column-item-toggle.active {
    background: #28a745;
}

.column-item-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.column-item-toggle.active::after {
    transform: translateX(20px);
}

.column-item-description {
    font-size: 12px;
    color: #6c757d;
    margin: 0;
    line-height: 1.4;
}

.column-item-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.column-item-badge.priority {
    background: #fff3cd;
    color: #856404;
}

.column-item-badge.required {
    background: #f8d7da;
    color: #721c24;
}

.column-chooser-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 24px;
    border-top: 1px solid #e9ecef;
}

.column-chooser-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.column-chooser-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.column-chooser-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.column-chooser-btn.secondary {
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.column-chooser-btn.secondary:hover {
    background: #e9ecef;
    color: #495057;
}

.column-chooser-btn.danger {
    background: #dc3545;
    color: white;
}

.column-chooser-btn.danger:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.column-chooser-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.column-stat {
    text-align: center;
    flex: 1;
}

.column-stat-number {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
    margin: 0;
}

.column-stat-label {
    font-size: 12px;
    color: #6c757d;
    margin: 4px 0 0 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.column-categories {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.category-filter {
    padding: 8px 16px;
    border: 2px solid #e9ecef;
    border-radius: 20px;
    background: white;
    color: #6c757d;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-filter:hover {
    border-color: #667eea;
    color: #667eea;
}

.category-filter.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

/* Responsive design for column chooser */
@media (max-width: 768px) {
    .column-chooser-modal {
        width: 95%;
        margin: 20px;
    }
    
    .column-chooser-header {
        padding: 20px 24px;
    }
    
    .column-chooser-body {
        padding: 24px;
    }
    
    .column-chooser-content {
        grid-template-columns: 1fr;
    }
    
    .column-chooser-actions {
        flex-direction: column;
    }
    
    .column-chooser-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Dark theme support for column chooser */
[data-bs-theme="dark"] .column-chooser-modal {
    background: #212529;
    border-color: #495057;
}

[data-bs-theme="dark"] .column-chooser-header {
    background: linear-gradient(135deg, #495057 0%, #343a40 100%);
}

[data-bs-theme="dark"] .column-item-modern {
    background: #343a40;
    border-color: #495057;
    color: #f8f9fa;
}

[data-bs-theme="dark"] .column-item-modern:hover {
    background: #495057;
    border-color: #6c757d;
}

[data-bs-theme="dark"] .column-chooser-search input {
    background: #343a40;
    border-color: #495057;
    color: #f8f9fa;
}

[data-bs-theme="dark"] .column-chooser-search input:focus {
    background: #495057;
    border-color: #6c757d;
}

[data-bs-theme="dark"] .column-chooser-stats {
    background: #343a40;
    border-color: #495057;
}

[data-bs-theme="dark"] .category-filter {
    background: #343a40;
    border-color: #495057;
    color: #adb5bd;
}

[data-bs-theme="dark"] .category-filter:hover {
    border-color: #6c757d;
    color: #f8f9fa;
}

[data-bs-theme="dark"] .category-filter.active {
    background: #6c757d;
    border-color: #6c757d;
    color: #212529;
}

/* Column chooser content styling */
.column-chooser-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.column-chooser-content h4 {
    color: #333;
    margin-bottom: 10px;
}

.column-chooser-content p {
    color: #666;
    margin-bottom: 20px;
}

#column-chooser-container {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    min-height: 200px;
    background: #e3f2fd !important;
    border: 3px solid #2196f3 !important;
    border-radius: 8px;
    margin: 10px 0;
    position: relative;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Debug styling to make content more visible */
.flip-card-back {
    background: #fff3e0 !important;
    border: 2px solid #ff9800 !important;
}

/* Ensure column chooser content is visible */
.column-chooser-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    flex: 1;
    overflow: hidden;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .flip-container {
        min-height: 500px;
    }
    
    .flip-card-back {
        padding: 15px;
    }
}

/* ====================================
   MIGRATION PANEL STYLES
   ==================================== */

.migration-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -5px 0 20px rgba(0,0,0,0.15);
    z-index: 1050;
    transition: right 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-y: auto;
    border-left: 1px solid #e9ecef;
}

.migration-panel.active {
    right: 0;
}

.migration-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.migration-panel-overlay.active {
    opacity: 1;
    visibility: visible;
}

.migration-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.migration-panel-header h4 {
    margin: 0;
    color: #212529;
    font-weight: 600;
}

.migration-panel-header .btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.migration-panel-header .btn-close:hover {
    color: #dc3545;
}

.migration-panel-content {
    padding: 20px;
}

.migration-section {
    margin-bottom: 30px;
}

.migration-section h5 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 1rem;
}

.migration-status-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.status-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}

.status-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.status-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.status-icon.success {
    background: #d4edda;
    color: #155724;
}

.status-icon.warning {
    background: #fff3cd;
    color: #856404;
}

.status-icon.error {
    background: #f8d7da;
    color: #721c24;
}

.status-info {
    flex: 1;
}

.status-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #212529;
    line-height: 1;
}

.status-label {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 2px;
}

.migration-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.migration-controls .btn {
    flex: 1;
    min-width: 80px;
    font-size: 0.875rem;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.migration-controls .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.progress {
    height: 8px;
    border-radius: 4px;
    background: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, #007bff, #0056b3);
    border-radius: 4px;
}

.field-mappings {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
}

.mapping-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.mapping-item:last-child {
    border-bottom: none;
}

.mapping-source {
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: #495057;
}

.mapping-target {
    background: #d1ecf1;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: #0c5460;
}

.mapping-item i {
    color: #6c757d;
    margin: 0 10px;
}

.migration-log {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    max-height: 200px;
    overflow-y: auto;
}

.log-entry {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.log-entry:last-child {
    border-bottom: none;
}

.log-time {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: #6c757d;
    min-width: 60px;
}

.log-message {
    flex: 1;
    font-size: 0.875rem;
    color: #212529;
}

.log-entry.success .log-message {
    color: #155724;
}

.log-entry.info .log-message {
    color: #0c5460;
}

.log-entry.warning .log-message {
    color: #856404;
}

.log-entry.error .log-message {
    color: #721c24;
}

/* Responsive design for migration panel */
@media (max-width: 768px) {
    .migration-panel {
        width: 100%;
        right: -100%;
    }
    
    .migration-status-cards {
        grid-template-columns: 1fr;
    }
    
    .migration-controls {
        flex-direction: column;
    }
    
    .migration-controls .btn {
        width: 100%;
    }
}

/* Dark theme support for migration panel */
[data-bs-theme="dark"] .migration-panel {
    background: #212529;
    border-left-color: #495057;
}

[data-bs-theme="dark"] .migration-panel-header {
    background: #343a40;
    border-bottom-color: #495057;
}

[data-bs-theme="dark"] .migration-panel-header h4 {
    color: #f8f9fa;
}

[data-bs-theme="dark"] .status-card {
    background: #343a40;
    border-color: #495057;
}

[data-bs-theme="dark"] .field-mappings,
[data-bs-theme="dark"] .migration-log {
    background: #343a40;
    border-color: #495057;
}

[data-bs-theme="dark"] .mapping-source {
    background: #495057;
    color: #f8f9fa;
}

[data-bs-theme="dark"] .mapping-target {
    background: #0c5460;
    color: #d1ecf1;
}

/* --- PRODUCTION FIX: Ensure Tabulator container and parents are visible --- */
.flip-container,
.flip-card-front,
.flip-card,
#Asset-table {
    min-height: 400px !important;
    height: 400px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* ============================================================================
   ESRI SCHEMA DASHBOARD STYLES
   ============================================================================
   
   @file public/assets/css/custom.css
   @version 19.0.0
   @description Enhanced ESRI Schema Dashboard styling
   @author AI Development Team
   @lastUpdated 2025-01-27
   
   Features:
   - ESRI Schema Dashboard modal styling
   - Asset class and type visualization
   - Field mapping interface
   - Schema validation display
   - Responsive design
   ============================================================================ */

/* ESRI Schema Dashboard Styles */
.esri-schema-dashboard {
    padding: 20px;
}

.asset-class-card {
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #dee2e6;
    background: white;
}

.asset-class-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-color: #007bff;
}

.asset-class-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0,123,255,0.1);
}

.asset-class-item {
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
    background: white;
}

.asset-class-item:hover {
    background: rgba(0,123,255,0.05);
    border-color: #007bff;
}

.asset-types .badge {
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

.asset-types .badge:hover {
    transform: scale(1.1);
}

/* ESRI Field Mapping Styles */
.esri-field-mapping {
    padding: 20px;
}

.esri-field-mapping .table {
    font-size: 0.9rem;
}

.esri-field-mapping code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
    border: 1px solid #e9ecef;
}

.esri-field-mapping .table tbody tr:hover {
    background: rgba(0,123,255,0.05);
}

/* ESRI Validation Styles */
.esri-validation {
    padding: 20px;
}

.esri-validation .card {
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
}

.esri-validation .card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.esri-validation .list-unstyled li {
    padding: 2px 0;
    border-left: 3px solid transparent;
    padding-left: 10px;
}

.esri-validation .list-unstyled li.text-danger {
    border-left-color: #dc3545;
}

.esri-validation .list-unstyled li.text-success {
    border-left-color: #28a745;
}

/* Progress bar enhancements */
.esri-validation .progress {
    height: 25px;
    border-radius: 15px;
    background: #e9ecef;
}

.esri-validation .progress-bar {
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal enhancements */
#esri-schema-modal .modal-dialog {
    max-width: 90%;
}

#esri-schema-modal .modal-body {
    max-height: 80vh;
    overflow-y: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .esri-schema-dashboard,
    .esri-field-mapping,
    .esri-validation {
        padding: 10px;
    }
    
    .asset-class-card {
        margin-bottom: 15px;
    }
    
    .esri-validation .card {
        margin-bottom: 15px;
    }
    
    .asset-class-icon {
        width: 30px;
        height: 30px;
        font-size: 1.2rem;
    }
    
    #esri-schema-modal .modal-dialog {
        max-width: 95%;
        margin: 10px;
    }
}

/* Dark theme support */
[data-bs-theme="dark"] .esri-schema-dashboard,
[data-bs-theme="dark"] .esri-field-mapping,
[data-bs-theme="dark"] .esri-validation {
    background: #212529;
    color: #f8f9fa;
}

[data-bs-theme="dark"] .asset-class-card,
[data-bs-theme="dark"] .asset-class-item {
    background: #343a40;
    border-color: #495057;
    color: #f8f9fa;
}

[data-bs-theme="dark"] .asset-class-card:hover,
[data-bs-theme="dark"] .asset-class-item:hover {
    background: #495057;
    border-color: #6c757d;
}

[data-bs-theme="dark"] .esri-field-mapping code {
    background: #495057;
    color: #f8f9fa;
    border-color: #6c757d;
}

[data-bs-theme="dark"] .esri-field-mapping .table tbody tr:hover {
    background: rgba(0,123,255,0.1);
}

/* Ensure preview image is visible when back side is shown */
.flip-container.flipped .preview-image {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure preview container is visible when back side is shown */
.flip-container.flipped .preview-container {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure back side is visible when flipped */
.flip-container.flipped .flip-card.back {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 4 !important;
}

/* Debug styles - make sure image is visible */
#preview-image, .preview-image {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: #f0f0f0 !important;
    border: 2px solid #007bff !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    max-width: 100% !important;
    max-height: 100% !important;
    transform: none !important;
    image-orientation: from-image !important;
    z-index: 10 !important;
    position: relative !important;
}

/* Ensure preview container is visible */
.preview-container {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: #e8f4fd !important;
    border: 1px solid #007bff !important;
    min-height: 200px !important;
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
}

/* Ensure back side is visible when flipped */
.flip-container.flipped .flip-card.back {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 4 !important;
    background: #e8f4fd !important;
    position: relative !important;
}

/* Force preview image visibility in flipped state */
.flip-container.flipped .preview-image,
.flip-container.flipped #preview-image {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: #f0f0f0 !important;
    border: 2px solid #007bff !important;
    position: relative !important;
    z-index: 10 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
}

/* Show this only when image has no src */
#preview-image:not([src]), #preview-image[src=""] {
    background: #ffcccc !important;
    border: 3px dashed #ff0000 !important;
}

/* AI Analysis - Clean Upload Area Styles */
.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-area:hover {
    border-color: #007bff;
    background: #e3f2fd;
}

.upload-area.dragover {
    border-color: #007bff;
    background: #e3f2fd;
    transform: scale(1.02);
}

.upload-content {
    text-align: center;
    padding: 2rem;
}

.upload-content i {
    color: #6c757d;
    margin-bottom: 1rem;
}

.upload-content h5 {
    color: #495057;
    margin-bottom: 0.5rem;
}

.upload-content p {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

/* Preview Image Styles */
#preview-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Results Styles */
.results-summary {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.5rem;
}

.result-item {
    background: #f8f9fa;
    transition: all 0.2s ease;
}

.result-item:hover {
    background: #e9ecef;
    transform: translateX(2px);
}

/* Loading and Error States */
#loading, #error-message, #analysis-results {
    min-height: 100px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .upload-area {
        min-height: 150px;
    }
    
    .upload-content {
        padding: 1rem;
    }
    
    .upload-content i {
        font-size: 2rem;
    }
    
    .upload-content h5 {
        font-size: 1.1rem;
    }
    
    .upload-content p {
        font-size: 0.9rem;
    }
}

/* AI Analysis Page Styles */
.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #007bff;
    background: #e3f2fd;
}

.upload-area.dragover {
    border-color: #28a745;
    background: #d4edda;
    transform: scale(1.02);
}

.upload-content i {
    color: #6c757d;
    margin-bottom: 15px;
}

.upload-content h5 {
    color: #495057;
    margin-bottom: 10px;
}

.upload-content p {
    color: #6c757d;
    margin-bottom: 20px;
}

#preview-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.results-summary {
    margin-top: 20px;
}

.result-item {
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.result-item:hover {
    background: #f8f9fa;
    transform: translateX(5px);
    transition: all 0.3s ease;
}

#loading, #error-message, #analysis-results {
    margin-top: 15px;
}

@media (max-width: 768px) {
    .upload-area {
        padding: 20px;
    }
    
    .upload-content {
        padding: 10px;
    }
    
    .upload-content i {
        font-size: 2rem;
    }
    
    .upload-content h5 {
        font-size: 1.1rem;
    }
    
    .upload-content p {
        font-size: 0.9rem;
    }
}

/* Analytics Dashboard Enhanced Styles */
.analytics-container {
    padding: 20px;
    background: #ffffff;
    min-height: 100vh;
    color: #333;
}

.analytics-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.analytics-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #2c3e50;
}

.analytics-header p {
    font-size: 1.1rem;
    color: #6c757d;
    margin: 0;
}

.filters-section {
    background: #ffffff;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.filters-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2c3e50;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-label {
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: #495057;
    font-weight: 500;
}

.filter-select {
    padding: 12px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #ffffff;
    color: #333;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.refresh-button {
    padding: 12px 24px;
    background: linear-gradient(45deg, #007bff, #0056b3);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.refresh-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: #ffffff;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #007bff, #28a745, #ffc107, #dc3545);
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.metric-icon {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #007bff;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: #2c3e50;
}

.metric-label {
    font-size: 1rem;
    color: #6c757d;
    margin-bottom: 10px;
}

.metric-trend {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 20px;
    display: inline-block;
}

.trend-up {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.trend-down {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.trend-neutral {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-container {
    background: #ffffff;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    height: 400px;
    display: flex;
    flex-direction: column;
    border: 1px solid #e9ecef;
}

.chart-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2c3e50;
    text-align: center;
}

.chart-wrapper {
    flex: 1;
    position: relative;
    height: 320px;
    overflow: hidden;
}

.chart-canvas {
    width: 100% !important;
    height: 100% !important;
    max-height: 320px !important;
}

.insights-section {
    background: #ffffff;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.insights-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #2c3e50;
    text-align: center;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.insight-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.insight-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.insight-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.insight-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, #007bff, #0056b3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.insight-icon i {
    color: white;
    font-size: 1.2rem;
}

.insight-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

.insight-content {
    color: #6c757d;
    line-height: 1.6;
    font-size: 0.95rem;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-overlay.hidden {
    display: none;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Responsive Design for Analytics */
@media (max-width: 768px) {
    .analytics-container {
        padding: 10px;
    }
    
    .analytics-header h1 {
        font-size: 2rem;
    }
    
    .charts-section {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        height: 350px;
    }
    
    .chart-wrapper {
        height: 270px;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
}

/* Bootstrap Border Left Extensions */
.border-left-primary {
    border-left: 0.25rem solid #4e73df !important;
}

.border-left-success {
    border-left: 0.25rem solid #1cc88a !important;
}

.border-left-info {
    border-left: 0.25rem solid #36b9cc !important;
}

.border-left-warning {
    border-left: 0.25rem solid #f6c23e !important;
}

.border-left-danger {
    border-left: 0.25rem solid #e74a3b !important;
}

.border-left-secondary {
    border-left: 0.25rem solid #858796 !important;
}

.border-left-dark {
    border-left: 0.25rem solid #5a5c69 !important;
}

/* Analytics Dashboard Specific Styles */
.text-gray-800 {
    color: #5a5c69 !important;
}

.text-gray-300 {
    color: #dddfeb !important;
}

.text-xs {
    font-size: 0.7rem !important;
}

.font-weight-bold {
    font-weight: 700 !important;
}

/* Border left utilities for statistics cards */
.border-left-primary {
    border-left: 0.25rem solid #4e73df !important;
}

.border-left-success {
    border-left: 0.25rem solid #1cc88a !important;
}

.border-left-warning {
    border-left: 0.25rem solid #f6c23e !important;
}

.border-left-danger {
    border-left: 0.25rem solid #e74a3b !important;
}

.border-left-info {
    border-left: 0.25rem solid #36b9cc !important;
}

/* Work Orders specific styles */
.work-order-table th {
    background-color: #f8f9fc;
    border-bottom: 2px solid #e3e6f0;
    font-weight: 600;
    color: #5a5c69;
}

.work-order-table td {
    vertical-align: middle;
}

.btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Modal enhancements */
.modal-lg {
    max-width: 800px;
}

/* Budget Management Styles */
.budget-table th,
.budget-table td {
    vertical-align: middle;
}

.budget-table .progress {
    margin-bottom: 0.25rem;
}

.budget-table .badge {
    font-size: 0.75rem;
}

/* Budget Hierarchy Indentation */
.budget-table td:first-child {
    position: relative;
}

.budget-table tr[style*="padding-left: 2rem"] td:first-child::before {
    content: "├─";
    position: absolute;
    left: 0.5rem;
    color: #6c757d;
}

.budget-table tr[style*="padding-left: 4rem"] td:first-child::before {
    content: "├──";
    position: absolute;
    left: 0.5rem;
    color: #6c757d;
}

.budget-table tr[style*="padding-left: 6rem"] td:first-child::before {
    content: "├───";
    position: absolute;
    left: 0.5rem;
    color: #6c757d;
}

/* Budget Statistics Cards */
.border-left-primary {
    border-left: 4px solid #007bff !important;
}

.border-left-success {
    border-left: 4px solid #28a745 !important;
}

.border-left-warning {
    border-left: 4px solid #ffc107 !important;
}

.border-left-danger {
    border-left: 4px solid #dc3545 !important;
}

.border-left-info {
    border-left: 4px solid #17a2b8 !important;
}

/* Budget Card Hover Effects */
.card.border-left-primary:hover,
.card.border-left-success:hover,
.card.border-left-warning:hover,
.card.border-left-danger:hover,
.card.border-left-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

/* Fix dropdown visibility in tables */
.table-responsive .dropdown-menu {
    z-index: 1050 !important;
    position: absolute !important;
}

.table-responsive {
    overflow: visible !important;
}

.table-responsive .table {
    overflow: visible !important;
}

/* Budget Form Enhancements */
.budget-form .form-label {
    font-weight: 600;
    color: #495057;
}

.budget-form .form-control:focus,
.budget-form .form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Budget Alert Styles */
.budget-alert {
    border-left: 4px solid;
    background-color: #f8f9fa;
}

.budget-alert.warning {
    border-left-color: #ffc107;
    background-color: #fff3cd;
}

.budget-alert.info {
    border-left-color: #17a2b8;
    background-color: #d1ecf1;
}

.budget-alert.success {
    border-left-color: #28a745;
    background-color: #d4edda;
}

/* Budget Notification Styles */
.budget-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Statistics cards hover effect */
.card.border-left-primary:hover,
.card.border-left-success:hover,
.card.border-left-warning:hover,
.card.border-left-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

/* ============================================================================
   HOMEPAGE RESPONSIVE IMPROVEMENTS
   ============================================================================ */

/* Mobile-first responsive design for homepage */
@media (max-width: 575px) {
    /* Ensure proper mobile layout */
    .roadmap-container {
        padding: 0.75rem !important;
    }
    
    .roadmap-header {
        padding: 1rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .roadmap-header h1 {
        font-size: 1.25rem !important;
        line-height: 1.2 !important;
    }
    
    .roadmap-header p {
        font-size: 0.9rem !important;
    }
    
    .priority-badge {
        padding: 0.2rem 0.5rem !important;
        font-size: 0.65rem !important;
        margin: 0.125rem !important;
    }
    
    .gantt-chart {
        padding: 0.75rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .component-diagram-container {
        padding: 0.75rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .diagram-header h2 {
        font-size: 1.1rem !important;
    }
    
    .diagram-header p {
        font-size: 0.8rem !important;
    }
    
    .diagram-controls {
        padding: 0.5rem !important;
        margin-bottom: 1rem !important;
    }
    
    .roadmap-stats {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .stat-card {
        padding: 0.75rem !important;
    }
    
    .stat-number {
        font-size: 1.25rem !important;
    }
    
    .stat-label {
        font-size: 0.8rem !important;
    }
}

/* Tablet portrait responsive design */
@media (min-width: 576px) and (max-width: 767px) {
    .roadmap-container {
        padding: 1.25rem !important;
    }
    
    .roadmap-header {
        padding: 1.5rem !important;
        margin-bottom: 2rem !important;
    }
    
    .roadmap-header h1 {
        font-size: 1.75rem !important;
    }
    
    .roadmap-header p {
        font-size: 1rem !important;
    }
    
    .priority-badge {
        padding: 0.25rem 0.6rem !important;
        font-size: 0.7rem !important;
        margin: 0.25rem !important;
    }
    
    .gantt-chart {
        padding: 1.25rem !important;
        margin-bottom: 2rem !important;
    }
    
    .component-diagram-container {
        padding: 1.25rem !important;
        margin-bottom: 2rem !important;
    }
    
    .diagram-header h2 {
        font-size: 1.4rem !important;
    }
    
    .diagram-header p {
        font-size: 0.95rem !important;
    }
    
    .roadmap-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
        margin-bottom: 2rem !important;
    }
}

/* Tablet landscape responsive design */
@media (min-width: 768px) and (max-width: 991px) {
    .roadmap-container {
        padding: 1.75rem !important;
    }
    
    .roadmap-header {
        padding: 2rem !important;
        margin-bottom: 2.5rem !important;
    }
    
    .roadmap-header h1 {
        font-size: 2.25rem !important;
    }
    
    .roadmap-header p {
        font-size: 1.1rem !important;
    }
    
    .priority-badge {
        padding: 0.3rem 0.8rem !important;
        font-size: 0.8rem !important;
        margin: 0.5rem !important;
    }
    
    .gantt-chart {
        padding: 1.75rem !important;
        margin-bottom: 2.5rem !important;
    }
    
    .component-diagram-container {
        padding: 1.75rem !important;
        margin-bottom: 2.5rem !important;
    }
    
    .diagram-header h2 {
        font-size: 1.6rem !important;
    }
    
    .diagram-header p {
        font-size: 1.05rem !important;
    }
    
    .roadmap-stats {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1.25rem !important;
        margin-bottom: 2.5rem !important;
    }
}

/* Desktop responsive design */
@media (min-width: 992px) {
    .roadmap-container {
        padding: 2rem !important;
    }
    
    .roadmap-header {
        padding: 2rem !important;
        margin-bottom: 3rem !important;
    }
    
    .roadmap-header h1 {
        font-size: 2.5rem !important;
    }
    
    .roadmap-header p {
        font-size: 1.2rem !important;
    }
    
    .priority-badge {
        padding: 0.3rem 0.8rem !important;
        font-size: 0.8rem !important;
        margin: 0.5rem !important;
    }
    
    .gantt-chart {
        padding: 2rem !important;
        margin-bottom: 3rem !important;
    }
    
    .component-diagram-container {
        padding: 2rem !important;
        margin-bottom: 3rem !important;
    }
    
    .diagram-header h2 {
        font-size: 1.75rem !important;
    }
    
    .diagram-header p {
        font-size: 1.1rem !important;
    }
    
    .roadmap-stats {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
        gap: 1.5rem !important;
        margin-bottom: 3rem !important;
    }
}

/* Large desktop responsive design */
@media (min-width: 1200px) {
    .roadmap-container {
        padding: 2.5rem !important;
    }
    
    .roadmap-stats {
        grid-template-columns: repeat(5, 1fr) !important;
    }
}

/* Ultra-wide responsive design */
@media (min-width: 1400px) {
    .roadmap-container {
        max-width: 1400px !important;
    }
}

/* ============================================================================
   HOMEPAGE LAYOUT POSITIONING FIXES
   ============================================================================ */

/* Fix homepage content positioning to avoid header/sidebar overlap */
.content-body {
    position: relative !important;
    z-index: 1 !important;
    margin-top: 0 !important;
    padding-top: 1rem !important;
}

/* Ensure page titles are properly positioned */
.page-titles {
    margin-bottom: 1rem !important;
    position: relative !important;
    z-index: 2 !important;
    margin-top: 0 !important;
}

/* Fix roadmap container positioning */
.roadmap-container {
    position: relative !important;
    z-index: 1 !important;
    clear: both !important;
    margin-top: 2rem !important;
    margin-bottom: 2rem !important;
}

/* Ensure proper spacing for header when fixed */
[data-header-position="fixed"] .content-body {
    padding-top: calc(var(--dz-header-height) + 1rem) !important;
}

/* Fix sidebar positioning conflicts */
[data-sidebar-position="fixed"] .content-body {
    margin-left: var(--dz-sidebar-width) !important;
}

/* Mobile responsive fixes for layout */
@media (max-width: 767px) {
    .content-body {
        margin-left: 0 !important;
        padding-top: 1rem !important;
    }
    
    .roadmap-container {
        margin-top: 1rem !important;
        margin-bottom: 1rem !important;
    }
    
    .page-titles {
        margin-top: 0 !important;
        margin-bottom: 0.5rem !important;
    }
}

/* Tablet responsive fixes */
@media (min-width: 768px) and (max-width: 991px) {
    .content-body {
        margin-left: var(--dz-sidebar-width) !important;
        padding-top: 1.5rem !important;
    }
    
    .roadmap-container {
        margin-top: 1.5rem !important;
    }
}

/* Desktop responsive fixes */
@media (min-width: 992px) {
    .content-body {
        margin-left: var(--dz-sidebar-width) !important;
        padding-top: 2rem !important;
    }
    
    .roadmap-container {
        margin-top: 2rem !important;
    }
}

/* Additional fixes for header and sidebar positioning */
.header {
    position: relative !important;
    z-index: 10 !important;
}

.deznav {
    position: relative !important;
    z-index: 10 !important;
}

/* Ensure content doesn't go under fixed elements */
[data-header-position="fixed"] .header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
}

[data-sidebar-position="fixed"] .deznav {
    position: fixed !important;
    top: var(--dz-header-height) !important;
    left: 0 !important;
    z-index: 999 !important;
}

/* Fix for when both header and sidebar are fixed */
[data-header-position="fixed"][data-sidebar-position="fixed"] .content-body {
    margin-left: var(--dz-sidebar-width) !important;
    padding-top: calc(var(--dz-header-height) + 1rem) !important;
}