/* ==========================================================================
 * Tailwind v4 Compatibility Rules
 * Added: February 4, 2026 (tailwind-v4-upgrade branch)
 * These rules preserve v3 default behaviors that changed in v4.
 * ========================================================================== */

/* Preserve v3 default border color (gray-200 instead of v4's currentColor) */
*, ::after, ::before, ::backdrop, ::file-selector-button {
  border-color: var(--color-gray-200, currentColor);
}

/* Preserve pointer cursor on buttons (v4 changed to default cursor) */
button:not(:disabled), [role="button"]:not(:disabled) {
  cursor: pointer;
}

/* Restore v3 container responsive max-widths (v4 only sets width: 100%)
   IMPORTANT: Must be in @layer base so Tailwind utilities (e.g. max-w-full) can override them.
   Un-layered CSS always beats @layer utilities in v4's cascade layer model. */
@layer base {
  .container {
    width: 100%;
  }
  @media (min-width: 640px) {
    .container { max-width: 640px; }
  }
  @media (min-width: 768px) {
    .container { max-width: 768px; }
  }
  @media (min-width: 1024px) {
    .container { max-width: 1024px; }
  }
  @media (min-width: 1280px) {
    .container { max-width: 1280px; }
  }
  @media (min-width: 1536px) {
    .container { max-width: 1536px; }
  }
}

/**
 * ============================================================================
 * RAVENSCROFT PORTFOLIO - LIQUID GLASS DESIGN SYSTEM
 * ============================================================================
 * 
 * Version: 9.0 - PHASE 4 COMPLETE: SYSTEMATIC OPTIMIZATION
 * Last Updated: January 20, 2026
 * Design Language: Apple-inspired Liquid Glass
 * Status: Phase 4 Complete - Consolidated & Optimized
 * 
 * IMPLEMENTATION PHASES:
 * ✅ Phase 1: Foundation - Typography & Spacing System
 * ✅ Phase 2: Color Refinement & Depth - Shadows, Gradients, Hover States
 * ✅ Phase 3: Interactive Elements - Animations, Modals, Polish
 * ✅ Phase 4: Page-Specific Enhancements - Navigation, Hero, Stats, Mobile
 * ✅ Phase 5: Accessibility, Performance & Micro-interactions
 * ✅ Phase 6: Liquid Glass Design System - Complete Implementation
 * ✅ Phase 7: Consolidation - Navigation, Modals, Text Alignment (97 lines removed)
 * ✅ Phase 8: Performance - @supports Consolidation, !important Reduction (171 lines removed)
 * 
 * LIQUID GLASS COMPONENTS:
 * ✅ Design System Variables (blur, opacity, tints, saturation, shadows)
 * ✅ Navigation (consolidated, scroll-triggered states, glass backgrounds)
 * ✅ Cards & Containers (spotlight, stat, base, gradient variants)
 * ✅ Buttons (primary, gold, with glass glows)
 * ✅ Forms & Inputs (text, select, checkbox, radio, file, search, Quill)
 * ✅ Modals (consolidated system, backdrop, content, fixed headers, animations)
 * ✅ Badges & Status Indicators (status, tags, dots, notifications)
 * ✅ Colored Sections (purple, blue, green, red, orange notes)
 * ✅ Tabs (base, hover, active states with glass)
 * ✅ Dropdown Menus (glass containers, animated items)
 * ✅ Progress Bars (frosted containers, animated fills)
 * ✅ Tables (glass headers, frosted rows, hover states)
 * ✅ Footer (gradient glass background, glass links)
 * ✅ Loading & Spinner (enhanced with glass effects)
 * ✅ Animations (page transitions, scroll reveals, micro-interactions)
 * ✅ Accessibility (focus states, reduced motion support)
 * (Glass utility classes .glass-light/.glass-medium/.glass-heavy removed — unused)
 * 
 * BROWSER SUPPORT:
 * - Modern browsers with backdrop-filter support
 * - Progressive enhancement with consolidated @supports query
 * - Graceful fallbacks for older browsers
 * - Webkit prefixes for Safari compatibility
 * 
 * PERFORMANCE:
 * - Hardware-accelerated transforms
 * - Single consolidated @supports block (43→1)
 * - Optimized backdrop-filter usage via utility classes
 * - Reduced !important usage (440→404, targeting <200)
 * - Smooth 60fps animations
 * - Reduced motion preference respected
 * 
 * FILE STATS:
 * - Lines: 5,476 (up from 5,434, +42 lines / +0.8% - documentation & organization)
 * - !important count: 430 (down from 433, -3 / -0.7%)
 * - @supports blocks: 1 (consolidated in Phase 2)
 * - CSS Variables: 56 (up from 41, +15 admin-specific variables)
 * - Utility Classes: 23 (ready for future use)
 * - Transitions using var: 62 (up from 35, +27 / +77%)
 * - Media Query Blocks: 16 (down from 24, -8 / -33%)
 *   - Tablet (768px): 7 → 1 block (consolidated)
 *   - Mobile (640px): 3 → 1 block (consolidated)
 * 
 * PHASE 4 SYSTEMATIC OPTIMIZATION (v9.0):
 * ✅ Consolidated 7× tablet (768px) media queries → 1 organized block (-50 lines)
 * ✅ Consolidated 3× mobile (640px) media queries → 1 organized block (-20 lines)
 * ✅ Added 5 specialized transition variables (background, color, opacity, width, none)
 * ✅ Replaced 27 additional hardcoded transitions with variables (62 total using var)
 * ✅ Created admin spacing variable system (10 variables for compressed design)
 * ✅ Applied admin variables to 15+ selectors for easier global adjustment
 * ✅ Added comprehensive admin system documentation (philosophy, implementation, usage)
 * ✅ Reduced !important count by 3 through better organization
 * ✅ Media query reduction: 24 → 16 blocks (-33%)
 * 
 * PHASE 3 SYSTEMATIC REFACTORING (v8.0):
 * ✅ Added 27 systematic CSS variables (spacing, sizing, radius, transitions, shadows)
 * ✅ Created 23 reusable utility classes (transition, shadow, radius, spacing)
 * ✅ Replaced 35 hardcoded transitions with var(--transition-smooth)
 * ✅ Removed 16 redundant "very tight" comment phrases
 * ✅ Added responsive breakpoint index for easier navigation
 * ✅ Documented all media query locations for consolidation
 * 
 * ACCESSIBILITY FIX (v7.6):
 * ✅ Fixed Touch Target Sizing conflict - excluded checkboxes/radios from 44px rule
 * ✅ Checkboxes now properly sized at 14px × 14px (was being forced to 44px)
 * ✅ Added explicit min-height/min-width: auto for checkboxes and radios
 * 
 * FINAL POLISH (v7.5):
 * ✅ Checkboxes resized to 14px × 14px - matches text-sm used throughout system
 * ✅ Checkbox checkmark resized to 10px - proportional to 14px box
 * ✅ Checkbox shadows reduced - more subtle, less prominent
 * ✅ Checkbox border-radius refined - 3px for better proportion
 * ✅ Checkbox spacing restored - 0.5rem gap aligns with text
 * 
 * STRUCTURAL FIXES (v7.4):
 * ✅ Admin page now uses <main> tag (was <div>) - consistent with other pages
 * ✅ Admin page now has <footer> element - was completely missing
 * ✅ Removed redundant .admin-page main/container overflow rules
 * ✅ Footer centering works on all pages with highest specificity selectors
 * ✅ Navigation dropdowns visible on Admin page with overflow: visible cascade
 * 
 * BUG FIXES (v7.1-7.3):
 * - Fixed orphaned closing braces in checkbox and footer sections
 * - Fixed My Team page duplicate submenus (base hide + responsive media queries)
 * - Fixed Admin page navigation dropdowns - forced overflow: visible hierarchy
 * - Improved transitions - removed transform, kept only visual properties
 * 
 * ============================================================================
 */

/* ============================================
   LIQUID GLASS DESIGN SYSTEM - CSS Variables
   ============================================ */

:root {
  /* Glass Material Properties */
  --glass-blur-light: 20px;
  --glass-blur-medium: 30px;
  --glass-blur-heavy: 40px;
  
  /* Glass Opacity Levels */
  --glass-opacity-light: 0.70;
  --glass-opacity-medium: 0.80;
  --glass-opacity-heavy: 0.90;
  
  /* Glass Tints */
  --glass-tint-primary: #00703c;
  --glass-tint-primary-dark: #005a2f;
  --glass-tint-primary-darker: #004524;
  /* Light green tint for evaluation meta sections (complements Ravenscroft green) */
  --glass-tint-primary-light-bg: linear-gradient(135deg, rgba(232, 245, 239, 0.95) 0%, rgba(212, 237, 224, 0.98) 100%);
  --glass-tint-primary-light-border: rgba(0, 112, 60, 0.28);
  --glass-tint-light: rgba(255, 255, 255, 0.75);
  --glass-tint-dark: rgba(0, 0, 0, 0.40);
  /* Brand accent */
  --color-gold: #FFC702;
  --color-gold-dark: #e6b302;
  --color-gold-darker: #cc9e00;
  --color-gold-light: #f5be02;
  
  /* Glass Saturation */
  --glass-saturate: 180%;
  
  /* Glass Shadows & Glow */
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.15);
  --glass-glow: 0 0 20px rgba(0, 112, 60, 0.2);
  --glass-border: rgba(255, 255, 255, 0.18);
  
  /* Spacing Scale - Phase 3 (compact platform) */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 0.75rem;
  --space-lg: 0.875rem;
  --space-xl: 1.25rem;
  --space-2xl: 1.5rem;
  --space-3xl: 3rem;
  --space-4xl: 4rem;
  
  /* Sizing Scale - Phase 3 */
  --size-xs: 0.625rem;
  --size-sm: 0.875rem;
  --size-md: 1rem;
  --size-lg: 1.125rem;
  --size-xl: 1.25rem;
  --size-2xl: 1.5rem;
  
  /* Border Radius - Phase 3 */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  
  /* Transitions - Phase 3 & 4 */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.2s ease-in-out;
  --transition-medium: all 0.3s ease-in-out;
  --transition-transform: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-background: background 0.2s ease;
  --transition-color: color 0.2s ease-in-out;
  --transition-underline: text-decoration-thickness 0.2s ease-in-out;
  --transition-opacity: opacity 0.3s ease;
  --transition-width: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-none: none;
  
  /* Shadows - Phase 3 */
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.08), 0 2px 8px 0 rgba(0, 0, 0, 0.04);
  
  /* Admin Page Compressed Spacing - Phase 4 */
  /* Admin page uses 75-80% of standard spacing for denser layouts */
  --admin-card-padding: 0.875rem;           /* compact platform */
  --admin-heading-margin: 0.875rem;        /* compact platform */
  --admin-section-small: 0.625rem;         /* compact platform */
  --admin-section-medium: 0.875rem;        /* compact platform */
  --admin-section-large: 1.25rem;            /* compact platform */
  --admin-input-padding: 0.375rem 0.625rem; /* compact platform */
  --admin-button-padding: 0.5rem 1rem;      /* compact platform */
  --admin-label-margin: 0.25rem;            /* compact platform */
  --admin-grid-gap: 0.625rem;              /* compact platform */
  --admin-info-box-padding: 0.625rem 0.875rem; /* compact platform */
  
  /* Navigation - used for sticky nav and modal backdrop clearance */
  --nav-height: 80px;

  /* Toast notifications - below nav, above content */
  --z-toast: 1001;

  /* Modal system - single opacity, single animation timing, optional close animation */
  --modal-backdrop-opacity: 0.5;
  --modal-transition-duration: 0.3s;
  --modal-transition-easing: cubic-bezier(0.4, 0, 0.2, 1);
  --modal-max-height: calc(100vh - 160px);
  --modal-content-radius: 0.5rem;

  /* Color tokens - grays and base (theming and consistency, D1) */
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2937;
  --color-gray-900: #111827;
  --color-black: #000000;
  --color-white: #ffffff;

  /* Focus ring tokens (D2) - single source for outline/glow, keeps focus in sync */
  --focus-ring: 2px solid var(--glass-tint-primary);
  --focus-ring-thick: 3px solid var(--glass-tint-primary);
  --focus-ring-gold: 3px solid var(--color-gold);
  --focus-ring-offset: 3px;
  --focus-ring-offset-sm: 2px;
  --focus-ring-offset-lg: 4px;
  --focus-ring-shadow: 0 0 0 4px rgba(0, 112, 60, 0.15), 0 0 20px rgba(0, 112, 60, 0.2);
  --focus-ring-shadow-gold: 0 0 0 4px rgba(255, 199, 2, 0.20), 0 0 24px rgba(255, 199, 2, 0.25);
  --focus-ring-shadow-card: 0 0 0 5px rgba(0, 112, 60, 0.15), 0 0 25px rgba(0, 112, 60, 0.2), 0 8px 24px 0 rgba(0, 0, 0, 0.10);
}

/* ============================================
   PHASE 3 UTILITY CLASSES
   ============================================ */

/* Transition utilities removed — .transition-smooth, .transition-fast, .transition-medium
   had zero usages in HTML/JS. .transition-transform shadowed Tailwind's native utility.
   The --transition-* CSS variables remain in :root and are used throughout this file. */

/* Shadow, radius, spacing glass utility classes removed — all 18 had zero usages
   in HTML/JS. The backing --shadow-*, --radius-*, --space-* CSS variables remain
   in :root and are referenced internally in this file. */

/* Unused CSS removed (scan Feb 2026): .full-width, .glass-light/.glass-medium/.glass-heavy,
   .form-spacing, .form-group-lg, .focus-within-ring; and in 768px media: .section-header,
   .table-wrapper, .table-enhanced, .quick-actions, .quick-action-button. */

/* ============================================
   BASE & TYPOGRAPHY
   ============================================ */

/* Tailwind v4 compat: Place resets in @layer base so @layer utilities can override them.
   In v4, un-layered CSS always beats layered CSS regardless of specificity.
   Without this, * { margin: 0 } would override Tailwind's mx-auto, mb-6, px-16, etc. */
@layer base {
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  html {
    margin: 0;
    padding: 0;
    height: 100%;
  }

  /* App-shell layout (BambooHR-style): body is flex column, main is the only scroll container.
     Nav stays at top because it is outside the scrolling main. */
  body {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--color-black);
    margin: 0;
    padding: 0;
    min-height: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background-color: var(--color-gray-50);
  }
}

