/**
 * CUEMS Design System - CU Boulder EMS Style Guide Compliant
 * Following official CU Boulder brand guidelines and accessibility standards
 * Merged from dashboard.css with additional design system components
 */

/* =============== Google Fonts =============== */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Roboto+Condensed:wght@400;700&display=swap');

/* =============== CSS Reset =============== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* =============== Root Variables - CU Boulder Official Colors =============== */
:root {
    /* CU Boulder Official Brand Colors - PRIMARY PALETTE */
    --cu-black: #000000;             /* Official CU Black */
    --cu-gold: #CFB87C;              /* Official CU Gold - PRIMARY actions & buttons */
    --cu-gold-dark: #B8A369;         /* Darker gold for hover states */
    --cu-gold-light: #F1EBD9;        /* Light Gold */
    --cu-gold-accessible: #8B6914;   /* Darker gold for white text (WCAG AA) */
    
    /* CU Boulder Neutral Colors */
    --cu-white: #FFFFFF;             /* White */
    --cu-light-gray: #EEEEEE;        /* Light Gray */
    --cu-dark-gray: #424242;         /* Dark Gray */
    
    /* CU Boulder Links & Buttons */
    --cu-blue: #0277BD;              /* Official CU Blue - links and secondary buttons */
    
    /* CU Boulder Secondary Colors - Use sparingly */
    --cu-light-blue: #E1F5FE;        /* Light Blue */
    --cu-light-green: #DCEDC8;       /* Light Green */
    --cu-medium-blue: #4FC3F7;       /* Medium Blue */
    --cu-dark-blue: #01579B;         /* Dark Blue */
    --cu-brick: #AE5A39;             /* Brick */
    
    /* CU Boulder Application Colors */
    --cu-red: #B71C1C;               /* Red - errors */
    --cu-green: #2E7D32;             /* Green - success */
    --cu-amber: #FFD740;             /* Amber - warnings */
    
    /* CU Boulder Notification/Message Colors - Background colors */
    --cu-light-red: #FFEBEE;         /* Light Red - error backgrounds */
    --cu-yellow: #FFF9C4;            /* Yellow - warning backgrounds */
    
    /* Text Colors */
    --cu-text-primary: var(--cu-black);
    --cu-text-secondary: var(--cu-dark-gray);
    --cu-bg-light: var(--cu-light-gray);
    
    /* Spacing - Following style guide */
    --spacing-xs: 5px;
    --spacing-sm: 10px;
    --spacing-md: 20px;
    --spacing-lg: 40px;
    --spacing-xl: 80px;
    
    /* Border Radius - CU Standard */
    --radius-standard: 3px;          /* CU Boulder standard border radius */
    --radius-sm: 3px;
    --radius-md: 6px;
    --radius-lg: 12px;
    --radius-xl: 24px;
    --radius-full: 9999px;           /* For pills/badges */
    
    /* Shadows - Warm, professional */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);
    --shadow-gold: 0 4px 15px rgba(207, 184, 124, 0.25);
    
    /* Legacy variables for compatibility */
    --gold: #CFB87C;
    --gold-accessible: #8B6914;
    --gold-5: #CFB87C0D;
    --gold-10: #CFB87C1A;
    --gold-20: #CFB87C33;
    --text: #1a1a1a;
    --text-light: #4a5568;
    --text-lighter: #718096;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #CBD5E1;
    --gray-400: #9CA3AF;
    --success: #15803d;
    --warning: #92400e;
    --danger: #991b1b;
    --info: #1e40af;
    --success-bg: #f0fdf4;
    --warning-bg: #fef3c7;
    --danger-bg: #fef2f2;
    --info-bg: #eff6ff;
}

/* =============== Alpine.js Cloak =============== */
[x-cloak] { 
    display: none !important; 
}

/* =============== Loading Spinner Styles =============== */
.loading-spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.95);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease-out;
}

.loading-spinner-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.spinner-container {
    text-align: center;
}

.spinner {
    border: 4px solid var(--gray-200);
    border-top: 4px solid var(--gold);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: var(--text);
    font-size: 18px;
    font-weight: 500;
    margin-top: 16px;
}

/* =============== Base Typography - CU Boulder Style =============== */
body {
    font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--cu-text-primary);
    background-color: var(--cu-bg-light);
    line-height: 1.5;
    font-size: 16px;
    font-weight: 400;  /* Never less than 400 */
    antialiased: true;
}

/* Headers and typography - CU Boulder style */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto Condensed', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--cu-text-primary);
}

h1 { font-size: 2.5rem; margin-bottom: 16px; }
h2 { font-size: 2rem; margin-bottom: 40px; }
h3 { font-size: 1.75rem; margin-bottom: 16px; }
h4 { font-size: 1.5rem; margin-bottom: 12px; }
h5 { font-size: 1.25rem; margin-bottom: 12px; }
h6 { font-size: 1rem; margin-bottom: 12px; }

p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 16px;
}

.font-heading {
    font-family: 'Roboto Condensed', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: 700;
}

.font-body {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
}

/* Typography utilities */
.font-condensed {
    font-family: 'Roboto Condensed', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.font-regular {
    font-family: 'Roboto', sans-serif;
}

/* =============== Accessibility Classes =============== */
.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;
}

.skip-to-main {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 999;
    padding: 12px 24px;
    background: var(--cu-gold);
    color: #000;
    text-decoration: none;
    font-weight: 500;
    border-radius: 0 0 8px 0;
}

.skip-to-main:focus {
    left: 0;
}

/* =============== Container =============== */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.max-w-7xl {
    max-width: 1280px;
}

.dashboard-container {
    min-height: 100vh;
    background-color: var(--cu-bg-light);
    color: var(--cu-text-primary);
}

/* =============== Navigation =============== */
.nav {
    padding: 20px 0;
    border-bottom: 1px solid var(--gray-300);
    background: white;
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 17px;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
}

.logo .gold {
    color: var(--gold-accessible);
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-size: 15px;
    font-weight: 400;
    transition: color 0.2s;
    padding: 4px 8px;
    border-radius: 4px;
}

.nav-link:hover {
    color: var(--text);
    background: var(--gray-50);
}

.nav-link:focus-visible {
    outline: 2px solid var(--gold-accessible);
    outline-offset: 2px;
}

/* =============== Buttons - CU Boulder Style Guide =============== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--radius-standard);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    border: none;
    outline: none;
    box-shadow: var(--shadow-sm);
    font-family: 'Roboto', sans-serif;
    min-height: 44px;  /* Touch target size */
    gap: 8px;
}

