#loadingOverlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 999999 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

#loadingOverlay .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* 🧱 Table Container */
.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* smooth iOS scroll */
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* 🧾 Table Styling */
table.table {
    width: 100%;
    min-width: 1000px;
    /* ensures horizontal scroll if screen is smaller */
    border-collapse: separate;
    border-spacing: 0;
}

.table thead.table-dark th {
    background: #212529;
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
    vertical-align: middle;
}

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

.table td,
.table th {
    vertical-align: middle;
    text-overflow: ellipsis;
    overflow: hidden;
}

/* 📱 Responsive tweak: small screens */
@media (max-width: 768px) {
    .table-container {
        border: none;
        box-shadow: none;
        border-radius: 0;
    }

    table.table {
        min-width: 700px;
        /* smaller scroll area for mobile */
    }

    .table td,
    .table th {
        font-size: 0.9rem;
        padding: 0.75rem;
    }
}

/*Generate buttton*/
/* 🟢 Active (enabled) gradient button */
.btn-gradient {
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    color: #fff;
    border: none;
    transition: all 0.2s ease-in-out;
}

.btn-gradient:hover:not(:disabled) {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

/* ⚪ Disabled (greyish) state */
.btn-gradient:disabled {
    background: linear-gradient(90deg, #d1d5db 0%, #9ca3af 100%) !important;
    box-shadow: none !important;
    cursor: not-allowed;
    opacity: 0.9;
    color: #f8f9fa !important;
}

/* 💡 Optional: scroll bar styling (Chrome, Edge, Safari) */
.table-container::-webkit-scrollbar {
    height: 8px;
}

.table-container::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.35);
}

.blur-row {
    filter: blur(4px);
    opacity: 0.8;
    pointer-events: none;
    transition: all 0.4s ease;
}

.card {
    border-radius: 1rem;
}

.table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

input::placeholder {
    color: #6c757d;
    font-style: italic;
}

.select2-container--default .select2-selection--single {
    height: 3.25rem;
    border-radius: 0.5rem;
    border: 1px solid #ced4da;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
}

.select2-selection__arrow {
    top: 12px !important;
}

.no-select {
    user-select: none;
    /* Standard */
    -webkit-user-select: none;
    /* Chrome/Safari */
    -moz-user-select: none;
    /* Firefox */
    -ms-user-select: none;
    /* IE10+ */
}

.truncate-text {
    max-width: 100px;
    /* limit width of text inside td */
    white-space: nowrap;
    /* prevent wrapping */
    overflow: hidden;
    /* hide overflow */
    text-overflow: ellipsis;
    /* show ... */
}

/* Optional: custom styles for better mobile cards */
.affiliate-card {
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
    background: #ffffff;
    transition: all 0.2s ease-in-out;
}

.affiliate-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.affiliate-card .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
    color: #0d6efd;
}

.affiliate-card .card-body p {
    margin-bottom: 0.5rem;
}

.affiliate-card .label {
    font-weight: 500;
    color: #6c757d;
}
