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;
}

/* Carousel Styling */
.carousel,
.carousel-inner {
    width: 100%;
    max-width: 100%;
}

.carousel-item img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.carousel-caption h5 {
    font-size: 2rem;
    font-weight: bold;
}

.carousel-caption p {
    font-size: 1.2rem;
}

/* ========================================
   Dark Mode Bootstrap Overrides
   Applies when body has `bg-dark` class
   ======================================== */

body.bg-dark {
    /* Global defaults */
    color: #f8f9fa;
}

/* NAVBAR & HEADER */
body.bg-dark .navbar,
body.bg-dark .card-header,
body.bg-dark .modal-header {
    background-color: #1e2a38 !important;
    color: #ffffff !important;
    border-bottom: 1px solid #2c3e50;
}

body.bg-dark .navbar.bg-primary {
    background: none !important;
    background-color: #1f2a38 !important;
    color: #ffffff !important;
    border-bottom: 1px solid #2c3e50;
}

/* FOOTER */
body.bg-dark footer {
    background-color: #1f2a38 !important;
    color: #ffffff !important;
    border-top: 1px solid #2c3e50;
}

/* CARD HEADERS */
body.bg-dark .card-header.bg-primary.bg-gradient {
    background: linear-gradient(to right, #1e2a38, #243447) !important;
    color: #ffffff !important;
    border-bottom: 1px solid #2c3e50;
}

/* BUTTONS */
body.bg-dark .btn-primary {
    background-color: #0a58ca !important;
    border-color: #0a58ca !important;
    color: #ffffff !important;
}

body.bg-dark .btn-primary:hover {
    background-color: #084298 !important;
    border-color: #083e8b !important;
}

body.bg-dark .btn-outline-primary {
    border-color: #6ea8fe !important;
    color: #6ea8fe !important;
}

body.bg-dark .btn-outline-primary:hover {
    background-color: #6ea8fe !important;
    color: #fff !important;
}

/* NAV LINKS */
body.bg-dark .nav-link,
body.bg-dark .dropdown-item {
    color: #dee2e6 !important;
}

body.bg-dark .nav-link:hover,
body.bg-dark .dropdown-item:hover {
    background-color: #343a40;
    color: #ffffff !important;
}

/* CARDS & PANELS */
body.bg-dark .card,
body.bg-dark .dashboard-box {
    background-color: #2b2b2b !important;
    color: #f8f9fa !important;
    border-color: #444;
}

/* MODALS */
body.bg-dark .modal-content {
    background-color: #2c2c2c;
    color: #f8f9fa;
    border-color: #444;
}

body.bg-dark .modal-footer {
    border-top: 1px solid #444;
}

body.bg-dark .modal-content *,
body.bg-dark .modal-content select {
    color: #f8f9fa !important;
    background-color: #2c2c2c !important;
}

/* FORM ELEMENTS */
body.bg-dark .form-control,
body.bg-dark select,
body.bg-dark select.form-select {
    background-color: #2c2c2c !important;
    color: #ffffff !important;
    border-color: #555 !important;
}

body.bg-dark .form-select option,
body.bg-dark select option {
    background-color: #2c2c2c !important;
    color: #ffffff !important;
}

body.bg-dark .form-control:disabled {
    background-color: #2b2b2b;
    color: #b0b0b0;
}

body.bg-dark .form-control::placeholder {
    color: #aaa !important;
}

/* TOASTR */
body.bg-dark #toast-container > div {
    background-color: #444 !important;
    color: #fff !important;
}

/* DATATABLES */
body.bg-dark table.dataTable {
    background-color: #2b2b2b;
    color: #f8f9fa;
}

body.bg-dark .dataTables_wrapper .dataTables_filter input,
body.bg-dark .dataTables_wrapper .dataTables_length select {
    background-color: #343a40;
    color: #f8f9fa;
    border-color: #555;
}

body.bg-dark .dataTables_wrapper .dataTables_paginate .paginate_button {
    color: #f8f9fa !important;
}

/* SELECT2 */
body.bg-dark .select2-container--default .select2-selection--single {
    background-color: #343a40;
    color: #ffffff;
    border-color: #555;
}