.btn:focus {
    outline: 2px solid var(--cu-gold);
    outline-offset: 2px;
}

.btn:focus-visible {
    outline: 2px solid var(--gold-accessible);
    outline-offset: 2px;
}

/* Primary button - CU Gold */
.btn-primary {
    background-color: var(--cu-gold);
    color: var(--cu-black);
    border: 1px solid var(--gold-accessible);
}

.btn-primary:hover {
    background-color: var(--cu-gold-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
    color: white;
}

/* Secondary button - Blue outline */
.btn-secondary {
    background-color: transparent;
    color: var(--cu-blue);
    border: 2px solid var(--cu-blue);
    box-shadow: none;
}

.btn-secondary:hover {
    background-color: var(--cu-blue);
    color: var(--cu-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-light {
    background: var(--gray-100);
    color: var(--text);
    border: 1px solid var(--gray-300);
}

.btn-light:hover {
    background: var(--gray-200);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.btn-outline {
    border: 2px solid var(--cu-light-gray);
    color: var(--cu-text-primary);
    background: transparent;
    font-weight: 600;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.btn-outline:hover {
    transform: translateY(-2px);
    background-color: var(--cu-text-primary);
    border-color: var(--cu-text-primary);
    color: var(--cu-white);
}

.btn-gold {
    background-color: var(--cu-gold);
    color: var(--cu-black);
    font-weight: 600;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(207, 184, 124, 0.15);
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    border: 1px solid var(--gold-accessible);
}

.btn-gold:hover {
    transform: translateY(-2px);
    background-color: var(--cu-gold-dark);
    box-shadow: 0 8px 15px rgba(207, 184, 124, 0.25);
    color: white;
}

/* Success button */
.btn-success {
    background-color: var(--cu-green);
    color: var(--cu-white);
}

.btn-success:hover {
    background-color: #236B24;
    transform: translateY(-2px);
}

/* Danger button */
.btn-danger {
    background-color: var(--cu-red);
    color: var(--cu-white);
}

.btn-danger:hover {
    background-color: #8E1515;
    transform: translateY(-2px);
}

/* Small button variant */
.btn-sm {
    padding: 5px 10px;
    font-size: 14px;
}

.btn-text {
    color: var(--text-light);
    padding: 8px 12px;
    min-height: 36px;
    background: transparent;
    box-shadow: none;
}

.btn-text:hover {
    color: var(--text);
    background: var(--gray-100);
}

.btn-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* =============== Component Containers - CU Boulder Style =============== */
.dashboard-section {
    background: var(--cu-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    border: 1px solid var(--cu-light-gray);
    transition: all 0.3s ease;
}

.dashboard-section:hover {
    box-shadow: var(--shadow-lg);
}

/* =============== Cards - CU Boulder Style =============== */
/* Dashboard Section Styles */
.dashboard-section {
    background: var(--cu-white);
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
}

.dashboard-section-header {
    font-family: 'Roboto Condensed', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    font-size: 1.5rem;
    line-height: 2rem;
    font-weight: 700;
    color: #111827;
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.dashboard-section-header i {
    margin-right: 0.75rem;
    color: var(--cu-gold);
}

/* Dashboard Metric Cards with Gradient Backgrounds */
.dashboard-metric-card {
    border-radius: 0.75rem;
    padding: 1.5rem;
    border-width: 1px;
    border-style: solid;
    transition: all 0.2s;
}

.dashboard-metric-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.dashboard-metric-card.blue {
    background: linear-gradient(to bottom right, #eff6ff, #dbeafe);
    border-color: #bfdbfe;
}

.dashboard-metric-card.red {
    background: linear-gradient(to bottom right, #fef2f2, #fee2e2);
    border-color: #fecaca;
}

.dashboard-metric-card.green {
    background: linear-gradient(to bottom right, #f0fdf4, #dcfce7);
    border-color: #bbf7d0;
}

.dashboard-metric-card.purple {
    background: linear-gradient(to bottom right, #faf5ff, #f3e8ff);
    border-color: #e9d5ff;
}

.dashboard-metric-card.amber {
    background: linear-gradient(to bottom right, #fffbeb, #fef3c7);
    border-color: #fde68a;
}

/* Card Styles */
.card, .content-card {
    background: var(--cu-white);
    border: 1px solid var(--cu-light-gray);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.card:hover, .content-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gray-400);
}

/* Card with CU Gold accent */
.card-gold-accent {
    border-top: 4px solid var(--cu-gold);
}

.card-icon {
    width: 44px;
    height: 44px;
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.card-icon.gold {
    background: var(--gold-10);
    color: var(--gold-accessible);
    border-color: var(--gold-20);
}

.card h3 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text);
}

.card p {
    color: var(--text-light);
    font-size: 15px;
    line-height: 1.5;
}

/* =============== Stats Cards - CU Boulder Style =============== */
.stat-card {
    background: var(--cu-white);
    border: 1px solid var(--cu-light-gray);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--cu-gold);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--cu-gold-accessible);
    font-family: 'Roboto Condensed', sans-serif;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--cu-text-secondary);
    margin-top: var(--spacing-xs);
    font-weight: 500;
}

/* =============== KPI Cards - Dashboard Style =============== */
.kpi-card {
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    padding: 24px;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    border-color: var(--gray-400);
}

.kpi-card-icon {
    width: 44px;
    height: 44px;
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 20px;
}

.kpi-card-icon.gold {
    background: var(--gold-10);
    color: var(--gold-accessible);
    border-color: var(--gold-20);
}

/* Stat icon styling */
.stat-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: var(--spacing-md);
    transition: all 0.3s ease;
}

.stat-icon.gold {
    background-color: var(--cu-gold-light);
    color: var(--cu-gold-accessible);
}

.stat-icon.green {
    background-color: var(--cu-light-green);
    color: var(--cu-green);
}

.stat-icon.blue {
    background-color: var(--cu-light-blue);
    color: var(--cu-blue);
}

.stat-icon.amber {
    background-color: var(--cu-yellow);
    color: #F57C00;
}

/* =============== KPI Cards - Dashboard Style =============== */
.kpi-card {
    background: white;
    border: 1px solid var(--cu-light-gray);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    opacity: 0;
    transform: scale(0);
    transition: transform 0.6s, opacity 0.3s;
}

.kpi-card:hover::before {
    opacity: 1;
    transform: scale(1);
}

.kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--gray-400);
}

.kpi-card-icon {
    width: 44px;
    height: 44px;
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 20px;
}

.kpi-card-icon.gold {
    background: var(--gold-10);
    color: var(--gold-accessible);
    border-color: var(--gold-20);
}

.kpi-card-value {
    font-size: 32px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.kpi-card-label {
    font-size: 14px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-card-change {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 12px;
    font-weight: 500;
}

.kpi-card-change.positive {
    color: var(--success);
}

.kpi-card-change.negative {
    color: var(--danger);
}

/* =============== Forms - CU Boulder Style =============== */
.form-group {
    margin-bottom: 24px;
}

.label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 6px;
}

.label .required {
    color: var(--danger);
    margin-left: 2px;
}

input, select, textarea, .input {
    width: 100%;
    border: 1px solid var(--cu-light-gray);
    border-radius: var(--radius-standard);
    padding: 8px 12px;
    font-size: 16px;
    transition: all 0.2s ease;
    font-family: 'Roboto', sans-serif;
    background: white;
    min-height: 44px;
}

input:focus, select:focus, textarea:focus, .input:focus {
    outline: none;
    border-color: var(--cu-gold);
    box-shadow: 0 0 0 3px rgba(207, 184, 124, 0.2);
}

.input::placeholder {
    color: var(--text-lighter);
}

.input[aria-invalid="true"] {
    border-color: var(--danger);
}

textarea.input {
    resize: vertical;
    min-height: 100px;
}

select.input {
    cursor: pointer;
    padding-right: 36px;
    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='%234a5568' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    appearance: none;
}

.helper-text {
    font-size: 13px;
    color: var(--text-lighter);
    margin-top: 4px;
}

.error-text {
    font-size: 13px;
    color: var(--danger);
    margin-top: 4px;
}

/* =============== Alerts - CU Boulder Style =============== */
.alert {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-standard);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    border-width: 1px;
    border-style: solid;
    border-left: 4px solid;
}

.alert-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 500;
    margin-bottom: 4px;
}

.alert-message {
    font-size: 14px;
    line-height: 1.4;
}

.alert-success {
    background-color: var(--cu-light-green);
    color: var(--cu-green);
    border-color: var(--cu-green);
}

.alert-error, .alert-danger {
    background-color: var(--cu-light-red);
    color: var(--cu-red);
    border-color: var(--cu-red);
}

.alert-warning {
    background-color: var(--cu-yellow);
    color: #F57C00;
    border-color: #FFB300;
}

.alert-info {
    background-color: var(--cu-light-blue);
    color: var(--cu-blue);
    border-color: var(--cu-blue);
}

/* =============== Badges - CU Boulder Style =============== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-gold {
    background-color: var(--cu-gold-light);
    color: var(--cu-gold-accessible);
}

.badge-success {
    background-color: var(--cu-light-green);
    color: var(--cu-green);
}

.badge-warning {
    background-color: var(--cu-yellow);
    color: #F57C00;
}

.badge-danger, .badge-error {
    background-color: var(--cu-light-red);
    color: var(--cu-red);
}

.badge-info {
    background-color: var(--cu-light-blue);
    color: var(--cu-blue);
}

.badge-neutral, .badge-gray {
    background-color: var(--cu-light-gray);
    color: var(--cu-dark-gray);
}

/* =============== Tab Navigation - CU Boulder Style =============== */
.tabs-container, .tab-navigation {
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 40;
}

.tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--gray-300) var(--gray-100);
}

.tabs::-webkit-scrollbar {
    height: 6px;
}

.tabs::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 3px;
}

