/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Google Sheets Setup Banner */
#googleSheetsSetupBanner {
    position: relative;
    width: 100%;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    padding: 8px 0;
    border-bottom: 1px solid #ffc107;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#googleSheetsSetupBanner .banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

#googleSheetsSetupBanner .banner-icon {
    font-size: 24px;
}

#googleSheetsSetupBanner .banner-title {
    font-weight: 600;
    font-size: 16px;
    flex: 1;
    white-space: nowrap;
}

#googleSheetsSetupBanner .banner-description {
    font-size: 14px;
    opacity: 0.9;
}

#googleSheetsSetupBanner .banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

#googleSheetsSetupBanner .banner-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

#googleSheetsSetupBanner .banner-btn-primary {
    background: #007bff;
    color: white;
}

#googleSheetsSetupBanner .banner-btn-primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

#googleSheetsSetupBanner .banner-btn-dismiss {
    background: transparent;
    color: #856404;
    opacity: 0.7;
}

#googleSheetsSetupBanner .banner-btn-dismiss:hover {
    opacity: 1;
    background: rgba(133, 100, 4, 0.1);
}

/* Banner is now in document flow, no body padding needed */
body.has-google-sheets-banner {
    /* No padding needed - banner is in normal document flow */
}

/* Google Sheets Success Banner */
#googleSheetsSuccessBanner {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10001;
    max-width: 400px;
    border-left: 4px solid #28a745;
}

/* Animations for banners */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Responsive adjustments for banners */
@media (max-width: 768px) {
    #googleSheetsSetupBanner {
        padding: 6px 0;
    }
    
    #googleSheetsSetupBanner .banner-content {
        gap: 8px;
        padding: 0 0.75rem;
    }
    
    #googleSheetsSetupBanner .banner-title {
        font-size: 14px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    #googleSheetsSetupBanner .banner-icon {
        font-size: 18px;
        flex-shrink: 0;
    }
    
    #googleSheetsSetupBanner .banner-btn {
        padding: 6px 10px;
        font-size: 12px;
        min-width: auto;
    }
    
    #googleSheetsSetupBanner .banner-actions {
        gap: 6px;
    }
    
    #googleSheetsSuccessBanner {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    /* No body padding needed on mobile either */
}

/* Extra small screens */
@media (max-width: 480px) {
    #googleSheetsSetupBanner {
        padding: 5px 0;
    }
    
    #googleSheetsSetupBanner .banner-content {
        gap: 6px;
        padding: 0 0.5rem;
    }
    
    #googleSheetsSetupBanner .banner-title {
        font-size: 13px;
    }
    
    #googleSheetsSetupBanner .banner-btn {
        padding: 5px 8px;
        font-size: 11px;
    }
    
    /* No body padding needed on small screens either */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* App Container */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.app-header {
    background: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

/* Logo and Title Styling */
.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    flex-shrink: 1;
}

.app-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.app-title {
    font-family: 'Amita', serif;
    color: #e07e27;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Import Amita font */
@import url('https://fonts.googleapis.com/css2?family=Amita:wght@400;700&display=swap');

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sync-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sync-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    position: relative;
    cursor: pointer;
}

.sync-status:hover .sync-info {
    display: block !important;
}

.sync-status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e74c3c;
}

.sync-status-indicator.online {
    background: #27ae60;
}

.sync-status-indicator.offline {
    background: #e74c3c;
}

.sync-status-indicator.syncing {
    background: #f39c12;
    animation: pulse 1s infinite;
}

.sync-status-indicator.error {
    background: #e74c3c;
    animation: pulse 2s infinite;
}

.sync-info {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.5rem;
    font-size: 0.8rem;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    margin-top: 0.5rem;
}

.sync-detail {
    margin-bottom: 0.25rem;
}

.sync-detail:last-child {
    margin-bottom: 0;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Navigation */
.app-nav {
    background: white;
    border-bottom: 1px solid #ddd;
    padding: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.app-nav::-webkit-scrollbar {
    display: none;
}

.nav-container {
    display: flex;
    min-width: max-content;
}

.nav-btn {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    min-width: 80px;
    position: relative;
}

.nav-btn:hover {
    background: #f8f9fa;
    color: #333;
}

.nav-btn.active {
    color: #2c3e50;
    border-bottom-color: #3498db;
    background: #f8f9fa;
}

.nav-btn:focus {
    outline: 2px solid #3498db;
    outline-offset: -2px;
}

.nav-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.nav-text {
    font-size: 0.8rem;
    font-weight: 500;
}

/* Main Content */
.app-main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    width: 100%;
}

/* Views */
.view {
    display: none;
}

.view.active {
    display: block;
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.card h2 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.25rem;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.scanner-card {
    grid-column: 1 / -1;
}

/* Scanner Components */
.scanner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.scanner-status-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.scanner-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

/* Sync status in scanner */
.scanner-header .sync-status-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    font-size: 0.8rem;
    color: #666;
}

.scanner-header .sync-status-text {
    font-weight: 500;
}

.scanner-header .sync-status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e74c3c;
}

.scanner-header .sync-status-indicator.online {
    background: #27ae60;
}

.scanner-header .sync-status-indicator.syncing {
    background: #f39c12;
    animation: pulse 1.5s infinite;
}

.scanner-header .sync-status-indicator.error {
    background: #e74c3c;
}

.scanner-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #27ae60;
}

.scanner-indicator.error {
    background: #e74c3c;
}

.scanner-indicator.warning {
    background: #f39c12;
}

.scanner-input-container {
    margin-bottom: 1.5rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.scanner-input {
    width: 100%;
    padding: 1.25rem;
    padding-right: 3rem;
    font-size: 1.2rem;
    border: 3px solid #ddd;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: white;
    font-weight: 500;
}

.scanner-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.clear-input-btn {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #999;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    transition: all 0.2s ease;
    opacity: 0;
    visibility: hidden;
}

.input-wrapper:hover .clear-input-btn,
.scanner-input:focus + .clear-input-btn {
    opacity: 1;
    visibility: visible;
}

.clear-input-btn:hover {
    background: #f8f9fa;
    color: #666;
}

.scan-feedback {
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-radius: 4px;
    font-weight: 500;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scan-feedback.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    opacity: 1;
}

.scan-feedback.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    opacity: 1;
}

.scanner-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.stat-icon {
    font-size: 1.5rem;
    opacity: 0.8;
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
}

.scanner-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.scanner-test-btn {
    max-width: 200px;
    margin: 0 auto;
}

/* Attendance List */
.attendance-list {
    max-height: 300px;
    overflow-y: auto;
}

.attendance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.attendance-item:last-child {
    border-bottom: none;
}

.volunteer-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.volunteer-name {
    font-weight: 500;
    color: #2c3e50;
}

.volunteer-committee {
    font-size: 0.85rem;
    color: #666;
}

