/**
 * WagePerks Design System
 * =======================
 * A lightweight, modern design system for WagePerks EMP.
 * Built on Bootstrap 5 with CSS custom properties for white-label theming.
 *
 * Color system: Warm Teal #5CC2BC + Warm Orange #EF9859
 *   (with #2E8B87 as the deeper sidebar tone)
 * Typography: Outfit (display) + DM Sans (body)
 * Navigation: Collapsible sidebar with Cmd+K command palette
 * Theming: Light + dark mode via [data-theme] attribute (set in base.html before paint)
 */

/* ===========================================
   1. DESIGN TOKENS (CSS Custom Properties)
   =========================================== */

:root {
    /* --- Brand Colors (white-label overridable via branding.css) ---
       Aligned with the WagePerks website brand:
       Warm teal #5CC2BC primary, warm orange #EF9859 accent. */
    --wp-primary: #2E8B87;          /* Deep teal for sidebar / contrast surfaces */
    /* Brand colour SAFE AS TEXT on the page/card background. Light mode: the
       brand itself. Dark mode: lightened, because the raw brand is ~3:1 on a
       dark surface. Kept separate from --wp-primary because that one is also
       a SURFACE colour (filled buttons, --wp-bg-sidebar) whose white ink
       depends on it staying dark. Splitting the two is what stops the
       "dark text on dark background" bug coming back per-screen. */
    --wp-primary-text: var(--wp-primary);
    --wp-primary-hover: #246b68;
    --wp-primary-light: #5CC2BC;     /* Brand teal */
    --wp-primary-lighter: #C0E9EB;
    --wp-primary-pale: #E8F6F6;
    --wp-primary-ghost: rgba(92, 194, 188, 0.10);
    --wp-primary-ring: rgba(92, 194, 188, 0.30);
    /* Darkened variants — used by hero/banner surfaces that need white
       text legibility regardless of how light the tenant's brand
       primary is. color-mix(in srgb, primary X%, black): smaller X =
       more black mixed in = darker. At 50%/30% the result passes WCAG
       AA for white text even when primary is a light brand teal like
       Snap's #5CC2BC. */
    --wp-primary-deep: color-mix(in srgb, var(--wp-primary) 50%, black);
    --wp-primary-deeper: color-mix(in srgb, var(--wp-primary) 30%, black);

    --wp-accent: #EF9859;
    --wp-accent-hover: #D97F3E;
    --wp-accent-light: #fde6d3;
    --wp-accent-ghost: rgba(239, 152, 89, 0.10);

    /* --- Semantic Colors (fixed, not themeable) --- */
    --wp-success: #16a34a;
    --wp-success-light: #d1fae5;
    --wp-warning: #d97706;
    --wp-warning-light: #fef3c7;
    --wp-danger: #dc2626;
    --wp-danger-light: #fee2e2;
    --wp-info: #0891b2;
    --wp-info-light: #cffafe;

    /* Text colors for content sitting ON the semantic-light surfaces
       (alerts). Themeable: the -light surfaces go near-black in dark
       mode, so their text must flip light (see dark block). */
    --wp-success-text: #065f46;
    --wp-warning-text: #7a4e00;     /* text step — the surface amber #d97706 is only 3.19:1 on white */
    --wp-danger-text: #991b1b;
    --wp-info-text: #055160;

    /* --- Text — three-tier hierarchy + on-dark variants --- */
    --wp-text: #1C2D2B;             /* primary — body, headings */
    --wp-text-secondary: #44615D;   /* secondary — labels, captions */
    --wp-text-tertiary: #4F6864;    /* 6.01 / 5.74 / 5.48 on #fff / #f8fafc / #f1f5f9 — was #6B8783 at 3.70 */
    /* Muted body copy (.text-muted, .form-text, ~146 templates). Must clear
       4.5:1 on EVERY light surface, not just white — #5C7975 passed on
       #fff (4.72) but sat at 4.31 on the slate-100 cells the calendar
       uses. Was #8DA5A2 at 2.5:1. */
    --wp-text-muted: #586F6C;       /* 5.38 / 5.14 / 4.91 — keeps the scale ordered below tertiary */
    --wp-text-on-primary: #ffffff;
    --wp-text-on-accent: #1e293b;   /* 6.81:1 on amber; #fff was 2.15:1 */
    --wp-text-on-dark: #E8F6F6;
    --wp-text-on-dark-secondary: #A8D8D5;

    /* --- Backgrounds --- */
    --wp-bg-page: #f8fafc;
    --wp-bg-card: #ffffff;
    --wp-bg-sidebar: var(--wp-primary);
    --wp-bg-section-alt: #f1f5f9;
    --wp-bg-input: #ffffff;

    /* --- Borders --- */
    --wp-border: #e2e8f0;
    --wp-border-medium: #cbd5e1;
    --wp-border-dark: #94a3b8;

    /* --- Shadows --- */
    --wp-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --wp-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --wp-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
    --wp-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);

    /* --- Hero gradient (dashboard, marketplace banners) --- */
    /* Light mode defaults defined here. Dark mode overrides further down. */
    --wp-hero-gradient-from: var(--wp-primary-lighter);
    --wp-hero-gradient-to: var(--wp-bg-card);

    /* --- Typography — WagePerks brand uses Outfit (display) + DM Sans (body) --- */
    --wp-font: 'DM Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --wp-font-display: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --wp-font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

    /* --- Spacing --- */
    --wp-radius-sm: 6px;
    --wp-radius: 8px;
    --wp-radius-md: 12px;
    --wp-radius-lg: 16px;
    --wp-radius-xl: 20px;
    --wp-radius-full: 9999px;

    /* --- Layout --- */
    --wp-sidebar-width: 256px;
    --wp-sidebar-collapsed: 72px;
    --wp-header-height: 0px; /* No top header - sidebar only */
    --wp-content-max-width: 1280px;
    --wp-footer-height: auto;

    /* --- Motion: durations --- */
    --wp-duration-instant: 100ms;
    --wp-duration-fast: 150ms;
    --wp-duration-base: 200ms;
    --wp-duration-slow: 320ms;
    --wp-duration-slower: 500ms;

    /* --- Motion: easing curves --- */
    --wp-ease-out: cubic-bezier(0.16, 1, 0.3, 1);          /* easeOutExpo — entrances */
    --wp-ease-in: cubic-bezier(0.7, 0, 0.84, 0);           /* easeInExpo — exits */
    --wp-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);      /* easeInOutCirc — state changes */
    --wp-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);   /* gentle overshoot — playful */

    /* --- Legacy aliases (kept for back-compat with existing code) --- */
    --wp-transition: var(--wp-duration-fast) var(--wp-ease-in-out);
    --wp-transition-slow: var(--wp-duration-slow) var(--wp-ease-in-out);
}


/* ===========================================
   1b. DARK MODE TOKENS
   =========================================== */

[data-theme="dark"] {
    /* Brand stays warm — we shift everything else */
    --wp-primary: #5CC2BC;
    --wp-primary-text: #5CC2BC;
    --wp-primary-hover: #7BD3CE;
    --wp-primary-light: #5CC2BC;
    --wp-primary-lighter: #1e3937;
    --wp-primary-pale: #15292a;
    --wp-primary-ghost: rgba(92, 194, 188, 0.14);
    --wp-primary-ring: rgba(92, 194, 188, 0.35);

    --wp-accent: #F4A86B;
    --wp-accent-hover: #FFBE85;
    --wp-accent-light: #3a2614;
    --wp-accent-ghost: rgba(244, 168, 107, 0.14);

    /* Text — high contrast on near-black */
    --wp-text: #F1F5F4;
    --wp-text-secondary: #B4C9C5;
    --wp-text-tertiary: #7A928E;
    --wp-text-muted: #78928E;   /* ≥5:1 on card surfaces — #5D7572 sat at ~3.4:1 */
    --wp-text-on-primary: #ffffff;
    --wp-text-on-dark: #F1F5F4;
    --wp-text-on-dark-secondary: #B4C9C5;

    /* Backgrounds — true near-black layered surfaces */
    --wp-bg-page: #0B1413;
    --wp-bg-card: #131F1E;
    --wp-bg-sidebar: #0F1A19;
    --wp-bg-section-alt: #1A2625;
    --wp-bg-input: #1A2625;

    /* Borders */
    --wp-border: #233231;
    --wp-border-medium: #2C3F3D;
    --wp-border-dark: #3D5552;

    /* Stronger shadows in dark mode for separation */
    --wp-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --wp-shadow: 0 1px 3px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.4);
    --wp-shadow-md: 0 4px 8px rgba(0, 0, 0, 0.5), 0 2px 4px rgba(0, 0, 0, 0.4);
    --wp-shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.5), 0 4px 6px rgba(0, 0, 0, 0.4);

    /* Semantic-light variants need re-tinting on dark backgrounds */
    --wp-success-light: #0f2b1e;
    --wp-warning-light: #2a1f10;
    --wp-danger-light: #2b1313;
    --wp-info-light: #0f2429;

    /* Alert text on the re-tinted (near-black) semantic surfaces. The
       light values are dark-on-pastel and drop to ~1.5:1 here — the
       "How this works" bank-transfer instructions were illegible in
       dark mode (2026-09-07). All four are ≥7:1 on their surfaces. */
    --wp-success-text: #86efac;
    --wp-warning-text: #f5c97b;
    --wp-danger-text: #fca5a5;
    --wp-info-text: #99e3f2;

    /* Hero / dashboard gradient — dark mode variant.
       The light mode gradient (defined in :root) goes from pale-teal to
       white, which is dramatic and readable. In dark mode we cannot reuse
       the same tokens because primary-lighter and bg-card collapse to
       nearly-identical near-blacks (#1e3937 → #131F1E), making white text
       invisible (Rab feedback 2026-05-20). Instead we mix the brand
       primary at low opacity over a darker base so the eye still reads a
       gradient AND text stays legible (WCAG AA contrast against the
       darker end). */
    --wp-hero-gradient-from: rgba(92, 194, 188, 0.18);
    --wp-hero-gradient-to: #0F1A19;
}

/* Hero gradient utility — tokens defined in :root + [data-theme="dark"]
   so the class adapts per theme without per-element overrides. */
.wp-hero-gradient {
    background: linear-gradient(
        135deg,
        var(--wp-hero-gradient-from) 0%,
        var(--wp-hero-gradient-to) 100%
    );
}

/* Dark-background hero card for white text — used by Benefits Marketplace,
   report indexes, etc. Replaces inline `style="background: linear-gradient(
   var(--wp-primary), var(--wp-primary-light/hover))"` which failed contrast
   on light brand primaries (e.g. Snap's #5CC2BC: white text on the gradient
   start ran at ~2:1). The --wp-primary-deep tokens guarantee a dark enough
   background regardless of the tenant primary. */
.wp-hero-on-primary,
.card.wp-hero-on-primary {   /* .card sets `background` later at equal
    specificity, which silently won and left `text-white` content invisible
    on a white card across Benefits Marketplace + 10 report pages. */
    background: linear-gradient(
        135deg,
        var(--wp-primary-deep) 0%,
        var(--wp-primary-deeper) 100%
    );
    color: #fff;
}

/* Respect user motion preference everywhere */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}


/* ===========================================
   2. BASE RESET & TYPOGRAPHY
   =========================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--wp-font);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--wp-text);
    background-color: var(--wp-bg-page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    margin: 0;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--wp-font);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--wp-text);
    margin-top: 0;
    margin-bottom: 0.5rem;
}

h1, .h1 { font-size: 1.875rem; font-weight: 700; }  /* 30px */
h2, .h2 { font-size: 1.5rem; }                       /* 24px */
h3, .h3 { font-size: 1.25rem; }                       /* 20px */
h4, .h4 { font-size: 1.125rem; }                      /* 18px */
h5, .h5 { font-size: 1rem; }                          /* 16px */
h6, .h6 { font-size: 0.875rem; font-weight: 500; }   /* 14px */

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

a {
    color: var(--wp-primary-text);
    text-decoration: none;
    transition: color var(--wp-transition);
}

a:hover {
    color: var(--wp-primary-hover);
    text-decoration: underline;
}

small, .text-sm {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

.text-muted {
    color: var(--wp-text-muted) !important;
}

.text-secondary {
    color: var(--wp-text-secondary) !important;
}

.text-tertiary {
    color: var(--wp-text-tertiary) !important;
}

.fw-medium {
    font-weight: 500;
}

.font-mono {
    font-family: var(--wp-font-mono);
}


/* ===========================================
   3. LAYOUT: SIDEBAR + CONTENT
   =========================================== */

.wp-app {
    display: flex;
    min-height: 100vh;
}

/* --- Sidebar --- */
.wp-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--wp-sidebar-width);
    height: 100vh;
    background: var(--wp-bg-sidebar);
    color: var(--wp-text-on-primary);
    display: flex;
    flex-direction: column;
    z-index: 1040;
    transition: width var(--wp-transition-slow);
    overflow: hidden;
}

/* Impersonation banner offsets — sidebar + mobile header are position:fixed
   with top:0, so without an offset they slide *under* the banner. The body
   class is added in base.html when an impersonation is in effect. */
body.wp-impersonating .wp-sidebar {
    top: var(--wp-impersonation-banner-height, 44px);
    height: calc(100vh - var(--wp-impersonation-banner-height, 44px));
}
body.wp-impersonating .wp-mobile-header {
    top: var(--wp-impersonation-banner-height, 44px);
}

.wp-sidebar.collapsed {
    width: var(--wp-sidebar-collapsed);
}

.wp-sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1.25rem;
    height: 72px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.wp-sidebar-brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.wp-sidebar-brand-logo {
    width: auto;
    /* Tenant logos (which only have the base class — the WP fallback uses
       --full/--mark variants below with their own explicit height) must
       fit inside the 72px-tall sidebar header. max-height keeps any
       aspect ratio intact via width: auto; max-width stops very wide
       wordmarks bleeding past the sidebar edge. */
    max-height: 36px;
    max-width: 200px;
    object-fit: contain;
    flex-shrink: 0;
}

.wp-sidebar-brand-logo--full {
    height: 36px;
    display: block;
}

.wp-sidebar-brand-logo--mark {
    height: 36px;
    display: none;
}

.wp-sidebar.collapsed .wp-sidebar-brand-logo--full {
    display: none;
}

.wp-sidebar.collapsed .wp-sidebar-brand-logo--mark {
    display: block;
}

.wp-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.75rem 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.wp-sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.wp-sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
}

/* Sidebar section label */
.wp-nav-section {
    padding: 1.25rem 1.25rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    /* Slightly brighter than 0.45 so AA contrast holds on dark teal */
    color: rgba(255, 255, 255, 0.88);   /* 4.63:1 on brand; .65 was 3.27:1 */
    white-space: nowrap;
}

.wp-sidebar.collapsed .wp-nav-section {
    padding: 1.25rem 0.5rem 0.5rem;
    text-align: center;
    font-size: 0;
}

/* decorative: a content:"" chevron, not text — exempt from 1.4.3 */
.wp-sidebar.collapsed .wp-nav-section::after {
    content: '\2022';
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
}

/* Sidebar nav items */
.wp-nav-item {
    display: flex;
    align-items: center;
    padding: 0.5625rem 1.25rem;
    color: rgba(255, 255, 255, 0.88);   /* 4.63:1 on brand; .75 was 3.82:1 */
    font-size: 0.875rem;
    font-weight: 400;
    text-decoration: none;
    transition: all var(--wp-transition);
    position: relative;
    white-space: nowrap;
    gap: 0.75rem;
    margin: 1px 0.5rem;
    border-radius: var(--wp-radius);
}

.wp-nav-item:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.wp-nav-item.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    font-weight: 500;
}

.wp-nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--wp-accent);
    border-radius: 0 3px 3px 0;
}

.wp-nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.wp-nav-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Basket count badge (Phase 0.4 of the 2026-05-20 mobile feedback plan).
   Two variants:
   - .wp-nav-badge sits on the icon when the sidebar is collapsed (only the
     icon is visible, so the badge must overlay it).
   - .wp-nav-label-badge sits at the end of the label when the sidebar is
     expanded (label has room, badge reads as a count). */
.wp-nav-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--wp-accent, #f59e0b);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--wp-sidebar-bg, #0f766e);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--wp-transition);
}

.wp-sidebar.collapsed .wp-nav-badge {
    opacity: 1;
}

.wp-nav-label-badge {
    display: inline-block;
    margin-left: 0.5rem;
    min-width: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--wp-accent, #f59e0b);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

.wp-nav-label {
    opacity: 1;
    transition: opacity var(--wp-transition);
}

.wp-sidebar.collapsed .wp-nav-label {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.wp-sidebar.collapsed .wp-nav-item {
    justify-content: center;
    padding: 0.625rem;
    margin: 1px 0.375rem;
}

/* Sidebar footer controls (theme toggle + collapse) */
.wp-sidebar-footer-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
    padding: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.wp-sidebar.collapsed .wp-sidebar-footer-controls {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem 0.25rem;
}

.wp-sidebar-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.88)   /* 4.63:1 on brand */;
    border-radius: var(--wp-radius);
    cursor: pointer;
    transition: background var(--wp-duration-fast) var(--wp-ease-in-out),
                color var(--wp-duration-fast) var(--wp-ease-in-out),
                transform var(--wp-duration-fast) var(--wp-ease-spring);
    padding: 0;
}

