/* ==========================================================================
   Liquid Glass — frosted-glass visual effect
   Used by the Landing Page, Login, and Register views.
   Technique: backdrop-filter blur + semi-transparent gradients + subtle
   border highlights. Text stays high-contrast; a solid fallback is provided
   for browsers without backdrop-filter support and for users who prefer
   reduced transparency.
   ========================================================================== */

:root {
    --lg-blur: 18px;
    --lg-panel-bg: rgba(11, 58, 32, 0.55);      /* pine-dark, semi-transparent */
    --lg-panel-bg-2: rgba(12, 83, 48, 0.35);     /* pine-deep highlight stop    */
    --lg-hairline: rgba(255, 255, 255, 0.35);    /* top border highlight        */
    --lg-border: rgba(255, 255, 255, 0.16);      /* outer border                */
    --lg-shadow: 0 24px 60px -20px rgba(3, 24, 14, 0.65);
    --lg-accent: #8FE3B4;                         /* light green for links/labels on dark */

    /* Deep emerald ramp, shared by the app sidebar and the landing page's
       dark bands so both read as the same material. */
    --nm-deep-ramp: linear-gradient(180deg,
        rgba(17, 74, 43, 0.96) 0%,
        rgba(11, 52, 31, 0.965) 34%,
        rgba(7, 34, 20, 0.97) 68%,
        rgba(4, 20, 12, 0.975) 100%);
}

/* A full-bleed deep emerald band for the landing page's dark sections. */
.surface-deep {
    background:
        radial-gradient(140% 70% at 4% -10%, rgba(167, 243, 208, 0.10) 0%, rgba(167, 243, 208, 0.03) 38%, transparent 68%),
        var(--nm-deep-ramp);
}

/* Hero scrim over the campus photo (landing page). Defined here rather than
   as Tailwind arbitrary values because the CDN's JIT does not reliably
   compile `from-[#hex]/opacity` combinations - it silently emits no
   background-image, which leaves the headline sitting on a bare photo.
   Kept dark enough in the middle band for the body copy to clear 4.5:1. */
.hero-scrim {
    background: linear-gradient(180deg,
        rgba(8, 23, 14, 0.90) 0%,
        rgba(9, 38, 21, 0.80) 45%,
        rgba(6, 17, 9, 0.94) 100%);
}

/* --- Dark frosted panel (cards over the campus photo background) --------- */
.lg-glass {
    position: relative;
    isolation: isolate;
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0.02) 40%, rgba(255, 255, 255, 0) 100%),
        linear-gradient(180deg, var(--lg-panel-bg) 0%, var(--lg-panel-bg-2) 100%);
    backdrop-filter: blur(var(--lg-blur)) saturate(150%);
    -webkit-backdrop-filter: blur(var(--lg-blur)) saturate(150%);
    border: 1px solid var(--lg-border);
    box-shadow: var(--lg-shadow);
    /* Ensure light text over the frosted panel keeps AA contrast */
    color: #ffffff;
}

/* Subtle inner top highlight to sell the "liquid" edge. */
.lg-glass::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(180deg, var(--lg-hairline) 0%, rgba(255, 255, 255, 0) 30%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 1;
}

/* --- Light frosted panel (sticky header, accent chips on light bg) -------
   Carries the same soft dual shadow as the cards so the header reads as a
   raised bar rather than a flat white strip. */
.lg-glass-light {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.93) 0%, rgba(245, 247, 244, 0.84) 100%);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow:
        0 12px 32px -16px rgba(11, 58, 32, 0.30),
        0 1px 0 rgba(21, 37, 27, 0.04);
}

/* --- Frosted inputs (dark panel) ----------------------------------------- */
.lg-input {
    background: rgba(255, 255, 255, 0.10) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    color: #ffffff !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.lg-input::placeholder { color: rgba(255, 255, 255, 0.55); }
.lg-input:hover { border-color: rgba(255, 255, 255, 0.40) !important; }
.lg-input:focus {
    outline: none;
    border-color: var(--lg-accent) !important;
    background: rgba(255, 255, 255, 0.16) !important;
    box-shadow: 0 0 0 3px rgba(143, 227, 180, 0.30);
}
/* Keep dropdown option text legible (options render on native white lists). */
.lg-input option { color: #15251B; background: #ffffff; }

/* --- Frosted application sidebar (templates/base.html) -------------------
   Dark emerald liquid glass. The body carries faint pine glows so the
   frosted panel has real color to blur behind it; nav rows become layered
   glass pills. Scoped to `.lg-sidebar` and `body.app-canvas` so nothing
   leaks into the rest of the app. */
body.app-canvas {
    background-color: #e3f4ea;
    background-image:
        radial-gradient(880px 520px at 8% 12%, rgba(16, 185, 129, 0.28), transparent 62%),
        radial-gradient(780px 540px at 94% 16%, rgba(5, 150, 105, 0.22), transparent 60%),
        radial-gradient(920px 560px at 54% 92%, rgba(52, 211, 153, 0.24), transparent 64%),
        radial-gradient(640px 420px at 26% 62%, rgba(167, 243, 208, 0.30), transparent 62%),
        linear-gradient(160deg, #eef9f2 0%, #dcf2e5 52%, #e6f6ec 100%);
    background-attachment: fixed;
}
.lg-sidebar {
    background:
        /* Key light from the top-left, agreeing with the light source the
           .neu-* classes use. Deliberately a low-alpha tint rather than a
           screen blend: screen pushed every pixel toward white and was the
           main cause of the washed-out look. */
        radial-gradient(140% 70% at 4% -10%, rgba(167, 243, 208, 0.10) 0%, rgba(167, 243, 208, 0.03) 38%, transparent 68%),
        /* Deep emerald ramp. Opacity sits at ~0.96 so the light page canvas
           stops lifting the black point into grey-green, and the four stops
           give the panel real tonal range instead of one flat green field. */
        linear-gradient(180deg,
            rgba(17, 74, 43, 0.96) 0%,
            rgba(11, 52, 31, 0.965) 34%,
            rgba(7, 34, 20, 0.97) 68%,
            rgba(4, 20, 12, 0.975) 100%);
    backdrop-filter: blur(26px) saturate(128%);
    -webkit-backdrop-filter: blur(26px) saturate(128%);
    border-right: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow:
        1px 0 0 rgba(255, 255, 255, 0.05),
        20px 0 50px -20px rgba(3, 24, 14, 0.72),
        inset -1px 0 0 rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.86);
}
/* Specular sheen along the top-left glass edge - the "liquid" highlight. */
.lg-sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    border-radius: inherit;
    background:
        linear-gradient(150deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.015) 18%, transparent 34%),
        radial-gradient(520px 300px at 0% 0%, rgba(167, 243, 208, 0.07), transparent 70%);
}
/* Fresnel-style inner hairlines for glass depth. */
.lg-sidebar::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow:
        inset -1px 0 0 rgba(255, 255, 255, 0.07),
        inset 0 1px 0 rgba(255, 255, 255, 0.10),
        inset 0 -1px 0 rgba(255, 255, 255, 0.04);
    border-radius: inherit;
}
/* Sidebar scrollbar picks up a light glass tone. */
.lg-sidebar .app-scrollbar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.22); }

