/**
 * =====================================================
 * NXT Banking - Enhanced UI Styles
 * Version: 1.0.0
 * Description: Modern, animated UI enhancements
 * =====================================================
 */

/* ===== ENHANCED AVATAR SYSTEM ===== */
.user-avatar-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f4f4f4;
    flex-shrink: 0;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.user-avatar:hover {
    transform: scale(1.1);
    border-color: var(--theme-default, #7366ff);
}

/* Avatar Initials with Gradient Backgrounds */
.avatar-initials {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
    color: white;
    text-transform: uppercase;
    user-select: none;
    flex-shrink: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.avatar-initials:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Gradient Background Colors */
.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.bg-gradient-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.bg-gradient-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
}

.bg-gradient-secondary {
    background: linear-gradient(135deg, #868f96 0%, #596164 100%);
}

/* User Details Text Styling */
.user-details-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    color: #2c323f;
    line-height: 1.4;
}

.user-id {
    font-size: 12px;
    color: #74788d;
}

/* ===== STAT CARDS WITH HOVER ANIMATIONS ===== */
.stat-card {
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stat-card .card-body {
    position: relative;
    z-index: 2;
}

/* Animated Bubbles Background */
.bubbles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.bubble {
    position: absolute;
    bottom: -100px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    opacity: 0.5;
    animation: rise 10s infinite ease-in;
}

.bubble:nth-child(1) {
    width: 40px;
    height: 40px;
    left: 10%;
    animation-duration: 8s;
}

.bubble:nth-child(2) {
    width: 20px;
    height: 20px;
    left: 20%;
    animation-duration: 5s;
    animation-delay: 1s;
}

.bubble:nth-child(3) {
    width: 50px;
    height: 50px;
    left: 35%;
    animation-duration: 7s;
    animation-delay: 2s;
}

.bubble:nth-child(4) {
    width: 80px;
    height: 80px;
    left: 50%;
    animation-duration: 11s;
}

.bubble:nth-child(5) {
    width: 35px;
    height: 35px;
    left: 55%;
    animation-duration: 6s;
    animation-delay: 1s;
}

.bubble:nth-child(6) {
    width: 45px;
    height: 45px;
    left: 65%;
    animation-duration: 8s;
    animation-delay: 3s;
}

.bubble:nth-child(7) {
    width: 90px;
    height: 90px;
    left: 70%;
    animation-duration: 12s;
    animation-delay: 2s;
}

.bubble:nth-child(8) {
    width: 25px;
    height: 25px;
    left: 80%;
    animation-duration: 6s;
    animation-delay: 2s;
}

.bubble:nth-child(9) {
    width: 15px;
    height: 15px;
    left: 90%;
    animation-duration: 5s;
    animation-delay: 1s;
}

@keyframes rise {
    0% {
        bottom: -100px;
        transform: translateX(0);
    }
    50% {
        transform: translate(100px);
    }
    100% {
        bottom: 1080px;
        transform: translateX(-200px);
    }
}

/* ===== ENHANCED TABLE STYLING ===== */
#transactionUsersTable thead th,
#businessUsersTable thead th,
#managementUsersTable thead th {
    background: var(--theme-default, #7366ff);
    color: white;
    font-weight: 600;
    font-size: 13px;
    padding: 15px 12px;
    border: none;
}

#transactionUsersTable tbody tr,
#businessUsersTable tbody tr,
#managementUsersTable tbody tr {
    transition: all 0.3s ease;
}

#transactionUsersTable tbody tr:hover,
#businessUsersTable tbody tr:hover,
#managementUsersTable tbody tr:hover {
    background: #f8f9ff;
    transform: scale(1.01);
    box-shadow: 0 4px 15px rgba(115, 102, 255, 0.1);
}

#transactionUsersTable tbody td,
#businessUsersTable tbody td,
#managementUsersTable tbody td {
    vertical-align: middle;
    padding: 15px 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

