/*
 * Team6th Leaders Portal — shared styling.
 *
 * One cached stylesheet for the whole portal, replacing the per-page <style>
 * blocks. Loaded from AdminPanelProvider (panels::head.end).
 *
 * Look: light, flat and spacious. Navy is the main colour, yellow is only an
 * accent, and each module has one quiet accent colour.
 */

/* ------------------------------------------------------------------ */
/* Tokens                                                              */
/* ------------------------------------------------------------------ */

:root {
    --t6-navy: #003982;
    --t6-navy-700: #002b63;
    --t6-navy-500: #0b4ea2;
    --t6-navy-50: #eef4fb;
    --t6-yellow: #ffe627;
    --t6-white: #ffffff;

    --t6-ink: #0f172a;
    --t6-text: #334155;
    --t6-muted: #64748b;
    --t6-line: #e5e7eb;
    --t6-line-strong: #d1d5db;
    --t6-bg: #f3f5f9;
    --t6-surface: #ffffff;
    --t6-surface-2: #f9fafb;

    --t6-good: #15803d;
    --t6-good-bg: #ecfdf3;
    --t6-warn: #b45309;
    --t6-warn-bg: #fffbeb;
    --t6-danger: #b91c1c;
    --t6-danger-bg: #fef2f2;
    --t6-info: #1d4ed8;
    --t6-info-bg: #eff6ff;

    --t6-finance: #15803d;
    --t6-events: #7413dc;
    --t6-equipment: #0b4ea2;
    --t6-trustees: #b45309;

    --t6-radius: 16px;
    --t6-page-top: 2rem;
    --t6-radius-sm: 10px;
    --t6-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    --t6-shadow-lift: 0 4px 12px rgba(15, 23, 42, 0.08);

    /* Kept for older views that still reference these names. */
    --t6-slate-50: var(--t6-surface-2);
    --t6-slate-100: #f1f5f9;
    --t6-slate-200: var(--t6-line);
    --t6-slate-500: var(--t6-muted);
    --t6-slate-700: var(--t6-text);
    --t6-red: var(--t6-danger);
    --t6-amber: var(--t6-warn);
    --t6-green: var(--t6-good);
    --t6-purple: var(--t6-events);
    --t6-pink: #ffb4e5;
}

.dark {
    --t6-navy-50: rgba(59, 130, 246, 0.14);
    --t6-ink: #f1f5f9;
    --t6-text: #cbd5e1;
    --t6-muted: #94a3b8;
    --t6-line: rgba(255, 255, 255, 0.1);
    --t6-line-strong: rgba(255, 255, 255, 0.18);
    --t6-bg: #0b1120;
    --t6-surface: #111827;
    --t6-surface-2: #0f172a;
    --t6-good-bg: rgba(21, 128, 61, 0.18);
    --t6-warn-bg: rgba(180, 83, 9, 0.18);
    --t6-danger-bg: rgba(185, 28, 28, 0.18);
    --t6-info-bg: rgba(29, 78, 216, 0.18);
    --t6-shadow: none;
    --t6-shadow-lift: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* ------------------------------------------------------------------ */
/* Filament frame: page, top bar, sidebar                              */
/* ------------------------------------------------------------------ */

.fi-body {
    background: var(--t6-bg);
    color: var(--t6-text);
}

.fi-topbar > nav {
    background: var(--t6-surface);
    box-shadow: none;
    border-bottom: 1px solid var(--t6-line);
}

.fi-sidebar,
.fi-main-sidebar,
.dark .fi-main-sidebar,
aside.fi-sidebar.fi-main-sidebar,
.dark aside.fi-sidebar.fi-main-sidebar {
    background: var(--t6-navy) !important;
}

.fi-sidebar {
    border-inline-end: 0;
}

.fi-sidebar-header {
    background: var(--t6-navy) !important;
    box-shadow: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    --tw-ring-color: transparent !important;
}

.fi-sidebar-header a,
.fi-sidebar-header .fi-logo,
.fi-sidebar-header button {
    color: var(--t6-white) !important;
}

.fi-sidebar-nav {
    padding-top: 1.1rem;
}

.fi-sidebar-item-button {
    border-radius: var(--t6-radius-sm);
}

.fi-sidebar-item-label,
.fi-sidebar-item-icon {
    color: rgba(255, 255, 255, 0.78) !important;
}

.fi-sidebar-item-button:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}

.fi-sidebar-item-button:hover .fi-sidebar-item-label,
.fi-sidebar-item-button:hover .fi-sidebar-item-icon {
    color: var(--t6-white) !important;
}

.fi-sidebar-item-active .fi-sidebar-item-button {
    background: rgba(255, 255, 255, 0.14) !important;
    box-shadow: inset 3px 0 0 var(--t6-yellow);
}