/* Admin page uses same app-shell layout as base body.
   Phase 1 Keep: !important ensures overflow:hidden wins (critical layout). Do not remove. */
body.admin-page {
  overflow: hidden !important;
}

/* Main content areas inherit body background */
main.bg-gray-50,
main.container {
  background-color: transparent; /* Let body background show through */
}

/* Typography Scale - Phase 1 Enhancement */
.text-base {
  font-size: 1rem;
  line-height: 1.5;
}

/* Headings - Very Tight
   Must be in @layer base so Tailwind utilities (text-xl, font-bold, etc.) can override */
@layer base {
  h1, .heading-1 {
    font-size: 1.5rem; /* 24px - compact platform scale */
    font-weight: 700;
    line-height: 1.2;
  }
}

/* ============================================
   TEXT ALIGNMENT SYSTEM
   ============================================ */

/* Center alignment utility — !important removed: un-layered beats @layer utilities in v4 */
.text-center,
.text-center h1,
.text-center .heading-1,
.text-center h2,
.text-center h3,
.text-center h4,
.text-center h5,
.text-center h6,
.text-center p,
.text-center div:not([class*="flex"]):not([class*="grid"]) {
  text-align: center;
}

/* Left alignment for specific card types */
.border-l-4.border-gold *,
.border-l-4.border-gold h4,
.border-l-4.border-gold p,
.border-l-4.border-gold span,
.border-l-4.border-gold div {
  text-align: left;
}

/* ============================================
   SPECIFIC GLASS CARD TYPES
   ============================================ */

/* Spotlight Cards - Enhanced Glass with Gold Accent */
.border-l-4.border-gold {
  background: rgba(255, 252, 240, 0.92);
  border-left-width: 4px;
  border-left-color: var(--color-gold);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.08),
              0 2px 8px 0 rgba(0, 0, 0, 0.04),
              inset 4px 0 0 0 var(--color-gold);
  transition: var(--transition-smooth);
}

.border-l-4.border-gold:hover {
  background: rgba(255, 252, 240, 0.97);
  box-shadow: 0 12px 48px 0 rgba(255, 199, 2, 0.15),
              0 4px 16px 0 rgba(0, 0, 0, 0.08),
              inset 4px 0 0 0 var(--color-gold),
              0 0 30px rgba(255, 199, 2, 0.2);
  transform: translateY(-3px) translateX(2px);
}

/* Gray Background Cards - Subtle Glass (increased opacity for contrast) */
.bg-gray-50 {
  background: rgba(249, 250, 251, 0.92);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(209, 213, 219, 0.5); /* gray-300 at 50% — visible border */
  transition: var(--transition-smooth);
}

/* White Background Cards - Premium Glass (increased opacity for contrast) */
.bg-white.rounded-lg,
.bg-white.rounded {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(229, 231, 235, 0.5); /* gray-200 at 50% — subtle but visible */
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.08),
              0 2px 8px 0 rgba(0, 0, 0, 0.04);
  transition: var(--transition-smooth);
}

.bg-white.rounded-lg:hover,
.bg-white.rounded:hover {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 12px 48px 0 rgba(0, 0, 0, 0.10),
              0 4px 16px 0 rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

/* Specific overrides for homepage - ensure headings and paragraphs are centered */
main.container .text-center h1,
main.container .text-center .heading-1,
main.container .text-center p {
  text-align: center;
  display: block;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* API Status section - ensure everything is centered */
.bg-blue-50.text-center h3,
.bg-blue-50.text-center p {
  text-align: center;
  display: block;
  width: 100%;
}

.bg-blue-50.text-center p span {
  display: inline;
  text-align: center;
}

/* Blue notification/info sections: text spans full width everywhere */
.bg-blue-50.border {
  width: 100%;
  box-sizing: border-box;
}
.bg-blue-50.border > p,
.bg-blue-50.border > h3,
.bg-blue-50.border > h4,
.bg-blue-50.border > ul {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* ============================================
   DARKER GREY TEXT COLORS - Override Tailwind
   ============================================
   
   ACCESSIBILITY: WCAG 2.1 Contrast Compliance
   All overrides tested against white (#FFFFFF) background.
   
   CONTRAST RATIO TABLE (on white background):
   ┌─────────────┬─────────────┬─────────────┬─────────────┐
   │ Tailwind    │ Original    │ New Color   │ Contrast    │
   │ Class       │ Color       │ (Override)  │ Ratio       │
   ├─────────────┼─────────────┼─────────────┼─────────────┤
   │ gray-300    │ #d1d5db     │ #4b5563     │ 7.4:1 (AAA) │
   │ gray-400    │ #9ca3af     │ #4b5563     │ 7.4:1 (AAA) │
   │ gray-500    │ #6b7280     │ #374151     │ 10.4:1(AAA) │
   │ gray-600    │ #4b5563     │ #1f2937     │ 13.1:1(AAA) │
   │ gray-700    │ #374151     │ #111827     │ 16.0:1(AAA) │
   │ gray-800    │ #1f2937     │ #000000     │ 21.0:1(AAA) │
   └─────────────┴─────────────┴─────────────┴─────────────┘
   
   WCAG Requirements:
   - AA Normal Text: 4.5:1 minimum
   - AA Large Text: 3:1 minimum  
   - AAA Normal Text: 7:1 minimum
   - AAA Large Text: 4.5:1 minimum
   
   All overrides exceed AAA requirements for maximum readability.
   ============================================ */

.text-gray-300 {
  color: var(--color-gray-600); /* was #d1d5db → gray-600 — !important removed: un-layered beats @layer utilities in v4 */
}

.text-gray-400 {
  color: var(--color-gray-600); /* was #9ca3af → gray-600 */
}

.text-gray-500 {
  color: var(--color-gray-700); /* was #6b7280 → gray-700 */
}

.text-gray-600 {
  color: var(--color-gray-800); /* was #4b5563 → gray-800 */
}

.text-gray-700 {
  color: var(--color-gray-900); /* was #374151 → gray-900 */
}

.text-gray-800 {
  color: var(--color-black); /* was #1f2937 → black */
}

/* Ensure default paragraph and div text is black, not grey.
   Must be in @layer base so Tailwind text-color utilities (e.g. text-white)
   in @layer utilities can override this when explicitly set. */
@layer base {
  p, div, span, label {
    color: inherit;
  }
}

@layer base {
  h2, .heading-2 {
    font-size: 1.25rem; /* 20px - compact platform scale */
    font-weight: 700;
    line-height: 1.3;
  }

  h3, .heading-3 {
    font-size: 1.0625rem; /* 17px - compact platform scale */
    font-weight: 600;
    line-height: 1.4;
  }
}

/* ============================================
   BRAND COLORS - Phase 2: Expanded Palette
   ============================================ */

/* Primary Green */
.bg-primary {
  background-color: var(--glass-tint-primary);
}

/* Hover effect for interactive elements using bg-primary (buttons/links).
   Tailwind's hover:bg-green-700 only shifts background-color slightly and
   may not be generated by the CDN for dynamic HTML. This provides a real effect. */
button.bg-primary:hover,
a.bg-primary:hover {
  background-color: var(--glass-tint-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px -2px rgba(0, 112, 60, 0.35),
              0 3px 10px -3px rgba(0, 0, 0, 0.12);
}

button.bg-primary:active,
a.bg-primary:active {
  transform: translateY(0);
}

.text-primary {
  color: var(--glass-tint-primary);
}

.border-primary {
  border-color: var(--glass-tint-primary);
}


/* Gold Accent with Glass Depth */
.bg-gold {
  background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
  box-shadow: 0 4px 16px 0 rgba(255, 199, 2, 0.30),
              0 2px 8px 0 rgba(0, 0, 0, 0.08),
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: var(--transition-smooth);
}

.bg-gold:hover {
  background: linear-gradient(135deg, var(--color-gold-dark) 0%, var(--color-gold-darker) 100%);
  box-shadow: 0 8px 24px 0 rgba(255, 199, 2, 0.40),
              0 4px 12px 0 rgba(0, 0, 0, 0.12),
              inset 0 1px 0 rgba(255, 255, 255, 0.4),
              0 0 30px rgba(255, 199, 2, 0.25);
  transform: translateY(-2px);
}

.text-gold {
  color: var(--color-gold);
}

/* Hover states - Phase 2 Enhanced */
.hover\:bg-primary-hover:hover {
  background-color: var(--glass-tint-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 10px 20px -5px rgba(0, 112, 60, 0.25);
}

/* ============================================
   NAVIGATION STYLES - Phase 2 Enhanced
   ============================================ */

.nav-link {
  color: white;
  text-decoration: none;
  padding: var(--space-xs) var(--size-xs);
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
  font-weight: 600; /* Heavier base font weight (semibold) */
  white-space: nowrap;
  position: relative;
  font-size: var(--size-sm);
}

.nav-link:hover {
  /* Glass-style hover effect - trimmed blur for performance */
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--color-gold);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 
              0 0 20px rgba(255, 199, 2, 0.3);
  font-weight: 700; /* Bolder on hover */
}

.nav-active {
  /* Glass-style active state - trimmed blur for performance */
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--color-gold);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15),
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
  font-weight: 700; /* Bold when active */
}

/* ============================================
   LAYOUT & SPACING - Phase 1 & 2
   ============================================ */

/* Main content: flex child that scrolls (app-shell). Padding-top clears the fixed nav. */
main {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-top: var(--nav-height);
  margin-top: var(--space-lg);
  margin-bottom: 0; /* no gap above footer — footer padding provides separation and avoids white bar */
}

/* Ensure loading and empty states are centered */
#loading,
#observationsLoading,
#observationsEmpty,
#dashboardLoading,
#myWorkLoading,
#myWorkEmpty,
#teamLoading,
#teamEmpty,
#staffEvaluationsLoading,
#staffEvaluationsEmpty,
#goalsContainer,
#observationsContainer,
#evaluationsContainer,
#spotlightsReceivedContainer,
#spotlightsSentContainer,
#employeeList {
  width: 100%;
}

#loading:not(.hidden),
#observationsLoading:not(.hidden),
#observationsEmpty:not(.hidden),
#dashboardLoading:not(.hidden),
#myWorkLoading:not(.hidden),
#myWorkEmpty:not(.hidden),
#teamLoading:not(.hidden),
#teamEmpty:not(.hidden),
#staffEvaluationsLoading:not(.hidden),
#staffEvaluationsEmpty:not(.hidden) {
  text-align: center;
}

/* Container-specific text alignment: Centered */
#loading p,
#observationsLoading p,
#observationsEmpty p,
#dashboardLoading p,
#myWorkLoading p,
#myWorkEmpty p,
#teamLoading p,
#teamEmpty p,
#staffEvaluationsLoading p,
#staffEvaluationsEmpty p,
#goalsContainer p {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

/* Container-specific text alignment: Left-aligned */
#spotlightsReceivedContainer p,
#spotlightsSentContainer p,
#observationsContainer p,
#evaluationsContainer p {
  text-align: left;
}

/* Footer text - always centered, highest specificity */
footer p,
footer div,
footer span,
footer.text-center p,
.text-center.mt-12 p {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   LIQUID GLASS CARD SYSTEM - Enhanced
   ============================================ */

.card {
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(229, 231, 235, 0.5); /* gray-200 at 50% — visible border */
  box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.08), 
              0 2px 8px 0 rgba(0, 0, 0, 0.04);
  padding: var(--space-lg);
  transition: var(--transition-smooth);
}

.card:hover {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 8px 24px 0 rgba(0, 0, 0, 0.10),
              0 4px 12px 0 rgba(0, 0, 0, 0.06);
  transform: translateY(-4px) scale(1.01);
}

.card-lg {
  padding: 1rem; /* 1rem between --space-lg and --space-xl */
}


/* Template selection cards - observation/evaluation types */
.template-card {
  display: block;
  width: 100%;
  cursor: pointer;
  text-align: left;
}

.template-card.card {
  padding: 1rem;
}

.template-card h4 {
  margin-bottom: 0.375rem;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
}

.template-card p {
  margin-bottom: 0.375rem;
  line-height: 1.5;
}

.template-card p:last-child {
  margin-bottom: 0;
}

/* Section spacing */
.section-spacing {
  margin-top: var(--space-md);
  margin-bottom: var(--space-sm);
}

/* Grid gaps */
.grid-spacing {
  gap: 0.625rem;
}

/* ============================================
   FORMS & INPUTS - Phase 1 & 2 Enhanced
   ============================================ */

/* Labels - in @layer base so Tailwind utilities (mb-1, inline, text-white, etc.) can override */
@layer base {
  label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-gray-700);
    margin-bottom: var(--space-xs);
  }
}

/* ============================================
   LIQUID GLASS FORM INPUTS
   ============================================ */

/* Input fields - Frosted Glass Effect (border contrast improved) */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
input[type="url"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1.5px solid rgba(209, 213, 219, 0.7); /* gray-300 at 70% — visible border */
  border-radius: var(--radius-md);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.875rem;
  line-height: 1.5;
  transition: var(--transition-smooth);
  background: rgba(255, 255, 255, 0.80);
  color: var(--color-black);
  box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.04),
              0 2px 8px 0 rgba(0, 0, 0, 0.02),
              inset 0 1px 2px rgba(0, 0, 0, 0.03);
  position: relative;
}

/* ============================================
   GLASS CHECKBOXES & RADIO BUTTONS
   ============================================ */

/* Checkboxes - Glass style - sized for good visual balance with text.
   Phase 1 Keep: width/height !important to override Tailwind v4 sr-only (1px/1px). Do not remove.
   Other properties: !important removed — un-layered beats @layer utilities. */
input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px;
  min-height: 16px;
  max-width: 16px;
  max-height: 16px;
  padding: 0;
  margin: 0;
  margin-right: var(--space-sm); /* Gap between checkbox and adjacent text/label */
  cursor: pointer;
  accent-color: var(--glass-tint-primary);
  flex-shrink: 0;
  border-radius: 3px;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.60);
  border: 1.5px solid rgba(0, 112, 60, 0.3);
  transition: var(--transition-background), border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  box-shadow: var(--shadow-sm);
  vertical-align: middle;
}

input[type="checkbox"]:hover {
  background: rgba(255, 255, 255, 0.80);
  border-color: rgba(0, 112, 60, 0.5);
  box-shadow: 0 2px 6px 0 rgba(0, 112, 60, 0.15);
}

