/* ============================================
   GLOBAL SCROLLBAR STYLING
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f8fafc;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Firefox support */
* {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f8fafc;
}

/* Global compact density controls (tables + table badges/buttons) */
:root {
    --table-head-py: 0.38rem;
    --table-head-px: 0.5rem;
    --table-head-font: 0.6rem;
    --table-body-py: 0.38rem;
    --table-body-px: 0.5rem;
    --table-body-font: 0.74rem;
    --table-badge-font: 0.62rem;
    --table-badge-py: 0.14rem;
    --table-badge-px: 0.32rem;
    --table-btn-sm-font: 0.64rem;
    --table-btn-sm-py: 0.14rem;
    --table-btn-sm-px: 0.34rem;
}

.btn-primary,
.bg-primary {
    background-color: rgba(0, 167, 126, var(--bs-bg-opacity, 1)) !important;
    /* your new color */
    border-color: #00a77e !important;
}

.text-primary {
    color: #00a77e !important;
}

.btn-blue,
.bg-blue {
    background-color: #dbeafe !important;
    border-color: #dbeafe !important;
    color: #1d4ed8 !important;
}

.bg-green {
    background: #dcfce7 !important;
    color: #166534 !important;
}

.bg-yellow {
    background: #e9ff6d70 !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #00a77e !important;
    /* darker shade for hover */
    border-color: #00a77e !important;
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link.show {
    color: rgb(0 167 126);
    /* font-weight: bolder; */
}

#loader-div {
    z-index: 99999;
    position: fixed;
    top: 50%;
    right: 0;
    bottom: 0;
    left: 48%;
    opacity: 1;
    height: 100%;
}

.active>.page-link,
.page-link.active {
    background-color: #00a77e;
    border-color: #00a77e;
    font-size: 12px !important;
}

.page-link {
    color: #00a77e;
    font-size: 12px !important;
}

.form-check-input:checked {
    background-color: #00a77e;
    border-color: #00a77e;
}

.form-check-input:focus {
    border-color: #00a77e;
    outline: 0;
    box-shadow: 0 0 0 .25rem rgb(0 167 122 / 33%);
}

.form-label {
    font-weight: 500;
}

.fw-bold {
    font-weight: 500 !important;
}

.fa {
    margin-right: .25rem !important;
    align-self: center;
}

.table,
button,
a,
table ul {
    font-size: 12px !important;
}

p,
.nav-link,
input,
select,
textarea,
ul,
label,
.select2-container--default .select2-selection--single .select2-selection__rendered {
    font-size: 14px !important;
}

.select2-dropdown {
    border: 1px solid #dee2e6;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: #00a77e;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    outline: none;
}

.select2-container--default .select2-results__option--selected {
    background-color: #ddd;
}

/* .btn-check:checked+.btn, .btn.active, .btn.show, .btn:first-child:active, :not(.btn-check)+.btn:active {
    background-color: inherit !important;
    border-color: inherit !important;
} */

h4 {
    font-size: 15px !important;
}

div#previous-comments {
    max-height: 200px;
    overflow: auto;
}

/* Select 2 CSS */
.select2-container .select2-selection--single {
    height: 37px;
}

.select2-container .select2-selection--single .select2-selection__rendered {
    padding-left: 12px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #212529;
    line-height: 36px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 35px;
    right: 10px;
}

.select2-container--default .select2-selection--single {
    border: 1px solid #dee2e6;
    border-radius: 6px;
}

/* Select 2 CSS */

th {
    text-transform: uppercase;
    background-color: #f9fafb !important;
    color: #66768d !important;
    font-weight: 500;
}

.bg-light {
    background-color: #00a77e12 !important;
}

.text-success {
    color: rgb(0 167 126) !important;
}

.bg-success-light {
    background-color: #f0fdf4 !important;
}

.text-admission {
    color: #158b25 !important;
}

.text-transfer {
    color: #ff9000 !important;
}