.fi-sidebar-item-active .fi-sidebar-item-label,
.fi-sidebar-item-active .fi-sidebar-item-icon {
    color: var(--t6-white) !important;
    font-weight: 600;
}

.fi-sidebar-group-label,
.fi-sidebar-group-collapse-button,
.fi-sidebar-group-button .fi-icon-btn {
    color: rgba(255, 255, 255, 0.55) !important;
}

.fi-sidebar-group-label {
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Signed-in user and sign-out button at the foot of the sidebar. */
/* Pin the sidebar to the viewport on desktop. The mobile-navigation fix sets
   overflow-x: hidden on .fi-layout, which stops Filament's sticky sidebar from
   following the page, so the signed-in block drifted off screen. The menu
   scrolls on its own and the signed-in block stays at the bottom. */
@media (min-width: 1024px) {
    .fi-main-sidebar {
        position: fixed !important;
        top: 0;
        bottom: 0;
        inset-inline-start: 0;
        height: 100vh;
        height: 100dvh;
    }

    .fi-main-ctn {
        margin-inline-start: var(--sidebar-width);
    }

    /* The mobile-navigation fix pins the top bar across the full width, which
       covered the sidebar's "Team6th Leaders Portal" header. Start it after
       the sidebar instead. */
    .fi-topbar {
        inset-inline-start: var(--sidebar-width) !important;
    }
}

.fi-sidebar-nav {
    min-height: 0;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.t6-sidebar-user {
    flex-shrink: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.9rem 1rem;
    font-size: 0.875rem;
}

.t6-sidebar-user__row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.t6-sidebar-user__avatar {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 999px;
    background: var(--t6-yellow);
    color: var(--t6-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.t6-sidebar-user__name {
    font-weight: 600;
    color: var(--t6-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.t6-sidebar-user__email {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.t6-sidebar-user__signout {
    margin-top: 0.7rem;
    width: 100%;
    border-radius: var(--t6-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: transparent;
    color: var(--t6-white);
    padding: 0.45rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
}

.t6-sidebar-user__signout:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.45);
}

/* ------------------------------------------------------------------ */
/* Filament content: sections, tables, tabs, forms                     */
/* ------------------------------------------------------------------ */

.fi-section,
.fi-ta-ctn,
.fi-wi-stats-overview-stat,
.fi-fo-tabs {
    border-radius: var(--t6-radius) !important;
    box-shadow: var(--t6-shadow) !important;
    --tw-ring-color: var(--t6-line) !important;
}

.fi-section-header-heading {
    font-weight: 600;
    color: var(--t6-ink);
}

.fi-ta-header-cell {
    background: var(--t6-surface-2);
}

.fi-ta-header-cell-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--t6-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.fi-ta-row:hover {
    background: var(--t6-surface-2);
}

.fi-ta-text-item-label {
    color: var(--t6-text);
}

.fi-tabs {
    box-shadow: var(--t6-shadow) !important;
    --tw-ring-color: var(--t6-line) !important;
}

.fi-input-wrp {
    border-radius: var(--t6-radius-sm) !important;
}

.fi-header-heading {
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--t6-ink);
}

/* Login and other simple pages. */
.fi-simple-layout {
    background: var(--t6-bg);
}

.fi-simple-main {
    border-radius: var(--t6-radius) !important;
    box-shadow: var(--t6-shadow-lift) !important;
    --tw-ring-color: var(--t6-line) !important;
}

/* ------------------------------------------------------------------ */
/* Module header and tab strip                                         */
/* ------------------------------------------------------------------ */

.t6-module-shell {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.t6-module-shell--page-context {
    margin-bottom: 0;
}

.fi-page > .t6-module-shell--page-context + section {
    padding-top: 1rem;
    padding-bottom: 1rem;
    row-gap: 1rem;
}

/* One consistent gap between the top bar and the page title on every page.
   Pages either inject their header before Filament's section (page context),
   render it inside the section, or skip Filament pages altogether (catalogue). */
.fi-page > .t6-module-shell--page-context,
.t6-module-shell.t6-catalogue-surface {
    padding-top: var(--t6-page-top);
}

.fi-page:has(.t6-module-shell) > section:first-child {
    padding-top: var(--t6-page-top) !important;
    row-gap: 1rem;
}

/* Filament's own heading is hidden on these pages; drop the empty header so
   its grid gap doesn't add extra space above the module header. */
.fi-page:has(.t6-module-shell) > section > header.fi-header:not(:has(.fi-ac)) {
    display: none !important;
}

.t6-module-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.1rem 0.15rem 0;
    color: var(--t6-ink);
}

.t6-module-header__main {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    min-width: 0;
}

.t6-module-header__logo {
    width: 36px;
    height: 36px;
    border-radius: var(--t6-radius-sm);
    overflow: hidden;
    flex: 0 0 auto;
}

.t6-module-header__logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.t6-module-header__eyebrow {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--t6-muted);
}

.t6-module-header__title {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--t6-ink);
}

.t6-module-header__description {
    margin: 0.15rem 0 0;
    max-width: 58rem;
    font-size: 0.875rem;
    color: var(--t6-muted);
}

.t6-module-header__actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* Underlined tabs rather than pills: lighter, and the current page is obvious. */
.t6-module-nav {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    border-bottom: 1px solid var(--t6-line);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
}

.t6-module-nav::-webkit-scrollbar {
    display: none;
}

.t6-module-nav__inner {
    display: flex;
    align-items: flex-end;
    gap: 0.25rem;
    width: max-content;
    min-width: 100%;
}

.t6-module-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.7rem;
    margin-bottom: -1px;
    border-bottom: 2px solid transparent;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--t6-muted);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.12s ease, border-color 0.12s ease;
}

.t6-module-nav__link:hover {
    color: var(--t6-ink);
    border-bottom-color: var(--t6-line-strong);
}

.t6-module-nav__link--active,
.t6-module-nav__link[aria-current="page"],
.t6-module-nav__link[aria-current="page"]:hover {
    color: var(--t6-navy);
    font-weight: 600;
    border-bottom-color: var(--t6-navy);
}

.dark .t6-module-nav__link--active,
.dark .t6-module-nav__link[aria-current="page"] {
    color: #93c5fd;
    border-bottom-color: #93c5fd;
}

/* Second row for a grouped tab (Finance > Setup). Small pills, swipeable on phones. */
.t6-module-subnav {
    display: flex;
    gap: 0.4rem;
    padding: 0.6rem 0 0.1rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.t6-module-subnav::-webkit-scrollbar {
    display: none;
}

.t6-module-subnav__link {
    padding: 0.3rem 0.75rem;
    border: 1px solid var(--t6-line);
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--t6-muted);
    text-decoration: none;
    white-space: nowrap;
}

.t6-module-subnav__link:hover {
    color: var(--t6-ink);
    border-color: var(--t6-line-strong);
}

.t6-module-subnav__link--active,
.t6-module-subnav__link--active:hover {
    background: var(--t6-navy);
    border-color: var(--t6-navy);
    color: #fff;
    font-weight: 600;
}

/* On wider screens let long tab sets (Finance) wrap onto a second line. */
@media (min-width: 768px) and (max-width: 1279px) {
    .t6-module-nav__inner {
        width: auto;
        min-width: 0;
        flex-wrap: wrap;
    }
}

/* On phones keep the tabs to one swipeable row. */
@media (max-width: 767px) {
    :root {
        --t6-page-top: 1rem;
    }

    .t6-module-nav__inner {
        flex-wrap: nowrap;
    }

    .t6-module-header__description {
        display: none;
    }

    .fi-page > .t6-module-shell--page-context + section {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
        row-gap: 0.75rem;
    }

    .t6-module-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .t6-module-header__actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Hide Filament's own title on pages that show a Team6th module header, but
   keep its action buttons (for example "New Finance Request"). */
.fi-page:has(.t6-module-shell) > section > header.fi-header > div:first-child,
.fi-page:has(.t6-module-header) > section > header.fi-header > div:first-child,
.fi-page:has(.t6-hero) > section > header.fi-header > div:first-child {
    display: none !important;
}

.fi-page:has(.t6-module-shell) > section > header.fi-header > div:last-child,
.fi-page:has(.t6-module-header) > section > header.fi-header > div:last-child,
.fi-page:has(.t6-hero) > section > header.fi-header > div:last-child {
    margin-inline-start: auto;
}

/* ------------------------------------------------------------------ */
/* Building blocks used by Team6th pages                               */
/* ------------------------------------------------------------------ */

.t6-panel {
    background: var(--t6-surface);
    border: 1px solid var(--t6-line);
    border-radius: var(--t6-radius);
    box-shadow: var(--t6-shadow);
    padding: 1.1rem;
}

.t6-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 0.9rem;
}

.t6-panel__title,
.t6-panel-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--t6-ink);
}

