/* Affiliate Dashboard Styles */

:root {
    --primary: #2563eb;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --purple: #8b5cf6;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-800: #1f2937;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background: var(--gray-50);
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary), #1e40af);
    color: white;
    padding: 1rem 0;
    margin-bottom: 1.5rem;
}

.header h1 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
    border: 1px solid var(--gray-100);
    margin-bottom: 1rem;
}

.card-header {
    background: var(--gray-50);
    padding: .875rem 1rem;
    border-bottom: 1px solid var(--gray-100);
    font-weight: 600;
    font-size: .9rem;
}

/* Stat Cards */
.stat-card {
    padding: 1rem;
}

.stat-card .icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: .5rem;
}

.stat-card .label {
    font-size: .7rem;
    text-transform: uppercase;
    color: var(--gray-500);
    font-weight: 500;
}

.stat-card .value {
    font-size: 1.25rem;
    font-weight: 700;
}

/* Buttons */
.btn {
    border-radius: 6px;
    font-size: .8rem;
    font-weight: 500;
}

.btn-sm {
    padding: .35rem .75rem;
}

/* Forms */
.form-control,
.form-select {
    font-size: .85rem;
    border-radius: 6px;
}

.form-label {
    font-size: .7rem;
    text-transform: uppercase;
    color: var(--gray-600);
    font-weight: 500;
}

/* Tables */
.table {
    font-size: .8rem;
    margin: 0;
}

.table th {
    background: var(--gray-50);
    font-size: .7rem;
    text-transform: uppercase;
    color: var(--gray-600);
    font-weight: 600;
    padding: .75rem;
}

.table td {
    padding: .75rem;
    vertical-align: middle;
}

/* Badges */
.badge-code {
    background: rgba(37, 99, 235, .1);
    color: var(--primary);
    padding: .25rem .5rem;
    border-radius: 12px;
    font-size: .7rem;
    font-weight: 600;
}

.badge-paid {
    background: rgba(16, 185, 129, .1);
    color: var(--success);
}

.badge-unpaid {
    background: rgba(239, 68, 68, .1);
    color: var(--danger);
}

.badge-tier {
    padding: .2rem .5rem;
    border-radius: 4px;
    font-size: .65rem;
    font-weight: 600;
}

.tier-1 {
    background: #dbeafe;
    color: #1e40af;
}

.tier-2 {
    background: #fef3c7;
    color: #92400e;
}

.tier-3 {
    background: #d1fae5;
    color: #065f46;
}

/* Values */
.amount {
    font-weight: 600;
}

.commission {
    color: var(--success);
    font-weight: 600;
}

/* Tabs */
.nav-tabs {
    border-bottom: 2px solid var(--gray-100);
}

.nav-tabs .nav-link {
    border: none;
    color: var(--gray-500);
    font-weight: 500;
    padding: .6rem 1rem;
    font-size: .85rem;
}

.nav-tabs .nav-link.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    margin-bottom: -2px;
}

/* Tier Info */
.tier-info {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.tier-badge {
    padding: .5rem .75rem;
    border-radius: 8px;
    font-size: .75rem;
}

/* Filter Badge */
.filter-badge {
    background: var(--primary);
    color: white;
    padding: .2rem .5rem;
    border-radius: 4px;
    font-size: .7rem;
}

/* Toast */
.toast-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 9999;
}

.toast {
    background: var(--gray-800);
    color: white;
    border-radius: 8px;
    padding: .75rem 1rem;
    font-size: .85rem;
    margin-top: .5rem;
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

/* Loading */
.loading {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, .9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Modal */
.modal-content {
    border-radius: 12px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--gray-500);
}
