.referral-page {
    min-height: 100%;
    background: #f5f7ff;
    background-image: radial-gradient(circle at top, rgba(59, 130, 246, 0.12), transparent 55%),
        radial-gradient(circle at 80% 20%, rgba(14, 165, 233, 0.12), transparent 45%),
        radial-gradient(circle at 20% 80%, rgba(251, 146, 60, 0.12), transparent 45%);
}

/* Keep sidebar user trigger clickable on invite page (avoid content layer overlap). */
.workspace-sidebar {
    z-index: 3000;
}

.workspace-sidebar .sidebar-footer,
.workspace-sidebar .sidebar-user-dropdown,
.workspace-sidebar .sidebar-user-trigger {
    position: relative;
    z-index: 3001;
    pointer-events: auto;
}

.workspace-sidebar .sidebar-user-dropdown-content {
    z-index: 3002 !important;
}

.referral-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

.referral-hero-banner {
    text-align: center;
    margin-bottom: 28px;
}

.referral-hero-banner h1 {
    font-size: 36px;
    font-weight: 700;
    margin: 14px 0 10px;
    color: #0f172a;
}

.referral-hero-banner p {
    margin: 0;
    color: #5b6780;
    font-size: 16px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: linear-gradient(120deg, rgba(37, 99, 235, 0.16), rgba(14, 165, 233, 0.2));
    color: #1d39c4;
    font-size: 13px;
    font-weight: 600;
}

