
.referral-info {
    margin-bottom: 20px;
}

.referral-divider {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    margin: 10px 0;
}

.referral-programs {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.referral-card {
    background-color: #272729;
    border-radius: 22px;
    overflow: hidden;
}

.referral-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    cursor: pointer;
}

.referral-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

.card-toggle i {
    transition: transform 0.3s ease;
}

.referral-card.active .card-toggle i {
    transform: rotate(180deg);
}

.referral-body {
    padding: 0 15px 15px;
    display: none;
}

.referral-card.active .referral-body {
    display: block;
}

.referral-description {
    margin-bottom: 15px;
}

.referral-description p {
    margin-top: 0;
    margin-bottom: 10px;
}

.referral-description ul {
    padding-left: 20px;
    margin: 10px 0;
}

.referral-description li {
    margin-bottom: 5px;
}

.share-button {
    display: block;
    background-color: #40a7e3;
    color: white;
    text-align: center;
    padding: 10px;
    border-radius: 22px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.share-button:active {
    background-color: #3590c3;
}

.earnings-chart {
    background-color: #272729;
    border-radius: 22px;
    padding: 15px;
    margin-bottom: 25px;
}

.earnings-chart h3 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.chart-container {
    height: 350px;
    overflow: hidden;
    position: relative;
}

.chart-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.chart-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.chart-period {
    font-size: 12px;
    color: #ffffff;
}

.chart-area {
    flex: 1;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 22px;
    margin-bottom: 10px;
}

.chart-minimap {
    height: 40px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 22px;
    margin-bottom: 10px;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.level1 .legend-color {
    background-color: #3497ed;
}

.level2 .legend-color {
    background-color: #2373db;
}

.referral-stats h3 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.stat-card {
    background-color: #272729;
    border-radius: 22px;
    padding: 15px;
    text-align: center;
}

.stat-title {
    font-size: 14px;
    color: #ffffff;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 16px;
    font-weight: 600;
}

.referral-hero-banner {
    background: linear-gradient(180deg, #1d2025 0%, #40a7e3) !important;
    border-radius: 22px;
    padding: 24px 20px;
    padding-top: 12px;
    margin-bottom: 20px;
    color: white;
    text-align: center;
    box-shadow: none !important;
    border: none !important;
}

.referral-hero-banner h2 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 22px;
    font-weight: 700;
}

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

.referral-stats-counter {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 15px 10px;
}

.counter-item {
    flex: 1;
    text-align: center;
    padding: 4px 0;
}

.counter-divider {
    width: 1px;
    height: 32px;
    background-color: rgba(255, 255, 255, 0.3);
    margin: 0 12px;
}

.counter-value {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 2px;
}

.counter-label {
    font-size: 12px;
    opacity: 0.8;
}

.referral-total-earnings {
    background-color: #272729;
    border-radius: 22px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.earnings-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.earnings-tab {
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: rgba(255, 255, 255, 0.05);
}

.earnings-tab.active {
    background-color: #3497ed;
    color: white;
}

.earnings-amount {
    margin-bottom: 10px;
}

.earnings-amount .amount {
    font-size: 32px;
    font-weight: 700;
}

.earnings-amount .currency {
    font-size: 24px;
    margin-left: 2px;
}

.earnings-change {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 13px;
    color: #ffffff;
}

.earnings-change.positive {
    color: #3D9966;
}

.earnings-change.negative {
    color: #DC4E41;
}

.referral-chart-card {
    background-color: #272729;
    border-radius: 22px;
    padding: 20px;
    margin-bottom: 20px;
    overflow: hidden;
}

.chart-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

.period-selector {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.period-btn {
    background: none;
    border: none;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 13px;
    cursor: pointer;
    color: #ffffff;
    transition: all 0.2s;
}

.period-btn.active {
    background-color: #40a7e3;
    color: white;
    box-shadow: 0 4px 12px rgba(64, 167, 227, 0.3);
}

.chart-container {
    height: 180px;
    margin-bottom: 10px;
    overflow: hidden;
    position: relative;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-color.level1 {
    background-color: #40a7e3;
}

.legend-color.level2 {
    background-color: #2373db;
}

.legend-label {
    font-size: 13px;
    color: #ffffff;
}

.referral-programs-section {
    margin-bottom: 0;
}

.referral-programs-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.programs-tabs {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 5px;
}

.programs-tabs::-webkit-scrollbar {
    display: none;
}

.program-tab {
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: rgba(255, 255, 255, 0.05);
}

.program-tab.active {
    background-color: #3497ed;
    color: white;
}

.program-cards {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#referral-toggle {
    margin: 20px 0;
}

#referral-toggle .toggle-switch__btn {
    color: white !important;
    font-size: 14px;
    font-weight: 500;
}

#referral-toggle .toggle-switch__btn--active {
    color: #000000 !important;
}

#referral-toggle .toggle-switch__indicator {
    background-color: white !important;
    border-radius: 25px !important;
}

.toggle-content {
    margin-top: 15px;
}

.programs-scroll-wrap {
    position: relative;
}

.programs-scroll-wrap::before,
.programs-scroll-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 4px;
    width: 36px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.32s cubic-bezier(0.22, 0.61, 0.36, 1),
                transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
    z-index: 2;
    will-change: opacity, transform;
}

.programs-scroll-wrap::before {
    left: 0;
    background: linear-gradient(90deg, var(--ui-color-bg, #121417) 0%, rgba(18, 20, 23, 0) 100%);
    transform: translateX(-12px);
}

.programs-scroll-wrap::after {
    right: 0;
    background: linear-gradient(270deg, var(--ui-color-bg, #121417) 0%, rgba(18, 20, 23, 0) 100%);
    transform: translateX(12px);
}

.programs-scroll-wrap.is-scrolled-start::before {
    opacity: 1;
    transform: translateX(0);
}

.programs-scroll-wrap.is-scrolled-end::after {
    opacity: 1;
    transform: translateX(0);
}

.programs-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
}

.programs-scroll:active {
    cursor: grabbing;
}

.programs-scroll.dragging {
    cursor: grabbing;
    user-select: none;
}

.programs-scroll::-webkit-scrollbar {
    display: none;
}

.program-card-mini {
    min-width: 220px;
    background-color: #272729;
    border-radius: 18px;
    padding: 14px;
}

.program-card-mini .program-mini-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.program-card-mini .program-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    margin-right: 10px;
    background-color: #313131;
    background-size: 36px;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.program-card-mini .program-icon.d_s::before {
    font-size: 16px;
}

.program-card-mini .program-mini-title {
    font-size: 15px;
    font-weight: 600;
}

.program-card-mini .program-mini-desc {
    font-size: 12px;
    color: #ffffff;
    opacity: 0.9;
}

.program-card-mini .program-mini-percent {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    background: rgba(64, 167, 227, 0.14);
    color: #7cc6ee;
    font-weight: 600;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 12px;
    line-height: 1.4;
    letter-spacing: 0.2px;
    box-shadow: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.program-card-mini .program-mini-percent[data-zero="true"],
.program-card-mini .program-mini-percent.is-zero {
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.45);
}

.program-card {
    background-color: #272729;
    border-radius: 22px;
    overflow: hidden;
}

.program-card-header {
    display: flex;
    align-items: center;
    padding: 15px;
    cursor: pointer;
}

.program-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    margin-right: 12px;
    background-color: #313131;
    background-size: 40px;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.program-icon.aidpay {
    background-color: #3B82F6;
}

.program-icon.aiaid {
    background-color: #161616;
}

.program-icon.d_s::before {
    font-size: 18px;
}

.program-title {
    flex: 1;
}

.program-title h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 500;
}

.program-title p {
    margin: 0;
    font-size: 13px;
    color: #ffffff;
}

.card-toggle i {
    transition: transform 0.3s ease;
}

.program-card.active .card-toggle i {
    transform: rotate(180deg);
}

.program-card-body {
    padding: 0 15px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s linear,
                padding 0.3s linear;
}

.program-card.active .program-card-body {
    padding: 0 15px 15px;
    max-height: 300px;
}

.rewards-info {
    margin-top: 15px;
}

.rewards-info.simple {
    background-color: transparent;
    padding: 0;
    margin-bottom: 0;
}

.rewards-info.simple .reward-item {
    margin-bottom: 12px;
}

.reward-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.reward-item:last-child {
    margin-bottom: 0;
}

.reward-badge {
    background: linear-gradient(135deg, #3B82F6 0%, #1E40AF 100%);
    color: white;
    font-weight: 700;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 14px;
    margin-right: 10px;
    min-width: 36px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.reward-desc {
    font-size: 14px;
    flex: 1;
}

.referral-stats-mini {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-value {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 3px;
}

.stat-label {
    font-size: 13px;
    color: #ffffff;
}

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

.action-btn {
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 22px;
    padding: 10px;
    color: white;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
    flex: 1;
}

.action-btn:active {
    background-color: rgba(255, 255, 255, 0.12);
}

@media (hover: hover) and (pointer: fine) {
    .action-btn:hover {
        background-color: rgba(255, 255, 255, 0.12);
    }
}

.action-btn i {
    font-size: 16px;
}

.action-btn__icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
    flex-shrink: 0;
}

.referral-qr-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.action-btn.success-copy {
    background-color: #3D9966;
}

.referral-faq-section {
    margin-bottom: 25px;
}

.referral-faq-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.faq-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq-item {
    background-color: #272729;
    border-radius: 22px;
    overflow: hidden;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    cursor: pointer;
}

.faq-question span {
    font-size: 15px;
    font-weight: 500;
}

.faq-question i {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 15px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s linear,
                padding 0.3s linear;
}

.faq-item.active .faq-answer {
    padding: 0 15px 15px;
    max-height: 300px;
}

.faq-answer p {
    margin: 0;
    color: #ffffff;
    font-size: 14px;
    line-height: 1.5;
}

.global-ref-link {
    margin-top: 15px;
}

.ref-link-mode-toggle {
    display: flex;
    gap: 0;
    margin-bottom: 10px;
    border-radius: 25px;
    overflow: hidden;
    background: rgba(255,255,255,0.06);
}
.ref-link-mode-btn {
    flex: 1;
    padding: 8px 0;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.45);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}
.ref-link-mode-btn--active {
    color: #fff;
    background: rgba(255,255,255,0.12);
}

.ref-codes-panel {
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}
@media (min-width: 600px) {
    .ref-codes-panel { max-height: 69vh; }
}

.rcp-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 8px;
}
.rcp-header__title {
    font-size: 17px;
    font-weight: 700;
    color: #f0f0f0;
}
.rcp-header__count {
    font-size: 13px;
    color: #7a8390;
    font-weight: 500;
}

.rcp-search {
    flex-shrink: 0;
    position: relative;
    padding: 0 20px 10px;
}
.rcp-search__icon {
    position: absolute;
    left: 32px;
    top: 50%;
    transform: translateY(calc(-50% - 5px));
    color: rgba(255,255,255,0.25);
    font-size: 13px;
    pointer-events: none;
}
.rcp-search__input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    color: #e0e0e0;
    border-radius: 10px;
    padding: 9px 12px 9px 34px;
    font-size: 13px;
    box-sizing: border-box;
}
.rcp-search__input::placeholder { color: rgba(255,255,255,0.2); }
.rcp-search__input:focus { outline: none; border-color: rgba(64,167,227,0.4); }

.ref-codes-panel__list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
    padding: 0 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
}
.ref-codes-panel__list::-webkit-scrollbar { width: 4px; }
.ref-codes-panel__list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

.rcp-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    transition: background 0.12s;
}
.rcp-row:hover { background: rgba(255,255,255,0.03); }

