/* =====================================================================
   Prosilya Ops — design theme (green, health brand)
   Loaded on top of Filament's styles (no build step needed).
   ===================================================================== */

:root {
    --ops-green: #059669;
    --ops-green-2: #10b981;
    --ops-green-3: #34d399;
    --ops-green-soft: rgba(16, 185, 129, .10);
    --ops-radius: 14px;
    --ops-radius-sm: 10px;
    --ops-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 24px -8px rgba(15, 23, 42, .08);
    --ops-border: rgba(15, 23, 42, .07);
    --ops-bg: #f5f8f6;
    --ops-surface: #ffffff;
    --ops-muted: #64748b;
}
.dark {
    --ops-border: rgba(255, 255, 255, .07);
    --ops-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px -10px rgba(0, 0, 0, .55);
    --ops-bg: #0a0f0d;
    --ops-surface: #111816;
    --ops-muted: #94a3b8;
}

/* ---------- Page background ---------- */
.fi-body {
    background:
        radial-gradient(1200px 500px at 100% -10%, rgba(16, 185, 129, .08), transparent 60%),
        radial-gradient(900px 400px at -10% 110%, rgba(52, 211, 153, .06), transparent 60%),
        var(--ops-bg) !important;
    background-attachment: fixed !important;
}

/* ---------- Sidebar ---------- */
.fi-sidebar {
    background: var(--ops-surface) !important;
    border-inline-end: 1px solid var(--ops-border);
}
.fi-sidebar-header {
    background: transparent !important;
    box-shadow: none !important;
    border-bottom: 1px solid var(--ops-border);
}
.fi-sidebar-nav { padding-top: 1rem !important; }
.fi-sidebar-group-label {
    font-size: .68rem !important;
    font-weight: 700 !important;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ops-muted) !important;
}
.fi-sidebar-item-button {
    border-radius: var(--ops-radius-sm) !important;
    transition: background .15s ease, transform .15s ease;
}
.fi-sidebar-item-button:hover { background: var(--ops-green-soft) !important; }
.fi-sidebar-item.fi-active > .fi-sidebar-item-button,
.fi-sidebar-item-active > .fi-sidebar-item-button {
    background: linear-gradient(135deg, var(--ops-green-2), var(--ops-green)) !important;
    box-shadow: 0 6px 16px -6px rgba(5, 150, 105, .6);
}
.fi-sidebar-item.fi-active .fi-sidebar-item-label,
.fi-sidebar-item.fi-active .fi-sidebar-item-icon,
.fi-sidebar-item-active .fi-sidebar-item-label,
.fi-sidebar-item-active .fi-sidebar-item-icon { color: #fff !important; }
.fi-sidebar-item.fi-active .fi-badge { background: rgba(255, 255, 255, .25) !important; color: #fff !important; --tw-ring-color: transparent !important; }

/* ---------- Top bar ---------- */
.fi-topbar > nav {
    background: color-mix(in srgb, var(--ops-surface) 82%, transparent) !important;
    backdrop-filter: saturate(160%) blur(10px);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    box-shadow: none !important;
    border-bottom: 1px solid var(--ops-border);
}

/* ---------- Page header ---------- */
.fi-header-heading {
    font-weight: 800 !important;
    letter-spacing: -.02em;
}
.fi-header-subheading { color: var(--ops-muted) !important; }

/* ---------- Cards / sections / widgets ---------- */
.fi-section,
.fi-ta-ctn,
.fi-wi-stats-overview-stat,
.fi-fo-tabs,
.fi-in-section {
    border-radius: var(--ops-radius) !important;
    box-shadow: var(--ops-shadow) !important;
    --tw-ring-color: var(--ops-border) !important;
    background-color: var(--ops-surface) !important;
}
.fi-section-header-heading { font-weight: 700 !important; letter-spacing: -.01em; }
/* "backwards": once the animation ends nothing stays on the widget, so popups (fixed position) open over the whole page. */
.fi-wi-widget { animation: ops-rise .35s ease backwards; }
@keyframes ops-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Buttons ---------- */
.fi-btn { border-radius: var(--ops-radius-sm) !important; font-weight: 600 !important; }
.fi-btn.fi-color-primary:not(.fi-btn-outlined) {
    background-image: linear-gradient(135deg, var(--ops-green-2), var(--ops-green)) !important;
    box-shadow: 0 6px 14px -6px rgba(5, 150, 105, .55);
}
.fi-btn:not(.fi-btn-outlined):hover { filter: brightness(1.05); }

/* ---------- Inputs ---------- */
.fi-input-wrp { border-radius: var(--ops-radius-sm) !important; transition: box-shadow .15s ease; }
.fi-input-wrp:focus-within { box-shadow: 0 0 0 4px rgba(16, 185, 129, .15) !important; }

/* ---------- Tabs ---------- */
.fi-tabs { border-radius: var(--ops-radius) !important; box-shadow: var(--ops-shadow) !important; background: var(--ops-surface) !important; }
.fi-tabs-item { border-radius: var(--ops-radius-sm) !important; }
.fi-tabs-item-active { background: var(--ops-green-soft) !important; }
.fi-tabs-item-active .fi-tabs-item-label, .fi-tabs-item-active .fi-tabs-item-icon { color: var(--ops-green) !important; }

/* ---------- Tables: compact rows, soft header ---------- */
.fi-ta-header-cell {
    background: color-mix(in srgb, var(--ops-green) 4%, transparent) !important;
    font-size: .7rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--ops-muted) !important;
    padding-top: .65rem !important;
    padding-bottom: .65rem !important;
}
.fi-ta-cell > div, .fi-ta-cell > a > div { padding-top: .55rem !important; padding-bottom: .55rem !important; }
.fi-ta-row { transition: background .12s ease; }
.fi-ta-row:hover { background: var(--ops-green-soft) !important; }
.fi-ta-header-toolbar { border-bottom: 1px solid var(--ops-border); }
.fi-pagination-item-button { border-radius: 8px !important; }

/* ---------- Badges: soft pills ---------- */
.fi-badge {
    border-radius: 999px !important;
    padding-inline: .6rem !important;
    font-weight: 600 !important;
    letter-spacing: .01em;
}

/* ---------- Dropdowns & modals ---------- */
.fi-dropdown-panel { border-radius: var(--ops-radius) !important; box-shadow: 0 16px 40px -12px rgba(15, 23, 42, .25) !important; }
.fi-modal-window { border-radius: 18px !important; }

/* ---------- Scrollbars ---------- */
* { scrollbar-width: thin; scrollbar-color: rgba(100, 116, 139, .35) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: rgba(100, 116, 139, .35); border-radius: 8px; }

/* =====================================================================
   Login page: split screen with brand panel (wide screens)
   ===================================================================== */
.ops-login-hero { display: none; }
@media (min-width: 1024px) {
    .ops-login-hero {
        display: flex;
        position: fixed;
        inset: 0 auto 0 0;
        width: 50vw;
        box-sizing: border-box;
        flex-direction: column;
        justify-content: space-between;
        padding: 3rem 3.5rem;
        color: #fff;
        background:
            radial-gradient(600px 300px at 80% 0%, rgba(255, 255, 255, .18), transparent 60%),
            radial-gradient(500px 400px at 0% 100%, rgba(0, 0, 0, .25), transparent 60%),
            linear-gradient(150deg, #10b981 0%, #047857 55%, #064e3b 100%);
        overflow: hidden;
        z-index: 0;
    }
    .fi-simple-layout:has(.ops-login-hero) .fi-simple-main-ctn {
        width: 50vw !important;
        flex-grow: 1;
        align-self: flex-end;
        padding: 0 2rem;
    }
    .fi-simple-layout:has(.ops-login-hero) .fi-simple-main {
        box-shadow: none !important;
        --tw-ring-color: transparent !important;
        background: transparent !important;
    }
}
.ops-login-hero h1 { font-size: 2.3rem; line-height: 1.15; font-weight: 800; letter-spacing: -.03em; margin: 0 0 1rem; max-width: 30rem; }
.ops-login-hero p { opacity: .85; max-width: 28rem; line-height: 1.6; margin: 0; }
.ops-login-features { display: grid; gap: .8rem; margin-top: 2rem; }
.ops-login-feature { display: flex; gap: .75rem; align-items: center; font-weight: 500; }
.ops-login-feature span:first-child {
    width: 2.1rem; height: 2.1rem; border-radius: 10px; display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .15); backdrop-filter: blur(6px); font-size: 1rem;
}
.ops-login-card {
    margin-top: 2.5rem; padding: 1.1rem 1.25rem; border-radius: 16px; max-width: 26rem;
    background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); backdrop-filter: blur(8px);
}
.ops-login-bars { display: flex; align-items: flex-end; gap: .45rem; height: 70px; margin-top: .8rem; }
.ops-login-bars i { flex: 1; border-radius: 6px 6px 2px 2px; background: rgba(255, 255, 255, .85); }
.ops-login-foot { font-size: .8rem; opacity: .7; }
.ops-login-blob {
    position: absolute; right: -120px; bottom: -120px; width: 360px; height: 360px; border-radius: 50%;
    background: rgba(255, 255, 255, .08); pointer-events: none;
}