input[type="checkbox"]:checked {
  background: linear-gradient(135deg, var(--glass-tint-primary) 0%, var(--glass-tint-primary-dark) 100%);
  border-color: var(--glass-tint-primary);
  box-shadow: 0 2px 6px 0 rgba(0, 112, 60, 0.25),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Checkbox + label alignment — works for both <label> and <div> flex containers */
.flex.items-center input[type="checkbox"],
label.flex.items-center input[type="checkbox"] {
  align-self: center;
}

/* Ensure flex containers with checkboxes have consistent gap */
.flex.items-center.space-x-2:has(input[type="checkbox"]),
label.flex.items-center.space-x-2 {
  gap: var(--space-sm);
}

input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  color: white;
  font-size: 0.7rem;
  font-weight: bold;
  line-height: 1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Radio buttons - Glass style.
   Phase 1 Keep: width/height/clip-path/clip/overflow/white-space !important to override
   Tailwind v4 sr-only and keep radios visible in chips. Do not remove. */
input[type="radio"] {
  width: 1rem !important;
  height: 1rem !important;
  min-width: 1rem;
  min-height: 1rem;
  max-width: 1rem;
  max-height: 1rem;
  padding: 0;
  margin: 0 0.375rem 0 0; /* Right margin for label text spacing */
  cursor: pointer;
  flex-shrink: 0;
  transform: scale(1);
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.60);
  border: 1.5px solid rgba(0, 112, 60, 0.3);
  border-radius: 50%;
  transition: var(--transition-smooth);
  position: relative;
  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.04),
              inset 0 1px 2px rgba(0, 0, 0, 0.02);
  clip-path: none !important;
  clip: auto !important;
  overflow: visible !important;
  white-space: normal !important;
}

input[type="radio"]:hover {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(0, 112, 60, 0.5);
  box-shadow: 0 4px 12px 0 rgba(0, 112, 60, 0.15);
  transform: scale(1.05);
}

input[type="radio"]:checked {
  background: rgba(255, 255, 255, 0.85);
  border-color: var(--glass-tint-primary);
  border-width: 2px;
  box-shadow: 0 4px 12px 0 rgba(0, 112, 60, 0.30),
              inset 0 1px 0 rgba(255, 255, 255, 0.2),
              0 0 20px rgba(0, 112, 60, 0.2);
}

input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  width: 0.4rem;
  height: 0.4rem;
  background: linear-gradient(135deg, var(--glass-tint-primary) 0%, var(--glass-tint-primary-dark) 100%);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 8px rgba(0, 112, 60, 0.5);
}

/* Hover state - Enhanced glass */
input:hover,
select:hover,
textarea:hover {
  background: rgba(255, 255, 255, 0.90);
  border-color: rgba(156, 163, 175, 0.6); /* gray-400 at 60% */
  box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.06),
              0 2px 8px 0 rgba(0, 0, 0, 0.03),
              inset 0 1px 2px rgba(0, 0, 0, 0.03);
  transform: translateY(-1px);
}

/* Focus state - Glass with green glow */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.85);
  border-color: var(--glass-tint-primary);
  box-shadow: 0 0 0 4px rgba(0, 112, 60, 0.15),
              0 8px 24px 0 rgba(0, 112, 60, 0.12),
              0 4px 12px 0 rgba(0, 0, 0, 0.06),
              inset 0 1px 0 rgba(255, 255, 255, 0.5),
              0 0 30px rgba(0, 112, 60, 0.15);
  transform: translateY(-2px);
}

/* Disabled state - Frosted and dimmed
   !important removed: un-layered + :disabled pseudo-class beats @layer utilities in v4 */
input:disabled,
select:disabled,
textarea:disabled,
button:disabled {
  background: rgba(249, 250, 251, 0.60);
  border-color: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.40);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Disabled select/textarea glass effect — applied via @supports block at end of file */

/* Read-only state - Similar to disabled but clearer */
input:read-only,
textarea:read-only {
  background: rgba(249, 250, 251, 0.70);
  border-color: rgba(0, 0, 0, 0.15);
  color: rgba(0, 0, 0, 0.70);
  cursor: default;
}

/* Search input - Enhanced glass with icon space */
input[type="search"] {
  padding-left: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%2300703c' stroke-width='2'%3E%3Ccircle cx='6.5' cy='6.5' r='4.5'/%3E%3Cpath d='M10 10l4 4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 0.75rem center;
  background-size: 16px;
}

input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  height: 16px;
  width: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23666' d='M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm4 10.9L10.9 12 8 9.1 5.1 12 4 10.9 6.9 8 4 5.1 5.1 4 8 6.9 10.9 4 12 5.1 9.1 8 12 10.9z'/%3E%3C/svg%3E");
  background-size: 16px;
  cursor: pointer;
  opacity: 0.5;
  transition: var(--transition-opacity);
}

input[type="search"]::-webkit-search-cancel-button:hover {
  opacity: 1;
}

/* ============================================
   CRITICAL: GLOBAL SELECT DROPDOWN FIX
   Remove ALL default browser arrows from ALL selects
   ============================================ */

/* Base rule - applies to ALL select elements everywhere.
   Phase 1 Keep: appearance !important to override browser UA (native select arrow). Do not remove.
   Other properties: !important removed — un-layered beats @layer utilities in v4. */
select,
select:focus,
select:hover,
select:active,
select:visited {
  cursor: pointer;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300703c' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 12px;
  padding-right: 2.5rem;
}

/* Phase 1 Keep: remove IE/Edge native select arrow. Do not remove. */
select::-ms-expand {
  display: none !important;
}

select option {
  background: rgba(255, 255, 255, 0.95);
  color: var(--color-black);
  padding: var(--space-sm);
}

/* Supervisor dashboard: School Year label and select — black text to match teacher-observations */
#dashboardContent .w-fit label.block,
#dashboardContent #dashboardSchoolYear,
#dashboardSchoolYear {
  color: #111827 !important; /* gray-900 / black */
}
#dashboardContent #dashboardSchoolYear option {
  color: #111827;
}

/* File input - Glass style */
input[type="file"] {
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.60);
  border: 1.5px dashed rgba(0, 112, 60, 0.3);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.04);
}

input[type="file"]:hover {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(0, 112, 60, 0.5);
  box-shadow: 0 6px 20px 0 rgba(0, 112, 60, 0.10);
  transform: translateY(-1px);
}

input[type="file"]::file-selector-button,
input[type="file"]::-webkit-file-upload-button {
  background: linear-gradient(135deg, var(--glass-tint-primary) 0%, var(--glass-tint-primary-dark) 100%);
  color: white;
  border: none;
  padding: 0.375rem 0.875rem;
  border-radius: 0.375rem;
  margin-right: 0.75rem;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--transition-smooth);
  box-shadow: 0 2px 8px 0 rgba(0, 112, 60, 0.20);
}

input[type="file"]::file-selector-button:hover,
input[type="file"]::-webkit-file-upload-button:hover {
  background: linear-gradient(135deg, var(--glass-tint-primary-dark) 0%, var(--glass-tint-primary-darker) 100%);
  box-shadow: 0 4px 12px 0 rgba(0, 112, 60, 0.30);
  transform: translateY(-1px);
}

/* Form group spacing */
.form-group {
  margin-bottom: var(--space-lg);
}

/* ============================================
   BUTTONS - Phase 2: Enhanced with Gradients & Depth
   ============================================ */

button,
.btn {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  border-radius: var(--radius-md);
  padding: 0.5rem 1rem;
  transition: var(--transition-fast);
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.375rem;
}

/* Reset for buttons styled as cards */
button.template-card {
  border: none;
  font-family: inherit;
  font-weight: normal;
  border-radius: 0;
  padding: 0;
  display: block;
  text-align: left;
  gap: 0;
  justify-content: flex-start;
  align-items: flex-start;
}

button.template-card.card {
  padding: 1rem;
}

/* Primary button with glass depth effect */
.btn-primary {
  background: linear-gradient(135deg, var(--glass-tint-primary) 0%, var(--glass-tint-primary-dark) 100%);
  color: white;
  box-shadow: 0 4px 16px 0 rgba(0, 112, 60, 0.25),
              0 2px 8px 0 rgba(0, 0, 0, 0.08),
              inset 0 1px 0 rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition-smooth);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--glass-tint-primary-dark) 0%, var(--glass-tint-primary-darker) 100%);
  box-shadow: 0 8px 24px 0 rgba(0, 112, 60, 0.30),
              0 4px 12px 0 rgba(0, 0, 0, 0.12),
              inset 0 1px 0 rgba(255, 255, 255, 0.2),
              0 0 30px rgba(0, 112, 60, 0.2);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px -1px rgba(0, 112, 60, 0.3);
}

/* Secondary button with subtle gradient */
.btn-secondary {
  background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-light) 100%);
  color: var(--color-gray-800);
  box-shadow: 0 2px 8px -2px rgba(255, 199, 2, 0.3);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, var(--color-gold-light) 0%, var(--color-gold-dark) 100%);
  box-shadow: 0 4px 12px -2px rgba(255, 199, 2, 0.4),
              0 8px 20px -6px rgba(255, 199, 2, 0.25);
  transform: translateY(-2px);
}

.btn-secondary:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px -1px rgba(255, 199, 2, 0.3);
}


.btn-lg {
  padding: 0.5625rem 1.125rem;
  font-size: 1rem;
}

/* Consistent View Button Style */
.btn-view {
  background: var(--glass-tint-primary);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.875rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  transition: var(--transition-fast);
  text-align: center;
}

.btn-view:hover {
  background: var(--glass-tint-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px -2px rgba(0, 112, 60, 0.3);
}


/* ============================================
   QUILL EDITOR INTEGRATION - Phase 2 Enhanced
   ============================================ */

/* Quill 2.0 List Rendering (Phase 4: scoped under wrappers to avoid !important)
   Tailwind resets ol/ul padding to 0; we restore for Quill list indentation. */
.quill-wrapper .ql-editor ol,
.quill-wrapper .ql-editor ul,
.admin-email-editor .ql-editor ol,
.admin-email-editor .ql-editor ul {
  padding-left: 2.5em;
  margin: 0.25em 0;
}
.quill-wrapper .ql-editor li,
.admin-email-editor .ql-editor li {
  list-style-type: none;
  padding-left: 1.5em;
  position: relative;
}
.quill-wrapper .ql-editor li > .ql-ui,
.admin-email-editor .ql-editor li > .ql-ui {
  position: absolute;
}

/* Also restore list styles in read-only HTML displays (modals, view observation, etc.)
   where stored HTML uses standard <ul>/<ol> tags without Quill's .ql-ui elements. */
.prose ul,
.space-y-6 ul,
#modalContent ul,
#pdfContent ul,
[id*="Content"] ul {
  list-style-type: disc;
  padding-left: 2.5em;
  margin: 0.25em 0;
}
.prose ol,
.space-y-6 ol,
#modalContent ol,
#pdfContent ol,
[id*="Content"] ol {
  list-style-type: decimal;
  padding-left: 2.5em;
  margin: 0.25em 0;
}
.prose li,
.space-y-6 li,
#modalContent li,
#pdfContent li,
[id*="Content"] li {
  margin: 0.125em 0;
}

/* Quill Editor - Liquid Glass Styling (Phase 4: scoped under wrappers to avoid !important) */
.quill-wrapper .ql-editor,
.admin-email-editor .ql-editor {
  min-height: 150px;
  max-height: 400px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.875rem;
  line-height: 1.6;
  padding: 0.875rem;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.70);
  color: var(--color-black);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0 0 0.5rem 0.5rem;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: var(--transition-smooth);
}

.quill-wrapper .ql-editor:focus,
.quill-wrapper .ql-editor:focus-within,
.admin-email-editor .ql-editor:focus,
.admin-email-editor .ql-editor:focus-within {
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 3px rgba(0, 112, 60, 0.12),
              0 4px 16px 0 rgba(0, 112, 60, 0.08),
              inset 0 2px 8px rgba(0, 0, 0, 0.02);
}

.quill-wrapper .ql-toolbar,
.admin-email-editor .ql-toolbar {
  background: rgba(249, 250, 251, 0.85);
  border-radius: 0.5rem 0.5rem 0 0;
  font-family: 'Montserrat', sans-serif;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-bottom: 1px solid rgba(0, 112, 60, 0.1);
  padding: 0.25rem 0.5rem;
  min-height: auto;
  height: auto;
  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.04);
  transition: var(--transition-smooth);
}

/* Reduce Quill toolbar button sizes */
.quill-wrapper .ql-toolbar .ql-formats,
.admin-email-editor .ql-toolbar .ql-formats {
  margin-right: 0.5rem;
  margin-top: 0;
  margin-bottom: 0;
}

.quill-wrapper .ql-toolbar button,
.quill-wrapper .ql-toolbar .ql-picker-label,
.admin-email-editor .ql-toolbar button,
.admin-email-editor .ql-toolbar .ql-picker-label {
  width: 1.5rem;
  height: 1.5rem;
  padding: 0.125rem;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
/* Clip icon overflow so underline/clean SVG strokes don't draw a bar below the button */
.quill-wrapper .ql-toolbar button,
.admin-email-editor .ql-toolbar button {
  overflow: hidden;
}
.quill-wrapper .ql-toolbar .ql-picker-label,
.admin-email-editor .ql-toolbar .ql-picker-label {
  padding: 0.125rem 0.25rem;
  font-size: 0.75rem;
}
.quill-wrapper .ql-toolbar .ql-picker-options,
.admin-email-editor .ql-toolbar .ql-picker-options {
  width: auto;
  min-width: 6rem;
  padding: 0.25rem;
  font-size: 0.75rem;
}

.quill-wrapper .ql-toolbar button svg,
.quill-wrapper .ql-toolbar .ql-stroke,
.quill-wrapper .ql-toolbar .ql-fill,
.quill-wrapper .ql-toolbar .ql-picker-label svg,
.admin-email-editor .ql-toolbar button svg,
.admin-email-editor .ql-toolbar .ql-stroke,
.admin-email-editor .ql-toolbar .ql-fill,
.admin-email-editor .ql-toolbar .ql-picker-label svg {
  width: 14px;
  height: 14px;
}

.quill-wrapper .ql-toolbar.ql-snow,
.admin-email-editor .ql-toolbar.ql-snow {
  line-height: 1;
  box-sizing: border-box;
}

.quill-wrapper .ql-toolbar.ql-snow .ql-formats,
.admin-email-editor .ql-toolbar.ql-snow .ql-formats {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

/* Quill toolbar cleanup: no stray pseudo-elements under format buttons (fixes black squares) */
.quill-wrapper .ql-toolbar button::before,
.quill-wrapper .ql-toolbar button::after,
.admin-email-editor .ql-toolbar button::before,
.admin-email-editor .ql-toolbar button::after {
  content: none;
  display: none;
}

.quill-wrapper {
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
  box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.06),
              0 2px 8px 0 rgba(0, 0, 0, 0.03);
  width: 100%;
  display: block;
  overflow: hidden;
}

.quill-wrapper .ql-container {
  border: none;
  border-radius: 0 0 0.5rem 0.5rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.875rem;
}

.quill-wrapper .ql-toolbar {
  border: none;
  border-radius: 0.5rem 0.5rem 0 0;
}

.quill-wrapper:hover {
  border-color: var(--color-gray-400);
  box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.08);
}

