<?php
if (!defined('ABSPATH')) exit;

$title = $ctx['title'] ?? __('BLR Backline', 'blr-backline');
$theme_mode = is_user_logged_in() ? \BLR\Backline\Core\SettingsPage::current_theme_mode() : 'light';

\BLR\Backline\Core\Assets::set_frontend_context('auth');
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?> data-blr-theme="<?php echo esc_attr($theme_mode); ?>" data-bs-theme="<?php echo esc_attr($theme_mode); ?>">
<head>
  <meta charset="<?php echo esc_attr(get_bloginfo('charset')); ?>">
  <meta name="viewport" content="width=device-width,initial-scale=1">
  <title><?php echo esc_html($title); ?></title>

  <?php wp_head(); ?>
</head>
<body class="blr-ba-auth" data-blr-theme="<?php echo esc_attr($theme_mode); ?>" data-bs-theme="<?php echo esc_attr($theme_mode); ?>">
<?php if (function_exists('wp_body_open')) { wp_body_open(); } ?>

<div class="blr-ba-auth-wrap">
  <div class="blr-ba-auth-card">
    <?php
    // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Trusted plugin-rendered HTML from internal view templates.
    echo $ctx['page_html'] ?? '';
    ?>
  </div>
</div>

<?php wp_footer(); ?>
</body>
</html>