.text-discharge {
    color: #ff0c0d !important;
}

.text-vacant {
    color: #00a77e !important;
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link.show {
    background: #00a77e1f;
    border-radius: 5px;
    color: #00a77e;
}

.alert.alert-light {
    background: transparent !important;
    border: none;
}

a.nav-link {
    padding: 5px 10px !important;
}

.bg-success,
.text-bg-success {
    background-color: rgb(0 167 126) !important;
}

td,
th {
    padding: 7px !important;
}

.btn-success {
    background: rgb(0 167 126);
    border-color: rgb(0 167 126);
}

.custom-button {
    text-transform: uppercase;
    background-color: #f9fafb !important;
    color: #66768d !important;
    font-weight: 500;
}

#beds-table td,
#beds-table th {
    padding: 7px 5px !important;
}

#beds-table .fa {
    margin-right: 0 !important;
}

.bg-org-primary {
    background-color: rgba(var(--bs-primary-rgb), var(--bs-bg-opacity)) !important;
}

.text-warning {
    color: rgb(191 152 9) !important;
}

.progress-bar {
    background-color: #00a77e;
}

.bg-purple {
    background-color: #6f42c1 !important;
    /* Bootstrap purple */
    color: #fff;
}

.bg-orange {
    background-color: #fd7e14 !important;
    /* Bootstrap orange */
    color: #fff;
}

/* Keep facility colors consistent but slightly lighter for better visual balance. */
.facility-badge {
    --bs-bg-opacity: 0.85;
    color: #fff !important;
}

.facility-badge.bg-purple {
    background-color: rgba(111, 66, 193, 0.85) !important;
}

.facility-badge.bg-orange {
    background-color: rgba(253, 126, 20, 0.85) !important;
}

.override-alert-panel {
    background-color: #f4dde1 !important;
    border-color: #e6a9b3 !important;
    color: #6d2430 !important;
}

.override-edit-btn {
    background-color: #e14b60 !important;
    border-color: #e14b60 !important;
}

.override-edit-btn:hover,
.override-edit-btn:focus,
.override-edit-btn:active {
    background-color: #d94257 !important;
    border-color: #d94257 !important;
}

/* Hold Bed Indicator Styles */
.hold-bed-indicator {
    display: inline-block;
    margin-left: 5px;
    cursor: help;
}

.hold-bed-indicator i {
    font-size: 16px;
    animation: pulse-warning 2s infinite;
}

.hold-bed-extra-facilities {
    display: block;
    font-size: 11px !important;
    color: #856404 !important;
    background-color: #fff3cd;
    padding: 2px 5px;
    border-radius: 3px;
    margin-top: 3px;
    border-left: 3px solid #ffc107;
}

