/* MySchool admin — warm, mild, professional. Motion kept subtle.
   canvas #FAF6F0 · surface #FFFDFB · clay #BE7355 · honey #E6B17E · warm-ink #2E2620 */

:root {
    --ms-canvas: #faf6f0;
    --ms-surface: #fffdfb;
    --ms-primary: #be7355;
    --ms-primary-700: #a85f43;
    --ms-accent: #e6b17e;
    --ms-ink: #2e2620;
    --ms-muted: #8a7e72;
    --ms-line: #efe6da;
    /* Shared curve for entrance motion — an intentional ease-out-quint
       instead of the browser's default `ease`. */
    --ms-ease: cubic-bezier(.22, 1, .36, 1);
}

@keyframes msFadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
/* Smaller-travel variant for compact elements (stat cards, chips, bars) —
   a KPI number and a full dashboard band shouldn't cost the same 12px. */
@keyframes msFadeUpSm { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes msFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes msScaleIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }

/* ---- Modal centering (all panels, every Action/Resource modal) ----------
   Filament's modal is `position: fixed; inset: 0` — its own centering
   (`justify-items-center` on the grid inside) has no idea the sidebar
   exists, so it always centers on the FULL browser width. On any desktop
   viewport that visually reads as off-center, shifted left under the
   sidebar (AppServiceProvider's global ->modalWidth(Large) narrowed the
   overlap so it stopped eating clicks, but never actually re-centered it).
   `--sidebar-width` is the same custom property Filament's own sidebar
   uses (vendor/filament/filament/resources/views/components/layout/
   base.blade.php), so this tracks it automatically if that's ever changed.
   Scoped to the `lg:` breakpoint (1024px) — Filament's own sidebar
   breakpoint — because below that the sidebar is a hidden/overlay drawer,
   not a static column, and the modal should stay centered on the full
   (small) viewport as normal. Excludes `.fi-modal-close-overlay` (the
   dim backdrop) — only the container that lays out `.fi-modal-window`
   needs to shrink; the backdrop dimming the sidebar too is correct. */
@media (min-width: 1024px) {
    .fi-modal-open > div > .fixed.inset-0:not(.fi-modal-close-overlay) {
        inset-inline-start: var(--sidebar-width);
    }
}

/* ---- Type + canvas ------------------------------------------------------- */
.fi-body,
.fi-simple-layout {
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    background-color: var(--ms-canvas);
    color: var(--ms-ink);
    -webkit-font-smoothing: antialiased;
}

.fi-header-heading,
.fi-section-header-heading,
.fi-modal-heading,
.fi-wi-stats-overview-stat-value,
.fi-simple-header-heading {
    font-family: 'Bricolage Grotesque', 'Inter', sans-serif;
    letter-spacing: -0.02em;
    font-weight: 600;
    color: var(--ms-ink);
}
.fi-header-heading { font-size: 1.8rem; }

.fi-main { animation: msFadeIn .4s ease both; }
/* .fi-header (the page heading) intentionally has no entrance animation —
   it appears on every navigation, all day, for daily users of this panel;
   animating it delayed perceived readiness for no functional reason. */

/* ---- Topbar + sidebar ---------------------------------------------------- */
.fi-topbar > div {
    background-color: rgba(255, 253, 251, 0.82);
    backdrop-filter: saturate(140%) blur(8px);
    border-bottom: 1px solid var(--ms-line);
    box-shadow: none;
}
.fi-sidebar,
.fi-sidebar-header {
    background-color: var(--ms-surface);
    border-right: 1px solid var(--ms-line);
}
.fi-sidebar-header { box-shadow: none; border-bottom: 1px solid var(--ms-line); }

.fi-sidebar-item-button {
    border-radius: 0.6rem;
    font-weight: 500;
    color: var(--ms-muted);
    transition: background-color .18s ease, color .18s ease, transform .18s ease;
}
.fi-sidebar-item-button:hover {
    background-color: rgba(190, 115, 85, 0.08);
    color: var(--ms-ink);
    transform: translateX(2px);
}
.fi-sidebar-item-active .fi-sidebar-item-button {
    background-color: rgba(190, 115, 85, 0.12);
    color: var(--ms-primary-700);
    font-weight: 600;
    position: relative;
}
.fi-sidebar-item-active .fi-sidebar-item-button::before {
    content: '';
    position: absolute;
    left: -0.5rem; top: 20%; bottom: 20%;
    width: 3px; border-radius: 0 3px 3px 0;
    background: var(--ms-accent);
}

