.ref-dashboard,
.ref-referrals-page,
.ref-earnings-page,
.ref-withdraw-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.ref-header {
    text-align: center;
    margin-bottom: 30px;
}

.ref-header h1 {
    margin: 0 0 10px;
    font-size: 28px;
}

.ref-stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.ref-stat-box {
    flex: 1;
    min-width: 150px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    color: #fff;
}

.ref-stat-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.ref-stat-number {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 5px;
}

.ref-stat-label2 {
    display: block;
    font-size: 13px;
    color: #ffffff;
    margin-bottom: 5px;
}

.ref-stat-label {
    font-size: 14px;
    opacity: 0.9;
	color: #ffffff;
}

.ref-earnings-breakdown {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
}

.ref-earnings-breakdown h3 {
    margin: 0 0 15px;
}

.ref-breakdown-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.ref-breakdown-item {
    flex: 1;
    min-width: 150px;
    padding: 10px;
    background: #fff;
    border-radius: 8px;
    text-align: center;
}

.ref-breakdown-label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

.ref-breakdown-value {
    display: block;
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.ref-referral-link-box {
    background: #f0f7ff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.ref-link-copy {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.ref-link-copy input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.ref-copy-btn {
    padding: 12px 24px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.ref-quick-links {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.ref-quick-link {
    padding: 12px 24px;
    background: #f1f1f1;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
}

.ref-quick-link:hover {
    background: #e0e0e0;
}

.ref-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.ref-table th,
.ref-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.ref-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.ref-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.ref-status-pending {
    background: #fff3cd;
    color: #856404;
}

.ref-status-completed {
    background: #d4edda;
    color: #155724;
}

.ref-status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.ref-amount {
    font-weight: 600;
}

.ref-empty-message {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.ref-empty-message i {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 15px;
}

.ref-pagination {
    margin-top: 20px;
    text-align: center;
}

.ref-pagination-link {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 2px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #0073aa;
    border-radius: 4px;
}

.ref-pagination-active {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
}

.ref-balance-card {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    color: #fff;
    margin-bottom: 30px;
}

.ref-balance-label {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 10px;
}

.ref-balance-amount {
    font-size: 48px;
    font-weight: bold;
}

.ref-balance-hint {
    font-size: 13px;
    opacity: 0.8;
    margin-top: 10px;
}

.ref-withdraw-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.ref-withdraw-stat {
    flex: 1;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.ref-withdraw-stat-label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

.ref-withdraw-stat-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.ref-withdraw-form-container {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.ref-form-group {
    margin-bottom: 20px;
}

.ref-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

.ref-form-group input,
.ref-form-group select,
.ref-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.ref-button {
    display: inline-block;
    padding: 12px 24px;
    background: #f1f1f1;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
}

.ref-button-primary {
    background: #0073aa;
    color: #fff;
}

.ref-button-primary:hover {
    background: #005a87;
}

.ref-warning {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 8px;
    padding: 15px;
    color: #856404;
    margin-bottom: 30px;
}

.ref-message {
    margin-bottom: 20px;
}

.ref-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    padding: 12px;
    color: #155724;
}

.ref-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 12px;
    color: #721c24;
}

.ref-next-level {
    background: #f0f7ff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
}

.ref-progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    margin-top: 15px;
    overflow: hidden;
}

.ref-progress-fill {
    height: 100%;
    background: #0073aa;
    border-radius: 4px;
    transition: width 0.3s;
}

@media (max-width: 768px) {
    .ref-stats-grid,
    .ref-breakdown-grid,
    .ref-withdraw-stats {
        flex-direction: column;
    }
    
    .ref-table th,
    .ref-table td {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .ref-balance-amount {
        font-size: 32px;
    }
}