/**
 * Staff Interface Components CSS
 *
 * Unified styling for staff interface components:
 * - Header with logo, title, clock, actions
 * - Navigation tabs
 * - Filter bars
 * - Stats/metrics cards
 *
 * Uses the ENNU luxury design system (gold/navy theme).
 * Imports design tokens from design-tokens.css
 *
 * @package ENNU\Infrastructure
 * @since 3.1.0
 * 
 * WCAG 2.1 AA Compliant
 * iOS/Android Touch Target Compliant (44px minimum)
 */

/* ==========================================================================
   STAFF-SPECIFIC TOKENS (extend design-tokens.css)
   ========================================================================== */
:root {
    /* Staff Header */
    --staff-header-bg: var(--ennu-white, #FFFFFF);
    --staff-header-height: auto;
    --staff-header-height-compact: auto;
    --staff-clock-bg: var(--ennu-gray-50, #F9FAFB);
    --staff-divider-color: var(--ennu-gray-300, #D1D5DB);
}

/* ==========================================================================
   STAFF HEADER
   ========================================================================== */
.ennu-staff-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 16px;
    background: var(--staff-header-bg, #FFFFFF) !important;
    color: var(--ennu-navy, #1A2744);
    min-height: auto;
    border-bottom: 1px solid var(--ennu-gray-200, #E5E7EB);
    box-shadow: none;
}

.ennu-staff-header--compact {
    min-height: var(--staff-header-height-compact);
    padding: 12px 20px;
}

.ennu-staff-header--admin {
    border-radius: 8px;
    margin-bottom: 20px;
}

.ennu-staff-header--full-width {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    margin-top: 0; /* Keep header below navigation */
    padding-left: 24px;
    padding-right: 24px;
    box-sizing: border-box;
}

/* Brand section */
.ennu-staff-header__brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ennu-staff-header__logo {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.ennu-staff-header--compact .ennu-staff-header__logo {
    height: 36px;
}

.ennu-staff-header__text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ennu-staff-header__title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: #1A2744;
    line-height: 1.2;
}

.ennu-staff-header--compact .ennu-staff-header__title {
    font-size: 1.25rem;
}

.ennu-staff-header__subtitle {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-size: 0.875rem;
    color: #5D6D7E;
}

.ennu-staff-header__subtitle-text {
    color: var(--ennu-primary-light, #d4a849);
}

/* Controls section */
.ennu-staff-header__controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Clock - UNIFIED DESIGN FOR ALL STAFF INTERFACES */
.ennu-staff-header__clock,
.ennu-clock {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 16px;
    background: var(--ennu-gray-50, #F9FAFB);
    border-radius: 9999px;
    border: none;
}

.ennu-staff-header__time,
.ennu-time {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--ennu-navy, #1A2744);
}

.ennu-staff-header__clock-divider,
.ennu-clock-divider {
    width: 1px;
    height: 20px;
    background: var(--ennu-gray-300, #D1D5DB);
}

.ennu-staff-header__date,
.ennu-date {
    font-size: 0.875rem;
    color: var(--ennu-gray-500, #6B7280);
}

.ennu-staff-header__tz {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--ennu-gold, #C9A962);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Actions */
.ennu-staff-header__actions {
    display: flex;
    gap: 8px;
}

/* Status indicator */
.ennu-staff-header__status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ennu-staff-header__status--healthy {
    background: rgba(5, 150, 105, 0.2);
    color: #10b981;
}

.ennu-staff-header__status--warning {
    background: rgba(217, 119, 6, 0.2);
    color: #f59e0b;
}

.ennu-staff-header__status--error {
    background: rgba(220, 38, 38, 0.2);
    color: #ef4444;
}

.ennu-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

/* Version badge */
.ennu-staff-header__version {
    font-size: 0.6875rem;
    color: #5D6D7E;
    padding: 2px 8px;
    background: rgba(26, 39, 68, 0.08);
    border-radius: 10px;
}

/* ==========================================================================
   DIVISION BADGE
   ========================================================================== */
.ennu-division-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ennu-division-badge--aesthetic {
    background: rgba(201, 169, 98, 0.2);
    color: var(--ennu-primary, #C9A962);
}

.ennu-division-badge--medical {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.ennu-division-badge--both {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
}

.ennu-division-badge__icon {
    font-size: 0.875rem;
}

/* ==========================================================================
   STAFF NAVIGATION
   ========================================================================== */
.ennu-staff-nav {
    display: flex;
    gap: 8px;
    padding: 16px 24px;
    background: #FFFFFF;
    border-bottom: 1px solid #E5E7EB;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.ennu-staff-nav::-webkit-scrollbar {
    display: none;
}

.ennu-staff-nav--admin {
    background: transparent;
    border-bottom: 1px solid var(--ennu-neutral-200, #e5e5e5);
    padding: 0;
    gap: 0;
}

.ennu-staff-nav__tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 9999px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #4B5563;
    background: transparent;
    border: none;
    text-decoration: none;
    white-space: nowrap;
    transition: all 150ms ease;
    cursor: pointer;
}

.ennu-staff-nav--admin .ennu-staff-nav__tab {
    border-radius: 0;
    border-bottom: 2px solid transparent;
    padding: 12px 16px;
}

.ennu-staff-nav__tab:hover {
    background: #F3F4F6;
    color: #1F2937;
}

.ennu-staff-nav--admin .ennu-staff-nav__tab:hover {
    background: transparent;
    border-bottom-color: #D1D5DB;
}

.ennu-staff-nav__tab--active {
    background: #1A2744 !important;
    color: #FFFFFF !important;
}

.ennu-staff-nav--admin .ennu-staff-nav__tab--active {
    background: transparent;
    color: var(--ennu-primary, #C9A962);
    border-bottom-color: var(--ennu-primary, #C9A962);
}

/* Pills style */
.ennu-staff-nav--pills .ennu-staff-nav__tab--active {
    background: var(--ennu-primary, #C9A962);
    color: var(--ennu-neutral-900, #171717);
}

/* Underline style */
.ennu-staff-nav--underline {
    border-bottom: 1px solid var(--ennu-neutral-200, #e5e5e5);
    padding-bottom: 0;
}

.ennu-staff-nav--underline .ennu-staff-nav__tab {
    border-radius: 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.ennu-staff-nav--underline .ennu-staff-nav__tab--active {
    background: transparent;
    color: var(--ennu-primary, #C9A962);
    border-bottom-color: var(--ennu-primary, #C9A962);
}

.ennu-staff-nav__icon {
    font-size: 1rem;
    opacity: 0.7;
}

.ennu-staff-nav__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    font-size: 0.6875rem;
    font-weight: 700;
    background: var(--ennu-primary, #C9A962);
    color: var(--ennu-neutral-900, #171717);
}

/* ==========================================================================
   STAFF FILTERS
   ========================================================================== */
.ennu-staff-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(180deg, #F9FAFB 0%, #FFFFFF 100%);
    border-bottom: 1px solid #E5E7EB;
}

.ennu-staff-filters--admin {
    background: var(--ennu-neutral-100, #f5f5f5);
    border-radius: 8px;
    border: 1px solid var(--ennu-neutral-200, #e5e5e5);
    margin-bottom: 20px;
}

.ennu-staff-filters__group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ennu-staff-filters__label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ennu-gray-500, #6B7280);
    margin-right: 4px;
    min-width: 70px;
    flex-shrink: 0;
}

.ennu-staff-filters__label .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

.ennu-staff-filters__buttons {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ennu-staff-filters__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid #D1D5DB;
    border-radius: 9999px;
    background: #FFFFFF;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #4B5563;
    white-space: nowrap;
    cursor: pointer;
    transition: all 150ms ease;
}

.ennu-staff-filters__btn:hover {
    border-color: #C9A962;
    color: #A68B4B;
    background: #E5D4A1;
}

.ennu-staff-filters__btn:hover .dashicons {
    color: #C9A962;
}

.ennu-staff-filters__btn--active,
.ennu-location-btn.active {
    background: linear-gradient(135deg, #C9A962 0%, #A68B4B 100%) !important;
    border-color: #A68B4B !important;
    color: #FFFFFF !important;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.ennu-staff-filters__btn--active .dashicons,
.ennu-location-btn.active .dashicons {
    color: #FFFFFF !important;
}

.ennu-staff-filters__btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    transition: color 150ms ease;
}

/* ==========================================================================
   LOCATION FILTER - UNIFIED FOR ALL STAFF INTERFACES
   ========================================================================== */
.ennu-location-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(180deg, #F9FAFB 0%, #FFFFFF 100%);
    border-bottom: 1px solid #E5E7EB;
}

.ennu-location-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #4B5563;
    background: #FFFFFF;
    border: 1px solid #D1D5DB;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 150ms ease;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.ennu-location-btn .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    opacity: 0.7;
    transition: all 150ms ease;
}

.ennu-location-btn:hover {
    border-color: #C9A962;
    color: #A68B4B;
    background: #E5D4A1;
}

.ennu-location-btn:hover .dashicons {
    color: #C9A962;
    opacity: 1;
}

/* ==========================================================================
   TABS - UNIFIED FOR ALL STAFF INTERFACES
   ========================================================================== */
.ennu-tabs {
    display: flex;
    gap: 4px;
    padding: 12px 24px;
    background: #FFFFFF;
    border-bottom: 1px solid #E5E7EB;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.ennu-tabs::-webkit-scrollbar {
    display: none;
}

.ennu-tab {
    padding: 10px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4B5563;
    background: transparent;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 150ms ease;
    white-space: nowrap;
}

.ennu-tab:hover {
    background: #F3F4F6;
    color: #1F2937;
}

.ennu-tab.active {
    background: #1A2744 !important;
    color: #FFFFFF !important;
}

.ennu-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    margin-left: 6px;
    background: #E5E7EB;
    color: #4B5563;
    border-radius: 9px;
    font-size: 0.6875rem;
    font-weight: 600;
}

.ennu-tab.active .ennu-tab-count {
    background: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
}

/* ==========================================================================
   HEADER TITLE - UNIFIED FOR ALL STAFF INTERFACES
   ========================================================================== */
.ennu-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1A2744;
    margin: 0;
}

/* ==========================================================================
   HEADER LAYOUT - UNIFIED FOR ALL STAFF INTERFACES
   ========================================================================== */
.ennu-checkin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 16px;
    background: #FFFFFF !important;
    border-bottom: 1px solid #E5E7EB !important;
    box-shadow: none;
}

.ennu-checkin-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    max-width: 100%;
    width: 100%;
    margin: 0;
    gap: 16px;
}

.ennu-checkin-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==========================================================================
   ACTION BUTTONS - UNIFIED GOLD STYLE FOR ALL STAFF INTERFACES
   ========================================================================== */
.ennu-staff-header__actions .ennu-btn-secondary,
.ennu-staff-header__actions .ennu-btn-primary,
.ennu-checkin-header-actions .ennu-btn-secondary,
.ennu-checkin-header-actions .ennu-btn-primary {
    background: linear-gradient(135deg, #C9A962 0%, #B8963A 100%);
    color: #FFFFFF;
    border: none;
    box-shadow: 0 2px 8px rgba(201, 169, 98, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 150ms ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ennu-staff-header__actions .ennu-btn-secondary:hover,
.ennu-staff-header__actions .ennu-btn-primary:hover,
.ennu-checkin-header-actions .ennu-btn-secondary:hover,
.ennu-checkin-header-actions .ennu-btn-primary:hover {
    background: linear-gradient(135deg, #D4B46A 0%, #C9A962 100%);
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(201, 169, 98, 0.4);
}

/* ==========================================================================
   PROVIDER FILTER (Blue variant for provider selection)
   ========================================================================== */
.ennu-provider-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(180deg, #EFF6FF 0%, #FFFFFF 100%);
    border-bottom: 1px solid #BFDBFE;
}

.ennu-provider-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #1E40AF;
    background: #FFFFFF;
    border: 1px solid #93C5FD;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 150ms ease;
    white-space: nowrap;
}

.ennu-provider-btn:hover {
    border-color: #3B82F6;
    color: #1D4ED8;
    background: rgba(59, 130, 246, 0.1);
}

.ennu-provider-btn.active {
    background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
    border-color: #1D4ED8;
    color: #FFFFFF !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.ennu-provider-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Search */
.ennu-staff-filters__search {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

.ennu-staff-filters__search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: var(--ennu-neutral-400, #a3a3a3);
    pointer-events: none;
}

.ennu-staff-filters__search-input {
    width: 100%;
    padding-left: 36px;
}

/* Date range */
.ennu-staff-filters__date-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ennu-staff-filters__date {
    width: 140px;
}

.ennu-staff-filters__date-separator {
    color: var(--ennu-neutral-500, #737373);
    font-size: 0.8125rem;
}

/* Reset button */
.ennu-staff-filters__reset {
    margin-left: auto;
}

/* ==========================================================================
   STAFF STATS
   ========================================================================== */
.ennu-staff-stats {
    display: grid;
    gap: 16px;
    padding: 20px 24px;
    color: #1A2744; /* Ensure dark text for all stats */
}

.ennu-staff-stats--cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.ennu-staff-stats--cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.ennu-staff-stats--cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.ennu-staff-stats--admin {
    padding: 0;
    margin-bottom: 24px;
}

.ennu-staff-stats--small .ennu-staff-stat {
    padding: 12px 16px;
}

.ennu-staff-stats--large .ennu-staff-stat {
    padding: 24px 28px;
}

.ennu-staff-stat {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--ennu-neutral-50, #fafafa);
    border: 1px solid var(--ennu-neutral-200, #e5e5e5);
    border-left: 4px solid var(--ennu-primary, #C9A962);
    border-radius: 8px;
    transition: all 150ms ease;
}

.ennu-staff-stats--clickable .ennu-staff-stat {
    cursor: pointer;
    text-decoration: none;
}

.ennu-staff-stats--clickable .ennu-staff-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(26, 39, 68, 0.12);
}

/* Stat colors */
.ennu-staff-stat--primary {
    border-left-color: var(--ennu-primary, #C9A962);
}

.ennu-staff-stat--success {
    border-left-color: var(--ennu-success, #059669);
}

.ennu-staff-stat--success .ennu-staff-stat__value {
    color: var(--ennu-success, #059669);
}

.ennu-staff-stat--warning {
    border-left-color: var(--ennu-warning, #d97706);
}

.ennu-staff-stat--warning .ennu-staff-stat__value {
    color: var(--ennu-warning, #d97706);
}

.ennu-staff-stat--error {
    border-left-color: var(--ennu-error, #dc2626);
}

.ennu-staff-stat--error .ennu-staff-stat__value {
    color: var(--ennu-error, #dc2626);
}

.ennu-staff-stat--info {
    border-left-color: #3b82f6;
}

.ennu-staff-stat--info .ennu-staff-stat__value {
    color: #3b82f6;
}

/* Stat icon */
.ennu-staff-stat__icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* Stat content */
.ennu-staff-stat__content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.ennu-staff-stat__value {
    font-family: var(--font-display, "Playfair Display", Georgia, serif);
    font-size: 2rem;
    font-weight: 700;
    color: var(--ennu-neutral-800, #262626);
    line-height: 1;
}

.ennu-staff-stats--small .ennu-staff-stat__value {
    font-size: 1.5rem;
}

.ennu-staff-stats--large .ennu-staff-stat__value {
    font-size: 2.5rem;
}

.ennu-staff-stat__label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ennu-neutral-500, #737373);
}

/* Trend indicator */
.ennu-staff-stat__trend {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 0.75rem;
    font-weight: 600;
}

.ennu-staff-stat__trend--up {
    color: var(--ennu-success, #059669);
}

.ennu-staff-stat__trend--down {
    color: var(--ennu-error, #dc2626);
}

.ennu-staff-stat__trend .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
    .ennu-staff-stats--cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .ennu-staff-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
        padding: 16px;
    }

    .ennu-staff-header__brand {
        flex-direction: column;
    }

    .ennu-staff-header__controls {
        flex-wrap: wrap;
        justify-content: center;
    }

    .ennu-staff-header__clock {
        order: -1;
    }

    .ennu-staff-stats--cols-4,
    .ennu-staff-stats--cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .ennu-staff-filters {
        padding: 12px 16px;
    }

    .ennu-staff-filters__search {
        min-width: 100%;
        order: -1;
    }
}

@media (max-width: 480px) {
    .ennu-staff-stats--cols-4,
    .ennu-staff-stats--cols-3,
    .ennu-staff-stats--cols-2 {
        grid-template-columns: 1fr;
    }

    .ennu-staff-stat__value {
        font-size: 1.75rem;
    }
}

/* ==========================================================================
   LEGACY CLASS ALIASES (backward compatibility)
   ========================================================================== */
.ennu-admin-header { /* Alias for ennu-staff-header--admin */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--staff-header-bg);
    color: #1A2744;
    min-height: var(--staff-header-height);
    border-bottom: 3px solid var(--ennu-primary, #C9A962);
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ennu-queue-luxury-header { /* Alias for ennu-staff-header */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--staff-header-bg);
    color: #1A2744;
    min-height: var(--staff-header-height);
    border-bottom: 3px solid var(--ennu-primary, #C9A962);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ennu-summary-cards { /* Alias for ennu-staff-stats */
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 20px 24px;
}

.ennu-summary-card { /* Alias for ennu-staff-stat */
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--ennu-neutral-50, #fafafa);
    border: 1px solid var(--ennu-neutral-200, #e5e5e5);
    border-left: 4px solid var(--ennu-primary, #C9A962);
    border-radius: 8px;
}

/* ==========================================================================
   IPHONE OPTIMIZATION (375px - 430px)
   iOS Safari, Safe Areas, Touch Targets
   ========================================================================== */

@media (max-width: 430px) {
    /* Safe area support for iPhone notch/Dynamic Island */
    .ennu-staff-header {
        padding: max(12px, env(safe-area-inset-top)) 
                 max(12px, env(safe-area-inset-right)) 
                 12px 
                 max(12px, env(safe-area-inset-left));
    }
    
    /* Compact header for small screens */
    .ennu-staff-header__title {
        font-size: 1.125rem;
        line-height: 1.3;
    }
    
    .ennu-staff-header__subtitle {
        font-size: 0.75rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .ennu-staff-header__logo {
        height: 36px;
    }
    
    /* Clock compact mode */
    .ennu-staff-header__clock,
    .ennu-clock {
        padding: 6px 12px;
        gap: 8px;
    }
    
    .ennu-staff-header__time,
    .ennu-time {
        font-size: 0.9375rem;
    }
    
    .ennu-staff-header__date,
    .ennu-date {
        font-size: 0.75rem;
    }
    
    .ennu-staff-header__clock-divider,
    .ennu-clock-divider {
        height: 16px;
    }
    
    /* Navigation horizontal scroll */
    .ennu-staff-nav {
        padding: 8px 12px;
        gap: 4px;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scroll-padding: 12px;
    }
    
    .ennu-staff-nav__tab {
        padding: 10px 14px;
        font-size: 0.8125rem;
        min-height: var(--ennu-touch-min, 44px);
        scroll-snap-align: start;
        flex-shrink: 0;
    }
    
    /* Tabs horizontal scroll */
    .ennu-tabs {
        padding: 8px 12px;
        gap: 2px;
    }
    
    .ennu-tab {
        padding: 10px 14px;
        font-size: 0.8125rem;
        min-height: var(--ennu-touch-min, 44px);
        flex-shrink: 0;
    }
    
    /* Location filter horizontal scroll */
    .ennu-location-filter {
        padding: 10px 12px;
        gap: 6px;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .ennu-location-btn {
        padding: 8px 14px;
        font-size: 0.75rem;
        min-height: var(--ennu-touch-min, 44px);
        flex-shrink: 0;
    }
    
    /* Stats grid - 2x2 layout */
    .ennu-staff-stats {
        padding: 12px;
        gap: 10px;
    }
    
    .ennu-staff-stats--cols-4,
    .ennu-staff-stats--cols-3,
    .ennu-staff-stats--cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ennu-staff-stat {
        padding: 12px;
        gap: 10px;
        flex-direction: column;
        text-align: center;
    }
    
    .ennu-staff-stat__value {
        font-size: 1.5rem;
    }
    
    .ennu-staff-stat__label {
        font-size: 0.625rem;
    }
    
    .ennu-staff-stat__icon {
        font-size: 1.25rem;
    }
    
    /* Filters compact */
    .ennu-staff-filters {
        padding: 10px 12px;
        gap: 6px;
    }
    
    .ennu-staff-filters__btn {
        padding: 8px 12px;
        font-size: 0.75rem;
        min-height: var(--ennu-touch-min, 44px);
    }
    
    .ennu-staff-filters__group {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .ennu-staff-filters__buttons {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }
    
    /* Action buttons */
    .ennu-staff-header__actions .ennu-btn-secondary,
    .ennu-staff-header__actions .ennu-btn-primary,
    .ennu-checkin-header-actions .ennu-btn-secondary,
    .ennu-checkin-header-actions .ennu-btn-primary {
        padding: 10px 14px;
        font-size: 0.8125rem;
        min-height: var(--ennu-touch-min, 44px);
    }
    
    /* Version badge smaller */
    .ennu-staff-header__version {
        font-size: 0.5625rem;
        padding: 2px 6px;
    }
    
    /* Division badge compact */
    .ennu-division-badge {
        padding: 3px 8px;
        font-size: 0.625rem;
    }
}

/* ==========================================================================
   IPHONE SE SPECIFIC (375px and below)
   ========================================================================== */

@media (max-width: 375px) {
    .ennu-staff-header {
        padding: 10px;
    }
    
    .ennu-staff-header__title {
        font-size: 1rem;
    }
    
    .ennu-staff-header__logo {
        height: 32px;
    }
    
    /* Single column stats on very small screens */
    .ennu-staff-stats--cols-4,
    .ennu-staff-stats--cols-3,
    .ennu-staff-stats--cols-2 {
        grid-template-columns: 1fr;
    }
    
    .ennu-staff-stat {
        flex-direction: row;
        text-align: left;
    }
    
    .ennu-staff-stat__value {
        font-size: 1.25rem;
    }
}

/* ==========================================================================
   IPAD PORTRAIT (768px - 1024px)
   ========================================================================== */

@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    /* Larger touch targets for iPad */
    .ennu-staff-nav__tab,
    .ennu-tab,
    .ennu-location-btn,
    .ennu-staff-filters__btn {
        min-height: 48px;
        padding: 12px 18px;
    }
    
    /* Stats 2x2 grid */
    .ennu-staff-stats--cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Larger font for arm's length */
    .ennu-staff-header__title {
        font-size: 1.375rem;
    }
    
    .ennu-staff-stat__value {
        font-size: 2rem;
    }
}

/* ==========================================================================
   IPAD LANDSCAPE (1024px - 1366px)
   ========================================================================== */

@media (min-width: 1024px) and (max-width: 1366px) and (orientation: landscape) {
    /* Full grid on landscape */
    .ennu-staff-stats--cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .ennu-staff-stats--cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Comfortable touch targets */
    .ennu-staff-nav__tab,
    .ennu-tab,
    .ennu-location-btn,
    .ennu-staff-filters__btn {
        min-height: 44px;
    }
}

/* ==========================================================================
   LANDSCAPE MODE (any mobile device)
   ========================================================================== */

@media (max-width: 896px) and (orientation: landscape) {
    .ennu-staff-header {
        flex-direction: row;
        padding: 8px 16px;
        gap: 12px;
    }
    
    .ennu-staff-header__brand {
        flex-direction: row;
    }
    
    .ennu-staff-header__logo {
        height: 32px;
    }
    
    .ennu-staff-header__title {
        font-size: 1rem;
    }
    
    .ennu-staff-header__subtitle {
        display: none;
    }
    
    /* Horizontal stats */
    .ennu-staff-stats {
        padding: 8px 16px;
        gap: 8px;
    }
    
    .ennu-staff-stats--cols-4,
    .ennu-staff-stats--cols-3,
    .ennu-staff-stats--cols-2 {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .ennu-staff-stat {
        padding: 8px 12px;
        flex-direction: row;
    }
    
    .ennu-staff-stat__value {
        font-size: 1.25rem;
    }
    
    .ennu-staff-stat__label {
        font-size: 0.5625rem;
    }
}

/* ==========================================================================
   TOUCH DEVICE OPTIMIZATIONS
   ========================================================================== */

@media (hover: none) and (pointer: coarse) {
    /* Remove hover transforms on touch */
    .ennu-staff-stat:hover,
    .ennu-staff-nav__tab:hover,
    .ennu-tab:hover,
    .ennu-location-btn:hover,
    .ennu-staff-filters__btn:hover {
        transform: none;
    }
    
    /* Active states instead */
    .ennu-staff-stat:active,
    .ennu-staff-nav__tab:active,
    .ennu-tab:active,
    .ennu-location-btn:active,
    .ennu-staff-filters__btn:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
    
    /* Ensure all interactive elements meet touch target minimum */
    .ennu-staff-nav__tab,
    .ennu-tab,
    .ennu-location-btn,
    .ennu-provider-btn,
    .ennu-staff-filters__btn {
        min-height: var(--ennu-touch-min, 44px);
        min-width: var(--ennu-touch-min, 44px);
    }
    
    /* Disable hover-dependent decorations */
    .ennu-staff-header__actions .ennu-btn-secondary:hover,
    .ennu-staff-header__actions .ennu-btn-primary:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(201, 169, 98, 0.3);
    }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .ennu-staff-header,
    .ennu-staff-nav__tab,
    .ennu-tab,
    .ennu-location-btn,
    .ennu-staff-filters__btn,
    .ennu-staff-stat,
    .ennu-pulse-dot {
        transition: none;
        animation: none;
    }
    
    .ennu-pulse-dot {
        animation: none;
        opacity: 1;
    }
}

/* ==========================================================================
   HIGH CONTRAST MODE
   ========================================================================== */

@media (prefers-contrast: high) {
    .ennu-staff-nav__tab--active,
    .ennu-tab.active {
        border: 2px solid currentColor;
    }
    
    .ennu-location-btn.active,
    .ennu-staff-filters__btn--active {
        border: 2px solid #000;
    }
    
    .ennu-staff-stat {
        border-width: 2px;
    }
}

/* ==========================================================================
   FOCUS VISIBLE (Accessibility)
   ========================================================================== */

.ennu-staff-nav__tab:focus-visible,
.ennu-tab:focus-visible,
.ennu-location-btn:focus-visible,
.ennu-provider-btn:focus-visible,
.ennu-staff-filters__btn:focus-visible {
    outline: 2px solid var(--ennu-primary, #C9A962);
    outline-offset: 2px;
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    .ennu-staff-header__actions,
    .ennu-staff-header__clock,
    .ennu-staff-nav,
    .ennu-tabs,
    .ennu-location-filter,
    .ennu-staff-filters {
        display: none !important;
    }
    
    .ennu-staff-header {
        padding: 16px 0;
        border-bottom: 2px solid #000;
    }
    
    .ennu-staff-stats {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .ennu-staff-stat {
        border: 1px solid #000;
        box-shadow: none;
    }
}