.referral-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.referral-affiliate-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
    padding: 24px;
    border: 1px solid #91be43;
    border-radius: 20px;
    background: var(--surface-color, #fff);
    color: var(--text-color, #0f172a);
}
.referral-affiliate-eyebrow {
    color: var(--secondary-text, #5b6780);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
}
.referral-affiliate-card h2 {
    margin: 8px 0;
    font-size: 23px;
    font-weight: 700;
}
.referral-affiliate-card p {
    margin: 0;
    color: var(--secondary-text, #5b6780);
    font-size: 14px;
    line-height: 1.7;
}
.referral-affiliate-cta {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 18px;
    border-radius: 10px;
    background: #d4f58a;
    color: #183300;
    font-weight: 700;
    text-decoration: none;
}
.referral-affiliate-cta:hover {
    background: #c4eb6d;
    color: #183300;
}
.referral-affiliate-cta:focus-visible {
    outline: 2px solid var(--primary-color, #1890ff);
    outline-offset: 4px;
}
@media (max-width: 768px) {
    .referral-affiliate-card {
        align-items: stretch;
        flex-direction: column;
        gap: 18px;
        padding: 20px;
    }
    .referral-affiliate-card h2 {
        font-size: 20px;
    }
}

.summary-card {
    background: #fff;
    border-radius: 20px;
    padding: 18px 20px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
    display: flex;
    align-items: center;
    gap: 16px;
}

.summary-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
}

.summary-card-invite .summary-icon {
    background: linear-gradient(135deg, #2563eb, #60a5fa);
}

.summary-card-share .summary-icon {
    background: linear-gradient(135deg, #f97316, #fb7185);
}

.summary-card-viral .summary-icon {
    background: linear-gradient(135deg, #ec4899, #f59e0b);
}

.summary-value {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.1;
}

.summary-unit {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin-left: 6px;
}

.summary-label {
    margin-top: 4px;
    font-size: 13px;
    color: #64748b;
}

.referral-mission-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-bottom: 32px;
}

.mission-card {
    background: #fff;
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.mission-card-top {
    padding: 22px 26px 20px;
    color: #fff;
}

.mission-card-top h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 10px 0 6px;
}

.mission-card-top p {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
}

.mission-card-top-social {
    background: linear-gradient(120deg, #f97316 0%, #ef4444 55%, #fb7185 100%);
}

.mission-card-top-invite {
    background: linear-gradient(120deg, #2563eb 0%, #06b6d4 100%);
}

.mission-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.mission-tag-hot {
    background: rgba(255, 255, 255, 0.24);
}

.mission-card-body {
    padding: 22px 26px 26px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.campaign-share-kit {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.campaign-copy-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
}

.campaign-hint {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
}

.campaign-post {
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
    min-height: 210px;
    padding: 16px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: #f8fbff;
    color: #1f2937;
    font: inherit;
    font-size: 14px;
    line-height: 1.65;
}

.campaign-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.campaign-actions .btn {
    white-space: normal;
}

.campaign-actions a[aria-disabled="true"] {
    opacity: 0.5;
    pointer-events: none;
}

#campaignInternationalShare[hidden] {
    display: none;
}

.campaign-facebook-hint {
    margin-top: 10px;
}

.campaign-share-kit .share-feedback {
    margin-top: 0;
    min-height: 0;
}

.campaign-share-kit .share-feedback:empty {
    display: none;
}

.campaign-poster-details summary {
    cursor: pointer;
    font-size: 13px;
}

#campaignPoster {
    display: block;
    width: 100%;
    height: auto;
    margin-top: 12px;
    border-radius: 14px;
}

#campaignTermsLink {
    font-size: 13px;
}

html[data-theme="dark"] .campaign-hint {
    color: #a7b6cd;
}

html[data-theme="dark"] .campaign-copy-title,
html[data-theme="dark"] .campaign-poster-details {
    color: #e2e8f0;
}

html[data-theme="dark"] .campaign-post {
    color: #e2e8f0;
    background: #0f1622;
    border-color: rgba(148, 163, 184, 0.28);
}

html[data-theme="dark"] .campaign-actions .btn-outline-primary {
    color: #93c5fd;
    border-color: #60a5fa;
}

html[data-theme="dark"] .campaign-actions .btn-outline-primary:hover {
    color: #fff;
    background: #1d4ed8;
}

.mission-steps {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: mission-step;
    display: grid;
    gap: 10px;
}

.mission-steps li {
    counter-increment: mission-step;
    position: relative;
    padding: 12px 14px 12px 46px;
    border-radius: 16px;
    background: #f8fbff;
    border: 1px solid rgba(148, 163, 184, 0.28);
    color: #1f2937;
    font-size: 15px;
}

.mission-steps li::before {
    content: counter(mission-step);
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: #1d39c4;
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mission-bonus {
    padding: 14px 16px;
    border-radius: 16px;
    background: #fff7ed;
    border: 1px solid rgba(253, 186, 116, 0.6);
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.mission-bonus .bonus-badge {
    display: inline-flex;
    align-items: center;
    background: #f97316;
    color: #fff;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.mission-bonus p {
    margin: 0;
    color: #b45309;
    font-size: 14px;
}

.mission-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mission-actions .claim-open-btn {
    width: 100%;
}

.mission-action-hint {
    font-size: 12px;
    color: #64748b;
}

.mission-share h3 {
    margin: 0 0 4px 0;
    font-size: 18px;
}

.mission-share .share-header p {
    margin-bottom: 14px;
}

.referral-social {
    background: linear-gradient(145deg, #ffffff 0%, #f4f6ff 55%, #eef3ff 100%);
    border-radius: 26px;
    padding: 30px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.referral-social::before {
    content: "";
    position: absolute;
    top: -120px;
    right: -100px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.18), transparent 65%);
    pointer-events: none;
}

.referral-social::after {
    content: "";
    position: absolute;
    bottom: -160px;
    left: -120px;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(250, 204, 21, 0.16), transparent 65%);
    pointer-events: none;
}

.social-card {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
    gap: 24px;
    align-items: stretch;
}

.social-main {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.social-side {
    display: flex;
    flex-direction: column;
    gap: 18px;
    justify-content: space-between;
}

.referral-social .social-header h2 {
    font-size: 24px;
    margin-bottom: 6px;
}

.referral-social .social-header p {
    margin: 0 0 16px 0;
    color: #5b6780;
    font-size: 15px;
}

.social-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.social-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(24, 144, 255, 0.12);
    color: #1d39c4;
    font-size: 12px;
    font-weight: 600;
}

.social-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
    font-size: 12px;
    font-weight: 600;
}

.social-steps {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: social-step;
    display: grid;
    gap: 10px;
    color: #1f2937;
    font-size: 16px;
}

.social-steps li {
    counter-increment: social-step;
    position: relative;
    padding: 12px 14px 12px 46px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    line-height: 1.5;
}

.social-steps li::before {
    content: counter(social-step);
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: #1d39c4;
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.social-bonus {
    margin-top: 4px;
    padding: 14px 16px;
    border-radius: 16px;
    background: linear-gradient(120deg, #fff7e6 0%, #fff1d6 100%);
    border: 1px solid rgba(250, 173, 20, 0.4);
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.social-bonus .bonus-badge {
    display: inline-flex;
    align-items: center;
    background: #fa8c16;
    color: #fff;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.social-bonus p {
    margin: 0;
    color: #ad4e00;
    font-size: 14px;
}

.social-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.claim-open-btn {
    padding: 10px 22px;
    border-radius: 12px;
}

.social-action-hint {
    font-size: 12px;
    color: #64748b;
}

.reward-stack {
    display: grid;
    gap: 12px;
}

.reward-card {
    background: linear-gradient(135deg, #ffffff 0%, #f2f5ff 100%);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 18px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.reward-card-bonus {
    background: linear-gradient(135deg, #fff7e6 0%, #ffe9c7 100%);
    border-color: rgba(250, 173, 20, 0.5);
}

.reward-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #475569;
}

.reward-card-bonus .reward-label {
    color: #b45309;
}

.reward-value {
    font-size: 34px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1;
    margin: 10px 0 4px;
}

.reward-card-bonus .reward-value {
    color: #b45309;
}

.reward-unit {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.reward-note {
    margin-top: 8px;
    font-size: 13px;
    color: #64748b;
}

.reward-card-bonus .reward-note {
    color: #b45309;
}

.social-claim-modal .modal-body {
    padding: 24px 26px 28px;
}

.social-claim-modal {
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

.social-claim-modal .modal-header {
    border-bottom: none;
    padding: 22px 26px 8px;
    background: linear-gradient(120deg, #f8fbff 0%, #eef2ff 100%);
}

.social-claim-modal .modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
}

.referral-invite {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.referral-section-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
}

.referral-invite-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 20px;
    align-items: stretch;
}

.referral-invite-grid .referral-hero,
.referral-invite-grid .referral-share {
    margin-bottom: 0;
    height: 100%;
}

.referral-invite-grid .referral-hero h1 {
    font-size: 28px;
}

.referral-invite .referral-metrics {
    margin-bottom: 0;
}

.claim-modal-hint {
    margin: 0 0 16px 0;
    color: #5b6780;
    font-size: 15px;
}

.claim-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.claim-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.claim-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    color: #1f2937;
}

.claim-platform-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.platform-chip {
    border: 1px solid #d9e2ff;
    background: #f8fbff;
    color: #3b4a66;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    transition: all 0.2s ease;
}

.platform-chip:hover {
    border-color: #91a9ff;
    color: #1d39c4;
}

.platform-chip.is-active {
    background: #1d39c4;
    border-color: #1d39c4;
    color: #fff;
}

.claim-input {
    height: 46px;
    border-radius: 12px;
    border: 1px solid #d9e2ff;
    padding: 0 14px;
    font-size: 15px;
    color: #1f2937;
    background: #f8fbff;
}

.claim-file-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.claim-upload-hint {
    font-size: 12px;
    color: #94a3b8;
}

.claim-upload-card {
    border: 1px dashed #c7d2fe;
    border-radius: 16px;
    padding: 16px;
    background: #f8fbff;
    display: flex;
    flex-direction: column;
    gap: 14px;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.claim-upload-card:hover {
    border-color: #91a9ff;
    background: #f1f5ff;
}

.claim-upload-main {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.claim-upload-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(24, 144, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1d39c4;
    font-size: 18px;
    flex-shrink: 0;
}

.claim-upload-title {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
}

.claim-upload-sub {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}

.claim-upload-preview {
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 12px;
    min-height: 84px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.claim-upload-placeholder {
    font-size: 13px;
    color: #94a3b8;
}

.claim-preview-image {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #e2e8f0;
}

.claim-preview-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: #475569;
}

.claim-preview-name {
    font-weight: 600;
    color: #1f2937;
}

.claim-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.claim-feedback {
    font-size: 13px;
    color: #1d39c4;
    min-height: 18px;
}

.claim-feedback.text-success {
    color: #52c41a;
}

.claim-feedback.text-error {
    color: #d4380d;
}

.referral-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 32px;
    background: linear-gradient(135deg, rgba(24, 144, 255, 0.95), rgba(47, 84, 235, 0.92));
    border-radius: 24px;
    color: #fff;
    margin-bottom: 32px;
}

.referral-hero h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
}

.referral-hero p {
    font-size: 17px;
    margin: 0;
    opacity: 0.9;
}

.hero-highlight {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    padding: 20px 28px;
    text-align: center;
    min-width: 180px;
}

.hero-highlight .highlight-value {
    font-size: 40px;
    font-weight: 700;
    line-height: 1;
}

.hero-highlight .highlight-label {
    font-size: 14px;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-highlight .highlight-sub {
    font-size: 13px;
    margin-top: 6px;
    opacity: 0.8;
}

.referral-share {
    background: #fff;
    padding: 24px;
    border-radius: 20px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    margin-bottom: 28px;
}

.referral-share .share-header h2 {
    font-size: 22px;
    margin-bottom: 6px;
}

.referral-share .share-header p {
    margin: 0 0 18px 0;
    color: #5b6780;
    font-size: 15px;
}

.share-input-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.share-input {
    flex: 1;
    height: 48px;
    border-radius: 12px;
    border: 1px solid #d9e2ff;
    padding: 0 16px;
    font-size: 15px;
    color: #1f2937;
    background: #f8fbff;
}

.share-copy {
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
}

.share-feedback {
    display: inline-block;
    margin-top: 12px;
    font-size: 13px;
    color: #1d39c4;
    min-height: 18px;
}

.share-feedback.text-success {
    color: #52c41a;
}

.share-feedback.text-error {
    color: #d4380d;
}

.referral-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 36px;
}

.referral-metrics.mission-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 0;
}

.referral-metrics.mission-metrics .metric-card {
    background: #f8fbff;
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: none;
}

.referral-metrics.mission-metrics .metric-value {
    font-size: 22px;
}

.referral-redemption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 18px;
    padding: 18px;
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(240, 253, 250, 0.96));
}

.redemption-copy {
    min-width: 0;
}

.redemption-label {
    font-size: 13px;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 6px;
}

.redemption-value {
    font-size: 24px;
    line-height: 1.2;
    font-weight: 800;
    color: #0f172a;
}

.redemption-hint {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.45;
    color: #5b6780;
}

.redemption-button {
    flex: 0 0 auto;
    white-space: nowrap;
}

.metric-card {
    background: #fff;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.metric-card .metric-label {
    font-size: 14px;
    color: #5b6780;
    margin-bottom: 8px;
}

.metric-card .metric-value {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
}

.referral-invitees {
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.invitee-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 18px;
}

.invitee-header h2 {
    margin: 0;
    font-size: 20px;
}

.invitee-header .invitee-hint {
    color: #5b6780;
    font-size: 13px;
}

.invitee-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.invitee-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-radius: 14px;
    border: 1px solid #ebefff;
    background: #f8fbff;
}

.invitee-name {
    font-weight: 600;
    font-size: 16px;
    color: #1f2937;
}

.invitee-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #5b6780;
}

.invitee-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 600;
}

.invitee-status.status-rewarded {
    background: rgba(82, 196, 26, 0.12);
    color: #237804;
}

.invitee-status.status-registered {
    background: rgba(24, 144, 255, 0.12);
    color: #1d39c4;
}

.invitee-status.status-clicked,
.invitee-status.status-invalid {
    background: rgba(250, 173, 20, 0.15);
    color: #ad6800;
}

.invitee-reward {
    font-weight: 600;
    color: #1890ff;
}

.invitee-date {
    color: #94a3b8;
}

.invitee-placeholder {
    text-align: center;
    padding: 32px 16px;
    background: #f5f8ff;
    border-radius: 16px;
    color: #5b6780;
    font-size: 14px;
}

.referral-auth-guard {
    max-width: 480px;
    margin: 64px auto;
    padding: 36px;
    text-align: center;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.referral-auth-guard h2 {
    margin-bottom: 12px;
}

.referral-auth-guard p {
    color: #5b6780;
    margin-bottom: 20px;
}

.referral-auth-guard .btn {
    padding: 12px 28px;
    border-radius: 12px;
}

.referral-container.is-hidden {
    display: none;
}

@media (max-width: 900px) {
    .referral-hero-banner h1 {
        font-size: 30px;
    }

    .referral-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .referral-mission-grid {
        grid-template-columns: 1fr;
    }

    .social-card {
        grid-template-columns: 1fr;
    }

    .social-side {
        flex-direction: column-reverse;
    }

    .reward-stack {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .referral-invite-grid {
        grid-template-columns: 1fr;
    }

    .referral-invite-grid .referral-hero h1 {
        font-size: 26px;
    }

    .referral-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-highlight {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .hero-highlight .highlight-value {
        font-size: 32px;
    }

    .referral-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .referral-redemption {
        align-items: stretch;
        flex-direction: column;
    }

    .redemption-button {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .referral-container {
        padding: 32px 16px 60px;
    }

    .referral-summary-grid {
        grid-template-columns: 1fr;
    }

    .mission-bonus {
        flex-direction: column;
        align-items: flex-start;
    }

    .claim-open-btn {
        width: 100%;
    }

    .reward-stack {
        grid-template-columns: 1fr;
    }

    .claim-grid {
        grid-template-columns: 1fr;
    }

    .claim-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .share-input-row {
        flex-direction: column;
        align-items: stretch;
    }

    .share-copy {
        width: 100%;
    }

    .invitee-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .invitee-meta {
        flex-wrap: wrap;
    }
}

/* Dark theme */
html[data-theme="dark"] .referral-page {
    background: #101010;
    background-image: none;
    color: #e2e8f0;
}

html[data-theme="dark"] .referral-container {
    background: transparent;
}

html[data-theme="dark"] .referral-hero-banner h1,
html[data-theme="dark"] .referral-section-header h2,
html[data-theme="dark"] .invitee-header h2,
html[data-theme="dark"] .referral-hero h1,
html[data-theme="dark"] .referral-hero-banner p,
html[data-theme="dark"] .referral-hero p {
    color: #e2e8f0;
}

html[data-theme="dark"] .referral-hero-banner p,
html[data-theme="dark"] .summary-label,
html[data-theme="dark"] .summary-unit,
html[data-theme="dark"] .mission-action-hint,
html[data-theme="dark"] .social-action-hint,
html[data-theme="dark"] .invitee-hint,
html[data-theme="dark"] .invitee-meta,
html[data-theme="dark"] .reward-note {
    color: #94a3b8;
}

html[data-theme="dark"] .hero-badge {
    background: rgba(37, 99, 235, 0.18);
    color: #93c5fd;
}

html[data-theme="dark"] .summary-card,
html[data-theme="dark"] .mission-card,
html[data-theme="dark"] .referral-social,
html[data-theme="dark"] .reward-card,
html[data-theme="dark"] .invitee-item,
html[data-theme="dark"] .referral-invitees,
html[data-theme="dark"] .referral-hero,
html[data-theme="dark"] .referral-share,
html[data-theme="dark"] .referral-metrics.mission-metrics .metric-card {
    background: #111926;
    border-color: rgba(148, 163, 184, 0.22);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .summary-value,
html[data-theme="dark"] .reward-value {
    color: #f1f5f9;
}

html[data-theme="dark"] .metric-card .metric-label {
    color: #9fb2cc;
}

html[data-theme="dark"] .metric-card .metric-value {
    color: #e6edf7;
}

html[data-theme="dark"] .invitee-name,
html[data-theme="dark"] .invitee-reward {
    color: #e2e8f0;
}

html[data-theme="dark"] .invitee-date {
    color: #9aa3b2;
}

html[data-theme="dark"] .invitee-placeholder {
    background: #0f1622;
    border-color: rgba(148, 163, 184, 0.22);
    color: #94a3b8;
}

html[data-theme="dark"] .referral-redemption {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.24), rgba(20, 83, 45, 0.22));
    border-color: rgba(96, 165, 250, 0.24);
}

html[data-theme="dark"] .redemption-label {
    color: #93c5fd;
}

html[data-theme="dark"] .redemption-value {
    color: #f8fafc;
}

html[data-theme="dark"] .redemption-hint {
    color: rgba(226, 232, 240, 0.78);
}

html[data-theme="dark"] .mission-steps li,
html[data-theme="dark"] .social-steps li {
    background: #0f1622;
    border-color: rgba(148, 163, 184, 0.22);
    color: #e2e8f0;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .mission-bonus,
html[data-theme="dark"] .social-bonus {
    background: rgba(249, 115, 22, 0.1);
    border-color: rgba(249, 115, 22, 0.35);
}

html[data-theme="dark"] .mission-bonus p,
html[data-theme="dark"] .social-bonus p {
    color: #f8c08a;
}

html[data-theme="dark"] .social-tag {
    background: rgba(59, 130, 246, 0.18);
    color: #93c5fd;
}

html[data-theme="dark"] .social-status {
    background: rgba(34, 197, 94, 0.18);
    color: #86efac;
}

html[data-theme="dark"] .share-input,
html[data-theme="dark"] .claim-input,
html[data-theme="dark"] .claim-textarea,
html[data-theme="dark"] .social-claim-modal input,
html[data-theme="dark"] .social-claim-modal select,
html[data-theme="dark"] .social-claim-modal textarea {
    background: #0f1622;
    border-color: rgba(148, 163, 184, 0.28);
    color: #e2e8f0;
}

html[data-theme="dark"] .share-input::placeholder,
html[data-theme="dark"] .claim-input::placeholder,
html[data-theme="dark"] .claim-textarea::placeholder {
    color: #8c9ab0;
}

html[data-theme="dark"] .platform-chip {
    background: #0f1622;
    border-color: rgba(148, 163, 184, 0.28);
    color: #cbd5e1;
}

html[data-theme="dark"] .platform-chip.active {
    background: #2b3240;
    border-color: rgba(148, 163, 184, 0.55);
    color: #f8fafc;
}

html[data-theme="dark"] .invitee-status {
    background: #0f1622;
    border-color: rgba(148, 163, 184, 0.22);
    color: #cbd5e1;
}

html[data-theme="dark"] .invitee-status.status-rewarded {
    background: rgba(34, 197, 94, 0.16);
    color: #86efac;
}

html[data-theme="dark"] .invitee-status.status-registered {
    background: rgba(59, 130, 246, 0.16);
    color: #93c5fd;
}

html[data-theme="dark"] .invitee-status.status-clicked,
html[data-theme="dark"] .invitee-status.status-invalid {
    background: rgba(148, 163, 184, 0.16);
    color: #cbd5e1;
}

html[data-theme="dark"] .social-claim-modal {
    background: #111926;
    border-color: rgba(148, 163, 184, 0.3);
}

html[data-theme="dark"] .social-claim-modal .modal-header {
    background: #0f1622;
}

html[data-theme="dark"] .social-claim-modal .modal-content,
html[data-theme="dark"] .social-claim-modal .modal-body {
    background: #111926;
}

html[data-theme="dark"] .social-claim-modal .modal-title,
html[data-theme="dark"] .social-claim-modal .claim-modal-hint,
html[data-theme="dark"] .claim-upload-title,
html[data-theme="dark"] .claim-upload-sub {
    color: #e2e8f0;
}

html[data-theme="dark"] .claim-field,
html[data-theme="dark"] .claim-preview-info {
    color: #cbd5e1;
}

html[data-theme="dark"] .platform-chip.is-active {
    background: #2b3240;
    border-color: rgba(148, 163, 184, 0.55);
    color: #f8fafc;
}

html[data-theme="dark"] .claim-upload-card {
    background: #0f1622;
    border-color: rgba(148, 163, 184, 0.35);
}

html[data-theme="dark"] .claim-upload-card:hover {
    background: #1a2433;
    border-color: rgba(148, 163, 184, 0.55);
}

html[data-theme="dark"] .claim-upload-icon {
    background: rgba(59, 130, 246, 0.16);
    color: #93c5fd;
}

html[data-theme="dark"] .claim-upload-preview {
    background: #0f1622;
    border-color: rgba(148, 163, 184, 0.25);
}

html[data-theme="dark"] .claim-preview-image {
    border-color: rgba(148, 163, 184, 0.25);
}

html[data-theme="dark"] .claim-preview-name {
    color: #e2e8f0;
}

html[data-theme="dark"] .claim-feedback {
    color: #93c5fd;
}