@keyframes pulse-warning {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* Sortable Table Headers */
.sortable-header {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.sortable-header a {
    display: flex;
    align-items: center;
    gap: 5px;
}

.sortable-header:hover {
    background-color: #e9ecef !important;
}

.sortable-header i.fa-sort,
.sortable-header i.fa-sort-up,
.sortable-header i.fa-sort-down {
    font-size: 10px;
    margin-left: 3px;
}

/* ============================================
   SIDEBAR LAYOUT OVERRIDES
   ============================================ */
.app-sidebar .fa {
    margin-right: 0 !important;
}

.app-sidebar .nav-link.active {
    border-radius: 0 !important;
}

/* ============================================
   PREMIUM DESIGN SYSTEM (GLOBAL)
   ============================================ */
/* Modal Styling */
.modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.modal-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 1.5rem 2rem;
}

.modal-title {
    font-weight: 700 !important;
    color: #1e293b !important;
    font-size: 1.25rem !important;
}

/* Keep text readable when a modal header uses contextual/dark backgrounds */
.modal-header.bg-success .modal-title,
.modal-header.bg-primary .modal-title,
.modal-header.bg-danger .modal-title,
.modal-header.bg-dark .modal-title {
    color: #ffffff !important;
}

.modal-header.bg-success .modal-title i,
.modal-header.bg-primary .modal-title i,
.modal-header.bg-danger .modal-title i,
.modal-header.bg-dark .modal-title i {
    color: #ffffff !important;
}

.modal-header.bg-success .btn-close:not(.btn-close-white),
.modal-header.bg-primary .btn-close:not(.btn-close-white),
.modal-header.bg-danger .btn-close:not(.btn-close-white),
.modal-header.bg-dark .btn-close:not(.btn-close-white) {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 1.25rem 2rem;
}

.transfer-choice-modal {
    border-radius: 18px;
}

.transfer-choice-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.transfer-choice-header .modal-title {
    font-size: 1.05rem !important;
}

.transfer-choice-body {
    padding-top: 1.5rem;
}

.transfer-choice-title {
    font-size: 1.05rem !important;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.transfer-option {
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 0.9rem 1rem !important;
    text-align: center;
    font-size: 1rem !important;
    transition: all 0.2s ease;
}

.transfer-option small {
    display: block;
    margin-top: 2px;
    font-size: 0.84rem !important;
    opacity: 0.95;
}

.transfer-option-postop {
    background: #11b082;
    color: #fff;
}

.transfer-option-postop:hover {
    background: #0ea072;
    color: #fff;
    transform: translateY(-1px);
}

.transfer-option-regular {
    background: #f6c348;
    color: #1f2937;
}

.transfer-option-regular:hover {
    background: #efb934;
    color: #1f2937;
    transform: translateY(-1px);
}

.transfer-option-cancel {
    background: #7b8794;
    color: #fff;
    border: 0;
    border-radius: 10px;
    padding: 0.65rem 1rem;
    font-weight: 500;
}

.transfer-option-cancel:hover {
    background: #667382;
    color: #fff;
}

.manage-rooms-modal {
    border-radius: 16px;
}

.manage-rooms-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.manage-rooms-body {
    padding-top: 1.5rem;
}

.manage-rooms-guide {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    color: #334155;
    font-size: 0.875rem !important;
}

.manage-rooms-table-wrap {
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

#existing-rooms-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}

.manage-rooms-remove-row {
    border-color: #f1b7bf;
}

.new-room-type-select {
    min-width: 250px;
    max-width: 320px;
}

.ward-action-btn {
    border-radius: 8px;
    padding: 0.45rem 0.95rem;
    font-weight: 500;
    border: 0;
    transition: all 0.2s ease;
    min-width: 138px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.ward-action-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.ward-action-discharge {
    background: #11b082 !important;
    color: #fff !important;
}

.ward-action-arrival {
    background: #11b082 !important;
    color: #fff !important;
}

.ward-action-arrival:hover {
    background: #0ea072 !important;
    color: #fff !important;
}

.ward-action-discharge:hover {
    background: #0ea072 !important;
    color: #fff !important;
}

.ward-action-transfer {
    background: #f6c348 !important;
    color: #1f2937 !important;
}

.ward-action-transfer:hover {
    background: #efb934 !important;
    color: #1f2937 !important;
}

.modal-action-btn {
    border-radius: 10px;
    padding: 0.5rem 1.2rem;
    min-width: 64px;
    font-weight: 600;
    border: 0;
    transition: all 0.2s ease;
}

.modal-action-confirm {
    background: #11b082 !important;
    color: #fff !important;
}

.modal-action-confirm:hover {
    background: #0ea072 !important;
    color: #fff !important;
}

.modal-action-cancel {
    background: #74808b !important;
    color: #fff !important;
}

.modal-action-cancel:hover {
    background: #66717d !important;
    color: #fff !important;
}

.build-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.build-header-note {
    color: #475569;
    max-width: 820px;
}

.build-header-meta {
    display: flex;
    gap: 0.75rem;
}

.build-meta-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.65rem 0.9rem;
    min-width: 120px;
    text-align: center;
}

.build-meta-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
}

.build-meta-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
}

.build-guide-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
    padding: 1.5rem;
}

