/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1e40af;
    --primary-light: #3b82f6;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #f9fafb;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #dc2626;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --font-scale: 1;
}

[data-theme="dark"] {
    --text-color: #f9fafb;
    --text-light: #d1d5db;
    --bg-color: #111827;
    --card-bg: #1f2937;
    --border-color: #374151;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    /* Disable scroll anchoring to prevent jumping */
    scroll-anchor: none;
    /* Improve scroll performance */
    scroll-behavior: smooth;
    font-size: calc(16px * var(--font-scale));
}

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

/* Overall Progress Bar */
.overall-progress-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.progress-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-light);
}

.progress-track {
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color), var(--primary-light));
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-meta {
    margin-top: 0.75rem;
    display: flex;
    justify-content: flex-end;
}

.skipped-summary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.9rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(30, 64, 175, 0.2);
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.skipped-summary.has-data {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(147, 51, 234, 0.25));
    border-color: rgba(168, 85, 247, 0.6);
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.3), 0 0 0 2px rgba(168, 85, 247, 0.1);
    animation: skippedPulse 2s ease-in-out infinite;
    transform: scale(1.02);
}

@keyframes skippedPulse {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(168, 85, 247, 0.3), 0 0 0 2px rgba(168, 85, 247, 0.1);
    }
    50% {
        box-shadow: 0 6px 20px rgba(168, 85, 247, 0.4), 0 0 0 3px rgba(168, 85, 247, 0.2);
    }
}

.skipped-summary.has-data .skipped-summary-count {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(147, 51, 234, 0.15));
    border-color: rgba(168, 85, 247, 0.5);
    color: #9333ea;
    font-weight: 700;
    animation: countBounce 2s ease-in-out infinite;
}

@keyframes countBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.skipped-summary:not(:disabled):hover,
.skipped-summary:not(:disabled):focus-visible {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 24px rgba(168, 85, 247, 0.4), 0 0 0 3px rgba(168, 85, 247, 0.2);
    outline: none;
}

.skipped-summary.has-data:not(:disabled):hover,
.skipped-summary.has-data:not(:disabled):focus-visible {
    animation: none; /* Stop pulse on hover */
}

.skipped-summary:disabled {
    cursor: default;
    opacity: 0.55;
    box-shadow: none;
    transform: none;
}

.skipped-summary-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    min-height: 2rem;
    padding: 0 0.5rem;
    border-radius: 999px;
    background: white;
    color: var(--primary-color);
    border: 1px solid rgba(30, 64, 175, 0.2);
    font-size: 1rem;
}

.skipped-summary.has-data .skipped-summary-count {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(30, 64, 175, 0.35);
}

.skipped-summary-label {
    white-space: nowrap;
}

@media (max-width: 768px) {
    .progress-meta {
        justify-content: center;
    }
    
    .skipped-summary {
        width: 100%;
        justify-content: center;
    }
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    padding: 1.5rem 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    /* Fixed height to prevent layout shifts */
    min-height: 100px;
    /* Disable scroll anchoring for this element */
    scroll-anchor: none;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.05"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.05"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.sticky-header {
    position: sticky;
    top: 0;
    z-index: 99;
    /* Ensure consistent positioning */
    will-change: transform;
    /* Prevent layout shifts */
    contain: layout style;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    flex-wrap: wrap;
}

.title-section h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.025em;
    position: relative;
    z-index: 1;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 0.75rem;
}

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

.status-badge {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.offline-ready {
    background-color: rgba(34, 197, 94, 0.3);
    border: 1px solid rgba(34, 197, 94, 0.5);
}

.controls-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.controls-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.settings-toggle {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

.settings-toggle:hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
}

/* Controls Toggle Button */
.controls-toggle {
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    align-self: flex-start;
}

.controls-toggle:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e3a8a 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Controls Content */
.controls-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 0.75rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    max-height: 80vh;
    overflow-y: auto;
}

.controls-content.hidden {
    display: none;
}

.settings-content {
    background: rgba(255, 255, 255, 0.95);
}

