/*
    Berry — the admin panel's look (FD, 2026-09-16).

    The palette, type and surfaces from the navigation proposal, applied to
    Filament's own components by overriding its stable `fi-*` classes and
    the colour variables the panel defines from `->colors()`. No Tailwind
    build is involved: this file is served as-is and registered on the panel
    in AdminPanelProvider, after Filament's own stylesheet, so an equal
    selector here wins.

    Tokens — the neutrals are the panel's `gray` palette (a warm stone,
    defined in AdminPanelProvider); the accent is the `primary` palette
    (amber). The few extra tokens the design needs sit here.
*/
:root {
    --berry-side: #fbfaf7;              /* the sidebar, a shade lighter than the ground */
    --berry-panel: #ffffff;             /* cards, the top bar, tables */
    --berry-accent-soft: #fbebd2;       /* the active section's background */
    --berry-accent-ink: #7c3a02;        /* text on the accent-soft ground */
    --berry-shadow: 0 1px 2px 0 rgba(30, 27, 20, 0.06);
    --berry-font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --berry-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
}

.dark {
    --berry-side: #191712;
    --berry-panel: var(--gray-900);
    --berry-accent-soft: #3a2a0c;
    --berry-accent-ink: #fbd38d;
    --berry-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
}

/* ---- Type -------------------------------------------------------------- */

.fi-body {
    font-family: var(--berry-font);
    font-variant-numeric: tabular-nums;
}

.fi-body code,
.fi-body kbd,
.fi-body pre,
.fi-body .fi-ta-text-item-mono,
.fi-body .jps-mono {
    font-family: var(--berry-mono);
}

.fi-body .fi-header-heading {
    font-size: 1.375rem;
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

.fi-body .fi-header-subheading {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.fi-body .fi-breadcrumbs ol li {
    font-size: 0.8125rem;
}

/* ---- Sidebar ----------------------------------------------------------- */

.fi-body .fi-sidebar {
    background-color: var(--berry-side);
    border-inline-end: 1px solid var(--gray-200);
}

.fi-body .fi-sidebar:where(.dark, .dark *) {
    background-color: var(--berry-side);
    border-inline-end-color: var(--gray-800);
}

.fi-body .fi-sidebar-header {
    border-bottom: 1px solid var(--gray-200);
    justify-content: flex-start;
    padding-inline: 1rem;
}

/* The horizontal lockup (public/images/berry-logo-horizontal.svg) reads at
   this size inside the 4rem header; the square file would not. */
.fi-body .fi-sidebar-header .fi-logo {
    height: 2.75rem;
    width: auto;
}

.fi-body .fi-sidebar-header:where(.dark, .dark *) {
    border-bottom-color: var(--gray-800);
}

.fi-body .fi-sidebar-nav {
    padding-inline: 1rem;
    padding-block: 0.75rem;
    row-gap: 1rem;
}

.fi-body .fi-sidebar-item-btn {
    border-radius: 8px;
    transition: background-color 0.12s ease;
}

.fi-body .fi-sidebar-item-btn:hover {
    background-color: var(--gray-100);
}

.fi-body .fi-sidebar-item-btn:hover:where(.dark, .dark *) {
    background-color: var(--gray-800);
}

.fi-body .fi-sidebar-item-btn > .fi-icon {
    color: var(--gray-500);
}

.fi-body .fi-sidebar-item-label {
    color: var(--gray-700);
}

.fi-body .fi-sidebar-item-label:where(.dark, .dark *) {
    color: var(--gray-300);
}

.fi-body .fi-sidebar-item.fi-active > .fi-sidebar-item-btn,
.fi-body .fi-sidebar-item.fi-active > .fi-sidebar-item-btn:where(.dark, .dark *) {
    background-color: var(--berry-accent-soft);
}

.fi-body .fi-sidebar-item.fi-active > .fi-sidebar-item-btn > .fi-icon {
    color: var(--primary-600);
}

.fi-body .fi-sidebar-item.fi-active > .fi-sidebar-item-btn > .fi-icon:where(.dark, .dark *) {
    color: var(--primary-400);
}

.fi-body .fi-sidebar-item.fi-active > .fi-sidebar-item-btn > .fi-sidebar-item-label,
.fi-body .fi-sidebar-item.fi-active > .fi-sidebar-item-btn > .fi-sidebar-item-label:where(.dark, .dark *) {
    color: var(--berry-accent-ink);
}

/* ---- Top bar ----------------------------------------------------------- */

.fi-body .fi-topbar {
    background-color: var(--berry-panel);
    --tw-shadow: 0 0 #0000;
    --tw-ring-shadow: 0 0 #0000;
    box-shadow: inset 0 -1px 0 var(--gray-200);
}

.fi-body .fi-topbar:where(.dark, .dark *) {
    background-color: var(--berry-panel);
    box-shadow: inset 0 -1px 0 var(--gray-800);
}

/* ---- The section tab row (cluster sub-navigation) --------------------- */
/* Underline tabs along the top of the page, not a floating pill bar.     */
/* `fi-page-sub-navigation-tabs` sits on the `fi-tabs` element itself.   */

.fi-body .fi-tabs.fi-page-sub-navigation-tabs,
.fi-body .fi-tabs.fi-page-sub-navigation-tabs:where(.dark, .dark *) {
    width: 100%;
    justify-content: flex-start;
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    border-bottom: 1px solid var(--gray-200);
    column-gap: 0.125rem;
    --tw-shadow: 0 0 #0000;
    --tw-ring-shadow: 0 0 #0000;
    box-shadow: none;
}

.fi-body .fi-tabs.fi-page-sub-navigation-tabs:where(.dark, .dark *) {
    border-bottom-color: var(--gray-800);
}

/* No negative margin here: the container scrolls horizontally on narrow
   screens, and an item hanging 1px below it puts a scrollbar on the row. */
.fi-body .fi-page-sub-navigation-tabs .fi-tabs-item {
    border-radius: 0;
    border-bottom: 2px solid transparent;
    padding-block: 0.5rem;
    padding-inline: 0.625rem;
}

.fi-body .fi-page-sub-navigation-tabs .fi-tabs-item .fi-tabs-item-label {
    color: var(--gray-500);
}

.fi-body .fi-page-sub-navigation-tabs .fi-tabs-item:hover,
.fi-body .fi-page-sub-navigation-tabs .fi-tabs-item:focus-visible,
.fi-body .fi-page-sub-navigation-tabs .fi-tabs-item:hover:where(.dark, .dark *) {
    background-color: transparent;
}

.fi-body .fi-page-sub-navigation-tabs .fi-tabs-item:hover .fi-tabs-item-label {
    color: var(--gray-950);
}

.fi-body .fi-page-sub-navigation-tabs .fi-tabs-item:hover .fi-tabs-item-label:where(.dark, .dark *) {
    color: var(--color-white);
}

.fi-body .fi-page-sub-navigation-tabs .fi-tabs-item.fi-active,
.fi-body .fi-page-sub-navigation-tabs .fi-tabs-item.fi-active:where(.dark, .dark *) {
    background-color: transparent;
    border-bottom-color: var(--primary-600);
}

.fi-body .fi-page-sub-navigation-tabs .fi-tabs-item.fi-active .fi-tabs-item-label {
    color: var(--gray-950);
    font-weight: 600;
}

.fi-body .fi-page-sub-navigation-tabs .fi-tabs-item.fi-active .fi-tabs-item-label:where(.dark, .dark *) {
    color: var(--color-white);
}

/* ---- Surfaces: sections, tables, forms, widgets ------------------------ */
/* One quiet border and a faint shadow, instead of a ring plus a drop      */
/* shadow on every block.                                                   */

.fi-body .fi-section:not(.fi-section-not-contained),
.fi-body .fi-ta-ctn,
.fi-body .fi-fo-tabs,
.fi-body .fi-wi-stats-overview-stat,
.fi-body .fi-in-entry-wrp,
.fi-body .fi-dropdown-panel,
.fi-body .fi-modal-window {
    border-radius: 10px;
    --tw-ring-color: var(--gray-200);
    --tw-shadow: var(--berry-shadow);
    --tw-shadow-color: rgba(30, 27, 20, 0.06);
}

.fi-body .fi-section:not(.fi-section-not-contained):where(.dark, .dark *),
.fi-body .fi-ta-ctn:where(.dark, .dark *),
.fi-body .fi-dropdown-panel:where(.dark, .dark *),
.fi-body .fi-modal-window:where(.dark, .dark *) {
    --tw-ring-color: var(--gray-800);
}

.fi-body .fi-section-header-heading {
    font-size: 0.9375rem;
}

.fi-body .fi-ta-header-cell,
.fi-body .fi-ta-header-cell-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-500);
}