/* High-contrast text + icons for the dark glass. Icons are muted so the
   labels lead, but not so far that they drop below a legible contrast. */
.lg-sidebar .text-ink { color: #ffffff !important; }
.lg-sidebar .text-slate-800 { color: #ffffff !important; }
.lg-sidebar .text-slate-600 { color: rgba(255, 255, 255, 0.86) !important; }
.lg-sidebar .text-slate-500 { color: rgba(255, 255, 255, 0.72) !important; }
.lg-sidebar .text-slate-400 { color: rgba(255, 255, 255, 0.56) !important; }
/* Section headings ("Workspace", "Management") carry the tracking already;
   they get a touch more presence than the muted icons beside them. */
.lg-sidebar nav p.text-slate-400 { color: rgba(255, 255, 255, 0.62) !important; }
.lg-sidebar nav a.text-slate-600:hover,
.lg-sidebar nav a:hover .text-slate-600,
.lg-sidebar nav a:hover .text-ink { color: #ffffff !important; }
.lg-sidebar nav a:hover .text-slate-400 { color: #a7f3d0 !important; }
.lg-sidebar .text-pine-deep { color: #ffffff !important; }
.lg-sidebar .text-pine { color: #a7f3d0 !important; }
.lg-sidebar .text-campus { color: #a7f3d0 !important; }

/* Active item: a mint-lit raised pill. A plain white wash over emerald turned
   into a desaturated grey smudge that read as "dirty", not "selected";
   tinting with the brand accent keeps it unmistakably active but still soft. */
.lg-sidebar nav a[aria-current="page"] {
    position: relative;
    background: linear-gradient(110deg, #256349, #194b35) !important;
    border-radius: 0.75rem !important;
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(167, 243, 208, 0.3), 0 4px 12px rgba(0, 20, 10, 0.2);
}
.lg-sidebar nav a[aria-current="page"]::before {
    content: "";
    position: absolute;
    left: 0;
    top: 25%;
    height: 50%;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: #a7f3d0;
}
.lg-sidebar nav a[aria-current="page"] svg { color: #b8efcf !important; }
.lg-sidebar nav a:focus-visible {
    outline: 2px solid #a7f3d0;
    outline-offset: 2px;
}
.lg-sidebar nav .bg-pine { background-color: #a7f3d0 !important; }

/* Frosted wash + mint icons on hover for nav and brand actions. The active
   pill is excluded so hovering it cannot wash out its own gradient. */
.lg-sidebar nav a:hover:not([aria-current="page"]),
.lg-sidebar nav button:hover,
.lg-sidebar > div:first-of-type a:hover,
.lg-sidebar > div:first-of-type button:hover {
    background-color: rgba(255, 255, 255, 0.07) !important;
    border-radius: 0.75rem !important;
}

/* Dividers, user card and avatar rings become subtle dark glass. */
.lg-sidebar .border-slate-200 { border-color: rgba(255, 255, 255, 0.12) !important; }
.lg-sidebar .border-slate-100 { border-color: rgba(255, 255, 255, 0.10) !important; }
.lg-sidebar .border-slate-300 { border-color: rgba(255, 255, 255, 0.16) !important; }
.lg-sidebar .ring-slate-200 { --tw-ring-color: rgba(255, 255, 255, 0.18) !important; }
.lg-sidebar .bg-slate-50\/70 { background-color: rgba(255, 255, 255, 0.04) !important; }
.lg-sidebar div.border-t .bg-white {
    background-color: rgba(255, 255, 255, 0.07) !important;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.lg-sidebar .bg-rose-50 { background-color: rgba(244, 63, 94, 0.14) !important; }
.lg-sidebar .bg-slate-100 { background-color: rgba(255, 255, 255, 0.10) !important; }

/* Shared records workspace: Results, Medal Tally, and Reports. */
.records-page .records-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border: 1px solid #24563c;
    border-radius: 1rem;
    background: radial-gradient(ellipse at 100% 0%, rgba(95, 174, 130, .22), transparent 55%),
        linear-gradient(115deg, #0b3a20, #15251b);
    color: #ffffff;
    box-shadow: 0 12px 28px -20px rgba(11, 58, 32, .55);
}
.records-page .records-hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    right: -5rem;
    top: -8rem;
    width: 24rem;
    height: 24rem;
    border: 1px solid rgba(167, 243, 208, .14);
    border-radius: 50%;
    pointer-events: none;
}
.records-hero .records-kicker {
    color: #b8efcf;
    font-size: .625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .2em;
}
.records-hero .records-description { color: #d0dfd4; line-height: 1.7; }
.records-hero .records-hero-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 2.75rem;
    padding: .625rem 1rem;
    border: 1px solid rgba(184, 239, 207, .3);
    border-radius: .5rem;
    background: rgba(255, 255, 255, .07);
    color: #ffffff;
    font-size: .8125rem;
    font-weight: 600;
    white-space: nowrap;
}
.records-hero .records-hero-link:hover { background: rgba(255, 255, 255, .15); }
.records-page .records-panel {
    border-radius: 1rem;
    border: 1px solid rgba(16, 185, 129, 0.24);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.88) 0%, rgba(236, 253, 245, 0.78) 54%, rgba(209, 250, 229, 0.72) 100%);
    backdrop-filter: blur(18px) saturate(165%);
    -webkit-backdrop-filter: blur(18px) saturate(165%);
    box-shadow:
        0 12px 32px -16px rgba(6, 78, 59, 0.22),
        0 2px 6px -2px rgba(6, 78, 59, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.88),
        inset 0 -1px 0 rgba(16, 185, 129, 0.10);
}
.records-page .records-metric { border-top: 3px solid #10b981; }
.records-page .results-card { display: flex; flex-direction: column; }
.records-page .results-card:hover { border-color: rgba(5, 150, 105, 0.44); }
.records-page .results-card-header { background: linear-gradient(110deg, #065f46, #059669); }
.records-page .records-empty { background: linear-gradient(145deg, rgba(255, 255, 255, 0.90), rgba(236, 253, 245, 0.82)); }
.records-page .records-table { font-variant-numeric: tabular-nums; }
.records-page .records-table thead {
    background: linear-gradient(110deg, rgba(6, 95, 70, 0.95) 0%, rgba(16, 122, 82, 0.92) 55%, rgba(5, 150, 105, 0.88) 100%);
}
.records-page .records-table th { color: #f0fdf4; white-space: nowrap; }
.records-page .records-table td { vertical-align: middle; }
.records-page .records-table tbody tr { transition: background-color .15s ease; }
.records-page .records-table tbody tr:hover { background-color: rgba(209, 250, 229, 0.56); }
.records-page :is(a, button, select):focus-visible {
    outline: 2px solid #2e9c5c;
    outline-offset: 3px;
}
.records-hero :is(a, button):focus-visible { outline-color: #b8efcf; }
.records-page .records-section { scroll-margin-top: 6.5rem; }
@media (prefers-reduced-motion: reduce) {
    .records-page *, .lg-sidebar nav a { transition: none !important; }
    .records-page article:hover { transform: none !important; }
}

@media (prefers-reduced-transparency: reduce) {
    body.app-canvas { background-image: none; }
    .lg-sidebar {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: linear-gradient(180deg, #12452A 0%, #0B341F 34%, #072214 68%, #04140C 100%);
    }
    .lg-sidebar::before { display: none; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    body.app-canvas { background-image: none; }
    .lg-sidebar { background: linear-gradient(180deg, #12452A 0%, #0B341F 34%, #072214 68%, #04140C 100%); }
    .lg-sidebar::before { display: none; }
}

/* --- Frosted translucent button / chip ----------------------------------- */
.lg-btn-glass {
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.30);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background-color .15s ease, border-color .15s ease;
}
.lg-btn-glass:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.50);
}

/* --- Accent link colour for light text over the frosted panel ------------ */
.lg-link {
    color: var(--lg-accent);
    transition: color .15s ease;
}
.lg-link:hover { color: #B8EFCF; }

/* --- Scoped frosted inputs for Django-rendered forms (Register) ----------
   Overrides the white widget classes coming from accounts/forms.py so the
   registration form matches the frosted panel while keeping light, high-
   contrast text. Scoped to `.lg-form` so it never leaks into other views. */
.lg-form input[type=text],
.lg-form input[type=password],
.lg-form input[type=tel],
.lg-form input[type=email],
.lg-form select {
    background: rgba(255, 255, 255, 0.10) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    color: #ffffff !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.lg-form input::placeholder { color: rgba(255, 255, 255, 0.55); }
.lg-form input:hover,
.lg-form select:hover { border-color: rgba(255, 255, 255, 0.40) !important; }
.lg-form input:focus,
.lg-form select:focus {
    outline: none;
    border-color: var(--lg-accent) !important;
    background: rgba(255, 255, 255, 0.16) !important;
    box-shadow: 0 0 0 3px rgba(143, 227, 180, 0.30) !important;
}
.lg-form select option { color: #15251B; background: #ffffff; }

/* ==========================================================================
   Accessibility fallbacks
   ========================================================================== */

/* Browsers without backdrop-filter: use a more opaque, solid panel so text
   contrast never depends on the blurred background bleeding through. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .lg-glass {
        background: #0B3A20;
        background: linear-gradient(180deg, #0B3A20 0%, #0C5330 100%);
    }
    .lg-glass-light { background: #ffffff; }
    .lg-input { background: rgba(255, 255, 255, 0.16) !important; }
    .lg-form input[type=text],
    .lg-form input[type=password],
    .lg-form input[type=tel],
    .lg-form input[type=email],
    .lg-form select { background: rgba(255, 255, 255, 0.16) !important; }
}

/* Respect users who prefer reduced transparency: drop the blur and go solid. */
@media (prefers-reduced-transparency: reduce) {
    .lg-glass {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: linear-gradient(180deg, #0B3A20 0%, #0C5330 100%);
    }
    .lg-glass-light {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: #ffffff;
    }
    .lg-input {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(255, 255, 255, 0.18) !important;
    }
    .lg-form input[type=text],
    .lg-form input[type=password],
    .lg-form input[type=tel],
    .lg-form input[type=email],
    .lg-form select {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(255, 255, 255, 0.18) !important;
    }
}

/* Users who prefer reduced motion: no shine animation (none is used by
   default), keeping the effect purely static. */


/* ==========================================================================
   Neumorphism — soft extrude fused onto the frosted glass
   ------------------------------------------------------------------------
   Liquid glass supplies the surface: translucency, backdrop blur, specular
   edge. Neumorphism supplies the volume: a light source at the top-left and a
   matching well at the bottom-right, so a panel reads as physically raised
   and a control reads as pressed into it. Neither style alone carries both
   ideas, which is why the two are layered here rather than mixed.

   Palette note: classic neumorphism assumes a light neutral surface. This app
   is dark emerald over a campus photo, so the highlight is a soft white sheen
   and the shadow is a deep pine well. Depth is deliberately restrained so the
   white/70 body text keeps its 4.5:1 contrast over the frosted panel.

   Light-source convention is top-left throughout, matching the specular sweep
   on .lg-sidebar so the two styles agree on where the light comes from.

   Consumed by: accounts/login.html, accounts/register.html, base.html.
   ========================================================================== */

:root {
    /* Dark-surface ramp */
    --nm-radius: 1rem;
    --nm-radius-sm: 0.75rem;
    --nm-light: rgba(255, 255, 255, 0.09);        /* top-left sheen  */
    --nm-light-edge: rgba(255, 255, 255, 0.20);   /* 1px inner catch */
    --nm-dark: rgba(1, 16, 9, 0.55);              /* bottom-right well */
    --nm-dark-deep: rgba(0, 10, 6, 0.72);         /* deep well / cast */
    --nm-press-ms: 140ms;
    --nm-ease: cubic-bezier(0.4, 0, 0.2, 1);

    /* Light-surface ramp, for controls on the paper canvas */
    --nm-l-light: rgba(255, 255, 255, 0.95);
    --nm-l-dark: rgba(21, 37, 27, 0.13);
}

/* --- Raised slab: the main frosted panel --------------------------------
   Casts a deep well away from the light, plus a soft sheen toward it, so the
   card floats above the page instead of sitting flat on top of it. */
.neu-slab {
    border-radius: var(--nm-radius);
    box-shadow:
        -10px -10px 26px -14px var(--nm-light),
        14px 14px 34px -14px var(--nm-dark-deep),
        inset 0 1px 0 var(--nm-light-edge);
}

/* --- Pressed well: a recess cut into the slab --------------------------- */
.neu-well {
    border-radius: var(--nm-radius);
    box-shadow:
        inset 6px 6px 14px -7px var(--nm-dark-deep),
        inset -6px -6px 14px -7px var(--nm-light),
        inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* --- Raised control: buttons, chips, pills ------------------------------
   Hover lifts it a little further; :active sinks it back into the surface.
   That press is the signature neumorphic gesture. */
.neu-raise {
    border-radius: var(--nm-radius);
    box-shadow:
        -5px -5px 14px -8px var(--nm-light),
        7px 7px 18px -8px var(--nm-dark),
        inset 0 1px 0 var(--nm-light-edge);
    transition:
        box-shadow var(--nm-press-ms) var(--nm-ease),
        transform var(--nm-press-ms) var(--nm-ease),
        background-color .15s ease,
        border-color .15s ease,
        color .15s ease;
}
.neu-raise:hover {
    box-shadow:
        -6px -6px 16px -8px var(--nm-light),
        9px 9px 22px -8px var(--nm-dark-deep),
        inset 0 1px 0 var(--nm-light-edge);
}
.neu-raise:active,
.neu-raise.is-pressed {
    box-shadow:
        inset 5px 5px 12px -6px var(--nm-dark-deep),
        inset -5px -5px 12px -6px var(--nm-light);
    transform: translateY(1px);
}

/* --- Medallion: raised circular emblem (college seals, avatars) --------- */
.neu-medallion {
    border-radius: 9999px;
    box-shadow:
        -4px -4px 10px -6px var(--nm-light),
        5px 5px 12px -6px var(--nm-dark),
        inset 0 1px 0 var(--nm-light-edge);
}

/* --- Groove line: a recessed divider inside a slab ---------------------- */
.neu-seam-top { position: relative; }
.neu-seam-top::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
}

/* Pointer affordance: these are anchors/buttons restyled above. */
.lg-sidebar nav a,
.neu-raise,
.neu-raise-light { cursor: pointer; }

/* --- Inputs become wells pressed into the panel -------------------------
   The deepest neumorphic cue on a form: the field looks carved out of the
   glass rather than painted on it. */
.lg-input.neu-well {
    background: rgba(3, 24, 14, 0.28) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
    box-shadow:
        inset 6px 6px 14px -7px var(--nm-dark-deep),
        inset -6px -6px 14px -7px var(--nm-light),
        inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.lg-input.neu-well:hover { border-color: rgba(255, 255, 255, 0.34) !important; }
/* Focus keeps the accent ring so keyboard users still see the caret target. */
.lg-input.neu-well:focus {
    background: rgba(3, 24, 14, 0.34) !important;
    border-color: var(--lg-accent) !important;
    box-shadow:
        inset 6px 6px 14px -7px var(--nm-dark-deep),
        inset -6px -6px 14px -7px var(--nm-light),
        0 0 0 3px rgba(143, 227, 180, 0.30);
}

/* Same treatment for the Django-rendered widgets in accounts/forms.py.
   Targeted by type rather than class so the registration form picks this up
   without editing forms.py or the template. */
.lg-form input[type=text],
.lg-form input[type=password],
.lg-form input[type=tel],
.lg-form input[type=email],
.lg-form select {
    background: rgba(3, 24, 14, 0.28) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
    border-radius: var(--nm-radius) !important;
    box-shadow:
        inset 6px 6px 14px -7px var(--nm-dark-deep),
        inset -6px -6px 14px -7px var(--nm-light),
        inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.lg-form input:hover,
.lg-form select:hover { border-color: rgba(255, 255, 255, 0.34) !important; }
.lg-form input:focus,
.lg-form select:focus {
    background: rgba(3, 24, 14, 0.34) !important;
    border-color: var(--lg-accent) !important;
    box-shadow:
        inset 6px 6px 14px -7px var(--nm-dark-deep),
        inset -6px -6px 14px -7px var(--nm-light),
        0 0 0 3px rgba(143, 227, 180, 0.30) !important;
}

/* --- Numbered steps on the register page -------------------------------- */
.neu-steps {
    border-top-color: transparent !important;
    border-radius: var(--nm-radius);
    box-shadow:
        inset 5px 5px 12px -6px var(--nm-dark-deep),
        inset -5px -5px 12px -6px var(--nm-light);
}
.neu-steps > li { border-bottom-color: rgba(255, 255, 255, 0.08) !important; }
.neu-steps > li:last-child { border-bottom-color: transparent !important; }

/* --- Sidebar: a slab standing off the canvas, nav rows press into it ---- */
.lg-sidebar {
    box-shadow:
        1px 0 0 rgba(255, 255, 255, 0.06),
        18px 0 46px -18px var(--nm-dark-deep),
        inset -1px 0 0 var(--nm-light-edge);
}
.lg-sidebar nav a {
    border-radius: var(--nm-radius-sm);
    box-shadow: none;
    transition:
        box-shadow .18s var(--nm-ease),
        transform .18s var(--nm-ease),
        background-color .18s ease,
        color .18s ease;
}
.lg-sidebar nav a:hover {
    box-shadow:
        -4px -4px 12px -7px var(--nm-light),
        5px 5px 14px -7px var(--nm-dark),
        inset 0 1px 0 var(--nm-light-edge);
}
.lg-sidebar nav a:active { transform: translateY(1px); }
/* The active page keeps the mint-lit pill defined with the sidebar palette
   above; a pressed well there fought with that tint and read as muddy.
   Only the hover lift and the press gesture are handled here. */
.lg-sidebar div.border-t .bg-white {
    box-shadow:
        -4px -4px 12px -7px var(--nm-light),
        6px 6px 16px -7px var(--nm-dark),
        inset 0 1px 0 var(--nm-light-edge);
}

/* --- Light-surface card system (dashboard panels) -----------------------
   Same dual-shadow geometry as .neu-raise-light, sized for panels instead of
   controls. Cards are raised off the paper canvas while the icon chips inside
   them are pressed back in - that extrude/inset pairing is what sells the
   style. Applied via .app-card rather than restyling utility classes so it
   never leaks into unrelated markup. */
.app-card {
    --nm-card-radius: 1rem;
    position: relative;
    border-radius: var(--nm-card-radius);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.88) 0%, rgba(236, 253, 245, 0.78) 54%, rgba(209, 250, 229, 0.72) 100%);
    backdrop-filter: blur(18px) saturate(165%);
    -webkit-backdrop-filter: blur(18px) saturate(165%);
    border: 1px solid rgba(16, 185, 129, 0.24);
    box-shadow:
        0 12px 32px -16px rgba(6, 78, 59, 0.22),
        0 2px 6px -2px rgba(6, 78, 59, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.88),
        inset 0 -1px 0 rgba(16, 185, 129, 0.10);
    transition:
        box-shadow .22s var(--nm-ease),
        border-color .18s ease;
}

/* Interactive cards lift further on hover. Shadow only - a transform here
   would nudge the grid and read as jitter rather than depth. */
.app-card--link { cursor: pointer; }
.app-card--link:hover {
    border-color: rgba(5, 150, 105, 0.42);
    box-shadow:
        0 18px 36px -16px rgba(5, 150, 105, 0.28),
        0 4px 10px -4px rgba(6, 78, 59, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

/* The hero carries a mint glow off the top-right corner so it reads as the
   page's anchor instead of one more panel in the grid. */
.app-card--hero {
    background:
        radial-gradient(120% 150% at 100% 0%, rgba(16, 185, 129, 0.18) 0%, rgba(167, 243, 208, 0.14) 44%, transparent 74%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.90) 0%, rgba(236, 253, 245, 0.82) 55%, rgba(209, 250, 229, 0.76) 100%);
}

/* Icon chips sit pressed into the card they belong to. */
.app-chip {
    border-radius: 0.75rem;
    background: linear-gradient(145deg, rgba(234, 242, 235, 0.95), rgba(209, 250, 229, 0.90));
    color: #065f46;
    box-shadow:
        inset 2px 2px 5px -2px rgba(6, 78, 59, 0.16),
        inset -2px -2px 5px -2px rgba(255, 255, 255, 0.95);
}

/* A neutral sibling of .app-chip for icons that should not carry the brand
   accent, so a grid of tiles does not read as one undifferentiated green. */
.app-chip--neutral {
    background: linear-gradient(145deg, rgba(241, 245, 242, 0.95), rgba(226, 232, 229, 0.95));
    color: #334e41;
}

/* Inner list rows inside a card: shallow raised strips that read as a stack
   of surfaces rather than a flat list on a white sheet. */
.app-row {
    border-radius: 0.75rem;
    border: 1px solid rgba(16, 185, 129, 0.18);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.80) 0%, rgba(236, 253, 245, 0.74) 100%);
    box-shadow: 0 2px 8px -4px rgba(6, 78, 59, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition:
        border-color .18s ease,
        box-shadow .18s var(--nm-ease),
        background-color .18s ease;
}
.app-row:hover {
    border-color: rgba(5, 150, 105, 0.36);
    box-shadow: 0 8px 18px -10px rgba(5, 150, 105, 0.28);
}

/* Quick-action tiles. The first one is the primary action and stays solid
   pine; the rest are raised surfaces so the set reads as a family. */
.app-tile {
    border-radius: 0.875rem;
    border: 1px solid rgba(16, 185, 129, 0.24);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.88) 0%, rgba(236, 253, 245, 0.78) 100%);
    backdrop-filter: blur(14px) saturate(150%);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    box-shadow:
        0 8px 20px -12px rgba(6, 78, 59, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.88);
    transition:
        box-shadow .2s var(--nm-ease),
        border-color .18s ease,
        transform .2s var(--nm-ease);
}
.app-tile:hover {
    border-color: rgba(5, 150, 105, 0.42);
    box-shadow:
        0 14px 28px -14px rgba(5, 150, 105, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}
.app-tile-primary {
    border-radius: 0.875rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 48%, #047857 100%);
    border: 1px solid rgba(167, 243, 208, 0.40);
    box-shadow:
        0 12px 26px -12px rgba(5, 150, 105, 0.62),
        inset 0 1px 0 rgba(255, 255, 255, 0.34);
    transition:
        box-shadow .2s var(--nm-ease),
        transform .2s var(--nm-ease);
}
.app-tile-primary:hover {
    box-shadow:
        0 18px 34px -14px rgba(4, 120, 87, 0.72),
        inset 0 1px 0 rgba(255, 255, 255, 0.40);
}

/* Primary action: raised, sinks on press. */
.app-btn-primary {
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 48%, #047857 100%);
    border: 1px solid rgba(167, 243, 208, 0.45);
    color: #ffffff;
    box-shadow:
        0 10px 22px -10px rgba(5, 150, 105, 0.62),
        inset 0 1px 0 rgba(255, 255, 255, 0.36);
    transition:
        box-shadow var(--nm-press-ms) var(--nm-ease),
        transform var(--nm-press-ms) var(--nm-ease);
}
.app-btn-primary:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 52%, #065f46 100%);
    box-shadow:
        0 14px 28px -10px rgba(4, 120, 87, 0.72),
        inset 0 1px 0 rgba(255, 255, 255, 0.42);
}
.app-btn-primary:active {
    box-shadow:
        inset 4px 4px 10px -5px rgba(2, 44, 34, 0.55),
        inset -4px -4px 10px -5px rgba(255, 255, 255, 0.22);
    transform: translateY(1px);
}

/* --- Submit-button loader ------------------------------------------------
   The two slots inside a [data-loader] button swap via the `hidden`
   attribute. The attribute selector is declared after the base rule so it
   reliably beats the display:flex below - toggling Tailwind's .hidden
   against .flex instead is order-dependent and can silently fail. */
.loader-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.loader-slot[hidden] { display: none; }

/* The spinner. Animated here rather than with Tailwind's animate-spin so
   the reduced-motion preference can be honoured. */
.btn-spinner {
    animation: btn-spinner-rotate 0.7s linear infinite;
}
@keyframes btn-spinner-rotate {
    to { transform: rotate(360deg); }
}
/* Reduced motion: drop the rotation entirely and let the "Signing in…"
   label carry the state on its own. */
@media (prefers-reduced-motion: reduce) {
    .btn-spinner { display: none; }
}

/* --- Light-surface variant: header controls on the paper canvas ---------
   Same dual-shadow geometry, inverted ramp for a light background. */
.neu-raise-light {
    border-radius: var(--nm-radius-sm);
    box-shadow:
        -4px -4px 10px -6px var(--nm-l-light),
        5px 5px 12px -6px var(--nm-l-dark),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition:
        box-shadow var(--nm-press-ms) var(--nm-ease),
        transform var(--nm-press-ms) var(--nm-ease),
        background-color .15s ease,
        border-color .15s ease,
        color .15s ease;
}
.neu-raise-light:hover {
    box-shadow:
        -5px -5px 12px -6px var(--nm-l-light),
        6px 6px 15px -6px var(--nm-l-dark),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.neu-raise-light:active {
    box-shadow:
        inset 4px 4px 10px -5px rgba(21, 37, 27, 0.16),
        inset -4px -4px 10px -5px rgba(255, 255, 255, 0.95);
    transform: translateY(1px);
}

/* Neumorphic depth is pure box-shadow, so it survives both fallbacks below;
   only the translucency they replace needs handling. */
@media (prefers-reduced-transparency: reduce) {
    .lg-input.neu-well,
    .lg-form input[type=text],
    .lg-form input[type=password],
    .lg-form input[type=tel],
    .lg-form input[type=email],
    .lg-form select {
        background: rgba(11, 58, 32, 0.92) !important;
    }
}

/* No press animation: keep the static depth, drop the movement. */
@media (prefers-reduced-motion: reduce) {
    .neu-raise,
    .neu-raise-light,
    .lg-sidebar nav a {
        transition:
            box-shadow .01ms linear,
            background-color .15s ease,
            border-color .15s ease,
            color .15s ease;
    }
    .neu-raise:active,
    .neu-raise-light:active,
    .lg-sidebar nav a:active { transform: none; }
}

/* ==========================================================================
   Global Emerald Gradient Liquid Glass Workspace (all app templates)
   Applies lush, refractive emerald liquid glass across cards, tables,
   buttons, header, and footer with guaranteed high-contrast readable text.
   ========================================================================== */

/* --- Sticky Header & Footer ---------------------------------------------- */
body.app-canvas header.fixed {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(236, 253, 245, 0.64) 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.72) !important;
    backdrop-filter: blur(22px) saturate(185%);
    -webkit-backdrop-filter: blur(22px) saturate(185%);
    box-shadow:
        0 12px 32px -18px rgba(6, 78, 59, 0.30),
        inset 0 1px 0 rgba(255, 255, 255, 0.92),
        inset 0 -1px 0 rgba(16, 185, 129, 0.16);
}
body.app-canvas header.fixed .text-slate-400 { color: #3b5849 !important; }
body.app-canvas footer {
    background: linear-gradient(180deg, rgba(236, 253, 245, 0.58) 0%, rgba(255, 255, 255, 0.74) 100%) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.70) !important;
    color: #244033 !important;
    backdrop-filter: blur(16px) saturate(170%);
    -webkit-backdrop-filter: blur(16px) saturate(170%);
}

/* --- User Menu Dropdown -------------------------------------------------- */
#user-menu {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.92) 0%, rgba(236, 253, 245, 0.88) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.82) !important;
    backdrop-filter: blur(22px) saturate(185%);
    -webkit-backdrop-filter: blur(22px) saturate(185%);
    box-shadow:
        0 20px 42px -16px rgba(6, 78, 59, 0.34),
        inset 0 1.5px 0 rgba(255, 255, 255, 0.98);
}

/* --- Cards & Panels across all templates inside <main> ------------------- */
.app-card,
.records-page .records-panel,
main :is(section, article, form)[class*="bg-white"]:not(.records-hero):not(.lg-glass):not([data-color-theme-picker]),
main div[class*="bg-white"][class*="rounded-xl"]:not(.records-hero):not(.lg-glass):not([data-color-theme-picker]),
main div[class*="bg-white"][class*="rounded-2xl"]:not(.records-hero):not(.lg-glass):not([data-color-theme-picker]),
main div[class*="bg-white"][class*="rounded-lg"][class*="border"]:not(.records-hero):not(.lg-glass):not([data-color-theme-picker]),
main div[class*="bg-white"][class*="rounded-md"][class*="border"]:not(.records-hero):not(.lg-glass):not([data-color-theme-picker]),
main a[class*="bg-white"][class*="rounded-"]:not(.ui-button):not(.tw-button):not(.sh-button) {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.44) 40%, rgba(209, 250, 229, 0.50) 76%, rgba(167, 243, 208, 0.52) 100%);
    border-color: rgba(255, 255, 255, 0.74);
    backdrop-filter: blur(22px) saturate(190%);
    -webkit-backdrop-filter: blur(22px) saturate(190%);
    box-shadow:
        0 16px 40px -18px rgba(6, 78, 59, 0.28),
        0 4px 14px -4px rgba(16, 185, 129, 0.14),
        inset 0 1.5px 0 rgba(255, 255, 255, 0.96),
        inset 1px 0 0 rgba(255, 255, 255, 0.68),
        inset 0 -1px 0 rgba(16, 185, 129, 0.18);
    color: #0b2116;
}
main a[class*="bg-white"][class*="rounded-"]:not(.ui-button):not(.tw-button):not(.sh-button):hover {
    border-color: rgba(16, 185, 129, 0.48);
    box-shadow:
        0 20px 44px -16px rgba(5, 150, 105, 0.34),
        0 4px 16px -4px rgba(16, 185, 129, 0.18),
        inset 0 1.5px 0 rgba(255, 255, 255, 0.98);
}

/* Keep form inputs/selects/textareas inside glass cards crisp and legible */
main :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]):not(.lg-input):not([class*="bg-pine"]):not([class*="bg-campus"]) {
    background-color: rgba(255, 255, 255, 0.86);
    color: #0f2419;
    border-color: rgba(16, 185, 129, 0.30);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: inset 0 1px 2px rgba(6, 78, 59, 0.06), 0 1px 0 rgba(255, 255, 255, 0.85);
}
main :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]):not(.lg-input):not([class*="bg-pine"]):not([class*="bg-campus"]):focus {
    background-color: rgba(255, 255, 255, 0.96);
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.24);
}

/* Low-specificity muted text boost on light glass ONLY (never overrides dark headers/buttons) */
:where(main) :where(.text-slate-400):not(thead):not(thead *):not(.records-hero):not(.records-hero *):not(.lg-glass):not(.lg-glass *):not(.results-card-header):not(.results-card-header *):not(.ui-button--primary):not(.ui-button--primary *):not(.tw-button-primary):not(.tw-button-primary *):not(.sh-button-primary):not(.sh-button-primary *):not([class*="bg-pine"]):not([class*="bg-pine"] *):not([class*="bg-ink"]):not([class*="bg-ink"] *) {
    color: #3f5c4d;
}
:where(main) :where(.text-slate-500):not(thead):not(thead *):not(.records-hero):not(.records-hero *):not(.lg-glass):not(.lg-glass *):not(.results-card-header):not(.results-card-header *):not(.ui-button--primary):not(.ui-button--primary *):not(.tw-button-primary):not(.tw-button-primary *):not(.sh-button-primary):not(.sh-button-primary *):not([class*="bg-pine"]):not([class*="bg-pine"] *):not([class*="bg-ink"]):not([class*="bg-ink"] *) {
    color: #2f4b3d;
}

/* --- Tables: Jewel Emerald Liquid Glass Header + Frosted Glass Rows ------ */
main table {
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
    background: transparent !important;
}
main table thead,
main table thead tr {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.04) 48%, rgba(255, 255, 255, 0) 52%),
        linear-gradient(115deg, rgba(4, 104, 76, 0.92) 0%, rgba(5, 146, 102, 0.88) 54%, rgba(16, 185, 129, 0.84) 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.36) !important;
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
}
main table thead,
main table thead tr,
main table thead th,
main table thead th :is(span, a, button, div, p, svg, label),
main table thead th.text-slate-400,
main table thead th.text-slate-500,
main table thead th.text-slate-600,
main table thead th.text-slate-700,
main table thead th.text-ink,
main table thead tr.text-slate-400 th,
main table thead tr.text-slate-500 th,
main table thead tr.text-slate-600 th,
main table thead tr.text-slate-700 th {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(2, 44, 34, 0.32);
}
main table thead th {
    background: transparent !important;
    border-color: rgba(255, 255, 255, 0.20) !important;
}
main table thead th.sticky {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 50%),
        linear-gradient(180deg, rgba(4, 104, 76, 0.98) 0%, rgba(5, 134, 94, 0.98) 100%) !important;
    color: #ffffff !important;
}
main table thead th.text-amber-700,
main table thead th .text-amber-700 { color: #fef08a !important; }
main table thead th.text-orange-700,
main table thead th .text-orange-700 { color: #fed7aa !important; }
main table thead th.text-pine-deep,
main table thead th .text-pine-deep { color: #ffffff !important; }

main table tbody {
    background: transparent !important;
}
main table tbody tr {
    background-color: rgba(255, 255, 255, 0.42);
    border-color: rgba(16, 185, 129, 0.16) !important;
    transition: background-color .15s ease;
}
main table tbody tr:nth-child(even) {
    background-color: rgba(236, 253, 245, 0.36);
}
main table tbody tr:hover {
    background-color: rgba(209, 250, 229, 0.62) !important;
}
main table tbody td {
    color: #0b2116;
    border-color: rgba(16, 185, 129, 0.14) !important;
}
main table tbody td.sticky {
    background-color: rgba(242, 252, 246, 0.95) !important;
}
main table tbody tr:hover td.sticky {
    background-color: rgba(214, 249, 231, 0.98) !important;
}
main table tbody td.sticky[class*="right-0"] {
    background: linear-gradient(180deg, rgba(220, 247, 233, 0.96), rgba(209, 250, 229, 0.96)) !important;
    color: #064e3b !important;
}
main table tfoot tr {
    background: linear-gradient(145deg, rgba(209, 250, 229, 0.72), rgba(167, 243, 208, 0.56)) !important;
    color: #064e3b !important;
    border-top: 2px solid rgba(16, 185, 129, 0.32) !important;
}
main table tfoot td.sticky {
    background: rgba(167, 243, 208, 0.95) !important;
    color: #064e3b !important;
}

/* --- Emerald Gradient Liquid Glass Buttons (Tailwind utility buttons) ---- */
main :is(button, a)[class*="bg-pine"][class*="text-white"],
main :is(button, a)[class*="bg-campus"][class*="text-white"],
header :is(button, a)[class*="bg-pine"][class*="text-white"],
header :is(button, a)[class*="bg-campus"][class*="text-white"],
main select[class*="bg-pine"][class*="text-white"] {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.30) 0%, rgba(255, 255, 255, 0.07) 48%, rgba(255, 255, 255, 0) 52%),
        linear-gradient(135deg, #10b981 0%, #059669 52%, #047857 100%) !important;
    border-color: rgba(255, 255, 255, 0.42) !important;
    color: #ffffff !important;
    text-shadow: 0 1px 1px rgba(2, 44, 34, 0.25);
    box-shadow:
        0 10px 24px -8px rgba(5, 150, 105, 0.58),
        0 2px 6px -2px rgba(6, 78, 59, 0.24),
        inset 0 1.5px 0 rgba(255, 255, 255, 0.52);
    transition: background .18s ease, box-shadow .18s ease, transform .16s ease;
}
main :is(button, a)[class*="bg-pine"][class*="text-white"]:hover,
main :is(button, a)[class*="bg-campus"][class*="text-white"]:hover,
header :is(button, a)[class*="bg-pine"][class*="text-white"]:hover,
header :is(button, a)[class*="bg-campus"][class*="text-white"]:hover {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.36) 0%, rgba(255, 255, 255, 0.10) 48%, rgba(255, 255, 255, 0) 52%),
        linear-gradient(135deg, #059669 0%, #047857 52%, #065f46 100%) !important;
    box-shadow:
        0 14px 30px -10px rgba(4, 120, 87, 0.68),
        inset 0 1.5px 0 rgba(255, 255, 255, 0.60);
    transform: translateY(-1px);
}
main :is(button, a)[class*="bg-pine"][class*="text-white"]:active,
main :is(button, a)[class*="bg-campus"][class*="text-white"]:active {
    transform: translateY(0);
}

/* --- Accessibility & Print Fallbacks for Workspace Liquid Glass ---------- */
@media (prefers-reduced-transparency: reduce) {
    body.app-canvas header.fixed,
    body.app-canvas footer,
    #user-menu,
    .app-card,
    .app-tile,
    .records-page .records-panel,
    .team-workspace-card,
    .sh-stats,
    .sh-competition,
    .sh-panel,
    main :is(section, article, form)[class*="bg-white"]:not(.records-hero):not(.lg-glass):not([data-color-theme-picker]),
    main div[class*="bg-white"][class*="rounded-xl"]:not(.records-hero):not(.lg-glass):not([data-color-theme-picker]),
    main div[class*="bg-white"][class*="rounded-2xl"]:not(.records-hero):not(.lg-glass):not([data-color-theme-picker]),
    main div[class*="bg-white"][class*="rounded-lg"][class*="border"]:not(.records-hero):not(.lg-glass):not([data-color-theme-picker]),
    main div[class*="bg-white"][class*="rounded-md"][class*="border"]:not(.records-hero):not(.lg-glass):not([data-color-theme-picker]) {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: linear-gradient(145deg, #ffffff 0%, #ecfdf5 100%);
    }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .app-card,
    .app-tile,
    .records-page .records-panel,
    .team-workspace-card,
    .sh-stats,
    .sh-competition,
    .sh-panel,
    main :is(section, article, form)[class*="bg-white"]:not(.records-hero):not(.lg-glass):not([data-color-theme-picker]),
    main div[class*="bg-white"][class*="rounded-xl"]:not(.records-hero):not(.lg-glass):not([data-color-theme-picker]) {
        background: linear-gradient(145deg, #ffffff 0%, #ecfdf5 100%);
    }
}
@media (prefers-reduced-motion: reduce) {
    main :is(button, a)[class*="bg-pine"][class*="text-white"],
    main :is(button, a)[class*="bg-campus"][class*="text-white"],
    .sh-button { transition: none; }
    main :is(button, a)[class*="bg-pine"][class*="text-white"]:hover,
    main :is(button, a)[class*="bg-campus"][class*="text-white"]:hover,
    .sh-button:hover { transform: none; }
}
@media print {
    body.app-canvas { background: #ffffff !important; }
    main :is(section, article, form, div)[class*="bg-white"] {
        background: #ffffff !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        box-shadow: none !important;
    }
    main table thead,
    main table thead tr {
        background: #ecfdf5 !important;
    }
    main table thead th,
    main table thead th * {
        color: #064e3b !important;
        text-shadow: none !important;
    }
}