.wp-sidebar-icon-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.wp-sidebar-icon-btn:active {
    transform: scale(0.92);
}

.wp-sidebar-icon-btn svg {
    width: 18px;
    height: 18px;
}

.wp-sidebar-icon-btn:last-child svg {
    transition: transform var(--wp-duration-slow) var(--wp-ease-in-out);
}

.wp-sidebar.collapsed .wp-sidebar-icon-btn:last-child svg {
    transform: rotate(180deg);
}

/* Theme icon swap — show sun in light mode, moon in dark mode */
.wp-theme-icon-light { display: block; }
.wp-theme-icon-dark { display: none; }
[data-theme="dark"] .wp-theme-icon-light { display: none; }
[data-theme="dark"] .wp-theme-icon-dark { display: block; }

/* Sidebar sign-out link (extracted from inline style) */
.wp-sidebar-signout {
    color: rgba(255, 255, 255, 0.88);   /* 4.63:1 on brand; .55 was 2.77:1 */
    text-decoration: none;
    font-size: 0.75rem;
    transition: color var(--wp-duration-fast) var(--wp-ease-in-out);
}

.wp-sidebar-signout:hover {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
}

/* Sidebar user area */
.wp-sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.wp-sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--wp-radius-full);
    /* Darken rather than lighten: a white veil raised the backdrop toward the
       white initials (3.71:1). */
    background: rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    flex-shrink: 0;
}

.wp-sidebar-user-info {
    overflow: hidden;
    white-space: nowrap;
}

.wp-sidebar-user-name {
    font-size: 0.875rem;
    font-weight: 500;
}

.wp-sidebar-user-role {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.88)   /* 4.63:1 on brand */;
}

.wp-sidebar.collapsed .wp-sidebar-user-info {
    display: none;
}

/* --- Mobile sidebar --- */
.wp-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1035;
}

.wp-sidebar-overlay.show {
    display: block;
}

.wp-mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--wp-bg-card);
    border-bottom: 1px solid var(--wp-border);
    z-index: 1030;
    align-items: center;
    padding: 0 1rem;
    gap: 0.75rem;
}

.wp-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    color: var(--wp-text);
    cursor: pointer;
    border-radius: var(--wp-radius);
    padding: 0;
}

.wp-mobile-toggle:hover {
    background: var(--wp-bg-section-alt);
}

.wp-mobile-toggle svg {
    width: 24px;
    height: 24px;
}

.wp-mobile-brand img {
    height: 28px;
    width: auto;
    /* White-label logos can be arbitrarily wide — cap so the basket icon
       (margin-left:auto in #wp-mobile-basket-host) never gets pushed
       off the right edge on narrow phones. */
    max-width: 45vw;
    object-fit: contain;
}

/* --- Main content area --- */
.wp-content {
    flex: 1;
    /* Flex items default to min-width: auto, which prevents shrinking below
       child min-content. Without this, a single wide descendant (e.g. an
       `overflow-auto` carousel of fixed-width cards) inflates .wp-content
       past the viewport on mobile, breaking responsiveness app-wide. */
    min-width: 0;
    margin-left: var(--wp-sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--wp-transition-slow);
}

.wp-sidebar.collapsed ~ .wp-content,
.wp-app.sidebar-collapsed .wp-content {
    margin-left: var(--wp-sidebar-collapsed);
}

.wp-content-body {
    flex: 1;
    padding: 1.5rem;
    width: 100%;
    max-width: var(--wp-content-max-width);
    margin: 0 auto;
}

/* --- Page header --- */
.wp-page-header {
    margin-bottom: 1.5rem;
}

.wp-page-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.wp-page-subtitle {
    font-size: 0.875rem;
    color: var(--wp-text-secondary);
}

/* --- Responsive --- */
@media (max-width: 991.98px) {
    .wp-sidebar {
        transform: translateX(-100%);
        width: var(--wp-sidebar-width) !important;
    }

    .wp-sidebar.mobile-open {
        transform: translateX(0);
    }

    .wp-mobile-header {
        display: flex;
    }

    .wp-content {
        margin-left: 0 !important;
        padding-top: 56px;
    }

    .wp-content-body {
        padding: 1rem;
    }
}

@media (min-width: 992px) {
    .wp-sidebar-overlay {
        display: none !important;
    }
}


/* ===========================================
   4. CARDS
   =========================================== */

.wp-card {
    background: var(--wp-bg-card);
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius-md);
    box-shadow: var(--wp-shadow-sm);
    margin-bottom: 1.5rem;
    transition: box-shadow var(--wp-transition);
}

.wp-card:hover {
    box-shadow: var(--wp-shadow);
}

.wp-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--wp-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.wp-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.wp-card-body {
    padding: 1.5rem;
}

.wp-card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--wp-border);
    background: var(--wp-bg-section-alt);
    border-radius: 0 0 var(--wp-radius-md) var(--wp-radius-md);
}

/* Bootstrap .card overrides to match design system */
.card {
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius-md);
    box-shadow: var(--wp-shadow-sm);
    background: var(--wp-bg-card);
    margin-bottom: 1rem;
}

/* Cards inside row/col grids handle their own spacing via gutters,
   so suppress the default bottom-margin to avoid double-spacing. */
.row > [class*="col-"] > .card:only-child,
.row > [class*="col-"] > .card:last-child {
    margin-bottom: 0;
}

.card-header {
    background: var(--wp-bg-card);
    border-bottom: 1px solid var(--wp-border);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-weight: 600;
    color: var(--wp-text);
}

.card-footer {
    background: var(--wp-bg-section-alt);
    border-top: 1px solid var(--wp-border);
}

/* KPI stat cards */
.wp-stat-card {
    text-align: center;
    padding: 1.5rem;
}

.wp-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--wp-text);
    line-height: 1.2;
}

.wp-stat-label {
    font-size: 0.8125rem;
    color: var(--wp-text-secondary);
    margin-top: 0.25rem;
}

.wp-stat-trend {
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.wp-stat-trend.up { color: var(--wp-success); }
.wp-stat-trend.down { color: var(--wp-danger); }


/* ===========================================
   5. BUTTONS
   =========================================== */

.btn {
    font-family: var(--wp-font);
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: var(--wp-radius);
    transition: all var(--wp-transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.5;
    border: 1px solid transparent;
}

.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--wp-primary-ring);
}

.btn-primary {
    background-color: var(--wp-primary) !important;
    border-color: var(--wp-primary) !important;
    color: var(--wp-text-on-primary) !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--wp-primary-hover) !important;
    border-color: var(--wp-primary-hover) !important;
    color: var(--wp-text-on-primary) !important;
}

.btn-accent {
    background-color: var(--wp-accent);
    border-color: var(--wp-accent);
    color: var(--wp-text-on-accent);
}

.btn-accent:hover {
    background-color: var(--wp-accent-hover);
    border-color: var(--wp-accent-hover);
    color: var(--wp-text-on-accent);
}

/* Inline SVG icon helper (see _icons.html). Sits cleanly on the text
   baseline in headings/inline runs and centers naturally inside .btn
   (which is already display:inline-flex). Uses currentColor so it tints
   to whatever the parent's text color resolves to. */
.wp-icon {
    display: inline-block;
    vertical-align: -0.15em;
    flex-shrink: 0;
}

.btn-outline-primary {
    border-color: var(--wp-primary);
    color: var(--wp-primary-text);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--wp-primary);
    color: var(--wp-text-on-primary);
}

.btn-outline-accent {
    border-color: var(--wp-accent);
    color: var(--wp-accent);
    background: transparent;
}

.btn-outline-accent:hover {
    background: var(--wp-accent);
    color: var(--wp-text-on-accent);
}

.btn-outline-success {
    border-color: var(--wp-success);
    color: var(--wp-success);
    background: transparent;
}

.btn-outline-success:hover {
    background: var(--wp-success);
    border-color: var(--wp-success);
    color: #fff;
}

.btn-outline-danger {
    border-color: var(--wp-danger);
    color: var(--wp-danger);
    background: transparent;
}

.btn-outline-danger:hover {
    background: var(--wp-danger);
    border-color: var(--wp-danger);
    color: #fff;
}

.btn-outline-warning {
    border-color: var(--wp-warning);
    color: var(--wp-warning);
    background: transparent;
}

.btn-outline-warning:hover {
    background: var(--wp-warning);
    border-color: var(--wp-warning);
    color: #fff;
}

.btn-outline-info {
    border-color: var(--wp-info);
    color: var(--wp-info);
    background: transparent;
}

.btn-outline-info:hover {
    background: var(--wp-info);
    border-color: var(--wp-info);
    color: #fff;
}

.btn-outline-secondary {
    border-color: var(--wp-border);
    color: var(--wp-text-secondary);
    background: transparent;
}

.btn-outline-secondary:hover {
    background: var(--wp-bg-section-alt);
    border-color: var(--wp-border);
    color: var(--wp-text);
}

.btn-outline-dark {
    border-color: var(--wp-text);
    color: var(--wp-text);
    background: transparent;
}

.btn-outline-dark:hover {
    background: var(--wp-text);
    border-color: var(--wp-text);
    color: #fff;
}

.btn-outline-light {
    border-color: var(--wp-border);
    color: var(--wp-text);
    background: var(--wp-bg-section-alt);
}

.btn-outline-light:hover {
    background: var(--wp-border);
    border-color: var(--wp-border);
    color: var(--wp-text);
}

.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--wp-text-secondary);
}

.btn-ghost:hover {
    background: var(--wp-bg-section-alt);
    color: var(--wp-text);
}

/* Sprint C 2026-05-26: semantic-button text colour swept to #000 to clear
   WCAG AA 4.5:1 on our saturated token backgrounds.
     success #16a34a + #fff = 2.98:1  -> + #000 = 7.04:1
     warning #d97706 + #fff = 3.21:1  -> + #000 = 12.62:1  (the N19 trigger)
     danger  #dc2626 + #fff = 4.32:1  -> + #000 = 4.86:1
     info    #0891b2 + #fff = 3.44:1  -> + #000 = 6.10:1
   Bootstrap 5.3 itself uses black text on btn-warning + btn-info for the
   same reason — extending the convention to success + danger here keeps
   the visual language consistent. */
.btn-success {
    background-color: var(--wp-success) !important;
    border-color: var(--wp-success) !important;
    color: #000 !important;
}

.btn-success:hover {
    background-color: #047857 !important;
    border-color: #047857 !important;
}

.btn-danger {
    background-color: var(--wp-danger) !important;
    border-color: var(--wp-danger) !important;
    color: #000 !important;
}

.btn-danger:hover {
    background-color: #b91c1c !important;
    border-color: #b91c1c !important;
}

.btn-warning {
    background-color: var(--wp-warning) !important;
    border-color: var(--wp-warning) !important;
    color: #000 !important;
}

.btn-info {
    background-color: var(--wp-info) !important;
    border-color: var(--wp-info) !important;
    color: #000 !important;
}

.btn-secondary {
    background-color: var(--wp-bg-section-alt) !important;
    border-color: var(--wp-border) !important;
    color: var(--wp-text) !important;
}

.btn-secondary:hover {
    background-color: var(--wp-border) !important;
}

.btn-lg {
    padding: 0.625rem 1.5rem;
    font-size: 1rem;
    border-radius: var(--wp-radius-md);
}

.btn-sm {
    padding: 0.3125rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-icon {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    justify-content: center;
}


/* ===========================================
   6. FORMS
   =========================================== */

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--wp-text);
    margin-bottom: 0.375rem;
    display: block;
}

.form-control {
    font-family: var(--wp-font);
    font-size: 0.875rem;
    padding: 0.5625rem 0.875rem;
    border: 1px solid var(--wp-border-medium);
    border-radius: var(--wp-radius);
    background: var(--wp-bg-input);
    color: var(--wp-text);
    transition: border-color var(--wp-transition), box-shadow var(--wp-transition);
    line-height: 1.5;
}

.form-control:focus {
    border-color: var(--wp-primary) !important;
    box-shadow: 0 0 0 3px var(--wp-primary-ring) !important;
    outline: none;
}

.form-control::placeholder {
    color: var(--wp-text-muted);
}

.form-control.is-invalid {
    border-color: var(--wp-danger);
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.25) !important;
}

.form-select {
    font-family: var(--wp-font);
    font-size: 0.875rem;
    padding: 0.5625rem 2.25rem 0.5625rem 0.875rem;
    border: 1px solid var(--wp-border-medium);
    border-radius: var(--wp-radius);
    background-color: var(--wp-bg-input);
    color: var(--wp-text);
    transition: border-color var(--wp-transition), box-shadow var(--wp-transition);
}

.form-select:focus {
    border-color: var(--wp-primary);
    box-shadow: 0 0 0 3px var(--wp-primary-ring);
    outline: none;
}

/* Bootstrap bakes the select chevron into a dark-stroke SVG; swap in a
   light-stroke copy so it stays visible on the dark input surface. */
[data-theme="dark"] .form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23B4C9C5' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

/* Input-group affixes (e.g. the £ prefix on voucher amounts) — match the
   .form-control surface/border tokens instead of Bootstrap's hardcoded
   light-gray, which rendered as a white island next to dark inputs. */
.input-group-text {
    font-family: var(--wp-font);
    font-size: 0.875rem;
    color: var(--wp-text-secondary);
    background-color: var(--wp-bg-section-alt);
    border: 1px solid var(--wp-border-medium);
}

/* iOS Safari zooms the whole page when a focused control's font-size is
   under 16px, then leaves it cropped/"squashed" after the keyboard
   closes. Keep the compact 14px look on desktop; go 16px on touch
   viewports (also overrides the -sm variants — legibility wins). */
@media (max-width: 767.98px) {
    .form-control,
    .form-select {
        font-size: 1rem;
    }
}

.form-check-input:checked {
    background-color: var(--wp-primary);
    border-color: var(--wp-primary);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px var(--wp-primary-ring);
    border-color: var(--wp-primary);
}

.form-switch .form-check-input:checked {
    background-color: var(--wp-primary);
    border-color: var(--wp-primary);
}

textarea.form-control {
    min-height: 100px;
}

.invalid-feedback {
    color: var(--wp-danger);
    font-size: 0.8125rem;
    margin-top: 0.25rem;
}

.form-text {
    color: var(--wp-text-muted);
    font-size: 0.8125rem;
    margin-top: 0.25rem;
}

/* BS4 compat: form-group still works in BS5 (just not in the docs) */
.form-group {
    margin-bottom: 1rem;
}

/* -------------------------------------------------------------
   .wp-form — single-source form normalisation
   -------------------------------------------------------------
   Apply this class to any <form> (or wrapping element) to get
   consistent field widths, labels, spacing and focus rings —
   regardless of whether the form is hand-rolled or rendered by
   flask-bootstrap's quick_form() (which still emits BS3-era
   markup with col-sm-2 / col-sm-10 horizontal grids and inputs
   that don't carry .form-control).

   The wizard's .wizard-form extends this with extras like its
   sticky context card and progress bar — those live in
   wizard_base.html.
*/

.wp-form .form-group {
    margin-bottom: 1.1rem;
    display: block;
}

/* Labels: stack above the field, consistent weight/size */
.wp-form label,
.wp-form .control-label {
    display: block;
    font-family: var(--wp-font);
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--wp-text);
    margin-bottom: 0.375rem;
    text-align: left;
}

/* Override flask-bootstrap's BS3 horizontal column layout —
   force every column inside a form-group to take full width so
   labels stack above fields instead of sitting beside them. */
.wp-form .form-group > [class*="col-sm-"],
.wp-form .form-group > [class*="col-md-"],
.wp-form .form-group > [class*="col-lg-"] {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
}

/* Normalise every text-like input, select and textarea —
   targets by element type so it catches raw inputs from
   quick_form() that don't carry .form-control. */
.wp-form input[type="text"],
.wp-form input[type="email"],
.wp-form input[type="password"],
.wp-form input[type="number"],
.wp-form input[type="tel"],
.wp-form input[type="url"],
.wp-form input[type="search"],
.wp-form input[type="date"],
.wp-form input[type="datetime-local"],
.wp-form input[type="time"],
.wp-form input[type="month"],
.wp-form input[type="week"],
.wp-form input[type="file"],
.wp-form select,
.wp-form textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    font-family: var(--wp-font);
    font-size: 0.875rem;
    line-height: 1.5;
    padding: 0.5625rem 0.875rem;
    color: var(--wp-text);
    background-color: var(--wp-bg-input);
    border: 1px solid var(--wp-border-medium);
    border-radius: var(--wp-radius);
    transition: border-color var(--wp-transition), box-shadow var(--wp-transition);
}

.wp-form input:focus,
.wp-form select:focus,
.wp-form textarea:focus {
    outline: none;
    border-color: var(--wp-primary);
    box-shadow: 0 0 0 3px var(--wp-primary-ring);
}

.wp-form textarea {
    min-height: 100px;
}

/* Checkboxes and radios stay inline-sized. Not Bootstrap's
   .form-check-input: it is drawn by CSS at a fixed 1em, and width:auto
   (which outranks it here) collapsed every tick box and switch inside a
   .wp-form to a 2px bar until 2026-10. */
