/* ═══════════════════════════════════════════════════════════
   Schedule Manager — Affiliate Frontend Styles
   Premium modern dashboard for My Account → Affiliate
   ═══════════════════════════════════════════════════════════ */

/* ── Join Page ─────────────────────────────────────────── */
.csm-aff-fe-join {
    max-width: 680px;
    margin: 0 auto;
}
.csm-aff-fe-hero {
    text-align: center;
    padding: 40px 20px 30px;
}
.csm-aff-fe-hero-icon {
    font-size: 48px;
    margin-bottom: 12px;
}
.csm-aff-fe-hero h2 {
    font-size: 26px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px;
}
.csm-aff-fe-hero-sub {
    color: #64748b;
    font-size: 15px;
}

.csm-aff-fe-benefits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}
.csm-aff-fe-benefit {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}
.csm-aff-fe-benefit-icon {
    font-size: 28px;
    display: block;
    margin-bottom: 8px;
}
.csm-aff-fe-benefit h4 {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}
.csm-aff-fe-benefit p {
    margin: 0;
    font-size: 12px;
    color: #94a3b8;
}

.csm-aff-fe-terms-block {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}
.csm-aff-fe-terms-block h4 {
    margin: 0 0 10px;
    font-size: 14px;
    color: #1e293b;
}
.csm-aff-fe-terms-text {
    max-height: 200px;
    overflow-y: auto;
    font-size: 13px;
    color: #475569;
    line-height: 1.6;
}

.csm-aff-fe-join-action {
    text-align: center;
    padding: 20px 0;
}
.csm-aff-fe-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #334155;
    cursor: pointer;
}
.csm-aff-fe-checkbox input {
    width: 18px;
    height: 18px;
    accent-color: #6366f1;
}

/* ── Pending / Blocked ─────────────────────────────────── */
.csm-aff-fe-pending {
    text-align: center;
    padding: 60px 20px;
}
.csm-aff-fe-pending-icon {
    font-size: 48px;
    margin-bottom: 12px;
}
.csm-aff-fe-pending h2 {
    color: #1e293b;
    margin: 0 0 8px;
}
.csm-aff-fe-pending p {
    color: #64748b;
}

/* ── Buttons ───────────────────────────────────────────── */
.csm-aff-fe-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.csm-aff-fe-btn-primary {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}
.csm-aff-fe-btn-primary:hover {
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(99,102,241,0.4);
}
.csm-aff-fe-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}
.csm-aff-fe-btn-sm {
    padding: 6px 14px;
    font-size: 12px;
    border-radius: 6px;
}
.csm-aff-fe-btn-danger {
    background: #fee2e2;
    color: #dc2626;
    font-weight: 700;
    padding: 4px 10px;
}

/* ── Tabs Navigation ─────────────────────────────────────── */
.csm-aff-fe-tabs-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 12px;
}
.csm-aff-fe-tab-btn {
    background: transparent;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.csm-aff-fe-tab-btn:hover {
    background: #f1f5f9;
    color: #334155;
}
.csm-aff-fe-tab-btn.active {
    background: #eef2ff;
    color: #4f46e5;
}
.csm-aff-fe-tab-content { display: none; }
.csm-aff-fe-tab-content.active { display: block; }

/* ── Custom Layouts ────────────────────────────────────── */
.csm-aff-fe-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}
.csm-aff-fe-grid::before,
.csm-aff-fe-grid::after {
    display: none !important;
}

/* ── Stats ─────────────────────────────────────────────── */
.csm-aff-fe-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}
.csm-aff-fe-stat {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    transition: transform 0.2s;
}
.csm-aff-fe-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.csm-aff-fe-stat-num {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
}
.csm-aff-fe-stat-lbl {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: #94a3b8;
    text-transform: uppercase;
    margin-top: 4px;
}
.csm-aff-fe-stat-highlight {
    border-color: #c7d2fe;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
}
.csm-aff-fe-stat-green {
    border-color: #a7f3d0;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
}

/* ── Sections ──────────────────────────────────────────── */
.csm-aff-fe-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}
.csm-aff-fe-section h3 {
    margin: 0 0 18px;
    font-size: 17px;
    font-weight: 700;
    color: #1e293b;
}
.csm-aff-fe-subsection {
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid #e2e8f0;
}
.csm-aff-fe-subsection:first-child {
    padding-top: 0;
    margin-top: 0;
    border-top: none;
}
.csm-aff-fe-subsection h4 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}
.csm-aff-fe-hint {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 12px;
}

