<?php

namespace WPProofShield\Admin;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}


use WPProofShield\Support\FeatureAccess\FeatureAccess;
use WPProofShield\Security\ModeAdvisor;
use WPProofShield\Security\RateLimiter;
use WPProofShield\Support\RequestInput;
use WPProofShield\Support\Settings;
use WPProofShield\Support\UiLanguage;

final class SettingsPage {

	private bool $did_render = false;

	public function __construct(
		private Settings $settings,
		private ModeAdvisor $mode_advisor,
		private FeatureAccess $feature_access
	) {
	}

	public function register(): void {
		add_action( 'admin_menu', array( $this, 'addMenu' ) );
		add_action( 'admin_init', array( $this, 'handleUiLanguageSwitch' ), 5 );
		add_action( 'admin_init', array( $this, 'registerSettings' ) );
		add_action( 'admin_enqueue_scripts', array( $this, 'enqueueAssets' ) );
		add_action( 'admin_notices', array( $this, 'renderLoginJsWarningNotice' ) );
		add_action( 'admin_notices', array( $this, 'renderRateLimitResetNotice' ) );
		add_action( 'admin_post_wpsh_reset_rate_limits', array( $this, 'handleRateLimitReset' ) );
		add_action( 'wp_ajax_wpsh_set_ui_language', array( $this, 'ajaxSetUiLanguage' ) );
	}

	public function addMenu(): void {
		add_menu_page(
			__( 'ProofShield', 'proofshield' ),
			__( 'ProofShield', 'proofshield' ),
			'manage_options',
			'wpsh-settings',
			array( $this, 'render' ),
			'dashicons-shield',
			80
		);
	}

	public function enqueueAssets( string $hook ): void {
		if ( $hook !== 'toplevel_page_wpsh-settings' ) {
			return;
		}
		$admin_css_path = WPSH_DIR . 'assets/css/admin.css';
		$admin_css_ver  = is_readable( $admin_css_path ) ? (string) filemtime( $admin_css_path ) : WPSH_VERSION;
		wp_enqueue_style( 'wpsh-admin', WPSH_URL . 'assets/css/admin.css', array(), $admin_css_ver );

		$admin_js_path = WPSH_DIR . 'assets/js/admin-settings.js';
		$admin_js_ver  = is_readable( $admin_js_path ) ? (string) filemtime( $admin_js_path ) : WPSH_VERSION;
		wp_enqueue_script( 'wpsh-admin-settings', WPSH_URL . 'assets/js/admin-settings.js', array(), $admin_js_ver, true );

		$settings    = $this->settings->all();
		$ui_language = UiLanguage::normalize( (string) ( $settings['ui_language'] ?? UiLanguage::DEFAULT ) );
		wp_localize_script(
			'wpsh-admin-settings',
			'WPSH_SETTINGS_I18N',
			array(
				'currentLanguage'   => $ui_language,
				'defaultLanguage'   => UiLanguage::DEFAULT,
				'textsByLanguage'   => $this->allSettingsTexts(),
				'ajaxUrl'           => admin_url( 'admin-ajax.php' ),
				'nonce'             => wp_create_nonce( 'wpsh_set_ui_language' ),
				'langNonce'         => wp_create_nonce( 'wpsh_set_ui_language' ),
				'settingsOptionKey' => WPSH_OPTION_KEY,
			)
		);
	}

	public function registerSettings(): void {
		register_setting( 'wpsh_settings_group', WPSH_OPTION_KEY, array( $this, 'sanitize' ) );
	}

	public function handleRateLimitReset(): void {
		if ( ! current_user_can( 'manage_options' ) ) {
			wp_die( esc_html__( 'Forbidden', 'proofshield' ), esc_html__( 'Forbidden', 'proofshield' ), array( 'response' => 403 ) );
		}

		$nonce = RequestInput::requestText( 'wpsh_reset_rate_limits_nonce' );
		if ( ! wp_verify_nonce( $nonce, 'wpsh_reset_rate_limits' ) ) {
			wp_die( esc_html__( 'Invalid request.', 'proofshield' ), esc_html__( 'Blocked', 'proofshield' ), array( 'response' => 403 ) );
		}

		RateLimiter::resetAllRateLimitState();
		wp_safe_redirect(
			add_query_arg(
				array(
					'page'                   => 'wpsh-settings',
					'wpsh_rate_limits_reset' => '1',
				),
				admin_url( 'admin.php' )
			)
		);
		exit;
	}

	public function handleUiLanguageSwitch(): void {
		if ( ! is_admin() || ! current_user_can( 'manage_options' ) ) {
			return;
		}

		$page                     = RequestInput::getKey( 'page' );
		$requested_language_param = RequestInput::getText( 'wpsh_set_ui_language' );
		if ( $page !== 'wpsh-settings' || $requested_language_param === '' ) {
			return;
		}

		$nonce = RequestInput::getText( 'wpsh_lang_nonce' );
		if ( ! wp_verify_nonce( $nonce, 'wpsh_set_ui_language' ) ) {
			return;
		}

		$requested_language      = UiLanguage::normalize( sanitize_text_field( $requested_language_param ) );
		$settings                = $this->settings->all();
		$settings['ui_language'] = $requested_language;
		update_option( WPSH_OPTION_KEY, $settings );

		$redirect = remove_query_arg( array( 'wpsh_set_ui_language', 'wpsh_lang_nonce' ) );
		wp_safe_redirect( $redirect );
		exit;
	}

	public function sanitize( array $input ): array {
		$current = $this->settings->all();
		$output  = wp_parse_args( $input, $current );

		$output['enabled_login']              = ! empty( $input['enabled_login'] );
		$output['enabled_comments']           = ! empty( $input['enabled_comments'] );
		$output['enabled_generic_forms']      = ! empty( $input['enabled_generic_forms'] );
		$output['login_lockout_threshold']    = max( 2, min( 20, (int) ( $input['login_lockout_threshold'] ?? 5 ) ) );
		$output['login_lockout_minutes']      = max( 1, min( 1440, (int) ( $input['login_lockout_minutes'] ?? 10 ) ) );
		$output['mode']                       = in_array( ( $input['mode'] ?? '' ), array( 'relaxed', 'balanced', 'strict' ), true ) ? $input['mode'] : 'balanced';
		$output['max_age_sec']                = max( 30, min( 600, (int) ( $input['max_age_sec'] ?? 120 ) ) );
		$output['logging_enabled']            = ! empty( $input['logging_enabled'] );
		$output['ip_tracing_enabled']         = ! empty( $input['ip_tracing_enabled'] );
		$output['stats_world_map_enabled']    = ! empty( $input['stats_world_map_enabled'] );
		$output['progressive_login_blocking'] = ! empty( $input['progressive_login_blocking'] );
		$output['trusted_ips']                = sanitize_textarea_field( (string) ( $input['trusted_ips'] ?? '' ) );
		$output['ui_language']                = UiLanguage::normalize( (string) ( $input['ui_language'] ?? UiLanguage::DEFAULT ) );
		$output['fallback_js_off']            = 'allow_login_block_comments';
		$output['generic_form_selectors']     = sanitize_textarea_field( (string) ( $input['generic_form_selectors'] ?? '' ) );

		foreach ( $this->premiumSettingKeys() as $premium_key ) {
			unset( $output[ $premium_key ] );
		}

		return $output;
	}

