.referral-heading {
    align-items: flex-start;
}

.referral-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 24px;
}

.referral-generator-card,
.referral-information-card {
    border: 1px solid #dfe7f2;
    border-radius: 22px;
    padding: 30px;
    background: #fff;
    box-shadow: 0 16px 45px rgba(23, 51, 99, 0.07);
}

.referral-code-card {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    margin-bottom: 25px;
    border-radius: 14px;
    padding: 16px 18px;
    background: #eef4ff;
}

.referral-code-card span {
    color: #66758e;
    font-weight: 700;
}

.referral-code-card strong {
    color: #1854c7;
    letter-spacing: 0.06em;
}

.generated-referral-result {
    margin-top: 26px;
    border-top: 1px solid #e3eaf3;
    padding-top: 24px;
}

.generated-referral-result > span {
    display: block;
    margin-bottom: 10px;
    color: #172541;
    font-weight: 800;
}

.copy-link-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.copy-link-row input {
    min-width: 0;
    border: 1px solid #cbd6e5;
    border-radius: 12px;
    padding: 13px 14px;
    font: inherit;
}

#copy-referral-status {
    min-height: 20px;
    margin: 9px 0;
    color: #23744a;
    font-size: 0.88rem;
}

.generated-link-test {
    color: #1f5fd6;
    font-weight: 700;
    text-decoration: none;
}

.generated-link-test:hover {
    text-decoration: underline;
}

.referral-information-card h2 {
    margin-top: 0;
    color: #10244a;
}

.referral-information-card > p {
    color: #66758d;
    line-height: 1.65;
}

.referral-example {
    display: grid;
    gap: 7px;
    margin-top: 18px;
}

.referral-example span {
    color: #68768e;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
}

.referral-example code {
    display: block;
    overflow-wrap: anywhere;
    border: 1px solid #e0e8f3;
    border-radius: 11px;
    padding: 12px;
    background: #f7f9fd;
    color: #24446f;
}

.referral-rules {
    margin-top: 25px;
    border-left: 4px solid #2462dc;
    padding: 15px 18px;
    background: #f1f5fd;
}

.referral-rules strong {
    color: #163b84;
}

.referral-rules ul {
    margin-bottom: 0;
    padding-left: 20px;
    color: #53627b;
    line-height: 1.7;
}

.referral-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 24px;
}

.referral-summary-grid article {
    border: 1px solid #dfe7f2;
    border-radius: 18px;
    padding: 23px;
    background: #fff;
}

.referral-summary-grid strong,
.referral-summary-grid span {
    display: block;
}

.referral-summary-grid strong {
    margin-bottom: 6px;
    color: #1f5fd6;
    font-size: 1.35rem;
}

.referral-summary-grid span {
    color: #68758d;
}

@media (max-width: 900px) {
    .referral-layout {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 560px) {
    .copy-link-row {
        grid-template-columns: 1fr;
    }

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

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