html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
    background-color: #212529;
    /* Dark background */
    color: #f8f9fa;
    /* Light text color */
}

/* Dark mode specific styles */
.card {
    background-color: #343a40;
    /* Darker card background */
    color: #f8f9fa;
    border: 1px solid rgba(255, 255, 255, 0.125);
    /* Lighter border for contrast */
}

.table {
    color: #f8f9fa;
    /* Table text color */
}

.table-hover tbody tr:hover {
    color: #f8f9fa;
    /* Ensure hover text remains light */
    background-color: rgba(255, 255, 255, 0.075);
    /* Slight highlight on hover */
}

.table-bordered {
    border-color: rgba(255, 255, 255, 0.1);
    /* Lighter borders for table */
}

.table thead.bg-primary {
    background-color: #007bff !important;
    /* Keep primary color for header */
    color: #fff !important;
}

.table th,
.table td {
    border-color: rgba(255, 255, 255, 0.1);
    /* Ensure cell borders are visible */
}

.form-control {
    background-color: #495057;
    /* Darker input background */
    color: #f8f9fa;
    border-color: #6c757d;
    /* Lighter border for inputs */
}

    .form-control::placeholder {
        color: #adb5bd;
        /* Lighter placeholder text */
    }

    .form-control:focus {
        background-color: #495057;
        /* Maintain dark background on focus */
        color: #f8f9fa;
        border-color: #80bdff;
        /* Standard Bootstrap blue focus */
        box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    }

.form-label {
    color: #f8f9fa;
    /* Ensure labels are visible */
}

.text-muted {
    color: #adb5bd !important;
    /* Lighter muted text */
}

.alert-success {
    background-color: #28a745;
    color: #fff;
    border-color: #28a745;
}

.alert-danger {
    background-color: #dc3545;
    color: #fff;
    border-color: #dc3545;
}

.alert-info {
    background-color: #17a2b8;
    color: #fff;
    border-color: #17a2b8;
}

.alert-warning {
    background-color: #ffc107;
    color: #212529;
    /* Dark text for warning */
    border-color: #ffc107;
}

/* Ensure dropdowns are dark mode compatible */
.dropdown-menu {
    background-color: #343a40;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.dropdown-item {
    color: #f8f9fa;
}

    .dropdown-item:hover,
    .dropdown-item:focus {
        background-color: #495057;
        color: #f8f9fa;
    }

/* Badge colors for dark mode */
.badge.bg-success {
    background-color: #28a745 !important;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

/* Dark text for warning */
.badge.bg-danger {
    background-color: #dc3545 !important;
}

.badge.bg-info {
    background-color: #17a2b8 !important;
}

.badge.bg-secondary {
    background-color: #6c757d !important;
}

/* Global table cell alignment for middle */
td,
th {
    vertical-align: middle !important;
}

/* Remove this specific .text-nowrap rule, as it might conflict.
   Manage text-nowrap directly in your HTML when needed,
   or define a more specific rule for table cells.
.text-nowrap {
    white-space: nowrap;
}
*/

/* Adjustments for ReportStatus.cshtml */
.container h1 {
    color: #f8f9fa;
    /* Ensure main headings are white */
}

/* --- Table Specific Styles for Auto-Fitting & Look --- */

.table-container {
    overflow-x: auto;
    /* Enables horizontal scrolling for the table if content exceeds screen width */
}

#projectStatusTable {
    width: 100%;
    /* Ensures the table takes full width of its container initially */
    border-collapse: collapse;
    /* Collapses borders for a cleaner look */
    table-layout: auto;
    /* This is key for "auto-fit" - columns adjust based on content */
}

    #projectStatusTable th,
    #projectStatusTable td {
        white-space: nowrap;
        /* **Crucial: Overrides any nowrap from Bootstrap utility classes for most cells** */
        max-width: 300px;
        /* Sets a maximum width for individual cells, preventing excessively wide columns */
        vertical-align: middle;
        /* Vertically aligns content in the middle of the cell */
        padding: 8px;
        /* Adds internal spacing within cells */
        overflow: hidden;
        /* Hides content that overflows if it cannot break or wrap */
        text-overflow: ellipsis;
        /* Adds "..." for overflowing text that cannot be broken (though word-break reduces this need) */
        /* Add !important here if white-space:normal is still being overridden by Bootstrap's .text-nowrap */
        /* white-space: normal !important; */
    }

    /* Specific rule for the Report Date & Time column if you absolutely want it to NOT wrap */
    /* If you want it to wrap, remove the .text-nowrap class from the HTML <th/td> */
    #projectStatusTable .text-nowrap {
        white-space: nowrap !important;
        /* Forces nowrap for elements with this class within the table */
    }


    #projectStatusTable th {
        background-color: #007bff;
        /* Primary blue for header background */
        color: white;
        /* White text for header */
        text-align: center;
        /* Center align header text */
        padding: 10px 8px;
        /* Slightly more padding for headers */
    }

    #projectStatusTable tbody tr:nth-child(even) {
        background-color: #343a40;
        /* Darker grey for even rows in dark mode */
    }

    #projectStatusTable tbody tr:hover {
        background-color: rgba(255, 255, 255, 0.1);
        /* Lighter grey on hover for interactive feel in dark mode */
    }

    /* Specific alignment for content columns like Project Name, Achievements, Next Steps, Issues */
    #projectStatusTable td:nth-child(9),
    /* Achievements */
    #projectStatusTable td:nth-child(10),
    /* Next Steps */
    #projectStatusTable td:nth-child(11)
    /* Issues */ {
        text-align: left !important;
        /* Force left alignment for these content-heavy columns */
    }

.btn-sm {
    padding: 0.25rem 0.6rem;
    font-size: 0.85rem;
    border-radius: 1.5rem !important;
    /* More pill-shaped */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.10);
    font-weight: 500;
}

.btn-info,
.btn-danger {
    border: none !important;
}

.btn-info {
    background: linear-gradient(90deg, #17a2b8 50%, #007bff 100%);
}

.btn-danger {
    background: linear-gradient(90deg, #dc3545 50%, #ff5f7e 100%);
}

    .btn-info:hover,
    .btn-danger:hover {
        filter: brightness(1.1);
        opacity: 0.92;
    }

td .btn {
    margin-right: 0.2rem;
    margin-bottom: 0.2rem;
}

/* --- ReportProjectStatus Tabs --- */
.report-tabs {
    gap: 0.25rem;
}

    .report-tabs .nav-link {
        color: #f8f9fa;
        background-color: #343a40;
        border-radius: 0.5rem;
    }

        .report-tabs .nav-link.active {
            background: linear-gradient(90deg, #0d6efd 0%, #6610f2 100%);
            color: #fff;
        }

/* Quality table category colors */
.bg-info {
    background-color: #17a2b8 !important;
}
.bg-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
}
.bg-success {
    background-color: #198754 !important;
}
.bg-danger {
    background-color: #dc3545 !important;
}
.bg-secondary {
    background-color: #6c757d !important;
}