/* ===== MODERN BADGES ===== */
.badge {
    padding: 6px 12px;
    font-weight: 500;
    font-size: 11px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Light Badge Variants */
.badge-light-primary {
    background: #e8e6ff;
    color: #7366ff;
}

.badge-light-success {
    background: #d4f4dd;
    color: #54ba4a;
}

.badge-light-warning {
    background: #fff4d4;
    color: #f8d62b;
}

.badge-light-danger {
    background: #ffe5e5;
    color: #dc3545;
}

.badge-light-info {
    background: #d4f4f8;
    color: #1ea7c5;
}

.badge-light-secondary {
    background: #f0f0f0;
    color: #7e7e7e;
}

/* ===== FILTER PANEL ===== */
.filter-panel {
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* ===== MODERN PILL BUTTONS ===== */
.btn-pill {
    border-radius: 25px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* ===== TEXT GRADIENT ===== */
.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== UTILITY CLASSES ===== */
.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 1rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .stat-card {
        margin-bottom: 15px;
    }
    
    .user-avatar,
    .avatar-initials {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .btn-pill {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    #transactionUsersTable tbody td,
    #businessUsersTable tbody td,
    #managementUsersTable tbody td {
        padding: 10px 8px;
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .user-avatar-cell {
        gap: 8px;
    }
    
    .user-avatar,
    .avatar-initials {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .badge {
        padding: 4px 8px;
        font-size: 10px;
    }
}

/* ===== SMOOTH SCROLLING ===== */
html {
    scroll-behavior: smooth;
}

/* ===== CUSTOM SCROLLBAR (Optional) ===== */
.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: var(--theme-default, #7366ff);
    border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: var(--theme-secondary, #5a4fcf);
}

/* ===== LOADING ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* ===== CARD ENHANCEMENTS ===== */
.card {
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* ===== ENHANCED FORM CONTROLS ===== */
.form-control:focus,
.form-select:focus {
    border-color: var(--theme-default, #7366ff);
    box-shadow: 0 0 0 0.2rem rgba(115, 102, 255, 0.15);
}

/* ===== ENHANCED BUTTONS ===== */
.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

/* ===== TOOLTIP ENHANCEMENTS ===== */
[data-bs-toggle="tooltip"] {
    cursor: pointer;
}

/* ===== STAT CARD COLOR-SPECIFIC BUBBLE BACKGROUNDS ===== */
.total-success .bubbles,
.total-info .bubbles,
.total-danger .bubbles,
.total-secondary .bubbles {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    top: 0;
    left: 0;
}

.total-success .bubble {
    height: 25px;
    width: 25px;
    border-radius: 15px;
    background-color: rgba(84, 186, 74, 0.1);
    position: absolute;
    animation: floating 10s infinite ease-in;
}

.total-info .bubble {
    height: 25px;
    width: 25px;
    border-radius: 15px;
    background-color: rgba(30, 167, 197, 0.1);
    position: absolute;
    animation: floating 10s infinite ease-in;
}

.total-danger .bubble {
    height: 25px;
    width: 25px;
    border-radius: 15px;
    background-color: rgba(220, 53, 69, 0.1);
    position: absolute;
    animation: floating 10s infinite ease-in;
}

.total-secondary .bubble {
    height: 25px;
    width: 25px;
    border-radius: 15px;
    background-color: rgba(126, 126, 126, 0.1);
    position: absolute;
    animation: floating 10s infinite ease-in;
}

.total-success .bubble:nth-child(1),
.total-info .bubble:nth-child(1),
.total-danger .bubble:nth-child(1),
.total-secondary .bubble:nth-child(1) {
    height: 25px; width: 25px; border-radius: 15px;
    left: 5%; animation-duration: 13s;
}

.total-success .bubble:nth-child(2),
.total-info .bubble:nth-child(2),
.total-danger .bubble:nth-child(2),
.total-secondary .bubble:nth-child(2) {
    height: 28px; width: 28px; border-radius: 15px;
    left: 15%; animation-duration: 10s; animation-delay: 1s;
}

.total-success .bubble:nth-child(3),
.total-info .bubble:nth-child(3),
.total-danger .bubble:nth-child(3),
.total-secondary .bubble:nth-child(3) {
    height: 24px; width: 24px; border-radius: 15px;
    left: 30%; animation-duration: 12s; animation-delay: 3s;
}

.total-success .bubble:nth-child(4),
.total-info .bubble:nth-child(4),
.total-danger .bubble:nth-child(4),
.total-secondary .bubble:nth-child(4) {
    height: 15px; width: 15px; border-radius: 15px;
    left: 50%; animation-duration: 9s; animation-delay: 1s;
}

.total-success .bubble:nth-child(5),
.total-info .bubble:nth-child(5),
.total-danger .bubble:nth-child(5),
.total-secondary .bubble:nth-child(5) {
    height: 20px; width: 20px; border-radius: 15px;
    left: 60%; animation-duration: 11s; animation-delay: 1s;
}

.total-success .bubble:nth-child(6),
.total-info .bubble:nth-child(6),
.total-danger .bubble:nth-child(6),
.total-secondary .bubble:nth-child(6) {
    height: 30px; width: 30px; border-radius: 15px;
    left: 70%; animation-duration: 8s; animation-delay: 2s;
}

.total-success .bubble:nth-child(7),
.total-info .bubble:nth-child(7),
.total-danger .bubble:nth-child(7),
.total-secondary .bubble:nth-child(7) {
    height: 30px; width: 30px; border-radius: 15px;
    left: 80%; animation-duration: 14s; animation-delay: 1s;
}

.total-success .bubble:nth-child(8),
.total-info .bubble:nth-child(8),
.total-danger .bubble:nth-child(8),
.total-secondary .bubble:nth-child(8) {
    height: 30px; width: 30px; border-radius: 15px;
    left: 85%; animation-duration: 10s; animation-delay: 2s;
}

.total-success .bubble:nth-child(9),
.total-info .bubble:nth-child(9),
.total-danger .bubble:nth-child(9),
.total-secondary .bubble:nth-child(9) {
    height: 25px; width: 25px; border-radius: 15px;
    left: 92%; animation-duration: 12s; animation-delay: 3s;
}

/* ===== END OF CUSTOM ENHANCEMENTS ===== */
