<div class="wrap chainpay-admin">
    <h1>License Details</h1>
    
    <table class="form-table">
        <tr><th>License Key</th><td><code><?php echo esc_html($license->license_key); ?></code></td></tr>
        <tr><th>Email</th><td><?php echo esc_html($license->user_email); ?></td></tr>
        <tr><th>Domain</th><td><?php echo esc_html($license->user_domain); ?></td></tr>
        <tr><th>Status</th><td><?php echo esc_html(ucfirst($license->status)); ?></td></tr>
        <tr><th>Created</th><td><?php echo esc_html($license->created_at); ?></td></tr>
        <tr><th>Activation Date</th><td><?php echo esc_html($license->activation_date); ?></td></tr>
        <tr><th>Expiration</th><td><?php echo esc_html($license->expiration_date); ?></td></tr>
    </table>
    
    <h2>Usage Statistics</h2>
    <?php if (empty($usage)): ?>
        <p>No usage data recorded.</p>
    <?php else: ?>
        <table class="wp-list-table widefat fixed striped">
            <thead><tr><th>Feature</th><th>Count</th><th>Period</th></tr></thead>
            <tbody>
                <?php foreach ($usage as $u): ?>
                <tr><td><?php echo esc_html($u->feature); ?></td><td><?php echo esc_html($u->count); ?></td><td><?php echo esc_html($u->period); ?></td></tr>
                <?php endforeach; ?>
            </tbody>
        </table>
    <?php endif; ?>
    
    <p><a href="<?php echo admin_url('admin.php?page=chainpay-licenses'); ?>" class="button">Back to Licenses</a></p>
</div>