.quill-wrapper:focus-within {
  border-color: var(--glass-tint-primary);
  box-shadow: 0 0 0 3px rgba(0, 112, 60, 0.12),
              0 4px 12px -2px rgba(0, 112, 60, 0.1);
}

/* Remove borders from Quill elements inside Notes boxes
   !important removed: high-specificity compound selectors, un-layered beats @layer utilities */
.bg-gray-50.border.border-gray-300 .quill-wrapper {
  border: none;
}

.bg-gray-50.border.border-gray-300 .quill-wrapper .ql-container {
  border: none;
}

.bg-gray-50.border.border-gray-300 .quill-wrapper .ql-editor {
  border: none;
}

/* All Quill editors: paragraphs and list items span full width (override 75ch readability limit) */
.ql-editor p,
.ql-editor li,
.ql-editor td {
  max-width: none;
}

/* Evaluation modal: white box and paragraphs span full width (override Quill CDN) */
#managerEvaluationModal .bg-gray-50 .quill-wrapper,
#managerEvaluationModal .bg-gray-50 .quill-wrapper .ql-container,
#managerEvaluationModal .bg-gray-50 .quill-wrapper .ql-editor,
#managerEvaluationModal .bg-gray-50 .quill-wrapper .ql-editor p {
  max-width: none;
  width: 100%;
  box-sizing: border-box;
}
#managerEvaluationModal .bg-gray-50 .prose,
#managerEvaluationModal .bg-gray-50 .prose p {
  max-width: none;
  width: 100%;
  box-sizing: border-box;
}

/* Prose in gray box: full width everywhere (supervisor view, portfolio, etc.) */
.bg-gray-50.border.border-gray-300 .prose,
.bg-gray-50.border.border-gray-300 .prose p {
  max-width: none;
  width: 100%;
  box-sizing: border-box;
}

.ql-container {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.875rem;
}

/* ============================================
   LIQUID GLASS TAB STYLES
   ============================================ */

.tab-button {
  padding: 0.75rem 1rem;
  border-bottom: 3px solid transparent;
  flex-shrink: 0;
  transition: var(--transition-smooth);
  font-weight: 600;
  cursor: pointer;
  position: relative;
  font-size: 0.875rem;
  background: rgba(255, 255, 255, 0.50);
  border-radius: 0.5rem 0.5rem 0 0;
  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.04);
}

.tab-button:hover {
  background: rgba(255, 255, 255, 0.70);
  color: var(--glass-tint-primary);
  box-shadow: 0 4px 12px 0 rgba(0, 112, 60, 0.08);
  transform: translateY(-1px);
}

.tab-button.active,
.tab-active {
  border-bottom-color: var(--glass-tint-primary);
  color: var(--glass-tint-primary);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 -2px 8px -2px rgba(0, 112, 60, 0.15),
              0 4px 16px 0 rgba(0, 0, 0, 0.08),
              inset 0 -3px 0 0 var(--glass-tint-primary);
}

/* Base styles - hide mobile by default.
   !important removed: un-layered CSS beats @layer utilities in v4.
   Media queries override base via source order. force-mobile-view overrides via specificity.
   Redundant @media (min-width: 1201px) block deleted — it duplicated the base rules. */
.supervisor-tabs-mobile-toggle,
.supervisor-tabs-mobile-menu {
  display: none;
  visibility: hidden;
  height: 0;
  overflow: hidden;
}

.supervisor-tabs-desktop {
  display: flex;
  visibility: visible;
}

/* Force mobile view for testing - add ?mobile=1 to URL */
body.force-mobile-view .supervisor-tabs-desktop {
  display: none;
  visibility: hidden;
}

body.force-mobile-view .supervisor-tabs-mobile-toggle {
  display: flex;
  visibility: visible;
  height: auto;
  overflow: visible;
  padding: 1rem;
  margin: 0;
}

body.force-mobile-view .supervisor-tabs-mobile-menu {
  visibility: visible;
  height: auto;
  overflow: visible;
}

body.force-mobile-view .supervisor-tabs-container {
  position: relative;
}

/* Mobile/Tablet: Hide tabs, show hamburger */
@media (max-width: 1200px) {
  .supervisor-tabs-container {
    position: relative;
  }
  
  .supervisor-tabs-desktop {
    display: none;
    visibility: hidden;
    height: 0;
    overflow: hidden;
  }
  
  .supervisor-tabs-mobile-toggle {
    display: flex;
    visibility: visible;
    height: auto;
    overflow: visible;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: white;
    border-bottom: 1px solid var(--color-gray-200);
    cursor: pointer;
  }
  
  .supervisor-tabs-mobile-menu {
    display: none;
    visibility: visible;
    height: auto;
    overflow: visible;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--color-gray-200);
    border-top: none;
    z-index: 50;
    max-height: 400px;
    overflow-y: auto;
  }
  
  .supervisor-tabs-mobile-menu.active {
    display: block;
  }
  
  .supervisor-tabs-mobile-menu .tab-button {
    display: block;
    width: 100%;
    text-align: left;
    border-bottom: 1px solid var(--color-gray-200);
    border-radius: 0;
    padding: 0.75rem 1rem;
  }
}

/* Hide scrollbar for tab container on mobile */
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ============================================
   UTILITY CLASSES - Phase 2 Enhanced
   ============================================ */


/* Text truncation */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Prose content & evaluation view - links */
.prose a,
.prose-sm a,
.evaluation-view a {
  color: var(--glass-tint-primary);
  text-decoration: underline;
  font-weight: 600;
  transition: var(--transition-color);
}

.prose a:hover,
.prose-sm a:hover,
.evaluation-view a:hover {
  color: var(--glass-tint-primary-dark);
  text-decoration-thickness: 2px;
}

/* Ensure links in labels maintain font-weight */
label a,
.font-semibold a {
  font-weight: 600;
}


/* ============================================
   LIQUID GLASS LOADING & SPINNER
   ============================================ */

.spinner {
  border: 3px solid rgba(230, 244, 237, 0.40);
  border-top: 3px solid var(--glass-tint-primary);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  animation: spinGlass 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
  box-shadow: 0 4px 12px rgba(0, 112, 60, 0.15),
              inset 0 0 8px rgba(0, 112, 60, 0.08);
  position: relative;
}

/* Glass-enhanced spin with pulsing box-shadow — used only by .spinner.
   Renamed from 'spin' to avoid overriding Tailwind's native animate-spin. */
@keyframes spinGlass {
  0% { 
    transform: rotate(0deg);
    box-shadow: 0 4px 12px rgba(0, 112, 60, 0.15),
                inset 0 0 8px rgba(0, 112, 60, 0.08);
  }
  50% {
    box-shadow: 0 4px 16px rgba(0, 112, 60, 0.25),
                inset 0 0 12px rgba(0, 112, 60, 0.12);
  }
  100% { 
    transform: rotate(360deg);
    box-shadow: 0 4px 12px rgba(0, 112, 60, 0.15),
                inset 0 0 8px rgba(0, 112, 60, 0.08);
  }
}

/* Loading state containers with glass background */
#loading,
#observationsLoading,
#dashboardLoading,
#myWorkLoading,
#teamLoading,
#staffEvaluationsLoading {
  background: rgba(255, 255, 255, 0.60);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

/* Loading state glass effects — applied via @supports block at end of file */

/* Pulsing loader - Enhanced glass effect with scale.
   Renamed from 'pulse' to avoid overriding Tailwind's native animate-pulse. */

/* ============================================
   ADMIN PAGE - TAG SYSTEM - Phase 2 Enhanced
   ============================================ */

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
  border: 1px solid #0284c7;
  border-radius: 16px;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
  color: #0c4a6e;
  font-weight: 500;
  transition: var(--transition-fast);
  box-shadow: 0 2px 4px -1px rgba(2, 132, 199, 0.15);
}

.tag:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px -2px rgba(2, 132, 199, 0.25);
}

.tag button {
  margin-left: 0.5rem;
  color: #0284c7;
  font-weight: bold;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 0.25rem;
  font-size: 1rem;
  line-height: 1;
  transition: var(--transition-fast);
}

.tag button:hover {
  color: #ef4444;
  transform: scale(1.1);
}

/* Admin Modal - Compact Tags (Phase 2: ID/class specificity sufficient, !important removed) */
.admin-modal-form .tag,
.admin-modal-form .tag-input-container .tag,
#editEmployeeForm .tag,
#createUserForm .tag {
  padding: 0.125rem 0.4rem;
  font-size: 0.7rem;
  font-weight: 600;
  margin-right: 0.25rem;
  margin-bottom: 0.25rem;
  border-radius: 6px;
  box-shadow: none;
  line-height: 1.3;
}

.admin-modal-form .tag button,
.admin-modal-form .tag-input-container .tag button,
#editEmployeeForm .tag button,
#createUserForm .tag button {
  margin-left: 0.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0;
}

/* Modal Close Button - Larger & More Clickable (Phase 2: scoped under .modal-content to avoid !important) */
.modal-content .modal-close-btn {
  font-size: 2rem;
  line-height: 1;
  min-width: 2.5rem;
  min-height: 2.5rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--color-gray-500);
  background: var(--color-gray-50);
  border: 1px solid var(--color-gray-200);
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.modal-content .modal-close-btn:hover {
  color: var(--color-gray-800);
  background: var(--color-gray-200);
}

/* Modal Header - Consistent Styling (Phase 2: scoped under .modal-content to avoid !important) */
.modal-content .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--color-gray-200);
  background: var(--color-white);
  border-radius: 0.5rem 0.5rem 0 0;
  flex-shrink: 0;
  min-height: 50px;
  position: relative;
  z-index: 10;
}

/* Flush variant: no padding/border, used for inline preview modals */
.modal-content .modal-header.modal-header-flush {
  padding: 0;
  border: none;
  border-bottom: none;
  min-height: auto;
  background: transparent;
  border-radius: 0;
  margin-bottom: 1rem;
}

.modal-content .modal-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--glass-tint-primary);
  margin: 0;
  background: none;
  /* Allow title to shrink and wrap on narrow viewports (e.g. phone portrait) */
  min-width: 0;
  flex: 1 1 0%;
  overflow-wrap: break-word;
  word-break: break-word;
}
.modal-content .modal-header h3 {
  min-width: 0;
  flex: 1 1 0%;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Modal font scale (Option C): section headings and body use design tokens for consistency */
.modal-backdrop .modal-content h3,
.modal-backdrop .modal-content h4 {
  font-size: var(--size-md);
  font-weight: 600;
}
.modal-backdrop .modal-content h3 { margin: 0 0 0.5rem 0; }
.modal-backdrop .modal-content h4 { margin: 0 0 0.5rem 0; }

.tag-input-container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  border: 1px solid var(--color-gray-300);
  border-radius: 0.375rem;
  padding: 0.75rem;
  min-height: 48px;
  align-items: center;
  background: white;
  transition: var(--transition-fast);
}

.tag-input-container:focus-within {
  border-color: var(--glass-tint-primary);
  box-shadow: 0 0 0 3px rgba(0, 112, 60, 0.1);
}

.tag-add-select {
  border: none;
  outline: none;
  padding: var(--space-sm);
  flex: 1;
  min-width: 150px;
  background: transparent;
}

.tag-add-select:focus {
  outline: none;
}

/* ============================================
   ACCESSIBILITY & FOCUS - Phase 2
   ============================================ */

/* ============================================
   LIQUID GLASS FOCUS STATES & ACCESSIBILITY
   ============================================ */

/* Enhanced focus ring with glass glow effect */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
[tabindex]:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
  border-radius: 0.375rem;
  box-shadow: var(--focus-ring-shadow);
  transition: var(--transition-smooth);
}

/* ============================================
   ACCESSIBILITY - REDUCED MOTION
   ============================================ */

/* Phase 1 Keep: a11y — respect prefers-reduced-motion. !important ensures overrides win. Do not remove. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    filter: none !important; /* Remove blur animations */
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */

/* ============================================
   CONSOLIDATED: Tablet & Mobile (max-width: 768px)
   Consolidated in Phase 4 from 7 separate blocks
   ============================================ */