.fi-body .fi-ta-header-cell:where(.dark, .dark *),
.fi-body .fi-ta-header-cell-label:where(.dark, .dark *) {
    color: var(--gray-400);
}

.fi-body .fi-ta-row:hover {
    background-color: var(--gray-50);
}

/* ---- Controls ---------------------------------------------------------- */

.fi-body .fi-btn {
    border-radius: 8px;
}

.fi-body .fi-input-wrp,
.fi-body .fi-select-input,
.fi-body .fi-fo-field-wrp .fi-input-wrp {
    border-radius: 8px;
}

.fi-body .fi-badge {
    font-weight: 500;
}

/* ---- Login and other simple pages -------------------------------------- */

.fi-body .fi-simple-main {
    border-radius: 12px;
    --tw-ring-color: var(--gray-200);
    --tw-shadow: var(--berry-shadow);
}

/* ---- A record's own tabs (data screens plan, Part 3) ------------------- */
/* A second, quieter row under the section's: the record's own pages.      */

.fi-body .berry-record-tabs .fi-tabs.fi-page-sub-navigation-tabs {
    border-bottom-style: dashed;
}

.fi-body .berry-record-tabs .fi-page-sub-navigation-tabs .fi-tabs-item {
    padding-block: 0.375rem;
    font-size: 0.875rem;
}

/* ---- A record's name as a link (data screens plan, Part 4) ------------ */
.fi-body a.berry-record-link {
    color: var(--primary-700);
    text-decoration: none;
}

.fi-body a.berry-record-link:hover {
    text-decoration: underline;
}

.fi-body a.berry-record-link:where(.dark, .dark *) {
    color: var(--primary-400);
}