.tabs::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

.tab-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 600;
    color: var(--cu-text-secondary);
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
    min-height: 40px;
    font-family: 'Roboto', sans-serif;
}

.tab-button:hover {
    color: var(--cu-text-primary);
    background-color: var(--cu-gold-light);
}

.tab-button:focus-visible {
    outline: 2px solid var(--gold-accessible);
    outline-offset: -2px;
}

.tab-button[aria-selected="true"],
.tab-button.active {
    color: var(--cu-gold-accessible);
    border-bottom-color: var(--cu-gold);
    background-color: transparent;
    font-weight: 600;
}

.tab-button[aria-selected="true"]::after,
.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 2px;
    background: var(--gold-accessible);
    border-radius: 2px;
}

.tab-icon {
    font-size: 16px;
    transition: color 0.2s;
}

.tab-button[aria-selected="true"] .tab-icon,
.tab-button.active .tab-icon {
    color: var(--gold-accessible);
}

/* Tab icon color variations for different tabs */
.tab-button:nth-child(1).active i { color: var(--gold-accessible); }
.tab-button:nth-child(2).active i { color: var(--info); }
.tab-button:nth-child(3).active i { color: #6b46c1; }
.tab-button:nth-child(4).active i { color: var(--warning); }
.tab-button:nth-child(5).active i { color: var(--success); }
.tab-button:nth-child(6).active i { color: var(--danger); }
.tab-button:nth-child(7).active i { color: #4b5563; }
.tab-button:nth-child(8).active i { color: #be185d; }
.tab-button:nth-child(9).active i { color: #7c3aed; }

/* Tab panels */
.tab-panel, .tab-content {
    padding: 24px;
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    margin-top: 32px; /* Increased from 20px for better spacing */
}

.tab-panel[hidden] {
    display: none;
}

/* Consistent tab content container spacing */
.tab-content-spacing {
    padding-top: 2rem; /* 32px - ensures consistent spacing from tab nav */
}

.tab-panel h3 {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 16px;
    color: var(--text);
}

.tab-panel p {
    color: var(--text-light);
    line-height: 1.6;
}

/* =============== Toggle - Accessible =============== */
.toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.toggle-label {
    font-size: 15px;
    color: var(--text);
    user-select: none;
}

.toggle-wrapper {
    position: relative;
    width: 48px;
    height: 26px;
}

.toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gray-300);
    border-radius: 100px;
    transition: all 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 3px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s;
}

.toggle-input:checked + .toggle-slider {
    background: var(--gold-accessible);
}

.toggle-input:checked + .toggle-slider::before {
    transform: translateX(22px);
}

.toggle-input:focus-visible + .toggle-slider {
    outline: 2px solid var(--gold-accessible);
    outline-offset: 2px;
}

/* =============== Table - Accessible =============== */
.table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table caption {
    position: absolute;
    left: -9999px;
}

.table th {
    text-align: left;
    padding: 14px 18px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text);
    background: var(--gray-100);
    border-bottom: 2px solid var(--gray-300);
}

.table td {
    padding: 14px 18px;
    font-size: 15px;
    border-bottom: 1px solid var(--gray-200);
}

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

.table tr:hover td {
    background: var(--gray-50);
}

.table tr:focus-within {
    outline: 2px solid var(--gold-accessible);
    outline-offset: -2px;
}

/* =============== Time Tracking Specific - CU Boulder Style =============== */
.time-display {
    font-family: 'Roboto Condensed', 'Courier New', monospace;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--cu-gold-accessible);
    letter-spacing: 0.1em;
    text-align: center;
    padding: var(--spacing-md);
    background: var(--cu-gold-light);
    border-radius: var(--radius-lg);
    border: 2px solid var(--cu-gold);
}

