/* ===== Custom Fonts ===== */
@font-face {
    font-family: 'Onest';
    src: url('/fonts/Onest-VariableFont_wght.woff2') format('woff2-variations');
    font-weight: 100 900;
    font-display: swap;
}

/* ===== Global CSS Variables ===== */
:root {
    /* ===== Navigation chrome tokens (exercise recolour) =====
       Live defaults equal the literals the navigation stylesheets used before they were tokenised;
       html[data-kora-mode="exercise"] below swaps them for the amber look. */
    --kx-nav-bg: rgba(10, 8, 7, 0.72);
    --kx-nav-accent: #00D4AA;
    --kx-nav-active-bg: rgba(0, 212, 170, 0.15);
    --kx-nav-active-bg-strong: rgba(0, 212, 170, 0.2);
    --kx-nav-accent-border: rgba(0, 212, 170, 0.4);
    --kx-strip-bg: transparent;
    --kx-strip-height: 0px;

    /* ===== App frame (one-frame redesign, 8 Nov 2026) =====
       The SideNav, the top bar and the phone bar are one solid surface in --kx-frame, and the page sits inside it as
       a rounded sheet. --kx-frame is the colour the rail already showed (--kx-nav-bg laid over its #5a5653 base), made
       solid so nothing needs a blur. --kx-frame-bar is the top bar's height, the same as the launcher tile in the
       rail's corner; --kx-frame-gap is the frame's margin right of and below the sheet. */
    --kx-frame: #201e1c;
    --kx-frame-bar: 56px;
    --kx-frame-gap: 8px;
    --kx-frame-gap-phone: 6px;
    /* The phone bar's height (MobileNav), less the home-indicator inset it adds itself. 60px on the smallest phones. */
    --kx-phone-bar: 64px;
    /* What the phone bar really covers: its height plus the home-indicator inset. Use this for anything above it. */
    --kx-phone-nav: calc(var(--kx-phone-bar) + env(safe-area-inset-bottom, 0px));
    --kx-frame-radius: 14px;
    /* What sits on the frame: text and icons, quieter text, hover and pressed tints, the tiles (launcher, search,
       profile card) and hairlines. White on the dark frame; the light frame below swaps them. */
    --kx-frame-ink: #ffffff;
    --kx-frame-ink-soft: rgba(255, 255, 255, 0.6);
    --kx-frame-ink-faint: rgba(255, 255, 255, 0.3);
    --kx-frame-hover: rgba(255, 255, 255, 0.08);
    --kx-frame-tile: rgba(255, 255, 255, 0.09);
    --kx-frame-tile-hover: rgba(255, 255, 255, 0.16);
    --kx-frame-line: rgba(255, 255, 255, 0.1);
    /* A hairline round the page sheet: none on the dark frame, where the contrast is already plain. */
    --kx-frame-sheet-edge: transparent;
    --kx-frame-logo-filter: brightness(0) invert(1);

    /* Font Awesome 7.1.0 Font Families */
    --fa-font-family-free: "Font Awesome 7 Free";
    --fa-font-family-brands: "Font Awesome 7 Brands";

    /* ===== SEMANTIC COLOR PALETTE - Option A Strict Consolidation ===== */

    /* Primary Semantic Colors */
    --color-success: #27ae60;           /* Green - Tasks, completion, active, success states */
    --color-danger: #e74c3c;            /* Red - Errors, alerts, critical, delete operations */
    --color-info: #3498db;              /* Blue - Information, data, observations */
    --color-warning: #ff9800;           /* Orange - Warnings, caution, requires attention */
    --color-primary: #db7093;           /* Pink - Reproductive focus, specialized domain */
    --color-quarantine: #ffc107;        /* Amber - Quarantine states, exclusions */
    --color-neutral: #7f8c8d;           /* Grey - Neutral, inactive, disabled, unknown */

    /* Text Colors */
    --color-text-primary: #2c3e50;      /* Dark text - primary content */
    /* Secondary and muted grey text: deep enough to read at 4.5:1 on white (WCAG 1.4.3, accessibility audit
       20 Nov 2026; they were #7f8c8d at 3.47:1 and #95a5a6 at 2.6:1). */
    --color-text-secondary: #64748b;    /* Grey text - secondary content */
    --color-text-light: #6b7280;        /* Light grey text - muted content */
    --color-text-white: #ffffff;        /* White text - on dark backgrounds */

    /* Background & Border Colors */
    --color-background-light: #f8fafc;  /* Light background */
    --color-background-white: #ffffff;  /* Pure white background */
    --color-background-muted: #fafbfc; /* Muted grey background */
    --color-background-hover: rgba(0, 0, 0, 0.05);  /* Subtle hover background for interactive elements */
    --color-border-light: #e1e5e9;      /* Light border */
    --color-border-medium: #d0d5db;     /* Medium border */
    --color-border-charcoal: #3f4652;   /* Charcoal border - modern 2025 minimal design */

    /* ===== SUCCESS COLOR PALETTE (Green #27ae60) ===== */
    --color-success-50: rgba(39, 174, 96, 0.1);    /* Lightest - backgrounds */
    --color-success-100: rgba(39, 174, 96, 0.2);   /* Very light - subtle backgrounds */
    --color-success-300: rgba(39, 174, 96, 0.3);   /* Light - muted states */
    --color-success-500: rgba(39, 174, 96, 0.5);   /* Medium - standard use */
    --color-success-600: rgba(39, 174, 96, 0.6);   /* Medium-dark - hover states */
    --color-success-800: rgba(39, 174, 96, 0.8);   /* Dark - badges, avatars */
    --color-success-full: #27ae60;                 /* Solid - strong emphasis */

    /* ===== DANGER COLOR PALETTE (Red #e74c3c) ===== */
    --color-danger-50: rgba(231, 76, 60, 0.1);     /* Lightest - backgrounds */
    --color-danger-100: rgba(231, 76, 60, 0.2);    /* Very light - subtle backgrounds */
    --color-danger-300: rgba(231, 76, 60, 0.3);    /* Light - muted states */
    --color-danger-500: rgba(231, 76, 60, 0.5);    /* Medium - standard use */
    --color-danger-600: rgba(231, 76, 60, 0.6);    /* Medium-dark - hover states */
    --color-danger-800: rgba(231, 76, 60, 0.8);    /* Dark - badges, count indicators */
    --color-danger-full: #e74c3c;                  /* Solid - strong emphasis */

    /* ===== INFO COLOR PALETTE (Blue #3498db) ===== */
    --color-info-50: rgba(52, 152, 219, 0.1);      /* Lightest - backgrounds */
    --color-info-100: rgba(52, 152, 219, 0.2);     /* Very light - subtle backgrounds */
    --color-info-300: rgba(52, 152, 219, 0.3);     /* Light - muted states */
    --color-info-500: rgba(52, 152, 219, 0.5);     /* Medium - standard use */
    --color-info-600: rgba(52, 152, 219, 0.6);     /* Medium-dark - hover states */
    --color-info-800: rgba(52, 152, 219, 0.8);     /* Dark - badges, avatars */
    --color-info-full: #3498db;                    /* Solid - strong emphasis */

    /* ===== WARNING COLOR PALETTE (Orange #ff9800) ===== */
    --color-warning-50: rgba(255, 152, 0, 0.1);    /* Lightest - backgrounds */
    --color-warning-100: rgba(255, 152, 0, 0.2);   /* Very light - subtle backgrounds */
    --color-warning-300: rgba(255, 152, 0, 0.3);   /* Light - muted states */
    --color-warning-500: rgba(255, 152, 0, 0.5);   /* Medium - standard use */
    --color-warning-600: rgba(255, 152, 0, 0.6);   /* Medium-dark - hover states */
    --color-warning-800: rgba(255, 152, 0, 0.8);   /* Dark - badges, avatars */
    --color-warning-full: #ff9800;                 /* Solid - strong emphasis */

    /* ===== PRIMARY (PINK) COLOR PALETTE (#db7093) ===== */
    --color-primary-50: rgba(219, 112, 147, 0.1);  /* Lightest - backgrounds */
    --color-primary-100: rgba(219, 112, 147, 0.2); /* Very light - subtle backgrounds */
    --color-primary-300: rgba(219, 112, 147, 0.3); /* Light - muted states */
    --color-primary-500: rgba(219, 112, 147, 0.5); /* Medium - standard use */
    --color-primary-600: rgba(219, 112, 147, 0.6); /* Medium-dark - hover states */
    --color-primary-800: rgba(219, 112, 147, 0.8); /* Dark - badges, avatars */
    --color-primary-full: #db7093;                 /* Solid - strong emphasis */

    /* ===== QUARANTINE (AMBER) COLOR PALETTE (#ffc107) ===== */
    --color-quarantine-50: rgba(255, 193, 7, 0.1);   /* Lightest - backgrounds */
    --color-quarantine-100: rgba(255, 193, 7, 0.2);  /* Very light - subtle backgrounds */
    --color-quarantine-300: rgba(255, 193, 7, 0.3);  /* Light - muted states */
    --color-quarantine-500: rgba(255, 193, 7, 0.5);  /* Medium - standard use */
    --color-quarantine-600: rgba(255, 193, 7, 0.6);  /* Medium-dark - hover states */
    --color-quarantine-800: rgba(255, 193, 7, 0.8);  /* Dark - badges, avatars */
    --color-quarantine-full: #ffc107;                /* Solid - strong emphasis */

    /* ===== NEUTRAL (GREY) COLOR PALETTE (#7f8c8d) ===== */
    --color-neutral-50: rgba(127, 140, 141, 0.1);   /* Lightest - backgrounds */
    --color-neutral-100: rgba(127, 140, 141, 0.2);  /* Very light - subtle backgrounds */
    --color-neutral-300: rgba(127, 140, 141, 0.3);  /* Light - muted states */
    --color-neutral-500: rgba(127, 140, 141, 0.5);  /* Medium - standard use */
    --color-neutral-600: rgba(127, 140, 141, 0.6);  /* Medium-dark - hover states */
    --color-neutral-800: rgba(127, 140, 141, 0.8);  /* Dark - badges, text */
    --color-neutral-full: #7f8c8d;                  /* Solid - strong emphasis */

    /* ===== COMMON STATUS UTILITIES ===== */
    /* These map to semantic classes like .is-success, .is-danger, etc. */
    --color-status-success: var(--color-success-full);
    --color-status-danger: var(--color-danger-full);
    --color-status-warning: var(--color-warning-full);
    --color-status-info: var(--color-info-full);
    --color-status-light: var(--color-neutral-full);

    /* Validation States */
    --color-valid: #26b050;             /* Validation success */
    --color-invalid: #e50000;           /* Validation error */

    /* Link & Button Colors */
    --color-link: #006bb7;              /* Primary link color */
    --color-button-primary: #1b6ec2;    /* Primary button background */
    --color-button-primary-border: #1861ac;  /* Primary button border */
    --color-button-focus: #258cfb;      /* Focus state color */

    /* ===== LEGACY/SPECIFIC COLORS ===== */
    /* These colors are used in specific components and maintained for reference */
    --color-success-teal: #41b090;      /* OIS form success variant */
    --color-heat-cycle: #ff4500;        /* Reproductive heat state */
    --color-light-pink: #ffb6c1;        /* Light pink for bred state */
    --color-light-green: #90ee90;       /* Light green for female ready */
    --color-dodger-blue: #1e90ff;       /* Male active state */
    --color-instruction-blue: #0066cc;  /* Tooltip instruction color */

    /* ===== FONT WEIGHT VARIABLES ===== */
    /* Onest variable font supports weights from 100 (Thin) to 900 (Black) */
    --font-weight-thin: 100;
    --font-weight-extra-light: 200;
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semi-bold: 600;
    --font-weight-bold: 700;
    --font-weight-extra-bold: 800;
    --font-weight-black: 900;

    /* ===== SEMANTIC FONT WEIGHTS ===== */
    /* For common use cases across the application */
    --font-weight-body: var(--font-weight-normal);        /* Body text */
    --font-weight-emphasis: var(--font-weight-semi-bold); /* Emphasized text */
    --font-weight-heading: var(--font-weight-bold);       /* Headings */
    --font-weight-label: var(--font-weight-medium);       /* Form labels, badges */
    --font-weight-caption: var(--font-weight-light);      /* Captions, hints */

    /* ===== FONT SIZE SCALE ===== */
    /* Standardized font sizes for consistent typography hierarchy across the application */
    --font-size-xs: 0.75rem;        /* Extra small - captions, badges */
    --font-size-sm: 0.875rem;       /* Small - labels, help text, secondary content */
    --font-size-base: 1rem;         /* Base - body text, standard content */
    --font-size-lg: 1.125rem;       /* Large - section headers, emphasis */
    --font-size-xl: 1.25rem;        /* Extra large - subsection titles */
    --font-size-2xl: 1.5rem;        /* 2XL - primary page titles */
    --font-size-3xl: 1.875rem;      /* 3XL - major section headers */
    --font-size-4xl: 2.25rem;       /* 4XL - hero/banner titles */

    /* ===== SEMANTIC FONT SIZES ===== */
    /* Semantic size mappings for common use cases */
    --font-size-body: var(--font-size-base);              /* Body text - standard reading */
    --font-size-caption: var(--font-size-xs);             /* Captions, small hints */
    --font-size-label: var(--font-size-sm);               /* Form labels, badges */
    --font-size-heading-sm: var(--font-size-xl);          /* Small headings, subsections */
    --font-size-heading-md: var(--font-size-2xl);         /* Medium headings, page titles */
    --font-size-heading-lg: var(--font-size-3xl);         /* Large headings, section titles */
    --font-size-heading-xl: var(--font-size-4xl);         /* Extra large - hero titles */

    /* ===== BUTTON STATE VARIABLES ===== */

    /* PRIMARY BUTTON - Blue (#3498db) */
    --button-primary-bg: var(--color-info-full);
    --button-primary-bg-hover: var(--color-info-600);
    --button-primary-bg-active: var(--color-info-800);
    --button-primary-bg-disabled: var(--color-neutral-300);
    --button-primary-text: var(--color-text-white);
    --button-primary-text-disabled: var(--color-text-secondary);
    --button-primary-border: var(--color-info-full);
    --button-primary-border-hover: var(--color-info-600);
    --button-primary-border-active: var(--color-info-800);
    --button-primary-border-disabled: var(--color-neutral-300);
    --button-primary-focus: var(--color-button-focus);

    /* SECONDARY BUTTON - Grey */
    --button-secondary-bg: var(--color-background-light);
    --button-secondary-bg-hover: var(--color-border-light);
    --button-secondary-bg-active: var(--color-border-medium);
    --button-secondary-bg-disabled: var(--color-neutral-100);
    --button-secondary-text: var(--color-text-secondary);
    --button-secondary-text-disabled: var(--color-neutral-300);
    --button-secondary-border: var(--color-border-light);
    --button-secondary-border-hover: var(--color-border-medium);
    --button-secondary-border-active: var(--color-border-medium);
    --button-secondary-border-disabled: var(--color-neutral-100);
    --button-secondary-focus: var(--color-button-focus);

    /* SUCCESS BUTTON - Green (#27ae60) */
    --button-success-bg: var(--color-success-full);
    --button-success-bg-hover: var(--color-success-600);
    --button-success-bg-active: var(--color-success-800);
    --button-success-bg-disabled: var(--color-neutral-300);
    --button-success-text: var(--color-text-white);
    --button-success-text-disabled: var(--color-text-secondary);
    --button-success-border: var(--color-success-full);
    --button-success-border-hover: var(--color-success-600);
    --button-success-border-active: var(--color-success-800);
    --button-success-border-disabled: var(--color-neutral-300);
    --button-success-focus: var(--color-button-focus);

    /* DANGER BUTTON - Red (#e74c3c) */
    --button-danger-bg: var(--color-danger-full);
    --button-danger-bg-hover: var(--color-danger-600);
    --button-danger-bg-active: var(--color-danger-800);
    --button-danger-bg-disabled: var(--color-neutral-300);
    --button-danger-text: var(--color-text-white);
    --button-danger-text-disabled: var(--color-text-secondary);
    --button-danger-border: var(--color-danger-full);
    --button-danger-border-hover: var(--color-danger-600);
    --button-danger-border-active: var(--color-danger-800);
    --button-danger-border-disabled: var(--color-neutral-300);
    --button-danger-focus: var(--color-button-focus);

    /* WARNING BUTTON - Orange (#ff9800) */
    --button-warning-bg: var(--color-warning-full);
    --button-warning-bg-hover: var(--color-warning-600);
    --button-warning-bg-active: var(--color-warning-800);
    --button-warning-bg-disabled: var(--color-neutral-300);
    --button-warning-text: var(--color-text-white);
    --button-warning-text-disabled: var(--color-text-secondary);
    --button-warning-border: var(--color-warning-full);
    --button-warning-border-hover: var(--color-warning-600);
    --button-warning-border-active: var(--color-warning-800);
    --button-warning-border-disabled: var(--color-neutral-300);
    --button-warning-focus: var(--color-button-focus);

    /* ===== GRADIENT VARIABLES ===== */
    /* Standard gradients used throughout the application for consistency and theming */

    /* CORE ACCENT GRADIENTS - Use sparingly for special actions (login, primary CTAs) */
    --gradient-action-primary: linear-gradient(135deg, #41b090 0%, #3498db 100%);        /* Teal to Blue - Login, critical actions */
    --gradient-action-primary-hover: linear-gradient(135deg, #3498db 0%, #41b090 100%); /* Reversed for hover depth effect */

    /* SUBTLE DEPTH GRADIENTS - Light backgrounds for cards, panels, modals */
    --gradient-card-light: linear-gradient(135deg, #f0f4f8 0%, #ffffff 100%);           /* Light blue to white - Cards, panels */
    --gradient-panel-overlay: linear-gradient(135deg, rgba(240, 244, 248, 0.8) 0%, rgba(255, 255, 255, 0.9) 100%); /* Translucent variant */
    --gradient-modal-content: linear-gradient(135deg, #f0f4f8 0%, #ffffff 100%);        /* Modal backgrounds */

    /* BUTTON GRADIENTS - Theme variants with consistent 135-degree angle */
    --gradient-button-primary: linear-gradient(135deg, #3498db 0%, #2980b9 100%);       /* Blue - Primary buttons */
    --gradient-button-primary-hover: linear-gradient(135deg, #2980b9 0%, #3498db 100%); /* Reversed for hover */

    --gradient-button-secondary: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);     /* Grey - Secondary buttons */
    --gradient-button-secondary-hover: linear-gradient(135deg, #7f8c8d 0%, #95a5a6 100%); /* Reversed for hover */

    --gradient-button-success: linear-gradient(135deg, #41b090 0%, #2d7a5e 100%);       /* Green - Success buttons */
    --gradient-button-success-hover: linear-gradient(135deg, #2d7a5e 0%, #41b090 100%); /* Reversed for hover */

    --gradient-button-danger: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);        /* Red - Danger buttons */
    --gradient-button-danger-hover: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%); /* Reversed for hover */

    --gradient-button-warning: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);       /* Orange - Warning buttons */
    --gradient-button-warning-hover: linear-gradient(135deg, #f57c00 0%, #ff9800 100%); /* Reversed for hover */

    --gradient-button-purple: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);        /* Purple variant */
    --gradient-button-purple-hover: linear-gradient(135deg, #6d28d9 0%, #7c3aed 100%); /* Reversed for hover */

    --gradient-button-pink: linear-gradient(135deg, #db7093 0%, #c25a73 100%);          /* Pink - Reproductive domain */
    --gradient-button-pink-hover: linear-gradient(135deg, #c25a73 0%, #db7093 100%);   /* Reversed for hover */

    /* STATUS & INTERACTIVE GRADIENTS */
    /* Progress bars and status indicators */
    --gradient-progress-warning: linear-gradient(90deg, #ff9800, #ffb74d);              /* Orange progress bar */
    --gradient-progress-success: linear-gradient(90deg, #2ecc71, #58d68d);              /* Green complete/success state */

    /* Avatar & Status Indicator with glassmorphism overlay */
    --gradient-avatar-overlay: linear-gradient(45deg, currentColor, rgba(255, 255, 255, 0.2)); /* Uses status color + white overlay */

    /* Quarantine warning gradient - intensity combination */
    --gradient-quarantine-warning: linear-gradient(135deg, #ffc107 0%, #ff9800 50%, #f57c00 100%); /* Amber to Orange intensity */
    --gradient-quarantine-subtle: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 152, 0, 0.05) 100%); /* Subtle background */

    /* Task card pattern gradients */
    --gradient-task-red: linear-gradient(90deg, #ef4444, #f59e0b);                      /* Red/Orange for urgent tasks */
    --gradient-task-green: linear-gradient(90deg, #10b981, #059669);                    /* Green for completed tasks */
    --gradient-task-purple: linear-gradient(90deg, #8b5cf6, #7c3aed);                   /* Purple for special tasks */
    --gradient-task-pink: linear-gradient(90deg, #ec4899, #db2777);                     /* Pink for reproductive tasks */
    --gradient-task-amber: linear-gradient(90deg, #f59e0b, #d97706);                    /* Amber for pending tasks */

    /* Calendar and interactive elements */
    --gradient-calendar-header: linear-gradient(135deg, #41b090 0%, #3498db 100%);      /* Teal to blue header */
    --gradient-calendar-overlay: linear-gradient(135deg, rgba(65, 176, 144, 0.2), rgba(52, 152, 219, 0.2)); /* Subtle overlay */
    --gradient-calendar-light: linear-gradient(135deg, #e8ecf0 0%, #f5f7fa 100%);       /* Light background */

    /* ===== BORDER-RADIUS SCALE ===== */
    /* Standardized corner radius values for consistent spacing and design language */

    --radius-xs: 2px;       /* Minimal rounding - small components, borders */
    --radius-sm: 4px;       /* Small rounding - inputs, small buttons */
    --radius-md: 6px;       /* Medium rounding - subtle components */
    --radius-lg: 8px;       /* Standard rounding - cards, panels, dropdowns */
    --radius-xl: 10px;      /* Large rounding - prominent elements, badges */
    --radius-2xl: 12px;     /* Extra large - major sections, modals */
    --radius-3xl: 16px;     /* Premium rounding - special components */
    --radius-4xl: 20px;     /* Maximum rounding - pill shapes, badges */
    --radius-full: 50%;     /* Full circle/pill - circular avatars, icon buttons */

    /* ===== SMART BADGE SYSTEM VARIABLES ===== */
    /* Reusable variables for consistent Smart Badge styling across the application */

    /* Badge Container & Layout */
    --badge-gap: 0.75rem;                                   /* Gap between badges */
    --badge-container-z-index: 20;                          /* Container stacking context */
    --badge-wrapper-z-index: 25;                            /* Individual badge wrapper stacking */

    /* Badge Padding & Sizing */
    --badge-padding: 0.5rem 1rem;                           /* Pill-shaped badge padding */
    --badge-min-height: 2rem;                               /* Minimum badge height for consistent sizing */
    --badge-line-height: 1.5;                               /* Line height for vertical centering */
    --badge-border-radius: 20px;                            /* Pill shape border radius */
    --badge-font-size: 0.875rem;                            /* Badge text size */
    --badge-font-weight: var(--font-weight-medium);         /* Badge text weight */
    --badge-display: inline-flex;                           /* Display type for all badges */
    --badge-align-items: center;                            /* Vertical alignment */
    --badge-justify-content: center;                        /* Horizontal alignment */

    /* Badge Hover & Transition States */
    --badge-hover-transform: translateY(-2px);              /* Lift effect on hover */
    --badge-hover-duration: 0.2s;                           /* Hover animation duration */
    --badge-hover-easing: ease;                             /* Hover animation easing */
    --badge-transition: all 0.2s ease;                      /* General badge transition */
    --badge-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);      /* Text shadow for depth */

    /* WARNING Badge States (Orange #ff9800) - Follow Up, Cautions */
    --badge-warning-bg: rgba(255, 152, 0, 0.8);             /* Resting state */
    --badge-warning-bg-hover: rgba(255, 152, 0, 0.95);      /* Hover state */
    --badge-warning-bg-active: var(--color-warning-full);   /* Active state */
    --badge-warning-border: var(--color-warning-full);      /* Border color */
    --badge-warning-text: var(--color-text-white);          /* Text color */
    --badge-warning-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);   /* Resting shadow */
    --badge-warning-shadow-hover: 0 4px 8px rgba(0, 0, 0, 0.3); /* Hover shadow */

    /* INFO Badge States (Blue #3498db) - Weight, Information */
    --badge-info-bg: rgba(52, 152, 219, 0.8);               /* Resting state */
    --badge-info-bg-hover: rgba(52, 152, 219, 0.95);        /* Hover state */
    --badge-info-bg-active: var(--color-info-full);         /* Active state */
    --badge-info-border: var(--color-info-full);            /* Border color */
    --badge-info-text: var(--color-text-white);             /* Text color */
    --badge-info-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);      /* Resting shadow */
    --badge-info-shadow-hover: 0 4px 8px rgba(0, 0, 0, 0.3); /* Hover shadow */

    /* SUCCESS Badge States (Green #27ae60) - Tasks, Completion */
    --badge-success-bg: rgba(39, 174, 96, 0.8);             /* Resting state */
    --badge-success-bg-hover: rgba(39, 174, 96, 0.95);      /* Hover state */
    --badge-success-bg-active: var(--color-success-full);   /* Active state */
    --badge-success-border: var(--color-success-full);      /* Border color */
    --badge-success-text: var(--color-text-white);          /* Text color */
    --badge-success-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);   /* Resting shadow */
    --badge-success-shadow-hover: 0 4px 8px rgba(0, 0, 0, 0.3); /* Hover shadow */

    /* DANGER Badge States (Red #e74c3c) - Active Status, Alerts */
    --badge-danger-bg: rgba(231, 76, 60, 0.8);              /* Resting state */
    --badge-danger-bg-hover: rgba(231, 76, 60, 0.95);       /* Hover state */
    --badge-danger-bg-active: var(--color-danger-full);     /* Active state */
    --badge-danger-border: var(--color-danger-full);        /* Border color */
    --badge-danger-text: var(--color-text-white);           /* Text color */
    --badge-danger-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);    /* Resting shadow */
    --badge-danger-shadow-hover: 0 4px 8px rgba(0, 0, 0, 0.3); /* Hover shadow */

    /* NEUTRAL Badge States (Grey #7f8c8d) - Inactive, Quarantine */
    --badge-neutral-bg: rgba(127, 140, 141, 0.8);           /* Resting state */
    --badge-neutral-bg-hover: rgba(127, 140, 141, 0.95);    /* Hover state */
    --badge-neutral-bg-active: var(--color-neutral-full);   /* Active state */
    --badge-neutral-border: var(--color-neutral-full);      /* Border color */
    --badge-neutral-text: var(--color-text-white);          /* Text color */
    --badge-neutral-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);   /* Resting shadow */
    --badge-neutral-shadow-hover: 0 4px 8px rgba(0, 0, 0, 0.3); /* Hover shadow */

    /* PRIMARY Badge States (Pink #db7093) - Reproductive, Special Domain */
    --badge-primary-bg: rgba(219, 112, 147, 0.8);           /* Resting state */
    --badge-primary-bg-hover: rgba(219, 112, 147, 0.95);    /* Hover state */
    --badge-primary-bg-active: var(--color-primary-full);   /* Active state */
    --badge-primary-border: var(--color-primary-full);      /* Border color */
    --badge-primary-text: var(--color-text-white);          /* Text color */
    --badge-primary-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);   /* Resting shadow */
    --badge-primary-shadow-hover: 0 4px 8px rgba(0, 0, 0, 0.3); /* Hover shadow */

    /* Glassmorphism Badge (More Actions Toggle) */
    --badge-glass-bg: rgba(255, 255, 255, 0.25);            /* Resting background */
    --badge-glass-bg-hover: rgba(255, 255, 255, 0.35);      /* Hover background */
    --badge-glass-border: rgba(255, 255, 255, 0.4);         /* Border color */
    --badge-glass-border-hover: rgba(255, 255, 255, 0.5);   /* Hover border */
    --badge-glass-backdrop-blur: 16px;                      /* Blur effect */
    --badge-glass-color: rgba(0, 0, 0, 0.8);                /* Text color */
    --badge-glass-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.08), inset 0 1px 2px rgba(255, 255, 255, 0.3);
    --badge-glass-shadow-hover: 0 6px 16px rgba(0, 0, 0, 0.12), 0 3px 6px rgba(0, 0, 0, 0.1), inset 0 1px 2px rgba(255, 255, 255, 0.4);
    --badge-glass-shadow-active: 0 2px 8px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08), inset 0 1px 2px rgba(255, 255, 255, 0.2);

    /* Badge Count/Indicator (Small badge showing count: "2", "3", etc.) */
    --badge-count-size: 20px;                               /* Badge indicator size */
    --badge-count-height: 20px;                             /* Badge height */
    --badge-count-min-width: 20px;                          /* Minimum width for numbers */
    --badge-count-border-radius: 10px;                      /* Half of size for perfect circle */
    --badge-count-bg: var(--color-danger-full);             /* Background color (red by default) */
    --badge-count-text: var(--color-text-white);            /* Text color */
    --badge-count-font-size: 0.7rem;                        /* Small font size */
    --badge-count-font-weight: var(--font-weight-semi-bold); /* Bold text */
    --badge-count-padding: 0 6px;                           /* Horizontal padding */
    --badge-count-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);     /* Shadow depth */

    /* Badge Animation Variables */
    --badge-slide-distance: 20px;                           /* Distance for slide animations */
    --badge-slide-duration: 0.4s;                           /* Duration of slide animation */
    --badge-slide-easing: cubic-bezier(0.4, 0, 0.2, 1);     /* Smooth easing curve */
    --badge-stagger-base: 0.05s;                            /* Base stagger delay */
    --badge-stagger-increment: 0.05s;                       /* Increment per item */
    --badge-toggle-rotate-duration: 0.3s;                   /* Rotation duration for toggle icon */
    --badge-toggle-rotate-easing: cubic-bezier(0.4, 0, 0.2, 1); /* Smooth rotation easing */

    /* Responsive Breakpoints for Badges */
    --badge-mobile-breakpoint: 480px;                       /* Mobile layout threshold */
    --badge-tablet-breakpoint: 768px;                       /* Tablet layout threshold */
    --badge-desktop-breakpoint: 1024px;                     /* Desktop layout threshold */
    --badge-mobile-grid-columns: 3;                         /* Grid columns on mobile */
    --badge-mobile-gap: 0.5rem;                             /* Gap on mobile */
    --badge-tablet-grid-columns: 3;                         /* Grid columns on tablet */
    --badge-tablet-gap: 0.75rem;                            /* Gap on tablet */

    /* ===== INFORMATION CHIP/PILL SYSTEM ===== */
    /* Global reusable chip styling for status, tags, and information displays across the application */

    /* Base Chip Sizing & Spacing */
    --chip-padding-vertical: 0.35rem;                       /* Vertical padding - compact sizing */
    --chip-padding-horizontal: 0.85rem;                     /* Horizontal padding - comfortable side spacing */
    --chip-padding: var(--chip-padding-vertical) var(--chip-padding-horizontal); /* Combined padding */
    --chip-min-height: 1.5rem;                              /* Minimum height for consistent sizing */
    --chip-line-height: 1.4;                                /* Line height for vertical centering */
    --chip-border-radius: 6px;                              /* Rounded corners - slightly rounded pill shape */
    --chip-font-size: 0.75rem;                              /* Font size - compact readable text */
    --chip-font-weight: 600;                                /* Font weight - semi-bold for emphasis */
    --chip-border-width: 1px;                               /* Border width for outlined variants */

    /* Chip Spacing & Layout */
    --chip-gap: 0.5rem;                                     /* Gap between chips in groups */
    --chip-transition: all 0.2s ease;                       /* Smooth transition for hover states */

    /* SUCCESS Chip (Green #27ae60) - Completed, Active, Done, Approved */
    --chip-success-bg: rgba(39, 174, 96, 0.1);              /* Light green background */
    --chip-success-bg-hover: rgba(39, 174, 96, 0.15);       /* Slightly darker on hover */
    --chip-success-color: #27ae60;                          /* Dark green text */
    --chip-success-border: #27ae60;                         /* Green border for outlined variant */

    /* DANGER Chip (Red #e74c3c) - Error, Critical, Rejected, Failed */
    --chip-danger-bg: rgba(231, 76, 60, 0.1);               /* Light red background */
    --chip-danger-bg-hover: rgba(231, 76, 60, 0.15);        /* Slightly darker on hover */
    --chip-danger-color: #e74c3c;                           /* Dark red text */
    --chip-danger-border: #e74c3c;                          /* Red border for outlined variant */

    /* WARNING Chip (Orange #ff9800) - Pending, Caution, Needs Attention */
    --chip-warning-bg: rgba(255, 152, 0, 0.1);              /* Light orange background */
    --chip-warning-bg-hover: rgba(255, 152, 0, 0.15);       /* Slightly darker on hover */
    --chip-warning-color: #ff9800;                          /* Dark orange text */
    --chip-warning-border: #ff9800;                         /* Orange border for outlined variant */

    /* INFO Chip (Blue #3498db) - Information, Data, Technical */
    --chip-info-bg: rgba(52, 152, 219, 0.1);                /* Light blue background */
    --chip-info-bg-hover: rgba(52, 152, 219, 0.15);         /* Slightly darker on hover */
    --chip-info-color: #3498db;                             /* Dark blue text */
    --chip-info-border: #3498db;                            /* Blue border for outlined variant */

    /* PRIMARY Chip (Pink #db7093) - Reproductive, Special, Featured */
    --chip-primary-bg: rgba(219, 112, 147, 0.1);            /* Light pink background */
    --chip-primary-bg-hover: rgba(219, 112, 147, 0.15);     /* Slightly darker on hover */
    --chip-primary-color: #db7093;                          /* Dark pink text */
    --chip-primary-border: #db7093;                         /* Pink border for outlined variant */

    /* NEUTRAL Chip (Grey #7f8c8d) - Inactive, Disabled, Default */
    --chip-neutral-bg: rgba(127, 140, 141, 0.1);            /* Light grey background */
    --chip-neutral-bg-hover: rgba(127, 140, 141, 0.15);     /* Slightly darker on hover */
    --chip-neutral-color: #7f8c8d;                          /* Dark grey text */
    --chip-neutral-border: #7f8c8d;                         /* Grey border for outlined variant */

    /* QUARANTINE Chip (Amber #ffc107) - Quarantine, Warning, Exclusion */
    --chip-quarantine-bg: rgba(255, 193, 7, 0.1);           /* Light amber background */
    --chip-quarantine-bg-hover: rgba(255, 193, 7, 0.15);    /* Slightly darker on hover */
    --chip-quarantine-color: #ffc107;                       /* Dark amber text */
    --chip-quarantine-border: #ffc107;                      /* Amber border for outlined variant */

    /* ===== ACTION BUTTON DESIGN TOKENS ===== */
    /* Pill-shaped tinted-surface buttons with subtle glass-aligned aesthetic
       Base class: .action-button
       Sizes: -sm, -md, -lg
       Colors: use any --color-* tokens or --combined-accent-color
       Filled: add .action-button-filled for solid CTA variant
    */

    /* ===== ACTION BUTTON SIZE SCALE ===== */
    --action-button-sm-padding: 0.35rem 0.7rem;
    --action-button-sm-font-size: 0.8rem;
    --action-button-sm-height: 1.75rem;
    --action-button-sm-line-height: 1.2;

    --action-button-md-padding: 0.5rem 1rem;
    --action-button-md-font-size: 0.875rem;
    --action-button-md-height: 2rem;
    --action-button-md-line-height: 1.5;

    --action-button-lg-padding: 0.6rem 1.25rem;
    --action-button-lg-font-size: 0.95rem;
    --action-button-lg-height: 2.5rem;
    --action-button-lg-line-height: 1.5;

    /* ===== ACTION BUTTON SHAPE & STYLING ===== */
    --action-button-border-radius: var(--radius-4xl);  /* 20px pill shape */
    --action-button-border-width: 1px;
    --action-button-transition: all 0.2s ease;

    /* ===== ACTION BUTTON COLOR SYSTEM ===== */
    /* Default color (info blue) - override with --action-button-color */
    --action-button-color: var(--color-info-full);

    /* ===== ACTION BUTTON HOVER EFFECTS ===== */
    --action-button-hover-lift: translateY(-1px);
    --action-button-hover-shadow: 0 2px 8px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.04);

    /* ===== ACTION BUTTON DISABLED STATE ===== */
    --action-button-disabled-opacity: 0.4;

    /* ===== OPACITY & VISIBILITY SCALE ===== */
    /* Semantic opacity levels for consistent visibility and emphasis */

    --opacity-disabled: 0.5;                                /* Fully disabled/inactive state */
    --opacity-disabled-text: 0.6;                           /* Disabled text content */
    --opacity-secondary: 0.7;                               /* Secondary/muted content */
    --opacity-tertiary: 0.5;                                /* Tertiary content */
    --opacity-hover-overlay: 0.1;                           /* Subtle hover overlay */
    --opacity-focus-overlay: 0.15;                          /* Focus state overlay */
    --opacity-loading: 0.4;                                 /* Loading/skeleton placeholder */

    /* ===== BACKDROP-FILTER/GLASSMORPHISM EFFECTS ===== */
    /* Glass effect blur values for modern, frosted-glass aesthetic (use sparingly) */

    --glass-blur-light: blur(4px);                          /* Light frosted glass - subtle backgrounds */
    --glass-blur-standard: blur(8px);                       /* Standard glass effect - modals, overlays */
    --glass-blur-medium: blur(10px);                        /* Medium glass - prominent glass elements */
    --glass-blur-enhanced: blur(12px);                      /* Enhanced glass - premium components */
    --glass-blur-strong: blur(20px);                        /* Strong glass - full backdrop blur */

    /* Composite glass effects with webkit vendor prefix support */
    --glass-effect-light: backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    --glass-effect-standard: backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    --glass-effect-medium: backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    --glass-effect-strong: backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);

    /* ===== SHADOW PATTERNS ===== */
    /* Semantic shadows for elevation and focus states */

    /* Focus ring shadows - subtle colored rings for focus states */
    --shadow-focus-success: 0 0 0 3px rgba(72, 199, 142, 0.1);        /* Green focus ring */
    --shadow-focus-info: 0 0 0 3px rgba(52, 152, 219, 0.1);           /* Blue focus ring */
    --shadow-focus-danger: 0 0 0 3px rgba(231, 76, 60, 0.1);          /* Red focus ring */
    --shadow-focus-warning: 0 0 0 3px rgba(255, 152, 0, 0.1);         /* Orange focus ring */
    --shadow-focus-primary: 0 0 0 3px rgba(219, 112, 147, 0.1);       /* Pink focus ring */

    /* Hover/elevation shadows - for interactive state feedback */
    --shadow-hover-success: 0 8px 20px rgba(72, 199, 142, 0.3);       /* Green hover elevation */
    --shadow-hover-info: 0 8px 20px rgba(52, 152, 219, 0.3);          /* Blue hover elevation */
    --shadow-hover-danger: 0 8px 20px rgba(231, 76, 60, 0.3);         /* Red hover elevation */
    --shadow-hover-warning: 0 8px 20px rgba(255, 152, 0, 0.3);        /* Orange hover elevation */
    --shadow-hover-primary: 0 8px 20px rgba(219, 112, 147, 0.3);      /* Pink hover elevation */

    /* Base elevation shadows (neutral) */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);                      /* Minimal shadow - subtle depth */
    --shadow-base: 0 2px 4px rgba(0, 0, 0, 0.1);                      /* Base shadow - standard elevation */
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);                      /* Medium shadow - button/card base */
    --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.15);                      /* Large shadow - button hover elevation */
    --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.2);                      /* Extra large shadow - modal/popover */
    --shadow-inner: inset 0 1px 2px rgba(255, 255, 255, 0.3);         /* Inner shadow - depth on light backgrounds */

    /* ===== Z-INDEX STACKING SCALE ===== */
    /* Standardized z-index values for predictable layering across the application */

    --z-hide: -1;                                           /* Hide elements behind base layer */
    --z-base: 0;                                            /* Base layer - normal flow */
    --z-dropdown: 10;                                       /* Dropdown menus and selects */
    --z-badge: 20;                                          /* Badge wrappers and indicators */
    --z-sticky: 100;                                        /* Sticky positioned elements */
    --z-fixed: 200;                                         /* Fixed positioned elements */
    --z-popover: 1050;                                      /* Popovers and tooltips */
    --z-modal-backdrop: 1100;                               /* Modal backdrop/overlay */
    --z-modal: 1200;                                        /* Modal dialogs and overlays */
    --z-modal-high: 1300;                                   /* High-priority modals */
    --z-tooltip: 1500;                                      /* Tooltips above all modals */
    --z-notification: 2000;                                 /* Toast notifications, alerts */

    /* ===== TRANSFORM PATTERNS ===== */
    /* Reusable transform values for interactive states and animations */

    /* Lift effects - translateY for hover elevation */
    --transform-lift-sm: translateY(-1px);                  /* Subtle lift */
    --transform-lift-md: translateY(-2px);                  /* Standard lift - most common */
    --transform-lift-lg: translateY(-4px);                  /* Pronounced lift */

    /* Scale effects - for emphasis and response */
    --transform-scale-up-sm: scale(1.02);                   /* Subtle enlargement */
    --transform-scale-up: scale(1.05);                      /* Standard enlargement */
    --transform-scale-up-lg: scale(1.1);                    /* Pronounced enlargement */
    --transform-scale-down: scale(0.95);                    /* Subtle shrink */
    --transform-scale-press: scale(0.98);                   /* Press-down active state */

    /* Composite transforms - common interaction patterns */
    --transform-hover-lift: translateY(-2px);               /* Standard hover lift effect */
    --transform-hover-enlarge: translateY(-2px) scale(1.05); /* Lift + enlarge for premium feel */
    --transform-active-press: scale(0.98);                  /* Active button press effect */
    --transform-disabled: scale(1);                         /* No transform when disabled */

    /* Rotation effects - for loading and animations */
    --transform-rotate-full: rotate(360deg);                /* Full rotation - loading spinners */
    --transform-rotate-quarter: rotate(90deg);              /* Quarter rotation */
    --transform-rotate-half: rotate(180deg);                /* Half rotation */

    /* ===== TRANSITION TIMING SYSTEM ===== */
    /* Standardized motion values for consistent animation across all components.
       Use these instead of ad-hoc values to ensure a cohesive feel. */

    /* --- Easing Functions --- */
    /* Standard decelerate curve (Material Design) — smooth, controlled. Use for most interactions. */
    --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
    /* Decelerate curve — element entering the screen (slides/fades in). */
    --ease-enter: cubic-bezier(0, 0, 0.2, 1);
    /* Accelerate curve — element leaving the screen (slides/fades out). */
    --ease-exit: cubic-bezier(0.4, 0, 1, 1);
    /* Gentle decelerate — staggered entrance cascades, floating panels sliding into position.
       Softer than --ease-enter; use for elements already inside an open panel. */
    --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* Spring/bounce curve — playful, energetic interactions only (e.g., toggle bounce-on-open). */
    --ease-spring: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    /* Linear — strictly for spinner/loader rotations. */
    --ease-linear: linear;

    /* --- Duration Tiers --- */
    /* Fast — instant feedback: button clicks, focus rings, checkbox toggles. */
    --duration-fast: 150ms;
    /* Standard — most hover states, colour changes, border changes. */
    --duration-standard: 200ms;
    /* Enter — element entrances: modals, dropdowns, panel slides, skeleton to content. */
    --duration-enter: 300ms;

    /* --- Composite Transitions (duration + easing, apply with `transition:`) --- */
    /* Use `transition: var(--transition-fast)` etc. on the element. */
    --transition-fast:     all var(--duration-fast)     var(--ease-standard);
    --transition-standard: all var(--duration-standard) var(--ease-standard);
    --transition-enter:    all var(--duration-enter)    var(--ease-enter);

    /* --- Property-Scoped Transitions (avoids animating layout-affecting properties) --- */
    /* For elements where only colour changes on interaction — safer than `all`. */
    --transition-colors:   color var(--duration-standard) var(--ease-standard),
                           background-color var(--duration-standard) var(--ease-standard),
                           border-color var(--duration-standard) var(--ease-standard),
                           fill var(--duration-standard) var(--ease-standard);
    /* For cards and buttons that cast a shadow on hover. */
    --transition-shadow:   box-shadow var(--duration-standard) var(--ease-standard);
    /* For lift/press/scale effects. Pair with --transform-* variables above. */
    --transition-transform: transform var(--duration-standard) var(--ease-standard);
    /* For fade in/out without movement. */
    --transition-opacity:  opacity var(--duration-fast) ease-out;

    /* ===== FORM INPUT STYLING VARIABLES =====
       Bordered fields: white surface, 1px rule, 8px radius, teal focus ring.

       These were neumorphic -- a grey #f0f0f0 fill, no border at all, a 28px pill
       radius, and a dual light/dark shadow doing the work a border normally does.
       The problem was measurable rather than a matter of taste: the field surface
       came out at 1.14:1 against the white modal card, where WCAG 1.4.11 asks for
       3:1 on the boundary of an interactive control. The shadows did not rescue it
       either (#e8e8e8 on white is 1.23:1). Field edges were close to invisible.

       Eleven components read their appearance from these values rather than
       hardcoding, which is why this is a token change and not eleven rewrites:
       OISTextInput, OISSelect, OISDatePicker, OISDateRangePicker, OISNumberInput,
       OISPasswordInput, OISSearchInput, OISTextarea, OISCheckboxGroup,
       OISRadioGroup and CountryAwareAnimalTypeSelector.

       The direction is not new -- UnifiedSpeciesSelector already used a 1px border
       at 8px radius. This is the rest of the form catching up with it. */

    /* Base container styling */
    --form-input-background: #ffffff;                       /* Matches the card; the border defines the field */
    --form-input-border-color: var(--color-border-light, #E2E8F0); /* The same fine rule as the list filters; the focus ring carries the state */
    --form-input-border-width: 1px;
    --form-input-border-radius: 10px;                       /* Matches the list filters */
    --form-input-padding-vertical: 0.4375rem;               /* 7px, so a one-line field is 36px tall like the list filters */
    --form-input-padding-horizontal: 0.75rem;               /* 12px */
    --form-input-padding: var(--form-input-padding-vertical) var(--form-input-padding-horizontal); /* Combined padding */
    --form-input-min-height: 2.25rem;                       /* 36px minimum height */

    /* Label spacing */
    --form-input-label-margin-bottom: 1.25rem;              /* Larger separation to prevent overlap with focused inputs */

    /* Focus colours, named for what they are. Prefer these in new code. */
    --form-input-focus-edge: var(--kora-teal-dark, #00A386); /* 3.19:1 on white */
    --form-input-focus-ring: var(--kora-teal-glow, rgba(0, 212, 170, 0.25));

    /* ---- Legacy shadow token names, repurposed ----
       340 declarations across those eleven components compose their box-shadow as
       `var(--...-offset-X) var(--...-shadow-X)`, so redefining these six values
       changes every field's rest and focus state without touching a component.

       They no longer carry shadows. Read them as:
         offset-dark / offset-light  -> rest state, deliberately zero-sized
         inset-dark                  -> focus halo geometry
         inset-light                 -> focus edge geometry
         shadow-dark / shadow-light  -> the two focus colours

       The names now describe their history rather than their job. Renaming them is
       a mechanical follow-up across those eleven files; it was left out of this
       change to keep the diff reviewable. */

    /* Rest: zero-sized, so no shadow paints regardless of the colours below. */
    --form-input-shadow-offset-dark: 0 0 0;
    --form-input-shadow-offset-light: 0 0 0;

    /* Focus: a 3px halo plus a 1px inset edge, which reads as the border
       turning teal. Replaces the old inverted inset shadow -- that was a pressed
       effect, and it only reads against a raised one, so removing the raise left
       nothing to invert. */
    --form-input-shadow-inset-dark: 0 0 0 3px;
    --form-input-shadow-inset-light: inset 0 0 0 1px;
    --form-input-shadow-dark: var(--form-input-focus-ring);
    --form-input-shadow-light: var(--form-input-focus-edge);

    /* Input element styling */
    --form-input-text-color: var(--kora-text-primary, #0F172A);                       /* Primary text color */
    --form-input-text-placeholder: #9ca3af;                 /* Placeholder text color */
    --form-input-transition-duration: 0.3s;                 /* Smooth transition for shadow change */

    /* ===== OIS FORM COMPONENT SPACING SCALE ===== */
    /* Standardized spacing values for OIS component layouts */
    --ois-form-spacing-xs: 0.5rem;                          /* Extra small spacing - compact elements */
    --ois-form-spacing-sm: 0.75rem;                         /* Small spacing - form help text, labels */
    --ois-form-spacing-md: 1rem;                            /* Medium spacing - between related fields */
    --ois-form-spacing-lg: 1.5rem;                          /* Large spacing - between field groups */
    --ois-form-spacing-xl: 2rem;                            /* Extra large spacing - major sections */

    /* ===== OIS FORM COMPONENT RADIUS SCALE ===== */
    /* Standardized border radius values for OIS components */
    --ois-form-radius-sm: 4px;                              /* Small radius - input fields */
    --ois-form-radius-md: 6px;                              /* Medium radius - standard components */
    --ois-form-radius-lg: 8px;                              /* Large radius - cards and panels */

    /* ===== OIS FORM COMPONENT FONT SIZES ===== */
    /* Standardized font sizes for form labels and help text */
    --ois-form-font-size-sm: 0.875rem;                      /* Small text - help text, captions */
    --ois-form-font-size-base: 1rem;                        /* Base text - labels, input text */
    --ois-form-font-size-lg: 1.125rem;                      /* Large text - section headers */

    /* ===== DESIGN.MD — BOLD CRYSTALLINE TOKENS ===== */
    /* Additive tokens from the Bold Crystalline design system (docs/archive/DESIGN.md, now superseded:
       the current look rules and layout recipes are in docs/ui-layouts.md).
       These do NOT replace or override existing tokens above.
       Use --kora-* and --glass-* prefixes for new components and updates. */

    /* --- Kora Brand Colors --- */
    --kora-teal: #00D4AA;                              /* Primary CTA, active states, brand accent */
    --kora-teal-dark: #00A386;                         /* Hover deepening, confirmed active */
    --kora-teal-mid: #00C49E;                          /* Mid hover transition */
    --kora-teal-surface: rgba(0, 212, 170, 0.10);     /* Teal-tinted surface backgrounds */
    --kora-teal-glow: rgba(0, 212, 170, 0.25);        /* Focus rings, active borders */

    /* --- Neutral Canvas --- */
    --kora-ink: #0D1117;                               /* Near-black — dark section backgrounds, text on teal */
    --kora-slate: #1E2736;                             /* Secondary dark surface */
    --kora-text-primary: #0F172A;                      /* Body text on light glass surfaces */
    --kora-text-secondary: #556070;                    /* Muted — captions, labels, metadata. One step darker than the
                                                          old #64748B (17 Nov 2026) so it holds 4.5:1 on every light page canvas, not only on white */
    --kora-canvas: #FAFBFC;                            /* Page background */
    --kora-surface: #FFFFFF;                           /* Card base (near-opaque, no blur) */

    /* --- Glass Material Tokens --- */
    --glass-light-bg: rgba(255, 255, 255, 0.72);      /* Light glass — dashboard panels, insights */
    --glass-light-border: rgba(255, 255, 255, 0.82);  /* Light glass border */
    --glass-light-hover: rgba(255, 255, 255, 0.88);   /* Light glass hover state */
    --glass-dark-bg: rgba(34, 32, 31, 0.82);          /* Dark chrome — SideNav, structural UI */
    --glass-dark-border: rgba(255, 255, 255, 0.08);   /* Dark glass inner border */
    --glass-scrim: rgba(15, 23, 42, 0.55);            /* Modal / drawer backdrop scrim */

    /* --- Kora Radius Scale (additive — does not replace existing --radius-*) --- */
    --kora-radius-xs: 4px;                             /* Badges, chips */
    --kora-radius-sm: 8px;                             /* Inputs, small elements */
    --kora-radius-md: 12px;                            /* Default cards, panels */
    --kora-radius-lg: 20px;                            /* Feature cards */
    --kora-radius-xl: 32px;                            /* Large section containers */
    --kora-radius-pill: 9999px;                        /* All CTA buttons, pill tags */

    /* --- 4px Spacing Scale --- */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-6: 24px;
    --space-8: 32px;
    --space-12: 48px;
    --space-16: 64px;

    /* --- Bold Crystalline Shadow System (ring + glass-lift only) --- */
    --shadow-ring: 0 0 0 1px rgba(14, 15, 12, 0.10);
    --shadow-glass-lift: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.07);
    --shadow-glass-hover: 0 2px 4px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.10);
    --shadow-teal-glow: 0 4px 16px rgba(0, 212, 170, 0.35);
    --shadow-focus-teal: 0 0 0 3px rgba(0, 212, 170, 0.15);

    /* --- Bold Crystalline Easing --- */
    /* --ease-spring-ui is the smooth docs/archive/DESIGN.md spring (non-bouncy).
       The existing --ease-spring is the bouncy variant — both are preserved. */
    --ease-spring-ui: cubic-bezier(0.2, 0.8, 0.2, 1);

    /* --- Teal CTA Button Tokens (additive) --- */
    --button-kora-primary-bg: #00D4AA;
    --button-kora-primary-bg-hover: #00C49E;
    --button-kora-primary-bg-active: #00A386;
    --button-kora-primary-text: #0D1117;               /* Near-black on teal — contrast compliant */
    --button-kora-primary-focus: rgba(0, 212, 170, 0.15);

    /* --- Traceability --field-* tokens (Bold Crystalline mapping) ---
       TraceabilityRecord and its 18 child components use --field-* custom properties.
       Defined here (globally) because Blazor CSS isolation scopes :root selectors. */
    --field-text-primary: var(--color-text-primary, #0D1117);
    --field-text-secondary: var(--color-text-secondary, #4B5563);
    --field-text-tertiary: var(--color-text-secondary, #4B5563);
    --field-text-muted: var(--color-text-secondary, #6B7280);
    --field-bg-primary: rgba(255, 255, 255, 0.72);
    --field-bg-surface: rgba(255, 255, 255, 0.50);
    --field-bg-section: rgba(255, 255, 255, 0.40);
    --field-bg-hover: rgba(255, 255, 255, 0.88);
    --field-border-primary: rgba(255, 255, 255, 0.60);
    --field-border-secondary: rgba(0, 0, 0, 0.08);
    --field-border-light: rgba(0, 0, 0, 0.06);
    --field-border-subtle: rgba(0, 0, 0, 0.04);
    --field-success: var(--color-success, #27ae60);
    --field-success-bg: rgba(39, 174, 96, 0.10);
    --field-success-border: var(--color-success, #27ae60);
    --field-warning: var(--color-warning, #ff9800);
    --field-warning-bg: rgba(255, 152, 0, 0.10);
    --field-warning-border: var(--color-warning, #ff9800);
    --field-error: var(--color-danger, #e74c3c);
    --field-error-bg: rgba(231, 76, 60, 0.10);
    --field-error-border: var(--color-danger, #e74c3c);
    --field-info: var(--kora-teal, #00D4AA);
    --field-info-bg: rgba(0, 212, 170, 0.10);
    --field-info-border: var(--kora-teal, #00D4AA);
    --field-primary: var(--kora-teal, #00D4AA);
    --field-primary-hover: #00b894;
    --field-primary-bg: rgba(0, 212, 170, 0.10);
    --field-touch-min: 44px;
    --field-spacing-xs: 0.25rem;
    --field-spacing-sm: 0.5rem;
    --field-spacing-md: 1rem;
    --field-spacing-lg: 1.5rem;
    --field-spacing-xl: 2rem;
    --field-radius-sm: var(--kora-radius-sm, 8px);
    --field-radius-md: var(--kora-radius-md, 12px);
    --field-radius-lg: var(--kora-radius-lg, 20px);
    --field-shadow-sm: var(--shadow-glass-lift);
    --field-shadow-md: var(--shadow-glass-lift);
    --field-shadow-lg: var(--shadow-glass-hover);
    --field-glass-blur: blur(20px) saturate(160%);
}

/* Training exercise: deeper, browner amber navigation, breadcrumb and top strip. Set by App.razor
   only when IExerciseMode.IsExercise. Same values in light and dark (the navigation is dark in both). */
html[data-kora-mode="exercise"] {
    --kx-nav-bg: #3a2608;
    --kx-nav-accent: #ffb840;
    --kx-nav-active-bg: rgba(255, 184, 64, 0.28);
    --kx-nav-active-bg-strong: rgba(255, 184, 64, 0.28);
    --kx-nav-accent-border: rgba(255, 184, 64, 0.4);
    --kx-strip-bg: #c47a0a;
    --kx-frame: #3a2608;
    --kx-strip-height: 1.75rem;
}

/* Two stacked lines need more height on a phone. */
@media (max-width: 600px) {
    html[data-kora-mode="exercise"] {
        --kx-strip-height: 3rem;
    }
}

/* Light frame (8 Nov 2026). The frame is dark by default, for everyone. It turns light only for a person who chose
   Light (or "Same as this device" on a light device) in Preferences on this device: theme-manager.js and the head
   script in App.razor set data-kora-frame="light" then (frame-mode.js). Default in Preferences puts the dark frame back. A training exercise keeps its dark amber
   frame whatever the person chose, so an exercise always looks like one. */
html[data-kora-frame="light"]:not([data-kora-mode="exercise"]) {
    --kx-frame: #e7e5de;
    --kx-frame-ink: #23272b;
    --kx-frame-ink-soft: rgba(35, 39, 43, 0.62);
    --kx-frame-ink-faint: rgba(35, 39, 43, 0.3);
    --kx-frame-hover: rgba(35, 39, 43, 0.06);
    --kx-frame-tile: #ffffff;
    --kx-frame-tile-hover: #f6f5f1;
    --kx-frame-line: rgba(35, 39, 43, 0.1);
    --kx-frame-sheet-edge: rgba(35, 39, 43, 0.08);
    --kx-frame-logo-filter: none;
    /* The bright teal is too faint on a light frame; a deeper teal keeps the current link readable. */
    --kx-nav-accent: #0b7a64;
    --kx-nav-active-bg: rgba(11, 122, 100, 0.12);
    /* The frame's popovers (the AppLauncher and its phone sheet, the bell's notifications and duties, the profile
       menu) turn light with the frame (9 Nov 2026). Each popover's stylesheet has a light block that reads these; on
       the dark frame they are unset and the popovers keep their own dark colours. Text tones hold 4.5:1 on --kx-pop
       and --kx-pop-raise; --kx-pop-glyph darkens the launcher's coloured icons by a third so they hold 3:1 on white. */
    --kx-pop: #ffffff;
    --kx-pop-raise: #f4f3ef;
    --kx-pop-hover: #efede7;
    --kx-pop-line: rgba(35, 39, 43, 0.1);
    --kx-pop-ink: #23272b;
    --kx-pop-ink-soft: #4f5459;
    --kx-pop-ink-faint: #676c71;
    --kx-pop-accent: #0b7a64;
    --kx-pop-accent-soft: rgba(11, 122, 100, 0.1);
    --kx-pop-shadow: 0 16px 40px rgba(35, 39, 43, 0.18), 0 2px 6px rgba(35, 39, 43, 0.08);
    --kx-pop-glyph: 68%;
}

/* Dark pages (8 Nov 2026). Under the Dark theme the page canvas goes near-black (see "Dark Canvas" below), and every
   named layout in docs/ui-layouts.md takes its surfaces, text and hairlines from these tokens, so redefining them is
   what turns the panels dark too. Set on html for every page, and again on the layouts' own roots (page shell .ops,
   scan frame .sf, inbox .oib, list and record .old, section list .osn-*, bare .ois-panel) because some of those set
   tokens of their own. Older pages wrote literal colours instead; since 8 Nov 2026 those are light-dark(<light>, <dark>)
   pairs, which follow color-scheme: dark below. Light theme: this block does not apply. */
html.theme-dark,
html.theme-dark :is(.ops, .sf, .sv, .oib, .old, .ois-panel, .osn-desktop, .osn-phone, .osn-sheet) {
    --kora-surface: #1c1b19;
    --kora-surface-raised: #252321;
    --kora-canvas: #141311;
    --kora-text-primary: #ebe8e3;
    --kora-text-secondary: #a8a39b;
    --kora-border: rgba(255, 255, 255, 0.14);
    --kora-border-subtle: rgba(255, 255, 255, 0.08);
    --color-text-primary: #ebe8e3;
    --color-text-secondary: #a8a39b;
    --color-text-light: #8a857e;
    --color-background-white: #1c1b19;
    --color-background-light: #222120;
    --color-background-muted: #201f1d;
    --color-background-hover: rgba(255, 255, 255, 0.06);
    --color-border-light: rgba(255, 255, 255, 0.1);
    --color-border-medium: rgba(255, 255, 255, 0.18);
    --glass-light-bg: rgba(255, 255, 255, 0.05);
    --glass-light-border: rgba(255, 255, 255, 0.1);
    --glass-light-hover: rgba(255, 255, 255, 0.08);
    --sb-line: rgba(255, 255, 255, 0.12);
    --sb-good: #4ade80;
    --sb-warn: #f5b45a;
    --sb-bad: #f87171;
    /* kora-base.css reads these for plain inputs, tables and boxes; they are worked out at :root, so set again here. */
    --kb-text: #ebe8e3;
    --kb-text-strong: #ebe8e3;
    --kb-text-light: #8a857e;
    --kb-scheme-main: #1c1b19;
    --kb-scheme-main-bis: #222120;
    --kb-scheme-main-ter: #282725;
    --kb-border: rgba(255, 255, 255, 0.1);
    --kb-border-hover: rgba(255, 255, 255, 0.18);
    --kb-input-bg: #1c1b19;
    --kb-input-border: rgba(255, 255, 255, 0.14);
    --kb-input-hover-border: rgba(255, 255, 255, 0.24);
    --kb-input-disabled-bg: #282725;
    /* The traceability record (Traceability tab) reads the --field-* set, also worked out at :root. */
    --field-text-primary: #ebe8e3;
    --field-text-secondary: #a8a39b;
    --field-text-tertiary: #a8a39b;
    --field-text-muted: #a8a39b;
    --field-bg-primary: rgba(255, 255, 255, 0.05);
    --field-bg-surface: rgba(255, 255, 255, 0.04);
    --field-bg-section: rgba(255, 255, 255, 0.03);
    --field-bg-hover: rgba(255, 255, 255, 0.08);
    --field-border-primary: rgba(255, 255, 255, 0.1);
    --field-border-secondary: rgba(255, 255, 255, 0.1);
    --field-border-light: rgba(255, 255, 255, 0.08);
    --field-border-subtle: rgba(255, 255, 255, 0.05);
    /* Form fields (kora-base forms and the OIS form components) were white boxes with dark text; they take the panel. */
    --form-input-background: #1c1b19;
    --form-input-text-placeholder: #8a857e;
    --ois-form-background: #1c1b19;
    --ois-form-background-hover: #252321;
    --ois-form-border: rgba(255, 255, 255, 0.14);
    --ois-form-text: #ebe8e3;
    --ois-form-text-muted: #a8a39b;
    --ois-form-placeholder: #8a857e;
    --ois-form-background-contrast: #1c1b19;
    --ois-form-background-contrast-hover: #252321;
    --ois-form-border-contrast: #ebe8e3;
    --ois-form-text-contrast: #ffffff;
    --ois-form-text-contrast-muted: #d6d2cb;
    /* The older OIS globals (ois-design-system.css). --ois-text-secondary stays: buttons paint it under white text. */
    --ois-text-primary: #ebe8e3;
    --ois-bg-light: #1c1b19;
    --ois-bg-light-rgb: 28, 27, 25;
    --ois-bg-glass-light: rgba(28, 27, 25, 0.95);
    /* The inbox and list frames do not set a text colour of their own and would inherit the body's black. */
    color: var(--kora-text-primary);
    color-scheme: dark;
}

/* A demonstration instance (its database is marked 'demonstration'): one thin neutral line, nothing else recoloured. Set by
   App.razor; the line itself is DemonstrationStrip. Same values in light and dark. */
html[data-kora-mode="demonstration"] {
    --kx-strip-bg: #3d3d3d;
    --kx-strip-height: 1.5rem;
}

/* ===== COMBINED COMPONENT SHARED CSS UTILITIES ===== */
/* Extracted shared styles for UnifiedAnimalObservations, AnimalTreatmentsCombined, AnimalFeedCombined */
/* These classes eliminate ~66% code duplication across three components */

/* Base scrollbar styles - applied to all combined components */
.combined-scrollbar-track::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.combined-scrollbar-track::-webkit-scrollbar-track {
    background: light-dark(rgba(245, 245, 245, 0.8), rgba(28, 27, 25, 0.8));
    border-radius: var(--radius-xl);
}

.combined-scrollbar-track::-webkit-scrollbar-thumb {
    border-radius: var(--radius-xl);
    border: 2px solid transparent;
    background-clip: padding-box;
    transition: background 0.2s ease;
}

.combined-scrollbar-track {
    scrollbar-width: thin;
}

/* Base card container - shared across all combined components */
.combined-card {
    background-color: light-dark(#ffffff, #1b1a19);
    border-radius: var(--radius-xl);
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.combined-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Accent bar at top of card - color injected via CSS variable */
.combined-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 2px;
    width: 100%;
    background: var(--combined-accent-color, #3b82f6);
}

/* Header section - shared structure */
.combined-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.125rem;
    border-bottom: 1px solid light-dark(#e2e8f0, #3e4855);
}

.combined-header-title {
    font-weight: 600;
    font-size: 1.0625rem;
    color: light-dark(#0f172a, #cad4ec);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.combined-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* View toggle button group */
.combined-view-toggle {
    display: flex;
    align-items: center;
    background-color: light-dark(#f1f5f9, #1f2831);
    border-radius: 20px;
    padding: 3px;
    margin-right: 0.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.combined-view-toggle.two-tabs .combined-toggle-option {
    padding: 0.35rem 0.5rem;
}

.combined-view-toggle.three-tabs .combined-toggle-option {
    padding: 0.35rem 0.4rem;
    min-width: 40px;
}

.combined-toggle-option {
    padding: 0.35rem 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: light-dark(#64748b, #8593a7);
}

.combined-toggle-option:hover {
    color: light-dark(#0f172a, #cad4ec);
    background-color: light-dark(rgba(0, 0, 0, 0.05), rgba(255, 255, 255, 0.045));
}

.combined-toggle-option.active {
    background-color: var(--combined-accent-color, #3b82f6);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Add button - shared structure */
.combined-add-button {
    background-color: var(--combined-button-bg, light-dark(#eff6ff, #11243c));
    color: var(--combined-accent-color, light-dark(#3b82f6, #76a7f9));
    border: 1px solid var(--combined-accent-color, #3b82f6);
    border-radius: 20px;
    padding: 0.3rem 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.combined-add-button:hover {
    background-color: var(--combined-accent-color, #3b82f6);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Content area background */
.combined-content {
    padding: 0;
    min-height: 200px;
    background-color: light-dark(#f8fafc, #1e1d1c);
}

.combined-content-padding {
    padding: 1.125rem;
    position: relative;
    background-color: light-dark(#f8fafc, #1e1d1c);
}

/* Carousel base styles */
.combined-carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.combined-carousel-track {
    display: flex;
    transition: transform 0.3s ease;
    width: 100%;
}

.combined-carousel-item {
    min-width: 100%;
    padding: 1.125rem;
    flex: 0 0 100%;
    width: 100%;
    box-sizing: border-box;
    padding: 0 4px;
}

/* Card within carousel */
.combined-inner-card {
    background: light-dark(#ffffff, #1b1a19);
    border-radius: var(--radius-lg);
    border: 1px solid light-dark(#e2e8f0, #3e4855);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 1.125rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    color: light-dark(#0f172a, #cad4ec);
    overflow: hidden;
    height: 280px;
}

.combined-inner-card * {
    color: light-dark(#0f172a, #cad4ec) !important;
}

.combined-inner-card h1,
.combined-inner-card h2,
.combined-inner-card h3,
.combined-inner-card h4,
.combined-inner-card h5,
.combined-inner-card h6,
.combined-inner-card p,
.combined-inner-card span,
.combined-inner-card div,
.combined-inner-card label,
.combined-inner-card strong,
.combined-inner-card em {
    color: light-dark(#0f172a, #cad4ec) !important;
}

.combined-inner-card i {
    color: light-dark(#64748b, #8593a7) !important;
}

.combined-inner-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--combined-accent-color, #3b82f6);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.combined-inner-card:hover {
    background-color: light-dark(#ffffff, #1b1a19);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    border-color: light-dark(#cbd5e1, #47515d);
}

.combined-inner-card:hover::before {
    opacity: 1;
}

/* Carousel navigation */
.combined-carousel-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.125rem;
    background: light-dark(#f8fafc, #1e1d1c);
    border-top: 1px solid light-dark(#e2e8f0, #3e4855);
}

.combined-carousel-button {
    background: light-dark(#ffffff, #1b1a19);
    border: 1px solid light-dark(#e2e8f0, #3e4855);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: light-dark(#64748b, #8593a7);
    font-size: 0.9rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.combined-carousel-button:hover:not(:disabled) {
    background: light-dark(#f1f5f9, #1f2831);
    color: light-dark(#0f172a, #cad4ec);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    border-color: light-dark(#cbd5e1, #47515d);
}

.combined-carousel-button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Carousel dots */
.combined-carousel-dots {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.combined-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: light-dark(#cbd5e1, #313841);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.combined-dot:hover {
    transform: scale(1.2);
    background: #94a3b8;
}

.combined-dot.active {
    transform: scale(1.3);
    background: var(--combined-accent-color, #3b82f6);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Empty state - shared structure */
.combined-empty-state {
    padding: 3rem 1.125rem;
    text-align: center;
}

.combined-empty-card {
    background: light-dark(#f8fafc, #1e1d1c);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 2px dashed light-dark(#cbd5e1, #47515d);
}

.combined-empty-icon {
    font-size: 3rem;
    color: #94a3b8;
    margin-bottom: 1rem;
}

.combined-empty-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: light-dark(#0f172a, #cad4ec);
    margin-bottom: 0.5rem;
}

.combined-empty-subtext {
    color: light-dark(#64748b, #8593a7);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Skeleton loader - shared animation */
.combined-skeleton {
    padding: 1.125rem;
    animation: combined-pulse 1.5s ease-in-out infinite;
}

.combined-skeleton-header,
.combined-skeleton-content,
.combined-skeleton-content-wide {
    background: linear-gradient(90deg, light-dark(rgba(0, 0, 0, 0.06), rgba(255, 255, 255, 0.054)) 25%, light-dark(rgba(0, 0, 0, 0.15), rgba(255, 255, 255, 0.135)) 50%, light-dark(rgba(0, 0, 0, 0.06), rgba(255, 255, 255, 0.054)) 75%);
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
}

.combined-skeleton-header {
    height: 1.2rem;
    width: 70%;
}

.combined-skeleton-content {
    height: 1rem;
    width: 85%;
}

.combined-skeleton-content-wide {
    height: 1rem;
    width: 95%;
}

@keyframes combined-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .combined-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .combined-controls {
        justify-content: space-between;
    }

    .combined-add-button {
        flex: 1;
        justify-content: center;
    }

    .combined-carousel-nav {
        padding: 0.75rem 1rem;
    }

    .combined-carousel-button {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }

    .combined-carousel-item {
        padding: 1rem;
    }
}

/* ===== ACTION BUTTON COMPONENT CLASSES ===== */
/* Pill-shaped tinted-surface buttons with subtle glass-aligned aesthetic
   Usage: <button class="action-button action-button-md action-button-success">
   Or:    <button class="action-button action-button-md" style="--action-button-color: var(--combined-accent-color);">
   Filled: <button class="action-button action-button-md action-button-filled action-button-success">
*/

.action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    border: var(--action-button-border-width) solid color-mix(in srgb, var(--action-button-color) 22%, transparent);
    background-color: color-mix(in srgb, var(--action-button-color) 8%, transparent);
    color: var(--action-button-color);
    border-radius: var(--action-button-border-radius);
    font-family: inherit;
    font-weight: var(--font-weight-label);
    transition: var(--action-button-transition);
    white-space: nowrap;
    user-select: none;
    padding: 0; /* Reset, size classes set padding */
    height: auto;
}

/* ===== ACTION BUTTON SIZES ===== */

.action-button-sm {
    padding: var(--action-button-sm-padding);
    font-size: var(--action-button-sm-font-size);
    height: var(--action-button-sm-height);
    line-height: var(--action-button-sm-line-height);
}

.action-button-md {
    padding: var(--action-button-md-padding);
    font-size: var(--action-button-md-font-size);
    height: var(--action-button-md-height);
    line-height: var(--action-button-md-line-height);
}

.action-button-lg {
    padding: var(--action-button-lg-padding);
    font-size: var(--action-button-lg-font-size);
    height: var(--action-button-lg-height);
    line-height: var(--action-button-lg-line-height);
}

/* ===== ACTION BUTTON HOVER STATE ===== */

.action-button:hover:not(:disabled) {
    background-color: color-mix(in srgb, var(--action-button-color) 15%, transparent);
    border-color: color-mix(in srgb, var(--action-button-color) 38%, transparent);
    color: var(--action-button-color);
    transform: var(--action-button-hover-lift);
    box-shadow: var(--action-button-hover-shadow);
}

.action-button:active:not(:disabled) {
    background-color: color-mix(in srgb, var(--action-button-color) 20%, transparent);
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

/* ===== ACTION BUTTON DISABLED STATE ===== */

.action-button:disabled {
    opacity: var(--action-button-disabled-opacity);
    cursor: not-allowed;
    filter: grayscale(30%);
}

/* ===== ACTION BUTTON SEMANTIC COLOR MODIFIERS ===== */
/* These set --action-button-color which the base class uses via color-mix.
   No hover overrides needed — the base hover/active rules adapt automatically. */

.action-button-success { --action-button-color: var(--color-success-full); }
.action-button-info    { --action-button-color: var(--color-info-full); }
.action-button-danger  { --action-button-color: var(--color-danger-full); }
.action-button-warning { --action-button-color: var(--color-warning-full); }
.action-button-primary { --action-button-color: var(--color-primary-full); }
.action-button-quarantine { --action-button-color: var(--color-quarantine-full); }
.action-button-neutral { --action-button-color: var(--color-neutral-full); }

/* ===== ACTION BUTTON FILLED VARIANT ===== */
/* Solid CTA style — use for primary actions (Save, Confirm, Submit).
   Combine with any semantic modifier: .action-button-filled.action-button-success */

.action-button-filled {
    background-color: var(--action-button-color);
    border-color: var(--action-button-color);
    color: #fff;
}

.action-button-filled:hover:not(:disabled) {
    background-color: color-mix(in srgb, var(--action-button-color) 88%, #000);
    border-color: color-mix(in srgb, var(--action-button-color) 88%, #000);
    color: #fff;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--action-button-color) 25%, transparent),
                0 4px 16px rgba(15, 23, 42, 0.08);
}

.action-button-filled:active:not(:disabled) {
    background-color: color-mix(in srgb, var(--action-button-color) 80%, #000);
    border-color: color-mix(in srgb, var(--action-button-color) 80%, #000);
    color: #fff;
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

/* ===== ACTION BUTTON GROUP (TABLE ACTION COLUMNS) ===== */
/* Wrapper for stacked pill buttons in a data-table actions column.
   Declared globally rather than in page-scoped CSS because these wrappers are
   built with RenderTreeBuilder in code-behind (IndividualAnimals.razor.cs), so
   Blazor emits no scope attribute on them and .razor.css cannot target them. */

.action-buttons-stacked {
    display: inline-flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* ===== SMART BADGE BUTTON BASE STYLES ===== */
/* Ensures all Smart Badge buttons have consistent sizing across the application */

/* Generic smart badge button base (catches most badge types) */
[class*="badge"] .button,
[class*="smart-badge"] .button {
    display: var(--badge-display);
    align-items: var(--badge-align-items);
    justify-content: var(--badge-justify-content);
    min-height: var(--badge-min-height);
    line-height: var(--badge-line-height);
    padding: var(--badge-padding);
    border-radius: var(--badge-border-radius);
    font-size: var(--badge-font-size);
    font-weight: var(--badge-font-weight);
    transition: var(--badge-transition);
    text-shadow: var(--badge-text-shadow);
    border: 1px solid;
    white-space: nowrap;
}

html, body {
    font-family: 'Onest', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-feature-settings: "calt" 1; /* Onest contextual alternates — docs/archive/DESIGN.md mandatory */
    /* Sage & Amber — warm organic gradient suited to animal/land management */
    background:
        radial-gradient(ellipse 480px 1100px at -1% 50%, rgba(95, 148, 88, 0.18), transparent 52%),
        radial-gradient(ellipse 1600px 380px at 50% -4%, rgba(195, 140, 55, 0.09), transparent 58%),
        radial-gradient(ellipse 900px 700px at 72% 65%, rgba(130, 160, 75, 0.07), transparent 62%),
        radial-gradient(ellipse 600px 500px at 95% 92%, rgba(180, 120, 45, 0.06), transparent 55%),
        linear-gradient(162deg, #f5f3ee 0%, #edf4e7 45%, #f2eeea 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* ===== PAGE CANVASES — per-device background choice ==========================
   Twenty-four canvases selectable at /UserProfile/preferences, in four groups:
   the original eight soft washes, Plain, Horizons and Made for Light (17 Nov
   2026). Every one has a light version here and a dark version below the Dusk
   block. The choice is
   per-device (localStorage, key `kora_canvas_preference`); nothing is persisted
   server-side, so there is no migration and no UserPreferences column.

   The class is applied to <html> only, by the inline bootstrap in App.razor.
   <html> is outside Blazor's rendered tree, so unlike the theme classes this
   needs no reconciliation guard — but the `html.canvas-x body` half of each
   selector is still required, because the base `html, body` rule above paints
   body as well and would otherwise show through.

   Each rule sets background-IMAGE only, never the `background` shorthand: the
   shorthand would reset `background-attachment: fixed` inherited from the base
   rule and the canvas would scroll with the page.

   Ordering is load-bearing. These sit ABOVE the dark-canvas block on purpose.
   `html.canvas-x body` and `html.theme-dark body` have identical specificity
   (0,1,2), so whichever comes last wins — dark must, and does. The runtime photo
   background (home-background.js) is handled the same way: it raises its own
   selector to match and wins by being injected after this stylesheet.

   Adding a canvas: add its light class here and its dark class after the Dusk
   block, add it to CANVASES in App.razor and CanvasService, give it a title and
   group in AccountPreferenceRules, and add a swatch in ProfilePreferences.razor.css.
   CanvasListsTests checks all six agree.

   Plain canvases set background-color with no image: one flat fill is the least
   a slow device can be asked to draw. ===================================== */

/* 01 · Sage & Amber — the historical default, restated as an explicit class so
   the picker can show it selected. The bare `html, body` rule above keeps these
   same values as the no-JS fallback. */
html.canvas-sage,
html.canvas-sage body {
    background-image:
        radial-gradient(ellipse 480px 1100px at -1% 50%, rgba(95, 148, 88, 0.18), transparent 52%),
        radial-gradient(ellipse 1600px 380px at 50% -4%, rgba(195, 140, 55, 0.09), transparent 58%),
        radial-gradient(ellipse 900px 700px at 72% 65%, rgba(130, 160, 75, 0.07), transparent 62%),
        radial-gradient(ellipse 600px 500px at 95% 92%, rgba(180, 120, 45, 0.06), transparent 55%),
        linear-gradient(162deg, #f5f3ee 0%, #edf4e7 45%, #f2eeea 100%);
}

/* 02 · Coastal — cool maritime blue-grey */
html.canvas-coastal,
html.canvas-coastal body {
    background-image:
        radial-gradient(ellipse 480px 1100px at -1% 50%, rgba(72, 131, 163, 0.16), transparent 52%),
        radial-gradient(ellipse 1600px 380px at 50% -4%, rgba(96, 171, 181, 0.09), transparent 58%),
        radial-gradient(ellipse 900px 700px at 72% 65%, rgba(120, 160, 190, 0.07), transparent 62%),
        radial-gradient(ellipse 600px 500px at 95% 92%, rgba(60, 120, 150, 0.05), transparent 55%),
        linear-gradient(162deg, #f1f5f7 0%, #e8f1f5 45%, #f0f4f6 100%);
}

/* 03 · Ochre Plain — arid, dust-toned */
html.canvas-ochre,
html.canvas-ochre body {
    background-image:
        radial-gradient(ellipse 480px 1100px at -1% 50%, rgba(191, 140, 58, 0.16), transparent 52%),
        radial-gradient(ellipse 1600px 380px at 50% -4%, rgba(168, 120, 60, 0.09), transparent 58%),
        radial-gradient(ellipse 900px 700px at 72% 65%, rgba(205, 165, 90, 0.08), transparent 62%),
        radial-gradient(ellipse 600px 500px at 95% 92%, rgba(150, 110, 50, 0.05), transparent 55%),
        linear-gradient(162deg, #f7f3ea 0%, #f4ecdd 45%, #f6f1e8 100%);
}

/* 04 · High Country — alpine slate-blue with a violet lean */
html.canvas-highcountry,
html.canvas-highcountry body {
    background-image:
        radial-gradient(ellipse 480px 1100px at -1% 50%, rgba(86, 105, 150, 0.15), transparent 52%),
        radial-gradient(ellipse 1600px 380px at 50% -4%, rgba(110, 125, 165, 0.09), transparent 58%),
        radial-gradient(ellipse 900px 700px at 72% 65%, rgba(130, 145, 180, 0.07), transparent 62%),
        radial-gradient(ellipse 600px 500px at 95% 92%, rgba(70, 90, 130, 0.05), transparent 55%),
        linear-gradient(162deg, #f2f4f7 0%, #eaeef4 45%, #f1f2f6 100%);
}

/* 05 · Wetland — muted teal-green, nearest the brand accent */
html.canvas-wetland,
html.canvas-wetland body {
    background-image:
        radial-gradient(ellipse 480px 1100px at -1% 50%, rgba(58, 140, 128, 0.16), transparent 52%),
        radial-gradient(ellipse 1600px 380px at 50% -4%, rgba(95, 150, 120, 0.09), transparent 58%),
        radial-gradient(ellipse 900px 700px at 72% 65%, rgba(110, 165, 155, 0.07), transparent 62%),
        radial-gradient(ellipse 600px 500px at 95% 92%, rgba(45, 115, 105, 0.05), transparent 55%),
        linear-gradient(162deg, #f0f5f4 0%, #e7f1ef 45%, #eff4f2 100%);
}

/* 06 · Paper — near-neutral warm grey, the quiet option */
html.canvas-paper,
html.canvas-paper body {
    background-image:
        radial-gradient(ellipse 480px 1100px at -1% 50%, rgba(150, 140, 125, 0.10), transparent 52%),
        radial-gradient(ellipse 1600px 380px at 50% -4%, rgba(170, 158, 140, 0.07), transparent 58%),
        radial-gradient(ellipse 900px 700px at 72% 65%, rgba(140, 132, 120, 0.05), transparent 62%),
        radial-gradient(ellipse 600px 500px at 95% 92%, rgba(120, 112, 100, 0.04), transparent 55%),
        linear-gradient(162deg, #f7f6f3 0%, #f3f1ec 45%, #f6f4f1 100%);
}

/* 07 · Terracotta — clay and rust, the warmest */
html.canvas-terracotta,
html.canvas-terracotta body {
    background-image:
        radial-gradient(ellipse 480px 1100px at -1% 50%, rgba(186, 105, 72, 0.15), transparent 52%),
        radial-gradient(ellipse 1600px 380px at 50% -4%, rgba(200, 130, 95, 0.09), transparent 58%),
        radial-gradient(ellipse 900px 700px at 72% 65%, rgba(165, 95, 70, 0.07), transparent 62%),
        radial-gradient(ellipse 600px 500px at 95% 92%, rgba(150, 85, 60, 0.05), transparent 55%),
        linear-gradient(162deg, #f8f2ee 0%, #f5eae4 45%, #f7f1ec 100%);
}

/* 08 · Frost — coolest and lightest, highest contrast for dense pages */
html.canvas-frost,
html.canvas-frost body {
    background-image:
        radial-gradient(ellipse 480px 1100px at -1% 50%, rgba(120, 150, 190, 0.13), transparent 52%),
        radial-gradient(ellipse 1600px 380px at 50% -4%, rgba(150, 175, 205, 0.08), transparent 58%),
        radial-gradient(ellipse 900px 700px at 72% 65%, rgba(100, 135, 175, 0.06), transparent 62%),
        radial-gradient(ellipse 600px 500px at 95% 92%, rgba(90, 120, 160, 0.04), transparent 55%),
        linear-gradient(162deg, #f5f7f9 0%, #eef3f8 45%, #f4f6f9 100%);
}

/* 09 · Plain — one flat colour, no gradient: the least work to draw (Plain) */
html.canvas-plain,
html.canvas-plain body {
    background-image: none;
    background-color: #f6f6f4;
}

/* 10 · Stone — flat cool grey (Plain) */
html.canvas-stone,
html.canvas-stone body {
    background-image: none;
    background-color: #eef0f2;
}

/* 11 · Oat — flat warm cream (Plain) */
html.canvas-oat,
html.canvas-oat body {
    background-image: none;
    background-color: #f5f0e6;
}

/* 12 · High contrast — pure white or pure black, with firmer text and edges (see the token block below) (Plain) */
html.canvas-contrast,
html.canvas-contrast body {
    background-image: none;
    background-color: #ffffff;
}

/* 13 · Horizon — sky at the top fading to earth at the bottom (Horizons) */
html.canvas-horizon,
html.canvas-horizon body {
    background-image:
        linear-gradient(180deg, #e6f0f8 0%, #eef1ee 55%, #f3ede3 100%);
}

/* 14 · Dawn — peach into lavender; plum into night blue in Dark (Horizons) */
html.canvas-dawn,
html.canvas-dawn body {
    background-image:
        linear-gradient(170deg, #f9ebe4 0%, #f3ecf1 50%, #ebebf7 100%);
}

/* 15 · Lagoon — clear shallow water to deep blue (Horizons) */
html.canvas-lagoon,
html.canvas-lagoon body {
    background-image:
        linear-gradient(160deg, #e3f4f2 0%, #e6f1f5 50%, #e9eef8 100%);
}

/* 16 · Canopy — deep forest green (Horizons) */
html.canvas-canopy,
html.canvas-canopy body {
    background-image:
        linear-gradient(170deg, #eaf3e7 0%, #e5f0e9 55%, #edf1ea 100%);
}

/* 17 · Harvest — ripe grain gold into straw (Horizons) */
html.canvas-harvest,
html.canvas-harvest body {
    background-image:
        linear-gradient(170deg, #f8f0da 0%, #f6efe2 55%, #f2ece4 100%);
}

/* 18 · Storm — slate cloud with a violet edge (Horizons) */
html.canvas-storm,
html.canvas-storm body {
    background-image:
        linear-gradient(170deg, #eaedf3 0%, #ebeaf2 55%, #eee9f0 100%);
}

/* 19 · Daylight — blue sky light from the top over bright white (Made for Light) */
html.canvas-daylight,
html.canvas-daylight body {
    background-image:
        radial-gradient(ellipse 1600px 520px at 50% -10%, rgba(110, 175, 240, 0.30), transparent 70%),
        linear-gradient(180deg, #f3f7fc 0%, #fbfaf7 100%);
}

/* 20 · Watercolour — soft pastel patches of sky, leaf, sand and lilac (Made for Light) */
html.canvas-watercolour,
html.canvas-watercolour body {
    background-image:
        radial-gradient(ellipse 900px 700px at 8% 10%, rgba(125, 185, 240, 0.32), transparent 70%),
        radial-gradient(ellipse 800px 600px at 92% 18%, rgba(160, 215, 160, 0.30), transparent 70%),
        radial-gradient(ellipse 950px 650px at 85% 95%, rgba(250, 175, 135, 0.30), transparent 70%),
        radial-gradient(ellipse 800px 550px at 15% 95%, rgba(210, 180, 240, 0.26), transparent 70%),
        linear-gradient(#f8f7f4, #f8f7f4);
}

/* 21 · Seafoam — fresh mint into pale aqua (Made for Light) */
html.canvas-seafoam,
html.canvas-seafoam body {
    background-image:
        linear-gradient(150deg, #dcf4ea 0%, #e0f2f3 50%, #e4eff8 100%);
}

/* 22 · Citrus — lime into lemon into apricot (Made for Light) */
html.canvas-citrus,
html.canvas-citrus body {
    background-image:
        linear-gradient(160deg, #f1f7d6 0%, #f8f5d8 50%, #fcf0dc 100%);
}

/* 23 · Blush — rose into warm sand (Made for Light) */
html.canvas-blush,
html.canvas-blush body {
    background-image:
        linear-gradient(165deg, #fbe8e8 0%, #f9ece6 50%, #f6efe6 100%);
}

/* 24 · Lilac — pale violet with a pink edge (Made for Light) */
html.canvas-lilac,
html.canvas-lilac body {
    background-image:
        linear-gradient(165deg, #ede8fb 0%, #f0ebf8 50%, #f5eef4 100%);
}

/* Dark Canvas — amber/slate-indigo Dusk aurora on a near-black base.
   Activated by ThemeManager JS. Class is applied to both <html> and <body> so the
   background survives Blazor's DOM reconciliation, which may reset body classes.
   Must stay BELOW the canvas classes above — see the ordering note there. */
html.theme-dark,
html.theme-dark body,
body.theme-dark {
    background:
        radial-gradient(ellipse 480px 1100px at -1% 50%, rgba(190, 120, 42, 0.22), transparent 52%),
        radial-gradient(ellipse 1600px 380px at 50% -4%, rgba(88, 68, 172, 0.14), transparent 58%),
        radial-gradient(ellipse 900px 700px at 72% 65%, rgba(150, 88, 38, 0.08), transparent 62%),
        radial-gradient(ellipse 600px 500px at 95% 92%, rgba(72, 52, 145, 0.08), transparent 55%),
        linear-gradient(162deg, #0d0b09 0%, #0c0b11 45%, #0e0c09 100%);
    background-attachment: fixed;
}

/* ===== DARK PAGE CANVASES (17 Nov 2026) =======================================
   Each canvas keeps its own colour under the Dark theme, as a deep tint of itself.
   Before this every canvas fell to the shared Dusk above, so the choice did nothing
   in Dark. Dusk stays as the fallback for a page with no canvas class (no script).
   `html.theme-dark.canvas-x body` (0,2,2) outranks `html.theme-dark body` (0,1,2),
   so order no longer matters here. Background-image only, as above, so the fixed
   attachment from the Dusk rule holds. */
html.theme-dark.canvas-sage,
html.theme-dark.canvas-sage body {
    background-image:
        radial-gradient(ellipse 480px 1100px at -1% 50%, rgba(95, 160, 88, 0.30), transparent 52%),
        radial-gradient(ellipse 1600px 380px at 50% -4%, rgba(195, 140, 55, 0.14), transparent 58%),
        radial-gradient(ellipse 900px 700px at 72% 65%, rgba(130, 160, 75, 0.12), transparent 62%),
        radial-gradient(ellipse 600px 500px at 95% 92%, rgba(180, 120, 45, 0.10), transparent 55%),
        linear-gradient(162deg, #0f130d 0%, #0e160f 45%, #12110d 100%);
}

html.theme-dark.canvas-coastal,
html.theme-dark.canvas-coastal body {
    background-image:
        radial-gradient(ellipse 480px 1100px at -1% 50%, rgba(72, 140, 180, 0.32), transparent 52%),
        radial-gradient(ellipse 1600px 380px at 50% -4%, rgba(96, 171, 181, 0.14), transparent 58%),
        radial-gradient(ellipse 900px 700px at 72% 65%, rgba(120, 160, 190, 0.12), transparent 62%),
        radial-gradient(ellipse 600px 500px at 95% 92%, rgba(60, 120, 150, 0.10), transparent 55%),
        linear-gradient(162deg, #0b1216 0%, #0b141a 45%, #0c1216 100%);
}

html.theme-dark.canvas-ochre,
html.theme-dark.canvas-ochre body {
    background-image:
        radial-gradient(ellipse 480px 1100px at -1% 50%, rgba(200, 145, 58, 0.30), transparent 52%),
        radial-gradient(ellipse 1600px 380px at 50% -4%, rgba(168, 120, 60, 0.14), transparent 58%),
        radial-gradient(ellipse 900px 700px at 72% 65%, rgba(205, 165, 90, 0.12), transparent 62%),
        radial-gradient(ellipse 600px 500px at 95% 92%, rgba(150, 110, 50, 0.10), transparent 55%),
        linear-gradient(162deg, #15110a 0%, #18130b 45%, #14110b 100%);
}

html.theme-dark.canvas-highcountry,
html.theme-dark.canvas-highcountry body {
    background-image:
        radial-gradient(ellipse 480px 1100px at -1% 50%, rgba(96, 115, 170, 0.32), transparent 52%),
        radial-gradient(ellipse 1600px 380px at 50% -4%, rgba(110, 125, 165, 0.14), transparent 58%),
        radial-gradient(ellipse 900px 700px at 72% 65%, rgba(130, 145, 180, 0.12), transparent 62%),
        radial-gradient(ellipse 600px 500px at 95% 92%, rgba(70, 90, 130, 0.10), transparent 55%),
        linear-gradient(162deg, #0e1017 0%, #0f121b 45%, #0f1016 100%);
}

html.theme-dark.canvas-wetland,
html.theme-dark.canvas-wetland body {
    background-image:
        radial-gradient(ellipse 480px 1100px at -1% 50%, rgba(58, 150, 136, 0.32), transparent 52%),
        radial-gradient(ellipse 1600px 380px at 50% -4%, rgba(95, 150, 120, 0.14), transparent 58%),
        radial-gradient(ellipse 900px 700px at 72% 65%, rgba(110, 165, 155, 0.12), transparent 62%),
        radial-gradient(ellipse 600px 500px at 95% 92%, rgba(45, 115, 105, 0.10), transparent 55%),
        linear-gradient(162deg, #0b1413 0%, #0b1715 45%, #0c1312 100%);
}

html.theme-dark.canvas-paper,
html.theme-dark.canvas-paper body {
    background-image:
        radial-gradient(ellipse 480px 1100px at -1% 50%, rgba(150, 140, 125, 0.18), transparent 52%),
        radial-gradient(ellipse 1600px 380px at 50% -4%, rgba(170, 158, 140, 0.10), transparent 58%),
        radial-gradient(ellipse 900px 700px at 72% 65%, rgba(140, 132, 120, 0.08), transparent 62%),
        radial-gradient(ellipse 600px 500px at 95% 92%, rgba(120, 112, 100, 0.06), transparent 55%),
        linear-gradient(162deg, #131210 0%, #151411 45%, #131210 100%);
}

html.theme-dark.canvas-terracotta,
html.theme-dark.canvas-terracotta body {
    background-image:
        radial-gradient(ellipse 480px 1100px at -1% 50%, rgba(196, 105, 72, 0.32), transparent 52%),
        radial-gradient(ellipse 1600px 380px at 50% -4%, rgba(200, 130, 95, 0.14), transparent 58%),
        radial-gradient(ellipse 900px 700px at 72% 65%, rgba(165, 95, 70, 0.12), transparent 62%),
        radial-gradient(ellipse 600px 500px at 95% 92%, rgba(150, 85, 60, 0.10), transparent 55%),
        linear-gradient(162deg, #170e0b 0%, #1a100c 45%, #160e0b 100%);
}

html.theme-dark.canvas-frost,
html.theme-dark.canvas-frost body {
    background-image:
        radial-gradient(ellipse 480px 1100px at -1% 50%, rgba(120, 150, 200, 0.28), transparent 52%),
        radial-gradient(ellipse 1600px 380px at 50% -4%, rgba(150, 175, 205, 0.12), transparent 58%),
        radial-gradient(ellipse 900px 700px at 72% 65%, rgba(100, 135, 175, 0.10), transparent 62%),
        radial-gradient(ellipse 600px 500px at 95% 92%, rgba(90, 120, 160, 0.08), transparent 55%),
        linear-gradient(162deg, #0e1117 0%, #0e131b 45%, #0f1117 100%);
}

html.theme-dark.canvas-plain,
html.theme-dark.canvas-plain body {
    background-image: none;
    background-color: #141311;
}

html.theme-dark.canvas-stone,
html.theme-dark.canvas-stone body {
    background-image: none;
    background-color: #171b21;
}

html.theme-dark.canvas-oat,
html.theme-dark.canvas-oat body {
    background-image: none;
    background-color: #1e1a13;
}

html.theme-dark.canvas-contrast,
html.theme-dark.canvas-contrast body {
    background-image: none;
    background-color: #000000;
}

html.theme-dark.canvas-horizon,
html.theme-dark.canvas-horizon body {
    background-image:
        linear-gradient(180deg, #13223a 0%, #151a22 55%, #221a10 100%);
}

html.theme-dark.canvas-dawn,
html.theme-dark.canvas-dawn body {
    background-image:
        linear-gradient(170deg, #2a1622 0%, #1c1528 50%, #111733 100%);
}

html.theme-dark.canvas-lagoon,
html.theme-dark.canvas-lagoon body {
    background-image:
        linear-gradient(160deg, #0b2627 0%, #0c1e2b 50%, #0f1832 100%);
}

html.theme-dark.canvas-canopy,
html.theme-dark.canvas-canopy body {
    background-image:
        linear-gradient(170deg, #0f2616 0%, #0c1d14 55%, #111812 100%);
}

html.theme-dark.canvas-harvest,
html.theme-dark.canvas-harvest body {
    background-image:
        linear-gradient(170deg, #2a200b 0%, #211a0d 55%, #19150f 100%);
}

html.theme-dark.canvas-storm,
html.theme-dark.canvas-storm body {
    background-image:
        linear-gradient(170deg, #161a27 0%, #1a1829 55%, #221726 100%);
}

html.theme-dark.canvas-daylight,
html.theme-dark.canvas-daylight body {
    background-image:
        radial-gradient(ellipse 1600px 520px at 50% -10%, rgba(80, 130, 200, 0.20), transparent 70%),
        linear-gradient(180deg, #0e131b 0%, #121314 100%);
}

html.theme-dark.canvas-watercolour,
html.theme-dark.canvas-watercolour body {
    background-image:
        radial-gradient(ellipse 900px 700px at 8% 10%, rgba(80, 140, 210, 0.18), transparent 70%),
        radial-gradient(ellipse 800px 600px at 92% 18%, rgba(100, 170, 110, 0.16), transparent 70%),
        radial-gradient(ellipse 950px 650px at 85% 95%, rgba(220, 130, 80, 0.16), transparent 70%),
        radial-gradient(ellipse 800px 550px at 15% 95%, rgba(150, 110, 210, 0.16), transparent 70%),
        linear-gradient(#101114, #101114);
}

html.theme-dark.canvas-seafoam,
html.theme-dark.canvas-seafoam body {
    background-image:
        linear-gradient(150deg, #0b2420 0%, #0c1f24 50%, #0e1a28 100%);
}

html.theme-dark.canvas-citrus,
html.theme-dark.canvas-citrus body {
    background-image:
        linear-gradient(160deg, #19200b 0%, #1f1e0c 50%, #221a0d 100%);
}

html.theme-dark.canvas-blush,
html.theme-dark.canvas-blush body {
    background-image:
        linear-gradient(165deg, #26131a 0%, #221517 50%, #1e1714 100%);
}

html.theme-dark.canvas-lilac,
html.theme-dark.canvas-lilac body {
    background-image:
        linear-gradient(165deg, #18142e 0%, #1a1529 50%, #201524 100%);
}

/* High contrast: firmer grey text and hairlines on pure white or pure black. Set on
   the layout roots as well, as the Dark pages tokens are, because those set their own. */
html.canvas-contrast,
html.canvas-contrast :is(.ops, .sf, .sv, .oib, .old, .ois-panel, .osn-desktop, .osn-phone, .osn-sheet) {
    --kora-text-secondary: #334155;
    --color-text-secondary: #334155;
    --kora-border: rgba(15, 23, 42, 0.45);
    --sb-line: rgba(15, 23, 42, 0.35);
    --sb-faint: #334155;
}

html.theme-dark.canvas-contrast,
html.theme-dark.canvas-contrast :is(.ops, .sf, .sv, .oib, .old, .ois-panel, .osn-desktop, .osn-phone, .osn-sheet) {
    --kora-surface: #0b0b0b;
    --kora-text-primary: #ffffff;
    --kora-text-secondary: #d4d0ca;
    --color-text-primary: #ffffff;
    --color-text-secondary: #d4d0ca;
    --kora-border: rgba(255, 255, 255, 0.45);
    --sb-line: rgba(255, 255, 255, 0.35);
    --sb-faint: #d4d0ca;
}

/* ===== LOADING SHELL — shown until the live connection is up ================
   App.razor renders .kora-boot-shell straight after <Routes> on interactive pages.
   Pages are not prerendered, so until the live connection is up and the first page
   has drawn, the body holds nothing else. Blazor inserts the page where <Routes>
   stands, before the shell, and the second rule below then hides it: no script.
   The page canvas above shows through; the shell adds only the mark and a line of
   text. The short delay keeps it from flashing on a fast connection. */
.kora-boot-shell {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--color-text-secondary);
    font-size: var(--font-size-body);
    animation: kora-boot-shell-in 200ms ease-out 300ms both;
}

body > :not(script) ~ .kora-boot-shell {
    display: none;
}

.kora-boot-shell img {
    height: 48px;
    width: auto;
}

html.theme-dark .kora-boot-shell {
    color: var(--color-text-white);
}

html.theme-dark .kora-boot-shell img {
    filter: brightness(0) invert(1); /* the white mark, as in the side navigation */
}

@keyframes kora-boot-shell-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .kora-boot-shell { animation: none; }
}

/* Remove Bulma's default section padding on the Home page so the
   full-viewport dashboard container fills exactly 100vh */
section:has(.dashboard-container) {
    padding: 0;
}

/* A plain link is a word in the area's colour, as every other quiet action is (docs/ui-layouts.md, "Look rules"): the
   accent mixed into the page's text colour, so it reads on light and dark pages alike. Inside running text it is
   underlined, so it is not told apart by colour alone. */
a:not(.action-button), .btn-link {
    color: color-mix(in srgb, var(--area-accent, #00A386) 58%, var(--kora-text-primary, #0F172A));
}

:where(p, li, .ois-prose) > a:not([class]) {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

/* Ensure action-button links use the button's semantic color, not default link color */
a.action-button {
    text-decoration: none;
    color: var(--action-button-color);
}

a.action-button:hover {
    text-decoration: none;
}

a.action-button.action-button-filled {
    color: #fff;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* ── Bold Crystalline pill buttons (docs/archive/DESIGN.md §4) ──────────────────────────
   Reusable CTA pills. Additive utility — new class names, does not override
   the legacy .btn / Bulma .button classes. Use for page CTAs and empty-state
   actions. Pair tokens with fallbacks per docs/archive/DESIGN.md §12. */
.kora-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2, 8px);
    padding: 10px 24px;
    border: 1px solid transparent;
    border-radius: var(--kora-radius-pill, 9999px);
    font-family: 'Onest', 'Helvetica Neue', Arial, sans-serif;
    font-feature-settings: "calt" 1;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: transform 150ms cubic-bezier(0.2, 0.8, 0.2, 1),
                box-shadow 150ms ease, background-color 150ms ease;
}
.kora-btn:disabled,
.kora-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}
.kora-btn--primary {
    background: var(--kora-teal, #00D4AA);
    color: var(--kora-ink, #0D1117);
}
.kora-btn--primary:hover:not(:disabled):not([disabled]) {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 212, 170, 0.35);
}
.kora-btn--primary:active:not(:disabled):not([disabled]) {
    transform: scale(0.97);
}
.kora-btn--ghost {
    background: var(--kora-teal-surface, rgba(0, 212, 170, 0.10));
    color: var(--kora-text-primary, #0F172A);
    border-color: rgba(0, 212, 170, 0.30);
}
.kora-btn--ghost:hover:not(:disabled):not([disabled]) {
    transform: scale(1.05);
    background: rgba(0, 212, 170, 0.16);
}
.kora-btn--ghost:active:not(:disabled):not([disabled]) {
    transform: scale(0.97);
}
.kora-btn--danger {
    background: rgba(231, 76, 60, 0.10);
    color: var(--color-danger, #e74c3c);
    border-color: rgba(231, 76, 60, 0.30);
}
.kora-btn--danger:hover:not(:disabled):not([disabled]) { transform: scale(1.05); }
.kora-btn--danger:active:not(:disabled):not([disabled]) { transform: scale(0.97); }
.kora-btn--sm {
    padding: 6px 16px;
    font-size: 0.8125rem;
}
@media (prefers-reduced-motion: reduce) {
    .kora-btn { transition: background-color 150ms ease; }
    .kora-btn:hover, .kora-btn:active { transform: none; }
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: light-dark(#e50000, #ec7979);
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* Global modal backdrop for AppLauncher mobile view */
.app-launcher-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45); /* no blur: it is costly on low-spec phones */
    z-index: 10699; /* Below dropdown (10700) but above VeterinarianDashboard elements (10500) */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.12s ease-out, visibility 0.12s ease-out;
}

.app-launcher-modal-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
}

/* Only show backdrop on mobile viewports */
@media (min-width: 769px) {
    .app-launcher-modal-backdrop {
        display: none;
    }
}

/* Choropleth Map Styles */
.choropleth-legend {
    background: light-dark(rgba(255, 255, 255, 0.9), rgba(28, 27, 25, 0.9));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid light-dark(rgba(0, 0, 0, 0.05), rgba(255, 255, 255, 0.06));
}

.choropleth-legend h4 {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: light-dark(#2c3e50, #afc1d3);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 0.8rem;
    color: light-dark(#7f8c8d, #a8a69e);
}

.legend-item i {
    display: inline-block;
    width: 20px;
    height: 12px;
    border-radius: 2px;
    border: 1px solid light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.12));
}

/* Choropleth Labels */
.choropleth-label {
    background: light-dark(rgba(255, 255, 255, 0.9), rgba(28, 27, 25, 0.9)) !important;
    border: 1px solid light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.12)) !important;
    border-radius: 4px !important;
    padding: 2px 6px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    color: light-dark(#2c3e50, #afc1d3) !important;
    text-align: center !important;
    pointer-events: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* Choropleth Popup */
.choropleth-popup {
    min-width: 200px;
}

.choropleth-popup h4 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    color: light-dark(#2c3e50, #afc1d3);
    border-bottom: 1px solid light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.12));
    padding-bottom: 8px;
}

.choropleth-popup table {
    width: 100%;
    font-size: 0.85rem;
}

.choropleth-popup td {
    padding: 4px 0;
}

.choropleth-popup td:first-child {
    color: light-dark(#7f8c8d, #a8a69e);
}

.choropleth-popup td:last-child {
    text-align: right;
    font-weight: 500;
    color: light-dark(#2c3e50, #afc1d3);
}

.type-breakdown {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.12));
    font-size: 0.8rem;
    color: light-dark(#7f8c8d, #a8a69e);
    line-height: 1.4;
}

.darker-border-checkbox.form-check-input {
    border-color: light-dark(#929292, #5c5a56);
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Feature Tooltip Styling - Simplified */
.leaflet-tooltip.feature-tooltip {
    background: light-dark(rgba(255, 255, 255, 0.98), rgba(28, 27, 25, 0.98));
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border: 1px solid light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.12));
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    color: light-dark(#2c3e50, #afc1d3);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
    padding: 8px 12px;
    word-wrap: break-word;
}

.leaflet-tooltip.feature-tooltip::before {
    border-top-color: light-dark(rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.1));
    border-width: 6px;
    margin-left: -6px;
}

/* Enhanced tooltip content styling */
.feature-tooltip strong {
    color: light-dark(#2c3e50, #afc1d3);
    font-weight: 600;
}

/* Location-specific tooltip styling */

/* Subdivision-specific tooltip styling */

/* Feature-specific tooltip styling */

/* Hover animations - Subtle effects only (no animations applied) */

/* Responsive tooltip sizing */
@media (max-width: 768px) {
    .leaflet-tooltip.feature-tooltip {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
}

/* ========== FORM COMPONENT ALIGNMENT ========== */
/* Align OISSearchInput height with OISSelect components */
/* Remove the label space padding that makes search inputs taller */
.ois-search-wrapper.ois-form-field {
    padding-top: 0 !important;
}

/* Use CSS Grid to position icon, input, and controls independently */
.ois-search-container {
    display: grid !important;
    grid-template-columns: auto 1fr auto !important;
    grid-template-areas: "icon input controls" !important;
    align-items: center !important;
    padding: 0.75rem 0.5rem !important;
    gap: 0 !important;
    position: relative !important;
}

/* Position search icon on the left via grid layout */
.ois-search-container > .ois-search-icon {
    grid-area: icon !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 0.5rem 0 0.5rem !important;
    flex-shrink: 0 !important;
}

/* Input takes up remaining space */
.ois-search-container > .ois-search-input {
    grid-area: input !important;
    padding: 0 0.75rem 0 3.5rem !important;
    line-height: 1.2 !important;
    width: 100% !important;
    border: none !important;
    background: transparent !important;
    min-height: auto !important;
}

/* Position controls on the right via grid layout */
.ois-search-container > .ois-search-controls {
    grid-area: controls !important;
    position: static !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
    padding: 0 0 0 0.5rem !important;
}

/* Position label absolutely so it doesn't affect grid layout */
.ois-search-container > label {
    position: absolute !important;
    pointer-events: none !important;
}

/* Disable Leaflet's default tooltip animations */
.leaflet-tooltip {
    animation: none !important;
}

.leaflet-zoom-animated .leaflet-tooltip {
    transition: none !important;
}

/* Override Leaflet's fade-in animation specifically */
.leaflet-tooltip-top:before,
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
    animation: none !important;
    transition: none !important;
}

/* Walkthrough trigger button */
.walkthrough-trigger-button {
    position: fixed;
    bottom: 24px;
    left: 24px;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    user-select: none;
}

.walkthrough-trigger-button:hover {
    background: linear-gradient(135deg, #e55a2b, #de7f0d);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.walkthrough-trigger-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.walkthrough-trigger-button i {
    font-size: 16px;
}

/* Responsive design for walkthrough button */
@media (max-width: 768px) {
    .walkthrough-trigger-button {
        bottom: 20px;
        left: 20px;
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .walkthrough-trigger-button span {
        display: none;
    }
    
    .walkthrough-trigger-button i {
        font-size: 18px;
    }
}

/* ===== MODAL FORM SECTION STYLING - OIS Modal Forms with Bulma Grid ===== */
/* Shared styles for all modernized modals using OIS Input Components */
/* These classes provide consistent styling and field alignment across all modals */

/**
 * Modal Form Sections using OIS Input Components
 *
 * These classes provide consistent styling for modal forms that use OIS
 * components (OISSelect, OISDatePicker, OISTextInput, OISNumberInput, etc.)
 * with Bulma column grid layouts.
 *
 * Usage pattern in modal components:
 * <div class="ois-modal-section">
 *     <h4>Section Title</h4>
 *     <div class="columns">
 *         <div class="column is-6">
 *             <OISSelect @bind-Value="@value" Label="Field Label" />
 *         </div>
 *         <div class="column is-6">
 *             <OISDatePicker @bind-Value="@dateValue" Label="Date" />
 *         </div>
 *     </div>
 * </div>
 */

/* No padding and no radius: the section had 1.5rem of padding and an 8px
   radius but never had a background or border to justify either, so in a 512px
   modal it simply spent 24px a side -- on top of the body's own 24px -- insetting
   fields for no visual reason. Sections are separated by space and a rule now. */
.ois-modal-section {
    padding: 0;
    margin-bottom: 2rem;
}

.ois-modal-section:last-of-type {
    margin-bottom: 0;
}

/* Quiet uppercase label over a hairline. A section heading is a signpost, not a
   headline: at 700 weight in primary ink it competed with the field labels it was
   introducing. Muted and small, it separates without shouting.

   No icons. Font Awesome icons are fine elsewhere in the product, but in a
   section heading they add colour and weight to the one element that should be
   doing neither. */
.ois-modal-section h4 {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted, light-dark(#77837e, #a8a69e));
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border-light, #e3e8e5);

    /* 2.25rem, not a smaller value that "looks" tighter: this must match
       .ois-form-stack's own gap below, for the same reason that gap is
       2.25rem and not less. A hanging label (OISTextInput, OISSelect,
       OISNumberInput, OISTextarea, OISRadioGroup, OISCheckboxGroup -- any
       .ois-form-label.label-static a component renders position: absolute)
       reaches top: -1.6rem (25.6px) up from its own field box. At the old
       1.5rem (24px) margin, that put the label's top ~2px ABOVE this
       heading's own bottom border -- measured identically on two
       independently-converted modals (h4Bottom: 179, labelTop: 177). At
       2.25rem the label lands with the same ~10px cushion the stack gap
       already gives between fields.

       OISDatePicker/OISDateRangePicker labels are unaffected either way --
       normal document flow, not hanging -- so a section that opens with a
       date field just gets a little extra (harmless) breathing room instead
       of the exact 1.5rem it had. There is no reliable way to select "only
       the hanging-label case" from here: FormBase emits the identical
       label-static class for both hanging and normal-flow labels, and the
       position: absolute override that makes a label hang lives in each
       component's own scoped .razor.css, which a global app.css selector
       cannot see. See docs/modal-alignment-guide.md, Traps. */
    margin-bottom: 2.25rem !important;
}

/* ===== Single-column form rhythm ===== */

/*
 * The vertical gap between fields in a one-column modal form.
 *
 * This has to exist because the fields do not space themselves. Bulma's
 * .column supplied padding: 0.75rem on every side, and that padding was the
 * only thing holding form fields apart -- remove the grid and the labels land
 * on top of the control above them.
 *
 * Underneath, the OIS field components disagree with each other about their
 * own spacing: OISTextInput sets --ois-form-spacing-lg, OISDatePicker 1rem,
 * OISSelect 0.25rem, and OISNumberInput, OISTextarea and OISRadioGroup set
 * nothing at all. The grid's uniform padding hid all of that. So the stack
 * zeroes their margins and owns the rhythm itself, rather than adding a gap
 * on top of six different values.
 *
 * !important is load-bearing here, not laziness: component scoped CSS
 * compiles to .class[b-xxxxx], specificity (0,2,0), which outranks any
 * global selector this file could write.
 *
 * Put this on a wrapper inside .ois-modal-section, not on the section itself
 * -- the section's h4 wants more space beneath it than the fields want
 * between them.
 */

/* ===== OIS form control scale =====

   Every OIS form component composes its padding from --ois-form-spacing-*, but
   until now only OISTextInput defined those values. Everything else inherited
   the larger scale in :root, so text inputs rendered a 48px control while number
   inputs, selects and textareas rendered 55px from the identical CSS rule.

   The values here are the ones the design system intended: they are what
   OIS/Forms/Core/FormBase.css declares, and that file turned out to be dead --
   nothing references it, so its scale only ever reached the one component that
   had copied it locally.

   Set on .ois-form-field rather than :root because these tokens are also used
   for margins outside form controls, and this change is about control sizing.
   OISTextInput's own copy still wins for itself; it holds the same values. */

.ois-form-field {
    --ois-form-spacing-xs: 0.25rem;
    --ois-form-spacing-sm: 0.5rem;
    --ois-form-spacing-md: 0.75rem;
    --ois-form-spacing-lg: 1rem;
    --ois-form-spacing-xl: 1.5rem;
}

.ois-form-stack {
    display: flex;
    flex-direction: column;
    /* 2.25rem, not the 1.25rem the spacing would otherwise want.
       OISTextInput and OISSelect render .ois-form-label.label-static at
       top: -1.6rem -- the label hangs above its own box and reserves no
       space for itself. The Bulma grid absorbed that in .column's padding;
       a plain stack has to pay for it in the gap. 2.25rem (36px) leaves a
       ~10px visual gap above a hanging label. Fields whose label is in
       normal flow (the species selector, OISDatePicker) get the full 36px,
       which is generous but reads as deliberate rather than broken.

       This number is compensation, not design. The real fix is for the
       field components to agree on where a label lives, and that should
       land before the other 37 modals convert. */
    gap: 2.25rem;
}

.ois-form-stack > * {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* ===== Composite field -- the one exception to one-column =====

   Two controls that are really one value: an amount and the currency it is
   denominated in, a quantity and its unit. Everything else in a form stacks.

   Deliberately NOT the Bulma .columns grid these modals used to use. A grid row
   says "two independent fields happen to be adjacent"; this says "one field, two
   inputs", which is why it collapses to a stack rather than to two narrower
   columns when there is no room. If a pair does not survive that test -- if
   either half makes sense without the other -- it is not a composite field and
   belongs in the single column.

   Lives here rather than in a modal's scoped CSS because it is now used by more
   than one modal. */

.field-pair {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

/* Grows; the amount is the field, the unit is the qualifier. */
.field-pair-main {
    flex: 1 1 auto;
    min-width: 0;
}

/* Sized to its content -- a 3-character currency code needs no more. */
.field-pair-unit {
    flex: 0 0 7.5rem;
    min-width: 0;
}

/* Below this the two controls cannot both stay usable, so stack them.
   Stacking keeps the relationship readable; shrinking would not. */
@media (max-width: 480px) {
    .field-pair {
        flex-direction: column;
        gap: 0;
    }

    .field-pair-unit {
        flex: 1 1 auto;
        width: 100%;
    }
}

/* ===== OIS Input Field Alignment in Column Layouts ===== */

/* NOTE: everything from here to the end of this block exists only to make
   two-column grid rows inside modals line up. It becomes dead the moment a
   modal converts to a single column, and measurement says it never fully
   worked anyway -- in AddIndividualAnimalModal the paired labels sat 48px
   out of vertical alignment with each other. Delete it once the modals are
   converted; do not extend it. */

/*
 * CRITICAL ALIGNMENT PATTERN:
 * Ensures OIS form fields (OISSelect, OISDatePicker, OISTextInput, etc.)
 * align horizontally when placed in Bulma column grids, regardless of
 * input type variations or internal component heights.
 *
 * Visual Result:
 * All inputs in a row align at their bottom edge, creating a professional
 * baseline alignment. This works even when combining inputs with different
 * internal heights (e.g., OISSelect with 3 options next to OISTextInput).
 *
 * Technical Strategy - Three-Level Flexbox Hierarchy:
 * 1. .columns container (min-height creates vertical space)
 *    └─ display: flex + align-items: stretch → columns stretch to fill height
 *
 * 2. .column child containers
 *    └─ display: flex + align-items: flex-end → aligns children to bottom
 *    └─ height: 100% → stretches to fill parent height
 *
 * 3. .ois-form-field component containers
 *    └─ display: flex + flex-direction: column → arranges label above input
 *    └─ width: 100% → component takes full column width
 *    └─ position: relative → anchors absolutely positioned labels
 *
 * Result: All input bottoms align to the same baseline regardless of
 * label height, internal padding, or component type variations.
 */

.ois-modal-section .columns {
    min-height: 5rem;
    display: flex;
    align-items: stretch;
}

.ois-modal-section .columns .column {
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    height: 100%;
}

.ois-modal-section .columns .column .ois-form-field {
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
}

/* Legacy form element width resets (for backwards compatibility) */
.ois-modal-section .field {
    margin-bottom: 0;
}

/* Radios and checkboxes are excluded deliberately. This rule stretched every
   input in a modal to 100%, radio buttons included -- a radio 404px wide
   paints its dot nowhere near its label, which is why the Sex options in
   AddIndividualAnimalModal appeared detached from Male/Female/Unknown. A
   radio is sized by its control, never by its container. */
.ois-modal-section input:not([type="radio"]):not([type="checkbox"]),
.ois-modal-section textarea,
.ois-modal-section select {
    width: 100%;
}

/* ===== Modal Dropdown Overflow Handling ===== */
/* Allow OISSelect dropdowns to overflow the modal without being clipped.
   This is critical for modals with overflow: hidden that contain dropdowns. */

.ois-modal-card-body .ois-form-field,
.ois-modal-body .ois-form-field {
    position: relative;
    z-index: auto;
}

/* Ensure OISSelect dropdown menus can overflow modal boundaries */
.ois-modal-card-body [class*="select"] .dropdown-menu,
.ois-modal-body [class*="select"] .dropdown-menu,
.ois-modal-card-body .ois-select-dropdown,
.ois-modal-body .ois-select-dropdown {
    position: fixed !important;
    z-index: 9999 !important;
    overflow: visible !important;
}

/* Allow dropdown container to have overflow visible when inside modals */
.ois-modal-card-body .select,
.ois-modal-body .select {
    overflow: visible !important;
}

/* ===== Modal Information Notification ===== */

.notification.is-info.is-light {
    background-color: light-dark(#d6ecf6, #1f3741);
    border-color: light-dark(#7dd3f0, #3a7387);
    color: light-dark(#0d5d7d, #86d0ee);
}

.notification.is-info.is-light strong {
    color: light-dark(#0d5d7d, #86d0ee);
}

/* ===== Modal Form Section Responsive Adjustments ===== */

@media (max-width: 768px) {
    .ois-modal-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .ois-modal-section .columns {
        margin-left: -0.75rem;
        margin-right: -0.75rem;
        margin-top: -0.75rem;
    }

    .ois-modal-section .columns .column {
        padding: 0.75rem;
    }
}

/* ===== PAGE HEADER & SUBTITLE SYSTEM ===== */
/* Global reusable classes for consistent page headers across all routes */
/* Usage: Apply .page-hub-header to container, .page-hub-title to h1, .page-hub-subtitle to p */

.page-hub-header {
    text-align: left;
    margin-bottom: 3rem;
    padding: 2rem 1rem;
    background: transparent;
    flex-shrink: 0;
}

.page-hub-title {
    /* type scale owned by .display-sub in app.css */
    color: var(--kora-text-primary, #0F172A);
    margin: 0 0 0.5rem 0;
}

.page-hub-subtitle {
    font-size: var(--font-size-xl);              /* 1.25rem / 20px */
    font-weight: 600;                            /* Body Confident — min 600 per Bold Crystalline */
    color: var(--kora-text-secondary, #64748B);
    margin: 0;
    line-height: 1.5;
}

/* Optional: Icon support for page titles */
.page-hub-title i {
    margin-right: 0.75rem;
    color: var(--color-info-full);               /* Blue accent for icons */
}

/* ===== TYPOGRAPHY UTILITIES — BOLD CRYSTALLINE DISPLAY TIER ===== */
/* docs/archive/DESIGN.md §2: Display tier — Onest 900 with tight line-height. The
   stamped, billboard density that defines Kora's display personality.
   Apply on the page-hub h1 (or any element that wants the page-title
   weight). Single source of truth — DO NOT inline the values in
   per-page .razor.css files. */

.display-sub {
    /* Display Sub — 48px / 900 / lh 0.92 / ls -0.2px */
    font-family: 'Onest', 'Helvetica Neue', Arial, sans-serif;
    font-size: 3rem;                                   /* 48px */
    font-weight: var(--font-weight-black, 900);
    line-height: 0.92;
    letter-spacing: -0.2px;
    color: var(--kora-text-primary, #0F172A);
    margin: 0;
    font-feature-settings: "calt" 1;
}

.display-hero {
    /* Display Hero — 64px / 900 / lh 0.90 / ls -0.3px */
    font-family: 'Onest', 'Helvetica Neue', Arial, sans-serif;
    font-size: 4rem;                                   /* 64px */
    font-weight: var(--font-weight-black, 900);
    line-height: 0.90;
    letter-spacing: -0.3px;
    color: var(--kora-text-primary, #0F172A);
    margin: 0;
    font-feature-settings: "calt" 1;
}

.display-mega {
    /* Display Mega — 96px / 900 / lh 0.88 / ls -0.5px */
    font-family: 'Onest', 'Helvetica Neue', Arial, sans-serif;
    font-size: 6rem;                                   /* 96px */
    font-weight: var(--font-weight-black, 900);
    line-height: 0.88;
    letter-spacing: -0.5px;
    color: var(--kora-text-primary, #0F172A);
    margin: 0;
    font-feature-settings: "calt" 1;
}

/* Responsive scale-down on tablet / mobile */
@media (max-width: 768px) {
    .display-sub { font-size: 2.25rem; }
    .display-hero { font-size: 3rem; }
    .display-mega { font-size: 4rem; }
}

@media (max-width: 576px) {
    .display-sub { font-size: 2rem; }
    .display-hero { font-size: 2.5rem; }
    .display-mega { font-size: 3rem; }
}

/* Responsive adjustments for mobile devices */
@media (max-width: 768px) {
    .page-hub-header {
        padding: 1rem 0;
        margin-bottom: 2rem;
    }


    .page-hub-subtitle {
        font-size: 1.125rem;                     /* 18px */
    }
}

@media (max-width: 480px) {

    .page-hub-subtitle {
        font-size: 1rem;                         /* 16px */
    }
}

/* ===== GLOBAL FONT FAMILY ENFORCEMENT ===== */
/* Ensures the entire application uses the local 'Onest' font */
/* This override prevents component-level font-family declarations from breaking the design */

body, html, * {
    font-family: 'Onest', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
}

/* Exception: Preserve monospace fonts for code, pre, and data display components */
code, pre, kbd, .monospace, [class*="code"], [class*="terminal"] {
    font-family: 'Courier New', monospace !important;
}

/* Icon fonts: Allow Font Awesome and other icon fonts */
.fa, [class^="fa-"], [class*=" fa-"], [class^="icon-"], [class*=" icon-"] {
    font-family: var(--fa-font-family-free), var(--fa-font-family-brands) !important;
}

/* ===== GLOBAL INFORMATION CHIP/PILL COMPONENT CLASSES ===== */
/* Reusable chip/pill styling for status indicators, tags, and information displays
   Usage: <span class="info-chip info-chip-success">Completed</span>
   Or:    <span class="info-chip info-chip-success-outlined">Completed</span>
*/

/* Base Chip Class - Use with semantic modifiers below */
.info-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--chip-padding);
    min-height: var(--chip-min-height);
    line-height: var(--chip-line-height);
    border-radius: var(--chip-border-radius);
    font-size: var(--chip-font-size);
    font-weight: var(--chip-font-weight);
    transition: var(--chip-transition);
    border: var(--chip-border-width) solid transparent;
    white-space: nowrap;
    cursor: default;
    user-select: none;
    gap: 0.35rem;
}

/* Filled Chip Variants - Solid backgrounds with contrasting text */

.info-chip-success {
    background-color: var(--chip-success-bg);
    color: var(--chip-success-color);
}

.info-chip-success:hover {
    background-color: var(--chip-success-bg-hover);
}

.info-chip-danger {
    background-color: var(--chip-danger-bg);
    color: var(--chip-danger-color);
}

.info-chip-danger:hover {
    background-color: var(--chip-danger-bg-hover);
}

.info-chip-warning {
    background-color: var(--chip-warning-bg);
    color: var(--chip-warning-color);
}

.info-chip-warning:hover {
    background-color: var(--chip-warning-bg-hover);
}

.info-chip-info {
    background-color: var(--chip-info-bg);
    color: var(--chip-info-color);
}

.info-chip-info:hover {
    background-color: var(--chip-info-bg-hover);
}

.info-chip-primary {
    background-color: var(--chip-primary-bg);
    color: var(--chip-primary-color);
}

.info-chip-primary:hover {
    background-color: var(--chip-primary-bg-hover);
}

.info-chip-neutral {
    background-color: var(--chip-neutral-bg);
    color: var(--chip-neutral-color);
}

.info-chip-neutral:hover {
    background-color: var(--chip-neutral-bg-hover);
}

.info-chip-quarantine {
    background-color: var(--chip-quarantine-bg);
    color: var(--chip-quarantine-color);
}

.info-chip-quarantine:hover {
    background-color: var(--chip-quarantine-bg-hover);
}

/* Outlined Chip Variants - Transparent backgrounds with colored borders */

.info-chip-success-outlined {
    background-color: transparent;
    color: var(--chip-success-color);
    border-color: var(--chip-success-border);
}

.info-chip-success-outlined:hover {
    background-color: var(--chip-success-bg);
}

.info-chip-danger-outlined {
    background-color: transparent;
    color: var(--chip-danger-color);
    border-color: var(--chip-danger-border);
}

.info-chip-danger-outlined:hover {
    background-color: var(--chip-danger-bg);
}

.info-chip-warning-outlined {
    background-color: transparent;
    color: var(--chip-warning-color);
    border-color: var(--chip-warning-border);
}

.info-chip-warning-outlined:hover {
    background-color: var(--chip-warning-bg);
}

.info-chip-info-outlined {
    background-color: transparent;
    color: var(--chip-info-color);
    border-color: var(--chip-info-border);
}

.info-chip-info-outlined:hover {
    background-color: var(--chip-info-bg);
}

.info-chip-primary-outlined {
    background-color: transparent;
    color: var(--chip-primary-color);
    border-color: var(--chip-primary-border);
}

.info-chip-primary-outlined:hover {
    background-color: var(--chip-primary-bg);
}

.info-chip-neutral-outlined {
    background-color: transparent;
    color: var(--chip-neutral-color);
    border-color: var(--chip-neutral-border);
}

.info-chip-neutral-outlined:hover {
    background-color: var(--chip-neutral-bg);
}

.info-chip-quarantine-outlined {
    background-color: transparent;
    color: var(--chip-quarantine-color);
    border-color: var(--chip-quarantine-border);
}

.info-chip-quarantine-outlined:hover {
    background-color: var(--chip-quarantine-bg);
}

/* Chip with Icon Support */
.info-chip i {
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
}

/* Chip Container for Multiple Chips - Handles spacing */
.info-chips-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--chip-gap);
    align-items: center;
}

/* Chip Disabled State */
.info-chip:disabled,
.info-chip.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================================
   Professional Dashboard — conditional styles when a deployment
   background image is active (body.kora-has-home-bg set by
   home-background.js; body.kora-pro-dashboard set by the page).
   All rules below are no-ops when no image is deployed.
   ============================================================ */

/* body must be a stacking context for the ::before overlay to paint ABOVE
   body's own background image. Without isolation:isolate, body has no
   stacking context so z-index:-1 children fall below the background image
   and are invisible. With it, z-index:-1 paints above the background but
   below all page content (normal-flow blocks, SideNav, search, bottom sheet). */
body.kora-has-home-bg.kora-pro-dashboard {
    isolation: isolate;
}

/* Full-viewport dark overlay. position:fixed covers the entire viewport
   (including SideNav column and layout gutters). z-index:-1 within body's
   new stacking context sits above the background image, below all content. */
body.kora-has-home-bg.kora-pro-dashboard::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.52);
    pointer-events: none;
    z-index: -1;
}

/* Page title — white text with shadow for legibility over the image */
body.kora-has-home-bg .minimal-title {
    color: rgba(255, 255, 255, 0.95) !important;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
}

/* ============================================================
   Regulatory Dashboard — conditional styles when a deployment
   background image is active (body.kora-has-home-bg set by
   home-background.js; body.kora-reg-dashboard set by the page).
   All rules below are no-ops when no image is deployed.
   ============================================================ */

/* Creates a stacking context so the ::before dark overlay sits
   above the background image but below all page content. */
body.kora-has-home-bg.kora-reg-dashboard {
    isolation: isolate;
}

/* Full-viewport dark overlay — slightly lighter than Pro Dashboard
   (0.48 vs 0.52) because regulatory panels are data-dense tables. */
body.kora-has-home-bg.kora-reg-dashboard::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
    z-index: 0;
    pointer-events: none;
}

/* Bump glass opacity slightly for readability over the image.
   Light glass (not dark) is intentional — regulatory panels are
   table/form-heavy and --reg-navy values read best on light surfaces. */
body.kora-has-home-bg .reg-header,
body.kora-has-home-bg .reg-stat-card,
body.kora-has-home-bg .reg-tab-content,
body.kora-has-home-bg .reg-feature-disabled-content {
    --reg-glass-bg: rgba(255, 255, 255, 0.80);
    --reg-glass-border: rgba(255, 255, 255, 0.90);
    --reg-glass-shadow: 0 4px 24px rgba(15, 23, 42, 0.14), 0 1px 4px rgba(15, 23, 42, 0.08);
}

/* Responsive Adjustments for Chips */
@media (max-width: 480px) {
    .info-chips-group {
        gap: calc(var(--chip-gap) * 0.75);
    }

    .info-chip {
        padding: calc(var(--chip-padding-vertical) * 0.9) calc(var(--chip-padding-horizontal) * 0.85);
        font-size: 0.7rem;
    }
}

/* =======================================================================
   DARK GLASS BOTTOM SHEET — child component overrides
   Scoped via .minimal-recent-content-bottom parent selector.
   Specificity 0,2,0 beats Blazor-scoped CSS 0,1,1, so these win over
   hardcoded colours in WildlifeObservationFeedItem.razor.css.
   ======================================================================= */

/* Feed container / states */
.minimal-recent-content-bottom .observation-feed-container {
    min-height: 80px;
}

.minimal-recent-content-bottom .feed-loading,
.minimal-recent-content-bottom .feed-empty {
    color: rgba(148, 163, 184, 0.7);
}

.minimal-recent-content-bottom .feed-empty i {
    color: rgba(148, 163, 184, 0.25);
    opacity: 1;
}

.minimal-recent-content-bottom .feed-loading .loading-spinner {
    color: rgba(99, 102, 241, 0.7);
}

/* Record cards — dark glass instead of #FFFFFF */
.minimal-recent-content-bottom .observation-feed-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
}

.minimal-recent-content-bottom .observation-feed-item:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.28);
    transform: translateY(-1px);
}

/* Text — light on dark */
.minimal-recent-content-bottom .observation-title {
    color: #e2e8f0;
}

.minimal-recent-content-bottom .observation-description {
    color: rgba(148, 163, 184, 0.85);
}

.minimal-recent-content-bottom .observation-date {
    color: rgba(100, 116, 139, 0.9);
}

.minimal-recent-content-bottom .observation-details {
    color: rgba(100, 116, 139, 0.85);
}

.minimal-recent-content-bottom .observation-detail {
    color: rgba(100, 116, 139, 0.85);
}

/* Record type icons — dark-tinted glass instead of light pastel */
.minimal-recent-content-bottom .observation-icon.sighting {
    background: rgba(37, 99, 235, 0.18);
    color: rgba(147, 197, 253, 0.9);
}

.minimal-recent-content-bottom .observation-icon.incident {
    background: rgba(180, 83, 9, 0.2);
    color: rgba(252, 211, 77, 0.9);
}

/* =========================================================
   Studbook Workspace — shared utility classes
   Used across StudbookWorkspace child components
   ========================================================= */

.sb-card {
    background: light-dark(#ffffff, #1b1a19);
    border: 1px solid light-dark(rgba(0, 0, 0, 0.06), rgba(255, 255, 255, 0.072));
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.sb-section-heading {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 0.75rem;
}

/* Metric colour utilities — referenced by KPI strip and panel child components */
.metric-good    { color: light-dark(#10b981, #79ecc6); }
.metric-warning { color: light-dark(#f59e0b, #f7b546); }
.metric-critical { color: light-dark(#ef4444, #f47c7c); }
.metric-neutral  { color: #6366f1; }
/* ── Entity-triggered compose envelope buttons (Phase 2) ── */
.msg-entity-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border: none;
    background: transparent;
    color: #94a3b8;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: color 0.15s ease, background 0.15s ease;
    flex-shrink: 0;
}

.msg-entity-btn:hover {
    color: light-dark(#00d4aa, #79ecd5);
    background: rgba(0, 212, 170, 0.08);
}


/* The phone bar is 60px on the smallest phones (MobileNav). */
@media (max-width: 360px) {
    :root {
        --kx-phone-bar: 60px;
    }
}

/* Phones: form fields at 16px, so iOS Safari does not zoom the page when one gets focus (mobile UX, 9 Nov 2026).
   Checkboxes, radios and sliders have no text and keep their size. */
@media (max-width: 767.98px) {
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* Phones: room at the end of a record for the action dock above the phone bar (OISRecordHead DockActions, mobile UX,
   9 Nov 2026), so the last rows can still scroll clear of it. */
@media (max-width: 767.98px), (max-height: 500px) and (pointer: coarse) {
    body:has(.orh-dock.is-shown) .main-layout-content .main-content {
        padding-bottom: 68px;
    }
}

/* Tablets (768px to 1023px): an area's side list gives way to its slim section bar (OISSectionNav), so the page gets
   the whole width (#434, #457, #477). Every area frame lays the list and the page side by side in a flex row; here the
   row wraps, so the bar takes a line of its own above the page. Desktops keep the side list. */
@media (min-width: 768px) and (max-width: 1023.98px) {
    :has(> .osn-phone) {
        flex-wrap: wrap;
        align-content: flex-start;
    }

    /* ...and the page under it takes the full line (a page set to flex: 1 would otherwise squeeze in beside the bar at
       no width at all). !important because each area's scoped stylesheet, loaded after this one, sets its page's flex
       with the same specificity. */
    :has(> .osn-phone) > :not(.osn-phone, .osn-desktop) {
        flex-basis: 100% !important;
        min-width: 0;
    }
}

/* Read by screen readers, not drawn: a heading or label that the page shows another way (accessibility audit, 20 Nov 2026). */
.kora-sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Maps: the open map, Biosecurity Today and every other map share this. */
/* The credit line on a near-solid panel in the page's own colours, so it reads in both themes over any map
   (WCAG 1.4.3; in dark it was light words on MapLibre's pale panel, 1.05:1 to 2.67:1). */
html .leaflet-container .leaflet-control-attribution,
html .maplibregl-ctrl.maplibregl-ctrl-attrib,
html .maplibregl-ctrl.maplibregl-ctrl-attrib.maplibregl-compact {
    background: color-mix(in srgb, var(--color-background-white, #ffffff) 92%, transparent);
    color: var(--color-text-primary, #2c3e50);
}
html .leaflet-container .leaflet-control-attribution a,
html .maplibregl-ctrl.maplibregl-ctrl-attrib a {
    color: inherit;
}

/* A code sheet on screen (21 Nov 2026): the sheet sits on a sheet of paper inside the Scan frame, white in both themes
   because that is what will come out of the printer. On paper the sheet is the page itself. */
.kx-print-paper {
    background: #ffffff;
    color: #000000;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.16);
    overflow-x: auto;
}

/* Printing from the Scan area (21 Nov 2026): the scan pages and the code sheets sit in the app frame on screen, with the
   rail, the bar, the area's side list and the phone bar around them. On paper only the page prints, on white, as it did
   when the sheets had a bare layout of their own. A page still marks its own screen controls with print-hide. */
@media print {
    body:has(.scn-area) :is(.sidenav-container, .mobile-nav, .breadcrumb-navigation, .bc-popovers-overlay, .kora-skip-link,
        .exercise-strip, .demonstration-strip, .osn-desktop, .osn-phone, .print-hide) {
        display: none !important;
    }

    html:has(.scn-area), body:has(.scn-area) {
        background: #fff !important;
        color: #000 !important;
    }

    body:has(.scn-area) :is(.main-layout-container, .main-layout-content, .main-content, .container.is-fluid, .scn-area, .scn-area-page) {
        margin: 0 !important;
        padding: 0 !important;
        min-height: 0 !important;
        background: none !important;
    }

    /* A code sheet prints alone: its frame's head (title and print choices) stays on screen. */
    body:has(.scn-area) .sf:has(.kx-print-paper) :is(.sf-head) { display: none !important; }
    body:has(.scn-area) .sf:has(.kx-print-paper) { padding: 0 !important; }
    .kx-print-paper { padding: 0; border-radius: 0; box-shadow: none; overflow: visible; }
}
