/* Custom CSS for Production Management System */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0d6efd;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8f9fa;
}

/* Navigation */
.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

.nav-link {
    font-weight: 500;
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-radius: 0.375rem;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border-radius: 0.5rem;
}

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

/* Tables */
.table {
    background-color: #fff;
}

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

.table th {
    border-top: none;
    font-weight: 600;
    color: #ffffff;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Narrow columns for specific table headers */
.narrow-column {
    width: 120px !important;
    max-width: 120px !important;
    text-align: center;
    line-height: 1.2;
    padding: 8px 4px !important;
    font-size: 0.8rem !important;
}

/* Corresponding narrow cells */
td.narrow-cell {
    width: 120px !important;
    max-width: 120px !important;
    overflow-wrap: break-word;
    word-wrap: break-word;
    text-align: center;
    padding: 8px 4px !important;
    font-size: 0.85rem;
}

/* Statistics Cards */
.bg-primary .card-header,
.bg-info .card-header,
.bg-warning .card-header,
.bg-success .card-header {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: 0.375rem;
}

.btn-sm {
    font-size: 0.8rem;
}

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

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

/* Badges */
.badge {
    font-weight: 500;
    font-size: 0.75em;
}

/* Calendar */
.calendar-day {
    min-height: 100px;
    transition: background-color 0.2s;
}

.calendar-day:hover {
    background-color: #f8f9fa;
}

.calendar-view {
    transition: opacity 0.3s;
}

/* Search and Filter */
.input-group .form-control:focus {
    z-index: 3;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Alerts */
.alert {
    border: none;
    border-radius: 0.5rem;
}

.alert-dismissible .btn-close {
    padding: 0.5rem 0.75rem;
}

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

/* Responsive */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn-group-sm .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Status indicators */
.status-not-started { color: #6c757d; }
.status-in-progress { color: #0dcaf0; }
.status-completed { color: #198754; }
.status-on-hold { color: #ffc107; }
.status-cancelled { color: #dc3545; }
.status-ready-for-mail { color: #6f42c1; }
.status-mailed { color: #198754; }

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

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.border-light-gray {
    border-color: #e9ecef !important;
}

/* Overview Dashboard Enhancements */
.stat-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.stat-card .card-body {
    padding: 1.5rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-icon {
    font-size: 1.5rem;
    opacity: 0.8;
}

.priority-section {
    margin-bottom: 2rem;
}

.jobs-preview {
    max-height: 400px;
    overflow-y: auto;
}

.job-row {
    border-left: 4px solid transparent;
    transition: all 0.2s ease;
}

.job-row:hover {
    background-color: #f8f9fa;
    border-left-color: #007bff;
}

.section-divider {
    border-top: 2px solid #e9ecef;
    margin: 2rem 0;
}

.quick-actions {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
}
