{{ __('Admin') }} {{ __('Settings') }} {{ __('Appearance') }}
{{-- Reset form lives OUTSIDE the colours form (forms can't nest). The reset button in the aside submits it via its form="appearance-reset" attribute. --}} @php $groups = collect($palette)->groupBy(fn ($m) => $m[2], true); @endphp
@csrf
{{ __('Admin · Appearance') }}

{{ __('Dashboard') }} {{ __('colours') }}.

{{ __('Recolour the entire app — every page of the user dashboard AND the admin panel — by changing these theme colours. Saving applies instantly to everyone; no rebuild needed. Leave a colour at its default to keep the shipped look.') }}

{{ __('All settings') }} @if (session('status')) {{ session('status') }} @endif
{{-- LEFT — sliders, then colour groups --}}
{{-- User dashboard layout — classic top bar vs admin-style left sidebar. Global for every user account. --}}
{{ __('User dashboard') }}

{{ __('Navigation layout') }}

{{ __('Choose how the user dashboard is laid out. Sidebar moves every menu into a left rail (no top header, no “More” page).') }}

@foreach ([['topbar', __('Top bar'), __('Current — menu across the top + a “More” page for overflow.')], ['sidebar', __('Sidebar'), __('Admin-style left rail with all features grouped. No top menu.')]] as $opt) @php $__sel = ($userLayout ?? 'topbar') === $opt[0]; @endphp @endforeach
{{ __('User dashboard') }}

{{ __('Sidebar colour') }}

{{ __('The dark left rail background (Sidebar layout only). Leave the default for the shipped near-black.') }}

{{-- Background — always applied (blank posts default). --}}
{{ __('Background') }}
@foreach ([ ['key' => 'user_sidebar_text_color', 'label' => __('Text colour'), 'value' => $sidebarTextColor, 'default' => '#FBFAF6', 'auto' => __('Auto (contrast)')], ['key' => 'user_sidebar_accent_color', 'label' => __('Accent colour'),'value' => $sidebarAccentColor, 'default' => '#25D366', 'auto' => __('Default green')], ] as $c) @php $on = trim((string) ($c['value'] ?? '')) !== ''; @endphp
{{ $c['label'] }}
@endforeach

{{ __('Untick “Custom” to auto-pick text for contrast and use the default green accent. Sidebar layout only.') }}

{{-- Size + opacity sliders. Both write a plain integer percent; theme_css() turns them into html{zoom} and body{opacity}. --}}
{{ __('Size & opacity') }}

{{ __('Interface') }}

{{ count($metrics) }} {{ __('controls') }}
@foreach ($metrics as $key => $m) @php $val = $metricValues[$key] ?? $m[1]; @endphp
{{ $val }}{{ $m[4] }}

{{ __($m[5]) }}

@endforeach
@foreach ($groups as $groupName => $tokens)
{{ \Illuminate\Support\Str::slug($groupName) }}

{{ __($groupName) }}

{{ count($tokens) }} {{ __('tokens') }}
@foreach ($tokens as $key => $m) @php $hex = $values[$key] ?? ($m[1] ?? '#000000'); @endphp @endforeach
@endforeach
{{-- RIGHT — live preview, then guide + reset --}}
{{-- Sticky save bar --}}
{{ __('Applies to the whole dashboard the moment you save.') }}
{{ __('Cancel') }}