.check-in-time {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.attendance-item.placeholder {
    text-align: center;
    padding: 2rem 0;
    color: #999;
    font-style: italic;
}

.attendance-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    text-align: center;
    font-size: 0.8rem;
    color: #666;
}



/* Card Headers */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.summary-time {
    font-size: 0.8rem;
    color: #666;
}

/* Summary Stats */
.summary-stats {
    display: flex;
    justify-content: space-around;
    text-align: center;
    margin-bottom: 1.5rem;
}

.summary-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.summary-icon {
    font-size: 1.5rem;
    opacity: 0.8;
}

.summary-number {
    font-size: 2rem;
    font-weight: 700;
    color: #3498db;
}

.summary-label {
    font-size: 0.85rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.summary-progress {
    margin-top: 1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.8rem;
    color: #666;
    text-align: center;
    display: block;
}

/* View Headers */
.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.view-header h2 {
    color: #2c3e50;
    font-size: 1.5rem;
}

.view-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Form Controls */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.search-input, .select-input {
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    min-width: 200px;
    transition: border-color 0.2s ease;
}

.search-input:focus, .select-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Settings Styles */
.settings-content {
    max-width: 800px;
}

.settings-section {
    margin-bottom: 2rem;
}

.settings-section h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-size: 1.1rem;
}

.setting-group {
    margin-bottom: 1.5rem;
}

.setting-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.setting-input {
    width: 100%;
    max-width: 300px;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
}

.setting-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    margin-bottom: 0 !important;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
}

.checkmark {
    font-weight: 500;
}

.setting-help {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #666;
    font-style: italic;
}

.btn-warning {
    background: #e74c3c;
    color: white;
}

.btn-warning:hover {
    background: #c0392b;
}

/* Reports Placeholder */
.reports-placeholder {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

.placeholder-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Comprehensive Reports Styles */
.report-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.report-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.report-title h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
}

.report-period-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.period-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.date-range {
    font-size: 0.8rem;
    opacity: 0.9;
}

.report-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-controls label {
    font-size: 0.9rem;
    font-weight: 500;
}

.sort-controls .select-input {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #333;
}

/* Key Metrics Overview */
.metrics-overview {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.metric-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.metric-icon {
    font-size: 2rem;
    opacity: 0.8;
}

.metric-content {
    display: flex;
    flex-direction: column;
}

.metric-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1;
}

.metric-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.25rem;
}

/* Committee Performance */
.committee-performance .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.committee-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.committee-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.committee-card.top-performer {
    background: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 100%);
    border-color: #fdcb6e;
    transform: scale(1.02);
}

.committee-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.committee-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.committee-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.2rem;
}

.top-badge {
    background: #f39c12;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.committee-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.committee-metric {
    text-align: center;
}

.committee-metric .metric-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1;
}

.committee-metric .metric-label {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
}

.committee-top-performer {
    background: rgba(255, 255, 255, 0.7);
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

.top-performer-label {
    font-weight: 600;
    color: #666;
}

.top-performer-name {
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0.5rem;
}

.top-performer-rate {
    color: #27ae60;
    font-weight: 600;
}

.committee-details {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.committee-details h5 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    font-size: 0.9rem;
}

.volunteer-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.volunteer-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
    font-size: 0.85rem;
}

.volunteer-item.more-volunteers {
    color: #666;
    font-style: italic;
}

.volunteer-name {
    font-weight: 500;
}

.volunteer-rate {
    font-weight: 600;
    color: #27ae60;
}

/* Volunteer Scores Table */
.volunteer-scores .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.volunteer-count {
    color: #666;
    font-size: 0.9rem;
}

.scores-table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

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

.scores-table th {
    background: #f8f9fa;
    padding: 1rem 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e9ecef;
    font-size: 0.9rem;
}

.scores-table td {
    padding: 1rem 0.75rem;
    border-bottom: 1px solid #f1f3f4;
    vertical-align: middle;
}

.volunteer-row:hover {
    background: #f8f9fa;
}

.volunteer-row.platinum-tier {
    background: linear-gradient(90deg, rgba(230, 230, 250, 0.3) 0%, transparent 100%);
}

.volunteer-row.gold-tier {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.1) 0%, transparent 100%);
}

.volunteer-row.silver-tier {
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.1) 0%, transparent 100%);
}

.rank-cell {
    text-align: center;
    width: 80px;
}

.rank-number {
    font-weight: 700;
    color: #2c3e50;
    font-size: 1.1rem;
}

.rank-medal {
    margin-left: 0.5rem;
    font-size: 1.2rem;
}

.volunteer-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.volunteer-name {
    font-weight: 600;
    color: #2c3e50;
}

.last-attendance {
    font-size: 0.8rem;
    color: #666;
}

