*/ private function primaryColor(): array { return [ 50 => '#F3F5EC', 100 => '#E7EBDA', 200 => '#D4DCBE', 300 => '#8B9D77', // Sálvia Silenciosa 400 => '#6E8354', 500 => '#61763A', 600 => '#556B2F', // Oliva Herança 700 => '#3E5219', // Oliva Profundo 800 => '#2E3D13', 900 => '#1F290D', 950 => '#141B08', ]; } /** * Heritage Editorial — paper/ink neutral ramp, replacing Filament's * stock Zinc gray so panel chrome (sidebar, topbar, body background, * borders) matches the public site's paper tones instead of true gray. * Anchored at the exact tokens where DESIGN.md defines them (50/100/200 * = Papel Marfim/Profundo/Arquivo, 300 = Linha Botânica, 500 = Tinta * Suave, 900 = Tinta Oliva); the remaining stops are interpolated to * keep the ramp monotonic. * * @return array */ private function grayColor(): array { return [ 50 => '#FBF9F4', // Papel Marfim 100 => '#F0EEE9', // Papel Profundo 200 => '#E4E2DD', // Papel Arquivo 300 => '#C5C8B8', // Linha Botânica 400 => '#919486', 500 => '#5D6155', // Tinta Suave 600 => '#43453D', 700 => '#32342E', 800 => '#252622', 900 => '#1B1C19', // Tinta Oliva 950 => '#121210', ]; } /** * Semantic ramps built the same way as the primary/gray ramps above: * an explicit 11-stop array (never `Color::hex()`) anchored so the * existing `--amare-color-{success,warning,error}` hex lands exactly on * shade 600 — verified against `ButtonComponentColorMap` to resolve to * `bg: 600` with white text at WCAG AA contrast, same as primary. * * @return array */ private function dangerColor(): array { return [ 50 => '#F7EDED', 100 => '#EBD1D1', 200 => '#D8A8A8', 300 => '#C88484', 400 => '#B85F5F', 500 => '#A73B3B', 600 => '#991B1B', 700 => '#7D1616', 800 => '#651212', 900 => '#4C0E0E', 950 => '#3A0A0A', ]; } /** * @return array */ private function warningColor(): array { return [ 50 => '#F6F0EC', 100 => '#E9D9CF', 200 => '#D6B6A3', 300 => '#C4987D', 400 => '#B37956', 500 => '#A15B30', 600 => '#92400E', 700 => '#78340B', 800 => '#602A09', 900 => '#492007', 950 => '#371805', ]; } /** * @return array */ private function successColor(): array { return [ 50 => '#ECF3EF', 100 => '#D0E0D6', 200 => '#A6C4B2', 300 => '#81AC91', 400 => '#5C9371', 500 => '#377B50', 600 => '#166534', 700 => '#12532B', 800 => '#0F4322', 900 => '#0B321A', 950 => '#082614', ]; } public function panel(Panel $panel): Panel { return $panel ->default() ->id('admin') ->path('admin') ->login() ->passwordReset(requestAction: RequestPasswordReset::class) ->brandName('Amare Assessoria') ->brandLogo(fn (): string => asset('brand/lockup-on-light.webp')) ->brandLogoHeight('2rem') ->colors([ 'primary' => $this->primaryColor(), 'gray' => $this->grayColor(), 'danger' => $this->dangerColor(), 'warning' => $this->warningColor(), 'success' => $this->successColor(), ]) // Heritage Editorial is a single paper palette by design (see // DESIGN.md) — no dark-mode variant exists, so the switcher is // removed rather than left pointing at an unstyled dark theme. ->darkMode(false) // Self-hosted EB Garamond, same family as the public site. // LocalFontProvider is pinned explicitly: HasFont::getFontProvider() // otherwise defaults a custom family to BunnyFontProvider, which // would emit a live request to fonts.bunny.net from the panel. // LocalFontProvider renders no /@font-face itself (no $url // given), so the actual face comes from the render hook below, // reusing the public site's own component/manifest. // // The monospace and serif faces are set too, not just the base // (sans) family: Filament exposes them via the separate // ->monoFont()/->serifFont() calls below, and the `KeyValue` // field (used in ManageSiteSettings) renders in the monospace // face directly — left unset, that field would silently fall // back to a system monospace stack instead of EB Garamond, // breaking Heritage Editorial's single-voice typography. ->font('EB Garamond', provider: LocalFontProvider::class) ->monoFont('EB Garamond', provider: LocalFontProvider::class) ->serifFont('EB Garamond', provider: LocalFontProvider::class) ->renderHook( PanelsRenderHook::HEAD_END, fn (): string => view('components.fonts')->render(), ) // Compiled Filament theme entry — sharp corners, flat surfaces // (see resources/css/filament/admin/theme.css for the full // rationale and the two vendored-CSS exceptions it can't reach). ->viteTheme('resources/css/filament/admin/theme.css') ->discoverResources(in: app_path('Filament/Resources'), for: 'App\Filament\Resources') ->discoverPages(in: app_path('Filament/Pages'), for: 'App\Filament\Pages') ->pages([ Dashboard::class, ]) ->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\Filament\Widgets') ->widgets([ AccountWidget::class, FilamentInfoWidget::class, ]) ->middleware([ EncryptCookies::class, AddQueuedCookiesToResponse::class, StartSession::class, AuthenticateSession::class, ShareErrorsFromSession::class, PreventRequestForgery::class, SubstituteBindings::class, DisableBladeIconComponents::class, DispatchServingFilamentEvent::class, ]) ->authMiddleware([ Authenticate::class, ]); } }