/*
 * Admin panel theme, visual direction "A · Relvado" (same as the PWA):
 * light ground, deep green sidebar with a lime accent, condensed figures
 * (Barlow Condensed) for titles and numbers, Inter for text.
 * Plain CSS on top of Filament's classes, no build step.
 */
:root {
    --em-green: #0b5d3b;
    --em-green-dark: #08432b;
    --em-green-soft: #e6f2ec;
    --em-lime: #9be15d;
    --em-ink: #0f1f17;
    --em-muted: #4a5d53;
    --em-line: #dce5e0;
    --em-bg: #f4f7f5;
    --em-radius: 14px;
    --em-radius-lg: 20px;
    --em-figures: 'Barlow Condensed', 'Arial Narrow', sans-serif;
}

.fi-body {
    background: var(--em-bg);
    color: var(--em-ink);
}

/* Brand: dark on light screens, inverse on the green sidebar */
.em-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    height: 100%;
    color: var(--em-ink);
}

.em-brand-word {
    font-family: var(--em-figures);
    font-weight: 700;
    font-size: 1.85rem;
    line-height: 1;
}

.em-brand-accent {
    color: var(--em-green);
}

.fi-sidebar .em-brand {
    color: #fff;
}

.fi-sidebar .em-brand-accent {
    color: var(--em-lime);
}

.fi-sidebar .em-brand-tile {
    fill: rgb(255 255 255 / 12%);
}

/* Sidebar */
.fi-main-sidebar {
    background: linear-gradient(180deg, var(--em-green) 0%, var(--em-green-dark) 100%);
    border-inline-end: none;
}

.fi-sidebar-header,
.fi-sidebar-header-ctn {
    background: transparent;
    box-shadow: none;
    border: none;
}

.fi-sidebar-header {
    padding-block: 1.25rem;
}

.fi-sidebar-nav {
    color: rgb(255 255 255 / 85%);
}

.fi-sidebar-group-label,
.fi-sidebar-group-btn {
    color: rgb(255 255 255 / 55%);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.7rem;
    font-weight: 700;
}

.fi-sidebar-group-collapse-btn,
.fi-sidebar-group-collapse-btn .fi-icon {
    color: rgb(255 255 255 / 45%);
}

.fi-sidebar-item-btn {
    border-radius: 12px;
    position: relative;
}

.fi-sidebar-item-label {
    color: rgb(255 255 255 / 88%);
    font-weight: 500;
}

.fi-sidebar-item-icon {
    color: rgb(255 255 255 / 55%);
}

.fi-sidebar-item-btn:hover,
.fi-sidebar-item-btn:focus-visible {
    background: rgb(255 255 255 / 8%);
}

.fi-sidebar-item.fi-active .fi-sidebar-item-btn {
    background: rgb(255 255 255 / 14%);
}

.fi-sidebar-item.fi-active .fi-sidebar-item-btn::before {
    content: '';
    position: absolute;
    left: -0.5rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 4px;
    border-radius: 4px;
    background: var(--em-lime);
}

.fi-sidebar-item.fi-active .fi-sidebar-item-label {
    color: #fff;
    font-weight: 600;
}

.fi-sidebar-item.fi-active .fi-sidebar-item-icon {
    color: var(--em-lime);
}

/* Club switcher and user menu on the green ground */
.fi-sidebar .fi-tenant-menu-trigger {
    background: rgb(255 255 255 / 8%);
    border-radius: var(--em-radius);
}

.fi-sidebar .fi-tenant-menu-trigger:hover {
    background: rgb(255 255 255 / 14%);
}

.fi-sidebar .fi-tenant-menu-trigger-tenant-name,
.fi-sidebar .fi-tenant-menu-trigger-text,
.fi-sidebar .fi-tenant-menu-trigger .fi-icon {
    color: #fff;
}

.fi-sidebar .fi-tenant-avatar,
.fi-sidebar .fi-user-avatar {
    background: var(--em-lime);
    color: var(--em-green-dark);
}