	public function render(): void {
		if ( $this->did_render ) {
			return;
		}
		$this->did_render = true;

		if ( ! current_user_can( 'manage_options' ) ) {
			return;
		}

		$settings                      = $this->settings->all();
		$login_enabled                 = ! empty( $settings['enabled_login'] );
		$login_lockout_threshold       = max( 2, min( 20, (int) ( $settings['login_lockout_threshold'] ?? 5 ) ) );
		$login_lockout_minutes         = max( 1, min( 1440, (int) ( $settings['login_lockout_minutes'] ?? 10 ) ) );
		$ui_language                   = UiLanguage::normalize( (string) ( $settings['ui_language'] ?? UiLanguage::DEFAULT ) );
		$t                             = $this->settingsTexts( $ui_language );
		$language_options              = UiLanguage::options();
		$mode_summary                  = $this->mode_advisor->summary();
		$auto_mode_enabled             = ! empty( $settings['enabled_auto_mode'] );
		$recommended_mode              = $this->mode_advisor->recommendMode();
		$effective_mode                = $this->mode_advisor->effectiveMode();
		$effective_difficulty          = $this->settings->difficultyForMode( $effective_mode );
		$show_premium_controls         = false;
		$secure_methods                = $show_premium_controls ? $this->securePlusMethodsCatalog( $t ) : array();
		$selected_secure_methods       = $show_premium_controls
			? array_fill_keys( (array) ( $settings['secure_plus_methods'] ?? array() ), true )
			: array();
		$secure_plus_enabled           = $show_premium_controls && ! empty( $settings['enabled_secure_plus'] );
		$can_use_contact_forms         = $show_premium_controls && false;
		$can_use_secure_plus           = $show_premium_controls && false;
		$can_use_stats_weekly_email    = $show_premium_controls && false;
		$can_use_auto_endpoint_protect = $show_premium_controls && false;
		$can_use_auto_mode             = $show_premium_controls && false;
		$can_use_challenge_max_age     = $show_premium_controls && false;
		$stats_weekly_email_enabled    = $show_premium_controls && ! empty( $settings['stats_weekly_email_enabled'] );
		$ajax_rest_protection_enabled  = $can_use_auto_endpoint_protect && ! empty( $settings['enabled_ajax_rest_protection'] );
		$documentation_url             = $ui_language === 'de'
			? 'https://www.softwaregarten-plugins.de/de/proofshield/docs/'
			: 'https://www.softwaregarten-plugins.de/en/proofshield/docs/';
		$pro_info_url                  = 'https://www.softwaregarten-plugins.de/proofshield';
		if ( ! $show_premium_controls ) {
			$auto_mode_enabled = false;
		}
		?>
		<div class="wrap wpsh-wrap wpsh-settings">
			<div class="wpsh-settings-header">
				<div class="wpsh-admin-brand">
					<?php if ( $logo_url = $this->adminLogoUrl() ) : ?>
						<img class="wpsh-admin-brand__logo" src="<?php echo esc_url( $logo_url ); ?>" alt="<?php echo esc_attr( $t['title'] ); ?>" />
					<?php endif; ?>
					<h1><?php echo esc_html( $t['title'] ); ?></h1>
				</div>
				<p><?php echo esc_html( $t['subtitle'] ); ?></p>
			</div>
			<?php if ( ! $show_premium_controls ) : ?>
				<div class="notice notice-info inline wpsh-pro-upgrade-notice">
					<p style="margin:0 0 8px;"><strong><?php echo esc_html( $ui_language === 'de' ? 'Start hier: ProofShield-Dokumentation' : 'Start here: ProofShield documentation' ); ?></strong></p>
					<p>
						<?php
						echo esc_html(
							$ui_language === 'de'
								? 'Die komplette Einrichtung, Best Practices und Troubleshooting findest du in der offiziellen Dokumentation auf Softwaregarten-Plugins.de.'
								: 'Find complete setup, best practices, and troubleshooting in the official documentation on Softwaregarten-Plugins.de.'
						);
						?>
					</p>
					<p>
						<a class="button button-primary" href="<?php echo esc_url( $documentation_url ); ?>" target="_blank" rel="noopener noreferrer">
							<?php echo esc_html( $ui_language === 'de' ? 'Zur Dokumentation' : 'Open documentation' ); ?>
						</a>
					</p>
					<p class="description" style="margin-top:8px;">
						<?php
						echo esc_html(
							$ui_language === 'de'
							? 'Optionales Upgrade: ProofShield Pro ergänzt Kontaktformular-Integrationen, WooCommerce-Login-Schutz, AJAX/REST-Schutz, Auto-Modus und Secure+.'
							: 'Optional upgrade: ProofShield Pro adds contact-form integrations, WooCommerce login protection, AJAX/REST protection, Auto mode, and Secure+.'
						);
						?>
						<a href="<?php echo esc_url( $pro_info_url ); ?>" target="_blank" rel="noopener noreferrer"><?php echo esc_html( $ui_language === 'de' ? 'Mehr zu Pro' : 'Learn about Pro' ); ?></a>
					</p>
				</div>
			<?php endif; ?>

			<form method="post" action="options.php">
				<?php settings_fields( 'wpsh_settings_group' ); ?>
				<div class="wpsh-settings-toolbar">
					<label class="wpsh-toolbar-field" for="wpsh-ui-language-select">
						<span data-i18n-key="ui_language"><?php echo esc_html( $t['ui_language'] ); ?></span>
						<select id="wpsh-ui-language-select" name="<?php echo esc_attr( WPSH_OPTION_KEY ); ?>[ui_language]">
							<?php foreach ( $language_options as $code => $label ) : ?>
								<option value="<?php echo esc_attr( (string) $code ); ?>" <?php selected( $ui_language, (string) $code ); ?>>
									<?php echo esc_html( $label ); ?>
								</option>
							<?php endforeach; ?>
						</select>
					</label>
				</div>
				<section class="wpsh-settings-panel">
					<h2><?php echo esc_html( $t['section_protection'] ); ?></h2>
					<table class="form-table wpsh-settings-table" role="presentation">
					<tr class="wpsh-row-protect-login">
						<th scope="row">
							<span class="wpsh-help-label">
								<?php echo esc_html( $t['protect_login'] ); ?>
								<span class="wpsh-help-tip" tabindex="0" title="<?php echo esc_attr( $t['protect_login_tip'] ); ?>">?</span>
							</span>
						</th>
						<td>
							<label class="wpsh-toggle">
								<input id="wpsh-login-toggle" type="checkbox" name="<?php echo esc_attr( WPSH_OPTION_KEY ); ?>[enabled_login]" value="1" <?php checked( $login_enabled ); ?> />
								<span><?php echo esc_html( $t['active'] ); ?></span>
							</label>
							<p class="description wpsh-login-js-warning" style="color:#b32d2e;"><?php echo esc_html( $t['login_js_required_warning'] ); ?></p>
						</td>
					</tr>
					<tr class="wpsh-login-dependent-row <?php echo $login_enabled ? '' : 'is-inactive'; ?>">
						<th scope="row">
							<span class="wpsh-help-label">
								<?php echo esc_html( $t['login_lockout_title'] ); ?>
								<span class="wpsh-help-tip" tabindex="0" title="<?php echo esc_attr( $t['login_lockout_tip'] ); ?>">?</span>
							</span>
						</th>
						<td>
							<div id="wpsh-login-lockout-fields" class="wpsh-inline-fields <?php echo $login_enabled ? '' : 'is-inactive'; ?>">
								<label class="wpsh-inline-field">
									<span><?php echo esc_html( $t['login_lockout_attempts_label'] ); ?></span>
									<input class="wpsh-login-dependent-input" type="number" min="2" max="20" name="<?php echo esc_attr( WPSH_OPTION_KEY ); ?>[login_lockout_threshold]" value="<?php echo esc_attr( (string) $login_lockout_threshold ); ?>" <?php disabled( ! $login_enabled ); ?> />
								</label>
								<label class="wpsh-inline-field">
									<span><?php echo esc_html( $t['login_lockout_minutes_label'] ); ?></span>
									<input class="wpsh-login-dependent-input" type="number" min="1" max="1440" name="<?php echo esc_attr( WPSH_OPTION_KEY ); ?>[login_lockout_minutes]" value="<?php echo esc_attr( (string) $login_lockout_minutes ); ?>" <?php disabled( ! $login_enabled ); ?> />
								</label>
							</div>
							<p class="description"><?php echo esc_html( $t['login_lockout_help'] ); ?></p>
						</td>
					</tr>
					<tr class="wpsh-row-protect-comments">
						<th scope="row">
							<span class="wpsh-help-label">
								<?php echo esc_html( $t['protect_comments'] ); ?>
								<span class="wpsh-help-tip" tabindex="0" title="<?php echo esc_attr( $t['protect_comments_tip'] ); ?>">?</span>
							</span>
						</th>
						<td>
							<label class="wpsh-toggle">
								<input type="checkbox" name="<?php echo esc_attr( WPSH_OPTION_KEY ); ?>[enabled_comments]" value="1" <?php checked( ! empty( $settings['enabled_comments'] ) ); ?> />
								<span><?php echo esc_html( $t['active'] ); ?></span>
							</label>
						</td>
					</tr>
					<?php if ( $show_premium_controls ) : ?>
					<tr class="wpsh-row-protect-contact">
						<th scope="row">
							<span class="wpsh-help-label">
								<?php echo esc_html( $t['protect_contact'] ); ?> <span class="wpsh-pro-ribbon">Pro</span>
								<span class="wpsh-help-tip" tabindex="0" title="<?php echo esc_attr( $t['protect_contact_tip'] ); ?>">?</span>
							</span>
						</th>
						<td>
							<label class="wpsh-toggle">
								<input type="checkbox" name="<?php echo esc_attr( WPSH_OPTION_KEY ); ?>[enabled_contact_forms]" value="1" <?php checked( ! empty( $settings['enabled_contact_forms'] ) ); ?> <?php disabled( ! $can_use_contact_forms ); ?> />
								<span><?php echo esc_html( $t['active_contact'] ); ?></span>
							</label>
						</td>
					</tr>
					<tr class="wpsh-row-protect-woo">
						<th scope="row">
							<span class="wpsh-help-label">
								<?php echo esc_html( $t['protect_woo'] ); ?> <span class="wpsh-pro-ribbon">Pro</span>
								<span class="wpsh-help-tip" tabindex="0" title="<?php echo esc_attr( $t['protect_woo_tip'] ); ?>">?</span>
							</span>
						</th>
						<td>
							<label class="wpsh-toggle">
								<input type="checkbox" name="<?php echo esc_attr( WPSH_OPTION_KEY ); ?>[enabled_woo_login]" value="1" <?php checked( ! empty( $settings['enabled_woo_login'] ) ); ?> />
								<span><?php echo esc_html( $t['active_pro'] ); ?></span>
							</label>
						</td>
					</tr>
					<?php endif; ?>
					<tr class="wpsh-row-protect-generic">
						<th scope="row">
							<span class="wpsh-help-label">
								<?php echo esc_html( $t['protect_generic'] ); ?>
								<span class="wpsh-help-tip" tabindex="0" title="<?php echo esc_attr( $t['protect_generic_tip'] ); ?>">?</span>
							</span>
						</th>
						<td>
							<label class="wpsh-toggle">
								<input type="checkbox" name="<?php echo esc_attr( WPSH_OPTION_KEY ); ?>[enabled_generic_forms]" value="1" <?php checked( ! empty( $settings['enabled_generic_forms'] ) ); ?> />
								<span><?php echo esc_html( $t['active'] ); ?></span>
							</label>
							<p class="description"><?php echo esc_html( $t['generic_help'] ); ?></p>
							<p><textarea name="<?php echo esc_attr( WPSH_OPTION_KEY ); ?>[generic_form_selectors]" rows="4" cols="60"><?php echo esc_textarea( (string) ( $settings['generic_form_selectors'] ?? '' ) ); ?></textarea></p>
							<p class="description"><?php echo esc_html( $t['generic_examples'] ); ?></p>
						</td>
					</tr>
					</table>
				</section>

				<section class="wpsh-settings-panel">
					<h2><?php echo esc_html( $t['section_difficulty'] ); ?></h2>
					<table class="form-table wpsh-settings-table" role="presentation">
					<tr class="wpsh-row-mode">
						<th scope="row"><?php echo esc_html( $t['mode'] ); ?></th>
						<td class="wpsh-mode-cell <?php echo $auto_mode_enabled ? 'is-auto' : ''; ?>">
							<div class="wpsh-mode-select-wrap">
								<select id="wpsh-mode-select" name="<?php echo esc_attr( WPSH_OPTION_KEY ); ?>[mode]" <?php disabled( $auto_mode_enabled ); ?>>
									<option value="relaxed" <?php selected( $settings['mode'] ?? 'balanced', 'relaxed' ); ?>><?php echo esc_html( $t['mode_relaxed'] ); ?></option>
									<option value="balanced" <?php selected( $settings['mode'] ?? 'balanced', 'balanced' ); ?>><?php echo esc_html( $t['mode_balanced'] ); ?></option>
									<option value="strict" <?php selected( $settings['mode'] ?? 'balanced', 'strict' ); ?>><?php echo esc_html( $t['mode_strict'] ); ?></option>
								</select>
								<span class="wpsh-mode-badge wpsh-mode-badge--<?php echo esc_attr( $effective_mode ); ?> <?php echo $auto_mode_enabled ? '' : 'is-inactive'; ?>">
									<?php echo esc_html( $this->modeLabel( $effective_mode, $t ) ); ?>
								</span>
							</div>
							<p class="description wpsh-mode-note">
								<?php echo esc_html( $auto_mode_enabled ? $t['mode_locked_auto'] : $t['mode_manual_note'] ); ?>
							</p>
							<?php if ( ! $show_premium_controls ) : ?>
								<p class="description wpsh-pro-inline-note">
									<?php
									echo esc_html(
										$ui_language === 'de'
											? 'ProofShield Pro kann die Schutzstufe mit dem Auto-Modus automatisch passend zur Angriffslage und Systemlast wählen.'
											: 'ProofShield Pro can use Auto mode to choose the protection level automatically based on attack pressure and system load.'
									);
									?>
									<a href="<?php echo esc_url( $pro_info_url ); ?>" target="_blank" rel="noopener noreferrer"><?php echo esc_html( $ui_language === 'de' ? 'Mehr zu Pro' : 'Learn about Pro' ); ?></a>
								</p>
							<?php endif; ?>
						</td>
					</tr>
					<?php if ( $show_premium_controls ) : ?>
					<tr class="wpsh-row-auto-level">
						<th scope="row">
							<span class="wpsh-help-label">
								<?php echo esc_html( $t['auto_level_title'] ); ?> <span class="wpsh-pro-ribbon">Pro</span>
								<span class="wpsh-help-tip" tabindex="0" title="<?php echo esc_attr( $t['auto_level_tip'] ); ?>">?</span>
							</span>
						</th>
						<td>
							<label class="wpsh-toggle">
								<input id="wpsh-auto-mode-toggle" type="checkbox" name="<?php echo esc_attr( WPSH_OPTION_KEY ); ?>[enabled_auto_mode]" value="1" <?php checked( $auto_mode_enabled ); ?> <?php disabled( ! $can_use_auto_mode ); ?> />
								<span><?php echo esc_html( $t['auto_level_toggle'] ); ?></span>
							</label>
							<div class="wpsh-auto-stats <?php echo ( $auto_mode_enabled && $can_use_auto_mode ) ? '' : 'is-inactive'; ?>">
								<div class="wpsh-auto-stat">
									<span class="wpsh-auto-stat__label"><?php echo esc_html( $t['auto_recommendation'] ); ?></span>
									<strong class="wpsh-auto-stat__value"><?php echo esc_html( $this->modeLabel( $recommended_mode, $t ) ); ?></strong>
								</div>
								<div class="wpsh-auto-stat">
									<span class="wpsh-auto-stat__label"><?php echo esc_html( $t['auto_effective'] ); ?></span>
									<strong class="wpsh-auto-stat__value"><?php echo esc_html( $this->modeLabel( $effective_mode, $t ) ); ?></strong>
								</div>
								<div class="wpsh-auto-stat">
									<span class="wpsh-auto-stat__label"><?php echo esc_html( $t['auto_target_difficulty'] ); ?></span>
									<strong class="wpsh-auto-stat__value"><?php echo esc_html( (string) $effective_difficulty ); ?></strong>
								</div>
								<div class="wpsh-auto-stat">
									<span class="wpsh-auto-stat__label"><?php echo esc_html( $t['auto_blocked_24h'] ); ?></span>
									<strong class="wpsh-auto-stat__value"><?php echo esc_html( number_format_i18n( (int) ( $mode_summary['blocked_24h'] ?? 0 ) ) ); ?></strong>
								</div>
								<div class="wpsh-auto-stat">
									<span class="wpsh-auto-stat__label"><?php echo esc_html( $t['auto_block_rate'] ); ?></span>
									<strong class="wpsh-auto-stat__value"><?php echo esc_html( number_format_i18n( (float) ( $mode_summary['blocked_rate_24h'] ?? 0 ), 1 ) ); ?>%</strong>
								</div>
								<div class="wpsh-auto-stat">
									<span class="wpsh-auto-stat__label"><?php echo esc_html( $t['auto_system_load'] ); ?></span>
									<strong class="wpsh-auto-stat__value"><?php echo esc_html( number_format_i18n( (int) ( $mode_summary['system_load_percent'] ?? 0 ) ) ); ?>%</strong>
								</div>
							</div>
						</td>
					</tr>
					<tr class="wpsh-row-token-validity">
						<th scope="row">
							<span class="wpsh-help-label">
								<?php echo esc_html( $t['token_validity_title'] ); ?> <span class="wpsh-pro-ribbon">Pro</span>
								<span class="wpsh-help-tip" tabindex="0" title="<?php echo esc_attr( $t['token_validity_tip'] ); ?>">?</span>
							</span>
						</th>
						<td>
							<input type="number" min="30" max="600" name="<?php echo esc_attr( WPSH_OPTION_KEY ); ?>[max_age_sec]" value="<?php echo esc_attr( (string) ( $settings['max_age_sec'] ?? 120 ) ); ?>" <?php disabled( ! $can_use_challenge_max_age ); ?> />
							<p class="description"><?php echo esc_html( $t['token_validity_help'] ); ?></p>
						</td>
					</tr>
					<?php endif; ?>
					</table>
				</section>

				<section class="wpsh-settings-panel">
					<h2><?php echo esc_html( $t['section_security'] ); ?></h2>
					<table class="form-table wpsh-settings-table" role="presentation">
					<tr class="wpsh-row-logging">
						<th scope="row"><?php echo esc_html( $t['logging'] ); ?></th>
						<td>
							<label class="wpsh-toggle">
								<input type="checkbox" name="<?php echo esc_attr( WPSH_OPTION_KEY ); ?>[logging_enabled]" value="1" <?php checked( ! empty( $settings['logging_enabled'] ) ); ?> />
								<span><?php echo esc_html( $t['active'] ); ?></span>
							</label>
						</td>
					</tr>
					<?php if ( $show_premium_controls ) : ?>
					<tr class="wpsh-row-stats-weekly-email">
						<th scope="row"><?php echo esc_html( $t['stats_weekly_email'] ); ?> <span class="wpsh-pro-ribbon">Pro</span></th>
						<td>
							<label class="wpsh-toggle">
								<input type="checkbox" name="<?php echo esc_attr( WPSH_OPTION_KEY ); ?>[stats_weekly_email_enabled]" value="1" <?php checked( $stats_weekly_email_enabled ); ?> <?php disabled( ! $can_use_stats_weekly_email ); ?> />
								<span><?php echo esc_html( $t['stats_weekly_email_help'] ); ?></span>
							</label>
						</td>
					</tr>
					<?php endif; ?>
					<tr class="wpsh-row-progressive-login">
						<th scope="row">
							<span class="wpsh-help-label">
								<?php echo esc_html( $t['progressive_login'] ); ?>
								<span class="wpsh-help-tip" tabindex="0" title="<?php echo esc_attr( $t['progressive_login_tip'] ); ?>">?</span>
							</span>
						</th>
						<td>
							<label class="wpsh-toggle">
								<input type="checkbox" name="<?php echo esc_attr( WPSH_OPTION_KEY ); ?>[progressive_login_blocking]" value="1" <?php checked( ! empty( $settings['progressive_login_blocking'] ) ); ?> />
								<span><?php echo esc_html( $t['progressive_login_help'] ); ?></span>
							</label>
							<p class="description"><?php echo esc_html( $t['progressive_login_note'] ); ?></p>
						</td>
					</tr>
					<?php if ( $show_premium_controls ) : ?>
					<tr class="wpsh-row-secure-plus">
						<th scope="row"><?php echo esc_html( $t['secure_plus'] ); ?> <span class="wpsh-pro-ribbon">Pro</span></th>
						<td>
							<label class="wpsh-toggle">
								<input id="wpsh-secure-plus-toggle" type="checkbox" name="<?php echo esc_attr( WPSH_OPTION_KEY ); ?>[enabled_secure_plus]" value="1" <?php checked( $secure_plus_enabled ); ?> <?php disabled( ! $can_use_secure_plus ); ?> />
								<span><?php echo esc_html( $t['secure_plus_help'] ); ?></span>
							</label>
							<div id="wpsh-secure-methods" class="wpsh-secure-methods <?php echo ( $can_use_secure_plus && $secure_plus_enabled ) ? '' : 'is-inactive'; ?>">
								<?php foreach ( $secure_methods as $method_key => $method ) : ?>
									<label class="wpsh-secure-method <?php echo ( $can_use_secure_plus && $secure_plus_enabled ) ? '' : 'is-disabled'; ?>">
										<input type="checkbox" name="<?php echo esc_attr( WPSH_OPTION_KEY ); ?>[secure_plus_methods][<?php echo esc_attr( $method_key ); ?>]" value="1" <?php checked( $can_use_secure_plus && $secure_plus_enabled && isset( $selected_secure_methods[ $method_key ] ) ); ?> <?php disabled( ! $can_use_secure_plus || empty( $settings['enabled_secure_plus'] ) ); ?> />
										<span class="wpsh-secure-method__text">
											<span class="wpsh-secure-method__label"><?php echo esc_html( (string) ( $method['label'] ?? '' ) ); ?></span>
											<?php if ( ! empty( $method['description'] ) ) : ?>
												<span class="wpsh-secure-method__description"><?php echo esc_html( (string) $method['description'] ); ?></span>
											<?php endif; ?>
										</span>
									</label>
								<?php endforeach; ?>
							</div>
							<p class="description"><?php echo esc_html( $t['secure_plus_pool_hint'] ); ?></p>
						</td>
					</tr>
					<?php endif; ?>
					<tr class="wpsh-row-geo-stats">
						<th scope="row">
							<span class="wpsh-help-label">
								<?php echo esc_html( $t['geo_stats_title'] ); ?>
								<span class="wpsh-help-tip" tabindex="0" title="<?php echo esc_attr( $t['geo_stats_tip'] ); ?>">?</span>
							</span>
						</th>
						<td>
							<label class="wpsh-toggle">
								<input type="checkbox" name="<?php echo esc_attr( WPSH_OPTION_KEY ); ?>[ip_tracing_enabled]" value="1" <?php checked( ! empty( $settings['ip_tracing_enabled'] ) ); ?> />
								<span><?php echo esc_html( $t['geo_stats_toggle'] ); ?></span>
							</label>
							<p class="description"><?php echo esc_html( $t['geo_stats_help'] ); ?></p>
							<label class="wpsh-toggle" style="margin-top:8px;">
								<input type="checkbox" name="<?php echo esc_attr( WPSH_OPTION_KEY ); ?>[stats_world_map_enabled]" value="1" <?php checked( ! empty( $settings['stats_world_map_enabled'] ) ); ?> />
								<span><?php echo esc_html( $t['geo_map_toggle'] ); ?></span>
							</label>
							<p class="description"><?php echo esc_html( $t['geo_map_help'] ); ?></p>
						</td>
					</tr>
					<tr class="wpsh-row-trusted-ips">
						<th scope="row"><?php echo esc_html( $t['trusted_ips'] ); ?></th>
						<td>
							<textarea name="<?php echo esc_attr( WPSH_OPTION_KEY ); ?>[trusted_ips]" rows="4" cols="60"><?php echo esc_textarea( (string) ( $settings['trusted_ips'] ?? '' ) ); ?></textarea>
							<p class="description"><?php echo esc_html( $t['trusted_ips_help'] ); ?></p>
						</td>
					</tr>
					<?php if ( $show_premium_controls ) : ?>
					<tr class="wpsh-row-ajax-rest-master">
						<th scope="row">
							<span class="wpsh-help-label">
								<?php echo esc_html( $t['ajax_rest_master_title'] ); ?> <span class="wpsh-pro-ribbon">Pro</span>
								<span class="wpsh-help-tip" tabindex="0" title="<?php echo esc_attr( $t['ajax_rest_master_tip'] ); ?>">?</span>
							</span>
						</th>
						<td>
							<label class="wpsh-toggle">
								<input id="wpsh-ajax-rest-toggle" type="checkbox" name="<?php echo esc_attr( WPSH_OPTION_KEY ); ?>[enabled_ajax_rest_protection]" value="1" <?php checked( ! empty( $settings['enabled_ajax_rest_protection'] ) ); ?> <?php disabled( ! $can_use_auto_endpoint_protect ); ?> />
								<span><?php echo esc_html( $t['ajax_rest_master_toggle'] ); ?></span>
							</label>
							<p class="description"><?php echo esc_html( $t['ajax_rest_master_help'] ); ?></p>
						</td>
					</tr>
					<tr class="wpsh-row-ajax-rest-auto wpsh-ajax-rest-child-row <?php echo $ajax_rest_protection_enabled ? '' : 'is-hidden'; ?>">
						<th scope="row">
							<span class="wpsh-help-label">
								<?php echo esc_html( $t['ajax_rest_auto_title'] ); ?> <span class="wpsh-pro-ribbon">Pro</span>
								<span class="wpsh-help-tip" tabindex="0" title="<?php echo esc_attr( $t['ajax_rest_auto_tip'] ); ?>">?</span>
							</span>
						</th>
						<td>
							<label class="wpsh-toggle">
								<input id="wpsh-auto-endpoint-toggle" class="wpsh-auto-endpoint-child-input" type="checkbox" name="<?php echo esc_attr( WPSH_OPTION_KEY ); ?>[enabled_auto_endpoint_protect]" value="1" <?php checked( ! empty( $settings['enabled_auto_endpoint_protect'] ) ); ?> <?php disabled( ! $ajax_rest_protection_enabled ); ?> />
								<span><?php echo esc_html( $t['ajax_rest_auto_toggle'] ); ?></span>
							</label>
							<p class="description"><?php echo esc_html( $t['ajax_rest_auto_help'] ); ?></p>
						</td>
					</tr>
					<tr class="wpsh-row-ajax-actions wpsh-dependent-row wpsh-ajax-rest-child-row <?php echo $ajax_rest_protection_enabled ? '' : 'is-hidden'; ?> <?php echo $ajax_rest_protection_enabled ? '' : 'is-inactive'; ?>">
						<th scope="row">
							<span class="wpsh-help-label">
								<?php echo esc_html( $t['ajax_actions_title'] ); ?> <span class="wpsh-pro-ribbon">Pro</span>
								<span class="wpsh-help-tip" tabindex="0" title="<?php echo esc_attr( $t['ajax_actions_tip'] ); ?>">?</span>
							</span>
						</th>
						<td>
							<textarea class="wpsh-auto-endpoint-dependent" name="<?php echo esc_attr( WPSH_OPTION_KEY ); ?>[auto_protect_ajax_actions]" rows="4" cols="60" <?php disabled( ! $ajax_rest_protection_enabled ); ?>><?php echo esc_textarea( (string) ( $settings['auto_protect_ajax_actions'] ?? '' ) ); ?></textarea>
							<p class="description"><?php echo esc_html( $t['ajax_actions_help'] ); ?></p>
						</td>
					</tr>
					<tr class="wpsh-row-rest-routes wpsh-dependent-row wpsh-ajax-rest-child-row <?php echo $ajax_rest_protection_enabled ? '' : 'is-hidden'; ?> <?php echo $ajax_rest_protection_enabled ? '' : 'is-inactive'; ?>">
						<th scope="row">
							<span class="wpsh-help-label">
								<?php echo esc_html( $t['rest_routes_title'] ); ?> <span class="wpsh-pro-ribbon">Pro</span>
								<span class="wpsh-help-tip" tabindex="0" title="<?php echo esc_attr( $t['rest_routes_tip'] ); ?>">?</span>
							</span>
						</th>
						<td>
							<textarea class="wpsh-auto-endpoint-dependent" name="<?php echo esc_attr( WPSH_OPTION_KEY ); ?>[auto_protect_rest_routes]" rows="4" cols="60" <?php disabled( ! $ajax_rest_protection_enabled ); ?>><?php echo esc_textarea( (string) ( $settings['auto_protect_rest_routes'] ?? '' ) ); ?></textarea>
							<p class="description"><?php echo esc_html( $t['rest_routes_help'] ); ?></p>
						</td>
					</tr>
					<tr class="wpsh-row-ajax-rest-excludes wpsh-dependent-row wpsh-ajax-rest-child-row <?php echo $ajax_rest_protection_enabled ? '' : 'is-hidden'; ?> <?php echo $ajax_rest_protection_enabled ? '' : 'is-inactive'; ?>">
						<th scope="row">
							<span class="wpsh-help-label">
								<?php echo esc_html( $t['ajax_rest_excludes_title'] ); ?> <span class="wpsh-pro-ribbon">Pro</span>
								<span class="wpsh-help-tip" tabindex="0" title="<?php echo esc_attr( $t['ajax_rest_excludes_tip'] ); ?>">?</span>
							</span>
						</th>
						<td>
							<textarea class="wpsh-auto-endpoint-dependent" name="<?php echo esc_attr( WPSH_OPTION_KEY ); ?>[auto_protect_exclude_urls]" rows="4" cols="60" <?php disabled( ! $ajax_rest_protection_enabled ); ?>><?php echo esc_textarea( (string) ( $settings['auto_protect_exclude_urls'] ?? '' ) ); ?></textarea>
							<p class="description"><?php echo esc_html( $t['ajax_rest_excludes_help'] ); ?></p>
						</td>
					</tr>
					<?php endif; ?>
					</table>
				</section>

				<?php submit_button( $t['save_changes'] ); ?>
			</form>
			<section class="wpsh-settings-panel">
				<h2><?php echo esc_html( $t['section_maintenance'] ); ?></h2>
				<p class="description"><?php echo esc_html( $t['rate_limit_reset_help'] ); ?></p>
				<form method="post" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>">
					<input type="hidden" name="action" value="wpsh_reset_rate_limits" />
					<?php wp_nonce_field( 'wpsh_reset_rate_limits', 'wpsh_reset_rate_limits_nonce' ); ?>
					<button type="submit" class="button button-secondary"><?php echo esc_html( $t['rate_limit_reset_button'] ); ?></button>
				</form>
			</section>
		</div>
		<?php
	}

	public function renderRateLimitResetNotice(): void {
		if ( ! is_admin() || ! current_user_can( 'manage_options' ) ) {
			return;
		}

		if ( RequestInput::getKey( 'page' ) !== 'wpsh-settings' || RequestInput::getText( 'wpsh_rate_limits_reset' ) !== '1' ) {
			return;
		}

		$ui_language = UiLanguage::current( $this->settings );
		$t           = $this->settingsTexts( $ui_language );
		echo '<div class="notice notice-success is-dismissible"><p>' . esc_html( $t['rate_limit_reset_done'] ) . '</p></div>';
	}

	/**
	 * @return array<int,string>
	 */
	private function premiumSettingKeys(): array {
		return array(
			'enabled_contact_forms',
			'enabled_woo_login',
			'enabled_auto_mode',
			'stats_weekly_email_enabled',
			'enabled_secure_plus',
			'secure_plus_methods',
			'enabled_ajax_rest_protection',
			'enabled_auto_endpoint_protect',
			'auto_protect_ajax_actions',
			'auto_protect_rest_routes',
			'auto_protect_exclude_urls',
		);
	}

	private function securePlusMethodsCatalog( array $t = array() ): array {
		return array(
			'header_consistency' => array(
				'label'       => (string) ( $t['secure_method_header_consistency'] ?? 'Header consistency checks' ),
				'description' => (string) ( $t['secure_method_header_consistency_desc'] ?? 'Detects unusual or contradictory request headers that often indicate scripted or spoofed clients.' ),
			),
			'headless_signature' => array(
				'label'       => (string) ( $t['secure_method_headless_signature'] ?? 'Headless/Selenium signature checks' ),
				'description' => (string) ( $t['secure_method_headless_signature_desc'] ?? 'Flags browser automation fingerprints (for example Selenium, headless browsers, or common bot toolchains).' ),
			),
			'failure_burst'      => array(
				'label'       => (string) ( $t['secure_method_failure_burst'] ?? 'Failure burst escalation' ),
				'description' => (string) ( $t['secure_method_failure_burst_desc'] ?? 'Raises risk quickly when many failed checks happen in a short time from the same source.' ),
			),
			'fast_submit'        => array(
				'label'       => (string) ( $t['secure_method_fast_submit'] ?? 'Fast-submit timing heuristic' ),
				'description' => (string) ( $t['secure_method_fast_submit_desc'] ?? 'Marks submissions as suspicious when forms are sent unrealistically fast compared to normal human interaction.' ),
			),
			'tarpit_timeout'     => array(
				'label'       => (string) ( $t['secure_method_tarpit_timeout'] ?? 'Tarpit timeout on high risk' ),
				'description' => (string) ( $t['secure_method_tarpit_timeout_desc'] ?? 'Applies a deliberate delay or timeout to high-risk requests to slow bots and reduce attack throughput.' ),
			),
		);
	}