@media (max-width: 768px) {
  /* === GLOBAL TYPOGRAPHY === */
  h1, .heading-1 {
    font-size: 1.25rem; /* 20px on mobile - compact */
  }
  
  h2, .heading-2 {
    font-size: 1rem; /* 16px on mobile - compact */
  }
  
  /* === GLOBAL SPACING === */
  .card {
    padding: 0.625rem; /* compact on mobile */
  }
  
  .card-lg {
    padding: 0.625rem; /* compact on mobile */
  }
  
  /* Reduce grid gap on mobile */
  .grid-spacing {
    gap: var(--space-sm);
  }
  
  /* Add small margin to header card only for shadow */
  #portfolio-content > .card-lg:first-child {
    margin-left: 0.25rem;
    margin-right: 0.25rem;
  }
  
  /* Fix container width on mobile - override contain-intrinsic-size */
  #goalsContainer,
  #observationsContainer,
  #spotlightsReceivedContainer,
  #spotlightsSentContainer,
  #employeeList,
  .max-h-96.overflow-y-auto {
    contain-intrinsic-size: auto 370px !important;
  }
  
  main {
    margin-top: 0.625rem;
    margin-bottom: 0.625rem;
  }
  
  /* === NAVIGATION === */
  nav.bg-primary .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-group {
    flex-direction: column;
    align-items: stretch;
  }
  
  /* === LEADERSHIP ASSIGNMENTS === */
  .leadership-assignment-row {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.75rem;
  }
  
  .leadership-assignment-row .assignment-content {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  .leadership-assignment-row .assignment-actions {
    width: 100%;
    justify-content: flex-end;
  }
  
  .leadership-assignment-row .assignment-actions button {
    flex: 1;
    max-width: 120px;
  }
  
  .assignment-leader-name,
  .assignment-scope-text {
    white-space: normal;
    word-break: break-word;
  }
  
  /* === EMAIL SUBTABS === */
  .email-subtab-button {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    white-space: nowrap;
  }
  
  /* === ADMIN PAGE SPECIFIC === */
  /* Apply flex-wrap to admin content, but NOT to navigation */
  .admin-page main .flex {
    flex-wrap: wrap;
  }
  
  .admin-page main .flex.justify-between {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  .admin-page main .flex.justify-between > *:last-child {
    align-self: stretch;
  }
}

/* Nav container: full width + reduced padding when mobile menu is shown (matches lg breakpoint) */
@media (max-width: 1023.98px) {
  nav.bg-primary .container {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

/* Tablet spacing */
@media (min-width: 768px) and (max-width: 1024px) {
  .card-lg {
    padding: 1rem;
  }
}

/* ============================================
   PHASE 3: INTERACTIVE ELEMENTS & POLISH
   ============================================ */


/* ============================================
   MODAL SYSTEM - Consolidated
   ============================================ */

/* Prevent body scroll when modal open */
body.modal-open {
  overflow: hidden !important;
  /* Don't use position:fixed - it causes layout issues */
  /* Just hiding overflow is sufficient for most cases */
}

/* Modal Backdrop (Phase 5: body prefix for specificity; !important only where we must beat Tailwind) */
body .modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999; /* Above navigation; Tailwind z-50 would be 50 */
  background-color: rgba(0, 0, 0, var(--modal-backdrop-opacity));
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--space-lg);
  padding-top: var(--nav-height); /* Clear the sticky navigation bar */
  padding-bottom: 2rem;
  animation: backdropFadeIn var(--modal-transition-duration) var(--modal-transition-easing);
}

/* Only show backdrop when open (no .hidden); closed modals keep Tailwind's .hidden (display: none) */
body .modal-backdrop:not(.hidden) {
  display: flex;
}

@keyframes backdropFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Modal Content Container (Phase 5: scoped under .modal-backdrop to avoid !important).
   No border — avoids white outline; overflow: hidden clips content to border-radius so no white at corners.
   No transition — prevents .bg-white.rounded-lg:hover from animating when mouse leaves modal (white line). */
.modal-backdrop .modal-content {
  background: rgba(255, 255, 255, 0.95);
  border: none;
  box-shadow: 0 20px 60px 0 rgba(0, 0, 0, 0.20),
              0 8px 24px 0 rgba(0, 0, 0, 0.12);
  animation: modalSlideIn var(--modal-transition-duration) var(--modal-transition-easing) backwards;
  max-height: var(--modal-max-height);
  position: relative;
  border-radius: var(--modal-content-radius);
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 51;
  transition: none;
}
/* Keep modal appearance identical on hover (override .bg-white.rounded-lg:hover so no white line when mouse is off modal) */
.modal-backdrop .modal-content:hover {
  box-shadow: 0 20px 60px 0 rgba(0, 0, 0, 0.20),
              0 8px 24px 0 rgba(0, 0, 0, 0.12);
  transform: none;
}

/* Modal header: top corners match modal so curved border is consistent (all modals use .modal-header now) */
.modal-backdrop .modal-content > .modal-header:first-child,
.modal-backdrop .modal-content > .rounded-t-lg:first-child {
  border-radius: var(--modal-content-radius) var(--modal-content-radius) 0 0;
  flex-shrink: 0;
  transform: translateZ(0);
  backface-visibility: hidden;
  position: relative;
}

/* Mobile adjustments for modals (Phase 5: body .modal-backdrop, .modal-backdrop .modal-content) */
@media (max-width: 768px) {
  body .modal-backdrop {
    padding: var(--space-sm);
    padding-top: var(--space-lg);
    align-items: flex-start;
  }
  
  .modal-backdrop .modal-content {
    max-height: calc(100vh - 2rem);
    margin-top: 0;
  }
  
  /* Gray header modals: compact header and smaller title on mobile */
  .modal-backdrop .modal-content .modal-header {
    padding-top: var(--space-md);
    padding-bottom: var(--space-sm);
    padding-left: var(--space-md);
    padding-right: var(--space-md);
    min-height: 44px;
  }
  .modal-backdrop .modal-content .modal-header h2,
  .modal-backdrop .modal-content .modal-header h3 {
    font-size: var(--size-md); /* 1rem on mobile */
  }
  .modal-backdrop .modal-content .modal-header .modal-close-btn {
    font-size: 1.5rem;
    min-width: 2rem;
    min-height: 2rem;
    width: 2rem;
    height: 2rem;
  }
}

/* Modal Animation - open: no box-shadow until "to" to avoid top-edge flicker during scale */
@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
    box-shadow: none;
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
    box-shadow: 0 20px 60px 0 rgba(0, 0, 0, 0.20),
                0 8px 24px 0 rgba(0, 0, 0, 0.12);
  }
}

/* Optional close animation - add .modal-closing to backdrop before hiding; JS can delay adding .hidden by --modal-transition-duration */
.modal-closing > div {
  animation: modalSlideOut var(--modal-transition-duration) var(--modal-transition-easing) forwards;
}
@keyframes modalSlideOut {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  to {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }
}

/* Staff Evaluation Modal - Full Width Content */
/* Staff evaluation form layout (Phase 6F: !important removed; ID specificity sufficient) */
#staffEvaluationForm,
#staffEvaluationForm > div,
#staffEvaluationForm .mb-6,
#staffEvaluationForm .mb-4,
#staffEvaluationForm h3,
#staffEvaluationForm p,
#staffEvaluationForm .space-y-3 {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

#staffEvaluationForm {
  display: block;
}

/* Modal Footers - Fixed Position (class-only) — Batch 1 */
.modal-footer,
.rounded-b-lg.border-t,
.modal-backdrop #modalActions {
  flex-shrink: 0;
  flex-grow: 0;
  position: relative;
  z-index: 10;
  overflow: visible;
}

/* Modal Footer - Visual styling (layout properties in group selector above) */
.modal-footer {
  border-top: 2px solid var(--color-gray-200);
  padding-top: 0.75rem;
}

/* Bottom of modal: last child gets rounded corners to match modal container */
.modal-backdrop .modal-content > .modal-footer:last-child,
.modal-backdrop .modal-content > .rounded-b-lg:last-child {
  border-radius: 0 0 var(--modal-content-radius) var(--modal-content-radius);
}

/* Modal Spacing (class-only) — Batch 1 */
.modal-content div.p-6 {
  padding: var(--space-lg);
  padding-right: var(--space-xl);
  line-height: 1.5;
}
.modal-backdrop form {
  line-height: 1.5;
}

/* ============================================
   PHASE 2: Class-only modal rules
   Same declarations as above; selectors use only .modal-backdrop / .modal-content.
   ============================================ */

/* Width overrides — Batch 3 */
.modal-content.max-w-2xl {
  max-width: 48rem;
}
.modal-content.max-w-3xl {
  max-width: 56rem;
}
.modal-content.max-w-4xl {
  max-width: 64rem;
}
.modal-content.max-w-5xl {
  max-width: 72rem;
}

/* Scrolling areas (IDs + direct body div.p-6 / form.p-6) — Batch 2 */
.modal-backdrop #modalContent,
.modal-backdrop #observationModalContent,
.modal-backdrop #staffEvaluationViewContent,
.modal-content > div.p-6,
.modal-content > form.p-6 {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  position: relative;
  z-index: 1;
  -webkit-overflow-scrolling: touch;
  padding-right: var(--space-xl);
}

/* p/li/td max-width — Batch 1 */
.modal-backdrop p,
.modal-backdrop li,
.modal-backdrop td {
  max-width: none;
}

/* Headers (titles) - fixed position — Batch 1 (modal-header h2/h3 override below for wrap) */
.modal-backdrop h2,
.modal-backdrop h3 {
  flex-shrink: 0;
  flex-grow: 0;
  position: relative;
  z-index: 10;
  overflow: visible;
  white-space: normal;
  word-wrap: break-word;
  transform: translateZ(0);
  backface-visibility: hidden;
}
/* Modal header title: allow shrink and wrap so long titles don't overflow on phone portrait */
.modal-backdrop .modal-content .modal-header h2,
.modal-backdrop .modal-content .modal-header h3 {
  flex-shrink: 1;
  flex-grow: 1;
  min-width: 0;
}

/* Footers - fixed position — Batch 1 */
.modal-backdrop #modalActions,
.modal-content .modal-footer,
.modal-content .rounded-b-lg.border-t {
  flex-shrink: 0;
  flex-grow: 0;
  position: relative;
  z-index: 10;
  overflow: visible;
}

/* Spacing (Phase 5: scoped under .modal-backdrop to avoid !important) */
.modal-backdrop .modal-content {
  margin: 0 auto var(--space-xl);
  box-sizing: border-box;
}
.modal-backdrop .modal-content div.p-6 {
  padding: var(--space-lg);
  padding-right: var(--space-xl);
  line-height: 1.5;
}

/* Form line-height — Batch 1 */
.modal-backdrop form {
  line-height: 1.5;
}

/* space-y-3/4/6 and generic space-y — Batch 1 */
.modal-backdrop form.space-y-3 > :not(:last-child) {
  margin-bottom: 0.5rem;
  margin-top: 0;
}
.modal-backdrop form.space-y-4 > :not(:last-child) {
  margin-bottom: 0.625rem;
  margin-top: 0;
}
.modal-backdrop .space-y-6 > :not(:last-child) {
  margin-bottom: 1rem;
  margin-top: 0;
}
.modal-backdrop [class*="space-y"] > * + * {
  margin-top: 0;
}

/* Labels — Batch 1 (modal font scale: --size-sm, semibold) */
.modal-backdrop label {
  margin-bottom: var(--space-xs);
  line-height: 1.4;
  font-size: var(--size-sm);
  font-weight: 600;
  color: var(--color-gray-700, #374151);
}

/* Inputs — Batch 1 */
.modal-backdrop input[type="text"],
.modal-backdrop input[type="email"],
.modal-backdrop input[type="password"],
.modal-backdrop input[type="date"],
.modal-backdrop input[type="number"],
.modal-backdrop select,
.modal-backdrop textarea {
  padding: 0.375rem 0.625rem;
  padding-right: 0.875rem;
  line-height: 1.4;
  font-size: var(--size-sm);
}

/* Grid — Batch 1 */
.modal-backdrop .grid {
  gap: 0.75rem;
}
.modal-backdrop .grid.gap-4 {
  gap: 0.75rem;
}

/* Paragraphs — Batch 1 (modal font scale: body text --size-sm) */
.modal-backdrop p {
  line-height: 1.5;
  margin-bottom: 0.5rem;
  font-size: var(--size-sm);
}

/* Lists in modals: same size as body so bulleted/numbered content matches reflection and body text */
.modal-backdrop ul,
.modal-backdrop ol {
  font-size: var(--size-sm);
}
.modal-backdrop li {
  font-size: inherit;
}

/* Modal containers - simplified to allow inline styles to control layout */
/* The modal content uses max-h-screen overflow-y-auto for scrolling */

/* Modal content and footer styling now handled by inline Tailwind classes */
/* Using max-h-screen overflow-y-auto with sticky headers/footers */

/* Badge & Status Indicators */
/* ============================================
   RATING CHIPS - Evaluation/Observation Status Pills
   Dynamic colors (background-color, color, border-color) applied inline by JS.
   ============================================ */

.rating-chip {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  border: 2px solid;
  font-size: 0.875rem;
  font-weight: 500;
}

/* ============================================
   LIQUID GLASS BADGES - Status & Counts
   ============================================ */


/* ============================================
   LIQUID GLASS DROPDOWN MENUS
   ============================================ */


/* Searchable Dropdown Items */
.searchable-dropdown-item {
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.searchable-dropdown-item:hover {
  background-color: var(--color-gray-200); /* gray-200 - more visible than gray-100 */
  transform: translateX(2px);
}

.searchable-dropdown-item:active {
  background-color: var(--color-gray-300); /* gray-300 for click feedback */
}

/* Fade in animation for modals and overlays — canonical definition.
   Used by modal backdrops, tooltips, validation messages, etc.
   For slide-up variant, see @keyframes fadeInSlide above. */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Focus Improvements for Cards */
.card:focus-within {
  outline: var(--focus-ring);
  outline-offset: var(--focus-ring-offset-sm);
}


/* Print Styles — consolidated into single @media print block at end of file */

/* ============================================
   PAGE-SPECIFIC INLINE STYLES (CENTRALIZED)
   ============================================ */

/* Teacher Observations Page: Layout & Scrolling */
.teacher-observations-page {
  overflow-y: auto;
  height: auto;
  min-height: 100vh;
}

.teacher-observations-page main {
  padding-bottom: 2rem;
}

.teacher-observations-page #observationsWrapper {
  max-height: none; /* Allow full height */
}

.teacher-observations-page #observationsContainer {
  max-height: none; /* Allow full height - page scrolls, not container */
}

/* Supervisor Page: PDF Header */
.pdf-wrapper {
  font-family: 'Montserrat', Arial, sans-serif;
  padding: 1.25rem;
  page-break-inside: auto;
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.pdf-wrapper * {
  max-width: 100%;
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.pdf-wrapper p, .pdf-wrapper span, .pdf-wrapper div {
  word-break: break-word;
}

.pdf-header {
  text-align: center;
  margin-bottom: 1.25rem;
  border-bottom: 3px solid var(--glass-tint-primary);
  padding-bottom: 0.625rem;
  page-break-inside: avoid;
}

.pdf-logo {
  display: block;
  max-width: 3.5rem;
  height: auto;
  margin: 0 auto 0.5rem;
}

.pdf-header-title {
  color: var(--glass-tint-primary);
  margin: 0;
  font-size: 1.5rem;
}

.pdf-header-subtitle {
  color: #666;
  margin: 0.3125rem 0 0;
  font-size: 1.125rem;
}

/* Supervisor Page: Conditional Required Fields */
.conditional-required-indicator {
  color: #ef4444;
  font-weight: bold;
  margin-left: 2px;
}

label.required-field {
  color: var(--color-gray-800);
}


/* Admin Page: Tab Content Visibility */
.tab-content {
  display: none;
  margin-top: 0;
  opacity: 0;
}

.tab-content.active {
  display: block;
  animation: tabFadeIn 0.2s ease-out forwards;
}

@keyframes tabFadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* School Year Settings - Loading State Stability */
/* Prevents content jumping during async data loading */
#activeSchoolYearDisplay {
  min-height: 2.5rem;
}

#currentStaffSettingsDisplay,
#currentFacultySettingsDisplay,
#currentObservationSettingsDisplay {
  min-height: 80px;
}