.wp-form input[type="checkbox"]:not(.form-check-input),
.wp-form input[type="radio"]:not(.form-check-input) {
    width: auto;
    display: inline-block;
    margin-right: 0.5rem;
}

/* Submit buttons inside .wp-form get consistent breathing room
   and primary styling, but only when no explicit .btn class is
   present (so explicit .btn-* choices still win). */
.wp-form input[type="submit"]:not(.btn),
.wp-form button[type="submit"]:not(.btn) {
    display: inline-block;
    margin-top: 1.25rem;
    padding: 0.6rem 1.5rem;
    font-family: var(--wp-font);
    font-size: 0.9375rem;
    font-weight: 500;
    color: #fff;
    background-color: var(--wp-primary);
    border: 1px solid var(--wp-primary);
    border-radius: var(--wp-radius);
    cursor: pointer;
    transition: background-color var(--wp-transition), border-color var(--wp-transition);
}

.wp-form input[type="submit"]:not(.btn):hover,
.wp-form button[type="submit"]:not(.btn):hover {
    background-color: var(--wp-primary-hover);
    border-color: var(--wp-primary-hover);
}

/* Help text under fields */
.wp-form .help-block,
.wp-form .form-text {
    font-size: 0.8125rem;
    color: var(--wp-text-muted);
    margin-top: 0.25rem;
}

/* Field-level validation errors from flask-bootstrap */
.wp-form .has-error label,
.wp-form .has-error .control-label {
    color: var(--wp-danger);
}
.wp-form .has-error input,
.wp-form .has-error select,
.wp-form .has-error textarea {
    border-color: var(--wp-danger);
}
.wp-form .has-error .help-block {
    color: var(--wp-danger);
}


/* ===========================================
   7. TABLES
   =========================================== */

.table {
    /* Transparent cells so tables sit on their container's surface
       (white card in light, near-black card in dark). Bootstrap's
       default --bs-table-bg paints every cell with the body bg, which
       rendered white row-stripes inside dark-mode cards (basket). */
    --bs-table-bg: transparent;
    font-size: 0.875rem;
    color: var(--wp-text);
    border-color: var(--wp-border);
}

.table > thead > tr > th {
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--wp-text-secondary);
    background: var(--wp-bg-section-alt);
    border-bottom: 2px solid var(--wp-border);
    padding: 0.75rem 1rem;
    white-space: nowrap;
}

.table > tbody > tr > td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--wp-border);
    vertical-align: middle;
}

.table > tbody > tr:last-child > td {
    border-bottom: none;
}

.table-hover > tbody > tr:hover {
    background-color: var(--wp-primary-ghost) !important;
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Sticky header */
.table-sticky-header thead {
    position: sticky;
    top: 0;
    z-index: 10;
}


/* ===========================================
   8. ALERTS & BADGES
   =========================================== */

.alert {
    border-radius: var(--wp-radius);
    border: none;
    border-left: 4px solid;
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-dismissible {
    padding-right: 3rem;
}

.alert-dismissible .btn-close {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    padding: 0;
    margin: 0;
}

/* Replace Bootstrap's tiny grey X with a real, branded close button */
.btn-close {
    box-sizing: content-box;
    width: 18px;
    height: 18px;
    padding: 0.375rem;
    border: 0;
    border-radius: var(--wp-radius-sm);
    background: transparent
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%231C2D2B' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E")
        center/18px 18px no-repeat;
    opacity: 0.55;
    cursor: pointer;
    transition: opacity var(--wp-duration-fast) var(--wp-ease-in-out),
                background-color var(--wp-duration-fast) var(--wp-ease-in-out);
    color: transparent;
    line-height: 0;
}

.btn-close:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.06);
}

.btn-close:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--wp-primary-ring);
    opacity: 1;
}

[data-theme="dark"] .btn-close {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23F1F5F4' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E");
}

[data-theme="dark"] .btn-close:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.alert-success {
    background: var(--wp-success-light);
    border-left-color: var(--wp-success);
    color: var(--wp-success-text);
}

.alert-warning {
    background: var(--wp-warning-light);
    border-left-color: var(--wp-warning);
    color: var(--wp-warning-text);
}

.alert-danger {
    background: var(--wp-danger-light);
    border-left-color: var(--wp-danger);
    color: var(--wp-danger-text);
}

.alert-info {
    background: var(--wp-info-light);
    border-left-color: var(--wp-info);
    color: var(--wp-info-text);
}

/* Neutral alert on the theme's section surface — Bootstrap's .alert-light
   is a hardcoded near-white panel that glares inside dark-mode modals
   (bank-transfer explainer). */
.alert-light {
    background-color: var(--wp-bg-section-alt);
    color: var(--wp-text-secondary);
    border-left-color: var(--wp-border-medium);
}

.badge {
    font-family: var(--wp-font);
    font-weight: 500;
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
    border-radius: var(--wp-radius-full);
}

.badge.bg-primary, .badge-primary {
    background-color: var(--wp-primary) !important;
    color: #fff;
}

.badge.bg-success, .badge-success {
    background-color: var(--wp-success) !important;
    color: #fff;
}

.badge.bg-danger, .badge-danger {
    background-color: var(--wp-danger) !important;
    color: #fff;
}

.badge.bg-warning, .badge-warning {
    background-color: var(--wp-warning) !important;
    color: #fff;
}

.badge.bg-info, .badge-info {
    background-color: var(--wp-info) !important;
    color: #fff;
}

.badge.bg-accent {
    background-color: var(--wp-accent) !important;
    color: #fff;
}

/* Soft/light badge variants */
.badge-soft-primary {
    background-color: var(--wp-primary-lighter);
    color: var(--wp-primary-text);
}

.badge-soft-success {
    background-color: var(--wp-success-light);
    color: var(--wp-success);
}

.badge-soft-danger {
    background-color: var(--wp-danger-light);
    color: var(--wp-danger);
}

.badge-soft-warning {
    background-color: var(--wp-warning-light);
    color: var(--wp-warning);
}

.badge-soft-info {
    background-color: var(--wp-info-light);
    color: var(--wp-info);
}


/* ===========================================
   9. MODALS — 2026 overlay pattern
   ===========================================
   Force-reset Bootstrap behaviour so nothing in the design system can
   accidentally override `.modal { display: none }`. Adds backdrop blur,
   scroll lock, and a spring entry animation. */

.modal {
    display: none;
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1055;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
}

.modal.show {
    display: block;
}

/* Bootstrap adds .modal-open to <body> when a modal is shown. Lock the
   background so the viewer can only scroll inside the modal. */
body.modal-open {
    overflow: hidden !important;
    padding-right: 0 !important; /* suppress Bootstrap's scrollbar-compensation shift */
}

/* 2026 backdrop: frosted glass with a dark tint. Replaces Bootstrap's
   flat black .modal-backdrop. */
.modal-backdrop {
    --bs-backdrop-bg: rgba(11, 20, 19, 0.55);
    backdrop-filter: blur(6px) saturate(120%);
    -webkit-backdrop-filter: blur(6px) saturate(120%);
}
.modal-backdrop.show {
    opacity: 1;
}

.modal-dialog {
    margin: 1.75rem auto;
    max-width: 500px;
    pointer-events: none;
}

.modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 3.5rem);
}

.modal-content {
    pointer-events: auto;
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    background: var(--wp-bg-card);
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius-lg);
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.35), 0 10px 25px -5px rgba(0, 0, 0, 0.2);
    /* Spring entry — lifts up as the backdrop fades in */
    animation: wp-modal-enter var(--wp-duration-base, 240ms) var(--wp-ease-spring, cubic-bezier(0.34, 1.56, 0.64, 1)) both;
}

@keyframes wp-modal-enter {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .modal-content { animation: none; }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--wp-border);
    padding: 1.25rem 1.5rem;
    flex-shrink: 0;
}

.modal-title {
    font-family: var(--wp-font-display, inherit);
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
    color: var(--wp-text);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1 1 auto;
    color: var(--wp-text);
}

.modal-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    border-top: 1px solid var(--wp-border);
    padding: 1rem 1.5rem;
    flex-shrink: 0;
    background: var(--wp-bg-card);
    border-radius: 0 0 var(--wp-radius-lg) var(--wp-radius-lg);
}


/* ===========================================
   10. PAGINATION
   =========================================== */

/* Strip default <ul> bullet/padding so DataTables and custom pagination
   render as a clean Bootstrap-style row instead of a bulleted list. */
.pagination,
.dataTables_paginate .pagination,
ul.pagination {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0.25rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.pagination .page-item {
    list-style: none;
}

.page-link {
    color: var(--wp-text);
    border-color: var(--wp-border);
    font-size: 0.875rem;
}

.page-link:hover {
    color: var(--wp-primary-text);
    background-color: var(--wp-primary-ghost);
    border-color: var(--wp-border);
}

.page-item.active .page-link {
    background-color: var(--wp-primary);
    border-color: var(--wp-primary);
    color: #fff;
}

.page-item.disabled .page-link {
    color: var(--wp-text-muted);
}


/* ===========================================
   11. TABS & NAVS
   =========================================== */

.nav-tabs .nav-link {
    color: var(--wp-text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.75rem 1rem;
    transition: all var(--wp-transition);
}

.nav-tabs .nav-link:hover {
    color: var(--wp-primary-text);
    border-bottom-color: var(--wp-border);
}

.nav-tabs .nav-link.active {
    color: var(--wp-primary-text);
    border-bottom-color: var(--wp-primary);
    background: transparent;
}

.nav-pills .nav-link {
    color: var(--wp-text-secondary);
    font-weight: 500;
    border-radius: var(--wp-radius);
}

.nav-pills .nav-link.active {
    background-color: var(--wp-primary);
    color: #fff;
}


/* ===========================================
   12. DROPDOWNS
   =========================================== */

.dropdown-menu {
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius-md);
    box-shadow: var(--wp-shadow-lg);
    padding: 0.375rem;
    font-size: 0.875rem;
}

.dropdown-item {
    border-radius: var(--wp-radius-sm);
    padding: 0.5rem 0.75rem;
    color: var(--wp-text);
    transition: background var(--wp-transition);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--wp-primary-ghost);
    color: var(--wp-text);
}

.dropdown-item.active,
.dropdown-item:active {
    background: var(--wp-primary);
    color: #fff;
}

.dropdown-divider {
    border-color: var(--wp-border);
    margin: 0.25rem 0;
}


/* ===========================================
   13. PROGRESS & SPINNERS
   =========================================== */

.progress {
    background: var(--wp-bg-section-alt);
    border-radius: var(--wp-radius-full);
    height: 0.5rem;
}

.progress-bar {
    background-color: var(--wp-primary);
    border-radius: var(--wp-radius-full);
}

.spinner-border {
    color: var(--wp-primary-text);
}


/* ===========================================
   14. TOOLTIPS
   =========================================== */

.tooltip .tooltip-inner {
    background: var(--wp-text);
    font-size: 0.8125rem;
    border-radius: var(--wp-radius-sm);
    padding: 0.375rem 0.625rem;
}

/* Sidebar tooltips (collapsed mode) */
.wp-sidebar.collapsed .wp-nav-item {
    position: relative;
}

.wp-sidebar.collapsed .wp-nav-item::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--wp-text);
    color: #fff;
    padding: 0.375rem 0.625rem;
    border-radius: var(--wp-radius-sm);
    font-size: 0.8125rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--wp-transition);
    z-index: 1050;
}

.wp-sidebar.collapsed .wp-nav-item:hover::after {
    opacity: 1;
}


/* ===========================================
   15. USER AVATAR / SYMBOL
   =========================================== */

.wp-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--wp-radius-full);
    background: var(--wp-primary-lighter);
    color: var(--wp-primary-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
    overflow: hidden;
}

.wp-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wp-avatar-sm { width: 32px; height: 32px; font-size: 0.75rem; }
.wp-avatar-lg { width: 56px; height: 56px; font-size: 1.125rem; }
.wp-avatar-xl { width: 80px; height: 80px; font-size: 1.5rem; }

/* Profile photo upload dropzone */
.wp-pp-dropzone {
    border: 2px dashed #e2e8f0;
    background: #f8fafc;
    transition: border-color .15s ease, background-color .15s ease;
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.wp-pp-dropzone--drag {
    border-color: var(--wp-primary, #0f766e);
    background: var(--wp-primary-lighter, #ccfbf1);
}
.wp-pp-dropzone__icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fff;
    /* on-light: surface is hardcoded #fff in both themes, so the RAW brand is
       correct here — --wp-primary-text would be pale teal on white. */
    color: var(--wp-primary, #0f766e);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .08);
}
.wp-pp-preview {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .12);
}

/* Edit modal — tame wtf.quick_form output so submit buttons don't render as
   full-width chunky page-level CTAs inside a modal, and add visual separation. */
#wpEditModal .modal-body form .form-label {
    font-weight: 500;
    font-size: 0.875rem;
    color: #475569;
    margin-bottom: 0.25rem;
}
#wpEditModal .modal-body form .mb-3 {
    margin-bottom: 1rem !important;
}
#wpEditModal .modal-body form > div:last-child {
    margin-top: 1.5rem !important;
    margin-bottom: 0 !important;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    text-align: right;
}
#wpEditModal .modal-body form button[type="submit"],
#wpEditModal .modal-body form input[type="submit"] {
    width: auto !important;
    font-size: 0.9375rem !important;
    padding: 0.5rem 1.5rem !important;
    font-weight: 500;
}
#wpEditModal .modal-body form .btn-block {
    display: inline-block !important;
    width: auto !important;
}

/* Backward compat: Metronic symbol classes */
.symbol {
    display: inline-flex;
}

.symbol-label {
    background-color: var(--wp-primary-lighter) !important;
    color: var(--wp-primary-text) !important;
    border-radius: var(--wp-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}


/* ===========================================
   16. DATATABLES THEME
   =========================================== */

/* Table wrapper */
.dataTables_wrapper {
    font-family: var(--wp-font);
    font-size: 0.875rem;
}

/* Header row */
table.dataTable thead th,
table.dataTable thead td {
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--wp-text-secondary);
    background: var(--wp-bg-section-alt);
    border-bottom: 2px solid var(--wp-border) !important;
    padding: 0.75rem 1rem;
}

/* Body cells */
table.dataTable tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--wp-border);
    vertical-align: middle;
}

/* Hover */
table.dataTable tbody tr:hover {
    background-color: var(--wp-primary-ghost) !important;
}

/* Selected rows */
table.dataTable tbody tr.selected,
table.dataTable tbody tr.selected > * {
    background-color: var(--wp-primary-ghost) !important;
    color: var(--wp-text) !important;
}

/* Sort icons */
table.dataTable thead .sorting::before,
table.dataTable thead .sorting_asc::before,
table.dataTable thead .sorting_desc::before,
table.dataTable thead .sorting::after,
table.dataTable thead .sorting_asc::after,
table.dataTable thead .sorting_desc::after {
    color: var(--wp-primary-text) !important;
}

/* Pagination */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: var(--wp-radius) !important;
    border: 1px solid var(--wp-border) !important;
    color: var(--wp-text) !important;
    padding: 0.375rem 0.75rem !important;
    margin: 0 2px !important;
    font-size: 0.8125rem !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--wp-primary) !important;
    border-color: var(--wp-primary) !important;
    color: #fff !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--wp-primary-ghost) !important;
    border-color: var(--wp-primary) !important;
    color: var(--wp-primary-text) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    color: var(--wp-text-muted) !important;
}

/* Search/filter input */
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--wp-border-medium);
    border-radius: var(--wp-radius);
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--wp-primary);
    box-shadow: 0 0 0 3px var(--wp-primary-ring);
    outline: none;
}

/* Length selector */
.dataTables_wrapper .dataTables_length select {
    border: 1px solid var(--wp-border-medium);
    border-radius: var(--wp-radius);
    padding: 0.375rem 0.5rem;
    font-size: 0.875rem;
}

/* Info text */
.dataTables_wrapper .dataTables_info {
    color: var(--wp-text-secondary);
    font-size: 0.8125rem;
}

/* Export buttons */
.dt-buttons .dt-button {
    background: var(--wp-bg-section-alt) !important;
    border: 1px solid var(--wp-border) !important;
    border-radius: var(--wp-radius) !important;
    color: var(--wp-text) !important;
    font-size: 0.8125rem !important;
    padding: 0.375rem 0.75rem !important;
}

.dt-buttons .dt-button:hover {
    background: var(--wp-primary-ghost) !important;
    border-color: var(--wp-primary) !important;
    color: var(--wp-primary-text) !important;
}


/* ===========================================
   17. FULLCALENDAR THEME
   =========================================== */

.fc .fc-button,
.fc .fc-button-primary {
    background-color: var(--wp-primary) !important;
    border-color: var(--wp-primary) !important;
    color: #fff !important;
    font-family: var(--wp-font);
    font-size: 0.875rem;
    border-radius: var(--wp-radius);
}

.fc .fc-button:hover,
.fc .fc-button-primary:hover {
    background-color: var(--wp-primary-hover) !important;
    border-color: var(--wp-primary-hover) !important;
}