/* Crew Display Inline */
.crew-display-inline {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

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

.crew-header-inline .section-title {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.add-crew-btn-inline {
    padding: 0.5rem 1rem;
    background: var(--primary-light);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.add-crew-btn-inline:hover {
    background: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.add-crew-btn-inline:active {
    transform: translateY(0);
}

.crew-list-inline {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.crew-empty-message {
    color: var(--text-light);
    text-align: center;
    font-style: italic;
    font-size: 0.875rem;
    margin: 0.5rem 0;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 0.5rem;
    border: 1px dashed var(--border-color);
}

.crew-member-inline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.crew-member-inline:hover {
    background: rgba(59, 130, 246, 0.02);
    border-color: var(--primary-light);
}

.crew-name-input-inline {
    flex: 1;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 0.875rem;
    transition: all 0.2s ease;
    min-width: 0;
}

.crew-name-input-inline:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.crew-name-input-inline::placeholder {
    color: var(--text-light);
}

.crew-position-select-inline {
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 140px;
}

.crew-position-select-inline:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.crew-delete-btn-inline {
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 50%;
    background: var(--error-color);
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
}

.crew-delete-btn-inline:hover {
    background: #b91c1c;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.crew-delete-btn-inline:active {
    transform: scale(0.95);
}

/* Settings Section */
.settings-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.setting-btn {
    width: 100%;
    justify-content: center;
}

/* Remove footer actions styling since it's now in settings */
.footer-actions {
    display: none;
}

/* Section Titles */
.section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

/* Flight Details Wrapper - Side by Side Layout */
.flight-details-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

/* Flight Details Section */
.flight-details-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    align-items: end;
}

.flight-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.flight-input-group label {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1f2937;
}

.flight-input {
    padding: 0.75rem;
    border: 2px solid #d1d5db;
    border-radius: 0.5rem;
    background-color: white;
    color: #1f2937;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.flight-input:focus {
    outline: none;
    border-color: var(--primary-light);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.flight-input::placeholder {
    color: #6b7280;
}

/* Filters Section */
.filters-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

/* Mobile Responsiveness for Controls */
@media (max-width: 768px) {
    .controls-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .controls-toggle {
        width: 100%;
    }
    
    .controls-content {
        padding: 1rem;
        gap: 1.5rem;
    }
    
    .flight-details-wrapper {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .flight-details-section {
        gap: 0.75rem;
    }
    
    .filters-section {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .flight-input,
    .search-group input,
    .filter-group select {
        font-size: 1rem; /* Prevent zoom on iOS */
    }
    
    .section-title {
        font-size: 1rem;
    }
    
    .crew-member-inline {
        padding: 0.625rem;
        flex-wrap: wrap;
    }
    
    .crew-name-input-inline {
        min-width: 100%;
        order: 1;
        font-size: 1rem; /* Prevent zoom on iOS */
    }
    
    .crew-position-select-inline {
        flex: 1;
        min-width: 0;
        order: 2;
        font-size: 1rem; /* Prevent zoom on iOS */
    }
    
    .crew-delete-btn-inline {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 1rem;
        order: 3;
    }
    
    .crew-header-inline {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .add-crew-btn-inline {
        width: 100%;
        justify-content: center;
    }
}

/* Search Group */
.search-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    position: relative;
    min-width: 200px;
}

.search-group label {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1f2937;
}

.search-group input {
    padding: 0.75rem 2rem 0.75rem 0.75rem;
    border: 2px solid #d1d5db;
    border-radius: 0.5rem;
    background-color: white;
    color: #1f2937;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.search-group input::placeholder {
    color: #6b7280;
}

.search-group input:focus {
    outline: none;
    border-color: var(--primary-light);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.clear-search-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s;
    margin-top: 0.75rem;
}

.clear-search-btn:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.filter-group label {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1f2937;
}

.filter-group select {
    padding: 0.75rem;
    border: 2px solid #d1d5db;
    border-radius: 0.5rem;
    background-color: white;
    color: #1f2937;
    font-size: 0.875rem;
    font-weight: 500;
    min-width: 140px;
    transition: all 0.2s;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary-light);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.reset-btn {
    background-color: #fbbf24;
    color: #1f2937;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.reset-btn:hover {
    background-color: #f59e0b;
}

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

.checklist-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Phase Styles */
.phase-card {
    background: var(--card-bg);
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    backdrop-filter: blur(10px);
}

.phase-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.phase-content {
    transition: clip-path 0.3s ease-out;
    clip-path: inset(0 0 0 0);
    /* Prevent layout shifts during animation */
    contain: layout style;
    /* Disable scroll anchoring */
    scroll-anchor: none;
}

.phase-card.collapsed .phase-content {
    clip-path: inset(0 0 100% 0);
    transition: clip-path 0.3s ease-in;
}

.phase-card.completed {
    opacity: 0.7;
}

.phase-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.8) 100%);
    backdrop-filter: blur(10px);
    /* Fixed height to prevent layout shifts */
    min-height: 80px;
    /* Disable scroll anchoring */
    scroll-anchor: none;
    /* Prevent layout shifts */
    contain: layout style;
}

.phase-header:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.9) 100%);
}

.phase-header.sticky {
    position: sticky;
    top: 120px; /* Adjust based on header height */
    z-index: 10;
    background: var(--card-bg);
    box-shadow: var(--shadow);
}

.phase-header.completed {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: var(--success-color);
}

.phase-header .collapse-indicator {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
    color: var(--text-light);
}

.phase-header.collapsed .collapse-indicator {
    transform: rotate(-90deg);
}

.phase-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.phase-label {
    background-color: #dbeafe;
    color: #1e40af;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.phase-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1f2937;
    letter-spacing: -0.025em;
}

.phase-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-text {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 500;
}

.phase-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.mark-phase-btn,
.clear-phase-btn {
    background: none;
    border: none;
    font-size: 0.875rem;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.mark-phase-btn {
    color: var(--success-color);
}

.mark-phase-btn:hover {
    color: #059669;
    background-color: rgba(16, 185, 129, 0.1);
}

.clear-phase-btn {
    color: var(--error-color);
}

.clear-phase-btn:hover {
    color: #b91c1c;
    background-color: rgba(220, 38, 38, 0.1);
}

.phase-content {
    padding: 2rem;
    background: var(--card-bg);
}

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

.task-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    min-height: 80px;
    background: var(--card-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.3s ease-out;
}

.task-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-light);
    transition: width 0.3s ease;
}

