/* ===========================================================
   Scholar ERP — Premium theme layer (no build step required)
   Enhances Filament v4 defaults with SaaS-grade polish.
   =========================================================== */

:root {
    --brand-1: 99 102 241;   /* indigo-500 */
    --brand-2: 139 92 246;   /* violet-500 */
    --brand-3: 236 72 153;   /* pink-500  */
    --ring: rgba(99, 102, 241, 0.35);
}

/* Smooth everything */
* {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* ---------- Brand mark ---------- */
.scholar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.scholar-brand__logo {
    width: 2rem;
    height: 2rem;
    border-radius: 0.7rem;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, rgb(var(--brand-1)), rgb(var(--brand-2)) 55%, rgb(var(--brand-3)));
    box-shadow: 0 6px 18px -6px rgba(99, 102, 241, 0.7);
}
.scholar-brand__name {
    background: linear-gradient(135deg, rgb(var(--brand-1)), rgb(var(--brand-3)));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 1.15rem;
}

/* ---------- Sticky, glassy topbar ---------- */
.fi-topbar > nav {
    backdrop-filter: saturate(180%) blur(12px);
    background-color: rgba(255, 255, 255, 0.72) !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.dark .fi-topbar > nav {
    background-color: rgba(15, 23, 42, 0.72) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* ---------- Cards / widgets ---------- */
.fi-wi .fi-wi-stats-overview-stat,
.fi-section,
.fi-wi-chart {
    border-radius: 1rem !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.fi-wi-stats-overview-stat {
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px -12px rgba(15, 23, 42, 0.12);
}
.fi-wi-stats-overview-stat::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, rgb(var(--brand-1)), rgb(var(--brand-2)), rgb(var(--brand-3)));
    opacity: 0.9;
}
.fi-wi-stats-overview-stat:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px -12px rgba(99, 102, 241, 0.45);
}

/* ---------- Primary buttons: subtle gradient ---------- */
.fi-btn.fi-color-primary {
    background-image: linear-gradient(135deg, rgb(var(--brand-1)), rgb(var(--brand-2))) !important;
    border: 0 !important;
    box-shadow: 0 8px 20px -8px rgba(99, 102, 241, 0.6);
}

/* ---------- Sidebar polish ---------- */
.fi-sidebar-nav-item-active .fi-sidebar-item-button {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.14), transparent);
    border-radius: 0.7rem;
}
.fi-sidebar-item-button {
    border-radius: 0.7rem;
    transition: background-color 0.15s ease;
}

/* ---------- Tables ---------- */
.fi-ta {
    border-radius: 1rem !important;
    overflow: hidden;
}
.fi-ta-row {
    transition: background-color 0.12s ease;
}

/* ---------- Login page flourish ---------- */
.fi-simple-layout {
    background:
        radial-gradient(60rem 60rem at 110% -10%, rgba(139, 92, 246, 0.14), transparent 55%),
        radial-gradient(50rem 50rem at -10% 110%, rgba(236, 72, 153, 0.12), transparent 55%);
}

/* ---------- Footer ---------- */
.scholar-footer {
    text-align: center;
    font-size: 0.75rem;
    color: rgba(100, 116, 139, 0.9);
    padding: 0.5rem 0 0.25rem;
}

/* ---------- Motion: gentle fade-in for main content ---------- */
@media (prefers-reduced-motion: no-preference) {
    .fi-main {
        animation: scholar-fade 0.35s ease both;
    }
    @keyframes scholar-fade {
        from { opacity: 0; transform: translateY(6px); }
        to { opacity: 1; transform: translateY(0); }
    }
}