.build-guide-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #edf2f7;
}

.build-guide-item:last-child {
    border-bottom: 0;
}

.build-guide-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #ecfdf5;
    color: #0a9a74;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.build-guide-title {
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.35rem;
}

.build-guide-list {
    margin: 0;
    padding-left: 1rem;
    color: #475569;
}

.build-action-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
    padding: 1.5rem;
}

.build-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.build-action-btn {
    background: #0ea272;
    color: #fff;
    border: 0;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: 0 10px 18px rgba(14, 162, 114, 0.25);
}

.build-action-btn:hover {
    background: #0b9466;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(14, 162, 114, 0.3);
}

.build-action-count {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 0.1rem 0.55rem;
    font-size: 0.8rem;
}

.build-action-wide {
    grid-column: 1 / -1;
    justify-content: space-between;
}

.build-floor-add {
    background: #11b082;
    color: #fff;
    border: 0;
    border-radius: 10px;
    padding: 0.4rem 0.8rem;
    font-weight: 600;
    box-shadow: 0 8px 14px rgba(17, 176, 130, 0.2);
    transition: all 0.2s ease;
}

.build-floor-add:hover {
    background: #0ea072;
    color: #fff;
}

.build-floor-remove {
    background: #ef4444;
    color: #fff;
    border: 0;
    border-radius: 10px;
    width: 34px;
    height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.2s ease;
}

.build-floor-remove:hover {
    background: #dc2626;
    color: #fff;
}

.build-floor-remove i {
    margin: 0;
}

#modal-floors-table tbody td {
    vertical-align: middle;
}

#modal-floors-table .build-floor-action {
    text-align: center;
    white-space: nowrap;
}

@media (max-width: 992px) {
    .build-action-grid {
        grid-template-columns: 1fr;
    }

    .build-action-wide {
        grid-column: auto;
    }
}

@media (max-width: 1200px) {
    .ward-action-group {
        align-items: flex-start;
    }

    .ward-action-btn {
        min-width: 126px;
    }
}

.comment-preview {
    width: 100%;
    min-width: 130px;
    border: 1px solid #d9e2ec;
    background: #f8fafc;
    border-radius: 8px;
    padding: 0.4rem 0.55rem;
    color: #334155;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    text-align: left;
    line-height: 1.3;
}

.comment-preview:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}

.comment-preview-main {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    width: 100%;
}

.comment-preview-main i {
    margin-top: 2px;
    color: #64748b;
}

.comment-preview-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    word-break: break-word;
}

.comment-preview-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    color: #64748b;
    background: #eef2f7;
    border-radius: 999px;
    padding: 0.12rem 0.45rem;
}

.comment-preview-recent {
    border-color: #f3c2cb;
    background: #fff5f6;
}

.comment-preview-recent .comment-preview-indicator {
    background: #fde8eb;
    color: #b4233d;
}

.comment-preview-empty {
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    color: #64748b;
}

.ward-patient-link {
    color: #0f172a;
}

.ward-patient-link:hover,
.ward-patient-link:focus {
    color: #1d4ed8;
}

.comments-modal-loading .modal-body {
    opacity: 0.82;
    transition: opacity 0.2s ease;
}

.comments-loading-placeholder {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.65rem 0.75rem;
    margin-bottom: 0.55rem;
}

