.local-engbas-overlay { position: fixed; inset: 0; background: rgba(12, 24, 42, .64); z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.local-engbas-dialog { box-sizing: border-box; background: #eaf8e8; color: #243247; border-radius: 12px; max-width: 650px; width: 100%; max-height: min(82vh, 760px); display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 18px 70px rgba(0,0,0,.3); }
.local-engbas-title { background: #17365c; padding: 20px 24px; margin: 0; color: #fff; font-size: 1.3rem; font-weight: 650; }
.local-engbas-content { padding: 22px 24px 8px; overflow-y: auto; overflow-wrap: anywhere; }
.local-engbas-footer { padding: 15px 24px 22px; display: flex; flex-direction: column; align-items: flex-end; gap: 16px; }
.local-engbas-attachments { align-self: stretch; padding-left: 20px; margin: 0; overflow-wrap: anywhere; }
.local-engbas-close { min-width: 110px; }

/* Administrative listing: themed controls, consistent spacing (v1.2.0). */
.local-engbas-new-wrap { margin: 18px 0 16px; }
.local-engbas-new { border-radius: 9px; padding: 9px 16px; font-weight: 650; background: #0666c6; border-color: #0666c6; }
.local-engbas-table { width: 100%; border: 1px solid #d3dce7; border-collapse: separate; border-spacing: 0; border-radius: 11px; overflow: hidden; }
.local-engbas-table thead th { background: #eef3f8; color: #192638; font-weight: 700; border-bottom: 1px solid #d3dce7; }
.local-engbas-table td, .local-engbas-table th { padding: 12px 10px; vertical-align: middle; }
.local-engbas-table td:nth-child(3), .local-engbas-table th:nth-child(3),
.local-engbas-table td:nth-child(4), .local-engbas-table th:nth-child(4) { text-align: center; width: 78px; white-space: nowrap; }
.local-engbas-table td:last-child, .local-engbas-table th:last-child { width: 1%; white-space: nowrap; }
.local-engbas-actions { display: flex; align-items: center; justify-content: flex-start; gap: 8px; flex-wrap: nowrap; }
.local-engbas-table .local-engbas-action { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 38px; padding: 7px 12px; border: 0; border-radius: 8px; font-weight: 650; color: #fff; text-decoration: none; line-height: 1.2; white-space: nowrap; }
.local-engbas-table .local-engbas-edit { background: #0567ca; }
.local-engbas-table .local-engbas-toggle { background: #5f6875; }
.local-engbas-table .local-engbas-delete { background: #d6202b; }
.local-engbas-table .local-engbas-action:hover, .local-engbas-table .local-engbas-action:focus { color: #fff; filter: brightness(.88); text-decoration: none; }
.local-engbas-badge { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; min-width: 58px; min-height: 38px; padding: 6px 12px; border-radius: 10px; font-size: 1.08rem; font-weight: 700; line-height: 1; }
.local-engbas-count { background: #0666c6; color: #fff; }
.local-engbas-active { background: #119b1c; color: #fff; font-size: 1.5rem; }
.local-engbas-inactive { background: #7339b7; color: #fff; font-size: 1.4rem; }
@media (max-width: 850px) {
    .local-engbas-table { display: block; overflow-x: auto; }
    .local-engbas-table td, .local-engbas-table th { white-space: nowrap; }
}

/* Show attached images in full within the modal, responsive to the viewport. */
.local-engbas-inline-image { display: block; width: auto; height: auto; max-width: 100%; max-height: 58vh; object-fit: contain; margin: 10px auto 16px; border-radius: 5px; }
.local-engbas-content:empty { display: none; }

/* v1.5.0: soft green popup body and footer; keep title bar dark blue. */
.local-engbas-content, .local-engbas-footer { background: #eaf8e8; }
/* Metric column placed before daily display limit. */
.local-engbas-table td:nth-child(3), .local-engbas-table th:nth-child(3),
.local-engbas-table td:nth-child(4), .local-engbas-table th:nth-child(4),
.local-engbas-table td:nth-child(5), .local-engbas-table th:nth-child(5) {
    text-align: center; width: 78px; white-space: nowrap;
}
.local-engbas-percent { background: #e6efff; color: #084f9d; font-size: .94rem; min-width: 68px; }
/* Purple circular action button for both activation states. */
.local-engbas-table .local-engbas-toggle {
    width: 39px; height: 39px; min-width: 39px; min-height: 39px;
    border-radius: 50%; padding: 0; background: #7435b8; color: #fff;
    font-size: 1.3rem; font-weight: 700;
}
.local-engbas-table .local-engbas-toggle:hover,
.local-engbas-table .local-engbas-toggle:focus { background: #5d249a; color: #fff; }