	private function modeLabel( string $mode, array $t ): string {
		return match ( $mode ) {
			'relaxed' => (string) ( $t['mode_relaxed'] ?? 'Relaxed' ),
			'strict' => (string) ( $t['mode_strict'] ?? 'Strict' ),
			default => (string) ( $t['mode_balanced'] ?? 'Balanced' ),
		};
	}

	private function adminLogoUrl(): string {
		$preferred = $this->license_gate->isEnabled()
			? array( 'assets/images/proofshield-pro.png', 'assets/images/logo-pro.png', 'assets/images/pro-logo.png' )
			: array( 'assets/images/proofshield-free.png', 'assets/images/logo-free.png', 'assets/images/free-logo.png' );

		$fallback = array( 'assets/images/proofshield-logo.png', 'assets/images/logo.png' );

		foreach ( array_merge( $preferred, $fallback ) as $relative ) {
			$absolute_path = WPSH_DIR . $relative;
			if ( is_readable( $absolute_path ) ) {
				$version = (string) filemtime( $absolute_path );
				return (string) add_query_arg( 'ver', $version, WPSH_URL . $relative );
			}
		}

		return '';
	}

	private function settingsTexts( string $language ): array {
		$common = array(
			'title'                                 => 'ProofShield',
			'secure_plus'                           => 'Secure+ Risk Scoring (Pro)',
			'secure_plus_help'                      => 'Adaptive risk scoring: allow / hard challenge / block',
			'secure_plus_pool_hint'                 => 'Mode (difficulty) is bound to the enabled Secure+ methods and can trigger long tarpit timeouts for suspicious JS/header bots.',
			'section_difficulty'                    => 'Difficulty',
			'section_security'                      => 'Security & Risk',
			'section_language'                      => 'Language',
			'section_maintenance'                   => 'Maintenance',
			'rate_limit_reset_button'               => 'Reset temporary blocks',
			'rate_limit_reset_help'                 => 'Clears temporary ProofShield rate limits and cooldowns. Use this after testing or after a fixed form integration caused false blocks.',
			'rate_limit_reset_done'                 => 'Temporary ProofShield blocks were reset.',
			'auto_mode'                             => 'Auto mode',
			'auto_mode_help'                        => 'Automatically adapt strictness based on attack pressure and system load',
			'mode_manual_note'                      => 'Manual mode is active.',
			'mode_locked_auto'                      => 'Mode is controlled by Auto mode.',
			'auto_recommendation'                   => 'Recommendation',
			'auto_effective'                        => 'Effective mode',
			'auto_target_difficulty'                => 'Target difficulty',
			'auto_blocked_24h'                      => 'Blocked (24h)',
			'auto_block_rate'                       => 'Block rate',
			'auto_system_load'                      => 'System load',
			'secure_method_header_consistency'      => 'Header consistency checks',
			'secure_method_headless_signature'      => 'Headless/Selenium signature checks',
			'secure_method_failure_burst'           => 'Failure burst escalation',
			'secure_method_fast_submit'             => 'Fast-submit timing heuristic',
			'secure_method_tarpit_timeout'          => 'Tarpit timeout on high risk',
			'secure_method_header_consistency_desc' => 'Detects unusual or contradictory request headers that often indicate scripted or spoofed clients.',
			'secure_method_headless_signature_desc' => 'Flags browser automation fingerprints (for example Selenium, headless browsers, or common bot toolchains).',
			'secure_method_failure_burst_desc'      => 'Raises risk quickly when many failed checks happen in a short time from the same source.',
			'secure_method_fast_submit_desc'        => 'Marks submissions as suspicious when forms are sent unrealistically fast compared to normal human interaction.',
			'secure_method_tarpit_timeout_desc'     => 'Applies a deliberate delay or timeout to high-risk requests to slow bots and reduce attack throughput.',
			'stats_weekly_email'                    => 'Weekly statistics email to administrator',
			'stats_weekly_email_help'               => 'Send every Monday at 08:00',
			'admin_email_reference'                 => 'Administrator email',
			'admin_email_reference_help'            => 'Default: administrator email.',
		);

		$texts = match ( $language ) {
			'en' => array_replace(
				$common,
				array(
					'subtitle'                    => 'Bot protection with local proof-of-work and no external services.',
					'section_protection'          => 'Protection Areas',
					'section_difficulty'          => 'Difficulty',
					'section_security'            => 'Security & Risk',
					'section_language'            => 'Language',
					'protect_login'               => 'Protect login',
					'protect_comments'            => 'Protect comments',
					'protect_contact'             => 'Protect contact forms',
					'protect_woo'                 => 'Protect WooCommerce login',
					'protect_generic'             => 'Generic HTML forms',
					'active'                      => 'Active',
					'active_pro'                  => 'Active (Pro)',
					'active_contact'              => 'Active (Pro: Elementor / CF7 / WPForms)',
					'generic_help'                => 'For custom forms without CF7/WPForms/Elementor. Enter one CSS selector per line.',
					'generic_examples'            => 'Examples: form#contact, form.newsletter-form, form[action*="contact"]',
					'section_behavior'            => 'Behavior',
					'mode'                        => 'Mode',
					'mode_relaxed'                => 'Relaxed',
					'mode_balanced'               => 'Balanced',
					'mode_strict'                 => 'Strict',
					'auto_mode'                   => 'Auto mode',
					'auto_mode_help'              => 'Automatically adapt strictness based on attack pressure and system load',
					'mode_manual_note'            => 'Manual mode is active.',
					'mode_locked_auto'            => 'Mode is controlled by Auto mode.',
					'auto_recommendation'         => 'Recommendation',
					'auto_effective'              => 'Effective mode',
					'auto_target_difficulty'      => 'Target difficulty',
					'auto_blocked_24h'            => 'Blocked (24h)',
					'auto_block_rate'             => 'Block rate',
					'auto_system_load'            => 'System load',
					'challenge_max_age'           => 'Challenge max age (seconds)',
					'logging'                     => 'Logging',
					'stats_weekly_email'          => 'Weekly statistics email to administrator',
					'stats_weekly_email_help'     => 'Send every Monday at 08:00',
					'admin_email_reference'       => 'Administrator email',
					'admin_email_reference_help'  => 'Default: administrator email.',
					'progressive_login'           => 'Progressive login protection',
					'progressive_login_help'      => 'Only block after repeated violations',
					'secure_plus'                 => 'Secure+ Risk Scoring (Pro)',
					'secure_plus_help'            => 'Adaptive risk scoring: allow / hard challenge / block',
					'ip_tracking'                 => 'IP tracking (statistics)',
					'ip_tracking_help'            => 'Active (for world map view)',
					'trusted_ips'                 => 'Trusted IPs / CIDR (allowlist)',
					'trusted_ips_help'            => 'One IP or CIDR per line, e.g. 203.0.113.10 or 203.0.113.0/24',
					'ui_language'                 => 'Language (UI)',
					'ui_language_help'            => 'Top web languages: German, English, Spanish, Russian, French, Portuguese, Italian, Dutch, Polish, Turkish, Japanese, Chinese.',
					'save_changes'                => 'Save Changes',
				)
			),
			'es' => array_replace(
				$common,
				array(
					'subtitle'                          => 'Proteccion contra bots con proof-of-work local y sin servicios externos.',
					'section_protection'                => 'Areas de proteccion',
					'protect_login'                     => 'Proteger inicio de sesion',
					'protect_comments'                  => 'Proteger comentarios',
					'protect_contact'                   => 'Proteger formularios de contacto (Pro)',
					'protect_woo'                       => 'Proteger login de WooCommerce (Pro)',
					'protect_generic'                   => 'Formularios HTML genericos',
					'active'                            => 'Activo',
					'active_pro'                        => 'Activo (Pro)',
					'active_contact'                    => 'Activo (Pro: Elementor / CF7 / WPForms)',
					'generic_help'                      => 'Para formularios propios sin CF7/WPForms/Elementor. Una linea por selector CSS.',
					'generic_examples'                  => 'Ejemplos: form#contacto, form.newsletter-form, form[action*="contact"]',
					'section_behavior'                  => 'Comportamiento',
					'mode'                              => 'Modo',
					'mode_relaxed'                      => 'Relajado',
					'mode_balanced'                     => 'Equilibrado',
					'mode_strict'                       => 'Estricto',
					'section_difficulty'                => 'Dificultad',
					'section_security'                  => 'Seguridad y riesgo',
					'section_language'                  => 'Idioma',
					'auto_mode'                         => 'Modo automatico',
					'auto_mode_help'                    => 'Adaptar automaticamente la severidad segun la presion de ataques y la carga del sistema',
					'mode_manual_note'                  => 'El modo manual esta activo.',
					'mode_locked_auto'                  => 'El modo lo controla el modo automatico.',
					'auto_recommendation'               => 'Recomendacion',
					'auto_effective'                    => 'Modo efectivo',
					'auto_target_difficulty'            => 'Dificultad objetivo',
					'auto_blocked_24h'                  => 'Bloqueado (hoy)',
					'auto_block_rate'                   => 'Tasa de bloqueo',
					'auto_system_load'                  => 'Carga del sistema',
					'secure_plus'                       => 'Secure+ Puntuacion de riesgo (Pro)',
					'secure_plus_help'                  => 'Puntuación de riesgo adaptativa: permitir / desafío fuerte / bloquear',
					'secure_plus_pool_hint'             => 'El modo (dificultad) depende de los metodos Secure+ activos y puede activar largos tiempos de espera para bots JS/cabeceras sospechosos.',
					'secure_method_header_consistency'  => 'Comprobaciones de coherencia de cabeceras',
					'secure_method_headless_signature'  => 'Comprobaciones de firma Headless/Selenium',
					'secure_method_failure_burst'       => 'Escalado por rafaga de fallos',
					'secure_method_fast_submit'         => 'Heuristica de envio demasiado rapido',
					'secure_method_tarpit_timeout'      => 'Timeout tarpit en riesgo alto',
					'secure_method_header_consistency_desc' => 'Detecta cabeceras HTTP inusuales o contradictorias que suelen indicar clientes automatizados o falseados.',
					'secure_method_headless_signature_desc' => 'Marca huellas de automatizacion del navegador (por ejemplo Selenium, navegadores headless o toolchains de bots comunes).',
					'secure_method_failure_burst_desc'  => 'Eleva el riesgo rapidamente cuando ocurren muchos fallos en poco tiempo desde la misma fuente.',
					'secure_method_fast_submit_desc'    => 'Marca envios como sospechosos cuando un formulario se envia demasiado rapido para una interaccion humana normal.',
					'secure_method_tarpit_timeout_desc' => 'Aplica una demora o timeout deliberado a solicitudes de alto riesgo para frenar bots y reducir el volumen de ataque.',
					'challenge_max_age'                 => 'Edad maxima del challenge (segundos)',
					'logging'                           => 'Registro',
					'stats_weekly_email'                => 'Informe semanal de estadisticas por correo al administrador',
					'stats_weekly_email_help'           => 'Enviar cada lunes a las 08:00',
					'progressive_login'                 => 'Proteccion progresiva de login',
					'progressive_login_help'            => 'Bloquear solo tras infracciones repetidas',
					'ip_tracking'                       => 'Seguimiento de IP (estadisticas)',
					'ip_tracking_help'                  => 'Activo (para vista de mapa mundial)',
					'trusted_ips'                       => 'IPs confiables / CIDR (allowlist)',
					'trusted_ips_help'                  => 'Una IP o CIDR por linea, p. ej. 203.0.113.10 o 203.0.113.0/24',
					'ui_language'                       => 'Idioma (UI)',
					'ui_language_help'                  => 'Idiomas web principales: aleman, ingles, espanol, ruso, frances, portugues, italiano, neerlandes, polaco, turco, japones, chino.',
					'save_changes'                      => 'Guardar cambios',
				)
			),
			'ru' => array_replace(
				$common,
				array(
					'subtitle'                          => 'Zashchita ot botov s lokalnym proof-of-work bez vneshnih servisov.',
					'section_protection'                => 'Oblasti zashchity',
					'protect_login'                     => 'Zashchishchat vhod',
					'protect_comments'                  => 'Zashchishchat kommentarii',
					'protect_contact'                   => 'Zashchishchat kontaktnye formy (Pro)',
					'protect_woo'                       => 'Zashchishchat vhod WooCommerce (Pro)',
					'protect_generic'                   => 'Obshchie HTML formy',
					'active'                            => 'Aktivno',
					'active_pro'                        => 'Aktivno (Pro)',
					'active_contact'                    => 'Aktivno (Pro: Elementor / CF7 / WPForms)',
					'generic_help'                      => 'Dlya sobstvennyh form bez CF7/WPForms/Elementor. Odin CSS selektor v stroke.',
					'generic_examples'                  => 'Primery: form#kontakt, form.newsletter-form, form[action*="contact"]',
					'section_behavior'                  => 'Povedenie',
					'mode'                              => 'Rezhim',
					'mode_relaxed'                      => 'Myagkiy',
					'mode_balanced'                     => 'Sbalansirovannyy',
					'mode_strict'                       => 'Strogiy',
					'section_difficulty'                => 'Slozhnost',
					'section_security'                  => 'Bezopasnost i risk',
					'section_language'                  => 'Yazyk',
					'auto_mode'                         => 'Avto rezhim',
					'auto_mode_help'                    => 'Avtomaticheski menyaet strogost po nagruzke sistemy i davleniyu atak',
					'mode_manual_note'                  => 'Aktiven ruchnoy rezhim.',
					'mode_locked_auto'                  => 'Rezhim upravlyaetsya avto rezhimom.',
					'auto_recommendation'               => 'Rekomendatsiya',
					'auto_effective'                    => 'Fakticheskiy rezhim',
					'auto_target_difficulty'            => 'Tselevaya slozhnost',
					'auto_blocked_24h'                  => 'Zablokirovano (segodnya)',
					'auto_block_rate'                   => 'Protsent blokirovki',
					'auto_system_load'                  => 'Nagruzka sistemy',
					'secure_plus'                       => 'Secure+ Otsenka riska (Pro)',
					'secure_plus_help'                  => 'Adaptivnaya otsenka riska: razreshit / usilennaya proverka / blokirovat',
					'secure_plus_pool_hint'             => 'Rezhim (slozhnost) zavisit ot vklyuchennyh metodov Secure+ i mozhet vklyuchat dlinnye tarpit-zaderzhki dlya podozritelnyh JS/header botov.',
					'secure_method_header_consistency'  => 'Proverki soglasovannosti zagolovkov',
					'secure_method_headless_signature'  => 'Proverki signatur Headless/Selenium',
					'secure_method_failure_burst'       => 'Eskalatsiya pri serii oshibok',
					'secure_method_fast_submit'         => 'Evristika slishkom bystroy otpravki',
					'secure_method_tarpit_timeout'      => 'Tarpit-timeout pri vysokom riske',
					'secure_method_header_consistency_desc' => 'Obnaruzhivaet neobychnye ili protivorechivye HTTP-zagolovki, kotorye chasto ukazyvayut na skripty ili poddelannye klienty.',
					'secure_method_headless_signature_desc' => 'Vyjavlyaet otpechatki avtomatizatsii brauzera (naprimer Selenium, headless-brauzery ili tipichnye bot-instrumenty).',
					'secure_method_failure_burst_desc'  => 'Bystro povyshaet risk, kogda ot odnogo istochnika za korotkoe vremya idet mnogo neudachnyh proverok.',
					'secure_method_fast_submit_desc'    => 'Pometchaet otpravki kak podozritelnye, esli forma otpravlena slishkom bystro dlya obychnogo cheloveka.',
					'secure_method_tarpit_timeout_desc' => 'Primenyaet prednamerennuyu zaderzhku ili timeout dlya vysokogo riska, chtoby zamedlit botov i snizit intensivnost atak.',
					'challenge_max_age'                 => 'Maksimalnyy vozrast challenge (sekundy)',
					'logging'                           => 'Logirovanie',
					'stats_weekly_email'                => 'Ezhenedelnyy statisticheskiy otchet na e-mail administratora',
					'stats_weekly_email_help'           => 'Otpravka kazhdyy ponedelnik v 08:00',
					'progressive_login'                 => 'Progressivnaya zashchita vhoda',
					'progressive_login_help'            => 'Blokirovat tolko posle povtornyh narusheniy',
					'ip_tracking'                       => 'Otslezhivanie IP (statistika)',
					'ip_tracking_help'                  => 'Aktivno (dlya karty mira)',
					'trusted_ips'                       => 'Doverennye IP / CIDR (allowlist)',
					'trusted_ips_help'                  => 'Odin IP ili CIDR v stroke, napr. 203.0.113.10 ili 203.0.113.0/24',
					'ui_language'                       => 'Yazyk (UI)',
					'ui_language_help'                  => 'Osnovnye web-yazyki: nemetskiy, angliyskiy, ispanskiy, russkiy, frantsuzskiy, portugalskiy, italyanskiy, niderlandskiy, polskiy, turetskiy, yaponskiy, kitayskiy.',
					'save_changes'                      => 'Sohranit izmeneniya',
				)
			),
			'fr' => array_replace(
				$common,
				array(
					'subtitle'                          => 'Protection anti-bot avec proof-of-work local sans services externes.',
					'section_protection'                => 'Zones de protection',
					'protect_login'                     => 'Proteger la connexion',
					'protect_comments'                  => 'Proteger les commentaires',
					'protect_contact'                   => 'Proteger les formulaires de contact (Pro)',
					'protect_woo'                       => 'Proteger la connexion WooCommerce (Pro)',
					'protect_generic'                   => 'Formulaires HTML generiques',
					'active'                            => 'Actif',
					'active_pro'                        => 'Actif (Pro)',
					'active_contact'                    => 'Actif (Pro: Elementor / CF7 / WPForms)',
					'generic_help'                      => 'Pour formulaires personnalises sans CF7/WPForms/Elementor. Un selecteur CSS par ligne.',
					'generic_examples'                  => 'Exemples : form#contact, form.newsletter-form, form[action*="contact"]',
					'section_behavior'                  => 'Comportement',
					'mode'                              => 'Mode',
					'mode_relaxed'                      => 'Detendu',
					'mode_balanced'                     => 'Equilibre',
					'mode_strict'                       => 'Strict',
					'section_difficulty'                => 'Difficulte',
					'section_security'                  => 'Securite et risque',
					'section_language'                  => 'Langue',
					'auto_mode'                         => 'Mode auto',
					'auto_mode_help'                    => 'Adapter automatiquement la rigueur selon la pression d attaque et la charge du systeme',
					'mode_manual_note'                  => 'Le mode manuel est actif.',
					'mode_locked_auto'                  => 'Le mode est controle par le mode auto.',
					'auto_recommendation'               => 'Recommandation',
					'auto_effective'                    => 'Mode effectif',
					'auto_target_difficulty'            => 'Difficulte cible',
					'auto_blocked_24h'                  => 'Bloque (aujourd hui)',
					'auto_block_rate'                   => 'Taux de blocage',
					'auto_system_load'                  => 'Charge systeme',
					'secure_plus'                       => 'Secure+ Scoring de risque (Pro)',
					'secure_plus_help'                  => 'Scoring de risque adaptatif : autoriser / challenge fort / bloquer',
					'secure_plus_pool_hint'             => 'Le mode (difficulte) depend des methodes Secure+ actives et peut declencher de longues temporisations pour les bots JS/en-tetes suspects.',
					'secure_method_header_consistency'  => 'Verifications de coherence des en-tetes',
					'secure_method_headless_signature'  => 'Verifications de signature Headless/Selenium',
					'secure_method_failure_burst'       => 'Escalade sur rafale d echecs',
					'secure_method_fast_submit'         => 'Heuristique d envoi trop rapide',
					'secure_method_tarpit_timeout'      => 'Timeout tarpit en cas de risque eleve',
					'secure_method_header_consistency_desc' => 'Detecte des en-tetes HTTP inhabituels ou contradictoires, souvent signes de clients scripts ou usurpes.',
					'secure_method_headless_signature_desc' => 'Repere des empreintes d automatisation navigateur (par ex. Selenium, navigateurs headless ou outils bots courants).',
					'secure_method_failure_burst_desc'  => 'Augmente rapidement le risque quand de nombreux echecs surviennent en peu de temps depuis la meme source.',
					'secure_method_fast_submit_desc'    => 'Marque les soumissions comme suspectes si un formulaire est envoye trop vite pour un comportement humain normal.',
					'secure_method_tarpit_timeout_desc' => 'Applique un delai/timeout volontaire aux requetes a haut risque pour ralentir les bots et reduire le debit d attaque.',
					'challenge_max_age'                 => 'Age max du challenge (secondes)',
					'logging'                           => 'Journalisation',
					'stats_weekly_email'                => 'Rapport statistique hebdomadaire par e-mail a ladministrateur',
					'stats_weekly_email_help'           => 'Envoyer chaque lundi a 08:00',
					'progressive_login'                 => 'Protection de connexion progressive',
					'progressive_login_help'            => 'Bloquer seulement apres plusieurs infractions',
					'ip_tracking'                       => 'Suivi IP (statistiques)',
					'ip_tracking_help'                  => 'Actif (pour la vue carte du monde)',
					'trusted_ips'                       => 'IPs de confiance / CIDR (allowlist)',
					'trusted_ips_help'                  => 'Une IP ou CIDR par ligne, ex. 203.0.113.10 ou 203.0.113.0/24',
					'ui_language'                       => 'Langue (UI)',
					'ui_language_help'                  => 'Principales langues web : allemand, anglais, espagnol, russe, francais, portugais, italien, neerlandais, polonais, turc, japonais, chinois.',
					'save_changes'                      => 'Enregistrer les modifications',
				)
			),
			'it' => array_replace(
				$common,
				array(
					'subtitle'                          => 'Protezione bot con proof-of-work locale senza servizi esterni.',
					'section_protection'                => 'Aree di protezione',
					'protect_login'                     => 'Proteggi login',
					'protect_comments'                  => 'Proteggi commenti',
					'protect_contact'                   => 'Proteggi moduli di contatto (Pro)',
					'protect_woo'                       => 'Proteggi login WooCommerce (Pro)',
					'protect_generic'                   => 'Moduli HTML generici',
					'active'                            => 'Attivo',
					'active_pro'                        => 'Attivo (Pro)',
					'active_contact'                    => 'Attivo (Pro: Elementor / CF7 / WPForms)',
					'generic_help'                      => 'Per moduli personalizzati senza CF7/WPForms/Elementor. Un selettore CSS per riga.',
					'generic_examples'                  => 'Esempi: form#contact, form.newsletter-form, form[action*="contact"]',
					'section_behavior'                  => 'Comportamento',
					'mode'                              => 'Modalita',
					'mode_relaxed'                      => 'Rilassata',
					'mode_balanced'                     => 'Bilanciata',
					'mode_strict'                       => 'Rigida',
					'section_difficulty'                => 'Difficolta',
					'section_security'                  => 'Sicurezza e rischio',
					'section_language'                  => 'Lingua',
					'auto_mode'                         => 'Modalita automatica',
					'auto_mode_help'                    => 'Adatta automaticamente la severita in base agli attacchi e al carico sistema',
					'mode_manual_note'                  => 'La modalita manuale e attiva.',
					'mode_locked_auto'                  => 'La modalita e controllata dalla modalita automatica.',
					'auto_recommendation'               => 'Raccomandazione',
					'auto_effective'                    => 'Modalita effettiva',
					'auto_target_difficulty'            => 'Difficolta obiettivo',
					'auto_blocked_24h'                  => 'Bloccato (24h)',
					'auto_block_rate'                   => 'Tasso di blocco',
					'auto_system_load'                  => 'Carico sistema',
					'secure_plus'                       => 'Secure+ Punteggio rischio (Pro)',
					'secure_plus_help'                  => 'Punteggio rischio adattivo: consenti / challenge dura / blocca',
					'secure_plus_pool_hint'             => 'La modalita (difficolta) dipende dai metodi Secure+ attivi e puo attivare timeout tarpit lunghi per bot JS/header sospetti.',
					'secure_method_header_consistency'  => 'Controllo coerenza header',
					'secure_method_headless_signature'  => 'Controllo firma Headless/Selenium',
					'secure_method_failure_burst'       => 'Escalation raffica errori',
					'secure_method_fast_submit'         => 'Euristica invio troppo rapido',
					'secure_method_tarpit_timeout'      => 'Timeout tarpit ad alto rischio',
					'secure_method_header_consistency_desc' => 'Rileva header HTTP insoliti o contraddittori tipici di client scriptati o spoofati.',
					'secure_method_headless_signature_desc' => 'Individua impronte di automazione browser (ad es. Selenium, browser headless o toolchain bot comuni).',
					'secure_method_failure_burst_desc'  => 'Aumenta rapidamente il rischio quando dalla stessa fonte arrivano molti controlli falliti in poco tempo.',
					'secure_method_fast_submit_desc'    => 'Segna gli invii come sospetti quando un modulo viene inviato troppo velocemente per un uso umano normale.',
					'secure_method_tarpit_timeout_desc' => 'Applica ritardo/timeout deliberato a richieste ad alto rischio per rallentare i bot e ridurre il volume di attacco.',
					'challenge_max_age'                 => 'Eta massima challenge (secondi)',
					'logging'                           => 'Log',
					'stats_weekly_email'                => 'Report statistico settimanale via e-mail allamministratore',
					'stats_weekly_email_help'           => 'Invia ogni lunedi alle 08:00',
					'progressive_login'                 => 'Protezione login progressiva',
					'progressive_login_help'            => 'Blocca solo dopo violazioni ripetute',
					'ip_tracking'                       => 'Tracciamento IP (statistiche)',
					'ip_tracking_help'                  => 'Attivo (per mappa mondo)',
					'trusted_ips'                       => 'IP attendibili / CIDR (allowlist)',
					'trusted_ips_help'                  => 'Un IP o CIDR per riga, es. 203.0.113.10 o 203.0.113.0/24',
					'ui_language'                       => 'Lingua (UI)',
					'ui_language_help'                  => 'Lingue principali: tedesco, inglese, spagnolo, russo, francese, portoghese, italiano, olandese, polacco, turco, giapponese, cinese.',
					'save_changes'                      => 'Salva modifiche',
				)
			),
			'nl' => array_replace(
				$common,
				array(
					'subtitle'                          => 'Botbescherming met lokale proof-of-work zonder externe diensten.',
					'section_protection'                => 'Beschermingsgebieden',
					'protect_login'                     => 'Login beschermen',
					'protect_comments'                  => 'Reacties beschermen',
					'protect_contact'                   => 'Contactformulieren beschermen (Pro)',
					'protect_woo'                       => 'WooCommerce-login beschermen (Pro)',
					'protect_generic'                   => 'Generieke HTML-formulieren',
					'active'                            => 'Actief',
					'active_pro'                        => 'Actief (Pro)',
					'active_contact'                    => 'Actief (Pro: Elementor / CF7 / WPForms)',
					'generic_help'                      => 'Voor eigen formulieren zonder CF7/WPForms/Elementor. Een CSS-selector per regel.',
					'generic_examples'                  => 'Voorbeelden: form#contact, form.newsletter-form, form[action*="contact"]',
					'section_behavior'                  => 'Gedrag',
					'mode'                              => 'Modus',
					'mode_relaxed'                      => 'Ontspannen',
					'mode_balanced'                     => 'Gebalanceerd',
					'mode_strict'                       => 'Strikt',
					'section_difficulty'                => 'Moeilijkheid',
					'section_security'                  => 'Beveiliging en risico',
					'section_language'                  => 'Taal',
					'auto_mode'                         => 'Automatische modus',
					'auto_mode_help'                    => 'Past strengheid automatisch aan op basis van aanvalsdruk en systeembelasting',
					'mode_manual_note'                  => 'Handmatige modus is actief.',
					'mode_locked_auto'                  => 'Modus wordt door automatische modus beheerd.',
					'auto_recommendation'               => 'Aanbeveling',
					'auto_effective'                    => 'Effectieve modus',
					'auto_target_difficulty'            => 'Doelmoeilijkheid',
					'auto_blocked_24h'                  => 'Geblokkeerd (24u)',
					'auto_block_rate'                   => 'Blokkeringspercentage',
					'auto_system_load'                  => 'Systeembelasting',
					'secure_plus'                       => 'Secure+ Risicoscore (Pro)',
					'secure_plus_help'                  => 'Adaptieve risicoscore: toestaan / zware challenge / blokkeren',
					'secure_plus_pool_hint'             => 'De modus (moeilijkheid) is gekoppeld aan de actieve Secure+-methoden en kan lange tarpit-timeouts activeren voor verdachte JS/header-bots.',
					'secure_method_header_consistency'  => 'Header-consistentiecontrole',
					'secure_method_headless_signature'  => 'Headless/Selenium-signatuurcontrole',
					'secure_method_failure_burst'       => 'Escalatie bij foutpiek',
					'secure_method_fast_submit'         => 'Heuristiek voor te snelle verzending',
					'secure_method_tarpit_timeout'      => 'Tarpit-timeout bij hoog risico',
					'secure_method_header_consistency_desc' => 'Detecteert ongewone of tegenstrijdige request-headers die vaak op gescripte of gespoofte clients wijzen.',
					'secure_method_headless_signature_desc' => 'Herkent browser-automatiseringsvingerafdrukken (bijv. Selenium, headless browsers of bekende bot-toolchains).',
					'secure_method_failure_burst_desc'  => 'Verhoogt het risico snel wanneer in korte tijd veel controles vanaf dezelfde bron mislukken.',
					'secure_method_fast_submit_desc'    => 'Markeert inzendingen als verdacht wanneer formulieren onnatuurlijk snel worden verstuurd.',
					'secure_method_tarpit_timeout_desc' => 'Past opzettelijke vertraging/timeout toe op hoog-risico verzoeken om bots af te remmen en aanvalsthroughput te verlagen.',
					'challenge_max_age'                 => 'Maximale challenge-leeftijd (seconden)',
					'logging'                           => 'Logging',
					'stats_weekly_email'                => 'Wekelijks statistiekrapport per e-mail naar de beheerder',
					'stats_weekly_email_help'           => 'Verzenden elke maandag om 08:00',
					'progressive_login'                 => 'Progressieve loginbescherming',
					'progressive_login_help'            => 'Pas blokkeren na herhaalde overtredingen',
					'ip_tracking'                       => 'IP-tracking (statistieken)',
					'ip_tracking_help'                  => 'Actief (voor wereldkaart)',
					'trusted_ips'                       => 'Vertrouwde IPs / CIDR (allowlist)',
					'trusted_ips_help'                  => 'Een IP of CIDR per regel, bijv. 203.0.113.10 of 203.0.113.0/24',
					'ui_language'                       => 'Taal (UI)',
					'ui_language_help'                  => 'Belangrijkste talen: Duits, Engels, Spaans, Russisch, Frans, Portugees, Italiaans, Nederlands, Pools, Turks, Japans, Chinees.',
					'save_changes'                      => 'Wijzigingen opslaan',
				)
			),
			'pl' => array_replace(
				$common,
				array(
					'subtitle'                          => 'Ochrona przed botami z lokalnym proof-of-work bez uslug zewnetrznych.',
					'section_protection'                => 'Obszary ochrony',
					'protect_login'                     => 'Chron login',
					'protect_comments'                  => 'Chron komentarze',
					'protect_contact'                   => 'Chron formularze kontaktowe (Pro)',
					'protect_woo'                       => 'Chron logowanie WooCommerce (Pro)',
					'protect_generic'                   => 'Generyczne formularze HTML',
					'active'                            => 'Aktywne',
					'active_pro'                        => 'Aktywne (Pro)',
					'active_contact'                    => 'Aktywne (Pro: Elementor / CF7 / WPForms)',
					'generic_help'                      => 'Dla wlasnych formularzy bez CF7/WPForms/Elementor. Jeden selektor CSS na linie.',
					'generic_examples'                  => 'Przyklady: form#contact, form.newsletter-form, form[action*="contact"]',
					'section_behavior'                  => 'Zachowanie',
					'mode'                              => 'Tryb',
					'mode_relaxed'                      => 'Lagodny',
					'mode_balanced'                     => 'Zrownowazony',
					'mode_strict'                       => 'Surowy',
					'section_difficulty'                => 'Trudnosc',
					'section_security'                  => 'Bezpieczenstwo i ryzyko',
					'section_language'                  => 'Jezyk',
					'auto_mode'                         => 'Tryb automatyczny',
					'auto_mode_help'                    => 'Automatycznie dostosowuje surowosc do presji atakow i obciazenia systemu',
					'mode_manual_note'                  => 'Tryb reczny jest aktywny.',
					'mode_locked_auto'                  => 'Tryb jest sterowany przez tryb automatyczny.',
					'auto_recommendation'               => 'Rekomendacja',
					'auto_effective'                    => 'Tryb efektywny',
					'auto_target_difficulty'            => 'Docelowa trudnosc',
					'auto_blocked_24h'                  => 'Zablokowane (24h)',
					'auto_block_rate'                   => 'Wskaznik blokad',
					'auto_system_load'                  => 'Obciazenie systemu',
					'secure_plus'                       => 'Secure+ Ocena ryzyka (Pro)',
					'secure_plus_help'                  => 'Adaptacyjna ocena ryzyka: zezwol / twarda challenge / blokuj',
					'secure_plus_pool_hint'             => 'Tryb (trudnosc) jest powiazany z aktywnymi metodami Secure+ i moze uruchamiac dlugie timeouty tarpit dla podejrzanych botow JS/header.',
					'secure_method_header_consistency'  => 'Kontrola spojnosci naglowkow',
					'secure_method_headless_signature'  => 'Kontrola sygnatury Headless/Selenium',
					'secure_method_failure_burst'       => 'Eskalacja przy nagromadzeniu bledow',
					'secure_method_fast_submit'         => 'Heurystyka zbyt szybkiej wysylki',
					'secure_method_tarpit_timeout'      => 'Timeout tarpit przy wysokim ryzyku',
					'secure_method_header_consistency_desc' => 'Wykrywa nietypowe lub sprzeczne naglowki HTTP, czesto wskazujace na skryptowe lub spoofowane klienty.',
					'secure_method_headless_signature_desc' => 'Rozpoznaje odciski automatyzacji przegladarki (np. Selenium, przegladarki headless lub znane narzedzia botow).',
					'secure_method_failure_burst_desc'  => 'Szybko podnosi ryzyko, gdy z tego samego zrodla pojawia sie wiele nieudanych kontroli w krotkim czasie.',
					'secure_method_fast_submit_desc'    => 'Oznacza wysylki jako podejrzane, gdy formularz jest wyslany nienaturalnie szybko.',
					'secure_method_tarpit_timeout_desc' => 'Stosuje celowe opoznienie/timeout dla zapytan wysokiego ryzyka, aby spowolnic boty i zmniejszyc przepustowosc ataku.',
					'challenge_max_age'                 => 'Maksymalny wiek challenge (sekundy)',
					'logging'                           => 'Logowanie',
					'stats_weekly_email'                => 'Cotygodniowy raport statystyk e-mailem do administratora',
					'stats_weekly_email_help'           => 'Wysylka w kazdy poniedzialek o 08:00',
					'progressive_login'                 => 'Progresywna ochrona logowania',
					'progressive_login_help'            => 'Blokuj dopiero po wielokrotnych naruszeniach',
					'ip_tracking'                       => 'Sledzenie IP (statystyki)',
					'ip_tracking_help'                  => 'Aktywne (dla mapy swiata)',
					'trusted_ips'                       => 'Zaufane IP / CIDR (allowlist)',
					'trusted_ips_help'                  => 'Jedno IP lub CIDR na linie, np. 203.0.113.10 lub 203.0.113.0/24',
					'ui_language'                       => 'Jezyk (UI)',
					'ui_language_help'                  => 'Najwazniejsze jezyki: niemiecki, angielski, hiszpanski, rosyjski, francuski, portugalski, wloski, holenderski, polski, turecki, japonski, chinski.',
					'save_changes'                      => 'Zapisz zmiany',
				)
			),
			'tr' => array_replace(
				$common,
				array(
					'subtitle'                          => 'Harici servis olmadan yerel proof-of-work ile bot korumasi.',
					'section_protection'                => 'Koruma alanlari',
					'protect_login'                     => 'Girisi koru',
					'protect_comments'                  => 'Yorumlari koru',
					'protect_contact'                   => 'Iletisim formlarini koru (Pro)',
					'protect_woo'                       => 'WooCommerce girisini koru (Pro)',
					'protect_generic'                   => 'Genel HTML formlari',
					'active'                            => 'Aktif',
					'active_pro'                        => 'Aktif (Pro)',
					'active_contact'                    => 'Aktif (Pro: Elementor / CF7 / WPForms)',
					'generic_help'                      => 'CF7/WPForms/Elementor olmadan ozel formlar icin. Her satira bir CSS secici girin.',
					'generic_examples'                  => 'Ornekler: form#contact, form.newsletter-form, form[action*="contact"]',
					'section_behavior'                  => 'Davranis',
					'mode'                              => 'Mod',
					'mode_relaxed'                      => 'Rahat',
					'mode_balanced'                     => 'Dengeli',
					'mode_strict'                       => 'Siki',
					'section_difficulty'                => 'Zorluk',
					'section_security'                  => 'Guvenlik ve risk',
					'section_language'                  => 'Dil',
					'auto_mode'                         => 'Otomatik mod',
					'auto_mode_help'                    => 'Saldiri yogunlugu ve sistem yukune gore sertligi otomatik ayarlar',
					'mode_manual_note'                  => 'Manuel mod aktif.',
					'mode_locked_auto'                  => 'Mod otomatik mod tarafindan yonetiliyor.',
					'auto_recommendation'               => 'Oneri',
					'auto_effective'                    => 'Etkin mod',
					'auto_target_difficulty'            => 'Hedef zorluk',
					'auto_blocked_24h'                  => 'Engellenen (24s)',
					'auto_block_rate'                   => 'Engelleme orani',
					'auto_system_load'                  => 'Sistem yuku',
					'secure_plus'                       => 'Secure+ Risk puanlamasi (Pro)',
					'secure_plus_help'                  => 'Uyarlanabilir risk puanlamasi: izin ver / sert challenge / engelle',
					'secure_plus_pool_hint'             => 'Mod (zorluk), etkin Secure+ yontemlerine baglidir ve supheli JS/header botlari icin uzun tarpit zaman asimlari tetikleyebilir.',
					'secure_method_header_consistency'  => 'Header tutarlilik kontrolu',
					'secure_method_headless_signature'  => 'Headless/Selenium imza kontrolu',
					'secure_method_failure_burst'       => 'Hata patlamasi eskalasyonu',
					'secure_method_fast_submit'         => 'Asiri hizli gonderim sezgiseli',
					'secure_method_tarpit_timeout'      => 'Yuksek riskte tarpit timeout',
					'secure_method_header_consistency_desc' => 'Scriptli veya spoof edilmis istemcilere isaret eden olagandisi/celiski request headerlarini tespit eder.',
					'secure_method_headless_signature_desc' => 'Tarayici otomasyonu parmak izlerini algilar (ornegin Selenium, headless tarayicilar veya yaygin bot araclari).',
					'secure_method_failure_burst_desc'  => 'Ayni kaynaktan kisa surede cok sayida kontrol hatasi olursa riski hizla yukselttir.',
					'secure_method_fast_submit_desc'    => 'Formlar insan etkilesimine gore gercek disi hizda gonderildiginde bunlari supheli olarak isaretler.',
					'secure_method_tarpit_timeout_desc' => 'Botlari yavaslatmak ve saldiri hacmini dusurmek icin yuksek riskli isteklerde bilincli gecikme/timeout uygular.',
					'challenge_max_age'                 => 'Maksimum challenge suresi (saniye)',
					'logging'                           => 'Gunlukleme',
					'stats_weekly_email'                => 'Haftalik istatistik raporunu yoneticiye e-posta ile gonder',
					'stats_weekly_email_help'           => 'Her pazartesi 08:00de gonder',
					'progressive_login'                 => 'Asamali giris korumasi',
					'progressive_login_help'            => 'Sadece tekrarli ihlallerden sonra engelle',
					'ip_tracking'                       => 'IP izleme (istatistik)',
					'ip_tracking_help'                  => 'Aktif (dunya haritasi icin)',
					'trusted_ips'                       => 'Guvenilen IPler / CIDR (allowlist)',
					'trusted_ips_help'                  => 'Her satira bir IP veya CIDR, or. 203.0.113.10 veya 203.0.113.0/24',
					'ui_language'                       => 'Dil (UI)',
					'ui_language_help'                  => 'Baslica diller: Almanca, Ingilizce, Ispanyolca, Rusca, Fransizca, Portekizce, Italyanca, Hollandaca, Lehce, Turkce, Japonca, Cince.',
					'save_changes'                      => 'Degisiklikleri kaydet',
				)
			),
			'ja' => array_replace(
				$common,
				array(
					'subtitle'                          => 'Gaibu sa-bisu nashi no ro-karu proof-of-work bot taisaku.',
					'section_protection'                => 'Hogo eria',
					'protect_login'                     => 'Rogin o hogo',
					'protect_comments'                  => 'Komento o hogo',
					'protect_contact'                   => 'Kontakuto fo-mu o hogo (Pro)',
					'protect_woo'                       => 'WooCommerce rogin o hogo (Pro)',
					'protect_generic'                   => 'Pan-you HTML fo-mu',
					'active'                            => 'Yuko',
					'active_pro'                        => 'Yuko (Pro)',
					'active_contact'                    => 'Yuko (Pro: Elementor / CF7 / WPForms)',
					'generic_help'                      => 'CF7/WPForms/Elementor igai no dokujifo-mu muke. CSS selekuta o 1 gyou zutsu nyuryoku.',
					'generic_examples'                  => 'Rei: form#contact, form.newsletter-form, form[action*="contact"]',
					'section_behavior'                  => 'Dousa',
					'mode'                              => 'Mo-do',
					'mode_relaxed'                      => 'Yurui',
					'mode_balanced'                     => 'Baransu',
					'mode_strict'                       => 'Kibishii',
					'section_difficulty'                => 'Nando',
					'section_security'                  => 'Securiti to risuku',
					'section_language'                  => 'Gengo',
					'auto_mode'                         => 'Jidou mo-do',
					'auto_mode_help'                    => 'Kougeki atsuryoku to shisutemu fuka ni oujite kibishisa o jidou chousei',
					'mode_manual_note'                  => 'Shudou mo-do ga yuukou desu.',
					'mode_locked_auto'                  => 'Mo-do wa jidou mo-do ni yotte seigyo saremasu.',
					'auto_recommendation'               => 'Suisho',
					'auto_effective'                    => 'Jissai no mo-do',
					'auto_target_difficulty'            => 'Mokuhyou nando',
					'auto_blocked_24h'                  => 'Burokku (kyou)',
					'auto_block_rate'                   => 'Burokku ritsu',
					'auto_system_load'                  => 'Shisutemu fuka',
					'secure_plus'                       => 'Secure+ Risuku sukoa (Pro)',
					'secure_plus_help'                  => 'Tekiou-gata risuku sukoa: kyoka / kyoka challenge / burokku',
					'secure_plus_pool_hint'             => 'Mo-do (nando) wa yuukou na Secure+ houhou ni shibarakare, ayashii JS/header bot ni taishite nagai taapitto taimauto o hikiokosu koto ga arimasu.',
					'secure_method_header_consistency'  => 'Header seigousei chekku',
					'secure_method_headless_signature'  => 'Headless/Selenium shomei chekku',
					'secure_method_failure_burst'       => 'Shippai rasshu no esukare-shon',
					'secure_method_fast_submit'         => 'Sokosugi soushin no hyuurisutikku',
					'secure_method_tarpit_timeout'      => 'Kou-risuku ji no tarpit taimauto',
					'secure_method_header_consistency_desc' => 'Sukuriputo ya gisou kliento ni yoku mirareru, fushizen matawa mujunteki na HTTP header o kenshutsu shimasu.',
					'secure_method_headless_signature_desc' => 'Selenium ya headless browser nado no browser jidouka no fingerprint o kentchi shimasu.',
					'secure_method_failure_burst_desc'  => 'Onaji source kara tanki jikan ni shippai ga shuuchuu suru to risuku o kyusoku ni hikiagemasu.',
					'secure_method_fast_submit_desc'    => 'Ningen no sosa toshite wa hayasugiru soushin timing no baai, soushin o utagawashii to handan shimasu.',
					'secure_method_tarpit_timeout_desc' => 'Kou-risuku request ni wazato chien/timeout o kake, bot no sokudo to kougeki ryou o osaemasu.',
					'challenge_max_age'                 => 'Challenge saidai nenrei (byou)',
					'logging'                           => 'Rogu',
					'stats_weekly_email'                => 'Shuukan toukei repoto o kanrisha e me-ru de soushin',
					'stats_weekly_email_help'           => 'Mai shuuyoubi 08:00 ni soushin',
					'progressive_login'                 => 'Dankaiteki rogin hogo',
					'progressive_login_help'            => 'Kurikaeshi ihan-go ni burokku',
					'ip_tracking'                       => 'IP torakkingu (toukei)',
					'ip_tracking_help'                  => 'Yuko (sekai chizu hyouji)',
					'trusted_ips'                       => 'Shinrai IP / CIDR (allowlist)',
					'trusted_ips_help'                  => '1 gyou ni 1 IP matawa CIDR. rei: 203.0.113.10 matawa 203.0.113.0/24',
					'ui_language'                       => 'Gengo (UI)',
					'ui_language_help'                  => 'Shuyou web gengo: doitsugo, eigo, supeingo, roshiago, furansugo, porutogarugo, itariago, orandago, porandogo, torukogo, nihongo, chuugokugo.',
					'save_changes'                      => 'Henkou o hozon',
				)
			),
			'pt' => array_replace(
				$common,
				array(
					'subtitle'                          => 'Protecao contra bots com proof-of-work local e sem servicos externos.',
					'section_protection'                => 'Areas de protecao',
					'protect_login'                     => 'Proteger login',
					'protect_comments'                  => 'Proteger comentarios',
					'protect_contact'                   => 'Proteger formularios de contato (Pro)',
					'protect_woo'                       => 'Proteger login do WooCommerce (Pro)',
					'protect_generic'                   => 'Formularios HTML genericos',
					'active'                            => 'Ativo',
					'active_pro'                        => 'Ativo (Pro)',
					'active_contact'                    => 'Ativo (Pro: Elementor / CF7 / WPForms)',
					'generic_help'                      => 'Para formularios proprios sem CF7/WPForms/Elementor. Um seletor CSS por linha.',
					'generic_examples'                  => 'Exemplos: form#contato, form.newsletter-form, form[action*="contact"]',
					'section_behavior'                  => 'Comportamento',
					'mode'                              => 'Modo',
					'mode_relaxed'                      => 'Leve',
					'mode_balanced'                     => 'Balanceado',
					'mode_strict'                       => 'Estrito',
					'section_difficulty'                => 'Dificuldade',
					'section_security'                  => 'Seguranca e risco',
					'section_language'                  => 'Idioma',
					'auto_mode'                         => 'Modo automatico',
					'auto_mode_help'                    => 'Ajusta automaticamente a rigidez com base na pressao de ataques e na carga do sistema',
					'mode_manual_note'                  => 'O modo manual esta ativo.',
					'mode_locked_auto'                  => 'O modo e controlado pelo modo automatico.',
					'auto_recommendation'               => 'Recomendacao',
					'auto_effective'                    => 'Modo efetivo',
					'auto_target_difficulty'            => 'Dificuldade alvo',
					'auto_blocked_24h'                  => 'Bloqueado (hoje)',
					'auto_block_rate'                   => 'Taxa de bloqueio',
					'auto_system_load'                  => 'Carga do sistema',
					'secure_plus'                       => 'Secure+ Pontuacao de risco (Pro)',
					'secure_plus_help'                  => 'Pontuacao de risco adaptativa: permitir / desafio forte / bloquear',
					'secure_plus_pool_hint'             => 'O modo (dificuldade) depende dos metodos Secure+ ativos e pode acionar longos timeouts tarpit para bots JS/cabecalhos suspeitos.',
					'secure_method_header_consistency'  => 'Verificacoes de consistencia de cabecalhos',
					'secure_method_headless_signature'  => 'Verificacoes de assinatura Headless/Selenium',
					'secure_method_failure_burst'       => 'Escalonamento por rajada de falhas',
					'secure_method_fast_submit'         => 'Heuristica de envio rapido',
					'secure_method_tarpit_timeout'      => 'Timeout tarpit em alto risco',
					'secure_method_header_consistency_desc' => 'Detecta cabecalhos HTTP incomuns ou contraditorios que costumam indicar clientes automatizados ou forjados.',
					'secure_method_headless_signature_desc' => 'Sinaliza impressoes de automacao de navegador (por exemplo Selenium, navegadores headless ou ferramentas comuns de bot).',
					'secure_method_failure_burst_desc'  => 'Aumenta rapidamente o risco quando muitas verificacoes falham em pouco tempo a partir da mesma origem.',
					'secure_method_fast_submit_desc'    => 'Marca envios como suspeitos quando um formulario e enviado rapido demais para uma interacao humana normal.',
					'secure_method_tarpit_timeout_desc' => 'Aplica atraso/timeout deliberado a requisicoes de alto risco para desacelerar bots e reduzir o volume de ataque.',
					'challenge_max_age'                 => 'Idade maxima do challenge (segundos)',
					'logging'                           => 'Log',
					'stats_weekly_email'                => 'Enviar relatorio semanal de estatisticas por e-mail ao administrador',
					'stats_weekly_email_help'           => 'Enviar toda segunda-feira as 08:00',
					'progressive_login'                 => 'Protecao progressiva de login',
					'progressive_login_help'            => 'Bloquear apenas apos violacoes repetidas',
					'ip_tracking'                       => 'Rastreamento de IP (estatisticas)',
					'ip_tracking_help'                  => 'Ativo (para visualizacao do mapa mundial)',
					'trusted_ips'                       => 'IPs confiaveis / CIDR (allowlist)',
					'trusted_ips_help'                  => 'Um IP ou CIDR por linha, ex.: 203.0.113.10 ou 203.0.113.0/24',
					'ui_language'                       => 'Idioma (UI)',
					'ui_language_help'                  => 'Principais idiomas da web: alemao, ingles, espanhol, russo, frances, portugues, italiano, neerlandes, polones, turco, japones, chines.',
					'save_changes'                      => 'Salvar alteracoes',
				)
			),
			'zh' => array_replace(
				$common,
				array(
					'subtitle'                          => 'Shiyong bendi proof-of-work de fan bot baohu, wuwai bu fuwu.',
					'section_protection'                => 'Baohu fanwei',
					'protect_login'                     => 'Baohu denglu',
					'protect_comments'                  => 'Baohu pinglun',
					'protect_contact'                   => 'Baohu lianxi biaodan (Pro)',
					'protect_woo'                       => 'Baohu WooCommerce denglu (Pro)',
					'protect_generic'                   => 'Tongyong HTML biaodan',
					'active'                            => 'Qiyong',
					'active_pro'                        => 'Qiyong (Pro)',
					'active_contact'                    => 'Qiyong (Pro: Elementor / CF7 / WPForms)',
					'generic_help'                      => 'Yongyu fei CF7/WPForms/Elementor de zidingyi biaodan. Mei hang yi ge CSS xuanzeqi.',
					'generic_examples'                  => 'Shili: form#contact, form.newsletter-form, form[action*="contact"]',
					'section_behavior'                  => 'Xingwei',
					'mode'                              => 'Moshi',
					'mode_relaxed'                      => 'Kuansong',
					'mode_balanced'                     => 'Junheng',
					'mode_strict'                       => 'Yange',
					'section_difficulty'                => 'Nandu',
					'section_security'                  => 'Anquan yu fengxian',
					'section_language'                  => 'Yuyan',
					'auto_mode'                         => 'Zidong moshi',
					'auto_mode_help'                    => 'Genju gongji yali he xitong fudai zidong tiaozheng yanzhidu',
					'mode_manual_note'                  => 'Shoudong moshi yi qiyong.',
					'mode_locked_auto'                  => 'Moshi you zidong moshi kongzhi.',
					'auto_recommendation'               => 'Tuijian',
					'auto_effective'                    => 'Shiji moshi',
					'auto_target_difficulty'            => 'Mubiao nandu',
					'auto_blocked_24h'                  => 'Yi zulan (jintian)',
					'auto_block_rate'                   => 'Zulan lv',
					'auto_system_load'                  => 'Xitong fuzai',
					'secure_plus'                       => 'Secure+ Fengxian pingfen (Pro)',
					'secure_plus_help'                  => 'Zishiying fengxian pingfen: yunxu / gaoqiangdu yanzheng / zulan',
					'secure_plus_pool_hint'             => 'Moshi (nandu) shou qiyong de Secure+ fangfa yingxiang, bing keneng dui keyi JS/header jiqiren chufa jiao chang de tarpit yanshi.',
					'secure_method_header_consistency'  => 'Qingqiu tou yizhixing jiancha',
					'secure_method_headless_signature'  => 'Wutou liulanqi/Selenium qianming jiancha',
					'secure_method_failure_burst'       => 'Shibai baofa shengji',
					'secure_method_fast_submit'         => 'Guokuai tijiao qifa',
					'secure_method_tarpit_timeout'      => 'Gaofengxian tarpit chaoshi',
					'secure_method_header_consistency_desc' => 'Jiance yichang huo xianghu maodun de HTTP header, zhe lei qingkuang chang jianyu jiaoben huo maozhuang kehu duan.',
					'secure_method_headless_signature_desc' => 'Biaoji liulanqi zidonghua zhiwen (li ru Selenium, headless liulanqi huo changjian bot gongju lian).',
					'secure_method_failure_burst_desc'  => 'Dang tongyi laiyuan zai duan shijian nei chuxian daliang shibai jiancha shi, kuaisu tigao fengxian.',
					'secure_method_fast_submit_desc'    => 'Dang biaodan tijaosu du kuai de bu xiang zhengchang renlei jiaohu shi, jiang qi biaoji wei keyi.',
					'secure_method_tarpit_timeout_desc' => 'Dui gaofengxian qingqiu shiyong geyi yanshi/chaoshi, yi jiangdi bot sudu bing jianshao gongji tuntu.',
					'stats_weekly_email'                => 'Meizhou tongji youjian gei guanliyuan',
					'stats_weekly_email_help'           => 'Mei zhouyi 08:00 fasong',
					'challenge_max_age'                 => 'Challenge zuida shixiao (miao)',
					'logging'                           => 'Rizhi',
					'progressive_login'                 => 'Jinjie denglu baohu',
					'progressive_login_help'            => 'Jin zai duoci weiguinihou zulan',
					'ip_tracking'                       => 'IP genzong (tongji)',
					'ip_tracking_help'                  => 'Qiyong (yongyu shijie ditu)',
					'trusted_ips'                       => 'Shouxin IP / CIDR (allowlist)',
					'trusted_ips_help'                  => 'Mei hang yi ge IP huo CIDR, li ru 203.0.113.10 huo 203.0.113.0/24',
					'ui_language'                       => 'Yuyan (UI)',
					'ui_language_help'                  => 'Zhuyao web yuyan: deyu, yingyu, xibanyayu, eyu, fayu, putaoyayu, yidaliyu, helanyu, bolan yu, tuerqiyu, riyu, hanyu.',
					'save_changes'                      => 'Baocun genggai',
				)
			),
			default => array_replace(
				$common,
				array(
					'subtitle'                          => 'Bot-Schutz mit lokalem Proof-of-Work ohne externe Dienste.',
					'section_protection'                => 'Schutzbereiche',
					'section_difficulty'                => 'Schwierigkeit',
					'section_security'                  => 'Security & Risiko',
					'section_language'                  => 'Sprache',
					'section_maintenance'               => 'Wartung',
					'rate_limit_reset_button'           => 'Temporäre Sperren zurücksetzen',
					'rate_limit_reset_help'             => 'Setzt temporäre ProofShield-Sperren und Cooldowns zurück. Nützlich nach Tests oder nachdem eine Formularintegration falsche Blocks ausgelöst hat.',
					'rate_limit_reset_done'             => 'Temporäre ProofShield-Sperren wurden zurückgesetzt.',
					'protect_login'                     => 'Login schützen',
					'protect_comments'                  => 'Kommentare schützen',
					'protect_contact'                   => 'Kontaktformulare schützen',
					'protect_woo'                       => 'WooCommerce Login (Mein Konto) schützen',
					'protect_generic'                   => 'Generische HTML-Formulare',
					'active'                            => 'Aktiv',
					'active_pro'                        => 'Aktiv (Pro)',
					'active_contact'                    => 'Aktiv (Pro: Elementor / CF7 / WPForms)',
					'generic_help'                      => 'Für eigene Formulare ohne CF7/WPForms/Elementor. Trage pro Zeile einen CSS-Selektor ein.',
					'generic_examples'                  => 'Beispiele: form#kontakt, form.newsletter-form, form[action*="contact"]',
					'section_behavior'                  => 'Verhalten',
					'mode'                              => 'Modus',
					'mode_relaxed'                      => 'Entspannt',
					'mode_balanced'                     => 'Ausgewogen',
					'mode_strict'                       => 'Streng',
					'auto_mode'                         => 'Auto-Modus',
					'auto_mode_help'                    => 'Strenge automatisch an Angriffsaufkommen und Systemlast anpassen',
					'mode_manual_note'                  => 'Manueller Modus ist aktiv.',
					'mode_locked_auto'                  => 'Modus wird vom Auto-Modus gesteuert.',
					'auto_recommendation'               => 'Empfehlung',
					'auto_effective'                    => 'Aktiver Modus',
					'auto_target_difficulty'            => 'Ziel-Schwierigkeit',
					'auto_blocked_24h'                  => 'Geblockt (24h)',
					'auto_block_rate'                   => 'Blockrate',
					'auto_system_load'                  => 'Systemlast',
					'challenge_max_age'                 => 'Challenge-Maximalalter (Sekunden)',
					'logging'                           => 'Logging',
					'stats_weekly_email'                => 'Wöchentlichen Statistik-Report per E-Mail an Administrator senden',
					'stats_weekly_email_help'           => 'Versand montags um 08:00',
					'admin_email_reference'            => 'Administrator-E-Mail',
					'admin_email_reference_help'       => 'Standard: Administrator-E-Mail.',
					'progressive_login'                 => 'Progressiver Login-Schutz',
					'progressive_login_help'            => 'Erst nach Mehrfachverstößen blocken',
					'secure_plus'                       => 'Secure+ Risiko-Scoring (Pro)',
					'secure_plus_help'                  => 'Adaptives Risiko-Scoring: erlauben / harte Prüfung / blockieren',
					'secure_plus_pool_hint'             => 'Modus (Schwierigkeit) ist an die aktivierten Secure+-Methoden gebunden und kann bei verdächtigen JS/Header-Bots lange Tarpit-Timeouts auslösen.',
					'ip_tracking'                       => 'IP-Tracking (Statistik)',
					'ip_tracking_help'                  => 'Aktiv (für Weltkartenansicht)',
					'trusted_ips'                       => 'Trusted IPs / CIDR (Allowlist)',
					'trusted_ips_help'                  => 'Eine IP oder CIDR pro Zeile, z. B. 203.0.113.10 oder 203.0.113.0/24',
					'secure_method_header_consistency'  => 'Header-Konsistenzprüfung',
					'secure_method_headless_signature'  => 'Headless/Selenium-Signaturprüfung',
					'secure_method_failure_burst'       => 'Eskalation bei Fehlerhäufung',
					'secure_method_fast_submit'         => 'Heuristik für zu schnelles Absenden',
					'secure_method_tarpit_timeout'      => 'Tarpit-Timeout bei hohem Risiko',
					'secure_method_header_consistency_desc' => 'Erkennt unplausible oder widersprüchliche Request-Header, wie sie oft von Skripten oder gespooften Clients stammen.',
					'secure_method_headless_signature_desc' => 'Erkennt typische Fingerabdrücke von Browser-Automation wie Selenium, Headless-Browsern oder bekannten Bot-Tools.',
					'secure_method_failure_burst_desc'  => 'Erhöht das Risiko schnell, wenn von derselben Quelle in kurzer Zeit viele fehlgeschlagene Prüfungen auftreten.',
					'secure_method_fast_submit_desc'    => 'Markiert Formulareingaben als verdächtig, wenn sie unnatürlich schnell abgeschickt werden.',
					'secure_method_tarpit_timeout_desc' => 'Verzögert oder blockiert Hochrisiko-Anfragen gezielt, um Bots auszubremsen und den Angriffsdruck zu senken.',
					'ui_language'                       => 'Sprache (UI)',
					'ui_language_help'                  => 'Top Web/Internet-Sprachen: Deutsch, Englisch, Spanisch, Russisch, Französisch, Portugiesisch, Italienisch, Niederländisch, Polnisch, Türkisch, Japanisch, Chinesisch.',
					'save_changes'                      => 'Änderungen speichern',
				)
			),
		};

		return array_replace( $texts, $this->settingsExtraTexts( $language ), $this->loginJsWarningTexts( $language ) );
	}