/* ── Referral Link Box ─────────────────────────────────── */
.csm-aff-fe-link-box {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.csm-aff-fe-link-box input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    background: #f8fafc;
}
.csm-aff-fe-link-box .csm-aff-fe-btn {
    flex-shrink: 0;
    padding: 12px 16px;
}

/* ── Share Buttons ─────────────────────────────────────── */
.csm-aff-fe-share {
    display: flex;
    gap: 8px;
}
.csm-aff-fe-share-btn {
    display: inline-flex;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: opacity 0.2s;
}
.csm-aff-fe-share-btn:hover {
    opacity: 0.85;
}
.csm-aff-fe-share-ig {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: #fff;
}
.csm-aff-fe-share-fb {
    background: #1877f2;
    color: #fff;
}
.csm-aff-fe-share-wa {
    background: #25d366;
    color: #fff;
}
.csm-aff-fe-share-tg {
    background: #229ed9;
    color: #fff;
}

/* ── Product Links ─────────────────────────────────────── */
.csm-aff-fe-product-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.csm-aff-fe-link-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    padding: 8px 12px;
    border-radius: 8px;
}
.csm-aff-fe-pname {
    font-weight: 600;
    font-size: 13px;
    color: #334155;
    min-width: 120px;
}
.csm-aff-fe-link-row input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    background: #fff;
}

/* ── Tables ────────────────────────────────────────────── */
.csm-aff-fe-table-wrap {
    overflow-x: auto;
}
.csm-aff-fe-table {
    width: 100%;
    border-collapse: collapse;
}
.csm-aff-fe-table thead th {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}
.csm-aff-fe-table tbody td {
    padding: 10px 12px;
    font-size: 13px;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
}
.csm-aff-fe-empty {
    text-align: center;
    padding: 30px !important;
    color: #94a3b8;
    font-style: italic;
}

/* ── Badges (frontend) ─────────────────────────────────── */
.csm-aff-fe-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
}
.csm-aff-fe-badge-pending   { background: #fef3c7; color: #92400e; }
.csm-aff-fe-badge-hold      { background: #e0e7ff; color: #3730a3; }
.csm-aff-fe-badge-cleared   { background: #d1fae5; color: #065f46; }
.csm-aff-fe-badge-paid      { background: #dbeafe; color: #1e40af; }
.csm-aff-fe-badge-reversed  { background: #fee2e2; color: #991b1b; }
.csm-aff-fe-badge-submitted { background: #fef3c7; color: #92400e; }
.csm-aff-fe-badge-processing { background: #e0e7ff; color: #3730a3; }
.csm-aff-fe-badge-rejected  { background: #fee2e2; color: #991b1b; }

/* ── Payment Methods ───────────────────────────────────── */
.csm-aff-fe-pm-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}
.csm-aff-fe-pm-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
}
.csm-aff-fe-pm-item span:first-child {
    flex: 1;
}

.csm-aff-fe-add-pm select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 12px;
}
#csm-aff-pm-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
#csm-aff-pm-fields input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
}
.csm-aff-pm-f {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ── Withdraw Form ─────────────────────────────────────── */
.csm-aff-fe-withdraw-form {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.csm-aff-fe-withdraw-form input,
.csm-aff-fe-withdraw-form select {
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
}
.csm-aff-fe-withdraw-form input { flex: 1; min-width: 120px; }
.csm-aff-fe-withdraw-form select { min-width: 160px; }

/* ── Notices ───────────────────────────────────────────── */
.csm-aff-fe-notice {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 13px;
}
.csm-aff-fe-notice strong {
    display: block;
    margin-bottom: 4px;
}
.csm-aff-fe-notice-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.csm-aff-fe-notice-warning { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.csm-aff-fe-notice-info    { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 768px) {
    .csm-aff-fe-benefits {
        grid-template-columns: 1fr;
    }
    .csm-aff-fe-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .csm-aff-fe-link-box {
        flex-direction: column;
    }
    .csm-aff-fe-share {
        flex-wrap: wrap;
    }
    .csm-aff-fe-link-row {
        flex-direction: column;
        align-items: stretch;
    }
    .csm-aff-fe-withdraw-form {
        flex-direction: column;
    }
    .csm-aff-fe-withdraw-form input,
    .csm-aff-fe-withdraw-form select {
        width: 100%;
    }
}
