/* FFMS Main Styles */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Login Page */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.login-page .card {
    border: none;
    border-radius: 15px;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    overflow-y: auto;
}

.sidebar .nav-link {
    font-weight: 500;
    color: #333;
    padding: 12px 20px;
    border-radius: 5px;
    margin: 2px 10px;
}

.sidebar .nav-link:hover {
    background-color: #e9ecef;
}

.sidebar .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

.sidebar .nav-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Main Content */
main {
    margin-top: 0;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

/* Cards */
.stat-card {
    border-radius: 10px;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.stat-card .icon {
    font-size: 2.5rem;
    opacity: 0.3;
}

/* Tables */
.table-hover tbody tr:hover {
    background-color: #f8f9fa;
    cursor: pointer;
}

/* Badges */
.badge-status {
    padding: 6px 12px;
    font-weight: 500;
    font-size: 0.85rem;
}

/* Map Container */
.map-container {
    height: 600px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#map {
    height: 100%;
    width: 100%;
}

/* Schematic Editor */
.schematic-container {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 20px;
}

.schematic-toolbar {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.schematic-canvas {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
}

/* Work Order Status Colors */
.status-open { background-color: #6c757d; }
.status-assigned { background-color: #0dcaf0; }
.status-in-progress { background-color: #0d6efd; }
.status-on-hold { background-color: #ffc107; }
.status-resolved { background-color: #198754; }
.status-closed { background-color: #20c997; }
.status-cancelled { background-color: #dc3545; }

/* Priority Colors */
.priority-low { color: #6c757d; }
.priority-normal { color: #0d6efd; }
.priority-high { color: #fd7e14; }
.priority-critical { color: #dc3545; }

/* Asset Status */
.asset-active { color: #198754; }
.asset-inactive { color: #6c757d; }
.asset-maintenance { color: #ffc107; }
.asset-damaged { color: #dc3545; }

/* Core Status */
.core-available { background-color: #d1e7dd; color: #0f5132; }
.core-reserved { background-color: #fff3cd; color: #664d03; }
.core-occupied { background-color: #cfe2ff; color: #084298; }
.core-down { background-color: #f8d7da; color: #842029; }

/* Utilities */
.text-tiny {
    font-size: 0.75rem;
}

.cursor-pointer {
    cursor: pointer;
}

.border-dashed {
    border-style: dashed !important;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        position: relative;
        top: 0;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .content-header > div {
        margin-top: 10px;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Form Enhancements */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Button Enhancements */
.btn {
    border-radius: 6px;
    padding: 8px 16px;
    font-weight: 500;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 0.875rem;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #dee2e6;
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid white;
    box-shadow: 0 0 0 2px var(--primary-color);
}

/* File Upload Zone */
.upload-zone {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-zone:hover {
    border-color: var(--primary-color);
    background: #e7f1ff;
}

.upload-zone.dragover {
    border-color: var(--primary-color);
    background: #e7f1ff;
}