	private function allSettingsTexts(): array {
		$all = array();
		foreach ( array_keys( UiLanguage::options() ) as $language ) {
			$normalized         = UiLanguage::normalize( (string) $language );
			$all[ $normalized ] = $this->settingsTexts( $normalized );
		}

		if ( ! isset( $all[ UiLanguage::DEFAULT ] ) ) {
			$all[ UiLanguage::DEFAULT ] = $this->settingsTexts( UiLanguage::DEFAULT );
		}

		return $all;
	}

	public function ajaxSetUiLanguage(): void {
		if ( ! current_user_can( 'manage_options' ) ) {
			wp_send_json_error( array( 'message' => 'forbidden' ), 403 );
		}

		check_ajax_referer( 'wpsh_set_ui_language' );

		$input_language           = RequestInput::postText( 'ui_language' );
		$input_language           = $input_language !== '' ? $input_language : UiLanguage::DEFAULT;
		$language                = UiLanguage::normalize( $input_language );
		$settings                = $this->settings->all();
		$settings['ui_language'] = $language;
		update_option( WPSH_OPTION_KEY, $settings );

		wp_send_json_success(
			array(
				'language' => $language,
			)
		);
	}

	public function renderLoginJsWarningNotice(): void {
		if ( ! current_user_can( 'manage_options' ) ) {
			return;
		}

		$page            = RequestInput::getKey( 'page' );
		$settingsUpdated = RequestInput::getKey( 'settings-updated' ) === 'true';
		if ( $page !== 'wpsh-settings' || ! $settingsUpdated ) {
			return;
		}

		$settings = $this->settings->all();
		if ( empty( $settings['enabled_login'] ) ) {
			return;
		}

		$language = UiLanguage::current( $this->settings );
		$t        = $this->settingsTexts( $language );
		echo '<div class="notice notice-warning is-dismissible"><p>' . esc_html( $t['login_js_save_notice'] ) . '</p></div>';
	}