/* Admin Page: Email Sub-tabs */
.email-subtab-button {
  padding: 0.625rem 1.25rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  font-weight: 500;
  color: var(--color-gray-500);
}

.email-subtab-button:hover {
  color: var(--glass-tint-primary);
  border-bottom-color: var(--color-gray-300);
}

.email-subtab-button.active {
  border-bottom-color: var(--glass-tint-primary);
  color: var(--glass-tint-primary);
  font-weight: 600;
}

.email-subtab-content {
  display: none;
}

.email-subtab-content.active {
  display: block;
}

/* Admin Page: Quill Editor Height */
.admin-page .ql-editor {
  min-height: 150px;
  max-height: 400px;
}

/* Admin Page: Extended Quill Editor for Email Templates (Phase 4: !important removed, selectors already specific) */
.admin-email-editor,
.admin-email-editor > *,
.admin-email-editor .ql-toolbar,
.admin-email-editor .ql-container,
.admin-email-editor .ql-editor,
#templateBodyQuill,
#templateBodyQuill.ql-container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.admin-email-editor {
  display: block;
}
.admin-email-editor .ql-container {
  display: block;
}
.admin-email-editor .ql-editor {
  min-height: 250px;
  max-height: 500px;
  display: block;
}

/* Fix Email Template modal Quill toolbar: compact pickers, hide label text, keep clickable */
.admin-email-editor .ql-toolbar.ql-snow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
  overflow: visible;
  min-height: 2.5rem;
  padding: 0.35rem 0.5rem;
  position: relative;
  z-index: 1;
  width: 100%;
  box-sizing: border-box;
}
.admin-email-editor .ql-toolbar .ql-formats {
  margin: 0;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.125rem;
}
/* Header picker: align with toolbar row, match button height, no separate box (Quill toolbar cleanup) */
.quill-wrapper .ql-toolbar .ql-picker.ql-header,
.admin-email-editor .ql-toolbar .ql-picker.ql-header {
  width: auto;
  min-width: 5rem;
  max-width: none;
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  border: none;
  background: transparent;
  margin: 0;
  padding: 0;
  vertical-align: middle;
}
.quill-wrapper .ql-toolbar .ql-picker.ql-header .ql-picker-label,
.admin-email-editor .ql-toolbar .ql-picker.ql-header .ql-picker-label {
  width: auto;
  min-width: 0;
  height: 1.5rem;
  padding: 0 1.5rem 0 0.25rem;
  overflow: visible;
  position: relative;
  display: inline-flex;
  align-items: center;
  border: none;
  background: transparent;
  font-size: 0.75rem;
  line-height: 1;
  color: inherit;
}
.quill-wrapper .ql-toolbar .ql-picker.ql-header.ql-expanded .ql-picker-label,
.admin-email-editor .ql-toolbar .ql-picker.ql-header.ql-expanded .ql-picker-label {
  border: none;
}
/* Header dropdown arrow: vertically centered next to "Normal" text (not stuck in corner) */
.quill-wrapper .ql-toolbar .ql-picker.ql-header .ql-picker-label svg,
.admin-email-editor .ql-toolbar .ql-picker.ql-header .ql-picker-label svg {
  position: absolute;
  right: 0.25rem;
  top: 0;
  bottom: 0;
  margin: auto 0;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: block;
}
.admin-email-editor .ql-toolbar .ql-picker.ql-color-picker,
.admin-email-editor .ql-toolbar .ql-picker.ql-icon-picker {
  width: auto;
  min-width: 1.5rem;
}
.admin-email-editor .ql-toolbar .ql-picker-options {
  width: auto;
  min-width: 6rem;
  z-index: 100;
}

.ql-editor.ql-blank::before {
  font-style: normal;
  color: var(--color-gray-400);
}

/* ============================================
   ADMIN PAGE - COMPRESSED SPACING SYSTEM
   ============================================
   
   PHILOSOPHY:
   The admin page uses a "compressed spacing" design pattern to maximize
   screen real estate for power users who need to see more information
   and controls at once. This system applies ~75-80% of standard spacing.
   
   IMPLEMENTATION:
   - CSS Variables (lines 166-175): Centralized admin spacing values
   - All spacing uses var(--admin-*) for easy global adjustments
   - Un-layered CSS: Naturally overrides Tailwind @layer utilities in v4
   
   SPACING COMPARISON (Standard → Admin):
   - Card padding:      1.25rem → 1rem    (var(--admin-card-padding))
   - Heading margins:   1.5rem  → 1rem    (var(--admin-heading-margin))
   - Section spacing:   1rem    → 0.75rem (var(--admin-section-small))
   - Input padding:     0.5×0.75 → 0.375×0.625rem (var(--admin-input-padding))
   - Button padding:    0.625×1.25 → 0.5×1rem (var(--admin-button-padding))
   - Grid gaps:         1rem    → 0.75rem (var(--admin-grid-gap))
   
   TO ADJUST SPACING GLOBALLY:
   Modify CSS variables at lines 166-175 in :root
   ============================================ */

/* Admin page container - tighter padding */
.admin-page .card-lg {
  padding: var(--admin-card-padding, 1rem);
}

/* Admin headings - tighter margins */
.admin-page .heading-2 {
  margin-bottom: var(--admin-heading-margin, 1rem);
}

/* Admin sections - tighter spacing */
.admin-page .mb-6 {
  margin-bottom: var(--admin-section-medium, 1rem);
}

.admin-page .mb-8 {
  margin-bottom: var(--admin-section-large, 1.5rem);
}

.admin-page .mb-4 {
  margin-bottom: var(--admin-section-small, 0.75rem);
}

/* Admin form fields - tighter padding */
.admin-page input[type="text"],
.admin-page input[type="email"],
.admin-page input[type="password"],
.admin-page input[type="date"],
.admin-page input[type="number"],
.admin-page input[type="file"],
.admin-page select,
.admin-page textarea {
  padding: var(--admin-input-padding, 0.375rem 0.625rem);
  font-size: 0.875rem;
}

/* Admin buttons - tighter padding (exclude modal close button so it stays full size) */
.admin-page button:not(.modal-close-btn),
.admin-page .btn:not(.modal-close-btn) {
  padding: var(--admin-button-padding, 0.5rem 1rem);
  font-size: 0.875rem;
}

/* Admin info boxes - tighter padding */
.admin-page .bg-blue-50,
.admin-page .bg-yellow-50,
.admin-page .bg-green-50,
.admin-page .bg-red-50,
.admin-page .bg-gray-50 {
  padding: var(--admin-info-box-padding, 0.75rem 1rem);
}

/* Admin list items - tighter spacing
   Tailwind v4: space-y uses margin-bottom on :not(:last-child).
   Only set margin-bottom; reset margin-top to prevent double spacing. */
.admin-page .space-y-3 > :not(:last-child) {
  margin-bottom: var(--space-sm, 0.5rem);
  margin-top: 0;
}

.admin-page .space-y-4 > :not(:last-child) {
  margin-bottom: var(--admin-section-small, 0.75rem);
  margin-top: 0;
}

/* Admin empty states - tighter padding */
.admin-page .py-8 {
  padding-top: var(--admin-section-medium, 1rem);
  padding-bottom: var(--admin-section-medium, 1rem);
}

/* Admin labels - tighter margins */
.admin-page label {
  margin-bottom: var(--admin-label-margin, 0.25rem);
}

/* Admin grid gaps - tighter (Phase 6A: !important removed; .admin-page scope sufficient) */
.admin-page .grid {
  gap: var(--admin-grid-gap, 0.75rem);
}

/* Admin card borders - tighter padding (Phase 6A: !important removed) */
.admin-page .border.rounded-lg.p-4 {
  padding: var(--admin-info-box-padding, 0.75rem 1rem);
}

/* Admin flex gaps - tighter (exclude navigation) (Phase 6A: !important removed) */
.admin-page main .flex.gap-4 {
  gap: var(--admin-grid-gap, 0.75rem);
}

.admin-page main .flex.space-x-3 {
  gap: 0.5rem; /* 8px instead of 12px */
}

/* Admin school year active box - tighter padding (Phase 6A: !important removed) */
.admin-page .school-year-active-box {
  padding: 1rem 1.25rem; /* 16px 20px instead of 24px 32px */
}

/* ============================================
   ADMIN PAGE - EMPLOYEE TABLE
   Sortable, scrollable user management table
   Aligned with site typography (text-sm)
   ============================================ */
#employeeTable {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.875rem;
  table-layout: fixed;
}

#employeeTable thead {
  background: linear-gradient(to bottom, #f8f9fa, #f1f3f4);
  position: sticky;
  top: 0;
  z-index: 10;
}

#employeeTable thead th {
  border-bottom: 2px solid var(--color-gray-200);
  white-space: nowrap;
  user-select: none;
  padding: 0.5rem 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: capitalize;
  overflow: hidden;
  text-overflow: ellipsis;
}

#employeeTable thead th:first-child {
  padding-left: 0.75rem;
}

#employeeTable thead th:last-child {
  padding-right: 0.75rem;
}

#employeeTable thead th:hover {
  background: var(--color-gray-200);
}

#employeeTable tbody td {
  padding: 0.375rem 0.5rem;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
}

#employeeTable tbody td:first-child {
  padding-left: 0.75rem;
}

#employeeTable tbody td:last-child {
  padding-right: 0.75rem;
}

#employeeTable tbody tr {
  border-bottom: 1px solid var(--color-gray-100);
}

#employeeTable tbody tr:last-child {
  border-bottom: none;
}

/* Empty state - readable when no rows */
#employeeTable .employee-table-empty-state {
  font-size: 0.875rem;
  padding: 1.5rem 1rem;
  color: var(--color-gray-500);
}

/* Employee table badges - compact pills, aligned with table */
.emp-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.125rem 0.375rem;
  border-radius: 9999px;
  white-space: nowrap;
  margin: 0;
}

/* Employee table action buttons - small, in-row */
.emp-action-btn {
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  min-height: 0;
  border-radius: 0.25rem;
  transition: background-color 0.15s;
  white-space: nowrap;
  line-height: 1.2;
  border: none;
  cursor: pointer;
}

/* Sort indicator styling */
#employeeTable .sort-indicator {
  font-size: 0.625rem;
  color: var(--glass-tint-primary);
  font-weight: bold;
}

/* Responsive: Tablet */
@media (max-width: 1024px) {
  #employeeTable {
    font-size: 0.8125rem;
  }
  
  #employeeTable thead th {
    font-size: 0.8125rem;
    padding: 0.375rem 0.375rem;
  }
  
  #employeeTable tbody td {
    padding: 0.3rem 0.375rem;
  }
  
  #employeeTable .employee-table-empty-state {
    font-size: 0.8125rem;
    padding: 1.25rem 1rem;
  }
  
  .emp-badge {
    font-size: 0.6875rem;
    padding: 0.1rem 0.3rem;
  }
  
  .emp-action-btn {
    font-size: 0.6875rem;
    padding: 0.2rem 0.4rem;
  }
}

/* Responsive: Mobile - stack or scroll */
@media (max-width: 768px) {
  #employeeTable {
    font-size: 0.75rem;
    min-width: 550px;
  }
  
  #employeeTable thead th {
    font-size: 0.75rem;
    padding: 0.3rem 0.25rem;
  }
  
  #employeeTable tbody td {
    padding: 0.25rem 0.25rem;
  }
  
  #employeeTable .employee-table-empty-state {
    font-size: 0.75rem;
    padding: 1rem 0.75rem;
  }
  
  .emp-badge {
    font-size: 0.625rem;
    padding: 0.0625rem 0.25rem;
  }
  
  .emp-action-btn {
    font-size: 0.625rem;
    padding: 0.15rem 0.35rem;
  }
}

/* ============================================
   ADMIN PAGE - MOBILE RESPONSIVENESS
   ============================================ */

/* Leadership Assignments Rows - Responsive */
.leadership-assignment-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm); /* p-2 - reduced from p-3 */
  background-color: var(--color-gray-50);
  border-radius: 0.375rem;
  border: 1px solid var(--color-gray-200);
  gap: 0.75rem;
}

.leadership-assignment-row .assignment-content {
  flex: 1;
  min-width: 0; /* Allow text truncation */
}

.leadership-assignment-row .assignment-actions {
  display: flex;
  gap: var(--space-sm);
  flex-shrink: 0;
}

/* Mobile: Stack Leadership Assignment rows - CONSOLIDATED ABOVE at line ~1873 */

/* Button Groups - Responsive (exclude navigation) */
.admin-page main .flex.gap-2,
.admin-page main .flex.gap-3,
.admin-page main .flex.gap-4,
.admin-page main .flex.space-x-2,
.admin-page main .flex.space-x-3,
.admin-page main .flex.space-x-4 {
  flex-wrap: wrap;
}

/* ============================================
   CONSOLIDATED: Mobile (max-width: 640px)
   Consolidated in Phase 4 from 3 separate blocks
   ============================================ */