.t6-panel__description,
.t6-muted {
    margin: 0.2rem 0 0;
    color: var(--t6-muted);
    font-size: 0.875rem;
}

.t6-eyebrow {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--t6-muted);
}

.t6-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.t6-stat-card,
.t6-kpi-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 96px;
    padding: 1rem;
    background: var(--t6-surface);
    border: 1px solid var(--t6-line);
    border-radius: var(--t6-radius);
    box-shadow: var(--t6-shadow);
    color: inherit;
    text-decoration: none;
}

a.t6-stat-card:hover,
a.t6-kpi-card:hover {
    border-color: var(--t6-line-strong);
    box-shadow: var(--t6-shadow-lift);
}

.t6-stat-card__label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--t6-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.t6-stat-card__value {
    margin-top: 0.4rem;
    font-size: 1.6rem;
    line-height: 1.1;
    font-weight: 700;
    color: var(--t6-ink);
}

.t6-stat-card__hint {
    margin-top: 0.3rem;
    font-size: 0.82rem;
    color: var(--t6-muted);
}

.t6-empty-state {
    border: 1px dashed var(--t6-line-strong);
    border-radius: var(--t6-radius);
    background: var(--t6-surface-2);
    text-align: center;
    padding: 1.25rem;
    color: var(--t6-muted);
}

