{% extends 'expat_life/base.html' %}
{% load static %}
{% block title %}Guest Dashboard{% endblock %}

{% block content %}
<style>
    /* =========================================================
       EXPAT LIFE GUEST DASHBOARD — PREMIUM LIVE IN SRI LANKA THEME
    ========================================================= */

    :root {
        --lis-deep: #07131c;
        --lis-navy: #0b2638;
        --lis-blue: #0d6efd;
        --lis-blue-dark: #0b3d91;
        --lis-teal: #0f766e;
        --lis-teal-bright: #20c997;
        --lis-teal-soft: #ecfdf5;
        --lis-gold: #ffc107;
        --lis-gold-light: #ffd45f;
        --lis-soft-blue: #f5f9ff;
        --lis-white: #ffffff;
        --lis-text: #102033;
        --lis-muted: #64748b;
        --lis-border: rgba(15, 42, 64, 0.10);
        --lis-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
        --lis-shadow-strong: 0 28px 70px rgba(15, 23, 42, 0.16);
    }

    .guest-dashboard-page {
        position: relative;
        overflow: hidden;
        min-height: 100vh;
        background:
            radial-gradient(circle at 10% 10%, rgba(255, 193, 7, 0.13), transparent 28%),
            radial-gradient(circle at 88% 14%, rgba(13, 110, 253, 0.10), transparent 30%),
            radial-gradient(circle at 82% 86%, rgba(15, 118, 110, 0.12), transparent 32%),
            linear-gradient(180deg, #f5f9ff 0%, #ffffff 100%);
    }

    .guest-dashboard-page::before {
        content: "";
        position: absolute;
        width: 430px;
        height: 430px;
        right: -210px;
        top: -210px;
        border-radius: 50%;
        background: rgba(255, 193, 7, 0.11);
        pointer-events: none;
    }

    .guest-dashboard-page::after {
        content: "";
        position: absolute;
        width: 360px;
        height: 360px;
        left: -170px;
        bottom: -180px;
        border-radius: 50%;
        background: rgba(13, 110, 253, 0.07);
        pointer-events: none;
    }

    .guest-dashboard-page > * {
        position: relative;
        z-index: 2;
    }

    /* =========================================================
       SIGNUP SUCCESS PANEL
    ========================================================= */

    .guest-signup-success {
        position: relative;
        overflow: hidden;
        border: 1px solid rgba(15, 118, 110, 0.16);
        border-radius: 32px;
        background:
            radial-gradient(circle at 92% 10%, rgba(255, 193, 7, 0.13), transparent 32%),
            linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
        box-shadow: var(--lis-shadow);
        padding: 1.55rem 1.65rem;
    }

    .guest-signup-success::before {
        content: "";
        position: absolute;
        inset: 0 0 auto 0;
        height: 5px;
        background: linear-gradient(90deg, var(--lis-gold), var(--lis-teal), var(--lis-blue));
    }

    .guest-signup-success > * {
        position: relative;
        z-index: 2;
    }

    .guest-success-icon {
        width: 64px;
        height: 64px;
        border-radius: 22px;
        background:
            linear-gradient(135deg, rgba(255, 193, 7, 0.20), rgba(15, 118, 110, 0.12));
        color: var(--lis-teal);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.9rem;
        flex-shrink: 0;
        box-shadow: 0 14px 28px rgba(15, 118, 110, 0.12);
    }

    .guest-success-title {
        color: var(--lis-text);
        font-weight: 950;
        letter-spacing: -0.02em;
        margin-bottom: 0.45rem;
    }

    .guest-success-copy {
        color: var(--lis-muted);
        line-height: 1.72;
    }

    .guest-account-credentials {
        border-radius: 26px;
        border: 1px solid rgba(15, 42, 64, 0.09);
        background:
            linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
        padding: 1.2rem 1.25rem;
        box-shadow: 0 12px 26px rgba(15, 23, 42, 0.045);
    }

    .guest-account-row {
        display: flex;
        flex-direction: column;
        gap: 0.15rem;
        padding: 0.45rem 0;
    }

    .guest-account-label {
        color: var(--lis-text);
        font-weight: 900;
        min-width: 150px;
    }

    .guest-account-value {
        color: #475569;
        word-break: break-word;
    }

    .guest-security-note {
        border-top: 1px dashed rgba(15, 42, 64, 0.14);
        padding-top: 0.95rem;
        color: var(--lis-muted);
        line-height: 1.65;
    }

    /* =========================================================
       DASHBOARD HERO
    ========================================================= */

    .guest-dashboard-hero {
        position: relative;
        overflow: hidden;
        border-radius: 40px;
        padding: 2.9rem 2.6rem;
        background:
            radial-gradient(circle at top right, rgba(255, 193, 7, 0.18), transparent 34%),
            radial-gradient(circle at bottom left, rgba(32, 201, 151, 0.18), transparent 34%),
            linear-gradient(135deg, #061b2a 0%, #0b3d91 52%, #0f766e 100%);
        color: #ffffff;
        box-shadow: 0 30px 70px rgba(15, 23, 42, 0.20);
    }

    .guest-dashboard-hero::before {
        content: "";
        position: absolute;
        top: -95px;
        right: -70px;
        width: 280px;
        height: 280px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.08);
        pointer-events: none;
    }

    .guest-dashboard-hero::after {
        content: "";
        position: absolute;
        bottom: -130px;
        left: -80px;
        width: 340px;
        height: 340px;
        border-radius: 50%;
        background: rgba(255, 193, 7, 0.10);
        pointer-events: none;
    }

    .guest-dashboard-hero-inner {
        position: relative;
        z-index: 2;
    }

    .guest-dashboard-mini-title {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.5rem 0.95rem;
        border-radius: 999px;
        background: rgba(255, 193, 7, 0.14);
        border: 1px solid rgba(255, 193, 7, 0.28);
        color: #ffd36b;
        font-size: 0.82rem;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: 0.065em;
        margin-bottom: 1rem;
        backdrop-filter: blur(10px);
    }

    .guest-dashboard-mini-title::before {
        content: "";
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #ffffff;
        box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.12);
    }

    .guest-dashboard-hero h1 {
        font-size: clamp(2.25rem, 4vw, 3.75rem);
        line-height: 1.06;
        letter-spacing: -0.045em;
        font-weight: 950;
        margin-bottom: 0.95rem;
    }

    .guest-dashboard-hero p {
        max-width: 820px;
        color: rgba(255, 255, 255, 0.86);
        line-height: 1.8;
        font-size: 1.05rem;
        margin-bottom: 0;
    }

    /* =========================================================
       ACCOUNT STATUS CARD
    ========================================================= */

    .guest-status-panel {
        position: relative;
        overflow: hidden;
        height: 100%;
        border-radius: 34px;
        padding: 1.7rem;
        background:
            radial-gradient(circle at 92% 10%, rgba(255, 193, 7, 0.12), transparent 32%),
            linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
        border: 1px solid rgba(15, 42, 64, 0.08);
        box-shadow: var(--lis-shadow);
    }

    .guest-status-panel::before {
        content: "";
        position: absolute;
        inset: 0 0 auto 0;
        height: 5px;
        background: linear-gradient(90deg, var(--lis-gold), var(--lis-teal), var(--lis-blue));
    }

    .guest-status-panel > * {
        position: relative;
        z-index: 2;
    }

    .guest-status-title {
        color: var(--lis-text);
        font-weight: 950;
        letter-spacing: -0.02em;
        margin-bottom: 1.15rem;
    }

    .guest-status-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        padding: 0.9rem 0;
        border-bottom: 1px dashed rgba(15, 42, 64, 0.13);
    }

    .guest-status-item:last-child {
        border-bottom: 0;
        padding-bottom: 0;
    }

    .guest-status-label {
        color: #475569;
        font-weight: 850;
    }

    .guest-status-pill {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        padding: 0.42rem 0.78rem;
        border-radius: 999px;
        font-size: 0.82rem;
        font-weight: 900;
        white-space: nowrap;
        border: 1px solid transparent;
    }

    .guest-status-pill.success {
        background: rgba(15, 118, 110, 0.09);
        color: var(--lis-teal);
        border-color: rgba(15, 118, 110, 0.14);
    }

    .guest-status-pill.warning {
        background: rgba(255, 193, 7, 0.14);
        color: #8a5a00;
        border-color: rgba(255, 193, 7, 0.22);
    }

    .guest-status-pill.muted {
        background: #f1f5f9;
        color: #64748b;
        border-color: rgba(15, 42, 64, 0.08);
    }

    /* =========================================================
       DASHBOARD SECTION
    ========================================================= */

    .guest-dashboard-content {
        padding-top: 4rem;
        padding-bottom: 5rem;
    }

    .dashboard-section-heading {
        margin-bottom: 2rem;
    }

    .dashboard-section-kicker {
        display: inline-flex;
        align-items: center;
        gap: 0.45rem;
        padding: 7px 15px;
        border-radius: 999px;
        background: rgba(15, 118, 110, 0.09);
        border: 1px solid rgba(15, 118, 110, 0.14);
        color: var(--lis-teal);
        font-size: 0.78rem;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: 0.075em;
        margin-bottom: 0.8rem;
    }

    .dashboard-section-kicker::before {
        content: "";
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: var(--lis-gold);
        box-shadow: 0 0 0 5px rgba(255, 193, 7, 0.14);
    }

    .dashboard-section-heading h2 {
        color: var(--lis-text);
        font-weight: 950;
        letter-spacing: -0.035em;
        line-height: 1.12;
        margin-bottom: 0.55rem;
    }

    .dashboard-section-heading p {
        color: var(--lis-muted);
        max-width: 760px;
        line-height: 1.75;
        margin-bottom: 0;
    }

    /* =========================================================
       DASHBOARD LINK CARDS
    ========================================================= */

    .dashboard-link-card {
        position: relative;
        overflow: hidden;
        height: 100%;
        border-radius: 30px;
        border: 1px solid rgba(15, 42, 64, 0.08);
        background:
            radial-gradient(circle at 92% 10%, rgba(255, 193, 7, 0.10), transparent 32%),
            linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
        box-shadow: var(--lis-shadow);
        padding: 1.65rem 1.4rem;
        display: flex;
        flex-direction: column;
        transition: all 0.24s ease;
    }

    .dashboard-link-card::before {
        content: "";
        position: absolute;
        inset: 0 0 auto 0;
        height: 4px;
        background: linear-gradient(90deg, var(--lis-gold), var(--lis-teal), var(--lis-blue));
        opacity: 0;
        transition: opacity 0.24s ease;
    }

    .dashboard-link-card::after {
        content: "";
        position: absolute;
        top: -65px;
        right: -65px;
        width: 150px;
        height: 150px;
        border-radius: 50%;
        background: rgba(13, 110, 253, 0.055);
        pointer-events: none;
    }

    .dashboard-link-card:hover {
        transform: translateY(-6px);
        border-color: rgba(15, 118, 110, 0.18);
        box-shadow: var(--lis-shadow-strong);
    }

    .dashboard-link-card:hover::before {
        opacity: 1;
    }

    .dashboard-link-card > * {
        position: relative;
        z-index: 2;
    }

    .dashboard-link-card i:not(.btn i) {
        width: 66px;
        height: 66px;
        border-radius: 23px;
        background:
            linear-gradient(135deg, #ecfdf5 0%, #e9f2ff 100%);
        color: var(--lis-teal);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.55rem;
        margin-bottom: 0.45rem;
        box-shadow: 0 14px 28px rgba(15, 118, 110, 0.10);
    }

    .dashboard-link-card h5 {
        color: var(--lis-text);
        font-weight: 950;
        letter-spacing: -0.015em;
        line-height: 1.3;
        min-height: 2.8rem;
    }

    .dashboard-link-card p {
        color: var(--lis-muted);
        line-height: 1.68;
        font-size: 0.94rem;
        flex-grow: 1;
        margin-bottom: 1.15rem;
    }

    .dashboard-link-card .btn {
        border-radius: 999px;
        font-weight: 850;
        padding: 0.7rem 1.15rem;
        align-self: flex-start;
        transition: all 0.22s ease;
    }

    .dashboard-link-card .btn-outline-dark {
        border-color: rgba(7, 19, 28, 0.22);
        color: var(--lis-deep);
        background: #ffffff;
        box-shadow: 0 12px 24px rgba(15, 23, 42, 0.05);
    }

    .dashboard-link-card .btn-outline-dark:hover {
        background: linear-gradient(135deg, var(--lis-deep), var(--lis-blue));
        border-color: transparent;
        color: #ffffff;
        transform: translateY(-2px);
        box-shadow: 0 16px 32px rgba(13, 110, 253, 0.18);
    }

    .dashboard-link-card .btn.disabled,
    .dashboard-link-card .btn:disabled {
        border-color: #dbe4ee;
        background: #f8fafc;
        color: #94a3b8;
        opacity: 1;
        box-shadow: none;
        transform: none;
    }

    /* =========================================================
       PROFILE CARD
    ========================================================= */

    .dashboard-profile-icon {
        width: 86px;
        height: 86px;
        border-radius: 28px;
        object-fit: cover;
        border: 4px solid rgba(255, 193, 7, 0.28);
        box-shadow:
            0 14px 28px rgba(15, 23, 42, 0.12),
            0 0 0 8px rgba(15, 118, 110, 0.06);
        margin: 0 auto 0.5rem;
    }

    .dashboard-link-card.profile-card {
        text-align: center;
    }

    .dashboard-link-card.profile-card .btn {
        align-self: center;
    }

    /* =========================================================
       THEMED CARD VARIATIONS
    ========================================================= */

    .dashboard-link-card.wallet-card {
        background:
            radial-gradient(circle at 92% 10%, rgba(15, 118, 110, 0.13), transparent 34%),
            linear-gradient(135deg, #ecfdf5 0%, #ffffff 100%);
        border-color: rgba(15, 118, 110, 0.18);
    }

    .dashboard-link-card.wallet-card i:not(.btn i) {
        background:
            linear-gradient(135deg, rgba(15, 118, 110, 0.13), rgba(32, 201, 151, 0.12));
        color: var(--lis-teal);
    }

    .dashboard-wallet-value {
        color: var(--lis-teal);
        font-size: clamp(1.9rem, 3vw, 2.45rem);
        font-weight: 950;
        line-height: 1;
        letter-spacing: -0.035em;
        margin-bottom: 1rem;
    }

    .dashboard-link-card.payment-card-highlight {
        background:
            radial-gradient(circle at 92% 10%, rgba(255, 193, 7, 0.15), transparent 34%),
            linear-gradient(135deg, #fff8ed 0%, #ffffff 100%);
        border-color: rgba(255, 193, 7, 0.22);
    }

    .dashboard-link-card.payment-card-highlight i:not(.btn i) {
        background:
            linear-gradient(135deg, rgba(255, 193, 7, 0.22), rgba(255, 255, 255, 0.90));
        color: #8a5a00;
    }

    .dashboard-link-card.consultation-card {
        background:
            radial-gradient(circle at 92% 10%, rgba(13, 110, 253, 0.12), transparent 34%),
            linear-gradient(135deg, #f5f9ff 0%, #ffffff 100%);
        border-color: rgba(13, 110, 253, 0.16);
    }

    .dashboard-link-card.consultation-card i:not(.btn i) {
        background:
            linear-gradient(135deg, rgba(13, 110, 253, 0.11), rgba(15, 118, 110, 0.07));
        color: var(--lis-blue);
    }

    .dating-dashboard-card {
        position: relative;
        overflow: hidden;
        background:
            radial-gradient(circle at 92% 10%, rgba(255, 193, 7, 0.13), transparent 34%),
            radial-gradient(circle at bottom left, rgba(15, 118, 110, 0.08), transparent 35%),
            linear-gradient(145deg, #ffffff 0%, #fff8ed 100%);
        border: 1px solid rgba(255, 193, 7, 0.22);
    }

    .dating-dashboard-card::after {
        background: rgba(255, 193, 7, 0.09);
    }

    .dating-dashboard-card i:not(.btn i) {
        background:
            linear-gradient(135deg, rgba(255, 193, 7, 0.20), rgba(15, 118, 110, 0.08));
        color: #8a5a00;
    }

    .dating-dashboard-card .btn:hover {
        background: linear-gradient(135deg, var(--lis-deep), var(--lis-gold));
        border-color: transparent;
        color: #ffffff;
    }

    .event-experience-card,
    .hosting-booking-card {
        position: relative;
        overflow: hidden;
        background:
            radial-gradient(circle at 92% 10%, rgba(255, 193, 7, 0.14), transparent 34%),
            radial-gradient(circle at bottom left, rgba(13, 110, 253, 0.08), transparent 35%),
            linear-gradient(145deg, #fff8ed 0%, #ffffff 100%);
        border: 1px solid rgba(255, 193, 7, 0.20);
    }

    .event-experience-card i:not(.btn i),
    .hosting-booking-card i:not(.btn i) {
        background:
            linear-gradient(135deg, rgba(255, 193, 7, 0.18), rgba(13, 110, 253, 0.07));
        color: #8a5a00;
    }

    .event-experience-card .btn:hover,
    .hosting-booking-card .btn:hover {
        background: linear-gradient(135deg, var(--lis-deep), var(--lis-teal));
        border-color: transparent;
        color: #ffffff;
    }

    .hosting-current-card i:not(.btn i) {
        color: var(--lis-teal);
    }

    .hosting-booking-card i:not(.btn i) {
        color: #8a5a00;
    }

    .event-experience-card i:not(.btn i) {
        color: var(--lis-blue-dark);
    }

    .wallet-card i:not(.btn i) {
        color: var(--lis-teal);
    }

    /* =========================================================
       RESPONSIVE
    ========================================================= */

    @media (min-width: 576px) {
        .guest-account-row {
            flex-direction: row;
            align-items: flex-start;
            gap: 0.9rem;
        }
    }

    @media (max-width: 991.98px) {
        .guest-status-panel {
            margin-top: 0.4rem;
        }
    }

    @media (max-width: 767.98px) {
        .guest-dashboard-hero {
            padding: 2.15rem 1.35rem;
            border-radius: 30px;
        }

        .guest-dashboard-hero h1 {
            font-size: 2.15rem;
        }

        .guest-signup-success {
            padding: 1.25rem;
            border-radius: 26px;
        }

        .guest-status-panel {
            border-radius: 28px;
            padding: 1.35rem;
        }

        .guest-status-item {
            flex-direction: column;
            align-items: flex-start;
            gap: 0.45rem;
        }

        .dashboard-link-card {
            border-radius: 26px;
            padding: 1.35rem 1.2rem;
        }

        .dashboard-link-card h5 {
            min-height: auto;
        }
    }

    @media (max-width: 420px) {
        .guest-dashboard-content {
            padding-top: 3rem;
            padding-bottom: 4rem;
        }

        .guest-dashboard-hero {
            border-radius: 26px;
        }

        .dashboard-section-heading h2 {
            font-size: 1.8rem;
        }
    }
</style>


<section class="guest-dashboard-page">

    <!-- =====================================================
         TOP DASHBOARD HERO
    ====================================================== -->
    <section class="py-5">
        <div class="container">

            {% if just_signed_up %}
                <div class="row justify-content-center mb-4">
                    <div class="col-12 col-lg-10">
                        <div class="guest-signup-success">

                            <div class="d-flex flex-column flex-md-row align-items-start gap-3">
                                <div class="guest-success-icon">
                                    <i class="bi bi-check-circle-fill"></i>
                                </div>

                                <div class="w-100">
                                    <h4 class="guest-success-title">
                                        Welcome! Your account has been created successfully.
                                    </h4>

                                    <p class="guest-success-copy mb-3">
                                        You are now signed in to your Guest Dashboard. Please keep your login details safe for future access.
                                    </p>

                                    {% if account_role or new_account_email or username or password %}
                                        <div class="guest-account-credentials">
                                            <div class="row g-2">

                                                {% if account_role %}
                                                    <div class="col-12">
                                                        <div class="guest-account-row">
                                                            <span class="guest-account-label">Account Type:</span>
                                                            <span class="guest-account-value">{{ account_role }}</span>
                                                        </div>
                                                    </div>
                                                {% endif %}

                                                {% if new_account_email %}
                                                    <div class="col-12">
                                                        <div class="guest-account-row">
                                                            <span class="guest-account-label">Email:</span>
                                                            <span class="guest-account-value">{{ new_account_email }}</span>
                                                        </div>
                                                    </div>
                                                {% endif %}

                                                {% if username %}
                                                    <div class="col-12">
                                                        <div class="guest-account-row">
                                                            <span class="guest-account-label">Username:</span>
                                                            <span class="guest-account-value">{{ username }}</span>
                                                        </div>
                                                    </div>
                                                {% endif %}

                                                {% if password %}
                                                    <div class="col-12">
                                                        <div class="guest-account-row">
                                                            <span class="guest-account-label">Temporary Password:</span>
                                                            <span class="guest-account-value">{{ password }}</span>
                                                        </div>
                                                    </div>
                                                {% endif %}

                                            </div>

                                            <div class="guest-security-note mt-3">
                                                Your initial username and password have been sent to your email address.
                                                For better security, please change your password after your first login.
                                            </div>
                                        </div>
                                    {% endif %}
                                </div>
                            </div>

                        </div>
                    </div>
                </div>
            {% endif %}


            <div class="row g-4 align-items-stretch">

                <div class="col-lg-8">
                    <div class="guest-dashboard-hero h-100">
                        <div class="guest-dashboard-hero-inner">

                            <span class="guest-dashboard-mini-title">
                                <i class="bi bi-grid-1x2-fill"></i>
                                Guest Dashboard
                            </span>

                            <h1>
                                Welcome, {{ request.user.first_name|default:request.user.username }}
                            </h1>

                            <p>
                                This is your personal hub for managing your Sri Lanka living journey —
                                review your profile, explore properties and services, track your selected packages,
                                access payment information, and move confidently toward your stay arrangements.
                            </p>

                        </div>
                    </div>
                </div>

                <div class="col-lg-4">
                    <div class="guest-status-panel">
                        <h5 class="guest-status-title">
                            Account Status
                        </h5>

                        <div class="guest-status-item">
                            <span class="guest-status-label">Confirmation</span>

                            {% if profile.is_confirmed %}
                                <span class="guest-status-pill success">
                                    <i class="bi bi-check-circle-fill"></i>
                                    Confirmed
                                </span>
                            {% else %}
                                <span class="guest-status-pill warning">
                                    <i class="bi bi-hourglass-split"></i>
                                    Pending
                                </span>
                            {% endif %}
                        </div>

                        <div class="guest-status-item">
                            <span class="guest-status-label">Private Listings</span>

                            {% if profile.can_view_private_listings %}
                                <span class="guest-status-pill success">
                                    <i class="bi bi-eye-fill"></i>
                                    Enabled
                                </span>
                            {% else %}
                                <span class="guest-status-pill muted">
                                    <i class="bi bi-eye-slash-fill"></i>
                                    Not Yet Enabled
                                </span>
                            {% endif %}
                        </div>

                        <div class="guest-status-item">
                            <span class="guest-status-label">Booking Access</span>

                            {% if profile.can_book_arrangements %}
                                <span class="guest-status-pill success">
                                    <i class="bi bi-calendar-check-fill"></i>
                                    Enabled
                                </span>
                            {% else %}
                                <span class="guest-status-pill muted">
                                    <i class="bi bi-calendar-x-fill"></i>
                                    Not Yet Enabled
                                </span>
                            {% endif %}
                        </div>

                    </div>
                </div>

            </div>
        </div>
    </section>


    <!-- =====================================================
         DASHBOARD ACTION CARDS
    ====================================================== -->
    <section class="guest-dashboard-content">
        <div class="container">

            <div class="dashboard-section-heading">
                <span class="dashboard-section-kicker">
                    <i class="bi bi-stars"></i>
                    Your Guest Portal
                </span>

                <h2>
                    Explore, Manage, and Move Forward
                </h2>

                <p>
                    Access the most important areas of your Live in Sri Lanka account from one place —
                    property rentals, dating connections, service partners, packages, payments, consultation requests, and support.
                </p>
            </div>


            <!-- Row 1 -->
            <div class="row g-4 mb-4">

                <div class="col-md-6 col-xl-3">
                    <div class="dashboard-link-card profile-card h-100">
                        <img
                            src="{% if profile.profile_image %}{{ profile.profile_image.url }}{% else %}{% static default_profile_image %}{% endif %}"
                            alt="Profile Image"
                            class="dashboard-profile-icon"
                        >

                        <h5 class="fw-bold mt-3">My Profile</h5>
                        <p>View your lead, account, and guest profile details.</p>

                        <a href="{% url 'expat_life:foreigner_profile_page' %}"
                           class="btn btn-outline-dark">
                            Open
                        </a>
                    </div>
                </div>

                <div class="col-md-6 col-xl-3">
                    <div class="dashboard-link-card h-100">
                        <i class="bi bi-buildings-fill"></i>
                        <h5 class="fw-bold mt-3">Property Rentals</h5>
                        <p>Explore rental properties and find options that match your lifestyle and budget.</p>

                        <a href="{% url 'expat_life:rental_home' %}"
                           class="btn btn-outline-dark">
                            Open
                        </a>
                    </div>
                </div>

                <div class="col-md-6 col-xl-3">
                    <div class="dashboard-link-card dating-dashboard-card h-100">
                        <i class="bi bi-heart-fill"></i>
                        <h5 class="fw-bold mt-3">Dating Profiles</h5>
                        <p>Browse available dating profiles and explore meaningful connections at your own pace.</p>

                        <a href="{% url 'expat_life:dating_home' %}"
                        class="btn btn-outline-dark">
                            Open
                        </a>
                    </div>
                </div>

                <div class="col-md-6 col-xl-3">
                    <div class="dashboard-link-card payment-card-highlight h-100">
                        <i class="bi bi-credit-card-2-front-fill"></i>
                        <h5 class="fw-bold mt-3">Payment Center</h5>
                        <p>View due, upcoming, optional, and completed payments related to your account and selected services.</p>

                        <a href="{% url 'expat_life:foreigner_payment_center' %}"
                           class="btn btn-outline-dark">
                            Open
                        </a>
                    </div>
                </div>

            </div>


            <!-- Row 2 -->
            <div class="row g-4 mb-4">

                <div class="col-md-6 col-xl-3">
                    <div class="dashboard-link-card h-100">
                        <i class="bi bi-person-workspace"></i>
                        <h5 class="fw-bold mt-3">Local Assistants</h5>
                        <p>Browse trusted local assistants and support services to help with your stay and daily needs.</p>

                        <a href="{% url 'expat_life:service_partner_home' %}"
                           class="btn btn-outline-dark">
                            Open
                        </a>
                    </div>
                </div>

                <div class="col-md-6 col-xl-3">
                    <div class="dashboard-link-card h-100">
                        <i class="bi bi-globe-asia-australia"></i>
                        <h5 class="fw-bold mt-3">Lifestyle Packages</h5>
                        <p>Explore lifestyle packages designed to match your budget, comfort level, and long-stay plans in Sri Lanka.</p>

                        <a href="{% url 'expat_life:package_list' %}"
                           class="btn btn-outline-dark">
                            Open
                        </a>
                    </div>
                </div>

                <div class="col-md-6 col-xl-3">
                    <div class="dashboard-link-card h-100">
                        <i class="bi bi-box2-heart-fill"></i>
                        <h5 class="fw-bold mt-3">My Lifestyle Package</h5>
                        <p>View the details of your selected lifestyle package.</p>

                        {% if lead and lead.interested_package %}
                            <a href="{% url 'expat_life:package_detail' lead.interested_package.slug %}"
                               class="btn btn-outline-dark">
                                Open
                            </a>
                        {% else %}
                            <a href="#"
                               class="btn btn-outline-dark disabled">
                                Not Selected
                            </a>
                        {% endif %}
                    </div>
                </div>

                <div class="col-md-6 col-xl-3">
                    <div class="dashboard-link-card h-100">
                        <i class="bi bi-house-heart-fill"></i>
                        <h5 class="fw-bold mt-3">Interested Properties</h5>
                        <p>View the rental properties you have saved and review them anytime.</p>

                        <a href="{% url 'expat_life:my_interested_properties' %}"
                           class="btn btn-outline-dark">
                            Open
                        </a>
                    </div>
                </div>

            </div>


            <!-- Row 3 -->
            <div class="row g-4 mb-4">

                <div class="col-md-6 col-xl-3">
                    <div class="dashboard-link-card dating-dashboard-card h-100">
                        <i class="bi bi-heart-fill"></i>
                        <h5 class="fw-bold mt-3">Interested Dating Profiles</h5>
                        <p>View the local dating partner profiles you have marked as interested.</p>

                        <a href="{% url 'expat_life:my_interested_dating_profiles' %}"
                        class="btn btn-outline-dark">
                            Open
                        </a>
                    </div>
                </div>

                <div class="col-md-6 col-xl-3">
                    <div class="dashboard-link-card h-100">
                        <i class="bi bi-person-workspace"></i>
                        <h5 class="fw-bold mt-3">Interested Local Assistants</h5>
                        <p>Review the local service partner profiles you have saved for support and future arrangements.</p>

                        <a href="{% url 'expat_life:my_interested_service_partners' %}"
                           class="btn btn-outline-dark">
                            Open
                        </a>
                    </div>
                </div>

                <div class="col-md-6 col-xl-3">
                    <div class="dashboard-link-card h-100">
                        <i class="bi bi-lamp-fill"></i>
                        <h5 class="fw-bold mt-3">Furniture Packages</h5>
                        <p>Browse furniture packages to find the setup that best fits your living space, comfort needs, and budget.</p>

                        <a href="{% url 'expat_life:furniture_package_list' %}"
                           class="btn btn-outline-dark">
                            Open
                        </a>
                    </div>
                </div>

                <div class="col-md-6 col-xl-3">
                    <div class="dashboard-link-card h-100">
                        <i class="bi bi-lamp-fill"></i>
                        <h5 class="fw-bold mt-3">My Furniture Package</h5>
                        <p>View the details of your selected furniture package.</p>

                        {% if lead and lead.selected_furniture_package %}
                            <a href="{% url 'expat_life:furniture_package_detail' lead.selected_furniture_package.slug %}"
                               class="btn btn-outline-dark">
                                Open
                            </a>
                        {% else %}
                            <a href="#"
                               class="btn btn-outline-dark disabled">
                                Not Selected
                            </a>
                        {% endif %}
                    </div>
                </div>

            </div>


            <!-- Row 4 -->
            <div class="row g-4 mt-1">

                <!-- Wallet Balance -->
                <div class="col-md-6 col-xl-3">
                    <div class="dashboard-link-card wallet-card h-100">
                        <i class="bi bi-wallet2"></i>

                        <h5 class="fw-bold mt-3">Wallet Balance</h5>

                        <p>
                            Use your wallet balance to pay faster for confirmations, bookings,
                            event experiences, and other Guest services.
                        </p>

                        <div class="dashboard-wallet-value mb-3">
                            ${{ wallet.balance_usd|floatformat:2 }}
                        </div>

                        <a href="{% url 'expat_life:foreigner_wallet_topup' %}"
                        class="btn btn-outline-dark">
                            Top Up Wallet
                        </a>
                    </div>
                </div>

                <!-- Event Experiences -->
                <div class="col-md-6 col-xl-3">
                    <div class="dashboard-link-card event-experience-card h-100">
                        <i class="bi bi-calendar-heart-fill"></i>

                        <h5 class="fw-bold mt-3">Event Experiences</h5>

                        <p>
                            Explore romantic dinners, proposal setups, celebrations,
                            private dining, and hosted experiences in Sri Lanka.
                        </p>

                        <a href="{% url 'expat_life:host_experiences_home' %}"
                        class="btn btn-outline-dark">
                            Explore Events
                        </a>
                    </div>
                </div>

                <!-- My Host Event Bookings -->
                <div class="col-md-6 col-xl-3">
                    <div class="dashboard-link-card hosting-booking-card h-100">
                        <i class="bi bi-calendar2-check-fill"></i>

                        <h5 class="fw-bold mt-3">My Event Bookings</h5>

                        <p>
                            View all your host event bookings, payment status,
                            selected venue, package, meal plan, add-ons, and progress.
                        </p>

                        <a href="{% url 'expat_life:foreigner_host_event_booking_list' %}"
                        class="btn btn-outline-dark">
                            View Bookings
                        </a>
                    </div>
                </div>

                <!-- Current Hosting Booking / Browse Venues -->
                <div class="col-md-6 col-xl-3">
                    <div class="dashboard-link-card hosting-current-card h-100">
                        <i class="bi bi-house-heart-fill"></i>

                        <h5 class="fw-bold mt-3">Current Booking</h5>

                        <p>
                            Continue your latest hosting experience booking or browse
                            available venues to start a new event request.
                        </p>

                        {% if current_host_booking %}
                            <a href="{% url 'expat_life:guest_host_booking_review' current_host_booking.id %}"
                            class="btn btn-outline-dark">
                                Review Current Booking
                            </a>
                        {% else %}
                            <a href="{% url 'expat_life:guest_host_venue_list' %}"
                            class="btn btn-outline-dark">
                                Browse Venues
                            </a>
                        {% endif %}
                    </div>
                </div>

            </div>

        </div>
    </section>

</section>
{% endblock %}