.task-item:hover::before {
    width: 8px;
}

.task-item:hover {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(59, 130, 246, 0.02) 100%);
    border-color: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.task-item:focus-within {
    outline: 3px solid var(--primary-light);
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.1);
}

.task-item.completed {
    opacity: 0.7;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(16, 185, 129, 0.1) 100%);
    border-color: rgba(16, 185, 129, 0.2);
}

.task-item.completed::before {
    background: var(--success-color);
    width: 6px;
}

.task-item.completed.hidden {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    transition: all 0.3s ease-out;
}

.task-item.skipped {
    opacity: 1;
    background-color: rgba(245, 158, 11, 0.08);
    border-left: 4px solid var(--warning-color);
    border-radius: 0.5rem;
}

.task-item.skipped .task-description {
    text-decoration: none;
    font-style: normal;
    color: var(--text-color);
    font-weight: 500;
}

.task-item.skipped .task-position {
    color: var(--warning-color);
    font-weight: 600;
}

.task-checkbox {
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 0.375rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    margin-top: 0.125rem;
    background-color: var(--card-bg);
}

.task-checkbox:hover {
    border-color: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.2);
}

.task-checkbox.checked {
    background-color: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.task-checkbox.checked::after {
    content: '✓';
    font-size: 1rem;
    font-weight: bold;
}

.task-content {
    flex: 1;
}

.task-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.skip-task-btn,
.unskip-task-btn {
    padding: 0.375rem 0.75rem;
    background: var(--warning-color);
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.skip-task-btn:hover,
.unskip-task-btn:hover {
    background: #d97706;
    transform: scale(1.05);
}

.unskip-task-btn {
    background: var(--success-color);
}

.unskip-task-btn:hover {
    background: #059669;
}

.note-task-btn,
.note-phase-btn {
    padding: 0.375rem 0.75rem;
    background: var(--primary-light);
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.note-task-btn:hover,
.note-phase-btn:hover {
    background: var(--primary-color);
    transform: scale(1.05);
}

.task-description {
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.task-position {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 500;
}

/* Footer Actions */
.footer-actions {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.footer-left,
.footer-center,
.footer-right {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.footer-center {
    flex: 1;
    justify-content: center;
}

.action-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background-color: var(--bg-color);
    border-color: var(--text-light);
}

.clear-btn {
    color: var(--error-color);
    border-color: rgba(220, 38, 38, 0.3);
}

.clear-btn:hover {
    background-color: rgba(220, 38, 38, 0.1);
    border-color: var(--error-color);
}

.mark-all-btn {
    color: var(--success-color);
    border-color: rgba(16, 185, 129, 0.3);
}

.mark-all-btn:hover {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: var(--success-color);
}

.dark-mode-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    border-color: var(--border-color);
}

.dark-mode-btn:hover {
    background-color: var(--bg-color);
}

.dark-mode-icon {
    font-size: 1rem;
}

.font-size-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.8);
    padding: 0.5rem;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.font-size-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border: 2px solid var(--primary-light);
    border-radius: 50%;
    background: transparent;
    color: var(--primary-light);
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.font-size-btn:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.font-size-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.font-size-label {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 700;
    white-space: nowrap;
    background: rgba(59, 130, 246, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
}

/* Flight Details Bar */


.crew-roster-btn {
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    color: white;
    border: 2px solid var(--primary-light);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.crew-roster-btn:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e3a8a 100%);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Service Style Selector */
.service-style-group {
    display: flex;
    align-items: center;
}

.service-style-select {
    padding: 0.75rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.95);
    color: #1f2937;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-width: 200px;
}

.service-style-select:focus {
    outline: none;
    border-color: white;
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3), 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

/* Crew Display Section */
.crew-display {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    padding: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    max-height: 200px;
    overflow-y: auto;
}

.crew-display.hidden {
    display: none;
}

.crew-display-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.crew-display-title {
    color: white;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.crew-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.crew-member {
    background: rgba(255, 255, 255, 0.95);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    min-width: fit-content;
    flex-shrink: 0;
}

.crew-member:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.crew-avatar {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.crew-info h4 {
    color: #1f2937;
    font-size: 0.875rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.crew-info p {
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 500;
    margin: 0;
    line-height: 1.2;
}

.close-crew-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 1.5rem;
    height: 1.5rem;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-crew-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Flight Timer Section */
.flight-timer {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.flight-timer.hidden {
    display: none;
}

.timer-content {
    max-width: 1200px;
    margin: 0 auto;
}

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

.timer-title {
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.start-timer-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.start-timer-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.start-timer-btn.active {
    background: #dc2626;
    border-color: #dc2626;
    animation: pulse 2s infinite;
}

.timer-display {
    text-align: center;
    margin-bottom: 2rem;
}

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

#countdown-time {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    font-family: 'Courier New', monospace;
    letter-spacing: 0.1em;
}

.timer-status {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.service-time-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.25rem;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-time-card.upcoming {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.2) 100%);
    border: 2px solid #f59e0b;
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

.service-time-card.current {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.2) 100%);
    border: 2px solid #10b981;
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
    animation: pulse 2s infinite;
}

.service-time-card.completed {
    opacity: 0.7;
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.1) 0%, rgba(107, 114, 128, 0.2) 100%);
    border: 2px solid #6b7280;
}

.service-time-card h4 {
    color: #1f2937;
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.service-time-display {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1f2937;
    font-family: 'Courier New', monospace;
    margin-bottom: 0.5rem;
}

.service-time-description {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

.service-time-card.current .service-time-description,
.service-time-card.upcoming .service-time-description {
    color: #1f2937;
    font-weight: 600;
}

/* Quick Navigation */
.quick-nav {
    position: sticky;
    top: 72px;
    z-index: 98;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.quick-nav-toggle {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    border: none;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.quick-nav-toggle:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e3a8a 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.quick-nav-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    padding: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
    transition: all 0.3s ease;
    background: var(--bg-color);
}

.quick-nav-menu.hidden {
    max-height: 0;
    padding: 0 1rem;
    overflow: hidden;
}

.quick-nav-btn {
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.quick-nav-btn:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e3a8a 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.quick-nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.quick-nav-btn:hover::before {
    left: 100%;
}

.quick-nav-btn.completed {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* Briefing Snapshot */
.briefing-bar {
    position: sticky;
    top: 64px;
    z-index: 97;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.briefing-bar.collapsed .briefing-content {
    display: none;
}

.briefing-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
}

.briefing-summary {
    font-size: 0.85rem;
    color: var(--text-light);
    flex: 1;
    text-align: left;
}

.briefing-caret {
    font-size: 1rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.briefing-toggle[aria-expanded="true"] .briefing-caret {
    transform: rotate(180deg);
}

.briefing-content {
    padding: 0 1.25rem 1rem;
    background: var(--card-bg);
}

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

.briefing-item dt {
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.briefing-item dd {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

/* Focus Mode */
.focus-mode-toggle {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 999px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    align-self: flex-start;
}

.focus-mode-toggle[aria-pressed="false"] {
    background: rgba(15, 118, 110, 0.2);
    border-color: rgba(15, 118, 110, 0.6);
}

.focus-mode-toggle:hover {
    transform: translateY(-1px);
}

.focus-mode-container {
    position: relative;
    margin: 1.5rem auto;
    max-width: 900px;
    width: 100%;
    background: var(--card-bg);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    padding: 1.25rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.focus-mode-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.focus-mode-status {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.focus-phase-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    background: rgba(30, 64, 175, 0.12);
    color: var(--primary-color);
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.focus-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.focus-task-index {
    font-size: 0.85rem;
    color: var(--text-light);
}

.focus-timeline-track {
    position: relative;
    height: 6px;
    border-radius: 999px;
    background: var(--border-color);
    overflow: hidden;
}

.focus-timeline-complete {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--success-color), var(--primary-light));
    transition: width 0.3s ease;
}

.focus-timeline-marker {
    position: absolute;
    top: -4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    background: var(--primary-color);
    box-shadow: 0 2px 6px rgba(30, 64, 175, 0.35);
    transform: translateX(-50%);
    transition: left 0.3s ease;
}

.focus-view-toggle {
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.focus-view-toggle[aria-pressed="false"] {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    border-color: transparent;
    color: white;
}

.focus-task-card {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.5rem;
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.08), rgba(30, 64, 175, 0.08));
    border: 1px solid rgba(59, 130, 246, 0.2);
    min-height: 220px;
    touch-action: pan-x;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.focus-task-card.swipe-right {
    border-color: rgba(16, 185, 129, 0.8);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.25);
}

.focus-task-card.swipe-left {
    border-color: rgba(249, 115, 22, 0.8);
    box-shadow: 0 10px 25px rgba(249, 115, 22, 0.25);
}

.focus-task-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: space-between;
    flex-wrap: wrap;
}

.focus-task-position {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
}

.focus-task-flags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-light);
}

.focus-task-flags span {
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.12);
    color: #0f766e;
    font-weight: 600;
}

.focus-task-title {
    font-size: 1.5rem;
    line-height: 1.35;
    color: var(--text-color);
    font-weight: 700;
}

.focus-task-details {
    font-size: 1rem;
    color: var(--text-light);
}

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

.focus-secondary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.focus-primary-btn,
.focus-secondary-btn,
.focus-ghost-btn,
.focus-note-btn {
    cursor: pointer;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
}

.focus-primary-btn {
    background: linear-gradient(135deg, var(--success-color) 0%, #14b8a6 100%);
    color: white;
    box-shadow: 0 8px 16px rgba(20, 184, 166, 0.3);
}

.focus-secondary-btn {
    background: rgba(15, 23, 42, 0.08);
    color: var(--text-color);
}

.focus-ghost-btn,
.focus-note-btn {
    background: rgba(15, 23, 42, 0.05);
    color: var(--text-light);
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
}

.focus-note-btn {
    border: 1px dashed rgba(30, 64, 175, 0.5);
    background: rgba(30, 64, 175, 0.08);
    color: var(--primary-color);
}

.focus-primary-btn:active,
.focus-secondary-btn:active,
.focus-ghost-btn:active,
.focus-note-btn:active {
    transform: translateY(1px);
}

.focus-empty-state {
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: 16px;
    border: 1px dashed var(--border-color);
    background: rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.focus-empty-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.focus-undo-toast {
    position: absolute;
    bottom: -1.5rem;
    left: 50%;
    transform: translate(-50%, 100%);
    background: var(--card-bg);
    border-radius: 999px;
    padding: 0.6rem 1rem;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid var(--border-color);
}

.focus-undo-btn {
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
}

.service-callout {
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.15));
    color: #1e3a8a;
    font-weight: 600;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.service-callout.current {
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.2), rgba(234, 179, 8, 0.2));
    border-color: rgba(234, 179, 8, 0.6);
    color: #92400e;
}

.service-callout.urgent {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.2));
    border-color: rgba(220, 38, 38, 0.5);
    color: #991b1b;
}

body.focus-mode-active .checklist-container,
body.focus-mode-active .quick-nav,
body.focus-mode-active .skipped-section {
    display: none;
}

/* Focus View Skipped Tasks Section */
.focus-skipped-section {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(168, 85, 247, 0.08), rgba(147, 51, 234, 0.08));
    border: 1px solid rgba(168, 85, 247, 0.2);
    animation: fadeIn 0.4s ease-out;
}

.focus-skipped-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
}

.focus-skipped-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #9333ea;
    margin: 0;
}

