/* ======================================================
   GLOBAL RESET
====================================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont,
        'Segoe UI', Roboto, sans-serif;
    background: #f8fafc;
    color: #111827;
    line-height: 1.6;
}

/* ======================================================
   USERS WRAPPER
====================================================== */
.users-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    margin-top: 1.5rem;
}

/* ======================================================
   CARD
====================================================== */
.users-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 1.8rem;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.05);
}

/* ======================================================
   HEADER
====================================================== */
.users-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.6rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-right {
    display: flex;
    align-items: center;
}

.users-header h3 {
    font-size: 20px;
    font-weight: 700;
}

.users-count {
    background: #ede9fe;
    color: #6d28d9;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

/* ======================================================
   ADD USER BUTTON
====================================================== */
.add-user-btn {
    background: #2563eb;
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s ease;
}

.add-user-btn:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

/* ======================================================
   TABLE
====================================================== */
.users-table {
    width: 100% !important;
    min-width: 1050px;
    border-collapse: collapse !important;
}

.users-table thead th {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
    padding: 12px;
    white-space: nowrap;
}

.users-table tbody td {
    font-size: 14px;
    padding: 14px 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    white-space: nowrap;
}

.users-table tbody tr:hover {
    background: #f9fafb;
}

/* ======================================================
   USER INFO
====================================================== */
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ede9fe;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #6d28d9;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-text {
    font-weight: 700;
}

.user-name {
    font-weight: 600;
}

/* ======================================================
   BALANCE
====================================================== */
.balance {
    font-weight: 600;
}

/* ======================================================
   STATUS PILLS
====================================================== */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

/* Active */
.status-pill.active {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

/* Suspended */
.status-pill.suspended {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.45);
}

/* Blocked */
.status-pill.blocked {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.5);
}

/* Inactive */
.status-pill.inactive {
    background: rgba(107, 114, 128, 0.12);
    color: #4b5563;
    border: 1px solid rgba(107, 114, 128, 0.35);
}

/* ======================================================
   ACTION BUTTONS
====================================================== */
.actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s ease;
    border: none;
    cursor: pointer;
}

/* VIEW */
.action-btn.view {
    background: #e0f2fe;
    color: #0284c7;
}

.action-btn.view:hover {
    background: #0284c7;
    color: #fff;
    transform: scale(1.08);
}

/* TOPUP */
.action-btn.topup {
    background: rgba(34,197,94,0.12);
    color: #16a34a;
}

.action-btn.topup:hover {
    background: #16a34a;
    color: #fff;
    transform: scale(1.08);
}

/* EDIT */
.action-btn.edit {
    background: #ede9fe;
    color: #6d28d9;
}

.action-btn.edit:hover {
    background: #6d28d9;
    color: #fff;
    transform: scale(1.08);
}

/* DELETE */
.action-btn.delete {
    background: #fee2e2;
    color: #dc2626;
}

.action-btn.delete:hover {
    background: #dc2626;
    color: #fff;
    transform: scale(1.08);
}

/* ======================================================
   DATATABLE INPUTS
====================================================== */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 13px;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
    outline: none;
}

/* ======================================================
   RESPONSIVE
====================================================== */
@media (max-width: 1024px) {
    .users-wrapper {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .users-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .users-card {
        padding: 1.2rem;
    }
}

/* ======================================================
   ALERT MESSAGES
====================================================== */
.alert-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    animation: fadeInAlert 0.3s ease;
}

@keyframes fadeInAlert {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-box i {
    font-size: 16px;
}

.alert-close {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
}

/* SUCCESS */
.alert-success {
    background: rgba(109, 40, 217, 0.1);
    border: 1px solid rgba(109, 40, 217, 0.4);
    color: #6d28d9;
}

/* ERROR */
.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #dc2626;
}

/* VALIDATION */
.alert-validation {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #d97706;
}

.alert-validation ul {
    margin-top: 6px;
    padding-left: 18px;
}

/* ================= USER FLEX LAYOUT ================= */

.user-flex {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ================= AVATAR ================= */

.user-avatar-wrapper {
    position: relative;
    width: 42px;
    height: 42px;
}

.user-avatar-img,
.user-initials {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.user-initials {
    background: #6d28d9;
    color: #fff;
}

/* ================= COUPON DOT (PREMIUM VERSION) ================= */

.coupon-dot {
    position: absolute;
    bottom: -3px;
    right: -3px;
    width: 12px;
    height: 12px;
    background: #22c55e;
    border-radius: 50%;
    border: 3px solid #ffffff;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
    transition: 0.3s ease;
}

.user-avatar-wrapper:hover .coupon-dot {
    transform: scale(1.15);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
}


/* ================= USER NAME ================= */

.user-fullname {
    font-weight: 600;
    font-size: 14.5px;
    color: #1f2937;
    letter-spacing: 0.2px;
    line-height: 1.3;
}


/* ================= COUPON BADGE (PROFESSIONAL STYLE) ================= */

.coupon-badge {
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #ffffff;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
}

.coupon-badge i {
    font-size: 11px;
}

/* Hover Effect */
.coupon-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(22, 163, 74, 0.35);
    background: linear-gradient(135deg, #15803d, #166534);
}

/* Active Click Effect */
.coupon-badge:active {
    transform: scale(0.96);
}