.fc .fc-button-active,
.fc .fc-button:active,
.fc .fc-button-primary:not(:disabled):active,
.fc .fc-button-primary:not(:disabled).fc-button-active {
    background-color: var(--wp-primary-hover) !important;
    border-color: var(--wp-primary-hover) !important;
}

.fc-event, .fc-event-primary {
    background-color: var(--wp-primary) !important;
    border-color: var(--wp-primary) !important;
    color: #fff !important;
    border-radius: var(--wp-radius-sm);
}

.fc .fc-day-today {
    background-color: var(--wp-primary-ghost) !important;
}

.fc a { color: var(--wp-text); }
.fc a:hover { color: var(--wp-primary-text); }

.fc-event-success { background-color: var(--wp-success) !important; border-color: var(--wp-success) !important; }
.fc-event-warning { background-color: var(--wp-warning) !important; border-color: var(--wp-warning) !important; }
.fc-event-danger { background-color: var(--wp-danger) !important; border-color: var(--wp-danger) !important; }
.fc-event-info { background-color: var(--wp-info) !important; border-color: var(--wp-info) !important; }


/* ===========================================
   18. LEAFLET MAP OVERRIDES
   =========================================== */

.leaflet-container {
    border-radius: var(--wp-radius-md);
    border: 1px solid var(--wp-border);
}

.leaflet-popup-content-wrapper {
    border-radius: var(--wp-radius);
    box-shadow: var(--wp-shadow-md);
}


/* ===========================================
   19. FOOTER
   =========================================== */

.wp-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--wp-border);
    background: var(--wp-bg-card);
    color: var(--wp-text-muted);
    font-size: 0.8125rem;
    margin-top: auto;
}

.wp-footer a {
    color: var(--wp-text-secondary);
}

.wp-footer a:hover {
    color: var(--wp-primary-text);
}


/* ===========================================
   20. UTILITY CLASSES
   =========================================== */

.bg-primary { background-color: var(--wp-primary) !important; }
.bg-accent { background-color: var(--wp-accent) !important; }
.bg-success { background-color: var(--wp-success) !important; }
.bg-warning { background-color: var(--wp-warning) !important; }
.bg-danger { background-color: var(--wp-danger) !important; }
.bg-info { background-color: var(--wp-info) !important; }

.text-primary { color: var(--wp-primary-text) !important; }
.text-accent { color: var(--wp-accent) !important; }
.text-success { color: var(--wp-success) !important; }
.text-warning { color: var(--wp-warning-text) !important; }
.text-danger { color: var(--wp-danger) !important; }
.text-info { color: var(--wp-info) !important; }

.border-primary { border-color: var(--wp-primary) !important; }

/* Icon sizing helpers */
.icon-sm { width: 16px; height: 16px; }
.icon-md { width: 20px; height: 20px; }
.icon-lg { width: 24px; height: 24px; }

/* Skip-to-content link (Sprint C 2026-05-26, N24). Off-screen until
   keyboard focus brings it in. z-index sits above the floating basket
   widget (100) and below modals (1050) so it never traps focus. */
.wp-skip-link {
    position: absolute;
    top: -48px;
    left: 8px;
    background: var(--wp-primary);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 0 0 0.375rem 0.375rem;
    font-weight: 600;
    text-decoration: none;
    z-index: 1100;
    transition: top 0.15s ease-out;
}
.wp-skip-link:focus,
.wp-skip-link:focus-visible {
    top: 0;
    outline: 2px solid var(--wp-accent);
    outline-offset: 2px;
    color: #fff;
}

/* Phase 4.1 (2026-05-25 mobile feedback replan): year-to-date voucher
   savings ribbon on the dashboard. Conditional render — only shows when
   the user has actually saved something this calendar year. Reuses the
   primary-lighter token for a soft hero panel; clickable to /benefits/. */
.wp-savings-ribbon {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, var(--wp-primary-lighter) 0%, var(--wp-bg-section-alt) 100%);
    border: 1px solid var(--wp-border);
    border-radius: 0.625rem;
    color: var(--wp-text);
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.wp-savings-ribbon:hover,
.wp-savings-ribbon:focus-visible {
    transform: translateY(-1px);
    border-color: var(--wp-primary);
    box-shadow: var(--wp-shadow-sm);
    color: var(--wp-text);
    text-decoration: none;
}
.wp-savings-ribbon__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: var(--wp-primary);
    color: #fff;
    flex-shrink: 0;
}
.wp-savings-ribbon__copy {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.4;
}
.wp-savings-ribbon__copy strong {
    color: var(--wp-primary-text);
}
.wp-savings-ribbon__arrow {
    color: var(--wp-primary-text);
    font-weight: 700;
    flex-shrink: 0;
}

/* Curated section tiles (2026-05-26 follow-up to Sprint B). Renders the
   /benefits/c/<slug> sections on the benefits home page. Same hover +
   transition language as the savings ribbon so they feel like part of
   one design system. */
.wp-curated-tile {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--wp-bg-card);
    border: 1px solid var(--wp-border);
    border-radius: 0.625rem;
    color: var(--wp-text);
    text-decoration: none;
    height: 100%;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.wp-curated-tile:hover,
.wp-curated-tile:focus-visible {
    transform: translateY(-2px);
    border-color: var(--wp-primary);
    box-shadow: var(--wp-shadow-md);
    color: var(--wp-text);
    text-decoration: none;
}
.wp-curated-tile__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: var(--wp-primary-lighter);
    color: var(--wp-primary-text);
    flex-shrink: 0;
}
.wp-curated-tile__body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}
.wp-curated-tile__title {
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.3;
}
.wp-curated-tile__subtitle {
    color: var(--wp-text-secondary);
    font-size: 0.875rem;
    line-height: 1.4;
    /* Cap visible lines so a long subtitle doesn't blow out the tile height. */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}
.wp-curated-tile__cta {
    margin-top: 0.25rem;
    color: var(--wp-primary-text);
    font-weight: 600;
    font-size: 0.875rem;
}


/* ===========================================
   21. PRINT STYLES
   =========================================== */

@media print {
    .wp-sidebar,
    .wp-mobile-header,
    .wp-sidebar-overlay,
    .wp-sidebar-footer-controls,
    .btn,
    .wp-footer {
        display: none !important;
    }

    .wp-content {
        margin-left: 0 !important;
        padding-top: 0 !important;
    }

    .wp-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    body {
        background: #fff;
        color: #000;
    }
}


/* ===========================================
   22. BACKWARD COMPATIBILITY SHIMS
   Bootstrap 4 → 5 class aliases
   =========================================== */

/* BS4 float classes that templates may still use */
.float-left { float: left !important; }
.float-right { float: right !important; }

/* BS4 spacing shorthands */
.ml-auto { margin-left: auto !important; }
.mr-auto { margin-right: auto !important; }

/* BS4 text alignment */
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }

/* BS4 font utilities that Metronic used */
.font-weight-bold { font-weight: 700 !important; }
.font-weight-bolder { font-weight: 700 !important; }
.font-weight-normal { font-weight: 400 !important; }
.font-size-sm { font-size: 0.8125rem !important; }
.font-size-lg { font-size: 1.125rem !important; }
.font-size-h1 { font-size: 1.875rem !important; }
.font-size-h3 { font-size: 1.25rem !important; }
.font-size-h4 { font-size: 1.125rem !important; }
.font-size-h5 { font-size: 1rem !important; }
.font-size-h6 { font-size: 0.875rem !important; }

/* Metronic-specific class shims for gradual migration */
.card-custom { /* Treated as .card via Bootstrap */ }

.gutter-b {
    margin-bottom: 1.5rem;
}

.separator {
    height: 0;
    border-top: 1px solid var(--wp-border);
}

.separator-solid {
    border-top-style: solid;
}

/* Navi component (used in user profile sidebar) */
.navi .navi-item .navi-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    border-radius: var(--wp-radius);
    color: var(--wp-text-secondary);
    font-size: 0.875rem;
    text-decoration: none;
    transition: all var(--wp-transition);
}

.navi .navi-item .navi-link:hover {
    background: var(--wp-primary-ghost);
    color: var(--wp-primary-text);
}

.navi .navi-item .navi-link.active {
    background: var(--wp-primary-ghost);
    color: var(--wp-primary-text);
    font-weight: 500;
}

.navi-icon {
    width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.navi-text {
    flex: 1;
}

.svg-icon {
    display: inline-flex;
    align-items: center;
}

.svg-icon svg {
    width: 20px;
    height: 20px;
}

/* Metronic .content class (used in many templates) */
.content {
    background: transparent;
}

/* KT-prefixed container widths (legacy) */
.container {
    max-width: 1280px;
}


/* ===========================================
   23. LOGIN / AUTH STYLES
   =========================================== */

.wp-auth-layout {
    display: flex;
    min-height: 100vh;
}

.wp-auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 45%;
    background: var(--wp-primary);
    color: var(--wp-text-on-primary);
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.wp-auth-brand::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: repeat;
    pointer-events: none;
}

.wp-auth-brand > * {
    position: relative;
    z-index: 1;
}

.wp-auth-brand-logo {
    width: 240px;
    max-width: 100%;
    height: auto;
    margin-bottom: 2rem;
}

.wp-auth-brand h1 {
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.75rem;
}

.wp-auth-brand p {
    color: rgba(255, 255, 255, 0.75);
    text-align: center;
    font-size: 1.125rem;
    max-width: 360px;
}

.wp-auth-form {
    display: grid;
    grid-template-rows: 1fr auto;
    flex: 1;
    padding: 3rem;
    background: var(--wp-bg-card);
    min-height: 100vh;
}

.wp-auth-form-inner {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    align-self: center;
    justify-self: center;
}

.wp-auth-form h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.wp-auth-form .form-control {
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    border-radius: var(--wp-radius-md);
}

.wp-auth-form .btn-primary {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: var(--wp-radius-md);
    height: 48px;
}

.wp-auth-footer {
    margin-top: auto;
    padding-top: 2rem;
    font-size: 0.8125rem;
    color: var(--wp-text-muted);
}

@media (max-width: 991.98px) {
    .wp-auth-layout {
        flex-direction: column;
    }

    .wp-auth-brand {
        width: 100%;
        min-height: 200px;
        padding: 2rem;
    }

    .wp-auth-brand h1 {
        font-size: 1.5rem;
    }

    .wp-auth-brand p {
        font-size: 0.9375rem;
    }

    .wp-auth-form {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 575.98px) {
    .wp-auth-brand {
        min-height: 160px;
        padding: 1.5rem;
    }

    .wp-auth-brand-logo {
        width: 180px;
        margin-bottom: 1rem;
    }
}


/* ===========================================
   MORNING BRIEFING DASHBOARD
   =========================================== */

.wp-briefing-page {
    max-width: 1100px;
}

/* Hero greeting card */
.wp-hero-card {
    background: linear-gradient(135deg, var(--wp-primary-lighter) 0%, var(--wp-bg-card) 100%);
    border-radius: var(--wp-radius-lg);
    padding: 1.75rem 2rem;
    border: 1px solid var(--wp-border);
}

.wp-hero-eyebrow {
    color: var(--wp-text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

.wp-hero-title {
    font-family: var(--wp-font-display);
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--wp-text);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.wp-hero-subtitle {
    color: var(--wp-text-secondary);
    font-size: 1.05rem;
}

/* Metric pills */

/* Card-row / metric-row spacing.

   Background: trying to fix this via Bootstrap's `--bs-gutter-x` (and
   even via `padding !important` on the cols, plus `margin !important`
   on the pill itself) all failed to visually separate the pills. So
   rather than keep fighting Bootstrap's row negative-margin / col-
   padding model for these specific rows, we throw it out entirely and
   rebuild as a plain flex container with `gap`. `gap` lives on the
   parent, doesn't touch child margins or padding, and doesn't go
   through any custom-property indirection — it cannot be silently
   defeated by anything in the cascade.

   To opt in, add `wp-card-row` (generic) or use the existing
   `wp-metric-row` hook on a `.row`. The `.row.foo` doubled-up selector
   guarantees we outrank Bootstrap's `.row` and `.g-*` rules regardless
   of source order. */
.row.wp-card-row,
.row.wp-metric-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    /* Kill Bootstrap's row negative margins so the flex container
       lines up with its parent instead of overflowing horizontally. */
    margin-left: 0;
    margin-right: 0;
    /* Reset gutter vars too, so any descendant that still reads them
       (e.g. nested rows) doesn't inherit our 1.5rem accidentally. */
    --bs-gutter-x: 0;
    --bs-gutter-y: 0;
}

/* Cols inside these rebuilt flex rows: drop Bootstrap's percentage
   flex-basis and gutter-padding, and grow equally to fill the row.
   `min-width: 0` prevents long content from forcing horizontal
   overflow that would eat into the gap. */
.row.wp-card-row > [class*="col-"],
.row.wp-card-row > .col,
.row.wp-metric-row > [class*="col-"],
.row.wp-metric-row > .col {
    flex: 1 1 0;
    max-width: none;
    min-width: 0;
    padding-left: 0;
    padding-right: 0;
}

.wp-metric-pill {
    background: var(--wp-bg-card);
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius-md);
    padding: 1.25rem 1rem;
    text-align: center;
    transition: all var(--wp-transition);
}

.wp-metric-pill:hover {
    border-color: var(--wp-primary);
    box-shadow: var(--wp-shadow-md);
    transform: translateY(-2px);
}

.wp-metric-pill--alert {
    border-color: var(--wp-accent);
    background: var(--wp-accent-ghost);
}

.wp-metric-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--wp-text);
    line-height: 1;
}

.wp-metric-pill--alert .wp-metric-value {
    color: var(--wp-accent-hover);
}

.wp-metric-label {
    font-size: 0.875rem;
    color: var(--wp-text-secondary);
    margin-top: 0.35rem;
    font-weight: 500;
    letter-spacing: -0.005em;
}

/* Section card */
.wp-section-card {
    border-radius: var(--wp-radius-md);
    border: 1px solid var(--wp-border);
    box-shadow: var(--wp-shadow-sm);
}

.wp-section-card .card-body h5 {
    font-weight: 600;
    color: var(--wp-text);
    font-size: 1rem;
}

/* Week strip */
.wp-week-strip {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.wp-week-day {
    background: var(--wp-bg-section-alt);
    border-radius: var(--wp-radius);
    padding: 0.75rem 0.25rem;
    text-align: center;
    position: relative;
    transition: all var(--wp-transition);
}

.wp-week-day--weekend {
    /* Was opacity .7, which MULTIPLIED with the label's own .7 down to .49
       (2.91:1). Dim with colour, never by stacking opacity. */
    background: var(--wp-bg-page);
    color: var(--wp-text-muted);
}

.wp-week-day--today {
    background: var(--wp-primary);
    color: var(--wp-text-on-primary);
    box-shadow: 0 0 0 2px var(--wp-accent);
}

.wp-week-day-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: -0.005em;
}

.wp-week-day-number {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 0.15rem;
    line-height: 1;
}

.wp-week-day-dots {
    display: flex;
    gap: 3px;
    justify-content: center;
    margin-top: 0.5rem;
    min-height: 8px;
}

.wp-week-day-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--wp-accent);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 8px;
    line-height: 1.4;
}

/* Calendar event dots */
.wp-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--wp-text-muted);
}

.wp-dot--green { background: var(--wp-success); }
.wp-dot--blue { background: var(--wp-info); }
.wp-dot--amber { background: var(--wp-warning); }

.wp-dot-legend .wp-dot {
    margin-right: 4px;
}

/* Team status list */
.wp-team-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.wp-team-member {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--wp-border);
}

.wp-team-member:last-child {
    border-bottom: none;
}

.wp-team-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--wp-primary-lighter);
    color: var(--wp-primary-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
    overflow: hidden;
}

.wp-team-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wp-team-info {
    flex: 1;
    min-width: 0;
}

.wp-team-name {
    font-weight: 600;
    color: var(--wp-text);
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wp-team-status-text {
    font-size: 0.8rem;
    color: var(--wp-text-secondary);
}

.wp-status-badge {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.wp-status-badge--in { background: var(--wp-success); box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.2); }
.wp-status-badge--off { background: var(--wp-text-muted); }
.wp-status-badge--leave { background: var(--wp-info); }
.wp-status-badge--sick { background: var(--wp-danger); }
.wp-status-badge--wfh { background: var(--wp-info); }

/* Activity timeline */
.wp-activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.wp-activity-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.wp-activity-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--wp-primary-lighter);
    color: var(--wp-primary-text);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wp-activity-text {
    font-size: 0.875rem;
    color: var(--wp-text);
    line-height: 1.4;
}

/* Mobile responsive */
@media (max-width: 767.98px) {
    .wp-hero-card {
        padding: 1.25rem 1rem;
    }
    .wp-hero-title {
        font-size: 1.5rem;
    }
    .wp-metric-value {
        font-size: 1.75rem;
    }
    .wp-week-day-number {
        font-size: 1rem;
    }
    .wp-week-day {
        padding: 0.5rem 0.15rem;
    }
}


/* ===========================================
   CALENDAR (FullCalendar 6 themed via design tokens)
   =========================================== */

/* Override FullCalendar 6 CSS variables so the widget inherits the
   WagePerks palette without us touching its internals. */