	private function loginJsWarningTexts( string $language ): array {
		return match ( $language ) {
			'en' => array(
				'login_js_required_warning' => 'Warning: Login protection requires JavaScript. Without JavaScript, users cannot log in.',
				'login_js_save_notice'      => 'ProofShield login protection is active. Please test login now in a second browser window with JavaScript enabled to avoid lockout.',
			),
			'es' => array(
				'login_js_required_warning' => 'Aviso: La proteccion de login requiere JavaScript. Sin JavaScript no es posible iniciar sesion.',
				'login_js_save_notice'      => 'La proteccion de login de ProofShield esta activa. Pruebe ahora el acceso en una segunda ventana del navegador con JavaScript activado para evitar bloqueo.',
			),
			'ru' => array(
				'login_js_required_warning' => 'Vnimanie: Zashchita vhoda trebuet JavaScript. Bez JavaScript vhod nevozmozhen.',
				'login_js_save_notice'      => 'Zashchita vhoda ProofShield vklyuchena. Proverte vhod seichas vo vtorom okne browsera s vklyuchennym JavaScript, chtoby izbezhat blokirovki.',
			),
			'fr' => array(
				'login_js_required_warning' => 'Attention: La protection de connexion necessite JavaScript. Sans JavaScript, la connexion est impossible.',
				'login_js_save_notice'      => 'La protection de connexion ProofShield est active. Testez maintenant la connexion dans une seconde fenetre de navigateur avec JavaScript active pour eviter un blocage.',
			),
			'it' => array(
				'login_js_required_warning' => 'Attenzione: La protezione login richiede JavaScript. Senza JavaScript il login non e possibile.',
				'login_js_save_notice'      => 'La protezione login di ProofShield e attiva. Verifica ora l accesso in una seconda finestra del browser con JavaScript attivo per evitare blocchi.',
			),
			'nl' => array(
				'login_js_required_warning' => 'Waarschuwing: Loginbescherming vereist JavaScript. Zonder JavaScript is inloggen niet mogelijk.',
				'login_js_save_notice'      => 'ProofShield-loginbescherming is actief. Test nu inloggen in een tweede browservenster met JavaScript ingeschakeld om uitsluiting te voorkomen.',
			),
			'pl' => array(
				'login_js_required_warning' => 'Uwaga: Ochrona logowania wymaga JavaScript. Bez JavaScript logowanie nie jest mozliwe.',
				'login_js_save_notice'      => 'Ochrona logowania ProofShield jest aktywna. Przetestuj teraz logowanie w drugim oknie przegladarki z wlaczonym JavaScript, aby uniknac blokady.',
			),
			'tr' => array(
				'login_js_required_warning' => 'Uyari: Giris korumasi JavaScript gerektirir. JavaScript olmadan giris yapilamaz.',
				'login_js_save_notice'      => 'ProofShield giris korumasi aktif. Kilitlenmeyi onlemek icin simdi JavaScript acik ikinci bir tarayici penceresinde girisi test edin.',
			),
			'ja' => array(
				'login_js_required_warning' => 'Chui: Login hogo ni wa JavaScript ga hitsuyo desu. JavaScript ga off da to login dekinai baai ga arimasu.',
				'login_js_save_notice'      => 'ProofShield no login hogo ga yuukou desu. Lock out boushi no tame, JavaScript on no betsu browser window de ima sugu login test o shite kudasai.',
			),
			'pt' => array(
				'login_js_required_warning' => 'Aviso: A protecao de login requer JavaScript. Sem JavaScript nao e possivel entrar.',
				'login_js_save_notice'      => 'A protecao de login do ProofShield esta ativa. Teste agora o login em uma segunda janela do navegador com JavaScript ativado para evitar bloqueio.',
			),
			'zh' => array(
				'login_js_required_warning' => 'Jinggao: denglu baohu xuyao JavaScript. Ruguo guanbi JavaScript, jiang wufa denglu.',
				'login_js_save_notice'      => 'ProofShield denglu baohu yi qiyong. Qing lixie zai di erge liulanqi chuangkou (qiyong JavaScript) ceshi denglu, yi bimian ziji bei suoding.',
			),
			default => array(
				'login_js_required_warning' => 'Achtung: Der Login-Schutz benötigt JavaScript. Ohne JavaScript ist keine Anmeldung möglich.',
				'login_js_save_notice'      => 'ProofShield-Login-Schutz ist aktiv. Bitte testen Sie den Login jetzt in einem zweiten Browserfenster mit aktiviertem JavaScript, um eine Aussperrung zu vermeiden.',
			),
		};
	}