.fi-sidebar-footer {
    border-top: 1px solid rgb(255 255 255 / 12%);
}

.fi-sidebar-footer .fi-user-menu-trigger,
.fi-sidebar-footer .fi-user-menu-trigger * {
    color: #fff;
}

/* Page header: condensed title, quiet breadcrumbs */
.fi-header-heading {
    font-family: var(--em-figures);
    font-weight: 700;
    font-size: 2.4rem;
    line-height: 1.05;
    letter-spacing: 0;
    color: var(--em-ink);
}

.fi-breadcrumbs-item-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--em-green);
}

/* Cards, sections and tables */
.fi-section:not(.fi-section-not-contained),
.fi-ta-ctn,
.fi-wi-stats-overview-stat {
    border-radius: var(--em-radius-lg);
    box-shadow: 0 1px 2px rgb(15 31 23 / 4%), 0 6px 24px rgb(15 31 23 / 4%);
    --tw-ring-color: var(--em-line);
}

.fi-section-header-heading,
.fi-ta-header-heading {
    font-family: var(--em-figures);
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: 0;
}

.fi-ta-header-cell,
.fi-ta-actions-header-cell,
.fi-ta-empty-header-cell {
    background: #fff;
}

.fi-section-not-contained {
    box-shadow: none;
    background: transparent;
}

.fi-ta-header-cell,
.fi-ta-header-cell-sort-btn {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--em-muted);
}

.fi-ta-row:hover {
    background: #f6faf8;
}

/* Stats on the home page: big condensed figures */
.fi-wi-stats-overview-stat-value {
    font-family: var(--em-figures);
    font-weight: 700;
    font-size: 2.9rem;
    line-height: 1;
    color: var(--em-ink);
}

.fi-wi-stats-overview-stat-label {
    font-weight: 600;
    color: var(--em-muted);
}

.fi-wi-stats-overview-stat-label-ctn .fi-icon {
    color: var(--em-green);
    background: var(--em-green-soft);
    border-radius: 10px;
    padding: 0.35rem;
    width: 2rem;
    height: 2rem;
}

.fi-wi-stats-overview .fi-section-header-heading,
.fi-wi-stats-overview > .fi-section-header {
    font-family: var(--em-figures);
}

/* Buttons and badges */
.fi-btn {
    border-radius: 12px;
    font-weight: 600;
}

.fi-badge {
    border-radius: 999px;
}

.fi-input-wrp {
    border-radius: 12px;
}

/* Login: Google / Apple */
.em-social {
    display: grid;
    gap: 0.6rem;
}

.em-social-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--em-muted);
    font-size: 0.85rem;
    margin: 0.25rem 0;
}

.em-social-divider::before,
.em-social-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--em-line);
}

.em-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 2.5rem;
    border: 1px solid var(--em-line);
    border-radius: 12px;
    background: #fff;
    color: var(--em-ink);
    font-weight: 600;
    font-size: 0.9rem;
}

.em-social-btn:hover {
    background: var(--em-bg);
}

.em-social-error {
    color: #b42318;
    background: #fdecea;
    border-radius: 12px;
    padding: 0.6rem 0.8rem;
    font-size: 0.875rem;
}

/*
 * Sidebar full height: the sidebar itself is sticky (one screen high), so a
 * strip of the same width is painted behind it for the whole page height. It
 * ends in the sidebar's bottom colour, so long pages, full-page prints and
 * browsers where sticky stops early show green down to the bottom.
 */
@media (min-width: 1024px) {
    .fi-body-has-navigation .fi-layout {
        position: relative;
    }

    .fi-body-has-navigation .fi-layout::before {
        content: '';
        position: absolute;
        inset: 0 auto 0 0;
        width: var(--sidebar-width, 20rem);
        background: var(--em-green-dark);
        pointer-events: none;
    }

    .fi-main-sidebar {
        min-height: 100vh;
        min-height: 100dvh;
    }
}
