html, body {
    background-color: #f0f0f0; /* Light gray background */
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
}

.content-container {
    margin-left: 240px;
    padding: 20px;
    max-width: calc(100vw - 240px);
    box-sizing: border-box;
}

.form-wrapper {
    max-width: 700px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.form-wrapper-expanded {
    max-width: 1000px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

h2 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.btn-xs {
    font-size: 0.75rem;
    padding: 0.25rem 0.4rem;
    line-height: 1;
}
#sidebar {
    width: 200px;
    background-color: #333333;
    height: 100vh;
    padding: 5px;
    color: white;
    position: fixed;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.divider-menu {
    height: 1px;
    background-color: #ddd;
    margin: 10px 0;
    margin-bottom: 1px;
    margin-top: 1px;
}
#sidebar .menu-section {
    flex-grow: 1;
    overflow-y: auto;
}
.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 5px;
    margin-top: 5px;
}
.logo-text {
    font-size: 0.8rem; /* Make the text 2x larger */
    font-weight: normal; /* Set the default font weight */
}
.logo-maris {
    width: 150px;
    height: auto;
}

.menu-header {
    font-weight: bold;
    margin-top: 15px;
    cursor: pointer;
}
.submenu {
    display: none;
    padding-left: 8px;
}
.submenu.expanded {
    display: block;
}

ul {
    list-style: none;
    padding-left: 0;
}

ul li {
    padding: 5px 0;
    line-height: 1;
}

ul li a {
    color: white;
    text-decoration: none;
    display: block;
    padding-left: 15px;
}

ul li a:hover, .menu-header:hover {
    text-decoration: none;
    color: #b29e6c; /* bright yellow */
}

.logout-btn {
    margin-top: 5px;
    width: auto;
    padding: 5px 10px;
    font-size: 0.9rem;
}

.home-link {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    display: block;
    color: #ffffff;
    text-decoration: none;
}

.home-link:hover {
    text-decoration: underline;
}
.card {
    margin-bottom: 0.5rem;
}
.field-label {
    width: 180px;
    font-weight: bold;
    color: #333;
}
.field-value {
    flex: 1;
    color: #555;
}
.btn-lg {
    font-size: 1rem;
    padding: 0.5rem 1rem;
}
.buttons-container {
    display: flex;
    justify-content: flex-start;
    gap: 0.5rem;
    margin-top: 1rem;
}
.error-alert {
    margin-bottom: 1rem;
}


.row-like {
    display: flex;
    padding: 6px 0;
}

.controls-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1rem;
    flex-wrap: nowrap;
    font-size: 0.7rem;
}
.search-input {
    flex-grow: 1;
    min-width: 200px;
    font-size: 0.7rem;
    padding: 0.25rem 0.375rem;
}
.btn-search, .btn-add, .btn-download, .btn-filter {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    white-space: nowrap;
}
.btn-xs {
    font-size: 0.75rem;
    padding: 0.25rem 0.4rem;
    line-height: 1;
}
table {
    font-size: 0.85rem;
}
table th, table td {
    padding: 0.3rem 0.5rem;
}

.pagination {
    font-size: 0.8rem;
}

#filterBox .form-select {
    font-size: 0.75rem;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    padding-left: 0.5rem;
    height: auto;
}

#filterBox .row {
    margin-bottom: 6px;
}

.compact-label {
    font-size: 0.7rem;
    margin-bottom: 2px;
}

.editable-email {
    background-color: #e9ecef;
    cursor: not-allowed;
    pointer-events: none;
}
.editable-email.active {
    background-color: #fff;
    cursor: text;
    pointer-events: auto;
}

select.form-select-sm {
    font-family: inherit;
    font-size: inherit;
}
select.auto-width {
    width: auto;
    display: inline-block;
    white-space: nowrap;
}