.t6-empty-state__title {
    margin: 0;
    font-weight: 600;
    color: var(--t6-ink);
}

.t6-empty-state__text {
    margin: 0.35rem 0 0;
    font-size: 0.875rem;
}

.t6-badge,
.t6-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--t6-surface-2);
    color: var(--t6-text);
    border: 1px solid var(--t6-line);
}

.t6-badge--good { background: var(--t6-good-bg); color: var(--t6-good); border-color: transparent; }
.t6-badge--warn { background: var(--t6-warn-bg); color: var(--t6-warn); border-color: transparent; }
.t6-badge--danger { background: var(--t6-danger-bg); color: var(--t6-danger); border-color: transparent; }
.t6-badge--info { background: var(--t6-info-bg); color: var(--t6-info); border-color: transparent; }

/* Buttons used across Team6th pages. */
.t6-action-button,
.t6-btn,
.t6-button,
.t6-module-shell a.t6-action-button,
.t6-module-shell button.t6-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 2.25rem;
    padding: 0.45rem 0.9rem;
    border-radius: var(--t6-radius-sm);
    border: 1px solid var(--t6-navy);
    background: var(--t6-navy);
    color: var(--t6-white) !important;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease;
}

.t6-action-button:hover,
.t6-btn:hover,
.t6-button:hover {
    background: var(--t6-navy-700);
    border-color: var(--t6-navy-700);
}

.t6-action-button--secondary,
.t6-module-shell a.t6-action-button--secondary,
.t6-module-shell button.t6-action-button--secondary {
    background: var(--t6-surface);
    color: var(--t6-text) !important;
    border-color: var(--t6-line-strong);
}

.t6-action-button--secondary:hover {
    background: var(--t6-surface-2);
    border-color: var(--t6-navy);
    color: var(--t6-navy) !important;
}

.t6-action-button--warning,
.t6-module-shell a.t6-action-button--warning,
.t6-module-shell button.t6-action-button--warning {
    background: var(--t6-yellow);
    color: #111827 !important;
    border-color: var(--t6-yellow);
}

.t6-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.t6-module-header__actions .t6-module-nav__link,
.t6-module-header__actions .t6-action-button {
    border-bottom-width: 1px !important;
}

.t6-module-shell a:not(.fi-btn):not(.fi-link):not(.t6-module-nav__link):not(.t6-module-subnav__link):not(.t6-stat-card):not(.t6-kpi-card):not(.t6-badge):not(.t6-action-button):not(.t6-btn):not(.t6-button) {
    color: var(--t6-navy);
    font-weight: 600;
    text-decoration: none;
}

.t6-module-shell a:not(.fi-btn):not(.fi-link):not(.t6-module-nav__link):not(.t6-module-subnav__link):not(.t6-stat-card):not(.t6-kpi-card):not(.t6-badge):not(.t6-action-button):not(.t6-btn):not(.t6-button):hover {
    text-decoration: underline;
}

.t6-table-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
    color: var(--t6-navy) !important;
    text-decoration: none !important;
}

.t6-table-link:hover {
    text-decoration: underline !important;
}

.t6-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--t6-line);
    border-radius: var(--t6-radius);
    background: var(--t6-surface);
}

.t6-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.t6-table th {
    background: var(--t6-surface-2);
    color: var(--t6-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: left;
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid var(--t6-line);
}

.t6-table td {
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid var(--t6-line);
    color: var(--t6-text);
}

.t6-table tr:last-child td {
    border-bottom: 0;
}

/* ------------------------------------------------------------------ */
/* Dashboard                                                           */
/* ------------------------------------------------------------------ */

.fi-dashboard-page .fi-header-heading {
    display: none !important;
}

.fi-dashboard-page > section {
    padding-top: var(--t6-page-top) !important;
}

.t6-dash {
    display: grid;
    gap: 1.25rem;
}

.t6-dash__greeting {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 0.25rem;
}

.t6-dash__hello {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--t6-ink);
}