	private function settingsExtraTexts( string $language ): array {
		return match ( $language ) {
			'en' => array(
				'protect_login_tip'            => 'Protects the WordPress login at /wp-login.php against bots and automated login attempts.',
				'protect_comments_tip'         => 'Protects WordPress comment forms on posts and pages against spam bots.',
				'protect_contact_tip'          => 'Protects supported form plugins such as Elementor Forms, Contact Form 7, and WPForms.',
				'protect_woo_tip'              => 'Protects the WooCommerce customer login on "My Account" and similar WooCommerce login forms.',
				'protect_generic_tip'          => 'For custom HTML forms without a dedicated plugin integration. Add CSS selectors so ProofShield can detect those forms.',
				'login_lockout_title'          => 'Login lockout after failed attempts',
				'login_lockout_tip'            => 'Configures after how many failed login attempts an IP is temporarily blocked, and for how many minutes.',
				'login_lockout_attempts_label' => 'Failed attempts',
				'login_lockout_minutes_label'  => 'Lock duration (minutes)',
				'login_lockout_help'           => 'Example: 5 failed attempts -> 10 minutes lockout.',
				'progressive_login_tip'        => 'Difference from "Protect login": that option enables login protection in general. This option only controls how strictly repeated failed login checks are escalated before lockout.',
				'progressive_login_note'       => 'Use this to avoid immediate hard blocks on the first suspicious login attempts. Lockout threshold and duration are configured above in the login lockout settings.',
				'auto_level_title'             => 'Automatic protection level',
				'auto_level_tip'               => 'ProofShield automatically adjusts the protection level based on current attack pressure and system load.',
				'auto_level_toggle'            => 'Adjust protection level automatically (attack pressure & system load)',
				'token_validity_title'         => 'Security token validity (seconds)',
				'token_validity_tip'           => 'Defines how long a generated ProofShield token remains valid. Lower = stricter, higher = more user-friendly for slow forms. Default: 120 seconds.',
				'token_validity_help'          => 'Recommendation: 90-180 seconds. Increase for very long forms if needed.',
				'geo_stats_title'              => 'Location statistics (anonymized)',
				'geo_stats_tip'                => 'Does not store full IP addresses in statistics. Only anonymized IP ranges are used for map/country views (IPv4 /24, IPv6 /48).',
				'geo_stats_toggle'             => 'Enable map and country statistics (anonymized IP ranges)',
				'geo_stats_help'               => 'Note: anonymized IP ranges are sent to external geo APIs for geolocation. Without activation, no location statistics are calculated.',
				'geo_map_toggle'               => 'Show world map in statistics',
				'geo_map_help'                 => 'Disable this if you do not want the world map view. The IP table and other statistics remain available.',
				'ajax_rest_master_title'       => 'Protect AJAX / REST',
				'ajax_rest_master_tip'         => 'Enables server-side protection for selected AJAX and REST endpoints. Additional options appear after activation.',
				'ajax_rest_master_toggle'      => 'Enable protection for selected AJAX and REST endpoints',
				'ajax_rest_master_help'        => 'Recommended for modern form plugins using AJAX/REST. Protection applies only to endpoints listed below.',
				'ajax_rest_auto_title'         => 'Automatic protection (Beta)',
				'ajax_rest_auto_tip'           => 'Automatically attaches ProofShield security data to matching same-origin AJAX/REST requests via JavaScript.',
				'ajax_rest_auto_toggle'        => 'Automatically attach security data to matching AJAX/REST requests',
				'ajax_rest_auto_help'          => 'Can cause incompatibilities with some third-party plugins. If needed, disable it or use exclusions.',
				'ajax_actions_title'           => 'Protected AJAX actions',
				'ajax_actions_tip'             => 'Enter action names for requests to admin-ajax.php. One action per line.',
				'ajax_actions_help'            => 'One AJAX action per line (admin-ajax.php). Example: my_custom_ajax_action',
				'rest_routes_title'            => 'Protected REST endpoints',
				'rest_routes_tip'              => 'Define WP REST routes that should be protected. One entry per line. * wildcard allowed at the end.',
				'rest_routes_help'             => 'One WP REST route per line (without domain and without /wp-json). Wildcard * allowed at the end. Example: /contact-form-7/v1/*',
				'ajax_rest_excludes_title'     => 'Exclusions (do not protect automatically)',
				'ajax_rest_excludes_tip'       => 'If a plugin/endpoint causes issues, add its URL path here as an exclusion. * wildcard allowed at the end.',
				'ajax_rest_excludes_help'      => 'Optional exclusions: one URL path or pattern per line. * as suffix wildcard. Example: /wp-json/some-plugin/v1/strict-endpoint*',
			),
			'es' => array(
				'protect_login_tip'            => 'Protege el acceso de WordPress en /wp-login.php contra bots e intentos automáticos de inicio de sesión.',
				'protect_comments_tip'         => 'Protege los formularios de comentarios de WordPress contra bots de spam.',
				'protect_contact_tip'          => 'Protege plugins compatibles como Elementor Forms, Contact Form 7 y WPForms.',
				'protect_woo_tip'              => 'Protege el acceso de clientes de WooCommerce en "Mi cuenta" y formularios similares.',
				'protect_generic_tip'          => 'Para formularios HTML propios sin integración específica. Añada selectores CSS para que ProofShield los detecte.',
				'login_lockout_title'          => 'Bloqueo de login tras intentos fallidos',
				'login_lockout_tip'            => 'Define cuántos intentos fallidos provocan un bloqueo temporal por IP y cuántos minutos dura.',
				'login_lockout_attempts_label' => 'Intentos fallidos',
				'login_lockout_minutes_label'  => 'Duración del bloqueo (minutos)',
				'login_lockout_help'           => 'Ejemplo: 5 intentos fallidos -> bloqueo de 10 minutos.',
				'progressive_login_tip'        => 'Diferencia frente a "Proteger login": esa opción activa la protección del login en general. Esta opción solo controla cómo se endurece la respuesta antes del bloqueo.',
				'progressive_login_note'       => 'Úselo para evitar bloqueos duros inmediatos en los primeros intentos sospechosos. Umbral y duración del bloqueo se configuran arriba en la sección de login.',
				'auto_level_title'             => 'Nivel de protección automático',
				'auto_level_tip'               => 'ProofShield ajusta automáticamente el nivel de protección según la presión de ataques y la carga del sistema.',
				'auto_level_toggle'            => 'Ajustar automáticamente el nivel de protección (ataques y carga del sistema)',
				'token_validity_title'         => 'Validez del token de seguridad (segundos)',
				'token_validity_tip'           => 'Define cuánto tiempo es válido un token de ProofShield. Menor = más estricto, mayor = más cómodo para formularios lentos. Predeterminado: 120 segundos.',
				'token_validity_help'          => 'Recomendación: 90-180 segundos. Auméntelo si usa formularios muy largos.',
				'geo_stats_title'              => 'Estadísticas de ubicación (anonimizadas)',
				'geo_stats_tip'                => 'No guarda IP completas en las estadísticas. Solo usa rangos IP anonimizados para mapa/país (IPv4 /24, IPv6 /48).',
				'geo_stats_toggle'             => 'Activar estadísticas de mapa y países (rangos IP anonimizados)',
				'geo_stats_help'               => 'Nota: los rangos IP anonimizados se envían a APIs geo externas para geolocalización.',
				'geo_map_toggle'               => 'Mostrar mapa mundial en estadísticas',
				'geo_map_help'                 => 'Desactívelo si no desea la vista de mapa mundial. La tabla IP y otras estadísticas siguen disponibles.',
				'ajax_rest_master_title'       => 'Proteger AJAX / REST',
				'ajax_rest_master_tip'         => 'Activa la protección del lado servidor para endpoints AJAX y REST seleccionados. Las opciones aparecen después.',
				'ajax_rest_master_toggle'      => 'Activar protección para endpoints AJAX y REST seleccionados',
				'ajax_rest_master_help'        => 'Recomendado para plugins de formularios modernos con AJAX/REST. Solo se aplica a los endpoints indicados abajo.',
				'ajax_rest_auto_title'         => 'Protección automática (Beta)',
				'ajax_rest_auto_tip'           => 'Añade automáticamente datos de seguridad de ProofShield a solicitudes AJAX/REST same-origin compatibles.',
				'ajax_rest_auto_toggle'        => 'Enviar automáticamente datos de seguridad en solicitudes AJAX/REST compatibles',
				'ajax_rest_auto_help'          => 'Puede causar incompatibilidades con algunos plugins de terceros. Si ocurre, desactívelo o use exclusiones.',
				'ajax_actions_title'           => 'Acciones AJAX protegidas',
				'ajax_actions_tip'             => 'Introduzca nombres de action para admin-ajax.php. Una action por línea.',
				'ajax_actions_help'            => 'Una action AJAX por línea (admin-ajax.php). Ejemplo: my_custom_ajax_action',
				'rest_routes_title'            => 'Endpoints REST protegidos',
				'rest_routes_tip'              => 'Defina rutas WP REST que deban protegerse. Una por línea. Se permite wildcard * al final.',
				'rest_routes_help'             => 'Una ruta WP REST por línea (sin dominio y sin /wp-json). Wildcard * al final. Ejemplo: /contact-form-7/v1/*',
				'ajax_rest_excludes_title'     => 'Excepciones (no proteger automáticamente)',
				'ajax_rest_excludes_tip'       => 'Si un plugin/endpoint da problemas, añada aquí su ruta URL como excepción.',
				'ajax_rest_excludes_help'      => 'Excepciones opcionales: una ruta o patrón por línea. * como wildcard de sufijo.',
			),
			'ru' => array(
				'protect_login_tip'            => 'Zashchishchaet vhod WordPress /wp-login.php ot botov i avtomaticheskikh popytok vhoda.',
				'protect_comments_tip'         => 'Zashchishchaet formy kommentariyev WordPress ot spam-botov.',
				'protect_contact_tip'          => 'Zashchishchaet podderzhivaemye form-plaginy: Elementor Forms, Contact Form 7, WPForms.',
				'protect_woo_tip'              => 'Zashchishchaet login klientov WooCommerce na "My Account" i pokhozhie formy.',
				'protect_generic_tip'          => 'Dlya sobstvennykh HTML-form bez specialnoy integratsii. Dobavte CSS-selektory dlya raspoznavaniya.',
				'login_lockout_title'          => 'Blokirovka vhoda posle oshibok',
				'login_lockout_tip'            => 'Nastroika chisla oshibochnykh popytok vhoda i dlitelnosti vremennoy blokirovki po IP.',
				'login_lockout_attempts_label' => 'Oshibochnye popytki',
				'login_lockout_minutes_label'  => 'Dlitelnost blokirovki (min)',
				'login_lockout_help'           => 'Primer: 5 oshibok -> blokirovka na 10 minut.',
				'progressive_login_tip'        => 'Otlichie ot "Zashchita vhoda": ta nastroika vklyuchaet zashchitu vhoda voobsche. Eta nastroika upravlyaet eskalatsiey pered blokirovkoy.',
				'progressive_login_note'       => 'Polezno, chtoby ne delat zhestkuyu blokirovku srazu pri pervykh podozritelnykh popytkakh. Porog i vremya blokirovki nastroivayutsya vyshe.',
				'auto_level_title'             => 'Avtomaticheskiy uroven zashchity',
				'auto_level_tip'               => 'ProofShield avtomaticheski nastroivaet uroven zashchity po nagruzke i davleniyu atak.',
				'auto_level_toggle'            => 'Avtomaticheski nastroivat uroven zashchity',
				'token_validity_title'         => 'Srok deystviya tokena bezopasnosti (sekundy)',
				'token_validity_tip'           => 'Opredelyaet, skolko token ProofShield ostayotsya deystvitelnym. Nizhe = strozhe. Standart: 120 sek.',
				'token_validity_help'          => 'Rekomendatsiya: 90-180 sekund.',
				'geo_stats_title'              => 'Statistika mestopolozheniya (anonimizirovano)',
				'geo_stats_tip'                => 'Polnye IP ne sokhranyayutsya. Ispolzuyutsya tolko anonimizirovannye diapazony IP.',
				'geo_stats_toggle'             => 'Vklyuchit statistiku karty i stran (anonimizirovannye IP)',
				'geo_stats_help'               => 'Anonimizirovannye IP diapazony otpravlyayutsya vo vneshnie geo API dlya geolokatsii.',
				'geo_map_toggle'               => 'Pokazyvat kartu mira v statistike',
				'geo_map_help'                 => 'Otkluchite, esli karta mira ne nuzhna. Tablitsa IP i ostalnaya statistika ostanutsya dostupny.',
				'ajax_rest_master_title'       => 'Zashchitit AJAX / REST',
				'ajax_rest_master_tip'         => 'Vklyuchaet servernuyu zashchitu dlya vybrannykh AJAX i REST endpointov.',
				'ajax_rest_master_toggle'      => 'Vklyuchit zashchitu vybrannykh AJAX i REST endpointov',
				'ajax_rest_master_help'        => 'Tolko dlya endpointov, ukazannykh nizhe.',
				'ajax_rest_auto_title'         => 'Avto-zashchita (Beta)',
				'ajax_rest_auto_tip'           => 'Avtomaticheski dobavlyaet dannye bezopasnosti v podkhodyashchie AJAX/REST zaprosy same-origin.',
				'ajax_rest_auto_toggle'        => 'Avtomaticheski dobavlyat dannye bezopasnosti v AJAX/REST',
				'ajax_rest_auto_help'          => 'Mozhet vyzvat nesovmestimost s nekotorymi pluginami. Togda vyklyuchite ili dobavte isklyucheniya.',
				'ajax_actions_title'           => 'Zashchishchennye AJAX actions',
				'ajax_actions_tip'             => 'Ukazhite imena action dlya admin-ajax.php. Odna stroka = odna action.',
				'ajax_actions_help'            => 'Odna AJAX action na stroku. Primer: my_custom_ajax_action',
				'rest_routes_title'            => 'Zashchishchennye REST endpointy',
				'rest_routes_tip'              => 'Ukazhite WP REST marshruty dlya zashchity. Podderzhivaetsya * v kontse.',
				'rest_routes_help'             => 'Odna WP REST marshrut na stroku, bez domena i bez /wp-json.',
				'ajax_rest_excludes_title'     => 'Isklyucheniya (ne zashchishchat avtomaticheski)',
				'ajax_rest_excludes_tip'       => 'Dobavte URL-puti endpointov/plaginov, esli est problemy.',
				'ajax_rest_excludes_help'      => 'Odna maska ili put na stroku. * kak wildcard v kontse.',
			),
			'fr' => array(
				'protect_login_tip'            => 'Protege la connexion WordPress (/wp-login.php) contre les bots et tentatives automatiques.',
				'protect_comments_tip'         => 'Protege les formulaires de commentaires WordPress contre les spambots.',
				'protect_contact_tip'          => 'Protege les plugins de formulaires pris en charge (Elementor Forms, Contact Form 7, WPForms).',
				'protect_woo_tip'              => 'Protege la connexion client WooCommerce sur "Mon compte" et formulaires similaires.',
				'protect_generic_tip'          => 'Pour vos formulaires HTML personnalises sans integration specifique. Ajoutez des selecteurs CSS.',
				'login_lockout_title'          => 'Blocage de connexion apres echecs',
				'login_lockout_tip'            => 'Definit le nombre d echecs de connexion avant blocage temporaire par IP et sa duree.',
				'login_lockout_attempts_label' => 'Echecs autorises',
				'login_lockout_minutes_label'  => 'Duree du blocage (minutes)',
				'login_lockout_help'           => 'Exemple: 5 echecs -> blocage pendant 10 minutes.',
				'progressive_login_tip'        => 'Difference avec "Proteger la connexion": cette option active la protection du login en general. Ici vous reglez seulement l escalation avant blocage.',
				'progressive_login_note'       => 'Utile pour eviter un blocage dur immediat aux premieres tentatives suspectes. Seuil et duree de blocage se reglent plus haut.',
				'auto_level_title'             => 'Niveau de protection automatique',
				'auto_level_tip'               => 'ProofShield ajuste automatiquement le niveau de protection selon la pression d attaques et la charge systeme.',
				'auto_level_toggle'            => 'Ajuster automatiquement le niveau de protection',
				'token_validity_title'         => 'Validite du jeton de securite (secondes)',
				'token_validity_tip'           => 'Definit combien de temps un jeton ProofShield reste valide. Plus bas = plus strict. Defaut: 120 s.',
				'token_validity_help'          => 'Recommande: 90-180 secondes.',
				'geo_stats_title'              => 'Statistiques de localisation (anonymisees)',
				'geo_stats_tip'                => 'Aucune IP complete n est stockee. Seules des plages IP anonymisees sont utilisees.',
				'geo_stats_toggle'             => 'Activer les statistiques carte/pays (plages IP anonymisees)',
				'geo_stats_help'               => 'Les plages IP anonymisees sont envoyees a des API geo externes pour la geolocalisation.',
				'geo_map_toggle'               => 'Afficher la carte du monde dans les statistiques',
				'geo_map_help'                 => 'Desactivez si vous ne voulez pas la carte. Le tableau IP et les autres statistiques restent disponibles.',
				'ajax_rest_master_title'       => 'Proteger AJAX / REST',
				'ajax_rest_master_tip'         => 'Active la protection cote serveur pour les endpoints AJAX/REST selectionnes.',
				'ajax_rest_master_toggle'      => 'Activer la protection des endpoints AJAX/REST selectionnes',
				'ajax_rest_master_help'        => 'Protection active uniquement pour les endpoints listes ci-dessous.',
				'ajax_rest_auto_title'         => 'Protection automatique (Beta)',
				'ajax_rest_auto_tip'           => 'Ajoute automatiquement les donnees de securite ProofShield aux requetes AJAX/REST same-origin compatibles.',
				'ajax_rest_auto_toggle'        => 'Ajouter automatiquement les donnees de securite aux requetes AJAX/REST',
				'ajax_rest_auto_help'          => 'Peut provoquer des incompatibilites avec certains plugins tiers.',
				'ajax_actions_title'           => 'Actions AJAX protegees',
				'ajax_actions_tip'             => 'Entrez les noms action pour admin-ajax.php. Une action par ligne.',
				'ajax_actions_help'            => 'Une action AJAX par ligne. Exemple: my_custom_ajax_action',
				'rest_routes_title'            => 'Endpoints REST proteges',
				'rest_routes_tip'              => 'Definissez les routes WP REST a proteger. Wildcard * autorise en suffixe.',
				'rest_routes_help'             => 'Une route WP REST par ligne (sans domaine et sans /wp-json).',
				'ajax_rest_excludes_title'     => 'Exclusions (ne pas proteger automatiquement)',
				'ajax_rest_excludes_tip'       => 'Ajoutez ici des chemins URL a exclure si un plugin/endpoint pose probleme.',
				'ajax_rest_excludes_help'      => 'Une route ou un motif par ligne. * en suffixe.',
			),
			'it' => array(
				'protect_login_tip'            => 'Protegge il login WordPress su /wp-login.php da bot e tentativi automatici.',
				'protect_comments_tip'         => 'Protegge i moduli commento WordPress dai bot spam.',
				'protect_contact_tip'          => 'Protegge plugin modulo supportati come Elementor Forms, Contact Form 7 e WPForms.',
				'protect_woo_tip'              => 'Protegge il login cliente WooCommerce in My Account e moduli simili.',
				'protect_generic_tip'          => 'Per moduli HTML personalizzati senza integrazione dedicata. Aggiungi selettori CSS.',
				'login_lockout_title'          => 'Blocco login dopo tentativi falliti',
				'login_lockout_tip'            => 'Definisce dopo quanti tentativi login falliti un IP viene bloccato temporaneamente e per quanti minuti.',
				'login_lockout_attempts_label' => 'Tentativi falliti',
				'login_lockout_minutes_label'  => 'Durata blocco (minuti)',
				'login_lockout_help'           => 'Esempio: 5 tentativi falliti -> 10 minuti di blocco.',
				'progressive_login_tip'        => 'Differenza rispetto a Proteggi login: quella opzione attiva la protezione login in generale. Questa opzione gestisce solo lescalation prima del blocco.',
				'progressive_login_note'       => 'Utile per evitare blocchi rigidi immediati ai primi tentativi sospetti.',
				'auto_level_title'             => 'Livello protezione automatico',
				'auto_level_tip'               => 'ProofShield adatta automaticamente il livello di protezione in base agli attacchi e al carico sistema.',
				'auto_level_toggle'            => 'Regola automaticamente il livello di protezione',
				'token_validity_title'         => 'Validita token sicurezza (secondi)',
				'token_validity_tip'           => 'Definisce per quanto tempo un token ProofShield resta valido. Piu basso = piu rigido. Default: 120 secondi.',
				'token_validity_help'          => 'Consigliato: 90-180 secondi.',
				'geo_stats_title'              => 'Statistiche geografiche (anonimizzate)',
				'geo_stats_tip'                => 'Non salva IP completi. Usa solo range IP anonimizzati.',
				'geo_stats_toggle'             => 'Attiva statistiche mappa e paesi (range IP anonimizzati)',
				'geo_stats_help'               => 'I range IP anonimizzati vengono inviati ad API geo esterne per geolocalizzazione.',
				'geo_map_toggle'               => 'Mostra mappa mondo nelle statistiche',
				'geo_map_help'                 => 'Disattiva se non vuoi la vista mappa. Tabella IP e altre statistiche restano disponibili.',
				'ajax_rest_master_title'       => 'Proteggi AJAX / REST',
				'ajax_rest_master_tip'         => 'Attiva protezione lato server per endpoint AJAX/REST selezionati.',
				'ajax_rest_master_toggle'      => 'Attiva protezione per endpoint AJAX/REST selezionati',
				'ajax_rest_master_help'        => 'Protezione applicata solo agli endpoint indicati sotto.',
				'ajax_rest_auto_title'         => 'Protezione automatica (Beta)',
				'ajax_rest_auto_tip'           => 'Aggiunge automaticamente dati sicurezza ProofShield alle richieste AJAX/REST same-origin compatibili.',
				'ajax_rest_auto_toggle'        => 'Aggiungi automaticamente dati sicurezza alle richieste AJAX/REST',
				'ajax_rest_auto_help'          => 'Puo causare incompatibilita con alcuni plugin di terze parti.',
				'ajax_actions_title'           => 'Azioni AJAX protette',
				'ajax_actions_tip'             => 'Inserisci i nomi action per admin-ajax.php. Una action per riga.',
				'ajax_actions_help'            => 'Una action AJAX per riga. Esempio: my_custom_ajax_action',
				'rest_routes_title'            => 'Endpoint REST protetti',
				'rest_routes_tip'              => 'Definisci route WP REST da proteggere. Wildcard * finale consentita.',
				'rest_routes_help'             => 'Una route WP REST per riga (senza dominio e senza /wp-json).',
				'ajax_rest_excludes_title'     => 'Esclusioni (non proteggere automaticamente)',
				'ajax_rest_excludes_tip'       => 'Se un plugin o endpoint crea problemi, aggiungi qui il suo percorso URL.',
				'ajax_rest_excludes_help'      => 'Un percorso o pattern per riga. * come wildcard finale.',
			),
			'nl' => array(
				'protect_login_tip'            => 'Beschermt WordPress-login op /wp-login.php tegen bots en geautomatiseerde inlogpogingen.',
				'protect_comments_tip'         => 'Beschermt WordPress-reactieformulieren tegen spambots.',
				'protect_contact_tip'          => 'Beschermt ondersteunde formulierplugins zoals Elementor Forms, Contact Form 7 en WPForms.',
				'protect_woo_tip'              => 'Beschermt WooCommerce klantlogin op My Account en vergelijkbare formulieren.',
				'protect_generic_tip'          => 'Voor aangepaste HTML-formulieren zonder specifieke pluginintegratie. Voeg CSS-selectors toe.',
				'login_lockout_title'          => 'Loginvergrendeling na mislukte pogingen',
				'login_lockout_tip'            => 'Stelt in na hoeveel mislukte loginpogingen een IP tijdelijk wordt geblokkeerd en voor hoeveel minuten.',
				'login_lockout_attempts_label' => 'Mislukte pogingen',
				'login_lockout_minutes_label'  => 'Blokkeertijd (minuten)',
				'login_lockout_help'           => 'Voorbeeld: 5 mislukte pogingen -> 10 minuten blokkering.',
				'progressive_login_tip'        => 'Verschil met Login beschermen: die optie schakelt loginbescherming in het algemeen in. Deze optie regelt alleen escalatie voor blokkering.',
				'progressive_login_note'       => 'Voorkomt directe harde blokkeringen bij de eerste verdachte pogingen.',
				'auto_level_title'             => 'Automatisch beschermingsniveau',
				'auto_level_tip'               => 'ProofShield past het beschermingsniveau automatisch aan op basis van aanvalsdruk en systeembelasting.',
				'auto_level_toggle'            => 'Beschermingsniveau automatisch aanpassen',
				'token_validity_title'         => 'Geldigheid beveiligingstoken (seconden)',
				'token_validity_tip'           => 'Bepaalt hoe lang een ProofShield-token geldig blijft. Lager = strenger. Standaard: 120 seconden.',
				'token_validity_help'          => 'Aanbevolen: 90-180 seconden.',
				'geo_stats_title'              => 'Locatiestatistieken (geanonimiseerd)',
				'geo_stats_tip'                => 'Slaat geen volledige IP-adressen op. Alleen geanonimiseerde IP-ranges.',
				'geo_stats_toggle'             => 'Kaart- en landenstatistieken inschakelen (geanonimiseerde IP-ranges)',
				'geo_stats_help'               => 'Geanonimiseerde IP-ranges worden naar externe geo-APIs gestuurd voor geolocatie.',
				'geo_map_toggle'               => 'Wereldkaart in statistieken tonen',
				'geo_map_help'                 => 'Uitschakelen als je geen kaartweergave wilt. IP-tabel en andere statistieken blijven beschikbaar.',
				'ajax_rest_master_title'       => 'AJAX / REST beschermen',
				'ajax_rest_master_tip'         => 'Schakelt server-side bescherming in voor geselecteerde AJAX/REST-endpoints.',
				'ajax_rest_master_toggle'      => 'Bescherming inschakelen voor geselecteerde AJAX/REST-endpoints',
				'ajax_rest_master_help'        => 'Bescherming geldt alleen voor onderstaande endpoints.',
				'ajax_rest_auto_title'         => 'Automatische bescherming (Beta)',
				'ajax_rest_auto_tip'           => 'Voegt automatisch ProofShield-beveiligingsdata toe aan geschikte same-origin AJAX/REST-verzoeken.',
				'ajax_rest_auto_toggle'        => 'Automatisch beveiligingsdata toevoegen aan AJAX/REST-verzoeken',
				'ajax_rest_auto_help'          => 'Kan incompatibiliteit geven met sommige derde-partij plugins.',
				'ajax_actions_title'           => 'Beschermde AJAX-acties',
				'ajax_actions_tip'             => 'Vul action-namen in voor admin-ajax.php. Een action per regel.',
				'ajax_actions_help'            => 'Een AJAX-action per regel. Voorbeeld: my_custom_ajax_action',
				'rest_routes_title'            => 'Beschermde REST-endpoints',
				'rest_routes_tip'              => 'Definieer WP REST-routes die moeten worden beschermd. Wildcard * aan het einde toegestaan.',
				'rest_routes_help'             => 'Een WP REST-route per regel (zonder domein en zonder /wp-json).',
				'ajax_rest_excludes_title'     => 'Uitsluitingen (niet automatisch beschermen)',
				'ajax_rest_excludes_tip'       => 'Als een plugin of endpoint problemen geeft, voeg hier een URL-pad toe als uitzondering.',
				'ajax_rest_excludes_help'      => 'Een pad of patroon per regel. * als suffix-wildcard.',
			),
			'pl' => array(
				'protect_login_tip'            => 'Chroni logowanie WordPress pod /wp-login.php przed botami i automatycznymi probami.',
				'protect_comments_tip'         => 'Chroni formularze komentarzy WordPress przed botami spamowymi.',
				'protect_contact_tip'          => 'Chroni wspierane pluginy formularzy jak Elementor Forms, Contact Form 7 i WPForms.',
				'protect_woo_tip'              => 'Chroni logowanie klienta WooCommerce na stronie My Account i podobnych formularzach.',
				'protect_generic_tip'          => 'Dla niestandardowych formularzy HTML bez dedykowanej integracji. Dodaj selektory CSS.',
				'login_lockout_title'          => 'Blokada logowania po nieudanych probach',
				'login_lockout_tip'            => 'Ustawia po ilu nieudanych probach logowania IP jest czasowo blokowane i na ile minut.',
				'login_lockout_attempts_label' => 'Nieudane proby',
				'login_lockout_minutes_label'  => 'Czas blokady (minuty)',
				'login_lockout_help'           => 'Przyklad: 5 nieudanych prob -> 10 minut blokady.',
				'progressive_login_tip'        => 'Roznica wzgledem Chron login: tamta opcja wlacza ochrone logowania ogolnie. Ta opcja steruje tylko eskalacja przed blokada.',
				'progressive_login_note'       => 'Pomaga uniknac natychmiastowych twardych blokad przy pierwszych podejrzanych probach.',
				'auto_level_title'             => 'Automatyczny poziom ochrony',
				'auto_level_tip'               => 'ProofShield automatycznie dostosowuje poziom ochrony do presji atakow i obciazenia systemu.',
				'auto_level_toggle'            => 'Automatycznie dostosuj poziom ochrony',
				'token_validity_title'         => 'Waznosc tokenu bezpieczenstwa (sekundy)',
				'token_validity_tip'           => 'Okresla jak dlugo token ProofShield jest wazny. Nizsza wartosc = bardziej rygorystycznie. Domyslnie: 120 sekund.',
				'token_validity_help'          => 'Rekomendacja: 90-180 sekund.',
				'geo_stats_title'              => 'Statystyki lokalizacji (zanonimizowane)',
				'geo_stats_tip'                => 'Nie zapisuje pelnych adresow IP. Uzywa tylko zanonimizowanych zakresow IP.',
				'geo_stats_toggle'             => 'Wlacz statystyki mapy i krajow (zanonimizowane zakresy IP)',
				'geo_stats_help'               => 'Zanonimizowane zakresy IP sa wysylane do zewnetrznych API geo dla geolokalizacji.',
				'geo_map_toggle'               => 'Pokaz mape swiata w statystykach',
				'geo_map_help'                 => 'Wylacz, jesli nie chcesz widoku mapy. Tabela IP i inne statystyki pozostaja dostepne.',
				'ajax_rest_master_title'       => 'Chron AJAX / REST',
				'ajax_rest_master_tip'         => 'Wlacza ochrone po stronie serwera dla wybranych endpointow AJAX/REST.',
				'ajax_rest_master_toggle'      => 'Wlacz ochrone dla wybranych endpointow AJAX/REST',
				'ajax_rest_master_help'        => 'Ochrona dziala tylko dla endpointow z listy ponizej.',
				'ajax_rest_auto_title'         => 'Automatyczna ochrona (Beta)',
				'ajax_rest_auto_tip'           => 'Automatycznie dolacza dane bezpieczenstwa ProofShield do pasujacych same-origin zapytan AJAX/REST.',
				'ajax_rest_auto_toggle'        => 'Automatycznie dolaczaj dane bezpieczenstwa do zapytan AJAX/REST',
				'ajax_rest_auto_help'          => 'Moze powodowac niezgodnosci z niektorymi pluginami zewnetrznymi.',
				'ajax_actions_title'           => 'Chronione akcje AJAX',
				'ajax_actions_tip'             => 'Wpisz nazwy action dla admin-ajax.php. Jedna action na linie.',
				'ajax_actions_help'            => 'Jedna action AJAX na linie. Przyklad: my_custom_ajax_action',
				'rest_routes_title'            => 'Chronione endpointy REST',
				'rest_routes_tip'              => 'Zdefiniuj trasy WP REST do ochrony. Dozwolony wildcard * na koncu.',
				'rest_routes_help'             => 'Jedna trasa WP REST na linie (bez domeny i bez /wp-json).',
				'ajax_rest_excludes_title'     => 'Wyjatki (nie chroń automatycznie)',
				'ajax_rest_excludes_tip'       => 'Jesli plugin lub endpoint sprawia problemy, dodaj tutaj sciezke URL jako wyjatek.',
				'ajax_rest_excludes_help'      => 'Jedna sciezka lub wzorzec na linie. * jako wildcard sufiksu.',
			),
			'tr' => array(
				'protect_login_tip'            => 'WordPress /wp-login.php girisini botlara ve otomatik denemelere karsi korur.',
				'protect_comments_tip'         => 'WordPress yorum formlarini spam botlara karsi korur.',
				'protect_contact_tip'          => 'Elementor Forms, Contact Form 7 ve WPForms gibi desteklenen form eklentilerini korur.',
				'protect_woo_tip'              => 'WooCommerce My Account ve benzeri giris formlarini korur.',
				'protect_generic_tip'          => 'Ozel entegrasyon olmayan HTML formlari icin. CSS secicileri ekleyin.',
				'login_lockout_title'          => 'Basarisiz denemelerden sonra giris kilidi',
				'login_lockout_tip'            => 'Kac basarisiz denemeden sonra IPnin gecici engellenecegini ve kac dakika surecegini belirler.',
				'login_lockout_attempts_label' => 'Basarisiz deneme',
				'login_lockout_minutes_label'  => 'Kilit suresi (dakika)',
				'login_lockout_help'           => 'Ornek: 5 basarisiz deneme -> 10 dakika kilit.',
				'progressive_login_tip'        => 'Girisi koru seceneginden farki: o secenek genel korumayi acar. Bu secenek kilit oncesi eskalasyonu yonetir.',
				'progressive_login_note'       => 'Ilk supheli denemelerde aninda sert bloklamayi onlemek icin kullanilir.',
				'auto_level_title'             => 'Otomatik koruma seviyesi',
				'auto_level_tip'               => 'ProofShield koruma seviyesini saldiri baskisi ve sistem yukune gore otomatik ayarlar.',
				'auto_level_toggle'            => 'Koruma seviyesini otomatik ayarla',
				'token_validity_title'         => 'Guvenlik token gecerliligi (saniye)',
				'token_validity_tip'           => 'ProofShield tokeninin ne kadar sure gecerli kalacagini belirler. Dusuk = daha siki. Varsayilan: 120 saniye.',
				'token_validity_help'          => 'Onerilen: 90-180 saniye.',
				'geo_stats_title'              => 'Konum istatistikleri (anonim)',
				'geo_stats_tip'                => 'Tam IP adresi saklamaz. Yalnizca anonim IP araliklari kullanilir.',
				'geo_stats_toggle'             => 'Harita ve ulke istatistiklerini etkinlestir (anonim IP araliklari)',
				'geo_stats_help'               => 'Anonim IP araliklari cografi konum icin harici geo APIlerine gonderilir.',
				'geo_map_toggle'               => 'Istatistiklerde dunya haritasini goster',
				'geo_map_help'                 => 'Harita gorunumu istenmiyorsa kapatin. IP tablosu ve diger istatistikler kullanilmaya devam eder.',
				'ajax_rest_master_title'       => 'AJAX / REST korumasi',
				'ajax_rest_master_tip'         => 'Secili AJAX/REST endpointleri icin sunucu tarafi korumayi etkinlestirir.',
				'ajax_rest_master_toggle'      => 'Secili AJAX/REST endpointleri icin korumayi etkinlestir',
				'ajax_rest_master_help'        => 'Koruma sadece asagidaki endpointler icin uygulanir.',
				'ajax_rest_auto_title'         => 'Otomatik koruma (Beta)',
				'ajax_rest_auto_tip'           => 'Uygun same-origin AJAX/REST isteklerine ProofShield guvenlik verisini otomatik ekler.',
				'ajax_rest_auto_toggle'        => 'AJAX/REST isteklerine guvenlik verisini otomatik ekle',
				'ajax_rest_auto_help'          => 'Bazi ucuncu taraf eklentilerde uyumsuzluklara neden olabilir.',
				'ajax_actions_title'           => 'Korumali AJAX actionlari',
				'ajax_actions_tip'             => 'admin-ajax.php icin action adlarini girin. Her satira bir action.',
				'ajax_actions_help'            => 'Her satira bir AJAX action. Ornek: my_custom_ajax_action',
				'rest_routes_title'            => 'Korumali REST endpointleri',
				'rest_routes_tip'              => 'Korunacak WP REST rotalarini tanimlayin. Sonunda * wildcard desteklenir.',
				'rest_routes_help'             => 'Her satira bir WP REST rotasi (domain ve /wp-json olmadan).',
				'ajax_rest_excludes_title'     => 'Haric tutmalar (otomatik koruma yapma)',
				'ajax_rest_excludes_tip'       => 'Bir eklenti veya endpoint sorun cikariyorsa URL yolunu buraya haric tutma olarak ekleyin.',
				'ajax_rest_excludes_help'      => 'Her satira bir yol veya desen. * sonek wildcard.',
			),
			'ja' => array(
				'protect_login_tip'            => 'WordPress login (/wp-login.php) o bot / jidou login shikou kara hogo shimasu.',
				'protect_comments_tip'         => 'WordPress comment form o spam bot kara hogo shimasu.',
				'protect_contact_tip'          => 'Elementor Forms / CF7 / WPForms nado no taiou form plugin o hogo shimasu.',
				'protect_woo_tip'              => 'WooCommerce no "My Account" customer login form o hogo shimasu.',
				'protect_generic_tip'          => 'Dokuji HTML form muke. CSS selector o touroku shite ProofShield ni ninshiki sasenmasu.',
				'login_lockout_title'          => 'Login shippai ji no lock',
				'login_lockout_tip'            => 'Nankai shippai de IP lock suru ka to, lock jikan (fun) o settei shimasu.',
				'login_lockout_attempts_label' => 'Shippai kaisuu',
				'login_lockout_minutes_label'  => 'Lock jikan (fun)',
				'login_lockout_help'           => 'Rei: 5 kai shippai -> 10 fun lock.',
				'progressive_login_tip'        => '"Rogin o hogo" wa rogin hogo sono mono o on ni shimasu. Kochira wa lock mae no dankai teki taio no tsuyosa settei desu.',
				'progressive_login_note'       => 'Saisho no ayashii shikou de sugu ni tsuyoi block ni shinai tame ni tsukaimasu. Porog/tojikan wa ue no login lock settei de henko dekimasu.',
				'auto_level_title'             => 'Jidou hogo level',
				'auto_level_tip'               => 'Kougeki joukyou to system load ni awasete hogo level o jidou chousei shimasu.',
				'auto_level_toggle'            => 'Hogo level o jidou chousei suru',
				'token_validity_title'         => 'Security token yuko jikan (byou)',
				'token_validity_tip'           => 'ProofShield token no yuko jikan. Hikui = kibishii / takai = tsukaiyasui. Standard 120 byou.',
				'token_validity_help'          => 'Suisho: 90-180 byou.',
				'geo_stats_title'              => 'Location toukei (anonimized)',
				'geo_stats_tip'                => 'Kanzen na IP wa hozon sezu, anonimized IP range nomi shiyou shimasu.',
				'geo_stats_toggle'             => 'Map / kuni toukei o yuukouka (anonimized IP range)',
				'geo_stats_help'               => 'Geolocation no tame anonimized IP range o gaibu geo API e soshin shimasu.',
				'geo_map_toggle'               => 'Toukei de sekai chizu o hyouji suru',
				'geo_map_help'                 => 'Sekai chizu ga fuyou na baai wa off. IP table to hoka no toukei wa tsukaemasu.',
				'ajax_rest_master_title'       => 'AJAX / REST o hogo',
				'ajax_rest_master_tip'         => 'Sentakushita AJAX/REST endpoint no server-side hogo o yuukouka shimasu.',
				'ajax_rest_master_toggle'      => 'Sentakushita AJAX / REST endpoint no hogo o yuukouka',
				'ajax_rest_master_help'        => 'Shita ni nyuryoku shita endpoint nomi taishou desu.',
				'ajax_rest_auto_title'         => 'Jidou hogo (Beta)',
				'ajax_rest_auto_tip'           => 'Taiou same-origin AJAX/REST request ni ProofShield security data o jidou tsuika shimasu.',
				'ajax_rest_auto_toggle'        => 'Taiou AJAX/REST request ni security data o jidou tsuika',
				'ajax_rest_auto_help'          => 'Ichibu third-party plugin de fuguai no kanousei ga arimasu.',
				'ajax_actions_title'           => 'Hogo suru AJAX action',
				'ajax_actions_tip'             => 'admin-ajax.php no action mei o 1 gyou zutsu nyuryoku.',
				'ajax_actions_help'            => '1 gyou 1 AJAX action. Rei: my_custom_ajax_action',
				'rest_routes_title'            => 'Hogo suru REST endpoint',
				'rest_routes_tip'              => 'Hogo suru WP REST route o nyuryoku. Suffix * wildcard ka.',
				'rest_routes_help'             => '1 gyou 1 route (domain /wp-json nashi).',
				'ajax_rest_excludes_title'     => 'Exclusions (jidou hogo shinai)',
				'ajax_rest_excludes_tip'       => 'Plugin/endpoint ni mondai ga aru baai wa URL path o jokugai ni tsuika.',
				'ajax_rest_excludes_help'      => '1 gyou 1 path/mask. * suffix wildcard.',
			),
			'pt' => array(
				'protect_login_tip'            => 'Protege o login do WordPress em /wp-login.php contra bots e tentativas automáticas.',
				'protect_comments_tip'         => 'Protege formulários de comentários do WordPress contra bots de spam.',
				'protect_contact_tip'          => 'Protege plugins de formulário suportados como Elementor Forms, Contact Form 7 e WPForms.',
				'protect_woo_tip'              => 'Protege o login de clientes do WooCommerce em "Minha conta" e formulários semelhantes.',
				'protect_generic_tip'          => 'Para formulários HTML próprios sem integração específica. Adicione seletores CSS.',
				'login_lockout_title'          => 'Bloqueio de login após falhas',
				'login_lockout_tip'            => 'Define quantas tentativas de login com falha ativam um bloqueio temporário por IP e por quantos minutos.',
				'login_lockout_attempts_label' => 'Tentativas com falha',
				'login_lockout_minutes_label'  => 'Duração do bloqueio (minutos)',
				'login_lockout_help'           => 'Exemplo: 5 falhas -> bloqueio de 10 minutos.',
				'progressive_login_tip'        => 'Diferença para "Proteger login": aquela opção ativa a proteção do login em geral. Esta opção só controla a escalada antes do bloqueio.',
				'progressive_login_note'       => 'Útil para evitar bloqueio rígido imediato nas primeiras tentativas suspeitas. Limite e duração do bloqueio são configurados acima.',
				'auto_level_title'             => 'Nível de proteção automático',
				'auto_level_tip'               => 'ProofShield ajusta automaticamente o nível de proteção conforme ataques e carga do sistema.',
				'auto_level_toggle'            => 'Ajustar nível de proteção automaticamente',
				'token_validity_title'         => 'Validade do token de segurança (segundos)',
				'token_validity_tip'           => 'Define por quanto tempo um token ProofShield é válido. Menor = mais rígido. Padrão: 120 segundos.',
				'token_validity_help'          => 'Recomendação: 90-180 segundos.',
				'geo_stats_title'              => 'Estatísticas de localização (anonimizadas)',
				'geo_stats_tip'                => 'Não armazena IPs completos. Usa apenas faixas de IP anonimizadas.',
				'geo_stats_toggle'             => 'Ativar estatísticas de mapa e país (faixas IP anonimizadas)',
				'geo_stats_help'               => 'Faixas IP anonimizadas são enviadas para APIs geo externas para geolocalização.',
				'geo_map_toggle'               => 'Mostrar mapa mundial nas estatísticas',
				'geo_map_help'                 => 'Desative se não quiser a visualização de mapa. A tabela de IP e outras estatísticas continuam disponíveis.',
				'ajax_rest_master_title'       => 'Proteger AJAX / REST',
				'ajax_rest_master_tip'         => 'Ativa proteção no servidor para endpoints AJAX/REST selecionados.',
				'ajax_rest_master_toggle'      => 'Ativar proteção para endpoints AJAX/REST selecionados',
				'ajax_rest_master_help'        => 'Proteção aplicada apenas aos endpoints listados abaixo.',
				'ajax_rest_auto_title'         => 'Proteção automática (Beta)',
				'ajax_rest_auto_tip'           => 'Anexa automaticamente dados de segurança ProofShield a requisições AJAX/REST same-origin compatíveis.',
				'ajax_rest_auto_toggle'        => 'Enviar dados de segurança automaticamente em requisições AJAX/REST compatíveis',
				'ajax_rest_auto_help'          => 'Pode causar incompatibilidades com alguns plugins de terceiros.',
				'ajax_actions_title'           => 'Ações AJAX protegidas',
				'ajax_actions_tip'             => 'Informe os nomes de action para admin-ajax.php. Uma action por linha.',
				'ajax_actions_help'            => 'Uma action AJAX por linha. Exemplo: my_custom_ajax_action',
				'rest_routes_title'            => 'Endpoints REST protegidos',
				'rest_routes_tip'              => 'Defina rotas WP REST para proteger. Wildcard * no final é permitido.',
				'rest_routes_help'             => 'Uma rota WP REST por linha (sem domínio e sem /wp-json).',
				'ajax_rest_excludes_title'     => 'Exceções (não proteger automaticamente)',
				'ajax_rest_excludes_tip'       => 'Adicione caminhos de URL de plugins/endpoints problemáticos como exceção.',
				'ajax_rest_excludes_help'      => 'Uma rota ou padrão por linha. * como wildcard no sufixo.',
			),
			'zh' => array(
				'protect_login_tip'            => 'Baohu WordPress /wp-login.php denglu, fangzhi bot he zidong denglu changshi.',
				'protect_comments_tip'         => 'Baohu WordPress pinglun biaodan, fangzhi spam bot.',
				'protect_contact_tip'          => 'Baohu zhichi de biaodan chajian (Elementor Forms, CF7, WPForms).',
				'protect_woo_tip'              => 'Baohu WooCommerce "My Account" kehu denglu biaodan.',
				'protect_generic_tip'          => 'Yongyu zidingyi HTML biaodan (wu zhuanyong jicheng). Tianjia CSS xuanzeqi gei ProofShield shibie.',
				'login_lockout_title'          => 'Denglu shibai hou linshi fengsuo',
				'login_lockout_tip'            => 'Shezhi IP zai duoshao ci denglu shibai hou bei linshi fengsuo, yi ji fengsuo shichang (fenzhong).',
				'login_lockout_attempts_label' => 'Shibai cishu',
				'login_lockout_minutes_label'  => 'Fengsuo shichang (fenzhong)',
				'login_lockout_help'           => 'Shili: 5 ci shibai -> fengsuo 10 fenzhong.',
				'progressive_login_tip'        => 'Yu "Baohu denglu" de qubie: qianzhe shi qiyong denglu baohu, zheli zhikongzhi fengsuo qian de jinjie celue.',
				'progressive_login_note'       => 'Ke yongyu bimian zai shouci keyi changshi shi liji yange fengsuo. Fengsuo cishu he shichang zai shangfang shezhi.',
				'auto_level_title'             => 'Zidong baohu dengji',
				'auto_level_tip'               => 'ProofShield hui genju gongji yali he xitong fuzai zidong tiaozheng baohu dengji.',
				'auto_level_toggle'            => 'Zidong tiaozheng baohu dengji',
				'token_validity_title'         => 'Anquan token youxiaoqi (miao)',
				'token_validity_tip'           => 'Shezhi ProofShield token youxiaoshijian. Geng di = geng yange. Mored 120 miao.',
				'token_validity_help'          => 'Jianyi: 90-180 miao.',
				'geo_stats_title'              => 'Weizhi tongji (niminghua)',
				'geo_stats_tip'                => 'Bu baocun wanzheng IP, zhiyong niminghua IP fanwei.',
				'geo_stats_toggle'             => 'Qiyong ditu/guojia tongji (niminghua IP fanwei)',
				'geo_stats_help'               => 'Niminghua IP fanwei hui fasong dao waibu geo API yongyu dingwei.',
				'geo_map_toggle'               => 'Zai tongji zhong xianshi shijie ditu',
				'geo_map_help'                 => 'Ru bu xuyao shijie ditu ke guanbi. IP biaoge he qita tongji reng ke shiyong.',
				'ajax_rest_master_title'       => 'Baohu AJAX / REST',
				'ajax_rest_master_tip'         => 'Qiyong xuanding AJAX/REST endpoint de fuwuqi duan baohu.',
				'ajax_rest_master_toggle'      => 'Qiyong xuanding AJAX / REST endpoint baohu',
				'ajax_rest_master_help'        => 'Jin dui xiamian liechu de endpoint shengxiao.',
				'ajax_rest_auto_title'         => 'Zidong baohu (Beta)',
				'ajax_rest_auto_tip'           => 'Dui pipei de same-origin AJAX/REST qingqiu zidong fujia ProofShield anquan shuju.',
				'ajax_rest_auto_toggle'        => 'Dui pipei de AJAX/REST qingqiu zidong fasong anquan shuju',
				'ajax_rest_auto_help'          => 'Keneng yu shaoshu disanfang chajian bu jianrong.',
				'ajax_actions_title'           => 'Shoubaohu de AJAX actions',
				'ajax_actions_tip'             => 'Tianxie admin-ajax.php de action mingcheng, mei hang yi ge.',
				'ajax_actions_help'            => 'Mei hang yi ge AJAX action. Shili: my_custom_ajax_action',
				'rest_routes_title'            => 'Shoubaohu de REST endpoints',
				'rest_routes_tip'              => 'Dingyi xuyao baohu de WP REST route. Keyi zai jiewei yong * wildcard.',
				'rest_routes_help'             => 'Mei hang yi ge WP REST route (bu han domain he /wp-json).',
				'ajax_rest_excludes_title'     => 'Paichu (bu zidong baohu)',
				'ajax_rest_excludes_tip'       => 'Ru guo mou chajian/endpoint you wenti, zai ci tianjia URL path paichu.',
				'ajax_rest_excludes_help'      => 'Mei hang yi ge path huo moshi. * zuowei houzhui wildcard.',
			),
			default => array(
				'protect_login_tip'            => 'Schützt den WordPress-Login unter /wp-login.php vor Bots und automatisierten Anmeldeversuchen.',
				'protect_comments_tip'         => 'Schützt WordPress-Kommentarformulare auf Beiträgen und Seiten gegen Spam-Bots.',
				'protect_contact_tip'          => 'Schützt unterstützte Formular-Plugins wie Elementor Forms, Contact Form 7 und WPForms.',
				'protect_woo_tip'              => 'Schützt den WooCommerce Kunden-Login auf "Mein Konto" und ähnliche WooCommerce-Loginformulare.',
				'protect_generic_tip'          => 'Für eigene HTML-Formulare ohne spezielle Plugin-Integration. Tragen Sie CSS-Selektoren ein, damit ProofShield die Formulare erkennt.',
				'login_lockout_title'          => 'Login-Sperre bei Fehlversuchen',
				'login_lockout_tip'            => 'Legt fest, nach wie vielen fehlgeschlagenen Login-Versuchen eine IP temporär gesperrt wird und wie lange die Sperre dauert.',
				'login_lockout_attempts_label' => 'Anzahl Fehlversuche',
				'login_lockout_minutes_label'  => 'Sperrdauer (Minuten)',
				'login_lockout_help'           => 'Beispiel: 5 Fehlversuche -> 10 Minuten Sperre.',
				'progressive_login_tip'        => 'Unterschied zu "Login schützen": Dort aktivieren Sie den Login-Schutz grundsätzlich. Diese Option steuert nur, wie schnell vor einer Sperre eskaliert wird.',
				'progressive_login_note'       => 'Sinnvoll, um bei den ersten verdächtigen Login-Versuchen nicht sofort hart zu blockieren. Anzahl Fehlversuche und Sperrdauer stellen Sie oben bei der Login-Sperre ein.',
				'auto_level_title'             => 'Automatische Schutzstufe',
				'auto_level_tip'               => 'ProofShield passt die Schutzstufe automatisch an Ihr aktuelles Angriffsaufkommen und die Systemlast an.',
				'auto_level_toggle'            => 'Schutzstufe automatisch anpassen (Angriffslage & Systemlast)',
				'token_validity_title'         => 'Gültigkeit des Sicherheits-Tokens (Sekunden)',
				'token_validity_tip'           => 'Bestimmt, wie lange ein erzeugtes ProofShield-Token gültig ist. Niedriger = strenger, höher = benutzerfreundlicher. Standard: 120 Sekunden.',
				'token_validity_help'          => 'Empfehlung: 90-180 Sekunden. Bei sehr langen Formularen ggf. erhöhen.',
				'geo_stats_title'              => 'Standortstatistik (anonymisiert)',
				'geo_stats_tip'                => 'Speichert keine vollständigen IP-Adressen. Für Karten-/Länderansicht werden nur anonymisierte IP-Bereiche verwendet (IPv4 /24, IPv6 /48).',
				'geo_stats_toggle'             => 'Karten- und Länderauswertung aktivieren (anonymisierte IP-Bereiche)',
				'geo_stats_help'               => 'Hinweis: Für die Geolokalisierung werden anonymisierte IP-Bereiche an externe Geo-APIs gesendet.',
				'geo_map_toggle'               => 'Weltkarte in der Statistik anzeigen',
				'geo_map_help'                 => 'Deaktivieren, wenn Sie keine Weltkartenansicht möchten. IP-Tabelle und übrige Statistiken bleiben verfügbar.',
				'ajax_rest_master_title'       => 'AJAX / REST schützen',
				'ajax_rest_master_tip'         => 'Aktiviert den serverseitigen Schutz für ausgewählte AJAX- und REST-Endpunkte.',
				'ajax_rest_master_toggle'      => 'Schutz für ausgewählte AJAX- und REST-Endpunkte aktivieren',
				'ajax_rest_master_help'        => 'Empfohlen für moderne Formular-Plugins mit AJAX/REST. Der Schutz gilt nur für die unten eingetragenen Endpunkte.',
				'ajax_rest_auto_title'         => 'Automatischer Schutz (Beta)',
				'ajax_rest_auto_tip'           => 'Sendet ProofShield-Sicherheitsdaten bei passenden same-origin AJAX/REST-Requests automatisch per JavaScript mit.',
				'ajax_rest_auto_toggle'        => 'Sicherheitsdaten bei passenden AJAX/REST-Requests automatisch mitsenden',
				'ajax_rest_auto_help'          => 'Kann bei seltenen Drittanbieter-Plugins zu Inkompatibilitäten führen. Dann deaktivieren oder Ausnahmen nutzen.',
				'ajax_actions_title'           => 'Geschützte AJAX-Aktionen',
				'ajax_actions_tip'             => 'Hier tragen Sie die action-Namen von Requests an admin-ajax.php ein. Eine action pro Zeile.',
				'ajax_actions_help'            => 'Eine AJAX-action pro Zeile (admin-ajax.php). Beispiel: my_custom_ajax_action',
				'rest_routes_title'            => 'Geschützte REST-Endpunkte',
				'rest_routes_tip'              => 'Hier definieren Sie WP-REST-Endpunkte, die geschützt werden sollen. Wildcards mit * am Ende sind erlaubt.',
				'rest_routes_help'             => 'Eine WP-REST-Route pro Zeile (ohne Domain und ohne /wp-json). Wildcard * am Ende. Beispiel: /contact-form-7/v1/*',
				'ajax_rest_excludes_title'     => 'Ausnahmen (nicht automatisch schützen)',
				'ajax_rest_excludes_tip'       => 'Wenn ein Plugin oder Endpoint Probleme macht, tragen Sie hier den URL-Pfad als Ausnahme ein.',
				'ajax_rest_excludes_help'      => 'Optionale Ausnahmen: ein URL-Pfad oder Muster pro Zeile. * als Suffix-Wildcard.',
			),
		};
	}
}