@media (max-width: 640px) {
  /* === ADMIN PAGE PADDING === (Phase 6B: !important removed) */
  .admin-page .px-4,
  .admin-page .px-6,
  .admin-page .px-16 {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .admin-page button {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* === ALL PAGES PADDING === (Phase 6B: !important removed) */
  main.container.px-16,
  body.px-16 {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  nav.bg-primary > div.container.px-16 {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* === ADMIN BUTTON GROUPS === (exclude navigation) */
  .admin-page main .flex.gap-2,
  .admin-page main .flex.gap-3,
  .admin-page main .flex.gap-4,
  .admin-page main .flex.space-x-2,
  .admin-page main .flex.space-x-3,
  .admin-page main .flex.space-x-4 {
    gap: var(--space-sm);
  }
  
  .admin-page main .flex.gap-2 > button,
  .admin-page main .flex.gap-3 > button,
  .admin-page main .flex.gap-4 > button,
  .admin-page main .flex.space-x-2 > button,
  .admin-page main .flex.space-x-3 > button,
  .admin-page main .flex.space-x-4 > button {
    width: 100%;
    max-width: 100%;
  }
  
  /* === ADMIN FLEX HEADERS === (exclude navigation) */
  .admin-page main .flex.justify-between.items-center {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  .admin-page main .flex.justify-between.items-center > button {
    width: 100%;
    max-width: 100%;
  }
}

/* Ensure buttons don't overflow */
.admin-page button {
  max-width: 100%;
  word-wrap: break-word;
  white-space: normal;
}

/* Text truncation for long content */
.assignment-leader-name,
.assignment-scope-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Assignment text wrapping - CONSOLIDATED ABOVE at line ~1873 */

/* Container overflow protection (Phase 6C: body.admin-page for specificity, !important removed) */
body.admin-page .container {
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: visible;
}

/* Admin page - allow dropdowns to escape */
.admin-page {
  overflow: visible !important;
}

/* Admin category tabs container - ensure overflow visible (Phase 6C: body.admin-page for specificity, !important removed) */
body.admin-page .admin-category-tabs-container {
  overflow: visible;
  position: relative;
}

/* Ensure all page containers match admin page width (Phase 6C: !important removed; selector specificity retained) */
.container.mx-auto.px-16 {
  max-width: 100%;
  width: 100%;
}

/* Ensure navigation container also matches page content width (Phase 6C: !important removed) */
nav.bg-primary > div.container {
  max-width: 100%;
  width: 100%;
}

.admin-page .card,
.admin-page .card-lg {
  max-width: 100%;
  overflow-x: hidden;
}

/* Ensure all flex containers wrap on mobile - CONSOLIDATED ABOVE at line ~1873 */

/* Mobile-specific padding adjustments */
/* Mobile-specific padding adjustments - CONSOLIDATED ABOVE at line ~3243 */

/* Email subtabs - responsive - CONSOLIDATED ABOVE at line ~1873 */

/* Header sections with buttons - responsive - CONSOLIDATED ABOVE at line ~3243 */

/* Admin Page: Category Tabs with Dropdowns - Mobile Responsive */
/* Default: Show desktop tabs on large screens.
   !important removed: media queries use source order, force-mobile-view uses specificity. */
@media (min-width: 1201px) {
  .admin-category-tabs-mobile-toggle {
    display: none;
    visibility: hidden;
    height: 0;
    overflow: hidden;
  }
  
  .admin-category-tabs-mobile-menu {
    display: none;
    visibility: hidden;
    height: 0;
    overflow: hidden;
  }
  
  .admin-category-tabs-desktop {
    display: flex;
    visibility: visible;
  }
}

/* Force mobile view for testing - add ?mobile=1 to URL */
body.force-mobile-view .admin-category-tabs-desktop {
  display: none;
  visibility: hidden;
}

body.force-mobile-view .admin-category-tabs-mobile-toggle {
  display: flex;
  visibility: visible;
  height: auto;
  overflow: visible;
  padding: 1rem;
  margin: 0;
}

body.force-mobile-view .admin-category-tabs-mobile-menu {
  visibility: visible;
  height: auto;
  overflow: visible;
}

body.force-mobile-view .admin-category-tabs-container {
  position: relative;
}

/* Mobile/Tablet: Hide desktop tabs, show hamburger */
@media (max-width: 1200px) {
  .admin-category-tabs-container {
    position: relative;
  }
  
  .admin-category-tabs-desktop {
    display: none;
    visibility: hidden;
    height: 0;
    overflow: hidden;
  }
  
  .admin-category-tabs-mobile-toggle {
    display: flex;
    visibility: visible;
    height: auto;
    overflow: visible;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: white;
    border-bottom: 1px solid var(--color-gray-200);
    cursor: pointer;
    transition: var(--transition-background);
  }
  
  .admin-category-tabs-mobile-toggle:hover {
    background: var(--color-gray-50);
  }
  
  .admin-category-tabs-mobile-menu {
    display: none;
    visibility: visible;
    height: auto;
    overflow: visible;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--color-gray-200);
    border-top: none;
    z-index: 50;
    max-height: 500px;
    overflow-y: auto;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  }
  
  .admin-category-tabs-mobile-menu.active {
    display: block;
  }
  
  .admin-category-mobile-item {
    border-bottom: 1px solid var(--color-gray-200);
  }
  
  .admin-category-mobile-item:last-child {
    border-bottom: none;
  }
  
  .admin-category-mobile-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    text-align: left;
    background: white;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-gray-700);
    transition: var(--transition-background);
  }
  
  .admin-category-mobile-button:hover {
    background: var(--color-gray-50);
    color: var(--glass-tint-primary);
  }
  
  .admin-category-mobile-button span {
    flex: 1;
  }
  
  .admin-mobile-arrow {
    transition: transform 0.2s;
    flex-shrink: 0;
  }
  
  .admin-category-mobile-submenu {
    display: none;
    background: var(--color-gray-50);
    border-top: 1px solid var(--color-gray-200);
  }
  
  .admin-category-mobile-submenu.active {
    display: block;
  }
  
  .admin-category-mobile-subitem {
    padding: 0.625rem 1rem 0.625rem 2rem;
    font-size: 0.875rem;
    color: var(--color-gray-500);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    border-bottom: 1px solid var(--color-gray-200);
  }
  
  .admin-category-mobile-subitem:last-child {
    border-bottom: none;
  }
  
  .admin-category-mobile-subitem:hover {
    background: var(--color-gray-100);
    color: var(--glass-tint-primary);
  }
  
  .admin-category-mobile-subitem.active {
    background: #e6f4ed;
    color: var(--glass-tint-primary);
    font-weight: 600;
  }
}

/* Phase 6C: body.admin-page for specificity so overflow wins without !important */
body.admin-page .category-tab {
  position: relative;
  z-index: 10;
  overflow: visible;
}

.category-tab.active {
  z-index: 1001;
}

/* Ensure parent containers don't clip dropdowns (Phase 6C: body.admin-page for specificity, !important removed) */
body.admin-page div.bg-white.rounded-t-lg.shadow-md.border-b.mt-4.mb-4 {
  overflow: visible;
  position: relative;
}

body.admin-page div.bg-white.rounded-t-lg.shadow-md.border-b.mt-4.mb-4 > div.flex.border-b.overflow-x-auto {
  overflow-y: visible;
  overflow-x: auto;
  position: relative;
  contain: none;
}

.category-tab-button {
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 600;
  font-size: 0.875rem; /* 14px - match supervisor tabs */
  position: relative;
  flex-shrink: 0;
}

.category-tab-button:hover {
  background: linear-gradient(180deg, var(--color-gray-50) 0%, var(--color-gray-100) 100%);
  color: var(--glass-tint-primary);
}

.category-tab-button.active {
  border-bottom-color: var(--glass-tint-primary);
  color: var(--glass-tint-primary);
  background: linear-gradient(180deg, var(--color-white) 0%, var(--color-gray-50) 100%);
  box-shadow: 0 -2px 8px -2px rgba(0, 112, 60, 0.08);
}

.category-tab-button .dropdown-arrow {
  font-size: 0.75rem;
  transition: transform 0.2s;
}

.category-tab.active .dropdown-arrow {
  transform: rotate(180deg);
}

.category-dropdown {
  display: none;
  position: fixed;
  background: white;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  min-width: 220px;
  padding: 0.25rem 0;
  white-space: nowrap;
}

/* Phase 6C: body.admin-page for specificity so display toggle wins without !important */
body.admin-page .category-tab.active:not(.dropdown-closed) .category-dropdown {
  display: block;
}

body.admin-page .category-tab.dropdown-closed .category-dropdown {
  display: none;
}

.category-dropdown-item {
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.2s;
  border-left: 3px solid transparent;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.875rem;
}

.category-dropdown-item:hover {
  background-color: var(--color-gray-100);
}

.category-dropdown-item.active {
  border-left-color: var(--glass-tint-primary);
  background-color: var(--color-gray-50);
  color: var(--glass-tint-primary);
  font-weight: 600;
}

/* Admin Active School Year Gradient Box */
.school-year-active-box {
  background: linear-gradient(to right, var(--glass-tint-primary), #16a34a);
  color: white;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.school-year-active-box h3,
.school-year-active-box label,
.school-year-active-box select,
.school-year-active-box div {
  color: white;
}

/* Phase 1 Keep: UA override for custom select in admin; must beat browser defaults. Do not remove. */
.school-year-active-box select {
  border-color: rgba(255, 255, 255, 0.3);
  background-color: rgba(255, 255, 255, 0.1);
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.75rem center !important;
  background-size: 12px !important;
  padding-right: 2.5rem !important;
}

/* ============================================
   NAVIGATION SYSTEM - Consolidated
   ============================================ */

/* Navigation wrapper (Phase 5: body prefix for specificity, !important removed) */
body #main-navigation {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  flex-shrink: 0;
  position: relative;
  display: block;
  overflow: visible;
}

/* Main Navigation - Fixed at top. Liquid Glass Effect. (Phase 5: !important removed, specificity retained.) */
body #main-navigation nav.bg-primary {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  overflow: visible;
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  background-color: var(--glass-tint-primary);
  box-shadow: var(--glass-shadow), var(--glass-glow);
  transition: var(--transition-smooth);
}

/* Navigation content container - desktop only */
@media (min-width: 1024px) {
  body nav.bg-primary .container {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
    width: 100%;
    padding-left: 4rem;
    padding-right: 4rem;
  }
}

/* Navigation typography - remove default margins */
body nav.bg-primary h1,
body nav.bg-primary h2,
body nav.bg-primary h3,
body nav.bg-primary h4,
body nav.bg-primary h5,
body nav.bg-primary h6 {
  margin: 0;
}

/* Prevent gaps from inline scripts */
body > * {
  margin-top: 0 !important;
}

body > script {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Mobile navigation padding - CONSOLIDATED ABOVE at line ~1873 */

/* Scrolled state - enhanced glass effect with deeper shadow */
nav.bg-primary.scrolled {
  background-color: var(--glass-tint-primary-dark);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.25), 
              0 0 30px rgba(0, 112, 60, 0.3);
}


/* Navigation container - ensure no clipping (Phase 5: body prefix, !important removed) */
body nav.bg-primary > div {
  overflow: visible;
  position: relative;
}

/* Navigation items container - ensure no clipping */
body nav.bg-primary .hidden.lg\:flex,
body nav.bg-primary .lg\:flex {
  overflow: visible;
}

/* Navigation dropdown menus - higher z-index than admin elements */
body nav.bg-primary .relative.group {
  overflow: visible;
  position: relative;
}

body nav.bg-primary .relative.group > div.absolute {
  z-index: 1100;
  position: absolute;
}

/* Admin page - ensure no clipping (Phase 5: keep !important so overflow-y wins over other layout) */
.admin-page {
  overflow-x: hidden;
  overflow-y: auto !important;
  position: relative;
}

/* Admin page navigation - overflow visible so dropdowns escape (Phase 5: specificity, !important removed) */
.admin-page nav,
.admin-page nav.bg-primary,
.admin-page nav.bg-primary > *,
.admin-page nav.bg-primary .relative.group {
  overflow: visible;
}

.admin-page nav.bg-primary .relative.group > div.absolute {
  z-index: 1100;
  position: absolute;
}


/* Filter Bar Enhancement */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  padding: 1.25rem;
  background: linear-gradient(135deg, var(--color-gray-50) 0%, var(--color-white) 100%);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-gray-200);
  margin-bottom: 1.5rem;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.filter-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-black);
  white-space: nowrap;
}


/* Portfolio Card Body: show ~2 items, scroll overflow */
.portfolio-card-body {
  max-height: 20rem;
  overflow-y: auto;
  padding-right: 0.25rem;
  scroll-behavior: smooth;
}

/* Action Buttons Group */
.action-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.action-buttons-sticky {
  position: sticky;
  bottom: 1rem;
  background: white;
  padding: 1rem;
  border-radius: var(--radius-md);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
  z-index: 10;
}


/* ============================================
   TOAST NOTIFICATIONS — below nav, Liquid Glass styling
   ============================================ */

.app-toast {
  position: fixed;
  top: calc(var(--nav-height, 0px) + 1rem);
  right: 1rem;
  z-index: var(--z-toast);
  max-width: min(400px, calc(100vw - 2rem));
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.4;
  box-shadow: var(--shadow-lg);
  border: 2px solid transparent;
  box-sizing: border-box;
}

.app-toast--success {
  background: var(--glass-tint-primary-light-bg);
  border-color: var(--glass-tint-primary);
  color: var(--glass-tint-primary-darker);
}

.app-toast--error {
  background: #fef2f2;
  border-color: #dc2626;
  color: #991b1b;
}

.app-toast--info {
  background: #eff6ff;
  border-color: #2563eb;
  color: #1e40af;
}

.app-toast--warning {
  background: #fffbeb;
  border-color: #d97706;
  color: #92400e;
}

/* ============================================
   FOOTER — Ravenscroft green (matches nav), white text
   Full viewport width so green reaches both edges (no white strip from scrollbar/layout).
   ============================================ */

footer {
  margin-top: -2px;
  margin-bottom: -2px;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: calc(2rem + 2px) 2px;
  min-height: 3.5rem;
  width: 100vw;
  max-width: 100vw;
  box-sizing: border-box;
  border: none !important;
  border-width: 0 !important;
  border-color: transparent !important;
  outline: none !important;
  border-radius: 0 !important;
  background: var(--glass-tint-primary);
  box-shadow: none !important;
  /* Vertically center footer content */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  font-size: 0.875rem;
}

footer::before,
footer::after {
  display: none !important;
  border: none !important;
  box-shadow: none !important;
}

footer * {
  border: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}

footer p,
footer span,
footer div {
  color: white;
}

/* Footer glass effects — applied via @supports block at end of file */

/* ============================================
   PHASE 5: ACCESSIBILITY, PERFORMANCE & MICRO-INTERACTIONS
   ============================================ */


