/* Referral Page Styles */

/* Hero Section */
.refer-hero {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    padding: 80px 0 60px;
    min-height: 600px;
    display: flex;
    align-items: center;
}

.refer-hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.refer-hero-text {
    max-width: 540px;
}

.refer-label {
    color: #4299e1;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.refer-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
    color: #1a1a1a;
}

.refer-title .highlight {
    color: #000;
}

.refer-description {
    font-size: 18px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 32px;
}

.refer-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: #000;
    color: #fff;
}

.btn-primary:hover {
    background: #333;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #fff;
    color: #000;
    border: 2px solid #e5e5e5;
}

.btn-secondary:hover {
    border-color: #000;
    transform: translateY(-2px);
}

.btn-large {
    padding: 16px 40px;
    font-size: 18px;
}

/* Hero Visual */
.refer-hero-image {
    position: relative;
    height: 500px;
}

.refer-visual {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    border-radius: 24px;
    overflow: hidden;
}

.coin {
    position: absolute;
    animation: float 3s ease-in-out infinite;
}

.coin-1 {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.coin-2 {
    top: 20%;
    right: 15%;
    animation-delay: 0.5s;
}

.coin-3 {
    bottom: 25%;
    left: 5%;
    animation-delay: 1s;
}

.coin-4 {
    bottom: 15%;
    right: 10%;
    animation-delay: 1.5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Phone Mockup */
.phone-mockup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.phone-frame {
    width: 280px;
    height: 560px;
    background: #000;
    border-radius: 36px;
    padding: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 28px;
    overflow: hidden;
}

.phone-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    font-size: 12px;
    font-weight: 600;
}

.phone-status {
    display: flex;
    gap: 4px;
}

.signal, .wifi, .battery {
    width: 16px;
    height: 12px;
    background: #000;
    border-radius: 2px;
}

.phone-content {
    padding: 16px;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.app-logo {
    width: 32px;
    height: 32px;
    background: #000;
    color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.app-balance {
    font-size: 10px;
    color: #f59e0b;
    font-weight: 600;
}

.loan-card {
    background: #f9fafb;
    border-radius: 16px;
    padding: 16px;
}

.loan-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.loan-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.loan-id {
    font-size: 12px;
    color: #666;
}

.loan-status {
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 12px;
    background: #000;
    color: #fff;
}

.loan-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 11px;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-label {
    font-weight: 600;
}

.stat-value {
    color: #666;
    font-size: 9px;
}

.loan-chart {
    margin: 16px 0;
}

.chart-bars {
    display: flex;
    gap: 4px;
    align-items: flex-end;
    height: 60px;
}

.bar {
    flex: 1;
    border-radius: 4px 4px 0 0;
}

.bar.green {
    background: #10b981;
}

.bar.red {
    background: #ef4444;
}

.loan-payment {
    font-size: 11px;
    color: #666;
}

/* Trust Section */
.refer-trust {
    padding: 40px 0;
    background: #fff;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
}

.trust-tagline {
    text-align: center;
    color: #666;
    font-size: 16px;
    margin-bottom: 32px;
}

.trust-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.trust-logo {
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.trust-logo:hover {
    opacity: 1;
}

/* How It Works Section */
.refer-how-it-works {
    padding: 80px 0;
    background: #fff;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 48px;
    color: #1a1a1a;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.step-card {
    text-align: center;
    padding: 32px 24px;
}

.step-number {
    width: 60px;
    height: 60px;
    background: #000;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    margin: 0 auto 24px;
}

.step-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1a1a1a;
}

.step-description {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
}

/* Rewards Section */
.refer-rewards {
    padding: 80px 0;
    background: #f9fafb;
}

.rewards-table {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.reward-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 20px 32px;
    border-bottom: 1px solid #e5e5e5;
}

.reward-row:last-child {
    border-bottom: none;
}

.reward-header {
    background: #f9fafb;
    font-weight: 700;
    color: #1a1a1a;
}

.reward-col {
    display: flex;
    align-items: center;
}

.reward-amount {
    font-weight: 700;
    color: #10b981;
    font-size: 18px;
}

/* Who Can Participate Section */
.refer-participate {
    padding: 80px 0;
    background: #fff;
}

/* FAQ Section */
.refer-faq {
    padding: 80px 0;
    background: #f9fafb;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid #e5e5e5;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    background: none;
    border: none;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    cursor: pointer;
    text-align: left;
    transition: color 0.3s ease;
}

.faq-question:hover {
    color: #4299e1;
}

.faq-icon {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding-bottom: 24px;
}

.faq-answer p {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
}

/* CTA Section */
.refer-cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
}

.cta-box {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta-title {
    font-size: 42px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
}

.cta-description {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 32px;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-buttons .btn-primary {
    background: #fff;
    color: #1e3a8a;
}

.cta-buttons .btn-primary:hover {
    background: #f0f0f0;
}

.cta-buttons .btn-secondary {
    background: transparent;
    color: #fff;
    border-color: #fff;
}

.cta-buttons .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Footer */
.footer {
    background: #1a1a1a;
    color: #fff;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.footer-description {
    color: #999;
    font-size: 14px;
}

.footer-heading {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #999;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #333;
    color: #999;
    font-size: 14px;
}

/* How It Works List Section */
.refer-how-list {
    padding: 80px 0;
    background: #fff;
}

.how-list-grid {
    max-width: 1200px;
    margin: 0 auto;
}

.how-list-item {
    padding: 40px 0;
    border-bottom: 1px solid #e5e5e5;
}

.how-list-item:last-child {
    border-bottom: none;
}

.how-list-number {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.how-list-content {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 24px;
    align-items: start;
}

.how-list-icon {
    width: 40px;
    height: 40px;
    color: #666;
}

.how-list-description {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
    margin: 0;
}

/* Reward Details Section */
.refer-reward-details {
    padding: 80px 0;
    background: #f9fafb;
}

.reward-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.reward-details-label {
    color: #4299e1;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.reward-details-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 24px;
    color: #1a1a1a;
}

.reward-details-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.reward-details-list li {
    font-size: 16px;
    line-height: 1.8;
    color: #666;
    padding-left: 28px;
    position: relative;
    margin-bottom: 12px;
}

.reward-details-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #4299e1;
    font-size: 24px;
    line-height: 1.4;
}

/* Dashboard Mockup */
.reward-details-visual {
    position: relative;
}

.dashboard-mockup {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.dashboard-prices {
    display: flex;
    gap: 12px;
}

.price-badge {
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #1a1a1a;
}

.dashboard-menu-icon {
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

.dashboard-menu {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.menu-title {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.menu-item {
    padding: 10px 12px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-item:hover {
    background: #f3f4f6;
}

.menu-item-highlight {
    color: #1a1a1a;
    font-weight: 600;
}

.menu-badge {
    background: #10b981;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.menu-item-danger {
    color: #ef4444;
}

.dashboard-payment {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: center;
}

.payment-icon {
    width: 40px;
    height: 40px;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.payment-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.payment-label {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.payment-date {
    font-size: 12px;
    color: #666;
}

.payment-chart {
    display: flex;
    gap: 4px;
    align-items: flex-end;
    height: 40px;
}

.chart-bar {
    width: 6px;
    background: #ef4444;
    border-radius: 3px 3px 0 0;
}

.chart-bar:nth-child(1) { height: 60%; background: #10b981; }
.chart-bar:nth-child(2) { height: 70%; background: #10b981; }
.chart-bar:nth-child(3) { height: 50%; background: #10b981; }
.chart-bar:nth-child(4) { height: 30%; background: #ef4444; }
.chart-bar:nth-child(5) { height: 40%; background: #ef4444; }

.payment-next {
    text-align: right;
}

.payment-next-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.payment-amount {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .how-list-number {
        font-size: 28px;
    }

    .reward-details-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .dashboard-mockup {
        max-width: 500px;
        margin: 0 auto;
    }

    .refer-hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .refer-hero-text {
        max-width: 100%;
    }

    .refer-hero-image {
        height: 400px;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .refer-hero {
        padding: 60px 0 40px;
    }

    .refer-title {
        font-size: 36px;
    }

    .refer-description {
        font-size: 16px;
    }

    .section-title {
        font-size: 28px;
    }

    .step-title {
        font-size: 20px;
    }

    .reward-row {
        padding: 16px 20px;
    }

    .cta-title {
        font-size: 32px;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .phone-frame {
        width: 240px;
        height: 480px;
    }
}

/* ── Referral Dashboard Section ─────────────────────────────────────────────── */

/* Referral link row */
.referral-link-row {
    background: #fff;
    border: 1px solid #dde4f5;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 28px;
}

.referral-link-label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.referral-code-badge {
    background: #e8f0fe;
    color: #1a56db;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.referral-link-input-group {
    display: flex;
    gap: 0;
    border: 1.5px solid #c7d2fe;
    border-radius: 8px;
    overflow: hidden;
}

.referral-link-input {
    flex: 1;
    padding: 12px 16px;
    font-size: 14px;
    color: #333;
    background: #f8faff;
    border: none;
    outline: none;
    font-family: 'Courier New', monospace;
}

.referral-copy-btn {
    padding: 12px 22px;
    background: #000;
    color: #fff;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.referral-copy-btn:hover {
    background: #333;
}

/* Stats grid */
.referral-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.referral-stat-card {
    background: #fff;
    border: 1px solid #dde4f5;
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
}

.referral-stat-card--highlight {
    background: #000;
    border-color: #000;
}

.referral-stat-card--highlight .referral-stat-value,
.referral-stat-card--highlight .referral-stat-label {
    color: #fff;
}

.referral-stat-value {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.referral-stat-label {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Referred users table */
.referral-table-wrap {
    background: #fff;
    border: 1px solid #dde4f5;
    border-radius: 12px;
    overflow: hidden;
}

.referral-table-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    padding: 18px 24px 14px;
    border-bottom: 1px solid #eef0f8;
    margin: 0;
}

.referral-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.referral-table thead th {
    background: #f8faff;
    padding: 12px 20px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #eef0f8;
}

.referral-table tbody td {
    padding: 14px 20px;
    color: #333;
    border-bottom: 1px solid #f0f2f8;
}

.referral-table tbody tr:last-child td {
    border-bottom: none;
}

.referral-table tbody tr:hover td {
    background: #f8faff;
}

/* Status badges */
.badge-paid {
    background: #d1fae5;
    color: #065f46;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-pending {
    background: #fef3c7;
    color: #92400e;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-waiting {
    background: #f3f4f6;
    color: #6b7280;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 900px) {
    .referral-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .referral-link-input-group {
        flex-direction: column;
    }
    .referral-copy-btn {
        border-radius: 0 0 6px 6px;
    }
    .referral-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .referral-table thead {
        display: none;
    }
    .referral-table tbody td {
        display: block;
        padding: 8px 16px;
    }
    .referral-table tbody tr {
        border-bottom: 1px solid #eef0f8;
        display: block;
        padding: 8px 0;
    }
}

/* ── End Referral Dashboard ───────────────────────────────────────────────────── */

@media (max-width: 480px) {
    .refer-title {
        font-size: 28px;
    }

    .refer-cta {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .trust-logos {
        gap: 20px;
    }

    .trust-logo svg {
        width: 100px;
        height: 35px;
    }

    .rewards-table {
        font-size: 14px;
    }

    .reward-row {
        padding: 12px 16px;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-buttons .btn {
        width: 100%;
    }
}
