/* V7 Production Management System - Custom Styles */

/* Global Styles */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --dark-color: #212529;
    --light-color: #f8f9fa;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f5f5;
}

/* Layout Styles */
.main-wrapper {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 250px;
    background: linear-gradient(to bottom, #212529, #343a40);
    color: white;
    position: fixed;
    height: 100%;
    overflow-y: auto;
}

.content-wrapper {
    margin-left: 250px;
    width: calc(100% - 250px);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding: 20px;
}

/* Sidebar Navigation */
.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 10px 20px;
    border-radius: 0;
    transition: all 0.3s;
}

.sidebar .nav-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

/* Card Styles */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

/* Table Styles */
.table thead th {
    background-color: var(--dark-color);
    color: white;
    border: none;
    font-weight: 500;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Button Enhancements */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
}

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

/* Form Styles */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Badge Styles */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* Status Colors */
.status-active { color: var(--success-color); }
.status-inactive { color: var(--secondary-color); }
.status-pending { color: var(--warning-color); }
.status-completed { color: var(--success-color); }
.status-cancelled { color: var(--danger-color); }

/* Priority Colors */
.priority-high { color: var(--danger-color); }
.priority-medium { color: var(--warning-color); }
.priority-low { color: var(--success-color); }

/* Machine Status Colors */
.machine-status-production { background-color: #28a745; }
.machine-status-make-ready { background-color: #007bff; }
.machine-status-break { background-color: #ffc107; }
.machine-status-other-time { background-color: #fd7e14; }
.machine-status-maintenance { background-color: #dc3545; }

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .content-wrapper {
        margin-left: 0;
        width: 100%;
    }
}

/* Utility Classes */
.text-truncate-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.hover-shadow:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.3s;
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Print Styles */
@media print {
    .sidebar,
    .no-print {
        display: none !important;
    }
    
    .content-wrapper {
        margin-left: 0;
        width: 100%;
    }
}