.comments-loading-header,
.comments-loading-line {
    border-radius: 999px;
    background: linear-gradient(90deg, #e2e8f0 20%, #f1f5f9 40%, #e2e8f0 60%);
    background-size: 220% 100%;
    animation: commentsShimmer 1.2s ease-in-out infinite;
}

.comments-loading-header {
    width: 38%;
    height: 10px;
    margin-bottom: 0.55rem;
}

.comments-loading-line {
    width: 100%;
    height: 8px;
    margin-bottom: 0.45rem;
}

.comments-loading-line.short {
    width: 58%;
    margin-bottom: 0;
}

@keyframes commentsShimmer {
    0% { background-position: 100% 0; }
    100% { background-position: 0 0; }
}

/* Card Styling */
.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s, box-shadow 0.2s;
    background: #fff;
    margin-bottom: 1rem;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.card-body {
    padding: 1rem;
}

.page-header {
    background: #fff;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 0.8rem;
}

/* Global page rhythm: keep heading/content spacing consistent across screens */
.app-content > .row {
    margin-bottom: 0.6rem;
}

.app-content .page-header {
    margin-bottom: 0.65rem !important;
}

.app-content .card,
.app-content .table-container,
.app-content .alert {
    margin-bottom: 0.7rem !important;
}

.app-content .mb-4 {
    margin-bottom: 0.75rem !important;
}

.app-content .mt-4 {
    margin-top: 0.75rem !important;
}

.app-content .mb-3 {
    margin-bottom: 0.6rem !important;
}

.app-content .mt-3 {
    margin-top: 0.6rem !important;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #2c3e50;
}

.header-title > i {
    background: #ecfdf5;
    color: #00a77e;
    padding: 9px;
    border-radius: 10px;
    font-size: 1rem;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0 !important;
}

/* Prevent header icon styles from affecting icons inside badges/content */
.header-title .badge i,
.header-title h1 i,
.header-title h2 i,
.header-title h3 i,
.header-title h4 i,
.header-title h5 i,
.header-title h6 i,
.header-title p i,
.header-title span i {
    background: transparent;
    color: inherit;
    padding: 0;
    width: auto;
    height: auto;
    border-radius: 0;
    display: inline;
    font-size: inherit;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.filter-item {
    min-width: 180px;
}

.search-item {
    flex-grow: 1;
    min-width: 300px;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-search {
    background: #6c757d;
    border: none;
    color: white;
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-search:hover {
    background: #5a6268;
    color: white;
}

.btn-manage-rooms {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    transition: all 0.2s;
}

.btn-manage-rooms:hover {
    background: #ecfdf5;
    border-color: #86efac;
    color: #166534;
}

.btn-add {
    background: #10b981;
    border: none;
    color: white;
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-add:hover {
    background: #059669;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

/* Admission source segmented control */
.source-toggle-group {
    border: 1px solid #00a77e;
    border-radius: 10px;
    overflow: hidden;
}

.source-toggle-group .btn-source-toggle {
    background: #f8fffc;
    color: #0f766e;
    border: 0;
    border-right: 1px solid #00a77e;
    font-weight: 600;
    padding: 10px 14px;
    font-size: 0.95rem !important;
}

.source-toggle-group .btn-source-toggle:last-of-type {
    border-right: 0;
}

.source-toggle-group .btn-check:checked + .btn-source-toggle {
    background: #00a77e;
    color: #fff;
}

.source-toggle-group .btn-source-toggle:hover {
    background: #ecfdf5;
    color: #065f46;
}

.source-toggle-group .btn-check:checked + .btn-source-toggle:hover {
    background: #009a75;
    color: #fff;
}

.form-select,
.form-control {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 0.42rem 0.8rem;
}

.form-select:focus,
.form-control:focus {
    border-color: #00a77e;
    box-shadow: 0 0 0 3px rgba(0, 167, 126, 0.1);
}

/* Table Styling */
.table-container {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.04);
    margin-bottom: 0.9rem;
}

.table thead th {
    background: #f8fafc;
    border-bottom: 2px solid #edf2f7;
    padding: var(--table-head-py) var(--table-head-px) !important;
    text-transform: uppercase;
    font-size: var(--table-head-font) !important;
    letter-spacing: 0.03em;
    color: #64748b !important;
    font-weight: 600 !important;
}

.table tbody td {
    padding: var(--table-body-py) var(--table-body-px) !important;
    vertical-align: middle;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
    font-size: var(--table-body-font) !important;
    line-height: 1.18;
}

.table tbody tr:hover {
    background-color: #f8fbff;
}

.user-info-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 38px;
    height: 38px;
    background: #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #475569;
    font-size: 0.85rem;
}

.badge-status {
    padding: 0.14rem 0.32rem;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.62rem !important;
    display: inline-block;
    white-space: nowrap;
}

.table .badge {
    font-size: var(--table-badge-font) !important;
    padding: var(--table-badge-py) var(--table-badge-px) !important;
}

.table .btn-sm {
    font-size: var(--table-btn-sm-font) !important;
    padding: var(--table-btn-sm-py) var(--table-btn-sm-px) !important;
    line-height: 1.1;
}

.table .text-muted.small,
.table small,
.table .small {
    font-size: 0.68rem !important;
}

.pending-reason {
    margin-top: 0.25rem;
    font-size: 0.68rem;
    color: #b91c1c;
    line-height: 1.15;
}

.badge-active {
    background: #dcfce7 !important;
    color: #166534 !important;
}

.badge-inactive {
    background: #f9e3e6 !important;
    color: #a63a4a !important;
    border: 1px solid #efc3cb;
}

.btn-edit-action {
    background: #f1f5f9;
    color: #475569;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.85rem !important;
    transition: all 0.2s;
}

.btn-edit-action:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.custom-button {
    color: inherit;
    font-size: inherit;
    transition: color 0.2s;
}

.custom-button:hover {
    color: #00a77e !important;
}

.cursor-pointer {
    cursor: pointer;
}

@media (max-width: 991.98px) {
    .page-header .action-buttons {
        width: 100%;
        flex-wrap: wrap;
    }

    .page-header .action-buttons .btn {
        flex: 1 1 auto;
        min-width: 140px;
    }

    .bed-status-table {
        min-width: 980px;
    }
}

@media (max-width: 575.98px) {
    .page-header {
        padding: 1rem !important;
    }

    .page-header .header-title h4 {
        font-size: 1.2rem !important;
    }

    .page-header .action-buttons .btn {
        width: 100%;
        min-width: 0;
    }

    .badge-status {
        padding: 5px 10px;
    }
}

/* Scrollable Grids (Like Services) */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    max-height: calc(100vh - 220px);
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.grid-item-check {
    margin-bottom: 0;
    padding: 10px 15px;
    transition: all 0.2s;
    border-radius: 8px;
}

.grid-item-check:hover {
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Custom Checkbox Cards */
.custom-checkbox-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 16px !important;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 0 !important;
}

.custom-checkbox-card:hover {
    border-color: #00a77e;
    background: #f0fdf4;
    box-shadow: 0 4px 12px rgba(0, 167, 126, 0.08);
}

.custom-checkbox-card .form-check-input {
    margin-right: 12px;
    margin-top: 0;
    cursor: pointer;
}

.custom-checkbox-card .form-check-label {
    cursor: pointer;
    font-weight: 500;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Announcement Styles */
.announcement-content {
    color: #334155;
    line-height: 1.6;
    font-size: 0.95rem;
    max-width: 600px;
}

/* Dashboard Specifics */
.badge-priority-urgent {
    background: #fee2e2;
    color: #dc2626 !important;
    border: 1px solid #fecaca;
}

.badge-priority-vip {
    background: #fef3c7;
    color: #d97706 !important;
    border: 1px solid #fde68a;
}

/* Green Theme Overrides for Info Utilities */
.text-info {
    color: #0d9488 !important;
}

.bg-info {
    background-color: #0d9488 !important;
}

.btn-info {
    background-color: #0d9488 !important;
    border-color: #0d9488 !important;
    color: #fff !important;
}

.alert-info {
    background-color: #f0fdfa !important;
    border-color: #ccfbf1 !important;
    color: #0f766e !important;
}

.bg-info-subtle {
    background-color: #f0fdfa !important;
    color: #0f766e !important;
    border-color: #ccfbf1 !important;
}