.committee-badge {
    background: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.attendance-fraction {
    font-weight: 600;
    color: #2c3e50;
}

.rate-display {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 80px;
}

.rate-number {
    font-weight: 700;
    color: #2c3e50;
}

.rate-bar {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
}

.rate-fill {
    height: 100%;
    background: linear-gradient(90deg, #e74c3c 0%, #f39c12 50%, #27ae60 100%);
    transition: width 0.3s ease;
}

.engagement-score {
    font-weight: 600;
    color: #3498db;
}

.tier-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.tier-badge.platinum {
    background: #e6e6fa;
    color: #4b0082;
}

.tier-badge.gold {
    background: #ffd700;
    color: #b8860b;
}

.tier-badge.silver {
    background: #c0c0c0;
    color: #696969;
}

.tier-badge.bronze {
    background: #cd7f32;
    color: white;
}

/* Trends Section */
.trends-section h3 {
    margin-bottom: 1.5rem;
}

.trends-chart {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
}

.chart-container {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    height: 200px;
    padding: 1rem 0;
}

.trend-bar-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.trend-bar {
    background: linear-gradient(180deg, #3498db 0%, #2980b9 100%);
    width: 100%;
    max-width: 60px;
    border-radius: 4px 4px 0 0;
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 0.5rem;
    margin-bottom: 0.5rem;
    min-height: 20px;
}

.trend-value {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.trend-label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 0.25rem;
}

.trend-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.125rem;
}

.trend-volunteers,
.trend-events {
    font-size: 0.75rem;
    color: #666;
    text-align: center;
}

/* Performance Tiers */
.performance-tiers h3 {
    margin-bottom: 1.5rem;
}

.tiers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.tier-card {
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform 0.2s ease;
}

.tier-card:hover {
    transform: translateY(-2px);
}

.tier-card.platinum {
    background: linear-gradient(135deg, #e6e6fa 0%, #d8bfd8 100%);
    border: 2px solid #9370db;
}

.tier-card.gold {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border: 2px solid #f1c40f;
}

.tier-card.silver {
    background: linear-gradient(135deg, #c0c0c0 0%, #dcdcdc 100%);
    border: 2px solid #95a5a6;
}

.tier-card.bronze {
    background: linear-gradient(135deg, #cd7f32 0%, #d2691e 100%);
    border: 2px solid #a0522d;
    color: white;
}

.tier-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.tier-header h4 {
    margin: 0;
    font-size: 1.2rem;
}

.tier-count {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.tier-criteria {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.tier-volunteers {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tier-volunteer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.3);
    padding: 0.5rem;
    border-radius: 4px;
}

.tier-volunteer.more {
    justify-content: center;
    font-style: italic;
    opacity: 0.8;
}

.tier-volunteer .volunteer-name {
    font-weight: 500;
}

.tier-volunteer .volunteer-rate {
    font-weight: 600;
}

/* Loading and Error States */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 1rem;
    color: #666;
}

.loading-state .loading-spinner {
    margin-bottom: 1rem;
}

.error-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #e74c3c;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

/* Responsive Design for Reports */
@media (max-width: 768px) {
    .report-actions {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .sort-controls {
        justify-content: space-between;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .committee-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .committee-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .scores-table-container {
        font-size: 0.9rem;
    }
    
    .scores-table th,
    .scores-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .chart-container {
        height: 150px;
        gap: 0.5rem;
    }
    
    .trend-bar {
        max-width: 40px;
    }
    
    .tiers-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .committee-metrics {
        grid-template-columns: 1fr;
    }
    
    .scores-table {
        font-size: 0.8rem;
    }
    
    .rank-cell,
    .tier-cell {
        display: none;
    }
}

/* Loading States */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #666;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Modal form inputs */
.modal input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
    background: white;
    z-index: 10000;
}

.modal input[type="text"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.modal label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .scanner-stats {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .stat {
        min-width: 150px;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .header-content h1 {
        font-size: 1.25rem;
    }

    .header-controls {
        flex-wrap: wrap;
        justify-content: center;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .scanner-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .scanner-actions {
        justify-content: center;
    }

    .summary-stats {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .summary-stat {
        min-width: 100px;
    }

    .view-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .view-controls {
        justify-content: center;
        flex-wrap: wrap;
    }

    .nav-container {
        justify-content: center;
    }

    .nav-btn {
        flex: 1;
        min-width: 70px;
        max-width: 100px;
    }

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



    .card-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .card-actions {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .app-main {
        padding: 1rem 0.5rem;
    }

    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        min-height: 44px;
    }

    .scanner-input {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 1rem;
    }

    .summary-number {
        font-size: 1.5rem;
    }

    .nav-btn {
        padding: 0.75rem 0.5rem;
        min-width: 60px;
    }

    .nav-text {
        font-size: 0.7rem;
    }

    .nav-icon {
        font-size: 1rem;
    }



    .scanner-stats {
        gap: 0.75rem;
    }

    .stat {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .stat-icon {
        font-size: 1.25rem;
    }

    .summary-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .modal {
        width: 95%;
        margin: 1rem;
    }

    .modal-header, .modal-body, .modal-footer {
        padding: 1rem;
    }
}

/* Google Sheets sync button */
#googleSyncBtn {
    position: relative;
}

#googleSyncBtn:hover {
    background: #2980b9;
}

#googleSyncBtn.syncing {
    background: #f39c12;
    pointer-events: none;
}

#googleSyncBtn.syncing::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Touch-friendly improvements for Chromebook and tablets */
@media (pointer: coarse) {
    .btn {
        min-height: 48px;
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }

    .nav-btn {
        min-height: 56px;
        padding: 1rem 1.5rem;
    }

    .scanner-input {
        min-height: 56px;
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 1.25rem;
    }

    .search-input, .select-input, .setting-input {
        min-height: 48px;
        font-size: 16px;
        padding: 0.875rem;
    }



    .attendance-item {
        padding: 1rem 0;
        min-height: 60px;
    }

    .clear-input-btn {
        min-width: 44px;
        min-height: 44px;
        font-size: 1.4rem;
    }

    /* Larger touch targets for checkboxes */
    .checkbox-label {
        min-height: 44px;
        padding: 0.5rem 0;
    }

    .checkbox-label input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor;
    }

    .scanner-input, .search-input, .select-input, .setting-input {
        border-width: 3px;
    }

    .card {
        border: 1px solid #333;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .loading-spinner {
        animation: none;
        border: 4px solid #3498db;
    }
}

/* Focus improvements for keyboard navigation */
.btn:focus,
.nav-btn:focus,
.scanner-input:focus,
.search-input:focus,
.select-input:focus,
.setting-input:focus {
    outline: 3px solid #3498db;
    outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #3498db;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 10000;
}

.skip-link:focus {
    top: 6px;
}

/* Volunteer Management Styles */
.volunteers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.volunteer-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.volunteer-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.volunteer-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.volunteer-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Status badges */
.status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status.active {
    background: #d4edda;
    color: #155724;
}

.status.inactive {
    background: #f8d7da;
    color: #721c24;
}

.status.suspended {
    background: #fff3cd;
    color: #856404;
}

/* Search highlighting */
mark {
    background: #fff3cd;
    padding: 0.1rem 0.2rem;
    border-radius: 2px;
    font-weight: 500;
}

/* Modal form improvements */
.modal form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal form label {
    font-weight: 500;
    color: #333;
    margin-bottom: 0.25rem;
}

.modal form input,
.modal form select {
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
    background: white;
}

.modal form input:focus,
.modal form select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.modal form input[readonly] {
    background: #f5f5f5;
    color: #666;
}

.modal form small {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
    display: block;
}

/* CSV import styles */
.csv-preview {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
}

.csv-preview table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.csv-preview th,
.csv-preview td {
    padding: 0.25rem 0.5rem;
    border: 1px solid #ddd;
    text-align: left;
}

.csv-preview th {
    background: #f0f0f0;
    font-weight: bold;
    position: sticky;
    top: 0;
}

/* File input styling */
input[type="file"] {
    padding: 0.75rem;
    border: 2px dashed #ddd;
    border-radius: 6px;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.2s ease;
}

input[type="file"]:hover {
    border-color: #3498db;
    background: #f0f8ff;
}

input[type="file"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Attendance history styles */
.attendance-history {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.attendance-history-item {
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.attendance-history-item:last-child {
    border-bottom: none;
}

.attendance-history-item:hover {
    background: #f8f9fa;
}

/* Statistics grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #3498db;
    display: block;
}

.stat-label {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
}

/* Responsive improvements for volunteer management */
@media (max-width: 768px) {
    .volunteers-grid {
        grid-template-columns: 1fr;
    }
    
    .volunteer-actions {
        display: flex;
        gap: 0.5rem;
        justify-content: stretch;
    }
    
    .volunteer-actions .btn {
        flex: 1;
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .modal {
        margin: 0.5rem;
        width: calc(100% - 1rem);
    }
}

@media (max-width: 480px) {
    .volunteer-card {
        padding: 1rem;
    }
    
    .volunteer-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .volunteer-actions .btn {
        width: 100%;
    }
}

/* Print styles */
@media print {
    .app-header, .app-nav, .btn, .modal-overlay {
        display: none !important;
    }

    .app-main {
        padding: 0;
        max-width: none;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
    
    .volunteer-actions {
        display: none;
    }
}
/* S
canner Input and Feedback Styles */
.scanner-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

.scanner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.scanner-header h2 {
    font-size: 1.25rem;
    color: #2c3e50;
    margin: 0;
}

.scanner-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.scanner-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #95a5a6;
}

.scanner-indicator.ready {
    background: #27ae60;
}

.scanner-indicator.processing {
    background: #f39c12;
    animation: pulse 1s infinite;
}

.scanner-indicator.success {
    background: #27ae60;
    animation: flash-success 0.5s ease-out;
}

.scanner-indicator.error {
    background: #e74c3c;
    animation: flash-error 0.5s ease-out;
}

@keyframes flash-success {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); background: #2ecc71; }
    100% { transform: scale(1); }
}

@keyframes flash-error {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); background: #c0392b; }
    100% { transform: scale(1); }
}

.scanner-input-container {
    margin-bottom: 1.5rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.scanner-input {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.scanner-input:focus {
    outline: none;
    border-color: #3498db;
    background: white;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.scanner-input:disabled {
    background: #ecf0f1;
    color: #7f8c8d;
    cursor: not-allowed;
}

.clear-input-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #95a5a6;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.clear-input-btn:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

/* Scan Feedback Styles */
.scan-feedback {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.95rem;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(-10px);
}

.scan-feedback:not(:empty) {
    opacity: 1;
    transform: translateY(0);
}

.scan-feedback.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.scan-feedback.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.scan-feedback.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.scan-feedback.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.scan-feedback.processing {
    background: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

.scan-feedback.processing::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    border: 2px solid #6c757d;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Scanner Stats */
.scanner-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.stat-icon {
    font-size: 1.25rem;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
}

/* Scanner Actions */
.scanner-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.scanner-test-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Responsive Design for Scanner */
@media (max-width: 480px) {
    .scanner-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .scanner-status-container {
        width: 100%;
        justify-content: space-between;
    }
    
    .scanner-header .sync-status-compact {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }
    
    .scanner-stats {
        grid-template-columns: 1fr;
    }
    
    .scanner-actions {
        flex-direction: column;
    }
    
    .scanner-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .scan-feedback.success {
        background: #000;
        color: #00ff00;
        border-color: #00ff00;
    }
    
    .scan-feedback.error {
        background: #000;
        color: #ff0000;
        border-color: #ff0000;
    }
    
    .scanner-indicator.ready {
        background: #00ff00;
    }
    
    .scanner-indicator.error {
        background: #ff0000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .scanner-indicator,
    .scan-feedback,
    .scanner-input {
        animation: none;
        transition: none;
    }
}

/* Troubleshooting Styles */
.troubleshooting-item {
    border-bottom: 1px solid #e9ecef;
    padding: 1.5rem 0;
    margin-bottom: 1rem;
}

.troubleshooting-item:last-child {
    border-bottom: none;
}

.troubleshooting-item h4 {
    color: #495057;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.troubleshooting-solutions {
    margin-top: 1rem;
}

.solution-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.75rem 0;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.25rem;
}

.manual-solution {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    padding: 1rem;
    margin-top: 1rem;
}

.code-block {
    display: block;
    background: #f1f3f4;
    border: 1px solid #dadce0;
    border-radius: 0.25rem;
    padding: 0.75rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.4;
    margin: 0.5rem 0;
    white-space: pre-wrap;
    word-break: break-all;
}

kbd {
    background: #f8f9fa;
    border: 1px solid #adb5bd;
    border-radius: 0.25rem;
    padding: 0.125rem 0.25rem;
    font-family: monospace;
    font-size: 0.875rem;
}

.help-list {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.help-list li {
    margin-bottom: 0.5rem;
}

/* Event Management Styles */
.events-section {
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.section-header h3 {
    margin: 0;
    color: var(--text-color);
}

.event-count {
    font-size: 0.875rem;
    color: var(--text-muted);
    background: var(--background-light);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

/* Event Cards */
.event-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    background: white;
    transition: all 0.2s ease;
    position: relative;
}

.event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.event-card.upcoming {
    border-left: 4px solid var(--primary-color);
}

.event-card.past {
    border-left: 4px solid var(--text-muted);
    opacity: 0.8;
}

.event-card.inactive {
    border-left: 4px solid #f39c12;
    background: #fefefe;
}

.event-card.today {
    border-left: 4px solid #27ae60;
    background: linear-gradient(135deg, #f8fff8 0%, #ffffff 100%);
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.event-title h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-color);
    font-size: 1.1rem;
}

.event-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.event-type-badge,
.event-status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
}

.event-type-badge {
    background: var(--background-light);
    color: var(--text-color);
}

.event-status-badge.active {
    background: #d4edda;
    color: #155724;
}

.event-status-badge.inactive {
    background: #fff3cd;
    color: #856404;
}

.event-status-badge.cancelled {
    background: #f8d7da;
    color: #721c24;
}

.today-indicator {
    position: absolute;
    top: -1px;
    right: -1px;
    background: #27ae60;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0 8px 0 8px;
    font-size: 0.75rem;
    font-weight: 600;
}

.event-details {
    margin-bottom: 1rem;
}

.event-date,
.event-day,
.event-pattern {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.event-description {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: var(--background-light);
    border-radius: 4px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.event-description p {
    margin: 0;
}

.event-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Calendar Section */
.calendar-section {
    margin-bottom: 2rem;
}

.calendar-controls {
    display: flex;
    gap: 0.5rem;
}

.calendar-events {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.calendar-day {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    background: white;
}

.day-number {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.day-events {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.calendar-event {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.calendar-event:hover {
    transform: translateX(2px);
}

.calendar-event.recurring {
    background: #e3f2fd;
    color: #1565c0;
}

.calendar-event.special {
    background: #fff3e0;
    color: #ef6c00;
}

.calendar-event.daily {
    background: #f3e5f5;
    color: #7b1fa2;
}

.recurring-indicator {
    font-size: 0.6rem;
}

.calendar-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

/* Event Form Styles */
.event-form {
    max-width: 500px;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.form-info {
    margin: 0;
    padding: 0.5rem;
    background: var(--background-light);
    border-radius: 4px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Empty and Error States */
.empty-state,
.error-state {
    text-align: center;
    padding: 3rem 2rem;
}

.empty-icon,
.error-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h3,
.error-state h3 {
    margin: 0 0 1rem 0;
    color: var(--text-color);
}

.empty-state p,
.error-state p {
    margin: 0 0 2rem 0;
    color: var(--text-muted);
}

/* Event Attendance View */
.event-attendance-view {
    max-width: 600px;
}

.event-info {
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--background-light);
    border-radius: 8px;
}

.event-info h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-color);
}

.event-info p {
    margin: 0.25rem 0;
    color: var(--text-muted);
}

.attendance-section h4 {
    margin: 0 0 1rem 0;
    color: var(--text-color);
}

.attendance-summary {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    text-align: center;
}

.attendance-summary p {
    margin: 0;
    font-weight: 500;
}

/* All Past Events */
.all-past-events {
    max-width: 700px;
    max-height: 70vh;
    overflow-y: auto;
}

.events-summary {
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--background-light);
    border-radius: 8px;
    text-align: center;
}

.past-events-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.past-event-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
}

.past-event-item .event-info h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-color);
}

.past-event-item .event-info p {
    margin: 0.25rem 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Delete Confirmation */
.delete-confirmation {
    text-align: center;
    max-width: 400px;
}

.warning-message {
    margin: 1rem 0;
    padding: 1rem;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    text-align: left;
}

.warning-message p {
    margin: 0;
    color: #856404;
}

/* Section Footer */
.section-footer {
    margin-top: 1rem;
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Responsive Design for Events */
@media (max-width: 768px) {
    .events-grid {
        grid-template-columns: 1fr;
    }
    
    .calendar-events {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .event-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .event-actions {
        justify-content: flex-start;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .past-event-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* ===== COMPACT HEADER CONTROLS ===== */

/* Compact sync status */
.sync-status-compact {
    display: flex;
    align-items: center;
    margin-right: 0.5rem;
}

.sync-status-compact .sync-status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e74c3c;
    transition: background-color 0.3s ease;
}

.sync-status-compact .sync-status-indicator.online {
    background: #27ae60;
}

.sync-status-compact .sync-status-indicator.syncing {
    background: #f39c12;
    animation: pulse 1.5s infinite;
}

/* Compact icon buttons */
.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 0.25rem;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.btn-icon:active {
    transform: translateY(0);
}

.btn-icon:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Pulse animation for syncing indicator */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* ===== DESKTOP NAVIGATION ===== */

/* Desktop navigation - show hamburger menu on all screen sizes */
.hamburger-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.hamburger-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hamburger-btn:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background: white;
    border-radius: 1px;
    transition: all 0.3s ease;
    margin: 1.5px 0;
}

/* Hamburger animation */
.hamburger-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Show navigation for mobile slide-out menu */
.app-nav {
    display: block;
}

/* Navigation container - mobile slide-out menu */
.nav-container {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: #2c3e50;
    z-index: 1000;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
    padding-top: 60px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.nav-container.active {
    left: 0;
}

/* Navigation overlay */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* All navigation buttons in slide-out menu */
.nav-btn {
    width: 100%;
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    color: white;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-btn.active {
    background: #3498db;
    color: white;
}

.nav-btn:focus {
    outline: 2px solid #3498db;
    outline-offset: -2px;
}

.nav-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.nav-text {
    font-size: 1rem;
    font-weight: 500;
}

/* ===== MOBILE OPTIMIZATION ===== */

/* Mobile-first responsive design */
@media (max-width: 768px) {
    /* Prevent zoom on iOS when focusing inputs */
    body {
        font-size: 16px;
    }
    
    /* Single-row header layout */
    .app-header {
        padding: 0.5rem 0;
        position: relative;
        z-index: 100;
    }
    
    .header-content {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0 0.75rem !important;
        gap: 0.5rem !important;
        min-height: 48px !important;
        max-height: 60px !important;
        flex-wrap: nowrap !important;
    }
    
    /* Header title - flexible with wrapping */
    .header-title {
        flex: 1 !important;
        text-align: center !important;
        min-width: 0 !important;
        overflow: hidden !important;
        order: 2 !important;
    }
    
    .header-controls {
        display: flex !important;
        align-items: center !important;
        gap: 0.5rem !important;
        flex-shrink: 0 !important;
        order: 3 !important;
        margin-right: 0 !important;
        position: relative !important;
        z-index: 101 !important;
    }
    
    /* Adjust DEV badge position on mobile to avoid overlap */
    body > div[style*="position: fixed"][style*="top: 10px"][style*="right: 10px"] {
        top: 70px !important;
        right: 10px !important;
        z-index: 99 !important;
    }
    
    .header-title h1 {
        font-size: 1.1rem;
        margin: 0;
        line-height: 1.2;
        word-wrap: break-word;
    }
    
    /* Mobile logo adjustments */
    .logo-container {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.5rem !important;
        min-width: 0 !important;
        flex-shrink: 1 !important;
    }
    
    .app-logo {
        height: 50px !important;
        width: auto !important;
        flex-shrink: 0 !important;
    }
    
    .app-title {
        font-size: 2rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        line-height: 1.2 !important;
    }
    
    /* Show hamburger button in header on mobile */
    .hamburger-btn {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        width: 40px !important;
        height: 40px !important;
        background: none !important;
        border: none !important;
        cursor: pointer !important;
        padding: 8px !important;
        border-radius: 4px !important;
        transition: background-color 0.2s ease !important;
        flex-shrink: 0 !important;
        order: 1 !important;
    }
    
    .hamburger-btn:hover {
        background: rgba(255, 255, 255, 0.1);
    }
    
    .hamburger-line {
        width: 20px !important;
        height: 2px !important;
        margin: 1.5px 0 !important;
        background: white !important;
        border-radius: 1px !important;
        transition: all 0.3s ease !important;
    }
    
    .hamburger-btn:focus {
        outline: 2px solid #3498db;
        outline-offset: 2px;
    }
    
    .hamburger-line {
        width: 20px;
        height: 2px;
        background: white;
        border-radius: 1px;
        transition: all 0.3s ease;
        margin: 1.5px 0;
    }
    
    /* Hamburger animation */
    .hamburger-btn.active .hamburger-line:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger-btn.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger-btn.active .hamburger-line:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .header-controls {
        display: flex;
        align-items: center;
        gap: 0.25rem;
        flex-shrink: 0;
    }
    
    /* Smaller icon buttons on mobile */
    .btn-icon {
        width: 36px !important;
        height: 36px !important;
        font-size: 1.1rem !important;
        margin: 0 !important;
        padding: 6px !important;
        flex-shrink: 0 !important;
    }
    
    /* Sync status moved to scanner section - no longer in header */
    
    /* Mobile navigation - show for slide-out menu */
    .app-nav {
        display: block;
    }
    
    /* Mobile navigation container */
    .nav-container {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        background: #2c3e50;
        z-index: 1000;
        transition: left 0.3s ease;
        display: flex;
        flex-direction: column;
        padding-top: 60px;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    .nav-container.active {
        left: 0;
    }
    
    /* Navigation overlay */
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* Mobile navigation buttons */
    .nav-btn {
        width: 100%;
        padding: 1rem 1.5rem;
        background: none;
        border: none;
        color: white;
        text-align: left;
        cursor: pointer;
        transition: background-color 0.2s ease;
        display: flex;
        align-items: center;
        gap: 1rem;
        font-size: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    /* Show Reports button in mobile navigation */
    .nav-btn[data-view="reports"] {
        display: flex;
    }
    
    .nav-btn:hover {
        background: rgba(255, 255, 255, 0.1);
    }
    
    .nav-btn.active {
        background: #3498db;
        color: white;
    }
    
    .nav-btn:focus {
        outline: 2px solid #3498db;
        outline-offset: -2px;
    }
    
    .nav-icon {
        font-size: 1.2rem;
        width: 24px;
        text-align: center;
    }
    
    .nav-text {
        font-size: 1rem;
        font-weight: 500;
    }
    
    /* Prominent scanner input */
    .scanner-card {
        margin-bottom: 1rem;
        padding: 1rem;
        border: 2px solid #3498db;
        background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    }
    
    .scanner-header {
        margin-bottom: 1rem;
        text-align: center;
    }
    
    .scanner-header h2 {
        font-size: 1.1rem;
        color: #2c3e50;
        margin-bottom: 0.5rem;
    }
    
    .scanner-status {
        justify-content: center;
        font-size: 0.85rem;
    }
    
    /* Large, prominent scanner input */
    .scanner-input {
        font-size: 1.4rem;
        padding: 1.5rem 1rem;
        border: 3px solid #3498db;
        border-radius: 12px;
        text-align: center;
        font-weight: 600;
        background: white;
        box-shadow: 0 4px 8px rgba(52, 152, 219, 0.1);
    }
    
    .scanner-input:focus {
        border-color: #2980b9;
        box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.2);
        transform: translateY(-1px);
    }
    
    .scanner-input::placeholder {
        color: #7f8c8d;
        font-weight: 500;
    }
    
    /* Compact dashboard grid */
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .card h2 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    /* Compact stats */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
    
    .stat-item {
        padding: 0.75rem;
        text-align: center;
    }
    
    .stat-value {
        font-size: 1.5rem;
        font-weight: bold;
        margin-bottom: 0.25rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
        color: #7f8c8d;
    }
    
    /* Compact recent check-ins */
    .recent-checkins {
        max-height: 200px;
        overflow-y: auto;
    }
    
    .checkin-item {
        padding: 0.5rem;
        font-size: 0.85rem;
        border-bottom: 1px solid #ecf0f1;
    }
    
    .checkin-name {
        font-weight: 600;
        margin-bottom: 0.25rem;
    }
    
    .checkin-details {
        font-size: 0.75rem;
        color: #7f8c8d;
    }
    
    /* Hide less important elements on mobile */
    .sync-info {
        display: none !important;
    }
    
    .scanner-indicator {
        width: 8px;
        height: 8px;
    }
    
    /* Larger touch targets */
    .btn {
        min-height: 44px;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .btn-sm {
        min-height: 36px;
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    /* Modal adjustments for mobile */
    .modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }
    
    .modal-header {
        padding: 1rem;
        border-bottom: 1px solid #ecf0f1;
    }
    
    .modal-body {
        padding: 1rem;
        max-height: calc(100vh - 8rem);
        overflow-y: auto;
    }
    
    .modal-footer {
        padding: 1rem;
        border-top: 1px solid #ecf0f1;
    }
}

/* Extra small screens (phones in portrait) */
@media (max-width: 480px) {
    /* Smaller header elements */
    .header-content {
        gap: 0.125rem;
        padding: 0 0.25rem;
        flex-wrap: nowrap !important;
    }
    
    .header-title h1 {
        font-size: 0.9rem;
        line-height: 1.1;
    }
    
    /* Extra small screen logo adjustments */
    .logo-container {
        gap: 0.125rem;
    }
    
    .app-logo {
        height: 20px;
    }
    
    .app-title {
        font-size: 0.9rem;
    }
    
    /* Smaller hamburger button on very small screens */
    .hamburger-btn {
        width: 28px;
        height: 28px;
        padding: 4px;
    }
    
    .hamburger-line {
        width: 14px;
        height: 1.5px;
        margin: 0.5px 0;
    }
    
    /* Even smaller icon buttons on very small screens */
    .btn-icon {
        width: 24px;
        height: 24px;
        font-size: 0.8rem;
    }
    
    .sync-status-compact .sync-status-indicator {
        width: 5px;
        height: 5px;
    }
}

/* Very small screens - keep single row but more compact */
@media (max-width: 360px) {
    .header-content {
        flex-wrap: nowrap;
        justify-content: space-between;
        padding: 0 0.125rem;
        gap: 0.125rem;
    }
    
    .header-title {
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }
    
    .header-title h1 {
        font-size: 0.8rem;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .logo-container {
        gap: 0.125rem;
    }
    
    .app-logo {
        height: 18px;
    }
    
    .app-title {
        font-size: 0.8rem;
    }
    
    .nav-btn {
        padding: 0.4rem 0.2rem;
    }
    
    .nav-text {
        font-size: 0.65rem;
    }
    
    .scanner-input {
        font-size: 1.3rem;
        padding: 1.25rem 0.75rem;
    }
    
    .dashboard-grid {
        padding: 0 0.75rem;
    }
    
    .card {
        padding: 0.75rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .stat-item {
        padding: 0.5rem;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .app-header {
        padding: 0.5rem 0;
    }
    
    .header-content {
        flex-direction: row;
        align-items: center;
    }
    
    .header-content h1 {
        font-size: 1rem;
        text-align: left;
    }
    
    .app-nav {
        padding: 0.25rem 0;
    }
    
    .hamburger-btn {
        width: 36px;
        height: 36px;
        padding: 6px;
    }
    
    .hamburger-line {
        width: 18px;
        height: 2px;
        margin: 1px 0;
    }
    
    .scanner-input {
        padding: 1rem;
        font-size: 1.2rem;
    }
    
    /* Adjust mobile nav for landscape */
    .nav-container {
        width: 240px;
        padding-top: 50px;
    }
    
    .nav-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* Focus and accessibility improvements for mobile */
@media (max-width: 768px) {
    /* Larger focus indicators for touch */
    .scanner-input:focus,
    .btn:focus,
    .nav-btn:focus {
        outline: 3px solid #3498db;
        outline-offset: 2px;
    }
    
    /* Better contrast for small screens */
    .nav-btn.active {
        background: #3498db;
        color: white;
    }
    
    /* Ensure text is readable */
    .card {
        background: white;
        border: 1px solid #e1e8ed;
    }
    
    /* Improve button spacing */
    .header-controls .btn + .btn {
        margin-left: 0.5rem;
    }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .scanner-input {
        border-width: 2px;
    }
    
    .card {
        box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    }
}
/* E
nhanced Current Event Display Styles for 7-Day Scanning Window */

/* Current Event Status Indicator */
.current-event {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: help;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Active event states */
.current-event.active {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-color: #28a745;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.current-event.active.today {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border-color: #17a2b8;
    box-shadow: 0 2px 4px rgba(23, 162, 184, 0.2);
}

.current-event.active.backfill {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border-color: #ffc107;
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.2);
}

/* Inactive event states */
.current-event.inactive {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #6c757d;
    border-color: #dee2e6;
}

.current-event.inactive.no-events {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-color: #dc3545;
}

.current-event.inactive.future {
    background: linear-gradient(135deg, #e2e3e5 0%, #d6d8db 100%);
    color: #383d41;
    border-color: #6c757d;
}

.current-event.inactive.expired {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    color: #856404;
    border-color: #fd79a8;
    opacity: 0.8;
}

/* Error state */
.current-event.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-color: #dc3545;
    animation: pulse-error 2s infinite;
}

@keyframes pulse-error {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Hover effects */
.current-event:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.current-event.active:hover {
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.current-event.active.today:hover {
    box-shadow: 0 4px 8px rgba(23, 162, 184, 0.3);
}

.current-event.active.backfill:hover {
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.3);
}

/* Enhanced Scanner Input Styles for Context */
.scanner-input-container {
    position: relative;
}

.scanner-input {
    transition: all 0.3s ease;
}

/* Scanner input states based on scanning context */
.scanner-input[placeholder*="TODAY"] {
    border-color: #17a2b8;
    box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.25);
}

.scanner-input[placeholder*="BACKFILL"] {
    border-color: #ffc107;
    box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.25);
}

.scanner-input:disabled[placeholder*="expired"],
.scanner-input:disabled[placeholder*="no longer available"] {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: #6c757d;
}

/* Status indicators for different scanning contexts */
.scanning-context-indicator {
    position: absolute;
    top: -8px;
    right: 8px;
    background: white;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid;
    z-index: 10;
}

.scanning-context-indicator.today {
    color: #0c5460;
    border-color: #17a2b8;
    background: #d1ecf1;
}

.scanning-context-indicator.backfill {
    color: #856404;
    border-color: #ffc107;
    background: #fff3cd;
}

.scanning-context-indicator.expired {
    color: #721c24;
    border-color: #dc3545;
    background: #f8d7da;
}

/* Dashboard enhancements for event context */
.dashboard-event-context {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid;
}

.dashboard-event-context.today {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    border-left-color: #17a2b8;
}

.dashboard-event-context.backfill {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-left-color: #ffc107;
}

.dashboard-event-context.no-events {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-left-color: #dc3545;
}

.event-context-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.event-context-description {
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0;
}

/* Responsive adjustments for current event display */
@media (max-width: 768px) {
    .current-event {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
        max-width: 200px;
    }
    
    .scanning-context-indicator {
        font-size: 0.6rem;
        padding: 1px 4px;
    }
    
    .dashboard-event-context {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
}

@media (max-width: 480px) {
    .current-event {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
        max-width: 150px;
    }
    
    .event-context-title {
        font-size: 0.9rem;
    }
    
    .event-context-description {
        font-size: 0.8rem;
    }
}

/* Accessibility improvements */
.current-event:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .current-event.active {
        border-width: 3px;
        font-weight: 700;
    }
    
    .current-event.inactive {
        border-width: 2px;
        font-weight: 600;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .current-event,
    .scanner-input,
    .scanning-context-indicator {
        transition: none;
    }
    
    .current-event:hover {
        transform: none;
    }
    
    @keyframes pulse-error {
        0%, 100% { opacity: 1; }
    }
}
/
* Connectivity Status Styles */
.connectivity-status {
    margin-top: 0.5rem;
}

.status-indicator-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.875rem;
}

.status-light {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

.status-light.success {
    background-color: #28a745;
    box-shadow: 0 0 6px rgba(40, 167, 69, 0.6);
}

.status-light.warning {
    background-color: #ffc107;
    box-shadow: 0 0 6px rgba(255, 193, 7, 0.6);
}

.status-light.error {
    background-color: #dc3545;
    box-shadow: 0 0 6px rgba(220, 53, 69, 0.6);
}

.status-light.unknown {
    background-color: #6c757d;
    box-shadow: 0 0 6px rgba(108, 117, 125, 0.6);
}

.status-light.disabled {
    background-color: #6c757d;
    animation: none;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

.status-text {
    color: white;
    font-weight: 500;
}

.status-details-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.status-details-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.status-icon {
    font-size: 0.875rem;
}

/* Status Modal Styles */
.status-section {
    margin-bottom: 1.5rem;
}

.status-section h4 {
    margin-bottom: 0.75rem;
    color: #2c3e50;
    font-size: 1rem;
    font-weight: 600;
}

.status-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    background: #f8f9fa;
}

.status-item.success {
    background: #d4edda;
    border-color: #c3e6cb;
}

.status-item.warning {
    background: #fff3cd;
    border-color: #ffeaa7;
}

.status-item.error {
    background: #f8d7da;
    border-color: #f5c6cb;
}

.status-item.disabled {
    background: #e2e3e5;
    border-color: #d6d8db;
}

.status-content {
    flex: 1;
}

.status-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.status-message {
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.status-ready {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.status-details {
    font-size: 0.875rem;
    color: #495057;
}

.status-details > div {
    margin-bottom: 0.25rem;
}

.error-message {
    color: #dc3545 !important;
    font-weight: 500;
}

.status-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.status-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
    text-align: center;
    color: #6c757d;
}

/* Scanner Status Integration */
.scanner-status-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.scanner-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.scanner-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.scanner-indicator.ready {
    background-color: #28a745;
    box-shadow: 0 0 6px rgba(40, 167, 69, 0.6);
    animation: pulse 2s infinite;
}

.scanner-indicator.error {
    background-color: #dc3545;
    box-shadow: 0 0 6px rgba(220, 53, 69, 0.6);
}

.scanner-indicator.warning {
    background-color: #ffc107;
    box-shadow: 0 0 6px rgba(255, 193, 7, 0.6);
}

.scanner-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
}

/* Sync Status Compact */
.sync-status-compact {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.sync-status-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.sync-status-indicator.online {
    background-color: #28a745;
}

.sync-status-indicator.offline {
    background-color: #dc3545;
}

.sync-status-indicator.syncing {
    background-color: #ffc107;
    animation: pulse 1s infinite;
}

.sync-status-text {
    font-size: 0.75rem;
}

/* Responsive Design for Status Elements */
@media (max-width: 480px) {
    .status-indicator-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .scanner-status-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .status-actions {
        flex-direction: column;
    }
    
    .status-actions .btn {
        width: 100%;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .status-light.success {
        background-color: #00ff00;
    }
    
    .status-light.warning {
        background-color: #ffff00;
    }
    
    .status-light.error {
        background-color: #ff0000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .status-light,
    .scanner-indicator,
    .sync-status-indicator {
        animation: none;
    }
}
/
* Environment Management Styles */

/* Environment Badge */
.environment-badge {
    position: fixed;
    top: 10px;
    right: 10px;
    background: #27ae60;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10000;
    font-family: monospace;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
    user-select: none;
}

.environment-badge:hover {
    transform: scale(1.1);
}

/* Environment-specific body classes */
body.env-development .app-header {
    border-bottom: 3px solid #ff6b35;
}

body.env-testing .app-header {
    border-bottom: 3px solid #f39c12;
}

body.env-production .app-header {
    border-bottom: 3px solid #27ae60;
}

/* Environment Switcher Modal */
.environment-switcher {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20000;
}

.environment-switcher-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.environment-switcher-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.environment-switcher-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
}

.environment-switcher-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #333;
}

.environment-switcher-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    color: #666;
    transition: all 0.2s ease;
}

.environment-switcher-close:hover {
    background: #f0f0f0;
    color: #333;
}

.environment-switcher-content {
    padding: 24px;
}

/* Current Environment Display */
.current-environment {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 24px;
}

.current-env-name {
    font-weight: 600;
    color: #333;
}

.current-env-badge {
    padding: 4px 8px;
    border-radius: 4px;
    color: white;
    font-size: 12px;
    font-weight: bold;
    font-family: monospace;
}

/* Environment Options Grid */
.environment-options h4 {
    margin-bottom: 16px;
    color: #333;
}

.environment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.environment-option {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    position: relative;
}

.environment-option:hover:not(.current):not(:disabled) {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.environment-option.current {
    border-color: #28a745;
    background: #f8fff9;
    cursor: default;
}

.environment-option:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.env-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    color: white;
    font-size: 12px;
    font-weight: bold;
    font-family: monospace;
    margin-bottom: 8px;
}

.env-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
    color: #333;
}

.env-description {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.env-current {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #28a745;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: bold;
}

/* Environment Configuration */
.environment-config {
    margin-bottom: 24px;
}

.environment-config h4 {
    margin-bottom: 16px;
    color: #333;
}

.config-item {
    margin-bottom: 16px;
}

.config-item label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
}

.config-item input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.config-item input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Environment Actions */
.environment-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Environment Confirmation Modal */
.environment-confirmation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 25000;
}

.environment-confirmation-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.environment-confirmation-modal .modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    max-width: 500px;
    width: 90%;
    padding: 24px;
}

.environment-confirmation-modal h3 {
    margin-bottom: 16px;
    color: #333;
    font-size: 1.25rem;
}

.warning-list {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 16px;
    margin: 16px 0;
}

.warning-list ul {
    margin-left: 20px;
    margin-top: 8px;
}

.warning-list li {
    margin-bottom: 4px;
}

.production-warning {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 12px;
    margin: 16px 0;
    color: #721c24;
    font-weight: 500;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* Environment Warning Banner */
#environmentWarningBanner {
    position: relative;
    width: 100%;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    padding: 8px 0;
    border-bottom: 1px solid #ffc107;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#environmentWarningBanner .banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

#environmentWarningBanner .banner-icon {
    font-size: 24px;
}

#environmentWarningBanner .banner-title {
    font-weight: 600;
    font-size: 16px;
    flex: 1;
    white-space: nowrap;
}

#environmentWarningBanner .banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

#environmentWarningBanner .banner-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

#environmentWarningBanner .banner-btn-primary {
    background: #007bff;
    color: white;
}

#environmentWarningBanner .banner-btn-primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

#environmentWarningBanner .banner-btn-dismiss {
    background: transparent;
    color: #856404;
    opacity: 0.7;
}

#environmentWarningBanner .banner-btn-dismiss:hover {
    opacity: 1;
    background: rgba(133, 100, 4, 0.1);
}

/* Responsive adjustments for environment warning banner */
@media (max-width: 768px) {
    #environmentWarningBanner {
        padding: 6px 0;
    }
    
    #environmentWarningBanner .banner-content {
        gap: 8px;
        padding: 0 0.75rem;
    }
    
    #environmentWarningBanner .banner-title {
        font-size: 14px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    #environmentWarningBanner .banner-icon {
        font-size: 18px;
        flex-shrink: 0;
    }
    
    #environmentWarningBanner .banner-btn {
        padding: 6px 10px;
        font-size: 12px;
        min-width: auto;
    }
    
    #environmentWarningBanner .banner-actions {
        gap: 6px;
    }
}

@media (max-width: 480px) {
    #environmentWarningBanner {
        padding: 5px 0;
    }
    
    #environmentWarningBanner .banner-content {
        gap: 6px;
        padding: 0 0.5rem;
    }
    
    #environmentWarningBanner .banner-title {
        font-size: 13px;
    }
    
    #environmentWarningBanner .banner-btn {
        padding: 5px 8px;
        font-size: 11px;
    }
}

.warning-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    margin-bottom: 12px;
    color: #856404;
}

.warning-close {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #856404;
    padding: 2px;
}

.environment-warnings ul {
    margin: 12px 0;
    padding-left: 20px;
}

.environment-warnings li {
    margin-bottom: 4px;
    color: #856404;
    font-size: 14px;
}

/* Environment Messages */
.environment-message {
    position: fixed;
    top: 60px;
    right: 10px;
    padding: 10px 15px;
    border-radius: 4px;
    z-index: 9999;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-weight: 500;
}

.environment-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.environment-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.environment-message.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.environment-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Debug-only elements */
.debug-only {
    display: none;
}

body.env-development .debug-only {
    display: block;
}

/* Mobile Responsiveness for Environment UI */
@media (max-width: 768px) {
    .environment-switcher-modal {
        width: 95%;
        max-height: 90vh;
    }
    
    .environment-switcher-content {
        padding: 16px;
    }
    
    .environment-grid {
        grid-template-columns: 1fr;
    }
    
    .environment-actions {
        flex-direction: column;
    }
    
    .environment-actions .btn {
        width: 100%;
    }
    
    .environment-warnings {
        right: 5px;
        left: 5px;
        max-width: none;
    }
    
    .environment-message {
        right: 5px;
        left: 5px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions .btn {
        width: 100%;
    }
}

/* Environment-specific styling adjustments */
body.env-development {
    /* Development environment gets slightly different styling */
}

body.env-testing {
    /* Testing environment styling */
}

body.env-production {
    /* Production environment styling - most conservative */
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .environment-badge {
        border: 2px solid white;
    }
    
    .environment-option {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .environment-badge,
    .environment-option,
    .environment-switcher-close {
        transition: none;
    }
    
    .environment-badge:hover {
        transform: none;
    }
    
    .environment-option:hover:not(.current):not(:disabled) {
        transform: none;
    }
}