body.bg-dark .select2-dropdown {
    background-color: #2c2c2c;
    color: #fff;
}

body.bg-dark .select2-results__option--highlighted {
    background-color: #0d6efd;
    color: #fff;
}

/* DASHBOARD TABLES */
body.bg-dark .dashboard-table th,
body.bg-dark .dashboard-table td,
body.bg-dark .dashboard-table tbody td,
body.bg-dark .dashboard-table tbody th,
body.bg-dark .dashboard-box h3,
body.bg-dark .dashboard-box h5,
body.bg-dark .dashboard-box p {
    color: #f8f9fa !important;
}

body.bg-dark .dashboard-table thead {
    background-color: #343a40 !important;
    color: #f8f9fa !important;
}

body.bg-dark .dashboard-table.table-striped tbody tr:nth-of-type(odd),
body.bg-dark .dashboard-table tbody tr:nth-child(even) {
    background-color: #2c2c2c !important;
}

/* WEATHER PANEL */
body.bg-dark .weather-info-box {
    background-color: #2c2c2c !important;
    color: #ffffff !important;
    border-color: #444 !important;
}

body.bg-dark .weather-info-box h6,
body.bg-dark .weather-info-box p,
body.bg-dark .weather-info-box strong {
    color: #ffffff !important;
}

/* CHARTS */
body.bg-dark .chart-container,
body.bg-dark .chart-container * {
    color: #f8f9fa !important;
}

/* TRANSITIONS */
body,
.navbar,
footer,
.dashboard-box,
select,
.modal-content {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark Mode: Weather Panel */
body.bg-dark .weather-panel {
    background-color: #2c2c2c !important;
    border-color: #444 !important;
    color: #f8f9fa !important;
}

body.bg-dark .weather-panel .form-label,
body.bg-dark .weather-panel strong,
body.bg-dark .weather-panel select,
body.bg-dark .weather-panel option {
    color: #ffffff !important;
    background-color: #2c2c2c !important;
}

body.bg-dark .weather-panel #weatherResult {
    color: #ffffff !important;
}

body.bg-dark .weather-info-box {
    background-color: #343a40 !important;
    border-color: #555 !important;
    color: #ffffff !important;
}

/* Dark mode DataTables fix */
body.bg-dark .dashboard-table {
    background-color: #2c2c2c !important;
    color: #f8f9fa !important;
}

body.bg-dark .dashboard-table td,
body.bg-dark .dashboard-table th {
    color: #f8f9fa !important;
    background-color: #2c2c2c !important;
    border-color: #444 !important;
}

body.bg-dark .dashboard-table thead {
    background-color: #343a40 !important;
    color: #ffffff !important;
}

/* For striped rows in dark mode */
body.bg-dark .dashboard-table tbody tr:nth-of-type(odd) {
    background-color: #2f2f2f !important;
}

body.bg-dark .dashboard-table tbody tr:nth-of-type(even) {
    background-color: #2b2b2b !important;
}

body.bg-dark .weather-panel {
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.6) !important;
}

/* Form Header for export PDF - GPRS, RMS and other form */
.company-header .logo img {
    height: var(--logo-h, 140px);
    width: auto;
}

.company-header .meta {
    max-width: 60ch;
}

.company-header .company-lines {
    font-size: .95rem;
    line-height: 1.3;
}

.company-header__sep {
    border-top: 3px solid #0d6efd;
    margin: 12px 0 18px;
}

.company-header--compact .company-lines {
    line-height: 1.15;
    font-size: .9rem;
}

.company-header--compact .company-header__sep {
    margin: 8px 0 14px;
}

/* header text */
.company-header--lg .meta h5 {
    font-size: 1.6rem; /* was ~1rem–1.25rem */
    line-height: 1.2;
}

.company-header--lg .company-lines {
    font-size: 1.1rem; /* was .95rem */
    line-height: 1.45;
}

/* Optional: slightly larger again when printing/exporting to PDF */
@media print {
    .company-header--lg .meta h5 {
        font-size: 1.7rem;
    }

    .company-header--lg .company-lines {
        font-size: 1.15rem;
    }
}