.focus-skipped-count {
    font-size: 0.9rem;
    font-weight: 600;
    color: #9333ea;
    background: rgba(168, 85, 247, 0.15);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
}

.focus-skipped-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.focus-skipped-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.25rem;
    border: 1px solid rgba(168, 85, 247, 0.3);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.1);
    transition: all 0.3s ease;
    animation: fadeIn 0.3s ease-out;
    position: relative;
}

.focus-skipped-card:not(:last-child) {
    margin-bottom: 0.5rem;
}

.focus-skipped-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, rgba(168, 85, 247, 0.6), rgba(147, 51, 234, 0.6));
    border-radius: 16px 0 0 16px;
    pointer-events: none;
}

.focus-skipped-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.2);
    border-color: rgba(168, 85, 247, 0.5);
}

.focus-skipped-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.focus-skipped-phase {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.focus-skipped-position {
    font-size: 0.85rem;
    font-weight: 600;
    color: #9333ea;
    background: rgba(168, 85, 247, 0.1);
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
}

.focus-skipped-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 1rem 0;
    line-height: 1.4;
}

.focus-skipped-card-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.focus-skipped-complete-btn {
    flex: 1;
    min-width: 120px;
    padding: 0.65rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.15));
    color: #059669;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.focus-skipped-complete-btn:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(5, 150, 105, 0.25));
    border-color: rgba(16, 185, 129, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.focus-skipped-complete-btn:active {
    transform: translateY(0);
}

.focus-skipped-note-btn {
    padding: 0.65rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.focus-skipped-note-btn:hover {
    background: var(--card-bg);
    border-color: var(--primary-light);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .focus-skipped-card-actions {
        flex-direction: column;
    }
    
    .focus-skipped-complete-btn,
    .focus-skipped-note-btn {
        width: 100%;
    }
}

body.focus-mode-active .footer-actions {
    position: sticky;
    bottom: 0;
}

body:not(.focus-mode-active) .focus-mode-container {
    opacity: 0.75;
}

body:not(.focus-mode-active) .focus-mode-container .focus-task-card,
body:not(.focus-mode-active) .focus-mode-container .focus-empty-state {
    display: none;
}

@media (max-width: 768px) {
    .focus-mode-container {
        margin: 1rem;
        padding: 1rem;
        border-radius: 18px;
    }
    .focus-task-card {
        padding: 1.1rem;
        border-radius: 16px;
    }
    .focus-actions {
        grid-template-columns: 1fr;
    }
    .focus-primary-btn,
    .focus-secondary-btn {
        width: 100%;
    }
    .focus-mode-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* My Position Button */
.my-position-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.my-position-btn {
    padding: 0.75rem 1.25rem;
    border: 2px solid #fbbf24;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(251, 191, 36, 0.2) 100%);
    color: var(--text-color);
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.2);
    position: relative;
    overflow: hidden;
}

.my-position-btn:hover {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(251, 191, 36, 0.3) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(251, 191, 36, 0.3);
}

.my-position-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.1), transparent);
    transition: left 0.5s;
}

