/*
 * House of Limé — Filament admin panel skin.
 * Hand-written CSS (no build step) layered on top of Filament's shipped
 * assets via a render hook. Only visual properties (color, shadow, radius,
 * spacing polish) are touched — layout/structure is left to Filament.
 * Uses Filament's own --primary-*/--gray-* CSS variables so it always
 * follows the panel's configured brand color.
 */

/* ---------- Base ---------- */

.fi-body {
    -webkit-font-smoothing: antialiased;
}

.fi-body ::selection {
    background-color: rgba(var(--primary-500), 0.25);
}

.fi-body::-webkit-scrollbar,
.fi-sidebar-nav::-webkit-scrollbar,
.fi-ta-content::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.fi-body::-webkit-scrollbar-track,
.fi-sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.fi-body::-webkit-scrollbar-thumb,
.fi-sidebar-nav::-webkit-scrollbar-thumb,
.fi-ta-content::-webkit-scrollbar-thumb {
    background-color: rgba(var(--gray-500), 0.35);
    border-radius: 9999px;
    border: 2px solid transparent;
    background-clip: content-box;
}

/* Subtle tinted page background instead of flat white/black */
.fi-body {
    background-color: #f6f7fb !important;
}

.dark .fi-body {
    background-color: #0d1117 !important;
}

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

.fi-sidebar-header {
    background-color: #ffffff !important;
    box-shadow: 0 1px 0 rgba(var(--gray-950), 0.06);
}

.dark .fi-sidebar-header {
    background-color: rgb(17, 24, 39) !important;
}

.fi-sidebar-header .fi-logo,
.fi-topbar .fi-logo {
    height: auto !important;
    width: auto !important;
    max-width: 190px;
    max-height: 30px;
    object-fit: contain;
}

/* Any solid-color wordmark logo automatically flips to white in dark mode */
.dark .fi-logo {
    filter: brightness(0) invert(1);
}

.fi-sidebar-nav {
    padding-top: 0.75rem;
}

.fi-sidebar-group-label {
    font-size: 0.6875rem;
    letter-spacing: 0.06em;
    font-weight: 700;
    opacity: 0.75;
}

.fi-sidebar-item .fi-sidebar-item-button {
    border-radius: 0.625rem;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.fi-sidebar-item.fi-active > .fi-sidebar-item-button {
    background-color: rgba(var(--primary-600), 0.1) !important;
}

.dark .fi-sidebar-item.fi-active > .fi-sidebar-item-button {
    background-color: rgba(var(--primary-400), 0.12) !important;
}

.fi-sidebar-item:not(.fi-active) > .fi-sidebar-item-button:hover {
    background-color: rgba(var(--gray-500), 0.08) !important;
}

.hol-sidebar-credit {
    padding: 0.75rem 1.5rem 1.25rem;
    text-align: center;
    font-size: 0.6875rem;
    color: rgb(var(--gray-400));
    letter-spacing: 0.02em;
}

/* ---------- Topbar ---------- */

.fi-topbar > nav {
    background-color: rgba(255, 255, 255, 0.85) !important;
    -webkit-backdrop-filter: saturate(180%) blur(8px);
    backdrop-filter: saturate(180%) blur(8px);
}

.dark .fi-topbar > nav {
    background-color: rgba(17, 24, 39, 0.75) !important;
}

/* ---------- Cards & sections (also styles chart widgets, which reuse fi-section) ---------- */

.fi-section {
    border-radius: 1rem !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px -12px rgba(15, 23, 42, 0.08) !important;
}

.dark .fi-section {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 8px 24px -12px rgba(0, 0, 0, 0.4) !important;
}

.fi-section-header-icon {
    border-radius: 0.75rem;
    background-color: rgba(var(--primary-500), 0.1);
}

/* ---------- Tables ---------- */

.fi-ta-ctn {
    border-radius: 1rem !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px -12px rgba(15, 23, 42, 0.08) !important;
}

.dark .fi-ta-ctn {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 8px 24px -12px rgba(0, 0, 0, 0.4) !important;
}

.fi-ta-header-cell {
    background-color: rgba(var(--primary-500), 0.05) !important;
}

.fi-ta-header-cell-label {
    font-size: 0.6875rem !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase;
    font-weight: 700 !important;
}

.fi-ta-row:hover {
    background-color: rgba(var(--primary-500), 0.045) !important;
}

.fi-ta-row td {
    transition: background-color 0.1s ease;
}

/* Product/category thumbnails read as neat framed photos */
.fi-ta-table img {
    border-radius: 0.625rem;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.dark .fi-ta-table img {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* ---------- Badges ---------- */

.fi-badge {
    font-weight: 600 !important;
}

/* ---------- Stats overview widgets ---------- */

.fi-wi-stats-overview-stat {
    border-radius: 1rem !important;
    border-left: 3px solid rgb(var(--gray-300)) !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px -12px rgba(15, 23, 42, 0.08) !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fi-wi-stats-overview-stat:hover {
    transform: translateY(-2px);
}

.fi-wi-stats-overview-stat-value {
    font-size: 1.875rem !important;
    letter-spacing: -0.02em;
}

.fi-wi-stats-overview-stat:has(.fi-color-primary) {
    border-left-color: rgb(var(--primary-500)) !important;
}

.fi-wi-stats-overview-stat:has(.fi-color-success) {
    border-left-color: rgb(var(--success-500)) !important;
}

.fi-wi-stats-overview-stat:has(.fi-color-warning) {
    border-left-color: rgb(var(--warning-500)) !important;
}

.fi-wi-stats-overview-stat:has(.fi-color-info) {
    border-left-color: rgb(var(--info-500)) !important;
}

.fi-wi-stats-overview-stat:has(.fi-color-primary) .fi-wi-stats-overview-stat-icon {
    color: rgb(var(--primary-500)) !important;
}

.fi-wi-stats-overview-stat:has(.fi-color-success) .fi-wi-stats-overview-stat-icon {
    color: rgb(var(--success-500)) !important;
}

.fi-wi-stats-overview-stat:has(.fi-color-warning) .fi-wi-stats-overview-stat-icon {
    color: rgb(var(--warning-500)) !important;
}

.fi-wi-stats-overview-stat:has(.fi-color-info) .fi-wi-stats-overview-stat-icon {
    color: rgb(var(--info-500)) !important;
}

/* ---------- Buttons ---------- */

.fi-btn {
    transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.1s ease;
}

.fi-btn-color-primary:not(.fi-btn-outlined):hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px -6px rgba(var(--primary-600), 0.5);
}

/* ---------- Auth / login page ---------- */

.fi-simple-layout {
    position: relative;
    background: radial-gradient(60% 50% at 50% 0%, rgba(var(--primary-500), 0.1), transparent 70%), #f6f7fb;
}

.dark .fi-simple-layout {
    background: radial-gradient(60% 50% at 50% 0%, rgba(var(--primary-500), 0.16), transparent 70%), #0d1117;
}

.fi-simple-layout .fi-logo {
    height: auto !important;
    width: auto !important;
    max-width: 260px;
    max-height: 46px;
    object-fit: contain;
}

.fi-simple-main {
    border-radius: 1.25rem !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 24px 48px -16px rgba(15, 23, 42, 0.18) !important;
    position: relative;
    overflow: hidden;
}

.fi-simple-main::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, rgb(var(--primary-400)), rgb(var(--primary-600)));
}
