/* ===========================================================================
   Money-Wise admin theme — brand the Filament panel to match the front end.
   Loaded via a render hook (see AdminPanelProvider). Plain CSS (no @layer) so
   it wins over Filament's layered defaults. Brand: navy + sky on Sora/Jakarta.

   Contrast rules enforced throughout:
   - solid navy surfaces always carry white or sky text, never dark text
   - sky (#58b9e6) and gold (#f6b73c) are light surfaces: navy text is correct
   =========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --mw-navy-950: #0d142e;
    --mw-navy-900: #15204a;
    --mw-navy-800: #1c2b5f;
    --mw-navy-700: #28366a;
    --mw-navy-300: #91a4d6;
    --mw-navy-200: #b9c6e7;
    --mw-wise-400: #58b9e6;
    --mw-wise-300: #8ed4f2;
    --mw-gold-400: #f6b73c;
    --mw-coral-500: #ff5d73;
    --mw-green-400: #34d399;
    --mw-violet-400: #b7a4f7;
}

/* ---- Base typography ---------------------------------------------------- */
.fi-body,
.fi-simple-layout,
.mw-auth {
    font-family: 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
}
.fi-header-heading,
.fi-section-header-heading,
.fi-wi-stats-overview-stat-value,
.fi-modal-heading,
.fi-ta-header-heading,
.fi-fo-field-wrp-label {
    font-family: 'Sora', 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
}
.fi-header-heading {
    color: var(--mw-navy-900);
    font-weight: 800;
    letter-spacing: -0.025em;
}

/* ---- Sidebar shell ------------------------------------------------------- */
.fi-sidebar,
.fi-sidebar-nav {
    background: linear-gradient(185deg, #0b1128 0%, #14204b 55%, #182a63 100%) !important;
    border-right: 0 !important;
}
.fi-sidebar-nav {
    position: relative;
}
/* kitenge wash: pattern inverted to pale lines, faded at both ends */
.fi-sidebar-nav::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: url('/images/pattern-kitenge.svg') repeat;
    background-size: 300px;
    opacity: 0.05;
    filter: invert(1) brightness(1.7);
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 14%, #000 78%, transparent);
    mask-image: linear-gradient(180deg, transparent, #000 14%, #000 78%, transparent);
}
.fi-sidebar-nav > * {
    position: relative;
    z-index: 1;
}
/* thin translucent scrollbar */
.fi-sidebar-nav::-webkit-scrollbar { width: 5px; }
.fi-sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.fi-sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 999px; }