/* =====================================================================
   Dashboard welcome banner
   ===================================================================== */
.ops-welcome {
    position: relative; overflow: hidden; border-radius: 20px; padding: 1.6rem 1.75rem; color: #fff;
    background:
        radial-gradient(500px 220px at 90% -20%, rgba(255, 255, 255, .22), transparent 60%),
        linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
    box-shadow: 0 18px 40px -18px rgba(5, 150, 105, .7);
}
.ops-welcome::after {
    content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
    background: rgba(255, 255, 255, .08);
}
.ops-welcome-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: flex-start; position: relative; z-index: 1; }
.ops-welcome h2 { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.ops-welcome-date { opacity: .85; font-size: .9rem; margin-top: .25rem; }
.ops-welcome-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.ops-welcome-actions a {
    display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .9rem; border-radius: 10px; font-size: .85rem; font-weight: 600;
    background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .25); transition: background .15s;
}
.ops-welcome-actions a:hover { background: rgba(255, 255, 255, .28); }
.ops-welcome-actions a.ops-primary { background: #fff; color: #047857; border-color: #fff; }
.ops-welcome-actions svg { width: 1rem; height: 1rem; }
.ops-welcome-stats { display: grid; gap: .8rem; margin-top: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); position: relative; z-index: 1; }
.ops-welcome-stat { background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .18); border-radius: 14px; padding: .8rem 1rem; backdrop-filter: blur(6px); }
.ops-welcome-stat b { display: block; font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.ops-welcome-stat span { font-size: .78rem; opacity: .85; }

/* =====================================================================
   Checkbox lists shown as on/off switches (store members)
   ===================================================================== */
.ops-switch-list input[type="checkbox"] {
    -webkit-appearance: none; appearance: none;
    position: relative; flex-shrink: 0;
    width: 2.75rem !important; height: 1.5rem !important;
    border-radius: 999px !important; border: 0 !important;
    background: rgba(148, 163, 184, .35) !important; background-image: none !important;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .06) !important;
    cursor: pointer; transition: background .2s ease; margin-top: 0 !important;
}
.dark .ops-switch-list input[type="checkbox"] { background: rgba(255, 255, 255, .14) !important; }
.ops-switch-list input[type="checkbox"]::before {
    content: ""; position: absolute; top: 3px; left: 3px;
    width: 1.125rem; height: 1.125rem; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
    transition: transform .2s ease;
}
.ops-switch-list input[type="checkbox"]:checked {
    background: linear-gradient(135deg, var(--ops-green-2), var(--ops-green)) !important;
}
.ops-switch-list input[type="checkbox"]:checked::before { transform: translateX(1.25rem); }
.ops-switch-list input[type="checkbox"]:focus-visible { outline: 2px solid rgba(16, 185, 129, .45); outline-offset: 2px; }
.ops-switch-list .fi-fo-checkbox-list-option-label { align-items: center; }
