/*
 * Guru Institute admin theme. Plain CSS layered over Filament's precompiled
 * bundle (Tailwind classes added in PHP never reach that build), loaded by a
 * render hook in AdminPanelProvider. Hooks onto Filament's stable fi-* classes.
 */
:root {
    --g-ink: #0b1f19;
    --g-deep: #052e22;
    --g-deep-2: #0a3d2e;
    --g-emerald: #059669;
    --g-teal: #0d9488;
    --g-lime: #a3e635;
    --g-ring: rgba(16, 185, 129, .35);
    --g-card-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .12);
    --g-card-shadow-hover: 0 2px 4px rgba(15, 23, 42, .05), 0 18px 40px -16px rgba(5, 150, 105, .35);
    --g-ease: cubic-bezier(.22, 1, .36, 1);
}

body.fi-body { background: radial-gradient(1200px 600px at 100% -10%, #ecfdf5 0%, transparent 60%), #f6f8f7; }

/* ---------- Sidebar ----------
   Light, so the horizontal logo (dark green on transparent) reads without a chip and the
   sidebar joins the white topbar into one frame; green is kept for the active item. */
.fi-sidebar { background: #fff !important; border-right: 1px solid rgba(15, 23, 42, .07) !important; box-shadow: none !important; }
.fi-sidebar-header { background: #fff !important; box-shadow: none !important; border-bottom: 1px solid rgba(15, 23, 42, .06) !important; }
.fi-sidebar-header .fi-logo { height: 3rem !important; width: auto; max-width: 12.5rem; object-fit: contain; }
.fi-sidebar-nav { scrollbar-width: thin; scrollbar-color: transparent transparent; }
.fi-sidebar-nav:hover { scrollbar-color: rgba(15, 23, 42, .15) transparent; }
.fi-sidebar-group-label, .fi-sidebar-group-collapse-button { color: #94a3b8 !important; letter-spacing: .08em; text-transform: uppercase; font-size: .7rem !important; }
.fi-sidebar-item-button { border-radius: .7rem !important; transition: background .2s var(--g-ease) !important; }
.fi-sidebar-item-label { color: #334155 !important; }
.fi-sidebar-item-icon { color: #94a3b8 !important; transition: color .2s; }
.fi-sidebar-item-button:hover { background: #f0fdf4 !important; }
.fi-sidebar-item-button:hover .fi-sidebar-item-label, .fi-sidebar-item-button:hover .fi-sidebar-item-icon { color: #047857 !important; }
.fi-sidebar-item.fi-active > .fi-sidebar-item-button { background: #ecfdf5 !important; box-shadow: inset 3px 0 0 var(--g-emerald); }
.fi-sidebar-item.fi-active .fi-sidebar-item-label { color: #065f46 !important; font-weight: 600; }
.fi-sidebar-item.fi-active .fi-sidebar-item-icon { color: var(--g-emerald) !important; }

/* ---------- Topbar ---------- */
.fi-topbar > nav {
    background: rgba(255, 255, 255, .85) !important;
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    box-shadow: 0 1px 0 rgba(15, 23, 42, .06) !important;
}

/* "View site" pill (view-site-link.blade.php, before the user menu). */
.g-view-site {
    display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .8rem; border-radius: .6rem;
    font-size: .85rem; font-weight: 500; color: #047857; background: #ecfdf5; border: 1px solid #a7f3d0;
    white-space: nowrap; transition: background .2s, transform .2s var(--g-ease);
}
.g-view-site:hover { background: #d1fae5; transform: translateY(-1px); }
.g-view-site svg { width: 1rem; height: 1rem; flex-shrink: 0; }
@media (max-width: 640px) { .g-view-site span { display: none; } }

/* ---------- Page heading ---------- */
.fi-header-heading {
    background: linear-gradient(90deg, var(--g-ink), var(--g-emerald));
    -webkit-background-clip: text; background-clip: text; color: transparent !important;
    letter-spacing: -.02em;
}

/* ---------- Cards, sections, tables ---------- */
.fi-section, .fi-ta-ctn, .fi-wi-stats-overview-stat, .fi-fo-tabs {
    border-radius: 1rem !important;
    box-shadow: var(--g-card-shadow) !important;
    border: 1px solid rgba(15, 23, 42, .06) !important;
    --tw-ring-shadow: 0 0 #0000 !important;
    transition: box-shadow .35s var(--g-ease), transform .35s var(--g-ease);
}
.fi-wi-stats-overview-stat:hover, .fi-wi-widget .fi-section:hover { box-shadow: var(--g-card-shadow-hover) !important; }
/* Lift only stat cards: they hold no modals, and a transform on any modal ancestor traps its overlay. */
.fi-wi-stats-overview-stat:hover { transform: translateY(-3px); }
.fi-wi-stats-overview-stat { overflow: hidden; }
.fi-wi-stats-overview-stat-value { font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.fi-wi-stats-overview-stat-icon { transition: transform .5s var(--g-ease); }
.fi-wi-stats-overview-stat:hover .fi-wi-stats-overview-stat-icon { transform: rotate(-10deg) scale(1.2); }
.fi-ta-row { transition: background .2s; }
.fi-ta-row:hover { background: #f0fdf4 !important; }
.fi-btn { border-radius: .7rem !important; transition: transform .2s var(--g-ease), box-shadow .2s !important; }
.fi-btn:hover { transform: translateY(-1px); }
.fi-btn-color-primary { background-image: linear-gradient(135deg, var(--g-emerald), var(--g-teal)) !important; box-shadow: 0 6px 16px -8px rgba(5, 150, 105, .8) !important; }
.fi-badge { border-radius: 999px !important; }

/* ---------- Entrance animations ---------- */
/* fill-mode "backwards", never "both": a transform animation left filled after it ends makes
   the element a containing block, trapping Filament modal overlays inside the table/section. */
@keyframes g-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes g-fade { from { opacity: 0; } to { opacity: 1; } }
.fi-page > section > * , .fi-wi > *, .fi-wi-stats-overview-stat, .fi-ta-row { animation: g-rise .6s var(--g-ease) backwards; }
.fi-wi > :nth-child(2), .fi-wi-stats-overview-stat:nth-child(2) { animation-delay: .06s; }
.fi-wi > :nth-child(3), .fi-wi-stats-overview-stat:nth-child(3) { animation-delay: .12s; }
.fi-wi > :nth-child(4), .fi-wi-stats-overview-stat:nth-child(4) { animation-delay: .18s; }
.fi-wi > :nth-child(5) { animation-delay: .24s; }
.fi-wi > :nth-child(6) { animation-delay: .30s; }
.fi-ta-row { animation-name: g-fade; animation-duration: .4s; }

/* ---------- Welcome banner widget ---------- */
.g-hero {
    position: relative; overflow: hidden; border-radius: 1.25rem; padding: 1.75rem 2rem; color: #ecfdf5;
    background: linear-gradient(120deg, #052e22, #047857 45%, #0d9488 75%, #065f46);
    background-size: 220% 220%; animation: g-rise .6s var(--g-ease) backwards, g-shift 14s ease-in-out infinite;
    box-shadow: 0 20px 45px -24px rgba(4, 120, 87, .9);
}
@keyframes g-shift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.g-hero::before, .g-hero::after {
    content: ""; position: absolute; border-radius: 50%; filter: blur(2px); pointer-events: none;
    background: radial-gradient(circle, rgba(163, 230, 53, .35), transparent 70%);
}
.g-hero::before { width: 320px; height: 320px; right: -80px; top: -140px; animation: g-float 9s ease-in-out infinite; }
.g-hero::after { width: 220px; height: 220px; right: 22%; bottom: -150px; background: radial-gradient(circle, rgba(255, 255, 255, .18), transparent 70%); animation: g-float 11s ease-in-out infinite reverse; }
@keyframes g-float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-24px, 18px); } }
.g-hero-top { position: relative; display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; justify-content: space-between; }
.g-hero-kicker { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: #a7f3d0; }
.g-hero-title { font-size: 1.65rem; font-weight: 700; letter-spacing: -.02em; margin-top: .25rem; color: #fff; }
.g-hero-sub { margin-top: .35rem; color: rgba(236, 253, 245, .8); font-size: .92rem; }
.g-hero-sub b { color: #fff; }
.g-pulse { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: var(--g-lime); margin-right: .45rem; box-shadow: 0 0 0 0 rgba(163, 230, 53, .7); animation: g-pulse 2s infinite; }
@keyframes g-pulse { 70% { box-shadow: 0 0 0 10px rgba(163, 230, 53, 0); } 100% { box-shadow: 0 0 0 0 rgba(163, 230, 53, 0); } }
.g-actions { position: relative; display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.4rem; }
.g-action {
    display: inline-flex; align-items: center; gap: .45rem; padding: .55rem .95rem; border-radius: .8rem;
    background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); color: #fff; font-size: .85rem; font-weight: 500;
    backdrop-filter: blur(6px); transition: background .25s, transform .25s var(--g-ease);
}
.g-action:hover { background: rgba(255, 255, 255, .2); transform: translateY(-2px); }
.g-action svg { width: 1.05rem; height: 1.05rem; }

/* ---------- SEO health widget ---------- */
.g-health { display: grid; gap: 1.1rem; }
.g-health-row { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; font-size: .875rem; color: #334155; }
.g-health-row a { color: inherit; }
.g-health-row a:hover { color: var(--g-emerald); }
.g-health-row strong { font-size: 1.05rem; color: var(--g-ink); font-variant-numeric: tabular-nums; }
.g-bar { height: .5rem; border-radius: 999px; background: #e2e8f0; overflow: hidden; margin-top: .45rem; }
.g-bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--g-emerald), var(--g-lime)); transform-origin: left; animation: g-grow 1.2s var(--g-ease) both .2s; }
.g-bar.is-bad > span { background: linear-gradient(90deg, #f43f5e, #f59e0b); }
@keyframes g-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.g-muted { color: #64748b; font-size: .78rem; }
.g-ok { color: var(--g-emerald); } .g-warn { color: #d97706; } .g-bad { color: #e11d48; }

/* ---------- Login (split card: brand panel from login-brand.blade.php + form) ---------- */
.fi-simple-layout { background: radial-gradient(900px 500px at 0% 0%, #d1fae5 0%, transparent 60%), radial-gradient(700px 400px at 100% 100%, #ccfbf1 0%, transparent 60%), #f3f7f5 !important; }
.fi-simple-main {
    max-width: 62rem !important; padding: 0 !important; overflow: hidden; border-radius: 1.5rem !important;
    box-shadow: 0 40px 80px -40px rgba(5, 46, 34, .45) !important; animation: g-rise .7s var(--g-ease) backwards;
}
.fi-simple-page { display: grid; grid-template-columns: 1.05fr 1fr; }
.fi-simple-page > section { grid-column: 2; padding: 3.5rem 3rem; align-content: center; }
.fi-simple-page .fi-logo { display: none; }
.fi-simple-header-heading { font-size: 1.75rem !important; letter-spacing: -.02em; }
.g-login-brand {
    grid-row: 1 / span 2; display: flex; flex-direction: column; gap: 2rem; padding: 2.5rem; color: #ecfdf5;
    background: linear-gradient(150deg, #052e22, #047857 60%, #0d9488); background-size: 200% 200%; animation: g-shift 16s ease-in-out infinite;
}
.g-login-logo { background: #fff; border-radius: 1rem; padding: 1rem 1.25rem; box-shadow: 0 16px 36px -18px rgba(0, 0, 0, .6); }
.g-login-logo img { display: block; width: 100%; height: auto; }
.g-login-copy h2 { margin-top: .4rem; font-size: 1.5rem; line-height: 1.3; font-weight: 700; color: #fff; letter-spacing: -.01em; }
.g-login-copy ul { margin-top: 1.25rem; display: grid; gap: .6rem; font-size: .92rem; color: rgba(236, 253, 245, .85); }
.g-login-copy li::before { content: ""; display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: var(--g-lime); margin-right: .6rem; }
.g-login-foot { margin-top: auto; font-size: .78rem; color: rgba(209, 250, 229, .6); }
@media (max-width: 860px) {
    .fi-simple-main { max-width: 28rem !important; width: calc(100% - 2rem) !important; }
    .fi-simple-page { grid-template-columns: 1fr; }
    .fi-simple-page > section { grid-column: auto; padding: 2rem 1.5rem 2.5rem; }
    .g-login-brand { grid-row: auto; padding: 1.5rem; gap: 0; }
    .g-login-copy, .g-login-foot { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