.time-tracking-active {
    animation: pulse 2s infinite;
}

.time-tracking-active .time-display {
    border-color: var(--cu-green);
    color: var(--cu-green);
}

/* =============== Workflow Cards - CU Boulder Style =============== */
.workflow-card {
    background: var(--cu-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    border: 1px solid var(--cu-light-gray);
    transition: all 0.3s ease;
}

.workflow-card:hover {
    box-shadow: var(--shadow-gold);
    border-color: var(--cu-gold);
}

/* Priority indicators - left border */
.workflow-card.priority-high {
    border-left: 4px solid var(--cu-red);
    background: linear-gradient(to right, var(--cu-light-red), var(--cu-white));
}

.workflow-card.priority-medium {
    border-left: 4px solid var(--cu-amber);
    background: linear-gradient(to right, var(--cu-yellow), var(--cu-white));
}

.workflow-card.priority-low {
    border-left: 4px solid var(--cu-green);
    background: linear-gradient(to right, var(--cu-light-green), var(--cu-white));
}

.workflow-card.completed {
    opacity: 0.7;
    border-left: 4px solid var(--cu-green);
}

/* =============== Loading States =============== */
.loading-spinner {
    border: 4px solid var(--gray-200);
    border-top: 4px solid var(--cu-gold);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.skeleton, .skeleton-loader {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* =============== Animations =============== */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(8px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
    }
}

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

@keyframes pulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.8;
        transform: scale(1.02);
    }
}

.animate {
    animation: fadeIn 0.5s ease-out;
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Gradient text utilities */
.gradient-text-gold {
    color: var(--gold-accessible);  /* Use accessible gold */
}

.bg-gradient-to-r {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fade-in-up.is-visible, .is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* =============== Status Indicators =============== */
.status-operational {
    background-color: var(--cu-green);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* =============== Certification Cards =============== */
.cert-card {
    transition: all 0.3s ease;
}

.cert-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(207, 184, 124, 0.2);
}

/* =============== Timeline =============== */
.timeline-item {
    position: relative;
    padding-left: 1.5rem;
    border-left: 2px solid var(--cu-gold);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 0.5rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--cu-gold);
}

/* =============== Responsive Grid =============== */
.dashboard-grid {
    display: grid;
    gap: var(--spacing-lg);
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1280px) {
    .dashboard-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* =============== Focus States - CU Boulder Accessibility =============== */
/* Accessible focus styles */
*:focus-visible {
    outline: 2px solid var(--gold-accessible);
    outline-offset: 2px;
}

/* Remove default focus for mouse users */
*:focus:not(:focus-visible) {
    outline: none;
}

.btn:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--cu-gold);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(207, 184, 124, 0.2);
}

.focus\:shadow-cu-gold:focus {
    box-shadow: 0 0 0 3px rgba(207, 184, 124, 0.5);
}

/* =============== Links - CU Boulder style =============== */
a {
    color: var(--cu-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--cu-dark-blue);
    text-decoration: underline;
}

/* =============== Utilities =============== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }

.flex { display: flex; }
.inline-flex { display: inline-flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }

/* CU Boulder specific utility classes */
.text-cu-gold {
    color: var(--cu-gold) !important;
}

.text-cu-gold-accessible {
    color: var(--cu-gold-accessible) !important;
}

.bg-cu-gold {
    background-color: var(--cu-gold) !important;
}

.bg-cu-gold-light {
    background-color: var(--cu-gold-light) !important;
}

/* Section headers */
.section-header {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    color: var(--text);
}

/* Spacing utilities */
.section-spacing {
    padding: 2rem;
}

/* Dashboard card hover effect */
.dashboard-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.bg-cu-light-gray {
    background-color: var(--cu-light-gray) !important;
}

.border-cu-gold {
    border-color: var(--cu-gold) !important;
}

/* Gradient text - CU Boulder style */
.gradient-text-gold {
    background: linear-gradient(135deg, var(--cu-gold) 0%, var(--cu-gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =============== Custom scrollbar - CU Boulder style =============== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--cu-light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--cu-gold);
    border-radius: var(--radius-standard);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--cu-gold-dark);
}

/* =============== Hide Alpine elements until initialized =============== */
[x-cloak] { display: none !important; }

/* =============== Swipe indicators =============== */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

@media (min-width: 640px) {
    .carousel-indicators {
        display: none;
    }
}

.indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e5e7eb;
    transition: background 0.3s;
    cursor: pointer;
}

.indicator-dot.active {
    background: var(--cu-gold);
}

/* =============== Leadership Dashboard Button Styles - Unique color themes =============== */

