/**
 * Marketing Monitor - Senzenith Theme
 * สไตล์สำหรับหน้า Marketing Monitor
 */

/* ========================================
   Animation Keyframes
======================================== */

@keyframes sznFadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes sznPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes sznShimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes sznFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes sznGlow {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
    }
    50% {
        box-shadow: 0 4px 25px rgba(102, 126, 234, 0.4);
    }
}

/* ========================================
   Search Card Styling
======================================== */

#advanced-search-datatable .card {
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: none;
    overflow: hidden;
    animation: sznFadeInUp 0.6s ease-out;
}

#advanced-search-datatable .card-header {
    background: linear-gradient(135deg, #5f6c7b 0%, #8395a7 100%);
    padding: 1.5rem;
    border: none;
}

#advanced-search-datatable .card-header h4 {
    color: white;
    font-weight: 600;
    margin: 0;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

#advanced-search-datatable .card-header h4::before {
    content: '📊';
    font-size: 1.5rem;
}

/* Input Group Styling */
#advanced-search-datatable .input-group {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

#advanced-search-datatable .input-group-prepend .btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 0.75rem 1.2rem;
    transition: all 0.3s ease;
}

#advanced-search-datatable .input-group-prepend .btn:hover {
    transform: scale(1.05);
}

#advanced-search-datatable .form-control {
    border: 2px solid #e9ecef;
    padding: 0.75rem 1.2rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

#advanced-search-datatable .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

#advanced-search-datatable .input-group-append .btn {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
}

#advanced-search-datatable .input-group-append .btn.btn-outline-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

#advanced-search-datatable .input-group-append .btn.btn-outline-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    border: none;
}

#advanced-search-datatable .input-group-append .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ========================================
   Master Header Card (Green Success Card)
======================================== */

.szn-master-header {
    background: linear-gradient(135deg, #00b894 0%, #55efc4 100%);
    border-radius: 15px;
    box-shadow: 0 6px 20px rgba(0, 184, 148, 0.3);
    overflow: hidden;
    animation: sznFadeInUp 0.6s ease-out;
    position: relative;
}

.szn-master-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: sznFloat 6s ease-in-out infinite;
}

.szn-master-header .card-body {
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.szn-master-header h4.card-title {
    color: white;
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 12px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.szn-master-header h4.card-title::before {
    content: '👤';
    font-size: 2rem;
    animation: sznPulse 2s ease-in-out infinite;
}

.szn-master-header p.card-text {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.szn-master-header p.card-text::before {
    content: '📅';
    font-size: 1.2rem;
}

.szn-master-header p.card-text b {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
}

/* ========================================
   Metric Cards (Bonus, Withdraw, Deposit)
======================================== */

.szn-metric-card {
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: none;
    overflow: hidden;
    transition: all 0.4s ease;
    animation: sznFadeInUp 0.8s ease-out;
    position: relative;
    background: white;
}

.szn-metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    animation: sznShimmer 3s linear infinite;
}

.szn-metric-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.szn-metric-card .card-body {
    padding: 2rem 1.5rem;
    text-align: center;
}

/* Avatar/Icon Container */
.szn-metric-card .avatar {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.szn-metric-card:hover .avatar {
    transform: scale(1.1) rotate(5deg);
    animation: sznPulse 1s ease-in-out infinite;
}

.szn-metric-card .avatar::after {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: inherit;
    opacity: 0.2;
    z-index: -1;
    transition: all 0.3s ease;
}

.szn-metric-card:hover .avatar::after {
    inset: -15px;
    opacity: 0.3;
}

.szn-metric-card .avatar-content i {
    font-size: 2rem;
    transition: all 0.3s ease;
}

.szn-metric-card:hover .avatar-content i {
    transform: scale(1.2);
}

/* Bonus Card - Red/Pink Gradient */
.szn-metric-card.szn-bonus .avatar {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    --accent-color: #ff6b6b;
}

.szn-metric-card.szn-bonus .avatar-content i {
    color: white;
}

.szn-metric-card.szn-bonus::before {
    --accent-color: #ff6b6b;
}

/* Withdraw Card - Orange Gradient */
.szn-metric-card.szn-withdraw .avatar {
    background: linear-gradient(135deg, #ff9f43 0%, #ff6348 100%);
    --accent-color: #ff9f43;
}

.szn-metric-card.szn-withdraw .avatar-content i {
    color: white;
}

.szn-metric-card.szn-withdraw::before {
    --accent-color: #ff9f43;
}

/* Deposit Card - Green Gradient */
.szn-metric-card.szn-deposit .avatar {
    background: linear-gradient(135deg, #00b894 0%, #55efc4 100%);
    --accent-color: #00b894;
}

.szn-metric-card.szn-deposit .avatar-content i {
    color: white;
}

.szn-metric-card.szn-deposit::before {
    --accent-color: #00b894;
}

/* Income Card - Blue/Purple Gradient */
.szn-metric-card.szn-income .avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --accent-color: #667eea;
}

.szn-metric-card.szn-income .avatar-content i {
    color: white;
}

.szn-metric-card.szn-income::before {
    --accent-color: #667eea;
}

/* Metric Value */
.szn-metric-card h4 {
    font-size: 2rem;
    font-weight: 700;
    margin: 1rem 0 0.5rem;
    color: #2d3436;
    transition: all 0.3s ease;
}

.szn-metric-card:hover h4 {
    transform: scale(1.05);
}

.szn-metric-card h4.text-danger {
    color: #ff6b6b !important;
    animation: sznPulse 2s ease-in-out infinite;
}

/* Metric Label */
.szn-metric-card .card-text {
    color: #636e72;
    font-size: 1.1rem;
    margin: 0;
    font-weight: 600;
}

.szn-metric-card .card-text b {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-block;
    margin-right: 6px;
}

/* ========================================
   Section Divider
======================================== */

.szn-section-divider {
    margin: 2rem 0;
    position: relative;
    text-align: center;
}

.szn-section-divider hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, #dfe6e9, transparent);
    margin: 0;
}

/* ========================================
   Loading Popup
======================================== */

#loadingPopup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    animation: sznFadeInUp 0.3s ease-out;
}

#loadingPopup::before {
    content: '⏳';
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: sznFloat 2s ease-in-out infinite;
}

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

@media (max-width: 768px) {
    .szn-master-header h4.card-title {
        font-size: 1.2rem;
    }
    
    .szn-metric-card .avatar {
        width: 60px;
        height: 60px;
    }
    
    .szn-metric-card h4 {
        font-size: 1.5rem;
    }
    
    .szn-metric-card .card-body {
        padding: 1.5rem 1rem;
    }
}

/* ========================================
   Utility Classes
======================================== */

.szn-fade-in {
    animation: sznFadeInUp 0.6s ease-out;
}

.szn-pulse {
    animation: sznPulse 2s ease-in-out infinite;
}

.szn-float {
    animation: sznFloat 3s ease-in-out infinite;
}

.szn-glow {
    animation: sznGlow 2s ease-in-out infinite;
}
