<style>
/* 🔥 ISOLATE FROM WHMCS / BOOTSTRAP */
.scwisp-ui,
.scwisp-ui * {
    box-sizing: border-box;
}

.scwisp-ui .row,
.scwisp-ui [class*="col-"] {
    all: unset;
    display: block;
}
</style>

<div class="scwisp-ui">

{include file="$template/includes/flashmessage.tpl"}

<div style="padding:30px 20px; max-width:1200px; margin:20px auto; display:block;">

<!-- HERO -->

<div style="
    background:#020617;
    border-radius:12px;
    padding:40px 20px;
    text-align:center;
    margin-bottom:30px;
">
    <h1 style="color:#fff;font-size:32px;font-weight:700;margin-bottom:10px;">
        Welcome back 👋
    </h1>
    <p style="color:#94a3b8;">
        Manage your internet services, invoices and support in one place.
    </p>
</div>

<!-- QUICK STATS -->

<div style="
    display:grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap:15px;
    margin-bottom:30px;
">

```
<a href="clientarea.php?action=services" style="
    background:#0f172a;
    border:1px solid #1e293b;
    border-radius:12px;
    padding:25px;
    text-align:center;
    text-decoration:none;
    color:#fff;
">
    <h3 style="font-size:28px;font-weight:700;">{$clientsstats.productsnumactive}</h3>
    <p style="color:#94a3b8;">Active Services</p>
</a>

<a href="supporttickets.php" style="
    background:#0f172a;
    border:1px solid #1e293b;
    border-radius:12px;
    padding:25px;
    text-align:center;
    text-decoration:none;
    color:#fff;
">
    <h3 style="font-size:28px;font-weight:700;">{$clientsstats.numactivetickets}</h3>
    <p style="color:#94a3b8;">Open Tickets</p>
</a>

<a href="clientarea.php?action=invoices" style="
    background:#0f172a;
    border:1px solid #1e293b;
    border-radius:12px;
    padding:25px;
    text-align:center;
    text-decoration:none;
    color:#fff;
">
    <h3 style="font-size:28px;font-weight:700;">{$clientsstats.numunpaidinvoices}</h3>
    <p style="color:#94a3b8;">Unpaid Invoices</p>
</a>

<a href="clientarea.php?action=details" style="
    background:#0f172a;
    border:1px solid #1e293b;
    border-radius:12px;
    padding:25px;
    text-align:center;
    text-decoration:none;
    color:#fff;
">
    <h3 style="font-size:22px;font-weight:700;">Account</h3>
    <p style="color:#94a3b8;">Manage Details</p>
</a>
```

</div>

<!-- QUICK ACTIONS -->

<div style="
    background:#020617;
    border-radius:12px;
    padding:25px;
    text-align:center;
    margin-bottom:30px;
">

```
<a href="clientarea.php?action=services" style="
    display:inline-block;
    margin:5px;
    padding:14px 20px;
    background:#0f172a;
    border:1px solid #1e293b;
    border-radius:10px;
    color:#fff;
    text-decoration:none;
">💻 My Services</a>

<a href="clientarea.php?action=invoices" style="
    display:inline-block;
    margin:5px;
    padding:14px 20px;
    background:#e11d48;
    border-radius:10px;
    color:#fff;
    text-decoration:none;
    font-weight:600;
">💳 Pay Invoice</a>

<a href="submitticket.php" style="
    display:inline-block;
    margin:5px;
    padding:14px 20px;
    background:#0f172a;
    border:1px solid #1e293b;
    border-radius:10px;
    color:#fff;
    text-decoration:none;
">🧾 Get Support</a>
```

</div>

<!-- WHMCS PANELS -->

<div style="
    display:grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap:20px;
">

```
{foreach $panels as $item}

    <div style="
        background:#0f172a;
        border:1px solid #1e293b;
        border-radius:12px;
        padding:20px;
        color:#fff;
    ">

        <h4 style="margin-bottom:10px;font-weight:600;">
            {if $item->hasIcon()}<i class="{$item->getIcon()}"></i> {/if}
            {$item->getLabel()}
        </h4>

        {if $item->hasBodyHtml()}
            <div style="margin-bottom:10px;color:#94a3b8;">
                {$item->getBodyHtml()}
            </div>
        {/if}

        {if $item->hasChildren()}
            <ul style="list-style:none;padding:0;margin:0;">
                {foreach $item->getChildren() as $childItem}
                    <li style="margin-bottom:10px; display:flex; justify-content:space-between; align-items:center;">

                        <span style="color:#22c55e; font-size:13px;">
                            ● Active
                        </span>

                        <a href="{$childItem->getUri()}" style="
                            padding:6px 10px;
                            background:#e11d48;
                            color:#fff;
                            border-radius:6px;
                            text-decoration:none;
                            font-size:12px;
                        ">
                            View Details
                        </a>

                    </li>
                {/foreach}
            </ul>
        {/if}

    </div>

{/foreach}
```

</div>

</div>
</div>