.my-position-btn:hover::before {
    left: 100%;
}

.my-position-btn.active {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1f2937;
    box-shadow: 0 4px 16px rgba(251, 191, 36, 0.4);
    transform: translateY(-1px);
}

/* New Flight Button */
.new-flight-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    font-weight: 600;
}

.new-flight-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

/* Toggle Completed Button */
.toggle-completed-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toggle-completed-btn.active {
    background: var(--primary-light);
    color: white;
    border-color: var(--primary-light);
}

/* Skipped Tasks Section */
.skipped-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(245, 158, 11, 0.05);
    border: 2px dashed var(--warning-color);
    border-radius: 0.75rem;
}

.skipped-section.highlight {
    animation: skipped-focus 1.2s ease-in-out 0s 1;
}

@keyframes skipped-focus {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(245, 158, 11, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}

.skipped-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.skipped-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--warning-color);
}

.skipped-count {
    font-size: 0.875rem;
    color: var(--text-light);
}

.skipped-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Swipe indicator */
.task-item {
    position: relative;
    touch-action: pan-y;
    transition: transform 0.2s ease;
}

.task-item.swiping {
    transition: none;
}

.task-item.swipe-left {
    background: rgba(16, 185, 129, 0.1);
}

.task-item.swipe-right {
    background: rgba(220, 38, 38, 0.1);
}

