:root {
    --dizi-primary: #2563eb;
    --dizi-secondary: #7c3aed;
    --dizi-accent: #f59e0b;
    --dizi-bg: #ffffff;
    --dizi-card-bg: #ffffff;
    --dizi-border: #e2e8f0;
    --dizi-text: #1e293b;
    --dizi-text-muted: #64748b;
    --dizi-success: #10b981;
    --dizi-warning: #f59e0b;
    --dizi-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --dizi-glass: rgba(255, 255, 255, 0.7);
}

.dizi-aff-container {
    font-family: 'Outfit', sans-serif;
    color: var(--dizi-text);
    background: var(--dizi-bg);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid var(--dizi-border);
    box-shadow: var(--dizi-shadow);
    margin: 1.5rem 0;
}

/* Premium Light Cards */
.dizi-aff-card {
    background: #ffffff;
    border: 1px solid var(--dizi-border);
    border-radius: 16px;
    padding: 1.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.dizi-aff-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: var(--dizi-primary);
}

/* Floating Strip - Light Version */
.dizi-aff-strip {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 65px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--dizi-border);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    color: var(--dizi-text);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.dizi-aff-strip-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.dizi-aff-btn {
    background: var(--dizi-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.dizi-aff-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.dizi-aff-btn.secondary {
    background: #f1f5f9;
    color: var(--dizi-text);
    border: 1px solid var(--dizi-border);
}

.dizi-aff-btn.secondary:hover {
    background: #e2e8f0;
}

/* Stats Components */
.stat-card { background: #f8fafc; }
.stat-icon { width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; background: white; border-radius: 12px; font-size: 1.5rem; color: var(--dizi-primary); box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.stat-label { font-size: 0.85rem; color: var(--dizi-text-muted); font-weight: 500; }
.stat-value { font-size: 1.75rem; font-weight: 700; color: var(--dizi-text); }
.stat-trend { font-size: 0.75rem; color: var(--dizi-text-muted); margin-top: 0.5rem; }
.stat-trend.positive { color: var(--dizi-success); }

/* Form Styling */
.form-group input, .form-group textarea {
    background: #ffffff;
    border: 1px solid var(--dizi-border);
    color: var(--dizi-text);
    padding: 0.6rem 0.9rem;
    border-radius: 10px;
    width: 100%;
    transition: all 0.2s;
    resize: vertical;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--dizi-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group label { color: var(--dizi-text); font-weight: 500; }

/* Table Styling */
.dizi-aff-table { width: 100%; border-collapse: collapse; }
.dizi-aff-table th { text-align: left; padding: 1rem; border-bottom: 2px solid var(--dizi-border); color: var(--dizi-text-muted); font-size: 0.85rem; text-transform: uppercase; }
.dizi-aff-table td { padding: 1.2rem 1rem; border-bottom: 1px solid var(--dizi-border); color: var(--dizi-text); }
.dizi-aff-table tr:hover { background: #f8fafc; }

/* Dashboard Specifics */
.dizi-aff-db-tabs .tab-btn { color: var(--dizi-text-muted); padding: 1rem; cursor: pointer; border-bottom: 2px solid transparent; background: none; border-top: none; border-left: none; border-right: none; }
.dizi-aff-db-tabs .tab-btn.active { color: var(--dizi-primary); border-bottom-color: var(--dizi-primary); font-weight: 600; }

.pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--dizi-success);
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

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

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Messages */
.dizi-success-msg, .dizi-error-msg {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    animation: fadeIn 0.3s ease;
}

.dizi-success-msg {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #34d399;
}

.dizi-error-msg {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #f87171;
}

/* Ledger Styles */
.ledger-badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}
.ledger-badge.credit { background: #d1fae5; color: #059669; }
.ledger-badge.debit { background: #fee2e2; color: #dc2626; }

.dizi-pagination {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    justify-content: center;
}
.dizi-pagination .p-btn {
    width: 35px;
    height: 35px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}
.dizi-pagination .p-btn.active {
    background: #1e293b;
    color: white;
    border-color: #1e293b;
}
.dizi-pagination .p-btn:hover:not(.active) {
    background: #f8fafc;
}

/* Responsive Utility */
.dizi-table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
    border-radius: 12px;
    border: 1px solid var(--dizi-border);
}

/* Tablet and Mobile Adjustments */
@media (max-width: 992px) {
    .dizi-aff-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .dizi-aff-container {
        padding: 1rem;
        margin: 1rem 0;
        border-radius: 12px;
    }

    .dizi-aff-strip {
        height: auto;
        padding: 0.75rem 1rem;
        flex-direction: column;
    }

    .dizi-aff-strip-content {
        flex-direction: column;
        gap: 0.5rem;
    }

    .dizi-aff-db-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1.5rem;
    }

    .dizi-aff-db-header div:last-child {
        width: 100%;
        align-items: flex-start !important;
        text-align: left !important;
    }

    .dizi-aff-db-header .user-id-container {
        width: 100%;
        justify-content: space-between;
        display: flex;
        align-items: center;
    }

    .dizi-aff-stats-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .dizi-aff-db-tabs {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
        gap: 0.5rem !important;
        margin-bottom: 1.5rem !important;
    }

    .tab-btn {
        padding: 8px 15px !important;
        font-size: 14px;
    }

    .dizi-report-filter-bar form {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .dizi-report-filter-bar form > div {
        flex-direction: column !important;
        width: 100%;
    }

    .dizi-report-filter-bar input {
        width: 100% !important;
        max-width: none !important;
    }

    .form-group-grid {
        grid-template-columns: 1fr !important;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .dizi-aff-table th, .dizi-aff-table td {
        padding: 0.75rem;
        font-size: 13px;
    }

    .dizi-aff-db-header h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .dizi-aff-btn {
        width: 100%;
        justify-content: center;
    }
    
    .dizi-aff-card {
        padding: 1.25rem;
    }
}