/* President - Royal Purple Theme */
.leadership-btn-president {
    background: linear-gradient(135deg, #9333EA, #7E22CE);
    color: #FFFFFF;
    border: 2px solid transparent;
    box-shadow: 0 4px 6px rgba(147, 51, 234, 0.3);
}
.leadership-btn-president:hover {
    background: linear-gradient(135deg, #7E22CE, #6B21A8);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(147, 51, 234, 0.4);
}

/* VP Clinical Operations - Emerald Green Theme */
.leadership-btn-vp-clinical {
    background: linear-gradient(135deg, #10B981, #059669);
    color: #FFFFFF;
    border: 2px solid transparent;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
}
.leadership-btn-vp-clinical:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(16, 185, 129, 0.4);
}

/* VP Administration - Rose Pink Theme */
.leadership-btn-vp-admin {
    background: linear-gradient(135deg, #F43F5E, #E11D48);
    color: #FFFFFF;
    border: 2px solid transparent;
    box-shadow: 0 4px 6px rgba(244, 63, 94, 0.3);
}
.leadership-btn-vp-admin:hover {
    background: linear-gradient(135deg, #E11D48, #BE123C);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(244, 63, 94, 0.4);
}

/* VP Community Education - Sky Blue Theme */
.leadership-btn-vp-comm-ed {
    background: linear-gradient(135deg, #0EA5E9, #0284C7);
    color: #FFFFFF;
    border: 2px solid transparent;
    box-shadow: 0 4px 6px rgba(14, 165, 233, 0.3);
}
.leadership-btn-vp-comm-ed:hover {
    background: linear-gradient(135deg, #0284C7, #0369A1);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(14, 165, 233, 0.4);
}

/* VP Internal Training - Amber Orange Theme */
.leadership-btn-vp-training {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: #FFFFFF;
    border: 2px solid transparent;
    box-shadow: 0 4px 6px rgba(245, 158, 11, 0.3);
}
.leadership-btn-vp-training:hover {
    background: linear-gradient(135deg, #D97706, #B45309);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(245, 158, 11, 0.4);
}

/* VP Public Relations - Fuchsia Theme */
.leadership-btn-vp-pr {
    background: linear-gradient(135deg, #EC4899, #DB2777);
    color: #FFFFFF;
    border: 2px solid transparent;
    box-shadow: 0 4px 6px rgba(236, 72, 153, 0.3);
}
.leadership-btn-vp-pr:hover {
    background: linear-gradient(135deg, #DB2777, #BE185D);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(236, 72, 153, 0.4);
}

/* Chief - Navy Blue Theme with Gold Accent */
.leadership-btn-chief {
    background: linear-gradient(135deg, #1E40AF, #1E3A8A);
    color: #FFFFFF;
    border: 2px solid #CFB87C;
    box-shadow: 0 4px 6px rgba(30, 64, 175, 0.3);
}
.leadership-btn-chief:hover {
    background: linear-gradient(135deg, #1E3A8A, #172554);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(30, 64, 175, 0.4);
}

/* Member at Large - Teal Theme */
.leadership-btn-member-large {
    background: linear-gradient(135deg, #14B8A6, #0F766E);
    color: #FFFFFF;
    border: 2px solid transparent;
    box-shadow: 0 4px 6px rgba(20, 184, 166, 0.3);
}
.leadership-btn-member-large:hover {
    background: linear-gradient(135deg, #0F766E, #115E59);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(20, 184, 166, 0.4);
}

/* Advisor - Deep Purple Theme */
.leadership-btn-advisor {
    background: linear-gradient(135deg, #7C3AED, #6D28D9);
    color: #FFFFFF;
    border: 2px solid transparent;
    box-shadow: 0 4px 6px rgba(124, 58, 237, 0.3);
}
.leadership-btn-advisor:hover {
    background: linear-gradient(135deg, #6D28D9, #5B21B6);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(124, 58, 237, 0.4);
}

/* Admin - Gold Theme (CU Boulder) */
.leadership-btn-admin {
    background: linear-gradient(135deg, #CFB87C, #B8A369);
    color: #000000;
    border: 2px solid transparent;
    box-shadow: 0 4px 6px rgba(207, 184, 124, 0.3);
}
.leadership-btn-admin:hover {
    background: linear-gradient(135deg, #B8A369, #A08D58);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(207, 184, 124, 0.4);
}

/* =============== Responsive =============== */
@media (max-width: 1024px) {
    /* Tablet optimizations */
    .tab-button {
        font-size: 14px;
        padding: 8px 12px;
    }
    
    .kpi-card {
        padding: 1rem;
    }
    
    .dashboard-card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    /* Improved mobile typography */
    h1 {
        font-size: 28px;
        line-height: 1.2;
        margin-bottom: 12px;
    }
    
    h2 {
        font-size: 22px;
        margin-bottom: 16px;
    }
    
    h3 {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    /* Better mobile header layout */
    .header, nav {
        padding: 12px 16px;
    }
    
    /* Mobile-optimized navigation */
    .nav-inner {
        gap: 8px;
    }
    
    .nav-links {
        display: none;
    }
    
    /* Improved tab navigation for mobile */
    .tab-navigation {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding: 8px 0;
        margin: 0 -16px;
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .tab-navigation::-webkit-scrollbar {
        display: none;
    }
    
    .tab-button {
        font-size: 13px;
        padding: 10px 12px;
        white-space: nowrap;
        min-width: fit-content;
        flex-shrink: 0;
    }
    
    .tab-button i {
        margin-right: 4px;
        font-size: 14px;
    }
    
    .tab-button span {
        display: inline-block;
    }
    
    /* Better card layout for mobile */
    .kpi-card, .card, .dashboard-card {
        padding: 16px;
        margin-bottom: 12px;
        border-radius: 8px;
    }
    
    .kpi-card::before {
        display: none;
    }
    
    .kpi-card-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    /* Grid adjustments */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    /* Mobile-friendly spacing */
    .section-spacing {
        padding: 16px;
    }
    
    .max-w-7xl {
        padding: 0 16px;
    }
    
    /* Flexible layouts */
    .flex:not(.flex-row) {
        flex-direction: column;
        gap: 12px;
    }
    
    .grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    /* Touch-friendly interactive elements */
    button, 
    .btn-gold, 
    .btn-primary, 
    .btn-secondary,
    .btn-outline,
    a.btn {
        min-height: 44px;
        font-size: 15px;
        padding: 12px 16px;
        width: 100%;
        justify-content: center;
    }
    
    /* Better table handling */
    .table-wrapper {
        margin: 0 -16px;
        border-radius: 0;
        border-left: none;
        border-right: none;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        font-size: 14px;
    }
    
    /* Mobile banner removed - responsive design now handles all screen sizes */
    
    /* Content spacing from fixed elements */
    .dashboard-content {
        padding-top: 16px;
    }
    
    /* Hide desktop-only elements */
    .desktop-only {
        display: none !important;
    }
    
    /* Show mobile-only elements */
    .mobile-only {
        display: block !important;
    }
}

@media (max-width: 640px) {
    /* Extra small screen optimizations */
    .section-spacing {
        padding: 12px;
    }
    
    /* Compact typography for small screens */
    .font-heading {
        font-size: 1.25rem;
        line-height: 1.3;
    }
    
    h1 {
        font-size: 24px;
        margin-bottom: 8px;
    }
    
    h2 {
        font-size: 20px;
        margin-bottom: 12px;
    }
    
    h3 {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    p {
        font-size: 14px;
        line-height: 1.5;
    }
    
    /* Minimal padding on small screens */
    .container,
    .max-w-7xl {
        padding: 0 12px;
    }
    
    /* Compact cards */
    .kpi-card, .card, .dashboard-card {
        padding: 12px;
        margin-bottom: 8px;
    }
    
    /* Smaller buttons on very small screens */
    button, 
    .btn-gold, 
    .btn-primary, 
    .btn-secondary,
    .btn-outline,
    a.btn {
        font-size: 14px;
        padding: 10px 12px;
        min-height: 40px;
    }
    
    /* Compact tab navigation */
    .tab-navigation {
        padding: 6px 0;
        margin: 0 -12px;
        padding-left: 12px;
        padding-right: 12px;
    }
    
    .tab-button {
        font-size: 12px;
        padding: 8px 10px;
    }
    
    .tab-button i {
        font-size: 12px;
        margin-right: 2px;
    }
    
    /* Hide non-essential icons on very small screens */
    .tab-button i.optional-icon {
        display: none;
    }
    
    /* Compact header */
    .header, nav {
        padding: 10px 12px;
    }
    
    /* Ensure content doesn't get cut off */
    body {
        padding-bottom: 80px; /* Space for fixed bottom elements */
    }
    
    /* Mobile banner removed - responsive design now handles all screen sizes */
}

/* Mobile switch banner removed - responsive design handles all screen sizes */

/* Mobile-specific utility classes */
@media (max-width: 768px) {
    /* Flexbox utilities for mobile */
    .mobile\:flex-col {
        flex-direction: column !important;
    }
    
    .mobile\:flex-row {
        flex-direction: row !important;
    }
    
    .mobile\:gap-2 {
        gap: 8px !important;
    }
    
    .mobile\:gap-3 {
        gap: 12px !important;
    }
    
    .mobile\:gap-4 {
        gap: 16px !important;
    }
    
    /* Spacing utilities for mobile */
    .mobile\:p-2 {
        padding: 8px !important;
    }
    
    .mobile\:p-3 {
        padding: 12px !important;
    }
    
    .mobile\:p-4 {
        padding: 16px !important;
    }
    
    .mobile\:px-3 {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    
    .mobile\:py-2 {
        padding-top: 8px !important;
        padding-bottom: 8px !important;
    }
    
    /* Width utilities for mobile */
    .mobile\:w-full {
        width: 100% !important;
    }
    
    /* Text utilities for mobile */
    .mobile\:text-sm {
        font-size: 14px !important;
    }
    
    .mobile\:text-base {
        font-size: 16px !important;
    }
    
    .mobile\:text-center {
        text-align: center !important;
    }
    
    /* Display utilities for mobile */
    .mobile\:hidden {
        display: none !important;
    }
    
    .mobile\:block {
        display: block !important;
    }
    
    .mobile\:inline-block {
        display: inline-block !important;
    }
    
    /* Overflow handling */
    .mobile\:overflow-x-auto {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    
    .mobile\:overflow-y-auto {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }
}

/* =============== Spreadsheet Components =============== */
.spreadsheet-container {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    gap: 1rem;
}

.search-input, .filter-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.search-input:focus, .filter-select:focus {
    outline: none;
    border-color: var(--cu-gold);
    box-shadow: 0 0 0 3px rgba(207, 184, 124, 0.1);
}

.spreadsheet-table {
    width: 100%;
    border-collapse: collapse;
}

.spreadsheet-table th {
    background-color: #f9fafb;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--cu-text-primary);
    border-bottom: 1px solid #e5e7eb;
}

.spreadsheet-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.875rem;
}

.sort-icon {
    margin-left: 0.5rem;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.sort-icon.active {
    opacity: 1;
    color: var(--cu-gold);
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-good {
    background-color: #dcfce7;
    color: #166534;
}

.status-needs-service {
    background-color: #fef3c7;
    color: #92400e;
}

.status-out-of-service {
    background-color: #fee2e2;
    color: #991b1b;
}

/* =============== High Contrast Mode =============== */
@media (prefers-contrast: high) {
    :root {
        --gray-300: #000;
        --gray-400: #000;
    }
    
    .btn,
    .card,
    .input,
    .table-wrapper {
        border-width: 2px;
    }
}

/* =============== Print Styles =============== */
@media print {
    .nav, .btn, .toggle, .tabs-container, .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .card, .dashboard-section {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
/* =============== Mobile Responsive Styles =============== */
/* Properly scoped to avoid breaking header and navigation */

@media (max-width: 768px) {
    /* Dashboard content specific - does not affect header */
    .dashboard-content .flex {
        flex-direction: column;
    }
    
    .dashboard-content .grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-content .space-x-4 > * {
        margin-left: 0;
        margin-bottom: 1rem;
    }
    
    /* Touch-friendly buttons globally */
    button, .btn-gold, .btn-primary, .btn-secondary {
        min-height: 44px;
        font-size: 16px;
    }
    
    /* Responsive text sizing */
    .dashboard-content .text-3xl {
        font-size: 1.5rem;
    }
    
    .dashboard-content .text-2xl {
        font-size: 1.25rem;
    }
    
    /* Responsive padding */
    .dashboard-content .px-6 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Hide desktop-only elements */
    .desktop-only {
        display: none \!important;
    }
    
    /* Show mobile-only elements */
    .mobile-only {
        display: block \!important;
    }
    
    /* Prevent iOS text size adjustment */
    html {
        -webkit-text-size-adjust: 100%;
    }
    
    /* Ensure header stays fixed and on top */
    header[data-js-sticky-header] {
        z-index: 50;
    }
    
    /* Mobile menu positioning */
    .mobile-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 50;
    }
    
    /* Adjust main content padding when banner is present */
    .has-mobile-banner main {
        padding-top: calc(56px + 44px); /* Account for header + banner */
    }
    
    /* ===== AED Unified Inspection Mobile Styles ===== */
    
    /* AED ID Card - make it more compact on mobile */
    .bg-green-50 {
        padding: 1rem !important;
        margin: 0.75rem !important;
    }
    
    /* AED ID text - reduce size for mobile */
    .text-4xl {
        font-size: 1.875rem !important;
        line-height: 2.25rem !important;
    }
    
    /* Campus selection buttons - stack vertically on mobile */
    .grid.md\:grid-cols-2 {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }
    
    /* Building selection buttons - improve touch targets */
    .hover\:border-gray-300,
    .border-gray-200 {
        min-height: 60px;
        padding: 1rem 0.75rem !important;
    }
    
    /* Search input - optimize for mobile */
    input[type="search"],
    input[type="text"].rounded-lg {
        font-size: 16px !important; /* Prevent zoom on iOS */
        padding: 0.75rem !important;
    }
    
    /* Campus filter buttons - better mobile layout */
    .bg-blue-50,
    .bg-white.border {
        padding: 0.75rem 1rem !important;
        font-size: 0.875rem !important;
    }
    
    /* Building list items - better spacing and touch targets */
    .hover\:bg-gray-50 {
        padding: 1rem 0.75rem !important;
        min-height: 70px;
    }
    
    /* Reduce icon sizes on mobile */
    .w-16.h-16 {
        width: 3rem !important;
        height: 3rem !important;
    }
    
    /* Adjust text sizes in building cards */
    .text-base {
        font-size: 0.875rem !important;
    }
    
    .text-sm {
        font-size: 0.75rem !important;
    }
    
    /* Progress indicator - compact for mobile */
    .w-8.h-8 {
        width: 2rem !important;
        height: 2rem !important;
    }
    
    /* Sticky header adjustments */
    .sticky.top-0 {
        position: fixed !important;
        width: 100% !important;
    }
    
    /* Main content padding adjustment for fixed header */
    .min-h-screen > .sticky + div {
        padding-top: 4rem !important;
    }
    
    /* Form container padding */
    .max-w-4xl {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    
    /* Card shadow reduction for performance */
    .shadow-sm {
        box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
    }
    
    /* Button group spacing */
    .space-x-4 > button {
        margin-right: 0.5rem !important;
    }
    
    /* Modal and overlay adjustments */
    .fixed.inset-0 {
        padding: 1rem !important;
    }
    
    /* Loading states - center properly */
    .animate-pulse {
        margin: 0 auto;
    }
}

@media (max-width: 640px) {
    /* Further mobile optimizations for small screens */
    .dashboard-content .section-spacing {
        padding: 0.75rem;
    }
    
    .dashboard-content h1 {
        font-size: 1.75rem;
    }
    
    .dashboard-content h2 {
        font-size: 1.5rem;
    }
    
    .dashboard-content .max-w-7xl {
        padding: 0 0.5rem;
    }
    
    /* ===== AED Unified Inspection - Small Mobile Screens ===== */
    
    /* Even more compact AED ID card */
    .bg-green-50 {
        padding: 0.75rem !important;
        margin: 0.5rem !important;
        border-radius: 0.5rem !important;
    }
    
    /* Further reduce AED ID text */
    .text-4xl {
        font-size: 1.5rem !important;
        line-height: 2rem !important;
    }
    
    /* Compact header bar */
    .h-16 {
        height: 3.5rem !important;
    }
    
    /* Smaller heading text */
    .text-xl {
        font-size: 1.125rem !important;
    }
    
    /* Very compact buttons */
    button.rounded-lg {
        padding: 0.625rem !important;
        font-size: 0.875rem !important;
    }
    
    /* Icon buttons - reduce size */
    .w-16.h-16 {
        width: 2.5rem !important;
        height: 2.5rem !important;
    }
    
    /* Icon text adjustments */
    .text-2xl {
        font-size: 1.25rem !important;
    }
    
    /* Search bar - full width and accessible */
    input[type="search"] {
        width: 100% !important;
        font-size: 16px !important; /* Prevents iOS zoom */
        padding: 0.625rem !important;
    }
    
    /* Building cards - ultra compact */
    .p-6 {
        padding: 0.75rem !important;
    }
    
    .p-4 {
        padding: 0.5rem !important;
    }
    
    /* Progress steps - hide on very small screens */
    .hidden.sm\:flex {
        display: none !important;
    }
    
    /* Show only mobile progress text */
    .sm\:hidden {
        display: block !important;
        font-size: 0.75rem !important;
    }
    
    /* Campus button text - smaller */
    h3.text-base {
        font-size: 0.875rem !important;
    }
    
    p.text-sm {
        font-size: 0.75rem !important;
        line-height: 1rem !important;
    }
    
    /* Building list - more compact */
    .space-y-2 > * {
        margin-bottom: 0.25rem !important;
    }
    
    /* Reduce all margins on small screens */
    .mb-6 {
        margin-bottom: 1rem !important;
    }
    
    .mb-4 {
        margin-bottom: 0.75rem !important;
    }
    
    .mt-2 {
        margin-top: 0.5rem !important;
    }
    
    /* Compact form spacing */
    .space-y-6 > * {
        margin-bottom: 1rem !important;
    }
    
    /* Main container padding */
    .py-6 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
    
    /* Ensure proper scrolling */
    .overflow-y-auto {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
}

/* Mobile-first utility classes */
.mobile-stack {
    display: flex;
    flex-direction: column;
}

/* AED Inspection Mobile-Specific Classes */
.aed-mobile-card {
    background: linear-gradient(135deg, #dcfce7 0%, #f0fdf4 100%);
    border: 2px solid #86efac;
    border-radius: 0.75rem;
    padding: 1rem;
    margin: 0.75rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.aed-mobile-id {
    font-size: 1.5rem;
    font-weight: bold;
    color: #166534;
    text-align: center;
    margin-bottom: 0.5rem;
}

.aed-mobile-button {
    width: 100%;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-radius: 0.5rem;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.aed-mobile-button:active {
    transform: scale(0.98);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.aed-building-item {
    display: flex;
    align-items: center;
    padding: 0.875rem;
    margin-bottom: 0.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    min-height: 60px;
    transition: all 0.15s ease;
}

.aed-building-item:active {
    background: #f9fafb;
    border-color: var(--cu-gold);
}

/* Mobile-optimized search */
.aed-mobile-search {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    font-size: 16px; /* Prevents iOS zoom */
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    background: white;
}

.aed-mobile-search:focus {
    outline: none;
    border-color: var(--cu-gold);
    box-shadow: 0 0 0 3px rgba(207, 184, 124, 0.1);
}

/* Mobile progress indicator */
.aed-mobile-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: #f9fafb;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: #6b7280;
}

/* Responsive visibility helpers */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
    
    .show-mobile {
        display: block !important;
    }
    
    .flex-mobile {
        display: flex !important;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
    
    .aed-mobile-card {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .aed-mobile-id {
        font-size: 2.25rem;
    }
}

@media (min-width: 768px) {
    .mobile-stack {
        flex-direction: row;
    }
}

/* Prevent header wrapping on mobile */
@media (max-width: 768px) {
    header .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    /* Ensure header elements don't wrap */
    header .flex {
        flex-wrap: nowrap;
    }
}

/* =============== Mobile Header Optimizations =============== */
@media (max-width: 640px) {
    /* Remove duplicate body padding - main handles header offset */
    body {
        padding-top: 0 !important;
    }
    
    /* Main content padding handled by responsive classes in template */
    main {
        margin-top: 0 !important;
    }
    
    /* Hide large desktop headers on mobile */
    .desktop-header {
        display: none !important;
    }
}

/* =============== AED Inspection Form Mobile Optimizations =============== */
@media (max-width: 640px) {
    /* Compact header for mobile inspection form */
    .aed-inspection-header {
        padding: 0.5rem 0.75rem;
        min-height: auto;
    }
    
    .aed-inspection-header h1 {
        font-size: 1rem;
        font-weight: 600;
        line-height: 1.2;
    }
    
    /* Slim progress bar for mobile */
    .aed-inspection-progress {
        height: 0.25rem;
        margin-top: 0.25rem;
        background: var(--cu-light-gray);
        border-radius: var(--radius-full);
        overflow: hidden;
    }
    
    .aed-inspection-progress-bar {
        height: 100%;
        background: var(--cu-green);
        transition: width 0.3s ease;
    }
    
    /* Compact step indicator */
    .aed-inspection-steps {
        font-size: 0.75rem;
        padding: 0.125rem 0.5rem;
        background: var(--cu-light-gray);
        border-radius: var(--radius-full);
        display: inline-block;
    }
    
    /* Reduce form padding on mobile */
    .aed-inspection-form {
        padding: 0.75rem;
    }
    
    .aed-inspection-form .form-section {
        padding: 1rem;
        margin-bottom: 0.75rem;
        border-radius: var(--radius-md);
    }
    
    /* Stack form fields on mobile */
    .aed-inspection-form .grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem;
    }
    
    /* Compact form labels and inputs */
    .aed-inspection-form label {
        font-size: 0.875rem;
        margin-bottom: 0.25rem;
    }
    
    .aed-inspection-form input,
    .aed-inspection-form select,
    .aed-inspection-form textarea {
        font-size: 1rem; /* Keep readable size for inputs */
        padding: 0.5rem;
    }
    
    /* Compact buttons on mobile */
    .aed-inspection-nav {
        padding: 0.75rem;
        position: sticky;
        bottom: 0;
        background: white;
        border-top: 1px solid var(--cu-light-gray);
        z-index: 30;
        margin-left: -0.75rem;
        margin-right: -0.75rem;
        margin-bottom: -0.75rem;
    }
    
    .aed-inspection-nav button {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    /* Make selection cards more compact */
    .aed-selection-card {
        padding: 1rem;
    }
    
    .aed-selection-card .icon-wrapper {
        width: 3rem;
        height: 3rem;
        margin-bottom: 0.5rem;
    }
    
    .aed-selection-card h3 {
        font-size: 0.875rem;
        margin-bottom: 0.25rem;
    }
    
    .aed-selection-card p {
        font-size: 0.75rem;
        line-height: 1.2;
    }
    
    /* Optimize building list for mobile */
    .building-list-mobile {
        max-height: 60vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Compact checklist items */
    .inspection-checklist {
        background: var(--cu-light-gray);
        padding: 0.75rem;
        border-radius: var(--radius-md);
    }
    
    .inspection-checklist label {
        padding: 0.5rem;
        font-size: 0.875rem;
        display: flex;
        align-items: center;
    }
    
    .inspection-checklist input[type="checkbox"] {
        margin-right: 0.5rem;
    }
    
    /* Optimize photo upload areas */
    .photo-upload-area {
        padding: 0.75rem;
        min-height: auto;
        border: 2px dashed var(--cu-light-gray);
        border-radius: var(--radius-md);
    }
    
    .photo-upload-area label {
        font-size: 0.875rem;
    }
    
    /* Compact notification banners */
    .aed-notification {
        padding: 0.75rem;
        font-size: 0.875rem;
        margin-bottom: 0.75rem;
    }
    
    .aed-notification .icon {
        font-size: 1.25rem;
        margin-right: 0.5rem;
    }
    
    /* Optimize modal for mobile */
    .aed-modal-content {
        margin: 1rem;
        padding: 1rem;
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* =============== Dashboard Page Header =============== */
.dashboard-page-header {
    background: var(--cu-white);
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    padding: 1rem;
    border: 1px solid #e5e7eb;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .dashboard-page-header {
        padding: 1.5rem;
    }
}

.dashboard-page-title {
    font-family: 'Roboto Condensed', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    font-weight: 700;
    color: var(--cu-text-primary);
    display: flex;
    align-items: center;
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.dashboard-page-title-icon {
    margin-right: 0.75rem;
    color: var(--cu-gold);
}

@media (min-width: 640px) {
    .dashboard-page-title {
        font-size: 2.25rem;
        line-height: 2.5rem;
    }
    
    .dashboard-page-title-icon {
        margin-right: 1rem;
    }
}

@media (min-width: 768px) {
    .dashboard-page-title {
        font-size: 3rem;
        line-height: 1;
    }
}

.dashboard-page-subtitle {
    color: var(--cu-text-secondary);
    margin-top: 0.5rem;
    font-size: 1.125rem;
    line-height: 1.75rem;
}

@media (min-width: 640px) {
    .dashboard-page-subtitle {
        font-size: 1.25rem;
        line-height: 1.75rem;
    }
}

/* =============== Dashboard Tab Navigation Container =============== */
.dashboard-tabs-container {
    background: var(--cu-white);
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    padding: 1rem;
    border: 1px solid #e5e7eb;
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

@media (min-width: 640px) {
    .dashboard-tabs-container {
        padding: 1rem 1.5rem;
    }
}

.dashboard-tabs-wrapper {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .dashboard-tabs-wrapper {
        gap: 0.25rem;
    }
}

/* =============== Multiselect Mode Styles for AED Planning Map =============== */
.multiselect-active .leaflet-container {
    cursor: crosshair !important;
}

.building-marker.selected {
    stroke-width: 4 !important;
    stroke: #7c3aed !important;
    filter: drop-shadow(0 0 4px rgba(124, 58, 237, 0.5));
}

/* Multiselect action bar styles */
.multiselect-actions-bar {
    animation: slide-up 0.3s ease-out;
}

@keyframes slide-up {
    from {
        transform: translate(-50%, 100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* Edit GPS marker animation */
@keyframes pulse-edit {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 15px rgba(255,0,0,0.8);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 25px rgba(255,0,0,1);
    }
}
EOF < /dev/null