.fc {
    --fc-border-color: var(--wp-border);
    --fc-page-bg-color: var(--wp-bg-card);
    --fc-neutral-bg-color: var(--wp-bg-section-alt);
    --fc-neutral-text-color: var(--wp-text-secondary);
    --fc-today-bg-color: var(--wp-primary-pale);
    --fc-now-indicator-color: var(--wp-accent);
    --fc-button-text-color: var(--wp-text);
    --fc-button-bg-color: var(--wp-bg-card);
    --fc-button-border-color: var(--wp-border-medium);
    --fc-button-hover-bg-color: var(--wp-primary-pale);
    --fc-button-hover-border-color: var(--wp-primary);
    --fc-button-active-bg-color: var(--wp-primary);
    --fc-button-active-border-color: var(--wp-primary);
    font-family: var(--wp-font);
}

/* Toolbar title — give it the display font */
.fc .fc-toolbar-title {
    font-family: var(--wp-font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--wp-text);
    letter-spacing: -0.01em;
}

/* Toolbar buttons — match wp .btn styling */
.fc .fc-button {
    font-family: var(--wp-font);
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 0.875rem;
    border-radius: var(--wp-radius);
    box-shadow: none;
    text-transform: none;
    transition: all var(--wp-duration-fast) var(--wp-ease-in-out);
}

.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
    color: var(--wp-text-on-primary);
    background-color: var(--wp-primary);
    border-color: var(--wp-primary);
}

.fc .fc-button-primary:focus,
.fc .fc-button-primary:not(:disabled).fc-button-active:focus {
    box-shadow: 0 0 0 3px var(--wp-primary-ring);
}

/* Day headers (Mon Tue Wed…) */
.fc .fc-col-header-cell-cushion {
    color: var(--wp-text-secondary);
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.625rem 0.5rem;
    text-decoration: none;
}

/* Day numbers */
.fc .fc-daygrid-day-number {
    color: var(--wp-text);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0.625rem;
    text-decoration: none;
}

.fc-day-other .fc-daygrid-day-number {
    color: var(--wp-text-muted);
}

/* FullCalendar dims other-month cells with its own opacity, which drops the
   date to ~1.4:1. They are still dates people read, and opacity MULTIPLIES
   with any we add — so clear it and let the muted colour carry the dimming. */
.fc .fc-daygrid-day.fc-day-other,
.fc .fc-day-other .fc-daygrid-day-top {
    opacity: 1;
}

/* Active/hover toolbar buttons resolved to --wp-primary-hover, which is
   lightened in dark mode, under FullCalendar's white ink (3.07:1). Pin both
   halves to the surface pair. */
.fc .fc-button-primary:not(:disabled):hover,
.fc .fc-button-primary:not(:disabled):active,
.fc .fc-button-primary:not(:disabled).fc-button-active {
    background-color: var(--wp-primary) !important;
    border-color: var(--wp-primary) !important;
    color: var(--wp-text-on-primary) !important;
}

/* Today cell */
.fc .fc-day-today {
    background: var(--wp-primary-pale) !important;
}

.fc .fc-day-today .fc-daygrid-day-number {
    color: var(--wp-primary-text);
    font-weight: 700;
}

/* Weekend tint */
.fc .fc-day-sat,
.fc .fc-day-sun {
    background: var(--wp-bg-section-alt);
}

[data-theme="dark"] .fc .fc-day-sat,
[data-theme="dark"] .fc .fc-day-sun {
    background: rgba(255, 255, 255, 0.02);
}

/* Cell borders */
.fc-theme-standard td,
.fc-theme-standard th,
.fc-theme-standard .fc-scrollgrid {
    border-color: var(--wp-border);
}

/* Events — semantic color variants driven by data class */
.fc .wp-event {
    border: none;
    border-radius: var(--wp-radius-sm);
    padding: 2px 6px;
    margin: 1px 4px;
    font-size: 0.7875rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform var(--wp-duration-fast) var(--wp-ease-out),
                box-shadow var(--wp-duration-fast) var(--wp-ease-out);
}

.fc .wp-event:hover {
    transform: translateY(-1px);
    box-shadow: var(--wp-shadow-sm);
}

.fc .wp-event--holiday {
    background: var(--wp-primary-ghost);
    color: var(--wp-primary-text);
    border-left: 3px solid var(--wp-primary);
}

.fc .wp-event--sick {
    background: var(--wp-danger-light);
    color: var(--wp-danger);
    border-left: 3px solid var(--wp-danger);
}

.fc .wp-event--lateness {
    background: var(--wp-warning-light);
    color: var(--wp-warning);
    border-left: 3px solid var(--wp-warning);
}

.fc .wp-event--other {
    background: var(--wp-bg-section-alt);
    color: var(--wp-text-secondary);
    border-left: 3px solid var(--wp-border-dark);
}

.fc .wp-event--bankhol {
    background: var(--wp-accent-ghost);
    color: var(--wp-accent-hover);
    border-left: 3px solid var(--wp-accent);
}

/* List view rows */
.fc-list-event:hover td {
    background: var(--wp-primary-pale) !important;
}

.fc .fc-list-event-dot {
    border-color: var(--wp-primary);
}

.fc .fc-list-day-cushion {
    background: var(--wp-bg-section-alt);
    color: var(--wp-text);
    font-weight: 600;
}

/* "+ N more" link */
.fc .fc-daygrid-more-link {
    color: var(--wp-primary-text);
    font-weight: 500;
    font-size: 0.75rem;
}

/* Calendar legend below the widget */
.wp-cal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding: 0.75rem 0.25rem;
    font-size: 0.8125rem;
    color: var(--wp-text-secondary);
}

.wp-cal-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.wp-cal-legend__dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    border-left-width: 4px;
    border-left-style: solid;
}

.wp-cal-legend__dot--holiday  { background: var(--wp-primary-ghost);  border-left-color: var(--wp-primary); }
.wp-cal-legend__dot--sick     { background: var(--wp-danger-light);   border-left-color: var(--wp-danger); }
.wp-cal-legend__dot--lateness { background: var(--wp-warning-light);  border-left-color: var(--wp-warning); }
.wp-cal-legend__dot--other    { background: var(--wp-bg-section-alt); border-left-color: var(--wp-border-dark); }
.wp-cal-legend__dot--bankhol  { background: var(--wp-accent-ghost);   border-left-color: var(--wp-accent); }


/* ===========================================
   FIRST-LOAD ENTRY ANIMATIONS
   Subtle stagger fade-up for cards on initial paint.
   Stagger via inline style="--idx: N" on each child.
   Respects prefers-reduced-motion via the universal rule above.
   =========================================== */

@keyframes wp-enter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wp-enter > * {
    animation: wp-enter var(--wp-duration-slower) var(--wp-ease-out) backwards;
    animation-delay: calc(var(--idx, 0) * 60ms + 50ms);
}

.wp-enter--fast > * {
    animation: wp-enter var(--wp-duration-base) var(--wp-ease-out) backwards;
    animation-delay: calc(var(--idx, 0) * 40ms);
}


/* ===========================================
   COMMAND PALETTE (Cmd+K)
   =========================================== */

.wp-cp {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12vh;
}

.wp-cp.wp-cp--open {
    display: flex;
    animation: wp-cp-fade var(--wp-duration-fast) var(--wp-ease-out);
}

@keyframes wp-cp-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.wp-cp__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 20, 19, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.wp-cp__panel {
    position: relative;
    width: 90%;
    max-width: 600px;
    max-height: 70vh;
    background: var(--wp-bg-card);
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius-lg);
    box-shadow: var(--wp-shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: wp-cp-slide var(--wp-duration-base) var(--wp-ease-out);
}

@keyframes wp-cp-slide {
    from { transform: translateY(-12px) scale(0.98); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}

.wp-cp__search {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--wp-border);
}

.wp-cp__search-icon {
    width: 18px;
    height: 18px;
    color: var(--wp-text-tertiary);
    flex-shrink: 0;
}

.wp-cp__input {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    font-family: var(--wp-font);
    font-size: 1rem;
    color: var(--wp-text);
    padding: 0;
    min-width: 0;
}

.wp-cp__input::placeholder {
    color: var(--wp-text-tertiary);
}

.wp-cp__kbd,
.wp-cp__footer kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: var(--wp-radius-sm);
    background: var(--wp-bg-section-alt);
    border: 1px solid var(--wp-border);
    color: var(--wp-text-secondary);
    font-family: var(--wp-font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1;
}

.wp-cp__list {
    flex: 1;
    overflow-y: auto;
    margin: 0;
    padding: 0.5rem 0;
    list-style: none;
}

.wp-cp__group {
    padding: 0.5rem 1.25rem 0.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--wp-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.wp-cp__item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.6rem 1.25rem;
    cursor: pointer;
    color: var(--wp-text);
    font-size: 0.9rem;
    border-left: 2px solid transparent;
    transition: background-color var(--wp-duration-fast) var(--wp-ease-in-out);
}

.wp-cp__item--active {
    background: var(--wp-primary-pale);
    border-left-color: var(--wp-primary);
}

[data-theme="dark"] .wp-cp__item--active {
    background: var(--wp-primary-ghost);
}

.wp-cp__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: var(--wp-text-secondary);
}

.wp-cp__icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.wp-cp__item--active .wp-cp__icon {
    color: var(--wp-primary-text);
}

.wp-cp__label {
    flex: 1;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wp-cp__hint {
    font-size: 0.75rem;
    color: var(--wp-text-tertiary);
    flex-shrink: 0;
}

.wp-cp__empty {
    padding: 2rem 1.25rem;
    text-align: center;
    color: var(--wp-text-tertiary);
    font-size: 0.875rem;
}

.wp-cp__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    padding: 0.625rem 1.25rem;
    border-top: 1px solid var(--wp-border);
    background: var(--wp-bg-section-alt);
    font-size: 0.75rem;
    color: var(--wp-text-tertiary);
}

.wp-cp__footer span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

@media (max-width: 575.98px) {
    .wp-cp { padding-top: 6vh; }
    .wp-cp__panel { width: 94%; max-height: 80vh; }
    .wp-cp__footer { display: none; }
}


/* ===========================================
   TAG / BADGE COMPONENT SYSTEM
   Replaces ad-hoc Bootstrap `bg-info text-dark` patterns with a
   themeable, dark-mode-aware tag primitive.
   =========================================== */

.wp-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.625rem;
    border-radius: var(--wp-radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.005em;
    border: 1px solid transparent;
    background: var(--wp-bg-section-alt);
    color: var(--wp-text-secondary);
    white-space: nowrap;
}

.wp-tag--info {
    background: var(--wp-info-light);
    color: var(--wp-info);
    border-color: rgba(8, 145, 178, 0.20);
}

.wp-tag--success {
    background: var(--wp-success-light);
    color: var(--wp-success);
    border-color: rgba(22, 163, 74, 0.20);
}

.wp-tag--warning {
    background: var(--wp-warning-light);
    color: var(--wp-warning);
    border-color: rgba(217, 119, 6, 0.22);
}

.wp-tag--danger {
    background: var(--wp-danger-light);
    color: var(--wp-danger);
    border-color: rgba(220, 38, 38, 0.22);
}

.wp-tag--accent {
    background: var(--wp-accent-ghost);
    color: var(--wp-accent-hover);
    border-color: rgba(239, 152, 89, 0.30);
}

.wp-tag--primary {
    background: var(--wp-primary-ghost);
    color: var(--wp-primary-text);
    border-color: var(--wp-primary-ring);
}

.wp-tag--solid {
    background: var(--wp-text);
    color: var(--wp-bg-card);
    border-color: var(--wp-text);
}

[data-theme="dark"] .wp-tag {
    background: rgba(255, 255, 255, 0.06);
}

/* ===========================================
   SKELETON LOADERS
   =========================================== */

@keyframes wp-skeleton-shimmer {
    0% { background-position: -800px 0; }
    100% { background-position: 800px 0; }
}

.wp-skeleton {
    display: block;
    background: linear-gradient(
        90deg,
        var(--wp-bg-section-alt) 0%,
        rgba(255, 255, 255, 0.6) 50%,
        var(--wp-bg-section-alt) 100%
    );
    background-size: 1600px 100%;
    background-repeat: no-repeat;
    border-radius: var(--wp-radius-sm);
    animation: wp-skeleton-shimmer 1.6s var(--wp-ease-in-out) infinite;
    color: transparent !important;
    user-select: none;
    pointer-events: none;
    min-height: 1em;
}

[data-theme="dark"] .wp-skeleton {
    background: linear-gradient(
        90deg,
        var(--wp-bg-section-alt) 0%,
        rgba(255, 255, 255, 0.04) 50%,
        var(--wp-bg-section-alt) 100%
    );
    background-size: 1600px 100%;
    background-repeat: no-repeat;
}

.wp-skeleton--text {
    height: 0.875rem;
    margin: 0.25rem 0;
}

.wp-skeleton--title {
    height: 1.5rem;
    width: 60%;
}

.wp-skeleton--circle {
    border-radius: 50%;
}

.wp-skeleton--button {
    height: 2.25rem;
    width: 8rem;
}

/* ===========================================
   EMPTY STATES
   =========================================== */

.wp-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 3rem 1.5rem;
    gap: 0.5rem;
}

.wp-empty__icon {
    width: 56px;
    height: 56px;
    border-radius: var(--wp-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--wp-primary-pale);
    color: var(--wp-primary-text);
    margin-bottom: 0.5rem;
}

.wp-empty__icon svg {
    width: 28px;
    height: 28px;
    stroke-width: 1.75;
}

.wp-empty--accent .wp-empty__icon {
    background: var(--wp-accent-ghost);
    color: var(--wp-accent-hover);
}

.wp-empty__title {
    font-family: var(--wp-font-display);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--wp-text);
    margin: 0;
    letter-spacing: -0.01em;
}

.wp-empty__body {
    font-size: 0.9rem;
    color: var(--wp-text-secondary);
    margin: 0;
    max-width: 32ch;
}

.wp-empty__cta {
    margin-top: 0.75rem;
}

.wp-empty--compact {
    padding: 1.75rem 1rem;
}

.wp-empty--compact .wp-empty__icon {
    width: 44px;
    height: 44px;
}

.wp-empty--compact .wp-empty__icon svg {
    width: 22px;
    height: 22px;
}


/* PRO badge — inline indicator next to upgrade-required nav items */
.wp-pro-badge {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.0625rem 0.4rem;
    border-radius: var(--wp-radius-sm);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--wp-accent);
    background: var(--wp-accent-ghost);
    border: 1px solid var(--wp-accent);
    vertical-align: middle;
    line-height: 1;
}


/* ===========================================
   ACCESSIBILITY / CONTRAST OVERRIDES
   Ensures secondary text remains legible on brand-colored backgrounds
   =========================================== */

/* Bootstrap's text-muted default (#6c757d) becomes almost invisible on
   teal. When rendered inside any element with the brand background,
   force a readable light tint instead. */
.bg-primary .text-muted,
.bg-primary .text-secondary,
[class*="wp-primary"] .text-muted,
[class*="wp-primary"] .text-secondary,
[style*="var(--wp-primary)"] .text-muted,
[style*="linear-gradient"] .text-muted,
.text-white .text-muted,
.card.text-white .text-muted {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Headings need this too. Before the --bs-heading-color bridge (2026-09-07)
   they simply inherited; the bridge gave them an explicit dark colour, which
   is dark-on-dark inside a .text-white hero. It stayed invisible only because
   .wp-hero-on-primary's gradient was itself being overridden by .card, so the
   card was white and a dark heading looked correct. Fixing one exposed the
   other. */
.card.text-white h1, .card.text-white h2, .card.text-white h3,
.card.text-white h4, .card.text-white h5, .card.text-white h6,
.wp-hero-on-primary h1, .wp-hero-on-primary h2, .wp-hero-on-primary h3,
.wp-hero-on-primary h4, .wp-hero-on-primary h5, .wp-hero-on-primary h6 {
    color: #fff;
}

/* Ensure text inside cards with primary gradient bg stays white */
.card.text-white p,
.card.text-white small,
.card.text-white .small {
    color: rgba(255, 255, 255, 0.92);
}

/* opacity-75 on white text over teal was borderline — bump to 0.85 */
.text-white .opacity-75 {
    opacity: 0.88 !important;
}

/* Bootstrap utility-class background overrides — make .bg-light and
   .bg-white theme-aware. Without these, both classes hardcode their
   Bootstrap defaults (#f8f9fa / #fff) in BOTH themes; in dark mode that
   surfaces as light panels carrying light text — the "white text on light
   background" class of bug Sharps reported 2026-06-10. We map them onto
   the existing semantic tokens so callsites don't need to know about the
   theme: --wp-bg-section-alt is the neutral section surface (gray-blue in
   light, dark gray-teal in dark); --wp-bg-card is the elevated card
   surface (white / near-black). Bootstrap's own rule uses !important
   so ours must too. */
.bg-light {
    background-color: var(--wp-bg-section-alt) !important;
}

.bg-white {
    background-color: var(--wp-bg-card) !important;
}

/* Bootstrap CSS-variable bridge — the systemic fix for the same class of
   bug. We don't use data-bs-theme, so every Bootstrap component that sets
   its own color from --bs-* vars (.card, .accordion-button, .dropdown-menu,
   .list-group, .input-group-text, <hr>, table cells) was hardcoded to the
   LIGHT defaults in both themes: any un-classed text inside a .card
   rendered #212529-on-near-black in dark mode (the "bank details
   illegible" bug, 2026-09-07). Pointing the --bs-* roots at our theme
   tokens makes all of them follow [data-theme] at once. Light mode is
   visually unchanged (slate-on-white ≈ Bootstrap's defaults). This file
   loads after Bootstrap, so this :root block wins the tie. */
:root {
    --bs-body-color: var(--wp-text);
    --bs-body-bg: var(--wp-bg-page);
    --bs-emphasis-color: var(--wp-text);
    --bs-secondary-color: var(--wp-text-secondary);
    --bs-tertiary-color: var(--wp-text-tertiary);
    --bs-secondary-bg: var(--wp-bg-section-alt);
    --bs-tertiary-bg: var(--wp-bg-section-alt);
    --bs-border-color: var(--wp-border);
    --bs-heading-color: var(--wp-text);
}

/* Accordion (e.g. brand Terms & Conditions): brand tokens instead of
   Bootstrap's blue active state, and a currentColor chevron — the stock
   one is a dark-stroke SVG that disappears on dark-mode surfaces. */
.accordion-button {
    color: var(--wp-text);
}

.accordion-button:not(.collapsed) {
    color: var(--wp-primary-text);
    background-color: var(--wp-primary-lighter);
    box-shadow: none;
}

.accordion-button:focus {
    border-color: var(--wp-primary);
    box-shadow: 0 0 0 3px var(--wp-primary-ring);
}

.accordion-button::after {
    background-image: none;
    background-color: currentColor;
    -webkit-mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: 100%;
    mask-size: 100%;
}

/* .text-dark fixes — Bootstrap hardcodes #212529 which is unreadable on
   the dark-mode surfaces. Override only in dark mode so light-mode
   semantics (e.g. dark text on a light accent badge) are preserved. */
[data-theme="dark"] .text-dark {
    color: var(--wp-text) !important;
}

/* Ensure the hero card's muted text stays readable on its light-teal
   gradient background */
.wp-hero-card .text-muted,
.wp-hero-card small {
    color: var(--wp-text-secondary) !important;
}

/* Ensure week-strip "today" cell's dots stay visible on the primary fill */
.wp-week-day--today .wp-dot {
    box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.6);
}