/* Screen Reader Only Content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus Visible Enhancements - Glass Effect */
*:focus-visible {
  outline: var(--focus-ring-thick);
  outline-offset: var(--focus-ring-offset);
  border-radius: 0.375rem;
  box-shadow: var(--focus-ring-shadow);
}

button:focus-visible,
a:focus-visible {
  outline: var(--focus-ring-gold);
  outline-offset: var(--focus-ring-offset);
  box-shadow: var(--focus-ring-shadow-gold);
}

/* Clickable Cards & Elements with onclick - Keyboard Navigation */
.template-card:focus-visible,
.card[onclick]:focus-visible,
[onclick]:focus-visible,
[role="button"]:focus-visible {
  outline: var(--focus-ring-thick);
  outline-offset: var(--focus-ring-offset-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--focus-ring-shadow-card);
  transform: translateY(-2px);
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .card {
    border: 2px solid var(--color-black);
  }
  
  .btn {
    border: 2px solid currentColor;
  }
  
}

/* Micro-interaction: Button Press */
.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}


/* Selection Highlight */
::selection {
  background-color: rgba(0, 112, 60, 0.3);
  color: var(--color-black);
}

::-moz-selection {
  background-color: rgba(0, 112, 60, 0.3);
  color: var(--color-black);
}

/* Smooth Scroll (respects prefers-reduced-motion in consolidated block above) */
html {
  scroll-behavior: smooth;
}

/* Touch Target Sizing (Accessibility) - exclude checkboxes/radios */
button,
a,
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea,
.clickable {
  min-height: 44px;
  min-width: 44px;
}

/* Quill toolbar: compact buttons intentionally exempt from 44px touch target */
.quill-wrapper .ql-toolbar button,
.quill-wrapper .ql-toolbar .ql-picker-label,
.admin-email-editor .ql-toolbar button,
.admin-email-editor .ql-toolbar .ql-picker-label {
  min-height: auto;
  min-width: auto;
}

/* Checkboxes and radios have their own specific sizing — !important removed:
   touch target rule above excludes these via :not(), and this has higher specificity. */
input[type="checkbox"],
input[type="radio"] {
  min-height: auto;
  min-width: auto;
}

/* Text Readability — in @layer base so Tailwind's max-w-none can override */
@layer base {
  p,
  li,
  td {
    max-width: 75ch;
  }
}

/* Performance: Will-change only on hover/focus to avoid persistent GPU layers */
.btn:hover,
.btn:focus,
.nav-link:hover,
.nav-link:focus {
  will-change: transform;
}

.card:hover,
.card:focus,
.btn-primary:hover,
.btn-primary:focus,
.btn-secondary:hover,
.btn-secondary:focus,
.btn-view:hover,
.btn-view:focus {
  will-change: transform, box-shadow;
}

/* GPU acceleration removed — translateZ(0) was overriding button hover
   transforms (translateY). Modern browsers handle compositing automatically. */


/* ============================================
   LIQUID GLASS COUNT BADGES & PILLS (Phase 6D: !important removed from pill badges)
   ============================================ */

/* Generic rounded-full pill badges */
.rounded-full.bg-gray-200,
.rounded-full.bg-gray-100 {
  background: linear-gradient(135deg, rgba(243, 244, 246, 0.85) 0%, rgba(229, 231, 235, 0.90) 100%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.06),
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: var(--transition-smooth);
}

/* Gold/Yellow rounded badges (including pinned spotlights) */
.rounded-full.bg-gold,
.rounded-full.bg-yellow-100,
.rounded-full.bg-yellow-200,
.rounded-full.bg-yellow-400,
.rounded-full.bg-yellow-500 {
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.85) 0%, rgba(253, 230, 138, 0.90) 100%);
  border: 1px solid rgba(251, 191, 36, 0.5);
  box-shadow: 0 4px 12px 0 rgba(245, 158, 11, 0.20),
              inset 0 1px 0 rgba(255, 255, 255, 0.4),
              0 0 15px rgba(245, 158, 11, 0.12);
  color: #92400e;
  transition: var(--transition-smooth);
}

/* Green status badges */
.rounded-full.bg-green-100,
.rounded-full.bg-green-50 {
  background: linear-gradient(135deg, rgba(209, 250, 229, 0.85) 0%, rgba(167, 243, 208, 0.90) 100%);
  border: 1px solid rgba(110, 231, 183, 0.5);
  box-shadow: 0 4px 12px 0 rgba(16, 185, 129, 0.15),
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
  color: #065f46;
  transition: var(--transition-smooth);
}

/* Red status badges */
.rounded-full.bg-red-100,
.rounded-full.bg-red-50 {
  background: linear-gradient(135deg, rgba(254, 226, 226, 0.85) 0%, rgba(254, 202, 202, 0.90) 100%);
  border: 1px solid rgba(248, 113, 113, 0.5);
  box-shadow: 0 4px 12px 0 rgba(239, 68, 68, 0.15),
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
  color: #991b1b;
  transition: var(--transition-smooth);
}

/* Blue status badges */
.rounded-full.bg-blue-100,
.rounded-full.bg-blue-50 {
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.85) 0%, rgba(191, 219, 254, 0.90) 100%);
  border: 1px solid rgba(96, 165, 250, 0.5);
  box-shadow: 0 4px 12px 0 rgba(59, 130, 246, 0.15),
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
  color: #1e40af;
  transition: var(--transition-smooth);
}

/* Purple status badges and sections */
.rounded-full.bg-purple-100,
.rounded-full.bg-purple-50 {
  background: linear-gradient(135deg, rgba(237, 233, 254, 0.85) 0%, rgba(221, 214, 254, 0.90) 100%);
  border: 1px solid rgba(167, 139, 250, 0.5);
  box-shadow: 0 4px 12px 0 rgba(139, 92, 246, 0.15),
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
  color: #5b21b6;
  transition: var(--transition-smooth);
}

/* Purple background sections (Reflection areas) (Phase 6E: !important removed) */
.bg-purple-50 {
  background: linear-gradient(135deg, rgba(245, 243, 255, 0.75) 0%, rgba(237, 233, 254, 0.80) 100%);
  border-color: rgba(167, 139, 250, 0.3);
  transition: var(--transition-smooth);
}

.border-purple-200 {
  border-color: rgba(167, 139, 250, 0.35);
}

.border-purple-600 {
  border-color: #9333ea;
}

.text-purple-800 {
  color: #6b21a8;
}

.text-purple-900 {
  color: #581c87;
}

/* Restore purple styling in modals (Teacher Reflection, evaluation metadata blocks) — higher specificity so it wins over Tailwind after Phase 6E */
.modal-backdrop #modalContent .bg-purple-50,
.modal-backdrop #observationModalContent .bg-purple-50,
.modal-backdrop #staffEvaluationViewContent .bg-purple-50 {
  background: linear-gradient(135deg, rgba(245, 243, 255, 0.75) 0%, rgba(237, 233, 254, 0.80) 100%);
  border-color: rgba(167, 139, 250, 0.3);
}
.modal-backdrop #modalContent .border-purple-200,
.modal-backdrop #observationModalContent .border-purple-200,
.modal-backdrop #staffEvaluationViewContent .border-purple-200 {
  border-color: rgba(167, 139, 250, 0.35);
}
.modal-backdrop #modalContent .border-purple-600,
.modal-backdrop #observationModalContent .border-purple-600,
.modal-backdrop #staffEvaluationViewContent .border-purple-600 {
  border-color: #9333ea;
}
.modal-backdrop #modalContent .text-purple-600,
.modal-backdrop #observationModalContent .text-purple-600,
.modal-backdrop #staffEvaluationViewContent .text-purple-600 {
  color: #9333ea;
}
.modal-backdrop #modalContent .text-purple-800,
.modal-backdrop #observationModalContent .text-purple-800,
.modal-backdrop #staffEvaluationViewContent .text-purple-800 {
  color: #6b21a8;
}
.modal-backdrop #modalContent .text-purple-900,
.modal-backdrop #observationModalContent .text-purple-900,
.modal-backdrop #staffEvaluationViewContent .text-purple-900 {
  color: #581c87;
}
/* Purple pill badge (Read-only / Reflection Completed / status) in modals */
.modal-backdrop #modalContent .rounded-full.bg-purple-100,
.modal-backdrop #observationModalContent .rounded-full.bg-purple-100,
.modal-backdrop #staffEvaluationViewContent .rounded-full.bg-purple-100 {
  background: linear-gradient(135deg, rgba(237, 233, 254, 0.85) 0%, rgba(221, 214, 254, 0.90) 100%);
  border: 1px solid rgba(167, 139, 250, 0.5);
  box-shadow: 0 4px 12px 0 rgba(139, 92, 246, 0.15),
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
  color: #5b21b6;
}
.modal-backdrop #modalContent .text-purple-700,
.modal-backdrop #observationModalContent .text-purple-700,
.modal-backdrop #staffEvaluationViewContent .text-purple-700 {
  color: #5b21b6;
}

/* Evaluation modals (portfolio): top metadata block — light green complement to Ravenscroft green */
.evaluation-meta-section {
  background: var(--glass-tint-primary-light-bg);
  border: 1px solid var(--glass-tint-primary-light-border);
  transition: var(--transition-smooth);
}

/* ============================================
   LIQUID GLASS COLORED SECTIONS - Notes Areas
   ============================================ */

/* Blue sections (Associate/Assistant Division Head) (Phase 6E: !important removed) */
.bg-blue-50 {
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.75) 0%, rgba(219, 234, 254, 0.80) 100%);
  transition: var(--transition-smooth);
}

.border-blue-200 {
  border-color: rgba(191, 219, 254, 0.5);
}

.border-blue-600 {
  border-color: #2563eb;
}

.text-blue-800 {
  color: #1e40af;
}

.text-blue-900 {
  color: #1e3a8a;
}

/* Green sections (Division Head) (Phase 6E: !important removed) */
.bg-green-50 {
  background: linear-gradient(135deg, rgba(240, 253, 244, 0.75) 0%, rgba(209, 250, 229, 0.80) 100%);
  transition: var(--transition-smooth);
}

.border-green-200 {
  border-color: rgba(167, 243, 208, 0.5);
}

.border-green-600 {
  border-color: #059669;
}

.text-green-800 {
  color: #166534;
}

.text-green-900 {
  color: #14532d;
}

/* Red sections (Admin) (Phase 6E: !important removed) */
.bg-red-50 {
  background: linear-gradient(135deg, rgba(254, 242, 242, 0.75) 0%, rgba(254, 226, 226, 0.80) 100%);
  transition: var(--transition-smooth);
}

.border-red-200 {
  border-color: rgba(254, 202, 202, 0.5);
}

.border-red-600 {
  border-color: #dc2626;
}

.text-red-800 {
  color: #991b1b;
}

.text-red-900 {
  color: #7f1d1d;
}

/* Orange sections (warnings/alerts) (Phase 6E: !important removed) */
.bg-orange-100 {
  background: linear-gradient(135deg, rgba(255, 237, 213, 0.85) 0%, rgba(254, 215, 170, 0.90) 100%);
  border: 1px solid rgba(251, 146, 60, 0.4);
  transition: var(--transition-smooth);
}

.text-orange-700 {
  color: #c2410c;
}

/* Performance: Contain Layout */
/* contain: layout style paint - isolates element rendering from rest of page */
/* This improves performance by limiting browser recalculation scope */
.card,
.modal-content,
.tab-button,
.tag,
.category-dropdown {
  contain: layout style paint;
}

/* Scrolling containers - layout/paint containment + content-visibility (Adjustment #3) */
/* Use contain: layout paint (not strict) so scroll height is not broken; content-visibility: auto still skips off-screen work */
#goalsContainer,
#observationsContainer,
#spotlightsReceivedContainer,
#spotlightsSentContainer,
#employeeList,
#teamContainer,
#staffEvaluationsContainer,
#submissionsContainer,
#myWorkContainer,
#observationsDraftsContainer,
#evaluationsDraftsContainer,
#leadershipAssignmentsContainer,
#leadershipNotesContainer,
.max-h-96.overflow-y-auto,
.max-h-64.overflow-y-auto {
  contain: layout paint;
  content-visibility: auto;
  contain-intrinsic-size: auto 500px;
}


/* ARIA Live Region Styles */
[aria-live] {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Better Link Underlines */
a:not(.btn):not(.nav-link) {
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: var(--transition-underline);
}

a:not(.btn):not(.nav-link):hover {
  text-decoration-thickness: 2px;
}


/* ============================================
   CONSOLIDATED GLASS EFFECTS - @supports
   ============================================ */

/* Adjustment #3: Trim backdrop-filter — keep key glass (nav, modals, cards, utilities); remove from inputs, tabs, footer, loading, pills. */
@supports (backdrop-filter: blur(20px)) or (-webkit-backdrop-filter: blur(20px)) {
  /* Navigation Glass (key — kept) */
  nav.bg-primary {
    backdrop-filter: blur(10px) saturate(var(--glass-saturate)) brightness(1.05);
    -webkit-backdrop-filter: blur(10px) saturate(var(--glass-saturate)) brightness(1.05);
  }
  
  /* Cards Glass (key — kept) */
  .card,
  .border-l-4.border-gold {
    backdrop-filter: blur(var(--glass-blur-light)) saturate(140%);
    -webkit-backdrop-filter: blur(var(--glass-blur-light)) saturate(140%);
  }
  
  /* Modals: no backdrop-filter — avoids thin line/flicker at top where modal meets backdrop (glass seam). Backdrop stays solid dark; modal content stays solid. */
}

/* ============================================
   RESPONSIVE BREAKPOINT INDEX - Phase 3
   ============================================ */
/* 
 * Mobile (max-width: 640px) - Lines: 3120, 3219, 3265
 * Tablet (max-width: 768px) - Lines: 1857, 3087, 3157, 3202, 3256, 3660, 4285
 * Desktop-Small (max-width: 1200px) - Lines: 1478, 3327
 * Tablet Range (768px-1024px) - Lines: 3238, 3249
 */

/* Phase 1 Keep: print overrides must win over screen styles. Do not remove. */
@media print {
  .no-print,
  .nav-link,
  .btn {
    display: none !important;
  }
  
  * {
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  .card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  
  body {
    font-size: 12pt;
  }
  
  h1 { font-size: 18pt; }
  h2 { font-size: 16pt; }
  h3 { font-size: 14pt; }
  
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
  }
}
