/*
 * Hayna dashboard skin: the mobile app's olive and gold (application1 lib/store/core/theme.dart)
 * on top of Filament's own theme. Light mode only; dark mode keeps Filament's palette.
 */
:root {
    --hayna-olive: #555e47;
    --hayna-olive-dark: #3f4736;
    --hayna-gold: #d39f40;
    --hayna-gold-dark: #a67b24;
    --hayna-cream: #fff8e8;
    --hayna-cream-line: #f3dfa8;
    --hayna-bg: #f6f7f3;
    --hayna-line: #ecece6;
}

html:not(.dark) .fi-body {
    background-color: var(--hayna-bg);
}

/* Topbar and sidebar sit on white, separated by hairlines. */
html:not(.dark) .fi-topbar,
html:not(.dark) .fi-topbar-ctn > nav {
    background-color: #fff;
    border-bottom: 1px solid var(--hayna-line);
    box-shadow: none;
}

html:not(.dark) .fi-sidebar {
    background-color: #fff;
    border-inline-end: 1px solid var(--hayna-line);
}

.fi-sidebar-group-label {
    color: var(--hayna-gold-dark);
    font-weight: 700;
    letter-spacing: 0;
}

html:not(.dark) .fi-sidebar-item.fi-active > .fi-sidebar-item-btn {
    background-color: var(--hayna-cream);
    box-shadow: inset -3px 0 0 var(--hayna-gold);
}

html:not(.dark)[dir='ltr'] .fi-sidebar-item.fi-active > .fi-sidebar-item-btn {
    box-shadow: inset 3px 0 0 var(--hayna-gold);
}

html:not(.dark) .fi-sidebar-item.fi-active .fi-sidebar-item-label,
html:not(.dark) .fi-sidebar-item.fi-active .fi-sidebar-item-icon {
    color: var(--hayna-olive-dark);
}

/* Cards: white, soft border, no heavy ring. */
html:not(.dark) .fi-section,
html:not(.dark) .fi-ta-ctn,
html:not(.dark) .fi-wi-stats-overview-stat {
    border-radius: 1rem;
    box-shadow: 0 1px 2px rgb(63 71 54 / 0.04);
}

html:not(.dark) .fi-wi-stats-overview-stat {
    border-top: 3px solid var(--hayna-cream-line);
}

.fi-wi-stats-overview-stat-label {
    font-weight: 700;
}

/* Login and other simple pages: the app's olive backdrop. */
html:not(.dark) .fi-simple-layout {
    background:
        radial-gradient(60rem 30rem at 85% -10%, rgb(211 159 64 / 0.22), transparent 60%),
        linear-gradient(160deg, var(--hayna-olive) 0%, var(--hayna-olive-dark) 100%);
}

html:not(.dark) .fi-simple-main {
    border-radius: 1.25rem;
    box-shadow: 0 24px 48px rgb(0 0 0 / 0.18);
}

/*
 * The app's own views (reports, map picker) can't use Tailwind utilities:
 * Filament ships only the classes it uses itself, so they're styled here.
 */
.hayna-report {
    overflow-x: auto;
}

.hayna-report table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.hayna-report th,
.hayna-report td {
    padding: 0.625rem 0.875rem;
    text-align: start;
    white-space: nowrap;
}

.hayna-report th {
    font-weight: 700;
    color: var(--hayna-olive-dark);
    background: var(--hayna-bg);
}

.hayna-report tbody tr {
    border-top: 1px solid var(--hayna-line);
}

.hayna-report tbody tr:hover {
    background: #fafaf7;
}

.hayna-report-empty {
    text-align: center !important;
    padding: 1.5rem !important;
    color: #777;
}

.hayna-report-totals {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
}

.hayna-report-totals > div {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.875rem 1rem;
    border-radius: 0.875rem;
    background: var(--hayna-cream);
    border: 1px solid var(--hayna-cream-line);
}

.hayna-report-totals span {
    font-size: 0.75rem;
    color: var(--hayna-gold-dark);
}

.hayna-report-totals strong {
    font-size: 1.125rem;
    color: var(--hayna-olive-dark);
}

.dark .hayna-report th {
    color: #e7e5e4;
    background: rgb(255 255 255 / 0.04);
}

.dark .hayna-report tbody tr {
    border-color: rgb(255 255 255 / 0.06);
}

.dark .hayna-report tbody tr:hover {
    background: rgb(255 255 255 / 0.03);
}

.dark .hayna-report-totals > div {
    background: rgb(255 255 255 / 0.04);
    border-color: rgb(255 255 255 / 0.08);
}

.dark .hayna-report-totals span,
.dark .hayna-report-totals strong {
    color: #e7e5e4;
}

.hayna-map-picker {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hayna-map-search {
    position: relative;
}

.hayna-map-input {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid #d6d3d1;
    border-radius: 0.5rem;
    background: #fff;
    outline: none;
}

.hayna-map-input:focus {
    border-color: var(--hayna-olive);
    box-shadow: 0 0 0 1px var(--hayna-olive);
}

.hayna-map-results {
    position: absolute;
    z-index: 1000;
    inset-inline: 0;
    margin-top: 0.25rem;
    max-height: 14rem;
    overflow: auto;
    font-size: 0.875rem;
    background: #fff;
    border: 1px solid var(--hayna-line);
    border-radius: 0.5rem;
    box-shadow: 0 10px 24px rgb(0 0 0 / 0.12);
}

.hayna-map-results li {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
}

.hayna-map-results li:hover {
    background: var(--hayna-cream);
}

.hayna-map {
    direction: ltr;
    width: 100%;
    height: 360px;
    overflow: hidden;
    border: 1px solid var(--hayna-line);
    border-radius: 0.75rem;
}

.hayna-map-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #777;
}

.hayna-map-clear {
    color: #dc2626;
}

.hayna-map-clear:hover {
    text-decoration: underline;
}

.dark .hayna-map-input,
.dark .hayna-map-results {
    background: #1c1917;
    border-color: rgb(255 255 255 / 0.1);
    color: #e7e5e4;
}

.dark .hayna-map-results li:hover {
    background: rgb(255 255 255 / 0.05);
}
