/* ============================================
   Backend Style - SecMed CRM
   ============================================ */

/* --------------- Utilities --------------- */
.pagination-all {
    margin-top: 20px;
}

.no-wrap {
    white-space: nowrap;
}

/* --------------- Card Header --------------- */
.billing-table .card-header {
    padding: 12px 20px;
    border-bottom: 1px solid #e9ecef;
}

.billing-table .card-header h6 {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.billing-table .card-header h6 i {
    margin-right: 6px;
    color: #198754;
}

.billing-table .card-header .btn-success {
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.billing-table .card-header .btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(25, 135, 84, 0.3);
}

/* --------------- Search / Filter Section --------------- */
.billing-table .card-body.border-bottom {
    padding: 15px 20px;
    background-color: #f8f9fb;
}

.billing-table .card-body.border-bottom .form-control,
.billing-table .card-body.border-bottom .form-select {
    background-color: white;
}


/* --------------- Sticky Table Header --------------- */
.billing-table .table-responsive {
    max-height: 500px;
    overflow-y: auto;
}

.billing-table .table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: #f0f3f5;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* --------------- Table Styling --------------- */
.billing-table .table {
    font-size: 13px;
    border-collapse: separate;
    border-spacing: 0;
}

.billing-table .table thead th {
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 10px 12px;
    border-bottom: 2px solid #dee2e6;
    vertical-align: middle;
}

.billing-table .table tbody td {
    padding: 10px 12px;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
}

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

.billing-table .table tbody tr:last-child td {
    border-bottom: none;
}

/* --------------- Badges --------------- */
.billing-table .badge {
    font-size: 11px;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 12px;
    letter-spacing: 0.3px;
}

/* ============================================
   Responsive Design
   ============================================ */

/* Tablet (max-width: 1200px) */
@media (max-width: 1200px) {
    .billing-table .card-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 10px;
    }

    .billing-table .card-header .d-flex.gap-2 {
        width: 100%;
    }

    .billing-table .card-header .btn-success {
        flex: 1 1 auto;
        text-align: center;
    }
}

/* Small tablet / large phone (max-width: 992px) */
@media (max-width: 992px) {
    .billing-table .card-body.border-bottom .row > [class*="col-md"] {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .billing-table .table-responsive {
        max-height: 400px;
    }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    .billing-table .card-header {
        padding: 10px 15px;
    }

    .billing-table .card-header h6 {
        font-size: 14px;
    }

    .billing-table .card-header .d-flex.gap-2 {
        gap: 5px !important;
    }

    .billing-table .card-header .btn-success {
        font-size: 11px;
        padding: 4px 8px;
    }

    .billing-table .card-body.border-bottom {
        padding: 10px 15px;
    }

    .billing-table .card-body.border-bottom .row > [class*="col-md"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .billing-table .card-body {
        padding: 10px;
    }

    .billing-table .table {
        font-size: 12px;
    }

    .billing-table .table thead th {
        font-size: 11px;
        padding: 8px;
    }

    .billing-table .table tbody td {
        padding: 8px;
    }

    .billing-table .table-responsive {
        max-height: 350px;
    }

}

/* Small mobile (max-width: 576px) */
@media (max-width: 576px) {
    .billing-table .card-header .d-flex.gap-2 {
        flex-direction: column;
    }

    .billing-table .card-header .btn-success {
        width: 100%;
    }

    .billing-table .table-responsive {
        max-height: 300px;
    }
}