/* Force readable contrast on sidebar nav subtle labels */
.wp-sidebar .text-muted {
    color: rgba(255, 255, 255, 0.75) !important;
}

/* Info / warning alert text contrast */
.alert-info {
    color: var(--wp-info-text);
    background-color: var(--wp-info-light);
    border-color: rgba(8, 145, 178, 0.25);
}

.alert-warning {
    color: var(--wp-warning-text);
    background-color: var(--wp-warning-light);
    border-color: rgba(217, 119, 6, 0.25);
}

/* Accent badges on light backgrounds need dark text */
.badge.bg-accent,
.bg-accent {
    color: #fff;
    background-color: var(--wp-accent);
}

.bg-accent-subtle,
.badge.bg-accent-subtle {
    color: #7a4e00 !important;
    background-color: var(--wp-accent-light);
}

/* ============================================================================
   RECOGNITION FEED
   Social-wall styling for /recognition/ — value-colored cards, animated
   reactions, staggered entry, display-font header.
   ============================================================================ */

.wp-feed-title {
    font-family: var(--wp-font-display);
    font-size: clamp(1.75rem, 2.4vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--wp-text);
    line-height: 1.1;
}

.wp-feed-subtitle {
    color: var(--wp-text-secondary);
    font-size: 1rem;
}

/* ---------- Post card ---------- */
.wp-post {
    position: relative;
    background: var(--wp-bg-card);
    border: 1px solid var(--wp-border);
    border-left: 4px solid var(--wp-post-accent, var(--wp-primary));
    border-radius: var(--wp-radius-lg);
    box-shadow: var(--wp-shadow-sm);
    margin-bottom: 1rem;
    overflow: hidden;
    opacity: 0;
    transform: translateY(12px);
    animation: wp-post-enter var(--wp-duration-slow, 360ms) var(--wp-ease-out, ease-out) forwards;
    animation-delay: calc(var(--idx, 0) * 60ms);
    transition: box-shadow var(--wp-duration-base, 200ms) var(--wp-ease-out, ease-out),
                transform var(--wp-duration-base, 200ms) var(--wp-ease-out, ease-out);
}

.wp-post:hover {
    box-shadow: var(--wp-shadow-md);
    transform: translateY(-1px);
}

@keyframes wp-post-enter {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.wp-post__body {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 1.25rem 1.1rem;
}

/* ---------- Avatar + value chip ---------- */
.wp-post__avatar-wrap {
    position: relative;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
}

.wp-post__avatar {
    width: 56px;
    height: 56px;
    border-radius: var(--wp-radius-full);
    background: var(--wp-primary-lighter);
    color: var(--wp-primary-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    overflow: hidden;
    box-shadow: 0 0 0 2px var(--wp-bg-card), 0 0 0 3px var(--wp-border);
}

.wp-post__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wp-post__value-chip {
    position: absolute;
    bottom: -2px;
    right: -4px;
    width: 24px;
    height: 24px;
    border-radius: var(--wp-radius-full);
    background: var(--wp-post-accent, var(--wp-primary));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    line-height: 1;
    box-shadow: 0 0 0 2px var(--wp-bg-card), var(--wp-shadow-sm);
}

/* ---------- Post content ---------- */
.wp-post__content {
    flex: 1;
    min-width: 0;
}

.wp-post__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.wp-post__line {
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--wp-text-secondary);
}

.wp-post__sender,
.wp-post__recipient {
    color: var(--wp-text);
    font-weight: 600;
}

.wp-post__verb {
    margin: 0 0.25rem;
}

.wp-post__time {
    color: var(--wp-text-tertiary);
    font-size: 0.8rem;
    white-space: nowrap;
}

.wp-post__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.wp-post__value-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: var(--wp-radius-full);
    background: color-mix(in srgb, var(--wp-post-accent) 14%, transparent);
    color: color-mix(in srgb, var(--wp-post-accent) 78%, #1e293b);
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid color-mix(in srgb, var(--wp-post-accent) 28%, transparent);
}

.wp-post__value-badge-icon {
    font-size: 0.85rem;
    line-height: 1;
}

.wp-post__message {
    margin: 0.7rem 0 0.9rem;
    color: var(--wp-text);
    font-size: 1rem;
    line-height: 1.55;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.wp-post__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ---------- Reaction chip ---------- */
.wp-reaction {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    border-radius: var(--wp-radius-full);
    background: var(--wp-bg-section-alt);
    color: var(--wp-text-secondary);
    border: 1px solid var(--wp-border);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--wp-duration-fast, 150ms) var(--wp-ease-out, ease-out),
                color var(--wp-duration-fast, 150ms) var(--wp-ease-out, ease-out),
                border-color var(--wp-duration-fast, 150ms) var(--wp-ease-out, ease-out),
                transform var(--wp-duration-fast, 150ms) var(--wp-ease-out, ease-out);
}

.wp-reaction:hover {
    background: var(--wp-primary-pale, var(--wp-primary-lighter));
    color: var(--wp-primary-text);
    border-color: var(--wp-primary-ring, var(--wp-primary-lighter));
}

.wp-reaction--active {
    background: var(--wp-accent-ghost, color-mix(in srgb, var(--wp-accent) 16%, transparent));
    color: var(--wp-accent-hover, var(--wp-accent));
    border-color: color-mix(in srgb, var(--wp-accent) 35%, transparent);
}

/* Empty (0-count) emoji chip — quieter so a row of 5 reaction buttons
   doesn't dominate the post; the just-emoji form is the "I haven't been
   clicked yet" affordance. Becomes regular .wp-reaction styling on hover
   to invite interaction. */
.wp-reaction--empty {
    background: transparent;
    color: var(--wp-text-tertiary);
    opacity: 0.65;
    padding-inline: 0.55rem;
}
.wp-reaction--empty:hover { opacity: 1; }

/* Row of 5 reaction chips. Wraps on narrow viewports; small gap so the
   emoji are individually clickable without the row feeling sparse. */
.wp-post__reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.wp-reaction__emoji {
    display: inline-block;
    transform-origin: center;
}

.wp-reaction--pop .wp-reaction__emoji {
    animation: wp-reaction-pop 480ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wp-reaction--pop {
    animation: wp-reaction-bump 480ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes wp-reaction-pop {
    0%   { transform: scale(1) rotate(0deg); }
    30%  { transform: scale(1.5) rotate(-12deg); }
    55%  { transform: scale(0.9) rotate(8deg); }
    100% { transform: scale(1) rotate(0deg); }
}

@keyframes wp-reaction-bump {
    0%, 100% { transform: translateY(0); }
    40%      { transform: translateY(-3px); }
}

/* ---------- Pagination ---------- */
.wp-feed-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 1.5rem 0 0.5rem;
}

.wp-feed-pagination__info {
    color: var(--wp-text-tertiary);
    font-size: 0.85rem;
}

/* ---------- Sticky stats card ---------- */
.wp-stats-card {
    position: sticky;
    top: 1rem;
    background: var(--wp-bg-card);
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius-lg);
    box-shadow: var(--wp-shadow-sm);
    overflow: hidden;
}

.wp-stats-card + .wp-stats-card {
    position: static;
}

.wp-stats-card__header {
    font-family: var(--wp-font-display);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--wp-text);
    padding: 1rem 1.25rem 0.75rem;
    border-bottom: 1px solid var(--wp-border);
}

.wp-stats-card__body {
    padding: 1rem 1.25rem 1.25rem;
}

.wp-stats-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 0.45rem 0;
}

.wp-stats-row + .wp-stats-row {
    border-top: 1px dashed var(--wp-border);
}

.wp-stats-row__label {
    color: var(--wp-text-secondary);
    font-size: 0.9rem;
}

.wp-stats-row__value {
    font-family: var(--wp-font-display);
    font-weight: 700;
    color: var(--wp-text);
    font-size: 1.1rem;
}

.wp-stats-row__value--lg {
    font-size: 1.75rem;
    color: var(--wp-primary-text);
    line-height: 1;
}


/* ============================================================================
   FEATURE INDEX HEROES
   Distinctive page-header treatments for the Performance / Surveys /
   E-Sigs / Onboarding landing pages so they each feel intentional.
   ============================================================================ */

/* Shared base used by all four feature heroes */
.wp-page-hero {
    margin-bottom: 1.5rem;
}

.wp-page-hero__title {
    font-family: var(--wp-font-display);
    font-size: clamp(1.75rem, 2.4vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--wp-text);
    margin: 0 0 0.35rem 0;
}

.wp-page-hero__lede {
    font-size: 0.95rem;
    color: var(--wp-text-secondary);
    margin: 0;
    max-width: 56ch;
}

.wp-page-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--wp-primary-text);
    background: var(--wp-primary-pale);
    padding: 0.3rem 0.65rem;
    border-radius: var(--wp-radius-full);
    margin-bottom: 0.75rem;
}

.wp-page-hero__eyebrow--accent {
    color: var(--wp-accent-hover);
    background: var(--wp-accent-ghost);
}

.wp-page-hero__row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1rem;
}

.wp-page-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

/* ---------- Performance: scoreboard ---------- */
.wp-scoreboard {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.wp-scoreboard--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 768px) {
    .wp-scoreboard {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.wp-scoreboard__tile {
    position: relative;
    background: var(--wp-bg-card);
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius-lg);
    padding: 1.25rem 1.25rem 1.1rem;
    text-decoration: none;
    color: inherit;
    display: block;
    overflow: hidden;
    transition: transform var(--wp-duration-base) var(--wp-ease-out),
                box-shadow var(--wp-duration-base) var(--wp-ease-out),
                border-color var(--wp-duration-base) var(--wp-ease-out);
}

.wp-scoreboard__tile::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--wp-primary), var(--wp-primary-hover));
    opacity: 0.85;
}

.wp-scoreboard__tile--accent::before {
    background: linear-gradient(90deg, var(--wp-accent), var(--wp-accent-hover));
}

a.wp-scoreboard__tile:hover {
    transform: translateY(-2px);
    box-shadow: var(--wp-shadow-md);
    border-color: var(--wp-border-medium);
}

.wp-scoreboard__label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--wp-text-secondary);
    margin: 0.35rem 0 0.5rem;
}

.wp-scoreboard__number {
    font-family: var(--wp-font-display);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--wp-text);
}

.wp-scoreboard__number--sm {
    font-size: 1.5rem;
}

.wp-scoreboard__number--accent {
    color: var(--wp-accent-hover);
}

.wp-scoreboard__hint {
    font-size: 0.78rem;
    color: var(--wp-text-tertiary);
    margin-top: 0.55rem;
}

.wp-scoreboard__hint--warn {
    color: var(--wp-warning);
    font-weight: 600;
}

/* ---------- Surveys: list-forward, slim stat ribbon ---------- */
.wp-stat-ribbon {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    padding: 0.85rem 1.25rem;
    background: var(--wp-primary-pale);
    border: 1px solid var(--wp-primary-lighter);
    border-radius: var(--wp-radius-lg);
    margin-bottom: 1.5rem;
}

.wp-stat-ribbon__item {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
}

.wp-stat-ribbon__num {
    font-family: var(--wp-font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--wp-primary-text);
    line-height: 1;
}

.wp-stat-ribbon__lbl {
    font-size: 0.82rem;
    color: var(--wp-text-secondary);
    font-weight: 500;
}

.wp-stat-ribbon__sep {
    width: 1px;
    height: 1.4rem;
    background: var(--wp-primary-lighter);
}

/* ---------- E-Signatures: action-first hero card ---------- */
.wp-action-hero {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
    .wp-action-hero {
        grid-template-columns: 1fr;
    }
}

.wp-action-hero__primary {
    background: linear-gradient(135deg, var(--wp-accent-ghost) 0%, var(--wp-bg-card) 75%);
    border: 1px solid var(--wp-accent-light);
    border-radius: var(--wp-radius-xl);
    padding: 1.5rem 1.6rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
}

.wp-action-hero__cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.wp-action-hero__stats {
    background: var(--wp-bg-card);
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius-xl);
    padding: 1.25rem 1.4rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem 1.25rem;
    align-content: center;
}

.wp-action-hero__stat {
    border-left: 3px solid var(--wp-primary-lighter);
    padding-left: 0.75rem;
}

.wp-action-hero__stat--success { border-left-color: var(--wp-success); }
.wp-action-hero__stat--muted { border-left-color: var(--wp-border-medium); }

.wp-action-hero__stat-num {
    font-family: var(--wp-font-display);
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1;
    color: var(--wp-text);
}

.wp-action-hero__stat-lbl {
    font-size: 0.78rem;
    color: var(--wp-text-secondary);
    margin-top: 0.25rem;
}

/* ---------- Employee Onboarding: progress-forward ---------- */
.wp-progress-hero {
    background: var(--wp-bg-card);
    border: 1px solid var(--wp-border);
    border-left: 4px solid var(--wp-primary);
    border-radius: var(--wp-radius-lg);
    padding: 1.4rem 1.5rem;
    margin-bottom: 1.5rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.25rem;
    align-items: center;
}

@media (max-width: 768px) {
    .wp-progress-hero {
        grid-template-columns: 1fr;
    }
}

.wp-progress-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 0.85rem;
}

.wp-progress-hero__meta-item {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--wp-text-secondary);
}

.wp-progress-hero__meta-num {
    font-family: var(--wp-font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--wp-text);
    line-height: 1;
}

.wp-progress-hero__meta-num--accent { color: var(--wp-accent-hover); }
.wp-progress-hero__meta-num--success { color: var(--wp-success); }

.wp-progress-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-self: center;
}


/* ===========================================
   DASHBOARD POLISH (2026)
   Hierarchy refinements + borderless sections
   =========================================== */

.wp-section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.875rem;
    padding: 0 0.125rem;
}

.wp-section-heading--inset {
    padding: 0;
    margin-bottom: 1rem;
}

.wp-section-heading__title {
    font-family: var(--wp-font-display);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--wp-text-tertiary);
    margin: 0;
}

.wp-section-heading__link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--wp-primary-text);
    text-decoration: none;
    transition: color var(--wp-duration-base) var(--wp-ease-out),
                transform var(--wp-duration-base) var(--wp-ease-spring);
}

.wp-section-heading__link:hover {
    color: var(--wp-primary-hover);
    transform: translateX(2px);
}

/* Borderless dashboard section — heading + content directly on page bg */
.wp-dash-section {
    margin-bottom: 1.5rem;
}

/* --- Hero card refinements --- */
.wp-hero-card__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.wp-hero-card__text {
    flex: 1 1 320px;
    min-width: 0;
}

.wp-hero-card__eyebrow {
    color: var(--wp-text-tertiary);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 0.35rem;
}

.wp-hero-card__title {
    font-family: var(--wp-font-display);
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--wp-text);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 0.5rem;
}

.wp-hero-card__subtitle {
    color: var(--wp-text-secondary);
    font-size: 1.05rem;
    font-weight: 500;
    margin: 0;
    max-width: 52ch;
}

