/* ─────────────────────────────────────────────────────────────────────────
   AgriCoop — Botanical Garden theme for Filament panels (admin / bodhi).
   Mirrors the farmer portal look: cream canvas, dark fern sidebar with a
   marigold active marker, Lora serif headings, Noto Sans Khmer for Khmer.
   Scoped to light mode (html:not(.dark)) so Filament dark mode still works.
   ──────────────────────────────────────────────────────────────────────── */

:root {
    --ac-cream: #f5f3ed;
    --ac-fern: #4a7c59;
    --ac-fern-dark: #2f4d39;
    --ac-fern-100: #dce9d4;
    --ac-marigold: #f9a620;
    /* Botanical Garden's third accent. Used for money states that need to read
       as "attention" without the alarm of a pure red — overdue, paused. */
    --ac-terracotta: #b7472a;
    --ac-terracotta-50: #fbeeea;
}

/* ── Typography ─────────────────────────────────────────────────────────── */
.fi-header-heading,
.fi-section-header-heading,
.fi-main h1,
.fi-main h2,
.fi-main h3 {
    font-family: 'Lora', Georgia, serif;
    letter-spacing: .2px;
}
html[lang="km"] .fi-header-heading,
html[lang="km"] .fi-section-header-heading,
html[lang="km"] .fi-main h1,
html[lang="km"] .fi-main h2,
html[lang="km"] .fi-main h3 {
    font-family: 'Noto Sans Khmer', sans-serif;
}

/* ── Canvas ─────────────────────────────────────────────────────────────── */
html:not(.dark) .fi-body,
html:not(.dark) .fi-simple-layout {
    background-color: var(--ac-cream);
}

/* ── Sidebar (dark fern) ────────────────────────────────────────────────── */
html:not(.dark) .fi-sidebar,
html:not(.dark) .fi-sidebar-nav,
html:not(.dark) .fi-sidebar-header,
html:not(.dark) .fi-sidebar-footer {
    background-color: var(--ac-fern-dark);
    border-color: rgba(255, 255, 255, .08);
}

/* brand / logo area */
html:not(.dark) .fi-sidebar-header,
html:not(.dark) .fi-sidebar-header a,
html:not(.dark) .fi-sidebar-header .fi-logo {
    color: #ffffff;
}

/* nav items + group labels (label + icon targeted directly so Filament's own
   per-element colours don't win) */
html:not(.dark) .fi-sidebar-item-btn,
html:not(.dark) .fi-sidebar-item-btn > .fi-sidebar-item-label,
html:not(.dark) .fi-sidebar-item-btn > .fi-icon,
html:not(.dark) .fi-sidebar-group-label,
html:not(.dark) .fi-sidebar-group-btn,
html:not(.dark) .fi-sidebar-database-notifications-btn {
    color: var(--ac-fern-100);
}

html:not(.dark) .fi-sidebar-item-btn:hover {
    background-color: rgba(255, 255, 255, .06);
}
html:not(.dark) .fi-sidebar-item-btn:hover,
html:not(.dark) .fi-sidebar-item-btn:hover > .fi-sidebar-item-label,
html:not(.dark) .fi-sidebar-item-btn:hover > .fi-icon {
    color: #ffffff;
}

/* active item: fern fill + marigold marker */
html:not(.dark) .fi-sidebar-item.fi-active > .fi-sidebar-item-btn {
    background-color: var(--ac-fern);
    border-left: 3px solid var(--ac-marigold);
}
html:not(.dark) .fi-sidebar-item.fi-active > .fi-sidebar-item-btn,
html:not(.dark) .fi-sidebar-item.fi-active > .fi-sidebar-item-btn > .fi-sidebar-item-label,
html:not(.dark) .fi-sidebar-item.fi-active > .fi-sidebar-item-btn > .fi-icon {
    color: #ffffff;
}

/* collapse / close buttons stay legible on the dark sidebar */
html:not(.dark) .fi-sidebar-close-collapse-sidebar-btn,
html:not(.dark) .fi-sidebar-open-collapse-sidebar-btn {
    color: var(--ac-fern-100);
}

/* ── Topbar (white, sticky) ─────────────────────────────────────────────── */
html:not(.dark) .fi-topbar > div,
html:not(.dark) .fi-topbar nav {
    background-color: #ffffff;
    border-color: rgba(0, 0, 0, .05);
}

/* ── Cards / sections ───────────────────────────────────────────────────── */
html:not(.dark) .fi-section,
html:not(.dark) .fi-wi {
    border-radius: .9rem;
}

/* primary header heading colour to match farmer (fern-dark) */
html:not(.dark) .fi-header-heading {
    color: var(--ac-fern-dark);
}

/* Account menu shows the head-icon avatar only — hide the username label so it
   reads as a person icon across all panels (matches the storefront/farmer nav). */
.fi-user-menu-trigger-text {
    display: none;
}
