body {
    background-color: #f1f3f5;
    font-family: 'Inter', sans-serif;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: #2c3e50;
    min-height: 100vh;
    padding-top: 20px;
    position: fixed;
    top: 0;
    left: 0;
}
.sidebar-header {
    padding: 20px;
    color: #ecf0f1;
    border-bottom: 1px solid #34495e;
}
.sidebar-header h4 {
    margin: 0;
    font-size: 1.5rem;
}
.sidebar .nav-link {
    color: #bdc3c7;
    padding: 12px 20px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}
.sidebar .nav-link:hover {
    background-color: #34495e;
    color: #ecf0f1;
}
.sidebar .nav-link.active {
    background-color: #3498db;
    color: #ecf0f1;
}

/* Main Content */
.content {
    margin-left: 250px;
    padding: 20px;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.card-title {
    color: #2c3e50;
    font-weight: 600;
}
.dashboard-card {
    background-color: #ffffff;
    transition: transform 0.2s ease;
}
.dashboard-card:hover {
    transform: translateY(-5px);
}
.card-body {
    padding: 25px;
}

/* Tables */
.table thead {
    background-color: #3498db;
    color: #ffffff;
}
.table-hover tbody tr:hover {
    background-color: #e9ecef;
}
.table th, .table td {
    vertical-align: middle;
}
.table-striped tbody tr:nth-of-type(odd) {
    background-color: #f8f9fa;
}

/* Buttons */
.btn-primary {
    background-color: #3498db;
    border-color: #3498db;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}
.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
}
.btn-success {
    background-color: #2ecc71;
    border-color: #2ecc71;
}
.btn-success:hover {
    background-color: #27ae60;
    border-color: #27ae60;
}
.btn-warning {
    background-color: #f1c40f;
    border-color: #f1c40f;
}
.btn-warning:hover {
    background-color: #d4ac0d;
    border-color: #d4ac0d;
}
.btn-danger {
    background-color: #e74c3c;
    border-color: #e74c3c;
}
.btn-danger:hover {
    background-color: #c0392b;
    border-color: #c0392b;
}
.btn-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
}
.btn-info:hover {
    background-color: #138496;
    border-color: #138496;
}

/* Spinner Overlay */
#loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Icon Styling */
.table th i {
    margin-right: 5px;
}

/* Ensure badge has a default style */
.badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
    background-color: #6c757d; /* Fallback background color */
    color: #fff; /* Fallback text color */
}

/* Status Badge Styles with Higher Specificity */
span.badge.status-pending {
    background-color: #dc3545 !important; /* Red background for Pending */
    color: #fff !important; /* White text */
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 12px;
}

span.badge.status-paid {
    background-color: #28a745 !important; /* Green background for Paid */
    color: #fff !important; /* White text */
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 12px;
}

span.badge.status-cancelled {
    background-color: #6c757d !important; /* Gray background for Cancelled */
    color: #fff !important; /* White text */
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 12px;
}

span.badge.status-open {
    background-color: #007bff !important; /* Blue background for Open */
    color: #fff !important; /* White text */
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 12px;
}

span.badge.status-closed {
    background-color: #6c757d !important; /* Gray background for Closed */
    color: #fff !important; /* White text */
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 12px;
}

/* Request Type Badge Styles */
span.badge.status-cancel {
    background-color: #dc3545 !important; /* Red background for Cancel (same as Pending) */
    color: #fff !important; /* White text */
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 12px;
}

span.badge.status-upgrade {
    background-color: #28a745 !important; /* Green background for Upgrade (same as Paid) */
    color: #fff !important; /* White text */
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 12px;
}

span.badge.status-downgrade {
    background-color: #f1c40f !important; /* Orange background for Downgrade (same as btn-warning) */
    color: #fff !important; /* White text */
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 12px;
}

/* Transaction Type Badge Styles */
span.badge.status-credit {
    background-color: #28a745 !important; /* Green background for Credit (same as Paid) */
    color: #fff !important; /* White text */
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 12px;
}

span.badge.status-debit {
    background-color: #dc3545 !important; /* Red background for Debit (same as Pending) */
    color: #fff !important; /* White text */
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 12px;
}

/* Ensure status text inside table cells uses badge styling */
td span.badge.status-pending,
td span.badge.status-paid,
td span.badge.status-cancelled,
td span.badge.status-open,
td span.badge.status-closed,
td span.badge.status-cancel,
td span.badge.status-upgrade,
td span.badge.status-downgrade,
td span.badge.status-credit,
td span.badge.status-debit {
    display: inline-block;
    min-width: 70px;
    text-align: center;
}

/* Other Status Colors (for tickets, etc.) - Deprecated */
.status-open {
    color: #007bff;
    font-weight: bold;
}

.status-closed {
    color: #6c757d;
    font-weight: bold;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }
    .content {
        margin-left: 200px;
    }
}
@media (max-width: 576px) {
    .sidebar {
        width: 100%;
        position: relative;
        min-height: auto;
    }
    .content {
        margin-left: 0;
    }
}