.t6-dash__date {
    margin: 0.15rem 0 0;
    font-size: 0.9rem;
    color: var(--t6-muted);
}

.t6-dash__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.t6-dash__card {
    background: var(--t6-surface);
    border: 1px solid var(--t6-line);
    border-radius: var(--t6-radius);
    box-shadow: var(--t6-shadow);
    overflow: hidden;
}

.t6-dash__card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid var(--t6-line);
}

.t6-dash__card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--t6-ink);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.t6-dash__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4rem;
    height: 1.4rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: var(--t6-navy);
    color: var(--t6-white);
    font-size: 0.72rem;
    font-weight: 700;
}

.t6-dash__link-button {
    appearance: none;
    border: 0;
    background: none;
    padding: 0;
    color: var(--t6-navy);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}

.t6-dash__link-button:hover {
    text-decoration: underline;
}

.t6-dash__empty {
    padding: 1.25rem 1.1rem;
    color: var(--t6-good);
    font-weight: 500;
}

/* Needs-attention list: one row per item, a coloured edge for the module. */
.t6-todo {
    list-style: none;
    margin: 0;
    padding: 0;
}

.t6-todo__item {
    --t6-accent: var(--t6-navy);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.1rem;
    border-bottom: 1px solid var(--t6-line);
    box-shadow: inset 3px 0 0 var(--t6-accent);
}

.t6-todo__item:last-child {
    border-bottom: 0;
}

.t6-todo__item:hover {
    background: var(--t6-surface-2);
}

.t6-todo__item[data-module="Finance"] { --t6-accent: var(--t6-finance); }
.t6-todo__item[data-module="Events"] { --t6-accent: var(--t6-events); }
.t6-todo__item[data-module="Equipment"] { --t6-accent: var(--t6-equipment); }
.t6-todo__item[data-module="Trustees"] { --t6-accent: var(--t6-trustees); }

.t6-todo__main {
    flex: 1 1 auto;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.t6-todo__module {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--t6-accent);
}

.t6-todo__title {
    font-weight: 600;
    color: var(--t6-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.t6-todo__desc {
    font-size: 0.85rem;
    color: var(--t6-muted);
}

.t6-todo__cta {
    flex: 0 0 auto;
    border-radius: var(--t6-radius-sm);
    border: 1px solid var(--t6-line-strong);
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--t6-text);
    background: var(--t6-surface);
    text-decoration: none;
    white-space: nowrap;
}

.t6-todo__item[data-tone="danger"] .t6-todo__cta,
.t6-todo__item[data-tone="warning"] .t6-todo__cta {
    background: var(--t6-navy);
    border-color: var(--t6-navy);
    color: var(--t6-white);
}

.t6-todo__snooze-form {
    margin: 0;
    flex: 0 0 auto;
}

.t6-todo__snooze {
    appearance: none;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--t6-radius-sm);
    border: 1px solid transparent;
    background: transparent;
    color: var(--t6-muted);
    cursor: pointer;
}

.t6-todo__snooze:hover {
    border-color: var(--t6-line-strong);
    color: var(--t6-ink);
}

.t6-todo__snooze svg {
    width: 1rem;
    height: 1rem;
}

.t6-todo:not(.is-expanded) > .t6-todo__item:nth-child(n+7) {
    display: none;
}

.t6-dash__more {
    display: flex;
    justify-content: center;
    padding: 0.6rem;
    border-top: 1px solid var(--t6-line);
}