.wp-hero-card__action {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.wp-hero-cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.95rem 1.6rem;
    border-radius: var(--wp-radius-md);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.005em;
    text-decoration: none;
    border: 1px solid transparent;
    box-shadow: var(--wp-shadow-sm);
    transition: transform var(--wp-duration-base) var(--wp-ease-spring),
                box-shadow var(--wp-duration-base) var(--wp-ease-out),
                background-color var(--wp-duration-base) var(--wp-ease-out);
}

.wp-hero-cta--go {
    background: var(--wp-accent);
    color: #fff;
}

.wp-hero-cta--go:hover {
    background: var(--wp-accent-hover, #d97a3e);
    color: #fff;
    transform: translateY(-2px) scale(1.015);
    box-shadow: 0 10px 24px -10px rgba(239, 152, 89, 0.55);
}

.wp-hero-cta--stop {
    background: var(--wp-danger);
    color: #fff;
}

.wp-hero-cta--stop:hover {
    background: #b91c1c;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px -10px rgba(220, 38, 38, 0.5);
}

.wp-hero-cta__pulse {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.9);
    animation: wp-hero-pulse 1.8s var(--wp-ease-out) infinite;
}

@keyframes wp-hero-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
    70%  { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.wp-hero-cta__meta {
    font-size: 0.78rem;
    color: var(--wp-text-tertiary);
    margin: 0;
    font-weight: 500;
}

.wp-hero-tag {
    font-size: 0.85rem;
    padding: 0.45rem 0.9rem;
}

@media (max-width: 575.98px) {
    .wp-hero-card__inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .wp-hero-card__action {
        align-items: flex-start;
        width: 100%;
    }
    .wp-hero-card__title {
        font-size: 1.75rem;
    }
}

/* --- Dot legend refinement --- */
.wp-dot-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    font-size: 0.78rem;
    color: var(--wp-text-tertiary);
    font-weight: 500;
    padding: 0 0.125rem;
}

.wp-dot-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

/* Hover lift on week-strip days (today indicator now lives in the original
   .wp-week-day--today rule above so there's only one source of truth) */
.wp-week-day {
    transition: transform var(--wp-duration-base) var(--wp-ease-spring),
                background-color var(--wp-duration-base) var(--wp-ease-out);
}

.wp-week-day:hover {
    transform: translateY(-1px);
}

/* --- Quick actions: row style --- */
.wp-quick-action-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.625rem;
}

@media (min-width: 576px) {
    .wp-quick-action-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.wp-quick-action--row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.85rem;
    min-height: 0;
    padding: 0.85rem 1rem;
    background: var(--wp-bg-card);
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius-md);
    text-align: left;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--wp-text);
    transition: transform var(--wp-duration-base) var(--wp-ease-spring),
                border-color var(--wp-duration-base) var(--wp-ease-out),
                background-color var(--wp-duration-base) var(--wp-ease-out),
                box-shadow var(--wp-duration-base) var(--wp-ease-out);
}

.wp-quick-action--row:hover {
    background: var(--wp-bg-card);
    color: var(--wp-text);
    border-color: var(--wp-primary);
    transform: translateY(-1px);
    box-shadow: var(--wp-shadow-sm);
}

.wp-quick-action--row .wp-quick-action__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--wp-radius);
    background: var(--wp-primary-pale, var(--wp-primary-lighter));
    color: var(--wp-primary-text);
    flex-shrink: 0;
    transition: background-color var(--wp-duration-base) var(--wp-ease-out),
                color var(--wp-duration-base) var(--wp-ease-out);
}

.wp-quick-action--row:hover .wp-quick-action__icon {
    background: var(--wp-accent-ghost);
    color: var(--wp-accent-hover, var(--wp-accent));
}

.wp-quick-action--row .wp-quick-action__icon svg {
    color: currentColor;
}

.wp-quick-action--row .wp-quick-action__label {
    flex: 1;
    min-width: 0;
}

.wp-quick-action--row .wp-quick-action__chev {
    color: var(--wp-text-tertiary);
    font-weight: 700;
    transition: transform var(--wp-duration-base) var(--wp-ease-spring),
                color var(--wp-duration-base) var(--wp-ease-out);
}

.wp-quick-action--row:hover .wp-quick-action__chev {
    color: var(--wp-accent);
    transform: translateX(3px);
}

/* --- Day-type chip group (used by absence/sickness/holiday forms) --- */
.wp-chip-group {
    display: flex;
}
.wp-chip-group .wp-chip {
    flex: 1 1 0;
    min-width: 0;
    padding: .65rem .5rem;
    font-weight: 600;
    font-size: .875rem;
    color: var(--wp-primary-text);
    background: #fff;
    border: 1.5px solid var(--wp-primary-lighter, #cdebe7);
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.wp-chip-group .wp-chip:hover {
    background: var(--wp-primary-lighter, #e6f7f5);
    border-color: var(--wp-primary);
}
.wp-chip-group .btn-check:checked + .wp-chip {
    background: var(--wp-primary);
    color: #fff;
    border-color: var(--wp-primary);
}
.wp-chip-group .btn-check:focus-visible + .wp-chip {
    box-shadow: 0 0 0 .2rem rgba(15, 118, 110, .2);
}

/* --- Team status "more" tag alignment --- */
.wp-team-more {
    text-align: center;
    margin-top: 0.5rem;
}

.wp-team-toggle {
    background: none;
    border: 0;
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--wp-primary-text);
    cursor: pointer;
    text-decoration: none;
}

.wp-team-toggle:hover,
.wp-team-toggle:focus {
    color: var(--wp-primary-hover, var(--wp-primary));
    text-decoration: underline;
    outline: none;
}

/* --- Activity icon hover micro-anim --- */
.wp-activity-item:hover .wp-activity-icon {
    background: var(--wp-accent-ghost);
    color: var(--wp-accent-hover, var(--wp-accent));
}

.wp-activity-icon {
    transition: background-color var(--wp-duration-base) var(--wp-ease-out),
                color var(--wp-duration-base) var(--wp-ease-out);
}

/* Slim table progress bars used in feature index tables */
.wp-progress--thin { height: 6px; }

/* ===========================================
   EMPTY STATE ILLUSTRATIONS
   =========================================== */

.wp-empty__icon-large {
    width: 140px;
    height: 140px;
    margin: 0 auto 0.75rem;
    color: var(--wp-primary-text);
    /* No background, since the SVG has its own fills */
}

.wp-empty--accent .wp-empty__icon-large {
    color: var(--wp-accent);
}

.wp-empty__icon-large svg {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
}

.wp-empty--compact .wp-empty__icon-large {
    width: 110px;
    height: 110px;
}
.wp-progress-cell { min-width: 160px; }
.wp-progress-cell--wide { min-width: 180px; }


/* ===========================================
   LEARN / TRAINING MODULE
   =========================================== */

/* --- Hero on My Courses / Catalog --- */
.wp-learn-hero {
    background: linear-gradient(135deg, var(--wp-primary-pale) 0%, var(--wp-bg-card) 60%);
    border: 1px solid var(--wp-primary-lighter);
    border-radius: var(--wp-radius-lg);
    overflow: hidden;
}

.wp-learn-stat {
    background: var(--wp-bg-card);
    border: 1px solid var(--wp-primary-lighter);
    border-radius: var(--wp-radius-md);
    padding: 0.875rem 1.25rem;
    text-align: center;
    box-shadow: var(--wp-shadow-sm);
    min-width: 90px;
}

.wp-learn-stat-value {
    font-family: var(--wp-font-display);
    font-size: 1.875rem;
    font-weight: 800;
    line-height: 1;
    color: var(--wp-primary-text);
    letter-spacing: -0.03em;
}

.wp-learn-stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--wp-text-tertiary);
    margin-top: 0.25rem;
    font-weight: 500;
}

/* --- Course cards --- */
.wp-learn-course-card {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.wp-learn-course-card:hover {
    text-decoration: none;
    color: inherit;
}

.wp-learn-course-card-inner {
    background: var(--wp-bg-card);
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius-md);
    padding: 1.25rem;
    height: 100%;
    transition: all var(--wp-transition);
}

.wp-learn-course-card:hover .wp-learn-course-card-inner {
    transform: translateY(-2px);
    border-color: var(--wp-primary-light);
    box-shadow: var(--wp-shadow-md);
}

.wp-learn-course-card--done .wp-learn-course-card-inner {
    background: var(--wp-primary-pale);
    border-color: var(--wp-primary-lighter);
}

.wp-learn-cat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--wp-radius-md);
    background: var(--wp-primary-pale);
    color: var(--wp-primary-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wp-learn-cat-icon svg {
    width: 20px;
    height: 20px;
}

.wp-learn-cat-icon--small {
    width: 32px;
    height: 32px;
}

.wp-learn-cat-icon--small svg {
    width: 16px;
    height: 16px;
}

.wp-learn-cat-icon--large {
    width: 64px;
    height: 64px;
    border-radius: var(--wp-radius-lg);
}

.wp-learn-cat-icon--large svg {
    width: 32px;
    height: 32px;
}

.wp-learn-cat-icon--done {
    background: var(--wp-success-light);
    color: var(--wp-success);
}

.wp-learn-mins-badge {
    background: var(--wp-bg-section-alt);
    color: var(--wp-text-secondary);
    font-weight: 500;
    font-size: 0.7rem;
    padding: 0.3rem 0.55rem;
    border-radius: var(--wp-radius-full);
    border: 1px solid var(--wp-border);
    white-space: nowrap;
}

.wp-learn-mins-badge--success {
    background: var(--wp-success-light);
    color: var(--wp-success);
    border-color: var(--wp-success);
}

.wp-learn-mins-badge--warning {
    background: var(--wp-warning-light);
    color: var(--wp-warning);
    border-color: var(--wp-warning);
}

.wp-learn-mins-badge--primary {
    background: var(--wp-primary);
    color: var(--wp-text-on-primary);
    border-color: var(--wp-primary);
}

.wp-badge-primary, .wp-badge-warning, .wp-badge-danger {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: var(--wp-radius-full);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.wp-badge-primary {
    background: var(--wp-primary);
    color: var(--wp-text-on-primary);
}

.wp-badge-warning {
    background: var(--wp-warning);
    color: #fff;
}

.wp-badge-danger {
    background: var(--wp-danger);
    color: #fff;
}

.wp-learn-cert-mini {
    width: 36px;
    height: 36px;
    border-radius: var(--wp-radius-full);
    background: var(--wp-accent-light);
    color: var(--wp-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* --- Course detail page --- */
.wp-learn-detail-card {
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius-lg);
}

.wp-learn-meta-row {
    padding: 1rem 0;
    border-top: 1px solid var(--wp-border);
    border-bottom: 1px solid var(--wp-border);
}

.wp-learn-outcomes {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wp-learn-outcomes li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: var(--wp-text);
    line-height: 1.5;
}

.wp-learn-outcomes li svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.wp-learn-sidebar-card--assigned {
    background: var(--wp-primary-pale);
    border-color: var(--wp-primary-lighter);
}

/* --- Slide player --- */
.wp-learn-player {
    max-width: 880px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 6rem);
    background: var(--wp-bg-card);
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius-lg);
    box-shadow: var(--wp-shadow-md);
    overflow: hidden;
}

.wp-learn-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--wp-border);
    background: var(--wp-bg-section-alt);
}

.wp-learn-topbar-left {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    min-width: 0;
    flex: 1;
}

.wp-learn-exit {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--wp-radius);
    color: var(--wp-text-secondary);
    background: var(--wp-bg-card);
    border: 1px solid var(--wp-border);
    transition: all var(--wp-transition);
    flex-shrink: 0;
}

.wp-learn-exit:hover {
    color: var(--wp-text);
    background: var(--wp-bg-page);
}

.wp-learn-course-title {
    min-width: 0;
}

.wp-learn-course-title-main {
    font-family: var(--wp-font-display);
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--wp-text);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wp-learn-course-title-sub {
    font-size: 0.7rem;
    color: var(--wp-text-tertiary);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.wp-learn-topbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 200px;
}

.wp-learn-progress-bar {
    flex: 1;
    height: 8px;
    background: var(--wp-border);
    border-radius: var(--wp-radius-full);
    overflow: hidden;
}

.wp-learn-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--wp-primary), var(--wp-primary-light));
    border-radius: var(--wp-radius-full);
    transition: width var(--wp-duration-slow) var(--wp-ease-out);
}

.wp-learn-progress-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--wp-text-secondary);
    min-width: 32px;
    text-align: right;
}

/* --- Slide stage --- */
.wp-learn-stage {
    flex: 1;
    padding: 3rem 3rem 2rem;
    overflow-y: auto;
}

.wp-slide {
    animation: wpSlideIn var(--wp-duration-slow) var(--wp-ease-out);
    max-width: 68ch;
}

@keyframes wpSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

.wp-slide-title {
    font-family: var(--wp-font-display);
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--wp-text);
    margin-bottom: 1.5rem;
}

.wp-slide-body {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--wp-text);
}

.wp-slide-body p { margin-bottom: 1.125rem; }
.wp-slide-body p:last-child { margin-bottom: 0; }
.wp-slide-body strong { font-weight: 600; color: var(--wp-text); }

.wp-slide-body ul, .wp-slide-body ol {
    margin-bottom: 1.125rem;
    padding-left: 1.5rem;
}

.wp-slide-body li {
    margin-bottom: 0.375rem;
    line-height: 1.6;
}

.wp-slide-body h2 {
    font-family: var(--wp-font-display);
    font-size: 1.375rem;
    font-weight: 700;
    margin: 1.5rem 0 0.75rem;
    color: var(--wp-text);
}

.wp-slide-body h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 1.25rem 0 0.5rem;
    color: var(--wp-text);
}

.wp-slide-body table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
    border-radius: var(--wp-radius-md);
    overflow: hidden;
    border: 1px solid var(--wp-border);
}

.wp-slide-body th {
    background: var(--wp-primary-pale);
    color: var(--wp-text);
    font-weight: 600;
    text-align: left;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--wp-border);
}

.wp-slide-body td {
    padding: 0.625rem 0.875rem;
    border-top: 1px solid var(--wp-border);
    font-size: 0.9rem;
    vertical-align: top;
}

.wp-slide-body blockquote {
    margin: 1.25rem 0;
    padding: 0.875rem 1.125rem;
    border-left: 3px solid var(--wp-primary);
    background: var(--wp-primary-pale);
    border-radius: 0 var(--wp-radius) var(--wp-radius) 0;
    color: var(--wp-text);
}

.wp-slide-body code {
    font-family: var(--wp-font-mono);
    font-size: 0.875em;
    background: var(--wp-bg-section-alt);
    padding: 0.1rem 0.375rem;
    border-radius: 4px;
}

/* Cover slide */
.wp-slide-cover {
    text-align: center;
    padding: 2rem 0;
}

.wp-slide-cover-title {
    font-family: var(--wp-font-display);
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--wp-primary-text);
    margin-bottom: 1.5rem;
}

.wp-slide-cover-body {
    font-size: 1.125rem;
    color: var(--wp-text-secondary);
    line-height: 1.6;
}

.wp-slide-cover-body p {
    margin-bottom: 0.75rem;
}

/* Assessment header */
.wp-slide-assessment-header {
    margin-bottom: 1rem;
}

/* Callout */
.wp-callout {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: var(--wp-radius-lg);
    border: 1px solid;
}

.wp-callout--key-fact {
    background: var(--wp-primary-pale);
    border-color: var(--wp-primary-lighter);
    color: var(--wp-text);
}

.wp-callout--key-fact .wp-callout-icon { color: var(--wp-primary-text); }

.wp-callout--warning {
    background: var(--wp-warning-light);
    border-color: var(--wp-warning);
}

.wp-callout--warning .wp-callout-icon { color: var(--wp-warning); }

.wp-callout--danger {
    background: var(--wp-danger-light);
    border-color: var(--wp-danger);
}

.wp-callout--danger .wp-callout-icon { color: var(--wp-danger); }

.wp-callout-icon {
    flex-shrink: 0;
}

.wp-callout-title {
    font-family: var(--wp-font-display);
    font-weight: 700;
    font-size: 1.0625rem;
    margin-bottom: 0.375rem;
}

.wp-callout-body p { margin-bottom: 0.75rem; }
.wp-callout-body p:last-child { margin-bottom: 0; }

/* Knowledge check / assessment form */
.wp-check-form {
    max-width: 68ch;
}

.wp-check-option {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    margin-bottom: 0.625rem;
    border: 1.5px solid var(--wp-border);
    border-radius: var(--wp-radius-md);
    background: var(--wp-bg-card);
    cursor: pointer;
    transition: all var(--wp-transition);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.wp-check-option:hover {
    border-color: var(--wp-primary-light);
    background: var(--wp-primary-pale);
}

.wp-check-option input { display: none; }

.wp-check-option-marker {
    width: 22px;
    height: 22px;
    border: 2px solid var(--wp-border-dark);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 1px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--wp-transition);
}

.wp-check-option input:checked ~ .wp-check-option-marker {
    border-color: var(--wp-primary);
    background: var(--wp-primary);
    box-shadow: inset 0 0 0 4px var(--wp-bg-card);
}