.rcp-row__code {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    color: #eee;
    font-family: 'SF Mono', 'Fira Code', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rcp-row__stat {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    white-space: nowrap;
    flex-shrink: 0;
}
.rcp-row__stat i {
    font-size: 13px;
    color: rgba(255,255,255,0.25);
}

.rcp-row__stat .rcp-icon {
    height: 12px;
    width: auto;
    color: rgba(255,255,255,0.35);
    flex-shrink: 0;
    display: inline-block;
}
.rcp-row__btn .rcp-icon {
    height: 14px;
    width: auto;
    fill: currentColor;
    display: block;
}

.rcp-row__btn {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: rgba(255,255,255,0.35);
    cursor: pointer;
    border-radius: 8px;
    font-size: 14px;
    transition: background 0.12s, color 0.12s;
    padding: 0;
}
.rcp-row__btn:hover { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.7); }
.rcp-row__btn--del:hover { color: #ff5050; background: rgba(255,60,60,0.1); }
.rcp-row__btn--copy.copied { color: #6fcf97; }
.rcp-row__btn-placeholder { width: 30px; flex-shrink: 0; }

.rcp-row--confirm {
    background: rgba(255,60,60,0.04);
}
.rcp-row--confirm .rcp-row__code { color: rgba(255,255,255,0.5); }
.rcp-row__confirm-text {
    font-size: 12px;
    color: rgba(255,80,80,0.7);
    white-space: nowrap;
    margin-left: auto;
}
.rcp-row__btn--yes { color: #ff5050; }
.rcp-row__btn--yes:hover { background: rgba(255,60,60,0.15); }
.rcp-row__btn--no:hover { background: rgba(255,255,255,0.1); }

.rcp-empty {
    padding: 24px;
    text-align: center;
    color: rgba(255,255,255,0.3);
    font-size: 13px;
}

.rcp-footer {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px 24px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.rcp-footer__input {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #e0e0e0;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    box-sizing: border-box;
}
.rcp-footer__input::placeholder { color: rgba(255,255,255,0.2); }
.rcp-footer__input:focus { outline: none; border-color: rgba(64,167,227,0.4); }
.rcp-footer__btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #40a7e3 0%, #2d5aa0 100%);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: opacity 0.15s;
}
.rcp-footer__btn:disabled { opacity: 0.4; cursor: not-allowed; }
.rcp-footer__btn:active:not(:disabled) { opacity: 0.8; }

.ref-link-container {
    display: flex;
    background-color: rgb(255 255 255 / 25%);
    border-radius: 22px;
    overflow: hidden;
    margin-bottom: 10px;
}

#global-ref-link {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    caret-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

#global-ref-link::selection {
    background: transparent;
    color: inherit;
}

#global-ref-link::-moz-selection {
    background: transparent;
    color: inherit;
}

.copy-global-link {
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
    padding-left: 3px;
}

.copy-global-link:active {
    background-color: rgba(255, 255, 255, 0.3);
}

.copy-global-link.copied {
    background-color: #3D9966;
}

.referral-withdraw-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin: 0 0 14px;
    background-color: rgba(255, 255, 255, 0.16);
    border: none;
    border-radius: 18px;
    color: #ffffff;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.18s ease, transform 0.12s ease;
    -webkit-appearance: none;
    appearance: none;
}

