body, .page-wrapper {
    background-color: #fefefe !important;
}

.header {
    border-bottom: 2px solid #e9f7f5 !important;
}

thead th {
    background-color: #f8fbfa !important;
    color: #59a397 !important;
    border-bottom: 2px solid #6abaad !important;
}

.modal-header {
    background-color: #f8fbfa !important;
    border-bottom: 2px solid #6abaad !important;
}

.modal-title {
    color: #59a397 !important;
    font-weight: 700 !important;
}

.btn.btn-primary, .btn-primary{
    background-color: #6abaad !important;
    border-color: #6abaad !important;
    color: #ffffff !important;
}

.btn.btn-primary:hover, .btn-primary:hover{
    background-color: #59a397 !important;
    border-color: #59a397 !important;
    color: #ffffff !important;
}

.btn-outline-primary {
    color: #6abaad !important;
    border-color: #6abaad !important;
}

.btn-outline-primary:hover {
    background-color: #6abaad !important;
    color: #ffffff !important;
}

.btn-secondary {
    background-color: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    color: #475569 !important;
}

.btn-soft-primary {
    background-color: #e9f7f5 !important;
    color: #6abaad !important;
    border: none !important;
}

.btn-soft-primary:hover {
    background-color: #6abaad !important;
    color: #ffffff !important;
}

.border.border-primary{
    border-color: #6abaad !important;
}

/* =========================================
   ESSENTIAL UTILITY FIXES
   ========================================= */

/* Fix for pale alerts (Theme bug: white text on light background) */
.bg-light {
    color: #475569 !important;
}

.alert-danger {
    color: #991b1b !important;
    background-color: #fee2e2 !important;
}

.alert-success {
    color: #166534 !important;
    background-color: #dcfce7 !important;
}

/* Modernized Pagination (Premium Circular) */
.custom-pagination-list {
    display: inline-flex;
    gap: 10px;
    padding: 10px;
    background: #ffffff;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid #f1f5f9;
}

.custom-pagination-list .page-item .page-link {
    border: none !important;
    background: transparent;
    color: #64748b;
    border-radius: 50% !important; 
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px !important;
    font-weight: 700 !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    padding: 0;
}

.custom-pagination-list .page-item:not(.active):not(.disabled) .page-link:hover {
    background: #e9f7f5;
    color: #6abaad;
    transform: translateY(-2px);
}

.custom-pagination-list .page-item.active .page-link {
    background: #6abaad !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(106, 186, 173, 0.35);
}

.custom-pagination-list .page-item.disabled .page-link {
    opacity: 0.3;
    cursor: not-allowed;
    background: transparent;
}

.custom-pagination-list .page-item .page-link i {
    font-size: 16px;
}

/* Table Footer / Pagination Layout */
.table-footer {
    padding: 18px 24px;
    background: #fefefe;
    border-top: 1px solid #f1f5f9;
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-info-group {
    display: flex;
    align-items: center;
    gap: 20px;
}

.per-page-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.per-page-wrap label {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    margin: 0;
}

.custom-per-page {
    height: 34px;
    width: 72px;
    padding: 0 8px;
    border: 1.5px solid #eef2f6;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    background: #f8fafc;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
}

.custom-per-page:focus {
    border-color: #6abaad;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(106, 186, 173, 0.08);
}

/* Application-wide Responsiveness */
@media (max-width: 991.98px) {
    .header {
        height: 70px !important;
    }
    .main-header {
        padding: 0 15px !important;
    }
    .store-icon-sm {
        width: 30px !important;
        height: 30px !important;
    }
    .store-icon-sm i {
        font-size: 16px !important;
    }
    
    /* Stack table controls on tablets */
    .table-controls-wrapper {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px !important;
    }
    
    .table-actions-group {
        width: 100%;
        justify-content: flex-start !important;
        flex-wrap: wrap;
    }
}

@media (max-width: 767.98px) {
    .dashboard-card-wrap {
        width: 100% !important;
        margin-bottom: 15px;
    }
}

@media (max-width: 575.98px) {
    .header {
        height: 64px !important;
    }
    .user-info-text {
        display: none !important;
    }
    
    .command-search-group {
        width: 100% !important;
    }
    
    .table-footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-info-group {
        flex-direction: column;
        gap: 10px;
    }
}

.text-primary {
    color: #6abaad !important;
}

.bg-primary {
    background-color: #6abaad !important;
}

.results-count {
    font-size: 13px;
    font-weight: 500;
    color: #94a3b8;
}

.results-count strong {
    color: #475569;
}

@media (max-width: 575.98px) {
    .btn-soft-danger i {
        font-size: 20px !important;
    }
    .btn-soft-danger {
        padding: 8px 12px !important;
    }
}

.btn-check:focus + .btn-primary, .btn-primary:focus, .btn-primary.focus {
    box-shadow: 0 0 0 0.25rem rgba(106, 186, 173, 0.5) !important;
}
