{* ONOX Panel — Client Area Widget *}
{* Rendered in WHMCS customer "My Services" → service detail page *}

<div class="card mb-3 onox-panel-widget">
    <div class="card-header">
        <h5 class="mb-0">
            <img src="https://onoxsoft.com/assets/img/logo-sm.png"
                 alt="ONOX"
                 height="20"
                 style="margin-right:8px;vertical-align:middle;"
                 onerror="this.style.display='none'">
            {$LANG.client_panel_title|default:'ONOX Kontrol Paneli'}
        </h5>
    </div>
    <div class="card-body text-center">
        {if $error}
            <div class="alert alert-warning" role="alert">
                <i class="fas fa-exclamation-triangle me-2"></i>
                {$error|escape:'html'}
            </div>
        {elseif $panel_url}
            <p class="text-muted mb-4">
                {$LANG.client_panel_description|default:'Hosting hesabınızı kontrol panelinizden yönetin.'}
            </p>
            <a href="{$panel_url|escape:'html'}"
               target="_blank"
               rel="noopener noreferrer"
               class="btn btn-primary btn-lg mb-3">
                <i class="fas fa-external-link-alt me-2"></i>
                {$LANG.client_login_button|default:'Panele Giriş Yap'}
            </a>
            {if $username}
                <p class="mt-3 mb-0 small text-muted">
                    {$LANG.client_username_label|default:'Kullanıcı adı'}:
                    <code>{$username|escape:'html'}</code>
                </p>
            {/if}
        {else}
            <div class="alert alert-info" role="alert">
                <i class="fas fa-info-circle me-2"></i>
                Hesap henüz hazır değil. Lütfen birkaç dakika sonra tekrar deneyin.
            </div>
        {/if}
    </div>
</div>