.referral-withdraw-btn:hover {
    background-color: rgba(255, 255, 255, 0.22);
}

.referral-withdraw-btn:active {
    transform: scale(0.99);
    background-color: rgba(255, 255, 255, 0.26);
}

.referral-withdraw-btn__icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #ffffff;
}

.referral-withdraw-btn__text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.referral-withdraw-btn__title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
}

.referral-withdraw-btn__subtitle {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.7);
}

.referral-withdraw-btn__chevron {
    flex-shrink: 0;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.55);
}

.referral-withdraw-list__hint {
    font-size: 12px;
    font-weight: 500;
    color: rgba(232, 236, 241, 0.45);
    text-align: center;
    padding: 4px 12px 0;
    line-height: 1.4;
}

.referral-withdraw-symbol.is-mir {
    background: linear-gradient(135deg, rgba(46, 117, 222, 0.22), rgba(46, 117, 222, 0.10));
    color: #9cc4f0;
}

.referral-withdraw-symbol.is-trc20 {
    background: linear-gradient(135deg, rgba(220, 78, 65, 0.22), rgba(220, 78, 65, 0.10));
    color: #ff8a7f;
}

.referral-withdraw-symbol.is-ton {
    background: linear-gradient(135deg, rgba(50, 169, 224, 0.22), rgba(50, 169, 224, 0.10));
    color: #6cc6ec;
}