select.auto-width option {
    white-space: nowrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

input[type="date"].form-control-sm {
    font-size: 0.90rem;
    padding: 0.25rem 0.375rem;
    height: auto;
    width: auto;
    display: inline-block;
}

input[type="date"].form-control-xs {
    font-size: 0.75rem;
    padding: 0.25rem 0.375rem;
    height: auto;
    width: auto;
    display: inline-block;
}

.injury-item {
    position: relative;
}

.injury-actions {
    position: absolute;
    top: .25rem;
    right: .25rem;
    display: flex;
    ap: .25rem;
}
.btn-xxs {
    padding: .35rem .35rem;
    font-size: .70rem;
    line-height: 1;
    border-radius: .25rem;
}
.compact-label {
    font-size: .875rem;
    margin-bottom: 2px;
}

.breakable {
    white-space: normal;       /* allow wrapping */
    word-break: break-word;    /* break long words if needed */
    overflow-wrap: anywhere;   /* modern browsers */
}

.content-container {
    /* Your sidebar is fixed 220px wide in components/sidebar.php */
    margin-left: 220px; /* 220 + a little gap; tune if needed */
    padding: 20px;
}

.kpi-card {
    border:0;
    border-radius:1rem;
    box-shadow:0 6px 16px rgba(0,0,0,.06);
}

.kpi-value {
    font-size:1.8rem;
    font-weight:700;
}

.kpi-sub {
    color:#6c757d;
    font-size:.9rem;
    text-transform:uppercase;
}

.mini-card {
    border:0;
    border-radius:.85rem;
    box-shadow:0 4px 12px rgba(0,0,0,.05);
    transition:transform .08s;
}

.mini-label {
    font-weight:600;
}

.mini-nums {
    font-weight:700;
}

.mini-last {
    font-size:.9rem;
    color:#6c757d;
}

.mini-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2 columns */
    gap: 4px 12px;
    margin-top: .5rem;
}

.mini-grid div {
    font-weight: 300;     /* light */
    font-size: 0.9rem;
    color: #495057;       /* Bootstrap’s secondary text color */
}

.mini-last {
    font-size: .9rem;
    color: #6c757d;
    text-align: center;
    margin-top: .5rem;
}

.pill-badge {
    font-size:.75rem;
    background:#eef2ff;
    color:#3b5bdb;
}

.section-title {
    font-weight:700;
    letter-spacing:.02em;
    margin-top:1.5rem;
}

.round-btn {
    width: 24px;
    height: 24px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
    line-height: 1;                 /* critical */
    font-size: 12px;                /* ~0.875rem; scales well at 24px */
    font-weight: 700;               /* gives + and = better visual balance */
    vertical-align: middle;         /* aligns with text around it */
}

.dropdown-menu {
    min-width: auto !important;   /* let it shrink */
    width: auto;                  /* auto-size to content */
}

#sidebar ul.submenu li a[href*="worksafety_"] {
    line-height: 0.6em;
    padding-top: 1px;
    padding-bottom: 1px;
}

.dual-select {
    height: 14rem;
    overflow-y: auto;
}

.transfer-col {
    max-width: 30px;
    padding-left: 0.1rem;
    padding-right: 0.1rem;
}

.transfer-buttons .btn {
    width: 100%;
    margin-bottom: .25rem;
}

.card-kpi { border-radius: 1rem; }
.kpi-value { font-size: 1.8rem; font-weight: 700; line-height: 1; }
.kpi-unit  { font-size: .85rem; color: #6c757d; margin-left: .35rem; }
.table-sm td, .table-sm th { padding: .4rem .5rem; }

.filter-card .card-header { padding: .5rem .75rem;}
.filter-card .card-body { padding: .75rem; }
.filter-actions { margin-left: auto; display:flex; gap:.5rem;}

.chart-wrap { height: 270px; }
.card-chart .card-body { padding: .75rem; }
.card-chart .card-header { padding: .5rem .75rem;}
/* Emission overview header emphasis */
.card-header span,
.kpi-label,
.card-header.bg-white,
.card > .card-header {
    font-weight: 600;
    font-size: 1.05rem;
}
.card-header small {
    font-weight: 400;
    font-size: 0.9em;
    color: #6c757d;
    margin-left: 2px;
}

/* two-column dropdown layout */
.chart-type-menu { min-width: 320px; padding: .5rem; }
.chart-menu-columns { display: flex; gap: 12px; align-items: flex-start; white-space: nowrap; }
.chart-menu-col { display: flex; flex-direction: column; min-width: 150px; }

/* items + checkmarks */
.chart-type-menu .dropdown-item { font-size: .86rem; border-radius: 4px; display: flex; justify-content: space-between; align-items: center; padding-top: .25rem; padding-bottom: .25rem; }
.chart-type-menu .dropdown-item .checkmark { visibility: hidden; }
.chart-type-menu .dropdown-item.active { background-color: #606060; font-weight: 600; }
.chart-type-menu .dropdown-item.active .checkmark::before { content: "✓"; color: #198754; font-weight: 700; }

.remarks-cell {
    max-width: 360px;      /* adjust to taste */
    word-wrap: break-word;
    white-space: normal;
}

.remarks-more-btn {
    font-size: 0.8rem;
    text-decoration: underline;
    opacity: 0.7;
}
.remarks-more-btn:hover {
    opacity: 1;
}