/* ---- Cards / sections ---------------------------------------------------- */
.fi-section,
.fi-wi-stats-overview-stat,
.fi-ta-ctn,
.fi-fo-component-ctn > .fi-section {
    background-color: var(--ms-surface);
    border: 1px solid var(--ms-line);
    border-radius: 1rem;
    box-shadow: 0 1px 2px rgba(46, 38, 32, 0.04), 0 10px 28px -18px rgba(46, 38, 32, 0.20);
}

/* ---- Stat cards: warm, animated ------------------------------------------ */
.fi-wi-stats-overview-stat {
    padding: 1.3rem 1.45rem;
    transition: transform .18s ease, box-shadow .18s ease;
    animation: msFadeUpSm .22s var(--ms-ease) both;
    position: relative;
    overflow: hidden;
}
.fi-wi-stats-overview-stat::after {
    content: '';
    position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: linear-gradient(var(--ms-primary), var(--ms-accent));
    opacity: .85;
}
.fi-wi-stats-overview-stat:nth-child(1) { animation-delay: .04s; }
.fi-wi-stats-overview-stat:nth-child(2) { animation-delay: .10s; }
.fi-wi-stats-overview-stat:nth-child(3) { animation-delay: .16s; }
.fi-wi-stats-overview-stat:nth-child(4) { animation-delay: .22s; }
.fi-wi-stats-overview-stat:nth-child(5) { animation-delay: .28s; }
.fi-wi-stats-overview-stat:nth-child(6) { animation-delay: .34s; }
.fi-wi-stats-overview-stat:hover {
    transform: translateY(-3px);
    box-shadow: 0 2px 4px rgba(46, 38, 32, 0.05), 0 18px 36px -20px rgba(46, 38, 32, 0.30);
}
.fi-wi-stats-overview-stat-value { font-size: 2.05rem; line-height: 1.1; }
.fi-wi-stats-overview-stat-label {
    color: var(--ms-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.72rem;
}

/* ---- Buttons ------------------------------------------------------------- */
.fi-btn {
    border-radius: 0.65rem;
    font-weight: 600;
    transition: transform .12s ease, box-shadow .18s ease, background-color .18s ease;
}
.fi-btn:active { transform: translateY(1px); }
.fi-btn.fi-color-primary:hover { box-shadow: 0 8px 20px -8px rgba(190, 115, 85, 0.55); }

/* ---- Login: split brand panel + form ------------------------------------- */
.fi-simple-layout {
    background-image:
        radial-gradient(55rem 55rem at 110% -10%, rgba(190, 115, 85, 0.07), transparent 60%),
        radial-gradient(45rem 45rem at -10% 110%, rgba(230, 177, 126, 0.10), transparent 55%);
}
.fi-simple-main {
    border: 1px solid var(--ms-line);
    border-radius: 1.25rem;
    box-shadow: 0 24px 60px -28px rgba(168, 95, 67, 0.40);
    background: var(--ms-surface);
    padding-top: 2.25rem;
    animation: msScaleIn .5s ease both;
}
.fi-simple-header { text-align: center; }

/* split: when the brand panel is injected (login only) */
body:has(.ms-login-brand) .fi-simple-layout { padding-left: 46%; }

.ms-login-brand {
    position: fixed;
    inset: 0 54% 0 0;
    background:
        radial-gradient(40rem 40rem at 80% 10%, rgba(230, 177, 126, 0.22), transparent 60%),
        linear-gradient(150deg, #c47a59 0%, #a85f43 55%, #8c4a33 100%);
    color: #fdf6ee;
    display: flex;
    align-items: center;
    padding: clamp(2.5rem, 6vw, 6rem);
    z-index: 10;
    overflow: hidden;
}
.ms-login-brand__inner { max-width: 30rem; animation: msFadeUp .6s ease .1s both; }
.ms-login-brand__wordmark { display: flex; align-items: center; gap: .6rem; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1.35rem; }
.ms-login-brand__title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 700;
    font-size: clamp(1.9rem, 3.4vw, 2.9rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin: 2.2rem 0 1rem;
}
.ms-login-brand__sub { color: #f3e4d6; font-size: 1.02rem; line-height: 1.6; }
.ms-login-brand__list { margin-top: 2rem; display: grid; gap: .85rem; }
.ms-login-brand__item { display: flex; align-items: center; gap: .7rem; font-size: .96rem; color: #fbeede; }
.ms-login-brand__check {
    flex: none; width: 1.4rem; height: 1.4rem; border-radius: 50%;
    background: rgba(253, 246, 238, 0.16); display: grid; place-items: center; font-size: .8rem;
}
@media (max-width: 1024px) {
    .ms-login-brand { display: none; }
    body:has(.ms-login-brand) .fi-simple-layout { padding-left: 0; }
}

/* ---- Dashboard hero ------------------------------------------------------ */
.ms-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 2rem 2.25rem;
    border-radius: 1.15rem;
    color: #fdf6ee;
    background:
        radial-gradient(30rem 30rem at 90% -20%, rgba(230, 177, 126, 0.30), transparent 60%),
        linear-gradient(135deg, #c47a59 0%, #a85f43 60%, #8c4a33 100%);
    box-shadow: 0 18px 40px -22px rgba(168, 95, 67, 0.55);
    animation: msFadeUp .5s ease both;
}
.ms-hero__eyebrow { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: #f1ddca; font-weight: 600; }
.ms-hero__title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 700; letter-spacing: -0.02em;
    font-size: clamp(1.5rem, 2.6vw, 2.1rem);
    margin: .5rem 0 .35rem;
}
.ms-hero__sub { color: #f3e4d6; font-size: 1rem; }
.ms-hero__mark { flex: none; opacity: .9; animation: msFadeIn .8s ease .2s both; }
@media (max-width: 640px) { .ms-hero__mark { display: none; } }

/* ---- Quick actions ------------------------------------------------------- */
.ms-qa {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 1rem;
}
.ms-qa__card {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    padding: 1.15rem 1.2rem;
    border-radius: 1rem;
    background: var(--ms-surface);
    border: 1px solid var(--ms-line);
    box-shadow: 0 1px 2px rgba(46, 38, 32, 0.04);
    text-decoration: none;
    color: var(--ms-ink);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    animation: msFadeUpSm .22s var(--ms-ease) both;
}
.ms-qa__card:hover {
    transform: translateY(-3px);
    border-color: rgba(190, 115, 85, 0.45);
    box-shadow: 0 16px 32px -20px rgba(190, 115, 85, 0.55);
}
.ms-qa__icon {
    width: 2.4rem; height: 2.4rem; border-radius: .7rem;
    display: grid; place-items: center; margin-bottom: .35rem;
    background: rgba(190, 115, 85, 0.12); color: var(--ms-primary-700);
}
.ms-qa__label { font-weight: 600; font-size: .98rem; }
.ms-qa__desc { color: var(--ms-muted); font-size: .82rem; }

/* ---- Import guide -------------------------------------------------------- */
.ms-import-guide { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.5rem; }
.ms-import-guide__title { font-weight: 600; margin-bottom: .5rem; }
.ms-import-guide__list { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .4rem; color: var(--ms-muted); font-size: .9rem; }
.ms-import-guide__list code { background: rgba(190,115,85,.10); color: var(--ms-primary-700); padding: .05rem .4rem; border-radius: .35rem; font-size: .82rem; }
.ms-import-dl { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; color: var(--ms-primary-700); text-decoration: none; font-size: .9rem; }
.ms-import-dl:hover { text-decoration: underline; }
.ms-import-result { padding: .85rem 0; border-top: 1px solid var(--ms-line); }
.ms-import-result:first-child { border-top: 0; }
.ms-import-result__head { display: flex; align-items: center; gap: .75rem; }
.ms-import-result__kind { font-weight: 600; }
.ms-import-result__ok { color: #2f7d52; font-size: .85rem; font-weight: 600; }
.ms-import-result__bad { color: #b4561f; font-size: .85rem; font-weight: 600; }
.ms-import-result__errors { margin: .5rem 0 0; padding-left: 1.1rem; color: var(--ms-muted); font-size: .85rem; display: grid; gap: .2rem; }

/* ---- Fees report --------------------------------------------------------- */
.ms-fr-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.ms-fr-stat {
    background: var(--ms-surface); border: 1px solid var(--ms-line); border-radius: 1rem;
    padding: 1.2rem 1.35rem; box-shadow: 0 1px 2px rgba(46,38,32,.04), 0 10px 28px -18px rgba(46,38,32,.18);
    animation: msFadeUpSm .22s var(--ms-ease) both;
}
.ms-fr-stat__label { color: var(--ms-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; }
.ms-fr-stat__value { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 600; font-size: 1.9rem; letter-spacing: -.02em; margin: .3rem 0; }
.ms-fr-stat__value--warn { color: #b4561f; }
.ms-fr-stat__meta { color: var(--ms-muted); font-size: .85rem; }
.ms-fr-progress { height: 8px; border-radius: 99px; background: rgba(190,115,85,.14); overflow: hidden; margin-top: .35rem; }
.ms-fr-progress > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--ms-primary), var(--ms-accent)); transition: width .6s ease; }

.ms-fr-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.25rem; }
@media (max-width: 900px) { .ms-fr-grid { grid-template-columns: 1fr; } }

.ms-fr-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.ms-fr-table th { text-align: left; color: var(--ms-muted); font-weight: 600; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; padding: .5rem .5rem; border-bottom: 1px solid var(--ms-line); }
.ms-fr-table td { padding: .7rem .5rem; border-bottom: 1px solid var(--ms-line); }
.ms-fr-table tr:last-child td { border-bottom: 0; }
.ms-fr-td--warn { color: #b4561f; font-weight: 600; }
.ms-fr-bar { display: inline-block; width: 70px; height: 7px; border-radius: 99px; background: rgba(190,115,85,.14); overflow: hidden; vertical-align: middle; margin-right: .5rem; }
.ms-fr-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--ms-primary), var(--ms-accent)); }
.ms-fr-bar__num { font-size: .82rem; color: var(--ms-muted); }

.ms-fr-defaulters { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; }
.ms-fr-defaulters li { display: flex; align-items: center; justify-content: space-between; padding: .6rem .25rem; border-bottom: 1px solid var(--ms-line); }
.ms-fr-defaulters li:last-child { border-bottom: 0; }
.ms-fr-defaulters__name { font-weight: 600; font-size: .92rem; }
.ms-fr-defaulters__class { color: var(--ms-muted); font-size: .8rem; }
.ms-fr-defaulters__amt { font-weight: 700; color: #b4561f; }
.ms-fr-empty { color: var(--ms-muted); padding: .5rem 0; }

/* ---- Attendance register grid -------------------------------------------- */
.ms-att-scroll { overflow-x: auto; }
.ms-att-grid { min-width: max-content; }
.ms-att-grid th, .ms-att-grid td { text-align: center; white-space: nowrap; }
.ms-att-grid th:first-child, .ms-att-grid td:first-child { text-align: left; position: sticky; left: 0; background: var(--ms-surface); }
.ms-att-cell { padding: .35rem .4rem; }
.ms-att-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.6rem; height: 1.6rem; border-radius: 99px;
    font-weight: 700; font-size: .78rem;
}
.ms-att-mark--p { background: rgba(64, 145, 108, .16); color: #2d6a4f; }
.ms-att-mark--a { background: rgba(190, 115, 85, .18); color: #b4561f; }
.ms-att-mark--l { background: rgba(138, 126, 114, .16); color: var(--ms-muted); }

/* ---- Dashboard command center -------------------------------------------- */
.ms-dash-band {
    background: var(--ms-surface);
    border: 1px solid var(--ms-line);
    border-radius: 1.15rem;
    padding: 1.4rem 1.6rem;
    box-shadow: 0 1px 2px rgba(46,38,32,.04), 0 10px 28px -18px rgba(46,38,32,.18);
    animation: msFadeUp .38s var(--ms-ease) both;
    margin-bottom: 1.25rem;
}
.ms-dash-band__title, .ms-dash-card__title {
    display: flex; align-items: center; gap: .5rem;
    color: var(--ms-muted); font-weight: 600; font-size: .8rem;
    text-transform: uppercase; letter-spacing: .05em; margin-bottom: 1rem;
}
.ms-dash-money { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; align-items: center; }
@media (max-width: 820px) { .ms-dash-money { grid-template-columns: 1fr; gap: 1.25rem; } }
.ms-dash-money__collected { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 2.7rem; line-height: 1; letter-spacing: -.02em; color: var(--ms-ink); }
.ms-dash-money__of { color: var(--ms-muted); margin: .35rem 0 .9rem; }
.ms-dash-progress { height: 10px; border-radius: 99px; background: rgba(190,115,85,.14); overflow: hidden; }
.ms-dash-progress > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--ms-primary), var(--ms-accent)); }
.ms-dash-money__rate { font-size: .85rem; color: var(--ms-muted); margin-top: .4rem; font-weight: 600; }
.ms-dash-money__side { display: grid; gap: .65rem; }
.ms-dash-pill { background: var(--ms-canvas); border: 1px solid var(--ms-line); border-radius: .8rem; padding: .7rem .9rem; }
.ms-dash-pill--warn { background: rgba(180,86,31,.07); border-color: rgba(180,86,31,.22); }
.ms-dash-pill__value { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1.35rem; letter-spacing: -.01em; }
.ms-dash-pill--warn .ms-dash-pill__value { color: #b4561f; }
.ms-dash-pill__label { color: var(--ms-muted); font-size: .8rem; }

.ms-dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 820px) { .ms-dash-grid { grid-template-columns: 1fr; } }
.ms-dash-card {
    background: var(--ms-surface); border: 1px solid var(--ms-line); border-radius: 1.15rem;
    padding: 1.4rem 1.6rem; box-shadow: 0 1px 2px rgba(46,38,32,.04), 0 10px 28px -18px rgba(46,38,32,.18);
    animation: msFadeUp .38s var(--ms-ease) .08s both;
}

.ms-dash-att { display: flex; align-items: center; gap: 1.2rem; }
.ms-dash-att__ring {
    --pct: 0;
    width: 88px; height: 88px; border-radius: 50%; flex: none;
    background: conic-gradient(var(--ms-primary) calc(var(--pct) * 1%), rgba(190,115,85,.14) 0);
    display: grid; place-items: center;
}
.ms-dash-att__ring::before { content: ''; position: absolute; width: 64px; height: 64px; border-radius: 50%; background: var(--ms-surface); }
.ms-dash-att__ring span { position: relative; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1.15rem; }
.ms-dash-att__meta strong { font-size: 1.05rem; }
.ms-dash-att__sub { color: var(--ms-muted); font-size: .85rem; margin-top: .15rem; }

.ms-dash-warn, .ms-dash-ok { display: flex; align-items: center; gap: .5rem; margin-top: 1rem; padding: .65rem .8rem; border-radius: .7rem; font-size: .87rem; line-height: 1.3; }
.ms-dash-warn { background: rgba(180,86,31,.08); color: #8c4a1f; }
.ms-dash-ok { background: rgba(47,125,82,.10); color: #2f7d52; }

.ms-dash-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.ms-dash-list li { display: flex; align-items: center; justify-content: space-between; padding: .6rem .1rem; border-bottom: 1px solid var(--ms-line); }
.ms-dash-list li:last-child { border-bottom: 0; }
.ms-dash-list__name { font-weight: 600; font-size: .92rem; }
.ms-dash-list__meta { color: var(--ms-muted); font-size: .8rem; }
.ms-dash-list__amt { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; color: #b4561f; }
.ms-dash-empty { color: var(--ms-muted); padding: .5rem 0; }

/* ---- Dashboard: term selector + trend ------------------------------------ */
.ms-dash-band__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.ms-dash-band__head .ms-dash-band__title { margin-bottom: 0; }
.ms-dash-terms { display: inline-flex; gap: .25rem; background: var(--ms-canvas); border: 1px solid var(--ms-line); border-radius: .7rem; padding: .25rem; }
.ms-dash-term {
    border: 0; background: transparent; cursor: pointer;
    font-size: .82rem; font-weight: 600; color: var(--ms-muted);
    padding: .35rem .7rem; border-radius: .5rem; transition: all .15s ease;
}
.ms-dash-term:hover { color: var(--ms-ink); }
.ms-dash-term.is-active { background: var(--ms-surface); color: var(--ms-primary-700); box-shadow: 0 1px 2px rgba(46,38,32,.08); }

.ms-dash-trend { margin-top: 1.25rem; }
.ms-dash-bars { display: flex; align-items: flex-end; gap: 1.5rem; height: 160px; padding: .5rem .25rem 0; }
.ms-dash-bars__col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; gap: .4rem; animation: msFadeUpSm .22s var(--ms-ease) both; }
.ms-dash-bars__val { font-size: .78rem; font-weight: 600; color: var(--ms-muted); min-height: 1rem; }
.ms-dash-bars__bar {
    width: 100%; max-width: 64px; border-radius: .5rem .5rem 0 0;
    background: linear-gradient(var(--ms-primary), var(--ms-accent));
    transition: height .7s cubic-bezier(.2,.7,.2,1);
    transform-origin: bottom; animation: msBarGrow .8s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes msBarGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.ms-dash-bars__lbl { font-size: .78rem; color: var(--ms-muted); font-weight: 600; }

/* ---- Clickable trend bars ----------------------------------------------- */
.ms-dash-bars__col[clickable] { cursor: pointer; border-radius: .5rem; transition: background .2s ease; outline: none; }
.ms-dash-bars__col[clickable]:hover .ms-dash-bars__bar,
.ms-dash-bars__col[clickable]:focus-visible .ms-dash-bars__bar { filter: brightness(1.06) saturate(1.08); }
.ms-dash-bars__col[clickable]:focus-visible { box-shadow: 0 0 0 2px var(--ms-accent); }
.ms-dash-bars__col[clickable]:hover .ms-dash-bars__lbl { color: var(--ms-primary-700); }
.ms-dash-bars__col.is-active .ms-dash-bars__bar { box-shadow: 0 0 0 2px var(--ms-primary-700) inset, 0 4px 12px rgba(190,115,85,.28); }
.ms-dash-bars__col.is-active .ms-dash-bars__lbl,
.ms-dash-bars__col.is-active .ms-dash-bars__val { color: var(--ms-primary-700); }

/* ---- Trend drill-down panel --------------------------------------------- */
.ms-dash-drill {
    /* Enter/exit now owned by Alpine's x-transition (command-center.blade.php)
       so the panel actually animates on close, not just on open — a CSS
       mount animation here would double up with it. */
    margin-top: 1.1rem; padding: 1rem 1.1rem;
    background: var(--ms-surface); border: 1px solid var(--ms-line);
    border-radius: 1rem; box-shadow: 0 1px 2px rgba(46,38,32,.05);
}
.ms-dash-drill__head { display: flex; align-items: center; justify-content: space-between; }
.ms-dash-drill__title { color: var(--ms-muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.ms-dash-drill__close {
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.6rem; height: 1.6rem; border-radius: .5rem; color: var(--ms-muted);
    background: transparent; transition: background .2s ease, color .2s ease;
}
.ms-dash-drill__close:hover { background: rgba(190,115,85,.10); color: var(--ms-primary-700); }
.ms-dash-drill__total { font-size: 1.9rem; font-weight: 700; color: var(--ms-primary-700); margin: .25rem 0 .75rem; letter-spacing: -.02em; }
.ms-dash-drill__methods { display: flex; flex-wrap: wrap; gap: .5rem; }
.ms-dash-drill__chip {
    display: inline-flex; align-items: baseline; gap: .4rem;
    background: var(--ms-canvas); border: 1px solid var(--ms-line);
    border-radius: .6rem; padding: .4rem .7rem;
}
.ms-dash-drill__chip-k { color: var(--ms-muted); font-size: .78rem; font-weight: 600; }
.ms-dash-drill__chip-v { font-weight: 700; color: var(--ms-text, #2e2620); }
.ms-dash-drill__chip--empty { color: var(--ms-muted); font-size: .85rem; }
.ms-dash-drill__foot {
    display: flex; align-items: center; justify-content: space-between; gap: .75rem;
    margin-top: .85rem; padding-top: .7rem; border-top: 1px solid var(--ms-line);
    color: var(--ms-muted); font-size: .82rem;
}
.ms-dash-drill__link { color: var(--ms-primary-700); font-weight: 600; text-decoration: none; }
.ms-dash-drill__link:hover { text-decoration: underline; }

/* ---- Table filter dropdown: explicit close button (myschool-admin.js) --
   Injected only into panels with more than one filter — a single-checkbox
   panel closes itself on check instead (no button needed there). The panel
   itself already carries Filament's own `absolute` utility class, which is
   sufficient as a positioning context for this button — do NOT add a
   `position` rule for .fi-dropdown-panel here: a compound selector like
   `.fi-ta-filters-dropdown .fi-dropdown-panel` outranks that single-class
   utility's specificity and silently flips it to `relative`, turning the
   floating panel into an in-flow block that pushes the whole table down. */
.ms-filter-close {
    position: absolute; top: .65rem; right: .65rem; z-index: 1;
    width: 1.5rem; height: 1.5rem; border-radius: 999px; border: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent; color: var(--ms-muted); font-size: 1.1rem; line-height: 1;
    cursor: pointer; transition: background .15s ease, color .15s ease;
}
.ms-filter-close:hover { background: rgba(190, 115, 85, .10); color: var(--ms-primary-700); }

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