.referral-withdraw-sheet {
    padding: 16px 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.referral-withdraw-toggle {
    margin: 0;
}

.referral-withdraw-sheet .toggle-content,
.referral-withdraw-tabs {
    margin-top: 0;
    display: block;
}

.referral-withdraw-tabs .toggle-content__item {
    overflow: visible;
}

.referral-withdraw-tab {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 4px;
}

.referral-withdraw-methods {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 4px;
}

.referral-withdraw-method {
    width: 100%;
}

.referral-withdraw-method.is-active .referral-withdraw-symbol.is-mir {
    background: linear-gradient(135deg, rgba(46, 117, 222, 0.22), rgba(46, 117, 222, 0.10));
    color: #9cc4f0;
}

.referral-withdraw-method.is-active .referral-withdraw-symbol.is-trc20 {
    background: linear-gradient(135deg, rgba(220, 78, 65, 0.22), rgba(220, 78, 65, 0.10));
    color: #ff8a7f;
}

.referral-withdraw-method.is-active .referral-withdraw-symbol.is-ton {
    background: linear-gradient(135deg, rgba(50, 169, 224, 0.22), rgba(50, 169, 224, 0.10));
    color: #6cc6ec;
}

.referral-withdraw-crypto-warning {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(240, 184, 64, 0.10);
    color: #f0b840;
    font-size: 12.5px;
    line-height: 1.4;
    font-weight: 500;
}

.referral-withdraw-crypto-warning.is-visible {
    display: flex;
}

.referral-withdraw-crypto-warning i {
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
    margin: 0;
    align-self: center;
}

.referral-withdraw-crypto-warning strong {
    font-weight: 700;
    color: #ffd27a;
}

.referral-withdraw-amount,
.referral-withdraw-destination {
    background: var(--ui-color-surface-2, #1d2025);
    border-radius: 16px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.referral-withdraw-amount .ui-amount-row {
    align-items: center;
}

.referral-withdraw-amount .ui-amount-currency {
    font-size: 22px;
}

.referral-withdraw-amount .ui-amount-input {
    font-size: 22px;
}

.referral-withdraw-input {
    width: 100%;
    box-sizing: border-box;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ui-color-text-soft, #DCDDE0);
    font-size: 16px;
    font-weight: 500;
    padding: 4px 0;
    font-family: inherit;
    letter-spacing: 0.2px;
}

.referral-withdraw-input::placeholder {
    color: rgba(232, 236, 241, 0.35);
}

.referral-withdraw-help {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    color: rgba(232, 236, 241, 0.5);
    font-size: 12px;
}

.referral-withdraw-help strong {
    color: #f1f3f6;
    font-weight: 700;
}

.referral-withdraw-max {
    flex-shrink: 0;
    background: rgba(46, 117, 222, 0.18);
    color: #9cc4f0;
    border: 0;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
    cursor: pointer;
    text-transform: uppercase;
    transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
}

.referral-withdraw-max:hover {
    background: rgba(46, 117, 222, 0.28);
    color: #c0dafa;
}

.referral-withdraw-max:active {
    transform: scale(0.96);
}

.referral-withdraw-submit {
    margin-top: 4px;
}

.referral-withdraw-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 4px;
}

.referral-withdraw-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #1D2025;
    border-radius: 16px;
}

.referral-withdraw-item__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.referral-withdraw-item__title {
    font-size: 15px;
    font-weight: 600;
    color: #f1f3f6;
    line-height: 1.25;
}

.referral-withdraw-item__subtitle {
    font-size: 12px;
    font-weight: 500;
    color: rgba(232, 236, 241, 0.55);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.referral-withdraw-item__date {
    font-size: 11px;
    font-weight: 500;
    color: rgba(232, 236, 241, 0.35);
    margin-top: 2px;
}

.referral-withdraw-item__right {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.referral-withdraw-item__amount {
    font-size: 15px;
    font-weight: 700;
    color: #f1f3f6;
    font-feature-settings: "tnum";
}

.referral-withdraw-item__status {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.referral-withdraw-item__status.is-pending {
    background: rgba(240, 184, 64, 0.14);
    color: #f0b840;
}

.referral-withdraw-item__status.is-done {
    background: rgba(62, 192, 132, 0.14);
    color: #62d29a;
}

.referral-withdraw-empty {
    text-align: center;
    padding: 36px 24px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.referral-withdraw-empty__icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: rgba(232, 236, 241, 0.55);
    margin-bottom: 4px;
}

.referral-withdraw-empty__title {
    font-size: 15px;
    font-weight: 600;
    color: #f1f3f6;
}

.referral-withdraw-empty__subtitle {
    font-size: 13px;
    font-weight: 500;
    color: rgba(232, 236, 241, 0.5);
    line-height: 1.4;
    max-width: 280px;
}

.aidpay-region-row__chevron {
    flex-shrink: 0;
    font-size: 14px;
    color: rgba(232, 236, 241, 0.35);
}

.ref-link-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.highlight {
    color: #ffffff;
    font-weight: 700;
}

.programs-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.programs-section-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.program-earnings-tabs {
    display: flex;
    gap: 5px;
}

.program-period-tab {
    padding: 5px 10px;
    border-radius: 22px;
    font-size: 12px;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

.program-period-tab.active {
    background-color: #3497ed;
    color: white;
}

@media (max-width: 380px) {
    .programs-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

.referral-friends-card {
    background: linear-gradient(135deg, #1e2128 0%, #2a2d38 100%);
    border-radius: 25px;
    padding: 14px 16px;
    text-align: center;
    margin-bottom: 12px;
    box-shadow: none;
    position: relative;
    overflow: hidden;
    border: none;
    transition: transform 0.2s ease;
    cursor: pointer;
}

.referral-friends-card:hover {
    transform: translateY(-2px);
}

.friends-bg-emoji {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.friends-bg-emoji span {
    position: absolute;
    font-size: 28px;
    opacity: 0.12;
    user-select: none;
}

.friends-count {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
    position: relative;
    z-index: 1;
    will-change: contents;
}

.friends-label {
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    display: inline-block;
    vertical-align: middle;
    position: relative;
    z-index: 1;
}

.friends-paid-badge {
    display: inline-block;
    vertical-align: middle;
    font-size: 13px;
    font-weight: 600;
    color: #f0b840;
    background: rgba(240, 184, 64, 0.12);
    border: 1px solid rgba(240, 184, 64, 0.3);
    border-radius: 10px;
    padding: 2px 8px;
    margin-left: 6px;
    position: relative;
    z-index: 1;
    letter-spacing: 0.3px;
}

.referral-stats-rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    padding: 10px 8px;
}

.stats-row {
    display: flex;
    justify-content: center;
    align-items: center;
}

.accordion-list .accordion-item:last-child {
    margin-bottom: 60px;
}

.referral-qr-modal {
    padding: 24px;
    text-align: center;
}

.referral-qr-modal__hint {
    font-size: 14px;
    font-weight: 400;
    color: #B1B4B9;
    margin-bottom: 24px;
}

.referral-qr-modal__image-wrap {
    background: #fff;
    padding: 20px;
    border-radius: 16px;
    display: inline-block;
    max-width: calc(100% - 48px);
}

.referral-qr-modal__image {
    display: block;
    width: 100%;
    max-width: 256px;
    height: auto;
}

.referral-qr-modal__actions {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ref-qr {
    padding: 16px 16px 24px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
}

.ref-qr__card {
    position: relative;
    padding: 0 20px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.ref-qr__code {
    position: relative;
    background: #ffffff;
    padding: 14px;
    border-radius: 18px;
    line-height: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
}

.ref-qr__image {
    display: block;
    width: 220px;
    height: 220px;
    max-width: 100%;
}

.ref-qr__logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 0 4px #ffffff,
        0 6px 16px rgba(0, 0, 0, 0.18);
    pointer-events: none;
}

.ref-qr__logo-icon {
    color: #000000;
    display: block;
    width: 50px;
    height: 50px;
}

.ref-qr__hint {
    font-size: 13px;
    font-weight: 500;
    color: rgba(232, 236, 241, 0.6);
    text-align: center;
    line-height: 1.45;
    padding: 0 12px 5px;
}

.ref-qr__actions {
    display: flex;
    justify-content: center;
    padding: 4px 0 0;
}

.referral-avatar-fallback {
    width: 100%;
    height: 100%;
}