/* At-a-glance tiles: solid colour, big number, one per module. */
.t6-glance {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

/* On wide screens keep every tile on one row, however many the leader sees. */
@media (min-width: 1100px) {
    .t6-glance {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: minmax(0, 1fr);
    }
}

@media (max-width: 480px) {
    .t6-glance {
        grid-template-columns: minmax(0, 1fr);
    }
}

.t6-glance__card {
    --t6-tile: var(--t6-navy);
    --t6-tile-text: var(--t6-white);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-height: 118px;
    padding: 1rem 1.15rem;
    background: var(--t6-tile);
    color: var(--t6-tile-text);
    border-radius: var(--t6-radius);
    box-shadow: 0 6px 16px rgba(0, 57, 130, 0.14);
    text-decoration: none;
    overflow: hidden;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.t6-glance__card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(0, 57, 130, 0.2);
}

.t6-glance__card::after {
    content: '';
    position: absolute;
    right: -28px;
    bottom: -28px;
    width: 110px;
    height: 110px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.08;
}

.t6-glance__card[data-module="Finance"] { --t6-tile: var(--t6-navy); }
.t6-glance__card[data-module="Events"] { --t6-tile: var(--t6-yellow); --t6-tile-text: var(--t6-navy); }
.t6-glance__card[data-module="Equipment"] { --t6-tile: #0b7a5a; }
.t6-glance__card[data-module="Trustees"] { --t6-tile: var(--t6-events); }

.t6-glance__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.t6-glance__module {
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0.9;
}

.t6-glance__icon {
    width: 2rem;
    height: 2rem;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
    font-size: 1rem;
}

.t6-glance__card[data-module="Events"] .t6-glance__icon {
    background: rgba(0, 57, 130, 0.1);
}

.t6-glance__value {
    margin-top: auto;
    font-size: 2rem;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.t6-glance__hint {
    font-size: 0.82rem;
    opacity: 0.85;
}

@media (max-width: 640px) {
    .t6-dash__hello {
        font-size: 1.25rem;
    }

    .t6-dash__actions {
        width: 100%;
    }

    .t6-dash__actions .t6-action-button {
        flex: 1 1 auto;
    }

    .t6-todo__item {
        padding: 0.7rem 0.85rem;
    }

    .t6-todo__title {
        white-space: normal;
    }
}

.t6-dash__shortcuts {
    padding: 0.9rem 1.1rem;
}

/* ---------- Finance overview (treasurer desk) ---------- */
.t6-fo-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}
.t6-fo-col { display: grid; gap: 1rem; min-width: 0; }
@media (max-width: 1100px) { .t6-fo-grid { grid-template-columns: minmax(0, 1fr); } }

.t6-fo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.t6-fo-meta { display: flex; flex-wrap: wrap; gap: 0.15rem 0.9rem; color: var(--t6-muted); font-size: 0.82rem; margin-top: 0.15rem; }
.t6-fo-muted { color: var(--t6-muted); font-size: 0.875rem; }
.t6-fo-more { margin: 0.8rem 0 0; font-size: 0.875rem; font-weight: 600; }
.t6-fo-more a { color: var(--t6-navy-500); }
.dark .t6-fo-more a { color: #93c5fd; }

.t6-fo-pay {
    border: 1px solid var(--t6-line);
    border-radius: var(--t6-radius-sm);
    background: var(--t6-surface);
    overflow: hidden;
}
.t6-fo-pay--open { border-color: var(--t6-navy); box-shadow: var(--t6-shadow-lift); }
.t6-fo-pay__row { display: flex; align-items: center; gap: 1rem; padding: 0.8rem 0.9rem; }
.t6-fo-pay__amount { min-width: 6.5rem; font-size: 1.2rem; font-weight: 800; color: var(--t6-ink); font-variant-numeric: tabular-nums; }
.t6-fo-pay__main { flex: 1; min-width: 0; }
.t6-fo-pay__title { font-weight: 700; color: var(--t6-ink); overflow-wrap: anywhere; }
.t6-fo-pay__actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
@media (max-width: 640px) {
    .t6-fo-pay__row { flex-wrap: wrap; gap: 0.4rem 0.8rem; }
    .t6-fo-pay__amount { min-width: 0; }
    .t6-fo-pay__main { flex-basis: 100%; order: 3; }
    .t6-fo-pay__actions { margin-left: auto; }
}

.t6-fo-paypanel { border-top: 1px solid var(--t6-line); background: var(--t6-surface-2); padding: 0.9rem; display: grid; gap: 0.9rem; }
.t6-fo-paypanel__sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.9rem 1.2rem; }
.t6-fo-paypanel__heading { margin: 0 0 0.35rem; color: var(--t6-navy); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.dark .t6-fo-paypanel__heading { color: #93c5fd; }
.t6-fo-paypanel__footer { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.t6-module-shell .t6-fo-paypanel__footer button.t6-fo-paid-button { margin-left: auto; background: var(--t6-good); border-color: var(--t6-good); }
.t6-module-shell .t6-fo-paypanel__footer button.t6-fo-paid-button:hover { background: #166534; border-color: #166534; }
@media (max-width: 640px) { .t6-fo-paypanel__footer > * { width: 100%; } .t6-module-shell .t6-fo-paypanel__footer button.t6-fo-paid-button { margin-left: 0; } }

.t6-fo-dl { margin: 0; display: grid; gap: 0; }
.t6-fo-dl > div { display: grid; grid-template-columns: minmax(7rem, 38%) 1fr; gap: 0.6rem; padding: 0.4rem 0; border-bottom: 1px solid var(--t6-line); }
.t6-fo-dl > div:last-child { border-bottom: 0; }
.t6-fo-dl dt { color: var(--t6-muted); font-size: 0.82rem; font-weight: 600; }
.t6-fo-dl dd { margin: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; color: var(--t6-ink); font-size: 0.9rem; overflow-wrap: anywhere; white-space: pre-line; }
.t6-fo-copy {
    flex-shrink: 0; padding: 0.1rem 0.55rem; border: 1px solid var(--t6-line-strong); border-radius: 7px;
    background: var(--t6-surface); color: var(--t6-navy); font-size: 0.75rem; font-weight: 700; cursor: pointer;
}
.dark .t6-fo-copy { color: #93c5fd; }
.t6-fo-copy--done { background: var(--t6-good-bg); color: var(--t6-good); border-color: transparent; }

.t6-fo-notice { padding: 0.65rem 0.8rem; border-radius: var(--t6-radius-sm); font-size: 0.875rem; font-weight: 600; }
.t6-fo-notice--warn { background: var(--t6-warn-bg); color: var(--t6-warn); }

.t6-fo-item { display: flex; align-items: center; gap: 0.8rem; padding: 0.6rem 0; border-bottom: 1px solid var(--t6-line); }
.t6-fo-list > .t6-fo-item:last-child { border-bottom: 0; }
.t6-fo-list:has(> .t6-fo-item) { gap: 0; }
.t6-fo-item__main { flex: 1; min-width: 0; }
.t6-fo-item__title { font-weight: 650; color: var(--t6-ink); text-decoration: none; overflow-wrap: anywhere; }
.t6-fo-item__title:hover { color: var(--t6-navy-500); text-decoration: underline; }
.t6-fo-item__amount { font-weight: 750; color: var(--t6-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }

.t6-fo-budget { display: grid; gap: 0.3rem; }
.t6-fo-budget__top { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.t6-fo-budget__name { font-weight: 700; color: var(--t6-ink); }
.t6-fo-bar { height: 8px; border-radius: 999px; background: var(--t6-line); overflow: hidden; }
.t6-fo-bar__fill { display: block; height: 100%; border-radius: 999px; background: var(--t6-muted); }
.t6-fo-bar__fill--good { background: var(--t6-good); }
.t6-fo-bar__fill--warn { background: var(--t6-warn); }
.t6-fo-bar__fill--danger { background: var(--t6-danger); }

/* ---------- Finance budgets page ---------- */
.t6-fb-period select {
    min-height: 2.25rem; padding: 0.35rem 2rem 0.35rem 0.7rem; border: 1px solid var(--t6-line-strong);
    border-radius: var(--t6-radius-sm); background-color: var(--t6-surface); color: var(--t6-ink); font-size: 0.875rem; font-weight: 600;
}
.t6-fb-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.9rem; }
.t6-fb-card { background: var(--t6-surface); border: 1px solid var(--t6-line); border-radius: var(--t6-radius); box-shadow: var(--t6-shadow); }
.t6-fb-card--open { border-color: var(--t6-navy); box-shadow: var(--t6-shadow-lift); }
.t6-fb-card__summary { all: unset; box-sizing: border-box; display: grid; gap: 0.45rem; width: 100%; padding: 1rem; cursor: pointer; border-radius: var(--t6-radius); }
.t6-fb-card__summary:focus-visible { outline: 2px solid var(--t6-navy-500); outline-offset: 2px; }
.t6-fb-card__top { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.t6-fb-card__name { font-size: 1.05rem; font-weight: 800; color: var(--t6-ink); }
.t6-fb-card__left { font-size: 1.35rem; font-weight: 800; color: var(--t6-ink); font-variant-numeric: tabular-nums; }
.t6-fb-card__left--danger { color: var(--t6-danger); }
.t6-fb-card__more { font-size: 0.8rem; font-weight: 700; color: var(--t6-navy-500); }
.dark .t6-fb-card__more { color: #93c5fd; }
.t6-fb-detail { grid-column: 1 / -1; background: var(--t6-surface); border: 1px solid var(--t6-navy); border-radius: var(--t6-radius); padding: 1.1rem; }
.t6-fb-detail__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.4rem; }
.t6-fb-gap { margin-top: 1.1rem !important; }
.t6-fb-input {
    width: 100%; min-height: 2.25rem; padding: 0.4rem 0.6rem; border: 1px solid var(--t6-line-strong); border-radius: var(--t6-radius-sm);
    background: var(--t6-surface); color: var(--t6-ink); font-size: 0.9rem;
}
select.t6-fb-input { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 20 20%27 fill=%27%2364748b%27%3E%3Cpath d=%27M5.3 7.3a1 1 0 0 1 1.4 0L10 10.6l3.3-3.3a1 1 0 1 1 1.4 1.4l-4 4a1 1 0 0 1-1.4 0l-4-4a1 1 0 0 1 0-1.4z%27/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.5rem center; background-size: 1rem; padding-right: 2rem; }
.t6-fb-input:focus { outline: 2px solid var(--t6-navy-500); outline-offset: 0; border-color: transparent; }
.t6-fb-error { display: block; margin-top: 0.2rem; color: var(--t6-danger); font-size: 0.78rem; font-weight: 600; }
.t6-fb-adjust { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--t6-line); display: grid; gap: 0.6rem; justify-items: start; }
.t6-fb-adjust__fields { display: grid; grid-template-columns: 9rem 8rem 1fr; gap: 0.6rem; width: 100%; }
.t6-fb-adjust__fields label > span:first-child { display: block; margin-bottom: 0.2rem; color: var(--t6-muted); font-size: 0.78rem; font-weight: 700; }
@media (max-width: 640px) { .t6-fb-adjust__fields { grid-template-columns: 1fr 1fr; } .t6-fb-adjust__reason { grid-column: 1 / -1; } }

.t6-fb-edit { display: grid; }
.t6-fb-edit__head, .t6-fb-edit__row { display: grid; grid-template-columns: 1.1fr 0.8fr 0.8fr 1.6fr; gap: 0.7rem; align-items: start; }
.t6-fb-edit__head { padding: 0 0 0.5rem; color: var(--t6-muted); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid var(--t6-line); }
.t6-fb-edit__row { padding: 0.6rem 0; border-bottom: 1px solid var(--t6-line); }
.t6-fb-edit__name { font-weight: 700; color: var(--t6-ink); padding-top: 0.45rem; }
.t6-fb-edit__mobile-label { display: none; }
.t6-fb-edit__footer { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 1rem; }
@media (max-width: 760px) {
    .t6-fb-edit__head { display: none; }
    .t6-fb-edit__row { grid-template-columns: 1fr 1fr; }
    .t6-fb-edit__name, .t6-fb-edit__row > label:last-child { grid-column: 1 / -1; }
    .t6-fb-edit__mobile-label { display: block; margin-bottom: 0.2rem; color: var(--t6-muted); font-size: 0.78rem; font-weight: 700; }
}

/* ---------- Finance reports ---------- */
.t6-fr-switch { justify-self: start; width: max-content; display: inline-flex; gap: 0.25rem; padding: 0.25rem; border: 1px solid var(--t6-line); border-radius: 999px; background: var(--t6-surface); }
.t6-fr-switch__btn { padding: 0.4rem 1.1rem; border: 0; border-radius: 999px; background: transparent; color: var(--t6-text); font-size: 0.875rem; font-weight: 700; cursor: pointer; }
.t6-fr-switch__btn--on { background: var(--t6-navy); color: var(--t6-white); }
.t6-fr-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0.7rem; }
.t6-fr-filters--narrow { grid-template-columns: repeat(auto-fit, minmax(220px, 320px)); }
.t6-fr-filters label > span { display: block; margin-bottom: 0.2rem; color: var(--t6-muted); font-size: 0.78rem; font-weight: 700; }
.t6-fr-filters select.t6-fb-input { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2364748b'%3E%3Cpath d='M5.3 7.3a1 1 0 0 1 1.4 0L10 10.6l3.3-3.3a1 1 0 1 1 1.4 1.4l-4 4a1 1 0 0 1-1.4 0l-4-4a1 1 0 0 1 0-1.4z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.5rem center; background-size: 1rem; padding-right: 2rem; }
.t6-fr-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; margin-top: 0.9rem; }
.t6-fr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 1000px) { .t6-fr-grid { grid-template-columns: minmax(0, 1fr); } }
.t6-table .t6-fr-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.t6-table tfoot td { border-top: 2px solid var(--t6-line-strong); border-bottom: 0; background: var(--t6-surface-2); }

/* ---------- Finance year end ---------- */
.t6-fy { display: grid; gap: 1rem; }
.t6-fy__step { display: flex; gap: 0.8rem; align-items: flex-start; margin-bottom: 0.9rem; }
.t6-fy__num { flex-shrink: 0; display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 999px; background: var(--t6-navy); color: var(--t6-white); font-weight: 800; font-size: 0.9rem; }
.t6-fy__choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.6rem; margin-bottom: 0.9rem; }
.t6-fy__choice { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.75rem 0.85rem; border: 1px solid var(--t6-line-strong); border-radius: var(--t6-radius-sm); cursor: pointer; color: var(--t6-ink); }
.t6-fy__choice--on { border-color: var(--t6-navy); background: var(--t6-navy-50); }
.t6-fy__checks { display: grid; gap: 0.55rem; color: var(--t6-ink); }
.t6-fy__checks label { display: flex; gap: 0.6rem; align-items: center; }
.t6-module-shell button.t6-fy__close { background: var(--t6-danger); border-color: var(--t6-danger); }
.t6-module-shell button.t6-fy__close:hover { background: #991b1b; border-color: #991b1b; }
