@extends('layouts.admin')

@section('title', 'Settings')

@php
    $checked = fn ($key) => filter_var(old($key, $settings[$key] ?? false), FILTER_VALIDATE_BOOLEAN) ? 'checked' : '';
@endphp

@section('content')
    <div class="d-flex flex-wrap justify-content-between align-items-center mb-2">
        <div>
            <div class="loot-muted">Settings / Platform controls</div>
            <h1 class="loot-section-title mb-0">Settings</h1>
        </div>
        <a href="{{ route('home') }}" class="btn btn-outline-light" target="_blank">Preview site</a>
    </div>

    @if(session('success'))
        <div class="alert alert-success"><div class="alert-body">{{ session('success') }}</div></div>
    @endif

    @if($errors->any())
        <div class="alert alert-danger">
            <div class="alert-body">
                @foreach($errors->all() as $error)
                    <p class="mb-0">{{ $error }}</p>
                @endforeach
            </div>
        </div>
    @endif

    <form action="{{ route('admin.settings.update') }}" method="POST" enctype="multipart/form-data">
        @csrf
        <div class="user-page-card admin-settings-card">
            <ul class="nav nav-pills admin-settings-tabs" role="tablist">
                @foreach([
                    'protection' => 'Protection',
                    'postback' => 'Postback',
                    'curation' => 'Curation',
                    'third-party' => 'Third Party',
                    'ai' => 'AI Assistant',
                    'referral' => 'Referral',
                    'levels' => 'Levels',
                    'leaderboard' => 'Leaderboard',
                    'streaks' => 'Streaks',
                    'social' => 'Social Media',
                    'branding' => 'Branding',
                ] as $target => $label)
                    <li class="nav-item" role="presentation">
                        <button class="nav-link {{ $loop->first ? 'active' : '' }}" data-bs-toggle="pill" data-bs-target="#settings-{{ $target }}" type="button" role="tab">
                            {{ $label }}
                        </button>
                    </li>
                @endforeach
            </ul>

            <div class="tab-content admin-settings-content">
                <div class="tab-pane fade show active" id="settings-protection" role="tabpanel">
                    <div class="admin-setting-section">
                        <h4>Accounts</h4>
                        <label class="loot-check-line">
                            <input type="hidden" name="protection_max_accounts_per_ip" value="0">
                            <input type="checkbox" name="protection_max_accounts_per_ip" value="1" {{ $checked('protection_max_accounts_per_ip') }}>
                            <span><strong>Enable max accounts per IP</strong><small>Limit how many accounts can be created from the same IP address per week.</small></span>
                        </label>
                        <label class="form-label">Max accounts per IP</label>
                        <input class="form-control" type="number" min="1" max="50" name="protection_max_accounts_count" value="{{ old('protection_max_accounts_count', $settings['protection_max_accounts_count']) }}">
                    </div>

                    <div class="admin-setting-section">
                        <h4>Change IP</h4>
                        <label class="loot-check-line">
                            <input type="hidden" name="protection_ip_change" value="0">
                            <input type="checkbox" name="protection_ip_change" value="1" {{ $checked('protection_ip_change') }}>
                            <span><strong>Enable IP change protection</strong><small>Prevent users from browsing the dashboard with a different IP than registration.</small></span>
                        </label>
                        <label class="loot-check-line">
                            <input type="hidden" name="protection_auto_block_ip_change" value="0">
                            <input type="checkbox" name="protection_auto_block_ip_change" value="1" {{ $checked('protection_auto_block_ip_change') }}>
                            <span><strong>Auto block account</strong><small>Ban the account automatically when an IP change is detected.</small></span>
                        </label>
                    </div>

                    <div class="admin-setting-section">
                        <h4>Email</h4>
                        <label class="loot-check-line">
                            <input type="hidden" name="protection_custom_email_domains" value="0">
                            <input type="checkbox" name="protection_custom_email_domains" value="1" {{ $checked('protection_custom_email_domains') }}>
                            <span><strong>Custom domain allowlist</strong><small>Only allow registrations from specific email domains.</small></span>
                        </label>
                        <label class="form-label">Domains</label>
                        <input class="form-control" name="protection_email_domains" value="{{ old('protection_email_domains', $settings['protection_email_domains']) }}" placeholder="gmail.com,yahoo.com,outlook.com">
                        <small class="loot-muted">Comma separated domain list.</small>
                        <label class="loot-check-line mt-1">
                            <input type="hidden" name="protection_verify_email_withdraw" value="0">
                            <input type="checkbox" name="protection_verify_email_withdraw" value="1" {{ $checked('protection_verify_email_withdraw') }}>
                            <span><strong>Verify email to withdraw</strong><small>Require email verification before cashout requests.</small></span>
                        </label>
                        <label class="loot-check-line mt-1">
                            <input type="hidden" name="protection_verify_email_earn" value="0">
                            <input type="checkbox" name="protection_verify_email_earn" value="1" {{ $checked('protection_verify_email_earn') }}>
                            <span><strong>Verify email to earn</strong><small>Require email verification before the earn/offer pages can be used.</small></span>
                        </label>
                        <label class="loot-check-line mt-1">
                            <input type="hidden" name="protection_require_face_verification" value="0">
                            <input type="checkbox" name="protection_require_face_verification" value="1" {{ $checked('protection_require_face_verification') }}>
                            <span><strong>Require face verification for cashout</strong><small>Users must pass a webcam face check (with duplicate-face detection) before withdrawing. Turn off to disable the face requirement.</small></span>
                        </label>
                        <label class="loot-check-line mt-1">
                            <input type="hidden" name="protection_block_disposable_emails" value="0">
                            <input type="checkbox" name="protection_block_disposable_emails" value="1" {{ $checked('protection_block_disposable_emails') }}>
                            <span><strong>Block disposable emails</strong><small>Reject registrations from known temporary/throwaway email providers.</small></span>
                        </label>
                        <label class="form-label mt-1">Extra disposable domains</label>
                        <input class="form-control" name="protection_disposable_email_domains"
                               value="{{ old('protection_disposable_email_domains', $settings['protection_disposable_email_domains']) }}"
                               placeholder="tempmail.xyz,burner.example (comma-separated, added to the built-in list)">
                        <label class="loot-check-line mt-1">
                            <input type="hidden" name="two_factor_site_enabled" value="0">
                            <input type="checkbox" name="two_factor_site_enabled" value="1" {{ $checked('two_factor_site_enabled') }}>
                            <span><strong>Enable two-factor authentication</strong><small>Let users and admins protect their account with an email code or authenticator app (managed on their Profile page).</small></span>
                        </label>
                    </div>

                    <div class="admin-setting-section">
                        <h4>Country</h4>
                        <label class="loot-check-line">
                            <input type="hidden" name="offers_geo_filter_enabled" value="0">
                            <input type="checkbox" name="offers_geo_filter_enabled" value="1" {{ $checked('offers_geo_filter_enabled') }}>
                            <span><strong>Geo-filter API offers</strong><small>Only show direct/API offers available in the visitor's country (detected from their IP). Turn off to show every offer to everyone.</small></span>
                        </label>
                        <label class="loot-check-line mt-1">
                            <input type="hidden" name="protection_block_countries" value="0">
                            <input type="checkbox" name="protection_block_countries" value="1" {{ $checked('protection_block_countries') }}>
                            <span><strong>Block countries</strong><small>Block requests when the server/proxy provides a matching country code.</small></span>
                        </label>
                        <label class="form-label">Countries</label>
                        <input class="form-control" name="protection_blocked_countries" value="{{ old('protection_blocked_countries', $settings['protection_blocked_countries']) }}" placeholder="US,CA,UK">
                        <small class="loot-muted">Comma separated ISO country codes.</small>
                    </div>

                    <div class="admin-setting-section">
                        <div class="d-flex justify-content-between align-items-center gap-1">
                            <h4>IPQualityScore</h4>
                            <a href="https://www.ipqualityscore.com/" class="btn btn-sm btn-outline-light" target="_blank" rel="noopener">Help</a>
                        </div>
                        <label class="loot-check-line">
                            <input type="hidden" name="protection_ipqualityscore_enabled" value="0">
                            <input type="checkbox" name="protection_ipqualityscore_enabled" value="1" {{ $checked('protection_ipqualityscore_enabled') }}>
                            <span><strong>Enable IPQualityScore</strong><small>Check proxy/VPN/fraud score on protected offer pages.</small></span>
                        </label>
                        <label class="form-label">API Key</label>
                        <input class="form-control" name="protection_ipqualityscore_api_key" type="password" autocomplete="new-password" value="" placeholder="{{ $settings['protection_ipqualityscore_api_key'] ? 'Saved — leave blank to keep, type clear to remove' : 'Not set' }}">
                        <label class="form-label mt-1">Risk Threshold</label>
                        <input class="form-control" type="number" min="1" max="100" name="protection_ipqualityscore_threshold" value="{{ old('protection_ipqualityscore_threshold', $settings['protection_ipqualityscore_threshold']) }}">
                    </div>

                    <div class="admin-setting-section">
                        <div class="d-flex justify-content-between align-items-center gap-1">
                            <h4>ProxyCheck.io</h4>
                            <a href="https://proxycheck.io/" class="btn btn-sm btn-outline-light" target="_blank" rel="noopener">Help</a>
                        </div>
                        <label class="loot-check-line">
                            <input type="hidden" name="protection_proxycheck_enabled" value="0">
                            <input type="checkbox" name="protection_proxycheck_enabled" value="1" {{ $checked('protection_proxycheck_enabled') }}>
                            <span><strong>Enable ProxyCheck</strong><small>Use real-time proxy/VPN detection on protected offer pages.</small></span>
                        </label>
                        <label class="form-label">API Key</label>
                        <input class="form-control" name="protection_proxycheck_api_key" type="password" autocomplete="new-password" value="" placeholder="{{ $settings['protection_proxycheck_api_key'] ? 'Saved — leave blank to keep, type clear to remove' : 'Not set' }}">
                        <label class="form-label mt-1">Risk Threshold</label>
                        <input class="form-control" type="number" min="1" max="100" name="protection_proxycheck_threshold" value="{{ old('protection_proxycheck_threshold', $settings['protection_proxycheck_threshold']) }}">
                    </div>
                </div>

                <div class="tab-pane fade" id="settings-postback" role="tabpanel">
                    <div class="admin-setting-section">
                        <h4>Provider callbacks</h4>
                        <label class="loot-check-line">
                            <input type="hidden" name="postback_require_signature" value="0">
                            <input type="checkbox" name="postback_require_signature" value="1" {{ $checked('postback_require_signature') }}>
                            <span><strong>Require signature</strong><small>Reject any provider callback that has no secret/scheme configured (either here or on that provider's Offerwall entry). Turn this on once every active provider has a secret set.</small></span>
                        </label>
                        <label class="form-label">Postback secret</label>
                        <input class="form-control" name="postback_secret" type="password" autocomplete="new-password" value="" placeholder="{{ $settings['postback_secret'] ? 'Saved — leave blank to keep, type clear to remove' : 'Not set' }}">
                        <small class="loot-muted">Used for any provider that doesn't have its own secret configured on the Offerwalls page.</small>
                        <label class="form-label mt-1">Postback IP whitelist</label>
                        <input class="form-control" name="postback_ip_whitelist" value="{{ old('postback_ip_whitelist', $settings['postback_ip_whitelist']) }}" placeholder="34.120.10.5, 52.5.0.0/16">
                        <small class="loot-muted">Comma separated IPs or CIDR ranges. When set, provider callbacks from any other IP are rejected. Leave empty to allow all (signature still applies).</small>
                        <label class="form-label mt-1">Duplicate callback window (minutes)</label>
                        <input class="form-control" type="number" min="1" max="1440" name="postback_duplicate_window" value="{{ old('postback_duplicate_window', $settings['postback_duplicate_window']) }}">
                        <label class="form-label mt-1">Maximum single postback amount</label>
                        <input class="form-control" type="number" min="1" name="postback_max_amount" value="{{ old('postback_max_amount', $settings['postback_max_amount']) }}">
                        <small class="loot-muted">Postbacks reporting more than this many points/coins in one call are rejected as likely fraud or a misconfigured feed.</small>
                    </div>
                </div>

                <div class="tab-pane fade" id="settings-curation" role="tabpanel">
                    <div class="admin-setting-section">
                        <h4>Hot / Featured auto-curation</h4>
                        <label class="loot-check-line">
                            <input type="hidden" name="curation_auto_enabled" value="0">
                            <input type="checkbox" name="curation_auto_enabled" value="1" {{ $checked('curation_auto_enabled') }}>
                            <span><strong>Enable auto-curation</strong><small>Automatically flag the best offers as Hot/Featured every time offers sync (daily as a backup pass). Offers an admin has "locked" are never touched.</small></span>
                        </label>
                        <label class="form-label">Hot offers per category</label>
                        <input class="form-control" type="number" min="0" max="50" name="curation_hot_count" value="{{ old('curation_hot_count', $settings['curation_hot_count']) }}">
                        <small class="loot-muted">The top-scoring offers in each category (games, surveys, other, partners) are marked Hot.</small>
                        <label class="form-label mt-1">Minimum reward for Featured</label>
                        <input class="form-control" type="number" min="0" name="curation_featured_min_reward" value="{{ old('curation_featured_min_reward', $settings['curation_featured_min_reward']) }}">
                        <small class="loot-muted">Any offer paying at least this many points/coins is marked Featured.</small>
                    </div>
                </div>

                <div class="tab-pane fade" id="settings-third-party" role="tabpanel">
                    <div class="admin-setting-section">
                        <h4>reCAPTCHA</h4>
                        <label class="loot-check-line">
                            <input type="hidden" name="third_party_recaptcha_enabled" value="0">
                            <input type="checkbox" name="third_party_recaptcha_enabled" value="1" {{ $checked('third_party_recaptcha_enabled') }}>
                            <span><strong>Enable reCAPTCHA</strong><small>Use these keys when captcha protection is enabled.</small></span>
                        </label>
                        <label class="form-label">Site key</label>
                        <input class="form-control" name="third_party_recaptcha_site_key" value="{{ old('third_party_recaptcha_site_key', $settings['third_party_recaptcha_site_key']) }}">
                        <label class="form-label mt-1">Secret key</label>
                        <input class="form-control" name="third_party_recaptcha_secret_key" type="password" autocomplete="new-password" value="" placeholder="{{ $settings['third_party_recaptcha_secret_key'] ? 'Saved — leave blank to keep, type clear to remove' : 'Not set' }}">
                    </div>
                </div>

                <div class="tab-pane fade" id="settings-ai" role="tabpanel">
                    <div class="admin-setting-section">
                        <div class="d-flex justify-content-between align-items-center gap-1">
                            <h4>AI admin assistant</h4>
                            <a href="https://openrouter.ai/keys" class="btn btn-sm btn-outline-light" target="_blank" rel="noopener">Get key</a>
                        </div>
                        <label class="loot-check-line">
                            <input type="hidden" name="ai_assistant_enabled" value="0">
                            <input type="checkbox" name="ai_assistant_enabled" value="1" {{ $checked('ai_assistant_enabled') }}>
                            <span><strong>Enable AI assistant</strong><small>Adds a chat assistant to the admin panel for analytics, operations and questions.</small></span>
                        </label>
                        <label class="loot-check-line">
                            <input type="hidden" name="ai_support_bot_enabled" value="0">
                            <input type="checkbox" name="ai_support_bot_enabled" value="1" {{ $checked('ai_support_bot_enabled') }}>
                            <span><strong>Enable user support bot</strong><small>Lets members ask the AI on the Support page first; it suggests opening a ticket when it can't answer.</small></span>
                        </label>
                        <label class="form-label mt-1">Provider</label>
                        <select class="form-select" name="ai_provider">
                            <option value="openrouter" {{ ($settings['ai_provider'] ?? 'openrouter') === 'openrouter' ? 'selected' : '' }}>OpenRouter</option>
                            <option value="nvidia" {{ ($settings['ai_provider'] ?? '') === 'nvidia' ? 'selected' : '' }}>NVIDIA</option>
                        </select>
                        <label class="form-label mt-1">API key</label>
                        <input class="form-control" type="password" name="ai_api_key" autocomplete="new-password"
                               type="password" autocomplete="new-password" value="" placeholder="{{ $settings['ai_api_key'] ? 'Saved — leave blank to keep, type clear to remove' : 'Not set' }}" placeholder="sk-or-… or nvapi-…">
                        <small class="loot-muted">Stored on the server only — it is never sent to the browser.</small>
                        <label class="form-label mt-1">Default model</label>
                        <input class="form-control" name="ai_model" value="{{ old('ai_model', $settings['ai_model']) }}"
                               placeholder="openai/gpt-4o-mini" list="aiModelSuggestions">
                        <datalist id="aiModelSuggestions">
                            <option value="openai/gpt-4o-mini"></option>
                            <option value="openai/gpt-4o"></option>
                            <option value="anthropic/claude-3.5-sonnet"></option>
                            <option value="google/gemini-flash-1.5"></option>
                            <option value="meta-llama/llama-3.1-70b-instruct"></option>
                            <option value="deepseek/deepseek-chat"></option>
                            <option value="meta/llama-3.1-70b-instruct"></option>
                            <option value="nvidia/llama-3.1-nemotron-70b-instruct"></option>
                        </datalist>
                        <small class="loot-muted">Use the model id from your provider. You can also switch models inside the chat window.</small>
                    </div>
                </div>

                <div class="tab-pane fade" id="settings-referral" role="tabpanel">
                    <div class="admin-setting-section">
                        <h4>Referral program</h4>
                        <label class="loot-check-line">
                            <input type="hidden" name="referral_enabled" value="0">
                            <input type="checkbox" name="referral_enabled" value="1" {{ $checked('referral_enabled') }}>
                            <span><strong>Enable referrals</strong><small>Show referral pages and reward referred activity.</small></span>
                        </label>
                        <div class="row">
                            <div class="col-md-6 mb-1"><label class="form-label">Commission percent</label><input class="form-control" type="number" step="0.01" name="referral_commission_percent" value="{{ old('referral_commission_percent', $settings['referral_commission_percent']) }}"></div>
                            <div class="col-md-6 mb-1"><label class="form-label">Signup bonus coins</label><input class="form-control" type="number" step="0.01" name="referral_signup_bonus" value="{{ old('referral_signup_bonus', $settings['referral_signup_bonus']) }}"></div>
                        </div>
                    </div>
                </div>

                <div class="tab-pane fade" id="settings-levels" role="tabpanel">
                    <div class="admin-setting-section">
                        <h4>Levels</h4>
                        <label class="loot-check-line">
                            <input type="hidden" name="levels_enabled" value="0">
                            <input type="checkbox" name="levels_enabled" value="1" {{ $checked('levels_enabled') }}>
                            <span><strong>Enable levels</strong><small>Use user total points to calculate progression.</small></span>
                        </label>
                        <label class="form-label">Coins per level</label>
                        <input class="form-control" type="number" min="1" name="level_points_step" value="{{ old('level_points_step', $settings['level_points_step']) }}">
                    </div>
                </div>

                <div class="tab-pane fade" id="settings-leaderboard" role="tabpanel">
                    <div class="admin-setting-section">
                        <h4>Leaderboard</h4>
                        <label class="loot-check-line">
                            <input type="hidden" name="leaderboard_enabled" value="0">
                            <input type="checkbox" name="leaderboard_enabled" value="1" {{ $checked('leaderboard_enabled') }}>
                            <span><strong>Enable leaderboard</strong><small>Allow users to view public ranking pages.</small></span>
                        </label>
                        <label class="form-label">Period</label>
                        <select class="form-select" name="leaderboard_period">
                            @foreach(['daily' => 'Daily', 'weekly' => 'Weekly', 'monthly' => 'Monthly', 'all_time' => 'All time'] as $value => $label)
                                <option value="{{ $value }}" {{ old('leaderboard_period', $settings['leaderboard_period']) === $value ? 'selected' : '' }}>{{ $label }}</option>
                            @endforeach
                        </select>
                        <p class="loot-muted mt-1 mb-1">Only members with credited offer earnings inside the selected period are ranked. Choose how many qualifying members appear in each board.</p>
                        <div class="row">
                            @foreach(['daily' => 'Daily', 'weekly' => 'Weekly', 'monthly' => 'Monthly', 'all_time' => 'All time'] as $value => $label)
                                <div class="col-md-6 mb-1">
                                    <label class="form-label">{{ $label }} member limit</label>
                                    <input class="form-control" type="number" min="25" max="50" step="1"
                                           name="leaderboard_{{ $value }}_limit"
                                           value="{{ old('leaderboard_'.$value.'_limit', $settings['leaderboard_'.$value.'_limit']) }}">
                                </div>
                            @endforeach
                        </div>
                    </div>
                </div>

                <div class="tab-pane fade" id="settings-streaks" role="tabpanel">
                    <div class="admin-setting-section">
                        <h4>Streaks</h4>
                        <label class="loot-check-line">
                            <input type="hidden" name="streaks_enabled" value="0">
                            <input type="checkbox" name="streaks_enabled" value="1" {{ $checked('streaks_enabled') }}>
                            <span><strong>Enable streaks</strong><small>Use daily activity rewards when streak logic is enabled.</small></span>
                        </label>
                        <label class="form-label">Daily streak bonus coins</label>
                        <input class="form-control" type="number" step="0.01" min="0" name="streak_daily_bonus" value="{{ old('streak_daily_bonus', $settings['streak_daily_bonus']) }}">
                    </div>
                </div>

                <div class="tab-pane fade" id="settings-social" role="tabpanel">
                    <div class="admin-setting-section">
                        <h4>Social Media</h4>
                        <div class="row">
                            <div class="col-md-6 mb-1"><label class="form-label">Facebook URL</label><input class="form-control" name="social_facebook" value="{{ old('social_facebook', $settings['social_facebook']) }}"></div>
                            <div class="col-md-6 mb-1"><label class="form-label">Discord URL</label><input class="form-control" name="social_discord" value="{{ old('social_discord', $settings['social_discord']) }}"></div>
                            <div class="col-md-6 mb-1"><label class="form-label">X URL</label><input class="form-control" name="social_x" value="{{ old('social_x', $settings['social_x']) }}"></div>
                            <div class="col-md-6 mb-1"><label class="form-label">Telegram URL</label><input class="form-control" name="social_telegram" value="{{ old('social_telegram', $settings['social_telegram']) }}"></div>
                        </div>
                    </div>
                </div>

                <div class="tab-pane fade" id="settings-branding" role="tabpanel">
                    <div class="admin-setting-section">
                        <h4>Brand Identity</h4>
                        <div class="row">
                            <div class="col-md-6 mb-1"><label class="form-label">Site name</label><input class="form-control" name="brand_name" value="{{ old('brand_name', $settings['brand_name']) }}" required></div>
                            <div class="col-md-6 mb-1"><label class="form-label">Domain</label><input class="form-control" name="domain" value="{{ old('domain', $settings['domain']) }}" required></div>
                            <div class="col-12 mb-1"><label class="form-label">Tagline</label><input class="form-control" name="tagline" value="{{ old('tagline', $settings['tagline']) }}" required></div>
                            <div class="col-md-6 mb-1"><label class="form-label">Points label</label><input class="form-control" name="points_name" value="{{ old('points_name', $settings['points_name']) }}" required></div>
                            <div class="col-md-6 mb-1"><label class="form-label">Support email</label><input class="form-control" name="support_email" value="{{ old('support_email', $settings['support_email']) }}" required></div>
                            <div class="col-md-6 mb-1"><label class="form-label">Primary color</label><input class="form-control" name="primary_color" value="{{ old('primary_color', $settings['primary_color']) }}" required></div>
                            <div class="col-md-6 mb-1"><label class="form-label">Accent color</label><input class="form-control" name="accent_color" value="{{ old('accent_color', $settings['accent_color']) }}" required></div>
                            <div class="col-12"><small class="loot-muted">Advanced theme (optional — leave blank for the default dark theme). Applies everywhere: landing, dashboard and admin.</small></div>
                            <div class="col-md-4 mb-1"><label class="form-label">Background</label><input class="form-control" name="theme_bg" value="{{ old('theme_bg', $settings['theme_bg']) }}" placeholder="#07110d"></div>
                            <div class="col-md-4 mb-1"><label class="form-label">Card surface</label><input class="form-control" name="theme_surface" value="{{ old('theme_surface', $settings['theme_surface']) }}" placeholder="#0f1d17"></div>
                            <div class="col-md-4 mb-1"><label class="form-label">Raised surface</label><input class="form-control" name="theme_surface_2" value="{{ old('theme_surface_2', $settings['theme_surface_2']) }}" placeholder="#16271f"></div>
                            <div class="col-md-6 mb-1"><label class="form-label">Text color</label><input class="form-control" name="theme_text" value="{{ old('theme_text', $settings['theme_text']) }}" placeholder="#f6f8fb"></div>
                            <div class="col-md-6 mb-1"><label class="form-label">Muted text</label><input class="form-control" name="theme_muted" value="{{ old('theme_muted', $settings['theme_muted']) }}" placeholder="#a1b8ae"></div>
                            <div class="col-md-6 mb-1"><label class="form-label">Logo</label><input type="file" name="logo" class="form-control" accept=".svg,.png,.jpg,.jpeg,.webp,image/svg+xml,image/png,image/jpeg,image/webp"></div>
                            <div class="col-md-6 mb-1"><label class="form-label">Favicon</label><input type="file" name="favicon" class="form-control" accept=".svg,.png,.ico,.jpg,.jpeg,.webp,image/svg+xml,image/png,image/jpeg,image/webp,image/x-icon"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <button class="btn btn-loot mt-2">Save changes</button>
    </form>
@endsection
