body {
    font-family: 'Poppins', sans-serif;
    background-color: #ebebeb;
}

/* Add extra bottom spacing for pages that use the floating button
   so native <select> dropdowns have room to expand downward. */
.with-floating-button .page-content,
.with-floating-button .container-fluid {
    padding-bottom: 160px;
}

/* Duplicate font block removed; font-family is set above */

.color-white {
    color: #ffffff;
}

.btn-save {
    background-color: #088E3D !important;
    color: #ffffff !important;

}

.btn-save:hover {
    background-color: #076A30 !important;
    color: #ffffff !important;

}

/* Custom CSS for dropdown arrows */
.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: '\25BC';
    /* Down arrow Unicode */
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #6c757d;
    font-size: 12px;
}

.select-wrapper select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: transparent;
    padding-right: 30px;
}


/* --- Custom Buttons Styling --- */

.btn-save,
.btn-report {
    width: 250px;
    font-weight: 600;
    border-radius: 50px;
    padding: 10px 0;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Save Button */
.btn-save {
    background-color: #088E3D;
    color: #fff;
    border: none;
}

.btn-save:hover {
    background-color: #076A30;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* View Report Button */
.btn-report {
    background-color: transparent;
    color: #088E3D;
    border: 2px solid #088E3D;
}

.btn-report:hover {
    background-color: #076A30;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}



/* --- Floating Buttons (Fixed + Smaller) --- */
.fab {
    width: 42px;
    height: 42px;
    background-color: #088E3D;
    color: #fff;
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
    position: fixed;
    right: 20px;
    z-index: 2000;
    /* make sure it floats above everything */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Hover lift */
.fab:hover {
    transform: scale(1.05);
    background-color: #0AAE4C;
}

/* Label styling */
.fab-label {
    position: absolute;
    right: 55px;
    background: #088E3D;
    color: #fff;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 12px;
    opacity: 0;
    transform: translateY(5px);
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
}

.fab:hover .fab-label {
    opacity: 1;
    transform: translateY(0);
}

/* === Individual positions === */
#openAddAccountBtn {
    bottom: 90px;
    /* Show above Quality button */
}

#openAddQualityBtn {
    bottom: 30px;
}

/* Ensure the container doesn't block fixed positioning */
.fab-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 1050;
}

.fab {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 12px 18px;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.fab i {
    font-size: 22px;
}

/* 🔥 MAKE LABEL ALWAYS VISIBLE */
.fab-label {
    display: inline-block;
    opacity: 1;
    visibility: visible;
    white-space: nowrap;
    transition: none;
}

/* ❌ Remove hover-only behavior if present */
.fab:hover .fab-label {
    opacity: 1;
    visibility: visible;
}

#modalItemList table tbody tr:hover {
    background-color: #f0f8ff;
    /* light blue */
    cursor: pointer;
}

.selectItemBtn {
    background: linear-gradient(90deg, #ff7e5f, #feb47b);
    color: #fff;
    font-weight: 500;
}

.selectItemBtn:hover {
    background: linear-gradient(90deg, #feb47b, #ff7e5f);
    color: #fff;
}


/* Keep table inside screen, allow horizontal scroll on mobile */
.sticky-table {
    max-height: 70vh;
    /* vertical and horizontal scroll */
    overflow-y: auto;
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

/* Table layout */
.sticky-table table {
    width: 100%;
    min-width: 900px;
    border-collapse: separate;
    border-spacing: 0;
}

/* Sticky header */
.sticky-table thead th {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #f8f9fa;
    white-space: normal;
    word-wrap: break-word;
    box-shadow: inset 0 -1px 0 #dee2e6;
}

/* Prevent text pushing table width */
.sticky-table td {
    word-wrap: break-word;
    white-space: normal;
}

/* ===========================
   MOBILE-RESPONSIVE LIST TABLES
   Horizontal scroll on mobile,
   desktop stays untouched.
   =========================== */

.table-responsive-mobile {
    width: 100%;
}

/* Specific Sticky Header for Contract and Dispatch Lists */
.main-content,
.page-content {
    overflow: visible !important;
}

.sticky-list-table {
    border-collapse: separate !important;
}

.sticky-list-table thead th {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 70px !important;
    /* Default for desktop topbar */
    z-index: 100 !important;
    background-color: #f8f9fa !important;
    border-bottom: 2px solid #dee2e6 !important;
    box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1);
}

/* On mobile, headers should stick to top */
@media (max-width: 991.98px) {
    .sticky-list-table thead th {
        top: 0 !important;
    }

    .table-responsive-mobile .dataTables_wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-responsive-mobile table.dataTable {
        min-width: 700px;
        width: 100% !important;
    }
}

/* Styles moved from list-issue.php */
.filter-card { background-color: #f8f9fa; border: 1px solid #e1e1e1; margin-bottom: 20px; }
.status-badge-pill { cursor: pointer; transition: 0.2s; }
.status-badge-pill:hover { opacity: 0.8; transform: translateY(-1px); }
.overdue-date { color: #d9534f; font-weight: 700; }
@media (max-width: 768px) {
    .table-responsive-custom { border: 0; }
    .table-responsive-custom thead { display: none; }
    .table-responsive-custom tr { display: block; margin-bottom: 15px; border: 1px solid #eee; padding: 10px; background: #fff; border-radius: 8px; }
    .table-responsive-custom td { display: flex; justify-content: space-between; padding: 8px 5px; border: none; text-align: right; }
    .table-responsive-custom td::before { content: attr(data-label); font-weight: 600; text-align: left; }
}