/* Main Styles for The Durham Company Open Order Reporting System */

/* Custom colors */
:root {
    --durham-blue: #a90834;
    --durham-light-blue: #e6f2ff;
    --durham-gray: #f8f9fa;
    --durham-red: #d47b81;
}

/* Body and general styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--durham-gray);
}

/* Header styles */
.navbar-brand {
    font-weight: bold;
}

/* Navbar styles - ensure custom colors are applied */
.navbar.navbar-dark.bg-primary {
    background-color: var(--durham-blue) !important;
}

/* Container styles */
.container {
    max-width: 1400px; /* Changed from 1400px to 1175px as requested */
    width: 100%; /* Ensures full width up to max-width */
    box-sizing: border-box; /* Includes padding/borders in width */
}

/* Custom container for reports (if used instead of .container) */
.report-container {
    max-width: 1400px; /* Changed from 1400px to 1175px as requested */
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto; /* Centers the container */
}

/* Card styles */
.card {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.card-header {
    font-weight: bold;
}

/* Ensure card headers with bg-primary use custom color */
.card-header.bg-primary {
    background-color: var(--durham-blue) !important;
}

/* Table styles */
.table-responsive {
    overflow-x: auto; /* Enables horizontal scrolling for wide tables */
    width: 100%; /* Spans full container width */
    max-width: 100%; /* Prevents overflow */
    box-sizing: border-box;
    border: none !important;
}

.table {
    width: 100%; /* Tables scale to container width */
    max-width: 100%; /* Prevents overflow */
    box-sizing: border-box;
    border: none !important;
}

.table th {
    background-color: #f4d3d3 !important;
    border: none !important;
}

.table td {
    border: none !important;
}

.total-row {
    font-weight: bold;
    background-color: #f4d3d3 !important;
}

/* Form styles */
.form-label {
    font-weight: 500;
}

/* Button styles - ensure all primary buttons use custom color */
.btn-primary {
    background-color: var(--durham-blue) !important;
    border-color: var(--durham-blue) !important;
}

.btn-primary:hover {
    background-color: #8a062a !important;
    border-color: #8a062a !important;
}

/* Outline button styles */
.btn-outline-light {
    color: #fff !important;
    border-color: #fff !important;
}

.btn-outline-light:hover {
    color: #212529 !important;
    background-color: #f8f9fa !important;
    border-color: #f8f9fa !important;
}

/* Badge styles - ensure badges use custom colors */
.badge.bg-primary {
    background-color: var(--durham-blue) !important;
}

.badge.bg-info {
    background-color: #17a2b8 !important;
}

/* Alert styles */
.alert {
    border-radius: 0.25rem;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
}

.alert-success {
    color: #155724 !important;
    background-color: #d4edda !important;
    border-color: #c3e6cb !important;
}

.alert-info {
    color: #0c5460 !important;
    background-color: #d1ecf1 !important;
    border-color: #bee5eb !important;
}

.alert-warning {
    color: #856404 !important;
    background-color: #fff3cd !important;
    border-color: #ffeeba !important;
}

.alert-danger {
    color: #721c24 !important;
    background-color: #f8d7da !important;
    border-color: #f5c6cb !important;
}

/* Text color styles */
.text-primary {
    color: var(--durham-blue) !important;
}

.text-muted {
    color: #6c757d !important;
}

/* Success button styles */
.btn-success {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
}

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

/* Company navigation button styles */
.company-nav-btn {
    color: var(--durham-blue) !important;
    border-color: var(--durham-blue) !important;
}

.company-nav-btn:hover {
    background-color: rgba(169, 8, 52, 0.1) !important;
}

/* Style for company buttons without orders */
.company-nav-btn-no-orders {
    color: var(--durham-blue) !important;
    border-color: var(--durham-blue) !important;
    background-color: var(--durham-red) !important;
}

.company-nav-btn-no-orders:hover {
    background-color: #c06a70 !important; /* Slightly darker shade for hover */
}

/* Login page */
.login-container {
    max-width: 400px; /* Unchanged, as it’s specific to login */
    margin: 100px auto;
}

/* Footer */
footer {
    margin-top: 50px;
    padding: 20px 0;
    border-top: 1px solid #ddd;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container,
    .report-container {
        max-width: 100%; /* Full width on smaller screens */
        padding: 0 15px; /* Maintain some padding */
    }

    .card-body {
        padding: 1rem;
    }

    .table {
        font-size: 0.9rem;
        width: 100%; /* Tables fit container */
        max-width: 100%;
        box-sizing: border-box;
    }

    .table-responsive {
        overflow-x: auto; /* Scroll for wide tables */
        width: 100%;
        max-width: 100%;
    }
}