.wp-check-option input[type="checkbox"] ~ .wp-check-option-marker {
    border-radius: 5px;
}

.wp-check-option input:checked ~ .wp-check-option-text {
    color: var(--wp-text);
    font-weight: 500;
}

/* ----- Feedback states (after answer submitted) ----- */

.wp-check-option--locked {
    cursor: default;
    pointer-events: none;
    position: relative;
}

.wp-check-option--locked:hover {
    border-color: var(--wp-border);
    background: var(--wp-bg-card);
}

.wp-check-option--correct {
    border-color: var(--wp-success) !important;
    background: var(--wp-success-light) !important;
    animation: wpOptionPulse var(--wp-duration-slower) var(--wp-ease-out);
}

.wp-check-option--correct .wp-check-option-marker {
    border-color: var(--wp-success);
    background: var(--wp-success);
    box-shadow: inset 0 0 0 3px var(--wp-success-light);
}

.wp-check-option--correct .wp-check-option-text {
    color: #0f5e30;
    font-weight: 500;
}

.wp-check-option--wrong {
    border-color: var(--wp-danger) !important;
    background: var(--wp-danger-light) !important;
    animation: wpOptionPulse var(--wp-duration-slower) var(--wp-ease-out);
}

.wp-check-option--wrong .wp-check-option-marker {
    border-color: var(--wp-danger);
    background: var(--wp-danger);
    box-shadow: inset 0 0 0 3px var(--wp-danger-light);
}

.wp-check-option--wrong .wp-check-option-text {
    color: #7f1d1d;
    font-weight: 500;
}

.wp-check-option-icon {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
}

.wp-check-option-icon--correct {
    background: var(--wp-success);
    color: #fff;
}

.wp-check-option-icon--wrong {
    background: var(--wp-danger);
    color: #fff;
}

@keyframes wpOptionPulse {
    0% { transform: scale(1); }
    40% { transform: scale(1.015); }
    100% { transform: scale(1); }
}

.wp-check-feedback {
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    border-radius: var(--wp-radius-md);
    border-left: 4px solid;
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--wp-text);
}

.wp-check-feedback--correct {
    background: var(--wp-success-light);
    border-left-color: var(--wp-success);
}

.wp-check-feedback--incorrect {
    background: var(--wp-warning-light);
    border-left-color: var(--wp-warning);
}

/* Bottom controls */
.wp-learn-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 2rem;
    border-top: 1px solid var(--wp-border);
    background: var(--wp-bg-card);
}

/* Complete / result screen */
.wp-learn-complete-card {
    border-radius: var(--wp-radius-lg);
    border: 1px solid var(--wp-border);
}

.wp-learn-complete-card--passed {
    background: linear-gradient(135deg, var(--wp-primary-pale) 0%, var(--wp-bg-card) 60%);
    border-color: var(--wp-primary-lighter);
}

.wp-learn-complete-icon {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.wp-learn-complete-icon--passed {
    background: var(--wp-success-light);
    color: var(--wp-success);
}

.wp-learn-complete-icon--failed {
    background: var(--wp-warning-light);
    color: var(--wp-warning);
}

.wp-learn-complete-cert {
    background: var(--wp-bg-card);
    border: 1px dashed var(--wp-primary-lighter);
    border-radius: var(--wp-radius-md);
    padding: 1rem 1.5rem;
    display: inline-block;
}

/* Certificate */
.wp-cert-wrapper {
    padding: 1rem 0;
    display: flex;
    justify-content: center;
}

.wp-cert {
    width: 100%;
    max-width: 900px;
    background: #fff;
    padding: 1rem;
}

.wp-cert-border {
    position: relative;
    border: 2px solid var(--wp-primary);
    border-radius: 4px;
    padding: 3rem 2.5rem;
    background: linear-gradient(135deg, #fff 0%, #fcfffe 100%);
}

.wp-cert-corner {
    position: absolute;
    width: 28px;
    height: 28px;
    border: 3px solid var(--wp-accent);
}

.wp-cert-corner--tl { top: -2px; left: -2px; border-right: none; border-bottom: none; }
.wp-cert-corner--tr { top: -2px; right: -2px; border-left: none; border-bottom: none; }
.wp-cert-corner--bl { bottom: -2px; left: -2px; border-right: none; border-top: none; }
.wp-cert-corner--br { bottom: -2px; right: -2px; border-left: none; border-top: none; }

.wp-cert-inner {
    text-align: center;
}

.wp-cert-header {
    margin-bottom: 2rem;
}

.wp-cert-logo {
    margin-bottom: 1.25rem;
}

.wp-cert-eyebrow {
    font-family: var(--wp-font-display);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--wp-text-tertiary);
    font-weight: 500;
}

.wp-cert-body {
    padding: 1.5rem 0;
}

.wp-cert-presented {
    font-size: 1rem;
    color: var(--wp-text-secondary);
    margin: 0.75rem 0;
}

.wp-cert-name {
    font-family: var(--wp-font-display);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--wp-primary-text);
    line-height: 1.2;
    margin: 0.75rem 0;
    letter-spacing: -0.02em;
}

.wp-cert-course {
    font-family: var(--wp-font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--wp-text);
    margin: 1rem 0;
    line-height: 1.3;
}

.wp-cert-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 2rem;
    gap: 2rem;
    flex-wrap: wrap;
    text-align: left;
}

.wp-cert-signoff {
    flex: 1;
    min-width: 240px;
}

.wp-cert-signoff-line {
    border-bottom: 1px solid var(--wp-text-tertiary);
    height: 1.5rem;
    margin-bottom: 0.25rem;
}

.wp-cert-signoff-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--wp-text-tertiary);
    margin-bottom: 0.375rem;
}

.wp-cert-signoff-name {
    font-weight: 600;
    color: var(--wp-text);
}

.wp-cert-signoff-creds {
    font-size: 0.8125rem;
    color: var(--wp-text-secondary);
}

.wp-cert-signoff-pending {
    font-size: 0.8125rem;
    color: var(--wp-warning);
    font-style: italic;
}

.wp-cert-serial {
    text-align: right;
}

.wp-cert-serial-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--wp-text-tertiary);
    margin-bottom: 0.25rem;
}

.wp-cert-serial-value {
    font-family: var(--wp-font-mono);
    font-size: 0.875rem;
    color: var(--wp-text);
    font-weight: 600;
}

.wp-cert-serial-version,
.wp-cert-serial-expires {
    font-size: 0.75rem;
    color: var(--wp-text-tertiary);
    margin-top: 0.25rem;
}

/* Print styles for certificate */
@media print {
    .wp-sidebar, .wp-mobile-header, ._footer, .wp-content-body > * { display: none !important; }
    .wp-cert-wrapper { display: block !important; }
    .wp-cert { max-width: none; padding: 0; }
    .wp-cert-border { padding: 2.5rem 2rem; }
}

/* Mobile */
@media (max-width: 768px) {
    .wp-learn-stage { padding: 1.5rem 1.25rem; }
    .wp-slide-title { font-size: 1.5rem; }
    .wp-slide-cover-title { font-size: 2rem; }
    .wp-learn-topbar-right { min-width: 120px; }
    .wp-learn-controls { padding: 1rem 1.25rem; }
    .wp-cert-name { font-size: 1.75rem; }
    .wp-cert-course { font-size: 1.25rem; }
    .wp-cert-border { padding: 2rem 1.25rem; }
}

/* ─────────────────────────────────────────────────────────
   User profile read-only field grid (definition-list style)
   ───────────────────────────────────────────────────────── */
.wp-field-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.25rem 2rem;
    margin-bottom: 1.25rem;
}
@media (min-width: 992px) {
    .wp-field-grid { grid-template-columns: 1fr 1fr; }
}
.wp-field {
    display: flex;
    flex-direction: column;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--wp-border);
    min-width: 0;
}
.wp-field__label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--wp-text-secondary);
    margin-bottom: 0.15rem;
}
.wp-field__value {
    font-size: 0.95rem;
    color: var(--wp-text);
    word-break: break-word;
    min-height: 1.4rem;
    line-height: 1.4;
}
.wp-field--full {
    grid-column: 1 / -1;
}

/* ─────────────────────────────────────────────────────────
   User profile hero strip
   ───────────────────────────────────────────────────────── */
.wp-profile-hero {
    background: var(--wp-bg-card);
    border-radius: var(--wp-radius);
    box-shadow: var(--wp-shadow-sm);
    padding: 1.5rem 1.75rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    border-left: 4px solid var(--wp-primary);
}
.wp-profile-hero__avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-color: var(--wp-primary);
    color: #fff;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.wp-profile-hero__main {
    flex: 1;
    min-width: 240px;
}
.wp-profile-hero__name-row {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    flex-wrap: wrap;
    margin-bottom: 0.15rem;
}
.wp-profile-hero__name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--wp-text);
    margin: 0;
    line-height: 1.2;
}
.wp-profile-hero__title {
    font-size: 0.95rem;
    color: var(--wp-text-secondary);
    margin: 0 0 0.875rem 0;
}
.wp-profile-hero__meta {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}
.wp-profile-hero__meta-item {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.wp-profile-hero__meta-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--wp-text-tertiary);
    font-weight: 600;
    margin-bottom: 0.1rem;
}
.wp-profile-hero__meta-value {
    color: var(--wp-text);
    font-weight: 500;
    font-size: 0.9rem;
}
.wp-profile-hero__status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.wp-profile-hero__status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.wp-profile-hero__status--active {
    background: var(--wp-success-light);
    color: var(--wp-success);
}
.wp-profile-hero__status--ended {
    background: var(--wp-danger-light);
    color: var(--wp-danger);
}

@media (max-width: 575px) {
    .wp-profile-hero { padding: 1.25rem; gap: 1rem; }
    .wp-profile-hero__avatar { width: 64px; height: 64px; font-size: 1.25rem; }
    .wp-profile-hero__name { font-size: 1.25rem; }
    .wp-profile-hero__meta { gap: 1.25rem; }
}

/* ==============================
   Required-field asterisk
   ==============================
   Form labels in this project use a trailing " *" to mark required fields.
   A small global script in base.html wraps that asterisk in this span so
   it stands out in red. Applies to every form, no per-template changes. */
.wp-req-asterisk {
    color: #dc2626;
    font-weight: 700;
    margin-left: 0.125rem;
}

/* ==============================
   Brand search typeahead
   ==============================
   Phase 2.6 of the 2026-05-20 mobile feedback plan. Suggestion dropdown
   anchored below the search input on /benefits/. Vanilla JS in home.html
   populates the list; this stylesheet defines the look. */
.wp-typeahead {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin: 0.25rem 0 0 0;
    padding: 0.25rem 0;
    background: var(--wp-bg-card);
    border: 1px solid var(--wp-border);
    border-radius: 0.5rem;
    box-shadow: var(--wp-shadow-lg);
    list-style: none;
    z-index: 30;
    max-height: 24rem;
    overflow-y: auto;
}

.wp-typeahead-item { padding: 0; }

.wp-typeahead-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    color: var(--wp-text);
    text-decoration: none;
    border-radius: 0.25rem;
}

.wp-typeahead-link:hover,
.wp-typeahead-item--active .wp-typeahead-link {
    background: var(--wp-primary-ghost);
    color: var(--wp-text);
}

.wp-typeahead-logo {
    width: 36px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 0.25rem;
}

.wp-typeahead-logo--placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--wp-primary-lighter);
    color: var(--wp-primary-text);
    font-weight: 700;
    font-size: 0.75rem;
}

.wp-typeahead-name {
    flex: 1;
    font-weight: 500;
    font-size: 0.9rem;
}

.wp-typeahead-pct {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--wp-success);
    background: var(--wp-success-light);
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    flex-shrink: 0;
}

/* ==============================
   Bank-payment screen CTA
   ==============================
   Phase 3.3 of the 2026-05-20 mobile feedback plan. The "I've sent it —
   check status" button needs to be reachable above the fold when the
   user returns from their banking app. On narrow viewports we stick it
   to the bottom of the screen; on wider screens it lives in the flow. */
.wp-bankpay-cta-wrap {
    margin-top: 1rem;
}

@media (max-width: 767px) {
    .wp-bankpay-cta-wrap {
        position: sticky;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 20;
        padding: 0.75rem;
        background: var(--wp-bg-page);
        border-top: 1px solid var(--wp-border);
        margin-left: -1rem;
        margin-right: -1rem;
        margin-bottom: -1rem;
    }
}

/* ==============================
   Floating basket widget
   ==============================
   2026-06-10: Replaced the floating .wp-basket-widget pill (originally
   restored 2026-05-21) with a real top bar. Testers were missing the
   floating widget because it looked like a CTA, not a header cart icon —
   "used to seeing it in top right in other online shops". The .wp-topbar
   lives at the top of .wp-content; .wp-topbar-basket is the circular
   icon button with an accent-coloured count badge. Hidden on mobile
   (mobile header / sidebar drawer continue to cover that surface). */
.wp-topbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 0.5rem 1.5rem;
    background: var(--wp-bg-card);
    border-bottom: 1px solid var(--wp-border);
    min-height: 56px;
}

/* When the host div is empty (no items in basket, or on /benefits/basket
   itself), collapse the whole bar so non-shopping pages don't get a 56px
   empty strip across the top. :has() is supported in Chrome 105+, Safari
   15.4+, Firefox 121+ — fine for the corporate-app target. */
.wp-topbar:has(#wp-basket-widget-host:empty) {
    display: none;
}

.wp-topbar-basket {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--wp-bg-section-alt, #f1f5f9);
    color: var(--wp-text, #1e293b);
    text-decoration: none;
    transition: background var(--wp-transition), color var(--wp-transition), transform var(--wp-transition);
}

.wp-topbar-basket:hover {
    background: var(--wp-primary, #0f766e);
    color: #fff;
    transform: translateY(-1px);
}

.wp-topbar-basket:focus-visible {
    outline: 3px solid var(--wp-primary-ring);
    outline-offset: 2px;
}

.wp-topbar-basket__icon {
    width: 20px;
    height: 20px;
}

.wp-topbar-basket__badge {
    position: absolute;
    top: -4px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    background: var(--wp-accent, #f59e0b);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--wp-bg-card);
}

@media (max-width: 991.98px) {
    .wp-topbar { display: none; }
}

/* Mobile-header counterpart of the topbar basket icon (the topbar itself is
   hidden under 992px). Reuses .wp-topbar-basket for the button + badge;
   margin-left:auto pushes it to the right edge of .wp-mobile-header. */
#wp-mobile-basket-host {
    margin-left: auto;
    display: flex;
    align-items: center;
}

/* ==============================
   Breadcrumb (auto-derived from app/nav.py)
   ==============================
   Rendered just above the content body on pages where the endpoint has a
   sidebar parent different from itself (auto via breadcrumb_for() in
   _breadcrumb.html). Pages can override the trail by passing a `breadcrumb`
   context variable to render_template(). */
.wp-breadcrumb {
    /* Sits between the sidebar/content top and the page hero — tight by
       design, like Linear/Vercel. Wraps on narrow viewports. */
    margin: 0 0 0.875rem;
    min-width: 0;
}
.wp-breadcrumb__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    font-size: 0.8125rem;       /* 13px — quiet, supportive of the H1 */
    line-height: 1.4;
    letter-spacing: 0.005em;
    /* Was a hardcoded slate-400 (#94a3b8) — 2.45:1 on white, failing AA on
       every page with a breadcrumb, and it never followed the dark theme.
       Use the muted token so it tracks both. */
    color: var(--wp-text-muted);
}
.wp-breadcrumb__item {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}
/* Chevron between items — drawn in CSS so it scales perfectly with the
   font. Inline SVG would require an extra <img>/<svg> element per gap. */
.wp-breadcrumb__item + .wp-breadcrumb__item::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin: 0 0.625rem;
    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
    transform: rotate(45deg);
    opacity: 0.55;
    flex-shrink: 0;
}
.wp-breadcrumb__link {
    color: inherit;
    text-decoration: none;
    padding: 2px 4px;
    margin: -2px -4px;          /* preserve baseline, expand tap target */
    border-radius: 4px;
    transition: color 120ms ease, background-color 120ms ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 28ch;
}
.wp-breadcrumb__link:hover,
.wp-breadcrumb__link:focus-visible {
    color: var(--wp-primary-text, #0f766e);
    background-color: var(--wp-primary-lighter, rgba(15, 118, 110, 0.06));
    text-decoration: none;
    outline: none;
}
.wp-breadcrumb__link:focus-visible {
    box-shadow: 0 0 0 2px var(--wp-primary, #0f766e);
}
.wp-breadcrumb__item--current {
    color: var(--wp-text, #1e293b);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 36ch;
}

/* Tighter on narrow viewports — the trail should never push H1 below
   the fold. */
@media (max-width: 575.98px) {
    .wp-breadcrumb {
        margin-bottom: 0.625rem;
    }
    .wp-breadcrumb__list {
        font-size: 0.75rem;
    }
    .wp-breadcrumb__item + .wp-breadcrumb__item::before {
        margin: 0 0.4375rem;
        width: 5px;
        height: 5px;
    }
    .wp-breadcrumb__link {
        max-width: 18ch;
    }
    .wp-breadcrumb__item--current {
        max-width: 22ch;
    }
}