/* PWA Install Prompt */
.pwa-install-prompt {
    position: fixed;
    bottom: 80px;
    left: 1rem;
    right: 1rem;
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideUp 0.3s ease;
}

.pwa-install-prompt.hidden {
    display: none;
}

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

.pwa-prompt-content {
    flex: 1;
}

.pwa-prompt-title {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.pwa-prompt-text {
    font-size: 0.875rem;
    opacity: 0.9;
}

.pwa-prompt-buttons {
    display: flex;
    gap: 0.5rem;
}

.pwa-install-btn,
.pwa-dismiss-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.pwa-install-btn {
    background: white;
    color: var(--primary-color);
}

.pwa-install-btn:hover {
    transform: scale(1.05);
}

.pwa-dismiss-btn {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

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

/* Email Button */
.email-btn {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    border: none;
    font-weight: 600;
}

.email-btn:hover {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

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

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s;
}

.close-btn:hover {
    background: var(--bg-color);
    color: var(--text-color);
}

.modal-body {
    padding: 0 1.5rem 1.5rem 1.5rem;
}

/* Crew Roster Styles */
.crew-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.crew-member {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.crew-name-input,
.crew-position-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 0.875rem;
}

.crew-name-input {
    flex: 1;
    min-width: 120px;
}

.crew-position-select {
    min-width: 100px;
}

.remove-crew-btn {
    background: var(--error-color);
    color: white;
    border: none;
    border-radius: 0.375rem;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.remove-crew-btn:hover {
    background: #b91c1c;
    transform: scale(1.05);
}

.add-crew-btn {
    width: 100%;
    padding: 0.75rem;
    background: var(--primary-light);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.add-crew-btn:hover {
    background: var(--primary-color);
    transform: translateY(-1px);
}

/* Notes Styles */
#notes-textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 0.875rem;
    line-height: 1.5;
    resize: vertical;
    min-height: 120px;
    margin-bottom: 1rem;
}

#notes-textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.save-note-btn,
.cancel-note-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.save-note-btn {
    background: var(--success-color);
    color: white;
}

.save-note-btn:hover {
    background: #059669;
}

.cancel-note-btn {
    background: var(--text-light);
    color: white;
}

.cancel-note-btn:hover {
    background: #6b7280;
}

/* Notes indicators */
.note-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--primary-light);
    border-radius: 50%;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.phase-header .note-indicator {
    background: var(--warning-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .controls-section {
        justify-content: space-between;
    }
    
    .search-group {
        min-width: 150px;
    }
    
    .filter-group select {
        min-width: 100px;
    }
    
    .phase-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .phase-progress {
        align-self: stretch;
        justify-content: space-between;
    }
    
    .footer-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .footer-left,
    .footer-center,
    .footer-right {
        justify-content: center;
        width: 100%;
    }
    
    .footer-left {
        flex-direction: column;
        align-items: stretch;
    }
    
    .font-size-controls {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 1rem;
    }
    
    .phase-content {
        padding: 1rem;
    }
    
    .controls-section {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .search-group {
        min-width: auto;
    }
    
    .filter-group {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }
    
    .filter-group select {
        flex: 1;
        min-width: auto;
    }
    
    /* Larger touch targets for mobile */
    .task-item {
        padding: 1rem;
        min-height: 70px;
    }
    
    .task-checkbox {
        width: 2rem;
        height: 2rem;
    }
    
    .action-btn {
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
        min-height: 48px;
    }
    
    .mark-phase-btn,
    .clear-phase-btn {
        padding: 0.5rem 0.75rem;
        font-size: 1rem;
        min-height: 44px;
    }
    
    .font-size-btn {
        width: 3rem;
        height: 3rem;
        font-size: 1.5rem;
    }
    
    .skip-task-btn,
    .unskip-task-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
        min-height: 44px;
    }
}

/* Phase-specific colors */
.phase-checkin .phase-label {
    background-color: #dbeafe;
    color: #1e40af;
}

.phase-preflight .phase-label {
    background-color: #dcfce7;
    color: #16a34a;
}

.phase-boarding .phase-label {
    background-color: #fef3c7;
    color: #d97706;
}

.phase-departure .phase-label {
    background-color: #fce7f3;
    color: #be185d;
}

.phase-cruise .phase-label {
    background-color: #e0e7ff;
    color: #7c3aed;
}

.phase-arrival .phase-label {
    background-color: #f0fdf4;
    color: #059669;
}

.phase-postflight .phase-label {
    background-color: #f3f4f6;
    color: #374151;
}

.focus-phase-chip.phase-checkin { background-color: #dbeafe; color: #1e40af; }
.focus-phase-chip.phase-preflight { background-color: #dcfce7; color: #166534; }
.focus-phase-chip.phase-boarding { background-color: #fef3c7; color: #b45309; }
.focus-phase-chip.phase-departure { background-color: #fce7f3; color: #be185d; }
.focus-phase-chip.phase-cruise { background-color: #e0e7ff; color: #4338ca; }
.focus-phase-chip.phase-arrival { background-color: #f0fdf4; color: #047857; }
.focus-phase-chip.phase-postflight { background-color: #f3f4f6; color: #1f2937; }

[data-theme="dark"] .focus-phase-chip.phase-checkin { background-color: rgba(59, 130, 246, 0.2); color: #93c5fd; }
[data-theme="dark"] .focus-phase-chip.phase-preflight { background-color: rgba(34, 197, 94, 0.2); color: #86efac; }
[data-theme="dark"] .focus-phase-chip.phase-boarding { background-color: rgba(245, 158, 11, 0.2); color: #fcd34d; }
[data-theme="dark"] .focus-phase-chip.phase-departure { background-color: rgba(236, 72, 153, 0.2); color: #f9a8d4; }
[data-theme="dark"] .focus-phase-chip.phase-cruise { background-color: rgba(139, 92, 246, 0.2); color: #c4b5fd; }
[data-theme="dark"] .focus-phase-chip.phase-arrival { background-color: rgba(5, 150, 105, 0.2); color: #6ee7b7; }
[data-theme="dark"] .focus-phase-chip.phase-postflight { background-color: rgba(107, 114, 128, 0.2); color: #d1d5db; }

/* Dark mode phase colors */
[data-theme="dark"] .phase-checkin .phase-label {
    background-color: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

[data-theme="dark"] .phase-preflight .phase-label {
    background-color: rgba(34, 197, 94, 0.2);
    color: #86efac;
}

[data-theme="dark"] .phase-boarding .phase-label {
    background-color: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
}

[data-theme="dark"] .phase-departure .phase-label {
    background-color: rgba(236, 72, 153, 0.2);
    color: #f9a8d4;
}

[data-theme="dark"] .phase-cruise .phase-label {
    background-color: rgba(139, 92, 246, 0.2);
    color: #c4b5fd;
}

[data-theme="dark"] .phase-arrival .phase-label {
    background-color: rgba(5, 150, 105, 0.2);
    color: #6ee7b7;
}

[data-theme="dark"] .phase-postflight .phase-label {
    background-color: rgba(107, 114, 128, 0.2);
    color: #d1d5db;
}

/* Loading and empty states */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

/* Search highlighting */
.search-highlight {
    background-color: rgba(245, 158, 11, 0.3);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-weight: 600;
}

[data-theme="dark"] .search-highlight {
    background-color: rgba(245, 158, 11, 0.5);
    color: #1f2937;
}

/* Smooth transitions for all interactive elements */
* {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* Focus styles for better accessibility */
button:focus,
select:focus,
input:focus,
.task-item:focus {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

/* Skip link for screen readers */
.skip-link {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
    transform: translateY(-200%);
    transition: transform 0.2s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

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

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --text-light: #000000;
    }
    
    [data-theme="dark"] {
        --border-color: #ffffff;
        --text-light: #ffffff;
    }
}

/* Enhanced Notification System */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--success-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    transform: translateX(calc(100% + 20px));
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    opacity: 0;
    max-width: 350px;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    backdrop-filter: blur(10px);
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.error {
    background: var(--error-color);
}

.notification.warning {
    background: var(--warning-color);
}

.notification.info {
    background: var(--primary-light);
}

.notification-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* Enhanced Button Press Feedback */
button:active,
.action-btn:active,
.task-checkbox:active {
    transform: scale(0.97);
    transition: transform 0.1s ease;
}

.task-checkbox:active {
    transform: scale(0.9);
}

/* Improved Touch Targets for Mobile */
@media (max-width: 768px) {
    button,
    .task-item,
    .task-checkbox {
        min-height: 48px;
        min-width: 48px;
    }
    
    .task-checkbox {
        min-width: 1.75rem;
        min-height: 1.75rem;
    }
    
    .action-btn {
        min-height: 48px;
        padding: 0.75rem 1.25rem;
    }
}

/* Enhanced Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, 
        var(--border-color) 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        var(--border-color) 100%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 0.5rem;
}

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

.skeleton-task {
    height: 80px;
    margin-bottom: 1rem;
}

.skeleton-phase {
    height: 200px;
    margin-bottom: 1.5rem;
}

/* Enhanced Task Completion Animation */
.task-item {
    position: relative;
    overflow: hidden;
}

.task-item.completed {
    animation: taskComplete 0.4s ease-out;
}

@keyframes taskComplete {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
    }
    100% {
        transform: scale(1);
    }
}

.task-checkbox.checked {
    animation: checkboxCheck 0.3s ease-out;
}

@keyframes checkboxCheck {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Enhanced Progress Bar Animation */
.progress-fill {
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Enhanced Empty States */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.empty-state-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Enhanced Focus Mode Animations */
.focus-task-card {
    animation: focusCardEnter 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes focusCardEnter {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.focus-primary-btn:active {
    transform: scale(0.95);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.4);
}

.focus-secondary-btn:active {
    transform: scale(0.95);
}

/* Enhanced Phase Card Animations */
.phase-card {
    animation: phaseCardEnter 0.3s ease-out;
}

@keyframes phaseCardEnter {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Improved Hover States */
.task-item:hover .task-checkbox {
    border-color: var(--primary-light);
    transform: scale(1.05);
}

.task-item:hover .task-description {
    color: var(--primary-color);
}

/* Enhanced Button Hover States */
.action-btn {
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.action-btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Enhanced Search Input */
.search-group input:focus {
    transform: scale(1.02);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

/* Enhanced Form Input Feedback */
.flight-input:invalid:not(:placeholder-shown) {
    border-color: var(--error-color);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.flight-input:valid:not(:placeholder-shown) {
    border-color: var(--success-color);
}

.flight-input:focus:valid {
    border-color: var(--success-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Improved Input Placeholder Animation */
.flight-input::placeholder,
.search-group input::placeholder {
    transition: opacity 0.3s ease;
}

.flight-input:focus::placeholder,
.search-group input:focus::placeholder {
    opacity: 0.5;
}

/* Improved Modal Animations */
.modal {
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.modal-content {
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Enhanced Skip Animation */
.task-item.skipped {
    animation: taskSkip 0.4s ease-out;
}

@keyframes taskSkip {
    0% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
    100% {
        transform: translateX(0);
    }
}

/* Improved Quick Nav Animations */
.quick-nav-btn {
    position: relative;
    overflow: hidden;
}

.quick-nav-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.quick-nav-btn:hover::after {
    left: 100%;
}

/* Enhanced Progress Indicators */
.progress-info {
    transition: all 0.3s ease;
}

.progress-info:has(+ .progress-track:hover) {
    color: var(--primary-color);
    font-weight: 600;
}

/* Improved Focus States */
button:focus-visible,
.task-item:focus-visible {
    outline: 3px solid var(--primary-light);
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.15);
}

/* Enhanced Swipe Feedback */
.task-item.swiping {
    transition: transform 0.1s ease-out;
}

.task-item.swipe-left::before {
    background: var(--success-color);
    width: 8px;
}

.task-item.swipe-right::before {
    background: var(--warning-color);
    width: 8px;
}

/* Improved Phase Header Interactions */
.phase-header {
    user-select: none;
}

.phase-header:active {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.8) 100%);
}

/* Enhanced Service Callout */
.service-callout {
    animation: calloutPulse 2s ease-in-out infinite;
}

@keyframes calloutPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(59, 130, 246, 0);
    }
}

.service-callout.current {
    animation: calloutPulseUrgent 1.5s ease-in-out infinite;
}

@keyframes calloutPulseUrgent {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(234, 179, 8, 0.6);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(234, 179, 8, 0);
    }
}

/* Improved Scrollbar (Webkit browsers) */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* Enhanced Dark Mode Scrollbar */
[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--border-color);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* Improved Text Selection */
::selection {
    background: rgba(59, 130, 246, 0.3);
    color: var(--text-color);
}

[data-theme="dark"] ::selection {
    background: rgba(59, 130, 246, 0.5);
    color: var(--text-color);
}

/* Enhanced Responsive Typography */
@media (max-width: 480px) {
    .empty-state h3 {
        font-size: 1.25rem;
    }
    
    .empty-state p {
        font-size: 0.9rem;
    }
    
    .notification {
        max-width: calc(100% - 2rem);
        right: 1rem;
        left: 1rem;
    }
}

/* Improved Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .task-item.completed,
    .task-checkbox.checked,
    .focus-task-card,
    .phase-card,
    .task-item.skipped {
        animation: none;
    }
    
    .progress-fill::after {
        animation: none;
    }
    
    .service-callout,
    .service-callout.current {
        animation: none;
    }
    
    .notification {
        transition: opacity 0.2s ease;
    }
}

/* Enhanced Keyboard Navigation Hints */
.task-item:focus-visible,
.phase-header:focus-visible {
    outline: 3px solid var(--primary-light);
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.15);
}

/* Improved Visual Feedback for Interactive Elements */
button:not(:disabled):hover,
.task-item:not(.completed):hover,
.phase-header:hover {
    cursor: pointer;
}

button:disabled,
.task-item.completed {
    cursor: default;
}

/* Enhanced Phase Completion Visual Feedback */
.phase-card.completed .phase-header {
    position: relative;
}

.phase-card.completed .phase-header::after {
    content: '✓';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--success-color);
    opacity: 0.7;
}

/* Improved Task Item Visual Hierarchy */
.task-item:not(.completed) .task-description {
    font-weight: 500;
}

.task-item.completed .task-description {
    font-weight: 400;
}

/* Enhanced Progress Text Animation */
.progress-info {
    transition: color 0.3s ease, font-weight 0.3s ease;
}

.progress-info:hover {
    color: var(--primary-color);
    font-weight: 600;
}

/* Better Visual Separation */
.phase-card + .phase-card {
    margin-top: 1.5rem;
}

.task-item + .task-item {
    margin-top: 1rem;
}

/* Enhanced Button States */
.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.action-btn:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Improved Mobile Swipe Feedback */
@media (max-width: 768px) {
    .task-item.swiping {
        opacity: 0.9;
    }
    
    .task-item.swipe-left {
        background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.25) 100%);
    }
    
    .task-item.swipe-right {
        background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.25) 100%);
    }
}