/* ---- Sidebar header (logo + ADMIN chip) ---------------------------------- */
.fi-sidebar-header {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
    box-shadow: none !important;
}
.fi-sidebar-header-logo-ctn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}
.mw-admin-chip {
    align-self: center;
    padding: 0.24rem 0.55rem 0.2rem;
    border-radius: 999px;
    border: 1px solid rgba(88, 185, 230, 0.4);
    background: rgba(88, 185, 230, 0.14);
    color: var(--mw-wise-300);
    font: 800 0.58rem/1 'Sora', sans-serif;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.fi-sidebar .fi-logo {
    color: #fff !important;
    font-family: 'Sora', sans-serif;
    font-weight: 800;
}

/* ---- Sidebar items: icon tiles + labels ---------------------------------- */
.fi-sidebar .fi-sidebar-item-btn {
    gap: 0.7rem;
    padding: 0.32rem 0.55rem;
    border-radius: 0.8rem;
    transition: background 0.16s ease;
}
.fi-sidebar .fi-sidebar-item-label {
    color: #c3cfef;
    font-size: 0.83rem;
    font-weight: 600;
    letter-spacing: 0.005em;
}
.fi-sidebar .fi-sidebar-item-icon {
    box-sizing: content-box;
    width: 1.15rem;
    height: 1.15rem;
    padding: 0.45rem;
    flex: none;
    color: #8fa2d4;
    border-radius: 0.65rem;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.fi-sidebar .fi-sidebar-item-btn:hover {
    background: rgba(255, 255, 255, 0.06) !important;
}
.fi-sidebar .fi-sidebar-item-btn:hover .fi-sidebar-item-label { color: #fff; }
.fi-sidebar .fi-sidebar-item-btn:hover .fi-sidebar-item-icon {
    color: var(--mw-wise-300);
    box-shadow: inset 0 0 0 1px rgba(142, 212, 242, 0.35);
}

/* per-group icon hue: each area of the panel has its own accent */
.fi-sidebar-group[data-group-label='Inbox'] .fi-sidebar-item-icon { color: #f8c766; background: rgba(246, 183, 60, 0.1); }
.fi-sidebar-group[data-group-label='People'] .fi-sidebar-item-icon { color: #7fd0f4; background: rgba(88, 185, 230, 0.12); }
.fi-sidebar-group[data-group-label='Learning'] .fi-sidebar-item-icon { color: var(--mw-violet-400); background: rgba(139, 120, 221, 0.14); }
.fi-sidebar-group[data-group-label='Content'] .fi-sidebar-item-icon { color: #6ee7a8; background: rgba(52, 211, 153, 0.1); }
.fi-sidebar-group[data-group-label='Money'] .fi-sidebar-item-icon { color: #4edec0; background: rgba(45, 212, 191, 0.1); }
.fi-sidebar-group[data-group-label='Settings'] .fi-sidebar-item-icon { color: #a8b6d8; background: rgba(148, 163, 184, 0.12); }

/* active item: sky tile with navy glyph (sky is a light surface), white label */
.fi-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-btn {
    background: linear-gradient(90deg, rgba(88, 185, 230, 0.18), rgba(88, 185, 230, 0.03)) !important;
    box-shadow: inset 3px 0 0 0 var(--mw-wise-400);
}
.fi-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-label {
    color: #fff;
    font-weight: 700;
}
.fi-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-icon,
.fi-sidebar-group .fi-sidebar-item.fi-active .fi-sidebar-item-icon {
    color: var(--mw-navy-950);
    background: var(--mw-wise-400);
    box-shadow: 0 6px 16px -6px rgba(88, 185, 230, 0.65);
}

/* sidebar count badges: solid, saturated, always readable */
.fi-sidebar-item-badge-ctn .fi-badge {
    border: 0;
    font-weight: 800;
    font-size: 0.66rem;
}
.fi-sidebar-item-badge-ctn .fi-badge.fi-color-danger { background: var(--mw-coral-500) !important; color: #fff !important; }
.fi-sidebar-item-badge-ctn .fi-badge.fi-color-warning { background: var(--mw-gold-400) !important; color: #231803 !important; }
.fi-sidebar-item-badge-ctn .fi-badge.fi-color-info { background: var(--mw-wise-400) !important; color: #06283c !important; }
.fi-sidebar-item-badge-ctn .fi-badge.fi-color-success { background: var(--mw-green-400) !important; color: #05281a !important; }

/* group labels: tracked caps with a hairline that runs to the edge */
.fi-sidebar .fi-sidebar-group-btn {
    padding-top: 0.9rem;
}
.fi-sidebar .fi-sidebar-group-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex: 1;
    color: #5d6fa8 !important;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.64rem;
    font-weight: 800;
}
.fi-sidebar .fi-sidebar-group-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.12), transparent);
}
.fi-sidebar .fi-icon-btn { color: #6a7cb5; }
.fi-sidebar .fi-sidebar-group-collapse-btn:hover { color: #fff; }

/* ---- Sidebar footer card (render hook) ----------------------------------- */
.mw-side-foot { margin: 1rem 0.4rem 0.5rem; }
.mw-side-foot-card {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 0.85rem;
    text-decoration: none;
    border-radius: 0.95rem;
    border: 1px solid rgba(88, 185, 230, 0.28);
    background: linear-gradient(120deg, rgba(88, 185, 230, 0.14), rgba(255, 255, 255, 0.04));
    transition: background 0.16s ease, border-color 0.16s ease;
}
.mw-side-foot-card:hover {
    background: linear-gradient(120deg, rgba(88, 185, 230, 0.22), rgba(255, 255, 255, 0.07));
    border-color: rgba(88, 185, 230, 0.5);
}
.mw-side-foot-dot {
    width: 0.55rem;
    height: 0.55rem;
    flex: none;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.15);
    animation: mw-pulse 2.6s ease-in-out infinite;
}
@keyframes mw-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.12); }
    50% { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0.05); }
}
.mw-side-foot-copy { min-width: 0; }
.mw-side-foot-copy strong { display: block; color: #fff; font-size: 0.78rem; font-weight: 700; }
.mw-side-foot-copy small { display: block; margin-top: 0.08rem; color: #8fa2d4; font-size: 0.66rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mw-side-foot-arrow { width: 1rem; height: 1rem; flex: none; margin-left: auto; color: var(--mw-wise-400); }
.mw-side-foot-note { margin: 0.65rem 0.25rem 0; color: #46578f; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.06em; text-align: center; }

/* ---- Topbar (dark navy glass) -------------------------------------------- */
.fi-topbar > nav,
.fi-topbar {
    background: rgba(11, 17, 40, 0.92) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: none !important;
}
.fi-topbar .fi-icon-btn,
.fi-topbar .fi-topbar-item-icon,
.fi-topbar .fi-dropdown-trigger .fi-icon-btn {
    color: var(--mw-navy-200) !important;
}
.fi-topbar .fi-dropdown-trigger span,
.fi-topbar .fi-user-menu-trigger span {
    color: #eef1f9 !important;
}
.fi-topbar .fi-breadcrumbs-item-label { color: #9db0dd; }
.fi-topbar .fi-breadcrumbs-item:last-child .fi-breadcrumbs-item-label { color: #fff; }
.fi-topbar .fi-breadcrumbs-item svg { color: #46578f; }
.fi-topbar .fi-input-wrp {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12) !important;
}
.fi-topbar .fi-input { color: #fff !important; }
.fi-topbar .fi-input::placeholder { color: #8fa2d4 !important; }
.fi-topbar .fi-input-wrp svg { color: #8fa2d4; }
.fi-topbar .fi-avatar { box-shadow: 0 0 0 2px var(--mw-wise-400); }

/* ---- Main content surface ------------------------------------------------ */
.fi-main {
    background-color: #f5f8fe;
    background-image:
        linear-gradient(rgba(245, 248, 254, 0.965), rgba(245, 248, 254, 0.965)),
        url('/images/pattern-kitenge.svg');
    background-size: auto, 380px;
    background-attachment: fixed, fixed;
}

/* ---- Cards / sections ---------------------------------------------------- */
.fi-section,
.fi-wi-stats-overview-stat,
.fi-ta-ctn,
.fi-fo-component-ctn > .fi-section {
    border-radius: 1.25rem !important;
    border: 1px solid rgba(28, 43, 95, 0.07) !important;
    box-shadow: 0 14px 36px -22px rgba(13, 20, 46, 0.35) !important;
}
.fi-section-header-heading { color: var(--mw-navy-900); font-weight: 800; letter-spacing: -0.015em; }
.fi-section-header-description { color: #64748b; }

/* ---- Stat widgets: brand hairline + lift --------------------------------- */
.fi-wi-stats-overview-stat {
    position: relative;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.fi-wi-stats-overview-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--mw-navy-800), var(--mw-wise-400) 55%, #7ee0b8);
    opacity: 0.9;
}
.fi-wi-stats-overview-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 48px -22px rgba(13, 20, 46, 0.4) !important;
}
.fi-wi-stats-overview-stat-value {
    font-weight: 800;
    color: var(--mw-navy-900);
    letter-spacing: -0.02em;
}
.fi-wi-stats-overview-stat-label {
    font-weight: 600;
    color: #4b64ac;
}

/* ---- Chart widgets -------------------------------------------------------- */
.fi-wi-chart .fi-section-header-heading { font-size: 0.95rem; }
.fi-wi-chart .fi-section-header-description { font-size: 0.76rem; }

/* ---- Buttons: navy is always white-on-navy -------------------------------- */
.fi-btn {
    border-radius: 0.7rem;
    font-weight: 700;
}
.fi-btn:focus-visible {
    outline: 3px solid rgba(88, 185, 230, 0.45);
    outline-offset: 1px;
}
.fi-btn.fi-color-primary:not(.fi-outlined) {
    background: linear-gradient(180deg, #25376f, var(--mw-navy-800)) !important;
    color: #fff !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 10px 20px -12px rgba(13, 20, 46, 0.6);
}
.fi-btn.fi-color-primary:not(.fi-outlined):hover {
    background: linear-gradient(180deg, #2c4184, var(--mw-navy-700)) !important;
    color: #fff !important;
}
.fi-btn.fi-color-primary:not(.fi-outlined) svg { color: #fff; }
.fi-btn.fi-outlined.fi-color-primary { color: var(--mw-navy-800); box-shadow: inset 0 0 0 1px var(--mw-navy-200); }
.fi-btn.fi-color-gray { color: var(--mw-navy-700); }
.fi-btn.fi-color-danger:not(.fi-outlined) { color: #fff !important; }
.fi-btn.fi-color-success:not(.fi-outlined) { color: #fff !important; }
/* info buttons are sky: a light surface, navy text is the readable pairing */
.fi-btn.fi-color-info:not(.fi-outlined) {
    background: var(--mw-wise-400) !important;
    color: var(--mw-navy-950) !important;
}

/* ---- Tabs: segmented pill control ----------------------------------------- */
.fi-tabs {
    width: fit-content;
    max-width: 100%;
    overflow-x: auto;
    gap: 0.25rem;
    padding: 0.3rem !important;
    border-radius: 999px !important;
    border: 1px solid #dbe3f6 !important;
    background: #e9eefb !important;
    box-shadow: none !important;
}
.fi-tabs-item {
    border-radius: 999px !important;
    padding: 0.5rem 1.05rem !important;
    font-size: 0.82rem;
    font-weight: 700;
    color: #46598f !important;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}
.fi-tabs-item:hover {
    background: rgba(255, 255, 255, 0.8) !important;
    color: var(--mw-navy-800) !important;
}
.fi-tabs-item.fi-active {
    background: var(--mw-navy-800) !important;
    color: #fff !important;
    box-shadow: 0 6px 14px -6px rgba(13, 20, 46, 0.5);
}
.fi-tabs-item.fi-active .fi-tabs-item-label,
.fi-tabs-item.fi-active svg { color: #fff !important; }
.fi-tabs-item .fi-badge { background: rgba(28, 43, 95, 0.1); color: var(--mw-navy-800); border: 0; }
.fi-tabs-item.fi-active .fi-badge { background: rgba(255, 255, 255, 0.18); color: #fff; }

/* ---- Tables ---------------------------------------------------------------- */
.fi-ta-header-heading {
    color: var(--mw-navy-900);
    font-weight: 800;
}
.fi-ta-header-cell,
.fi-ta-header-cell-sort-btn {
    color: #5d6fa8;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}
.fi-ta-header-cell-sorted .fi-ta-header-cell-sort-btn { color: var(--mw-navy-800); }
.fi-ta-row { transition: background 0.12s ease; }
.fi-ta-row:hover {
    background-color: rgba(88, 185, 230, 0.06) !important;
}
.fi-ta-search-field .fi-input-wrp { border-radius: 999px; }
.fi-ta-empty-state-icon-bg { background: #e9eefb !important; color: var(--mw-navy-800) !important; }
.fi-ta-empty-state-heading { color: var(--mw-navy-900); font-family: 'Sora', sans-serif; }

/* pagination: active page is a navy pill with white text */
.fi-pagination-item-btn { border-radius: 0.6rem; font-weight: 700; color: #46598f; }
.fi-pagination-item.fi-active .fi-pagination-item-btn,
.fi-pagination-item-btn.fi-active {
    background: var(--mw-navy-800) !important;
    color: #fff !important;
}

/* ---- Badges ---------------------------------------------------------------- */
.fi-badge { font-weight: 700; }
.fi-badge.fi-color-primary { color: var(--mw-navy-800); }

/* ---- Links ---------------------------------------------------------------- */
.fi-link.fi-color-primary,
a.fi-link {
    color: #2787b8;
}

/* ---- Inputs ---------------------------------------------------------------- */
.fi-main .fi-input-wrp:focus-within {
    box-shadow: 0 0 0 3px rgba(88, 185, 230, 0.25), inset 0 0 0 1px var(--mw-wise-400) !important;
}

/* ---- Dropdowns / modals / notifications ------------------------------------ */
.fi-dropdown-panel {
    border-radius: 0.9rem !important;
    border: 1px solid #e2e8f8 !important;
    box-shadow: 0 24px 48px -24px rgba(13, 20, 46, 0.4) !important;
}
.fi-dropdown-list-item:hover { background: #f2f6fe !important; }
.fi-dropdown-list-item-label { color: var(--mw-navy-700); font-weight: 600; }
.fi-modal-window { border-radius: 1.15rem !important; }
.fi-modal-heading { color: var(--mw-navy-900); font-weight: 800; }

/* ---- Growth command centre --------------------------------------------- */
.mw-command-center {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
    color: #fff;
    background:
        radial-gradient(38rem 26rem at 92% -25%, rgba(88, 185, 230, .36), transparent 62%),
        linear-gradient(120deg, #0d142e 0%, #15204a 58%, #1d4c66 100%);
    box-shadow: 0 24px 60px -28px rgba(13, 20, 46, .6);
}
.mw-command-pattern {
    position: absolute;
    inset: 0;
    opacity: .045;
    background: url('/images/pattern-kitenge.svg');
    background-size: 340px;
}
.mw-command-content {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(18rem, .6fr);
    gap: 1.5rem;
    padding: 1.75rem 2rem;
}
.mw-command-date {
    color: var(--mw-wise-300);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}
.mw-command-copy h2 {
    margin-top: .35rem;
    font: 800 1.75rem/1.15 'Sora', sans-serif;
    letter-spacing: -.025em;
}
.mw-command-lead {
    max-width: 46rem;
    margin-top: .5rem;
    color: #b9c6e7;
    font-size: .9rem;
    line-height: 1.6;
}
.mw-command-signals {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .55rem;
    margin-top: 1.25rem;
}
.mw-command-signals a {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    min-width: 0;
    padding: .65rem .75rem;
    color: #fff;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: .85rem;
    background: rgba(255,255,255,.055);
    transition: background .18s ease, transform .18s ease;
}
.mw-command-signals a:hover { background: rgba(255,255,255,.1); transform: translateY(-1px); }
.mw-command-signals span { color: #91a4d6; font-size: .68rem; font-weight: 700; line-height: 1.35; }
.mw-command-signals strong { font: 800 1.05rem 'Sora', sans-serif; }
.mw-command-side { display: flex; flex-direction: column; gap: .75rem; }
.mw-readiness { padding: 1rem; border: 1px solid rgba(255,255,255,.12); border-radius: 1rem; background: rgba(255,255,255,.065); }
.mw-readiness-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-size: .78rem; font-weight: 800; }
.mw-readiness-head strong { color: var(--mw-wise-300); font: 800 1rem 'Sora', sans-serif; }
.mw-readiness-items { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; margin-top: .7rem; }
.mw-readiness-items span { display: flex; align-items: center; gap: .4rem; color: #91a4d6; font-size: .7rem; font-weight: 700; }
.mw-readiness-items i { width: .45rem; height: .45rem; flex: none; border-radius: 50%; background: #64748b; }
.mw-readiness-items .is-ready { color: #d8f5e3; }
.mw-readiness-items .is-ready i { background: #4ade80; box-shadow: 0 0 0 3px rgba(74,222,128,.12); }
.mw-readiness > a { display: inline-block; margin-top: .8rem; color: var(--mw-wise-300); font-size: .72rem; font-weight: 800; text-decoration: none; }
.mw-command-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.mw-command-actions a { padding: .65rem .75rem; color: #fff; font-size: .72rem; font-weight: 800; text-align: center; text-decoration: none; border: 1px solid rgba(255,255,255,.12); border-radius: .75rem; background: rgba(255,255,255,.06); }
.mw-command-actions a:last-child { grid-column: 1 / -1; color: #0d142e; background: var(--mw-wise-400); border-color: transparent; }

.mw-funnel { display: flex; align-items: stretch; gap: .65rem; }
.mw-funnel-stage { position: relative; display: flex; min-width: 0; flex: 1; flex-direction: column; padding: 1rem; color: inherit; text-decoration: none; border: 1px solid rgba(28,43,95,.08); border-radius: 1rem; background: linear-gradient(145deg, #fff, #f5f8fe); transition: transform .18s ease, box-shadow .18s ease; }
.mw-funnel-stage:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -24px rgba(13,20,46,.5); }
.mw-funnel-index { color: #91a4d6; font: 800 .7rem 'Sora', sans-serif; }
.mw-funnel-label { margin-top: .65rem; color: #4b64ac; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.mw-funnel-stage > strong { margin-top: .2rem; color: #15204a; font: 800 1.8rem 'Sora', sans-serif; }
.mw-funnel-rate { margin-top: .55rem; color: #64748b; font-size: .68rem; font-weight: 700; }
.mw-funnel-rate.is-healthy { color: #15803d; }
.mw-funnel-rate.is-warning { color: #b45309; }
.mw-funnel-arrow { align-self: center; color: var(--mw-wise-400); font: 800 1.25rem 'Sora', sans-serif; }
.mw-funnel-note { margin-top: 1rem; color: #64748b; font-size: .72rem; line-height: 1.55; }

.mw-attention-list, .mw-activity-list { display: flex; flex-direction: column; }
.mw-attention-item { display: flex; align-items: center; gap: .75rem; padding: .8rem .15rem; color: inherit; text-decoration: none; border-bottom: 1px solid rgba(28,43,95,.07); }
.mw-attention-item:last-child, .mw-activity-item:last-child { border-bottom: 0; }
.mw-attention-dot { width: .55rem; height: .55rem; flex: none; border-radius: 50%; background: #94a3b8; }
.mw-attention-item.is-urgent .mw-attention-dot { background: #e11d48; box-shadow: 0 0 0 4px rgba(225,29,72,.1); }
.mw-attention-item.is-warning .mw-attention-dot { background: #f59e0b; box-shadow: 0 0 0 4px rgba(245,158,11,.1); }
.mw-attention-copy { min-width: 0; flex: 1; }
.mw-attention-copy strong, .mw-attention-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mw-attention-copy strong { color: #15204a; font-size: .84rem; }
.mw-attention-copy small { margin-top: .15rem; color: #64748b; font-size: .72rem; }
.mw-attention-item > b { min-width: 2rem; color: #15204a; font: 800 1.1rem 'Sora', sans-serif; text-align: right; }

.mw-activity-item { display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; align-items: center; gap: .75rem; padding: .72rem .15rem; color: inherit; text-decoration: none; border-bottom: 1px solid rgba(28,43,95,.07); }
.mw-activity-icon { width: 2.1rem; height: 2.1rem; border-radius: .7rem; background: #e8edf9; }
.mw-activity-icon.is-payment { background: #dcfce7; box-shadow: inset 0 0 0 1px #bbf7d0; }
.mw-activity-icon.is-assessment { background: #e0f2fe; box-shadow: inset 0 0 0 1px #bae6fd; }
.mw-activity-icon.is-learning { background: #ede9fe; box-shadow: inset 0 0 0 1px #ddd6fe; }
.mw-activity-copy { min-width: 0; }
.mw-activity-copy strong, .mw-activity-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mw-activity-copy strong { color: #15204a; font-size: .82rem; }
.mw-activity-copy small { margin-top: .12rem; color: #64748b; font-size: .7rem; }
.mw-activity-value { color: #2787b8; font: 800 .78rem 'Sora', sans-serif; }
.mw-activity-item time { color: #94a3b8; font-size: .68rem; font-weight: 700; }

.mw-course-table-wrap { overflow-x: auto; }
.mw-course-table { width: 100%; min-width: 48rem; border-collapse: collapse; }
.mw-course-table th { padding: .55rem .65rem; color: #64748b; font-size: .66rem; font-weight: 800; text-align: left; text-transform: uppercase; letter-spacing: .08em; border-bottom: 1px solid rgba(28,43,95,.1); }
.mw-course-table td { padding: .75rem .65rem; color: #334155; font-size: .78rem; border-bottom: 1px solid rgba(28,43,95,.065); }
.mw-course-table tbody tr:last-child td { border-bottom: 0; }
.mw-course-table td:first-child a { display: flex; align-items: center; gap: .65rem; color: inherit; text-decoration: none; }
.mw-course-icon { display: grid; width: 2rem; height: 2rem; flex: none; place-items: center; color: #fff; font: 800 .75rem 'Sora', sans-serif; border-radius: .65rem; background: #1c2b5f; }
.mw-course-table td strong, .mw-course-table td small { display: block; }
.mw-course-table td strong { color: #15204a; }
.mw-course-table td small { margin-top: .12rem; color: #94a3b8; font-size: .66rem; }
.mw-course-table td:nth-child(3) { display: flex; align-items: center; gap: .5rem; }
.mw-mini-progress { width: 5rem; height: .4rem; overflow: hidden; border-radius: 999px; background: #e8edf9; }
.mw-mini-progress i { display: block; height: 100%; border-radius: inherit; background: var(--mw-wise-400); }
.mw-course-table td:nth-child(3) b { color: #4b64ac; font-size: .7rem; }
.mw-empty { padding: 1.5rem !important; color: #64748b !important; font-size: .8rem !important; text-align: center !important; }

@media (max-width: 1100px) {
    .mw-command-content { grid-template-columns: 1fr; }
    .mw-command-signals { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .mw-funnel { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
    .mw-funnel-arrow { display: none; }
}
@media (max-width: 640px) {
    .mw-command-content { padding: 1.35rem; }
    .mw-command-copy h2 { font-size: 1.4rem; }
    .mw-command-signals { grid-template-columns: 1fr 1fr; }
    .mw-command-actions { grid-template-columns: 1fr; }
    .mw-command-actions a:last-child { grid-column: auto; }
    .mw-funnel { grid-template-columns: 1fr; }
    .mw-activity-item { grid-template-columns: auto minmax(0,1fr) auto; }
    .mw-activity-value { display: none; }
}

/* ---- Analytics page (Admin > Analytics) ----------------------- */
.mw-an { display: flex; flex-direction: column; gap: 1.25rem; }

.mw-an-filters {
    display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end;
    background: #fff; border: 1px solid #e5e9f4; border-radius: 1rem; padding: 1rem 1.1rem;
}
.mw-an-filter { display: flex; flex-direction: column; gap: 0.3rem; }
.mw-an-filter label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #6b7aa8; }
.mw-an-filter select, .mw-an-filter input {
    min-width: 9.5rem; border: 1px solid #d7ddef; border-radius: 0.65rem; padding: 0.45rem 0.7rem;
    font-size: 0.85rem; color: #15204a; background: #fff;
}
.mw-an-filter select:disabled { opacity: 0.45; }
.mw-an-reset {
    margin-left: auto; align-self: flex-end; font-size: 0.8rem; font-weight: 700; color: #2787b8;
    padding: 0.45rem 0.9rem; border-radius: 0.65rem; border: 1px solid #d7ddef; background: #f6f9fe;
}
.mw-an-reset:hover { background: #e9f4fb; }
.mw-an-note { font-size: 0.8rem; color: #6b7aa8; margin: -0.5rem 0 0 0.25rem; }

.mw-an-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.75rem; }
.mw-an-kpi { background: #fff; border: 1px solid #e5e9f4; border-radius: 1rem; padding: 0.9rem 1rem; }
.mw-an-kpi-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: #6b7aa8; }
.mw-an-kpi-value { font-family: 'Sora', sans-serif; font-size: 1.45rem; font-weight: 800; color: #15204a; margin-top: 0.15rem; }
.mw-an-kpi-hint { font-size: 0.72rem; color: #93a1c6; margin-top: 0.1rem; }

.mw-an-card { background: #fff; border: 1px solid #e5e9f4; border-radius: 1rem; padding: 1.1rem 1.2rem; }
.mw-an-card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.8rem; }
.mw-an-card-head h2 { font-family: 'Sora', sans-serif; font-size: 0.95rem; font-weight: 700; color: #15204a; }
.mw-an-section-head { margin-bottom: -0.4rem; }
.mw-an-section-head p { font-size: 0.78rem; color: #6b7aa8; }
.mw-an-legend { display: flex; gap: 0.9rem; font-size: 0.72rem; color: #6b7aa8; }
.mw-an-legend i { display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 999px; margin-right: 0.3rem; }

.mw-an-trend { width: 100%; height: 11rem; display: block; }
.mw-an-trend-axis { display: flex; justify-content: space-between; font-size: 0.72rem; color: #93a1c6; margin-top: 0.4rem; }

.mw-an-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.mw-an-grid--audience { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.mw-an-bars { display: flex; flex-direction: column; gap: 0.55rem; }
.mw-an-bar-row { display: grid; grid-template-columns: 10rem minmax(0, 1fr) auto; align-items: center; gap: 0.7rem; }
.mw-an-bar-label { font-size: 0.8rem; font-weight: 600; color: #28366a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mw-an-bar-track { position: relative; height: 0.9rem; border-radius: 999px; background: #eef1f9; overflow: hidden; display: block; }
.mw-an-bar-track i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: #58b9e6; min-width: 2px; }
.mw-an-bar-track i.is-navy { background: #1c2b5f; opacity: 0.9; }
.mw-an-bar-track i.is-green { background: #10b981; }
.mw-an-bar-track--stacked { height: 1.05rem; }
.mw-an-bar-track--stacked i { height: 33.4%; }
.mw-an-bar-track--stacked i:nth-child(1) { top: 0; }
.mw-an-bar-track--stacked i:nth-child(2) { top: 33.3%; }
.mw-an-bar-track--stacked i:nth-child(3) { top: 66.6%; }
.mw-an-bar-value { font-size: 0.78rem; font-weight: 700; color: #15204a; white-space: nowrap; }
.mw-an-bar-value em { font-style: normal; font-weight: 500; color: #93a1c6; }
.mw-an-empty { font-size: 0.82rem; color: #93a1c6; }

@media (max-width: 1280px) {
    .mw-an-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .mw-an-grid--audience { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .mw-an-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mw-an-grid, .mw-an-grid--audience { grid-template-columns: 1fr; }
    .mw-an-bar-row { grid-template-columns: 7rem minmax(0, 1fr) auto; }
    .mw-an-reset { margin-left: 0; }
}
