/**
 * CodiCo Referral Program - Frontend Styles
 */

/* Main Container */
.codico-referral-program {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.codico-referral-program h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #2c3e50;
}

.codico-referral-program h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #34495e;
}

/* Stats Grid */
.codico-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

@media (max-width: 1200px) {
    .codico-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .codico-stats-grid {
        grid-template-columns: 1fr;
    }
}

.codico-stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.codico-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.codico-stat-card .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    flex-shrink: 0;
}

.codico-stat-card .stat-icon.success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.codico-stat-card .stat-icon.reward {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.codico-stat-card .stat-icon.pending {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.codico-stat-card .stat-content {
    flex: 1;
}

.codico-stat-card .stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1;
    margin-bottom: 5px;
}

.codico-stat-card .stat-label {
    font-size: 14px;
    color: #7f8c8d;
    font-weight: 500;
}

/* Referral Link Section */
.codico-referral-link-section {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.codico-referral-link-section p {
    color: #7f8c8d;
    margin-bottom: 20px;
}

.referral-link-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.referral-link-container input[type="text"] {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: monospace;
    background: #f8f9fa;
}

.referral-link-container input[type="text"]:focus {
    border-color: #667eea;
    outline: none;
}

.codico-copy-btn {
    padding: 12px 24px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
}

.codico-copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Share Buttons */
.share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.share-btn {
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    transition: transform 0.2s;
}

.share-btn:hover {
    transform: translateY(-2px);
    color: #fff;
}

.share-btn.facebook {
    background: #1877f2;
}

.share-btn.twitter {
    background: #1da1f2;
}

.share-btn.linkedin {
    background: #0077b5;
}

.share-btn.whatsapp {
    background: #25d366;
}

.share-btn.email {
    background: #ea4335;
}

/* Progress Section */
.codico-progress-section {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2c3e50;
}

.progress-bar {
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #11998e 0%, #38ef7d 100%);
    transition: width 0.3s ease;
    border-radius: 15px;
}

.progress-note {
    color: #7f8c8d;
    font-size: 14px;
    margin: 0;
}

/* Chart Section */
.codico-chart-section {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.codico-charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 20px;
}

@media (max-width: 992px) {
    .codico-charts-grid {
        grid-template-columns: 1fr;
    }
}

.chart-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #e0e0e0;
}

.chart-container h4 {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 20px 0;
    text-align: center;
}

.chart-container canvas {
    max-height: 300px;
}

/* Referrals Table */
.codico-referrals-table-section {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.table-responsive {
    overflow-x: auto;
}

.codico-referrals-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.codico-referrals-table th,
.codico-referrals-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.codico-referrals-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.codico-referrals-table tbody tr:hover {
    background: #f8f9fa;
}

.codico-referrals-table .user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.codico-referrals-table .user-info img {
    border-radius: 50%;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.status-trial {
    background: #e3f2fd;
    color: #1976d2;
}

.status-badge.status-trial_ended {
    background: #fff3e0;
    color: #f57c00;
}

.status-badge.status-first_payment {
    background: #f3e5f5;
    color: #7b1fa2;
}

.status-badge.status-second_payment {
    background: #e0f2f1;
    color: #00796b;
}

.status-badge.status-active {
    background: #e8f5e9;
    color: #388e3c;
}

.text-muted {
    color: #95a5a6;
}

/* Empty State */
.codico-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
}

/* How It Works */
.codico-how-it-works {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 30px;
}

@media (max-width: 992px) {
    .steps-grid {
        grid-template-columns: 1fr;
    }
}

.step {
    text-align: center;
}

.step-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.step h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
}

.step p {
    color: #7f8c8d;
    font-size: 14px;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .referral-link-container {
        flex-direction: column;
    }
}
