/* ================================================
   DASHBOARD STYLES - ORGANIZED
   Main stylesheet with dark mode support
   ================================================ */

/* ======================================
   TABLE OF CONTENTS
   ======================================
   1. CSS Reset & Base Styles
   2. Layout & Structure
   3. Typography
   4. Header & Navigation
   5. Stats & Metrics
   6. Cards & Containers
   7. Flight Components
   8. Week Preview
   9. Location & Weather
   10. Airline & Aircraft Tracking
   11. Maps
   12. Forms & Inputs
   13. Buttons & Links
   14. Loading States
   15. Footer
   16. Responsive Design
   17. Dark Mode
   ====================================== */

/* ================================================
   1. CSS RESET & BASE STYLES
   ================================================ */
* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column;
    font-family: Poppins, Arial, sans-serif;
    overflow-x: hidden;
    width: 100%;
}

/* ================================================
   2. LAYOUT & STRUCTURE
   ================================================ */
.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow-x: hidden;
}

#footer-placeholder {
    margin-top: auto;
    width: 100%;
}

.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 4rem 4rem 4rem;
    flex: 1;
    width: 100%;
    overflow: visible;
}

.content-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 1rem;
    width: 100%;
}

.info-section {
    margin: 1rem 0;
    width: 100%;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    width: 100%;
}

/* ================================================
   3. TYPOGRAPHY
   ================================================ */
.dashboard-header h1 {
    font-size: 2.5em;
    color: #4092cc;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dashboard-header h1 i {
    color: #4092cc;
}

.dashboard-header p {
    color: #666;
    margin: 0;
}

/* ================================================
   4. HEADER & NAVIGATION
   ================================================ */
.dashboard-header {
    margin-bottom: 2rem;
    text-align: center;
    width: 100%;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header-links {
    display: flex;
    gap: 1rem;
}

.header-link {
    padding: 0.5rem 1rem;
    background: #4092cc;
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: background-color 0.2s;
}

.header-link:hover {
    background: #357abd;
}

/* ================================================
   5. STATS & METRICS
   ================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin: 1rem 0;
    width: 100%;
}

.stat-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    height: 110px;
    position: relative;
    width: 100%;
}

.stat-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #EBF5FF;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

.stat-icon i {
    font-size: 1.25rem;
    color: #4092cc;
}

.stat-content {
    flex-grow: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.stat-content h3 {
    font-size: 0.875rem;
    color: #666;
    margin: 0 0 0.5rem 0;
    width: 100%;
}

.stat-content p {
    font-size: 1.5rem;
    font-weight: 600;
    color: #666;
    margin: 0;
    width: 100%;
    line-height: 2;
}

.stat-content img {
    height: 60px;
    width: auto;
    margin-bottom: -1.5rem;
    object-fit: contain;
}

/* Time Grid */
.time-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    flex: 1;
    align-items: center;
    width: 100%;
}

.time-item {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
    text-align: center;
    width: 100%;
}

.time-label {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.25rem;
    font-weight: bold;
}

.time-value {
    font-family: monospace;
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

.time-date {
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.25rem;
}

/* Rank Container */
.rank-container {
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
    padding-top: 0.5rem;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    overflow: hidden;
    height: 100%;
}

.rank-badge {
    margin-bottom: 0.5rem;
}

.rank-stripes {
    display: flex;
    justify-content: center;
    width: 80px;
    height: 40px;
    margin: 5px auto 10px auto;
    background: #1a1a2e;
    border-radius: 4px;
    padding: 0 8px;
    position: relative;
}

.stripe {
    position: absolute;
    height: 80%;
    width: 8px;
    background: #ffd700;
    border-radius: 1px;
    top: 10%;
}

.stripe:nth-child(1) { right: 8px; }
.stripe:nth-child(2) { right: 24px; }
.stripe:nth-child(3) { right: 40px; }
.stripe:nth-child(4) { right: 56px; }

.stripe.gold {
    background: #ffd700;
}

.rank-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-progress {
    width: 100%;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: #4092cc;
    transition: width 0.3s ease;
}

.rank-hours, .progress-text {
    font-size: 0.75rem;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    line-height: 1.2;
    margin-top: 0.25rem;
}

/* Achievement Grid */
.achievement-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 0.5rem;
    flex: 1;
    width: 100%;
}

.achievement-item {
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.achievement-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #4092cc;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
}

.achievement-icon.locked {
    background: #cbd5e1;
}

.achievement-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.achievement-progress {
    font-size: 0.7rem;
    color: #666;
}

/* Flight Plan Overview Stats */
.flight-plan-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.plan-stat-item {
    background: #f8fbff;
    border-radius: 0.5rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.plan-stat-item > div {
    text-align: center;
}

.plan-stat-item i {
    font-size: 1.5rem;
    color: #4092cc;
}

.plan-stat-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

.plan-stat-label {
    font-size: 0.75rem;
    color: #666;
}

/* ================================================
   6. CARDS & CONTAINERS
   ================================================ */
.content-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.content-card h2 {
    color: #4092cc;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.info-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: auto;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
}

.info-card h3 {
    color: #4092cc;
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    text-align: center;
}

.next-flight-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    width: 100%;
    min-height: 400px;
}

.next-flight-logo-container {
    width: 180px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 2rem;
}

.next-flight img {
    height: 45px;
    width: auto;
    object-fit: contain;
}

/* Next Flight Card - New Grid Layout */
.next-flight-content {
    display: flex;
    gap: 1rem;
    box-sizing: border-box;
    width: 100%;
    padding: 0;
}

.next-flight-info-column {
    flex: 1;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f7ff 100%);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.next-flight-logo {
    width: 100%;
    text-align: center;
    margin-bottom: 1.5rem;
}

.next-flight-logo img {
    height: 80px;
    width: auto;
    object-fit: contain;
    margin: 0 auto;
}

.next-flight-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.next-flight-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.next-flight-info-box {
    background: rgba(255, 255, 255, 0.7);
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    text-align: center;
}

.next-flight-info-label {
    font-size: 0.7rem;
    color: #666;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.next-flight-info-value {
    font-size: 0.85rem;
    font-weight: 500;
}

.next-flight-scheduled-dep {
    text-align: center;
    color: #666;
    font-size: 0.85em;
    margin-bottom: 1rem;
}

.next-flight-metar-column {
    flex: 1;
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Subtle Ad */
.subtle-ad {
    margin: 20px auto;
    max-width: 500px;
    width: 90%;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 12px 15px;
    font-family: 'Poppins', sans-serif;
    text-align: center;
    position: relative;
    animation: fadeIn 0.5s ease-out;
}

.subtle-ad-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}

.subtle-ad-content img {
    height: 40px;
    width: auto;
}

.subtle-ad-content a {
    color: #4092cc;
    text-decoration: none;
    font-weight: 600;
}

.subtle-ad-content a:hover {
    text-decoration: underline;
}

.subtle-ad-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    font-size: 16px;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.subtle-ad-close:hover {
    color: #666;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ================================================
   7. FLIGHT COMPONENTS
   ================================================ */
.flight-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    min-height: 100px;
}

.flight-item {
    display: grid;
    grid-template-columns: 100px 110px 180px 100px 90px 160px 1fr;
    gap: 45px;
    padding: 0.5rem 1rem;
    background: #f8fbff;
    border-radius: 0.5rem;
    min-height: 48px;
    pointer-events: auto;
    width: 100%;
    box-sizing: border-box;
}

.flight-item .flight-logo-container,
.flight-item .flight-number,
.flight-item .flight-route,
.flight-item .flight-aircraft,
.flight-item .flight-duration,
.flight-item .flight-extra-info {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.flight-item .flight-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: auto;
    padding-top: 0;
}

.flight-item .flight-logo-container img {
    height: 45px;
    width: auto;
    object-fit: contain;
    margin-top: 5px;
}

.flight-item .flight-number {
    font-size: 0.85rem;
    color: #666;
    text-align: center;
}

.flight-item .flight-route {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
    color: #4092cc;
    font-size: 0.9rem;
}

.flight-item .flight-aircraft {
    color: #666;
    text-align: center;
    font-size: 0.85rem;
}

.flight-item .flight-duration {
    color: #666;
    text-align: center;
    font-size: 0.85rem;
}

.flight-item .flight-extra-info {
    color: #666;
    text-align: center;
    font-size: 0.85rem;
}

.flight-item .flight-status {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
    padding-right: 5px;
}

.flight-item .flight-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    white-space: nowrap;
    font-weight: 500;
    line-height: 1;
    flex-shrink: 0;
    text-align: center;
    min-width: 80px;
}

.flight-badge.badge-scheduled {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.flight-badge.badge-completed {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.flight-badge.badge-standby {
    background: rgba(234, 179, 8, 0.1);
    color: #eab308;
}

.flight-item .flight-delete-btn {
    all: unset;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0.25rem;
    background: none !important;
    border: none !important;
    outline: none !important;
    appearance: none !important;
    font-weight: normal !important;
    text-decoration: none !important;
    box-shadow: none !important;
    transition: color 0.2s;
    min-width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.flight-item .flight-delete-btn:hover {
    color: #b91c1c;
}

.flight-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.50rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.875rem;
    color: #666;
    padding-right: 20px;
}

.flight-info span {
    display: inline-block;
}

.flight-info .flight-number {
    color: #333;
    font-weight: 500;
}

.flight-info .dot {
    color: #ccc;
    margin: 0 0.1rem;
}

.flight-info .aircraft {
    color: #888;
}

.no-flights-message {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 2rem 0;
    font-size: 0.9rem;
}

/* Flight Planning Section */
.flight-planning-section {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 2rem 0;
    width: 100%;
}

.planning-header {
    text-align: center;
    margin-bottom: 1rem;
}

.planning-header h2 {
    color: #4092cc;
    margin: 0;
    font-size: 1.25rem;
}

.planning-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.planning-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    background: #4092cc;
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: background-color 0.2s;
}

.planning-btn:hover {
    background: #357abd;
}

.planning-btn i {
    font-size: 0.9rem;
}

/* Flight Plan Overview Section */
.flight-plan-overview-section {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 2rem 0;
    width: 100%;
}

/* ================================================
   8. WEEK PREVIEW
   ================================================ */
.week-preview-section {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
    width: 100%;
    margin-bottom: 3rem;
}

.preview-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
    position: relative;
}

.preview-header h2 {
    margin: 0;
    padding-bottom: 0.5rem;
    text-align: center;
    font-size: 1.25rem;
}

.calendar-link {
    position: absolute;
    right: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: #4092cc;
    color: white;
    text-decoration: none;
    border-radius: 0.4rem;
    font-weight: 400;
    transition: all 0.2s ease;
}

.calendar-link:hover {
    background: #357abd;
    transform: translateY(-2px);
}

.week-preview-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
    width: 100%;
    min-height: 150px;
}

.next-week-preview-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
    width: 100%;
    min-height: 150px;
}

.preview-day {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: white;
    min-height: 100px;
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.preview-date {
    background: #f8f9fa;
    padding: 0.75rem 0.5rem;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 500;
    font-size: 0.875rem;
}

.preview-date.current {
    background: #4092cc;
    color: white;
}

.preview-content {
    padding: 0.375rem;
    flex: 1;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.preview-flight {
    background: #ebf5ff;
    padding: 0.5rem;
    border-radius: 0.375rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-height: 60px;
    position: relative;
}

.preview-flight .flight-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: -0.5rem;
}

.preview-flight .flight-logo-container img {
    height: 45px;
    width: auto;
    object-fit: contain;
}

.preview-flight .flight-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.125rem;
    padding: 0;
}

.preview-flight .flight-info span {
    font-size: 0.75rem;
    line-height: 1.2;
}

.preview-flight .flight-number {
    color: #4092cc;
    font-weight: 600;
    order: 1;
}

.preview-flight .flight-route {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    order: 2;
}

.preview-flight.completed {
    opacity: 0.7;
    position: relative;
}

.preview-flight.completed::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    border-top: 2px solid #ef4444;
    transform: rotate(-5deg);
}

.completed-indicator {
    position: absolute;
    right: 8px;
    top: 8px;
    color: #22c55e;
    font-weight: bold;
}

.rest-day {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #666;
    font-size: 14px;
}

.rest-day em {
    font-style: italic;
}

/* ================================================
   9. LOCATION & WEATHER
   ================================================ */
.current-location-section {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 1rem 0 2rem 0;
    width: 100%;
}

.location-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.location-header h2 {
    color: #4092cc;
    font-size: 1.25rem;
    margin: 0;
}

.airport-code {
    font-size: 1.2rem;
    font-weight: 700;
    color: #4092cc;
    background: #f0f8ff;
    padding: 0.4rem 0.8rem;
    border-radius: 0.4rem;
}

.weather-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.weather-box {
    background: #f8fbff;
    border-radius: 0.5rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.weather-box i {
    color: #4092cc;
    font-size: 1rem;
    width: 20px;
    flex-shrink: 0;
}

.weather-box span {
    font-weight: 500;
    color: #333;
    font-size: 0.95rem;
}

.metar-compact {
    background: #f0f8ff;
    border-radius: 0.5rem;
    padding: 0.75rem;
}

.metar-label {
    font-weight: 600;
    color: #4092cc;
    font-size: 0.8rem;
    font-family: 'Poppins', Arial, sans-serif;
}

.metar-updated {
    font-size: 0.75rem;
    color: #666;
    white-space: nowrap;
    flex-shrink: 0;
}

.metar-data {
    font-family: monospace;
    font-size: 0.8rem;
    line-height: 1.3;
    color: #333;
    word-break: break-all;
    white-space: pre-wrap;
    flex: 1;
}

.weather-data {
    font-family: monospace;
    font-size: 0.75rem;
    padding: 0.75rem;
    color: #666;
    background: #f0f8ff;
    border-radius: 0.5rem;
    margin-top: 0.5rem;
    word-wrap: break-word;
    text-align: center;
}

/* ================================================
   10. AIRLINE & AIRCRAFT TRACKING
   ================================================ */
.airline-tracking-section {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 2rem 0;
    width: 100%;
}

.airline-tracking-section h2 {
    color: #4092cc;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.airline-tracking-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    width: 100%;
    min-height: 100px;
}

.airline-card {
    background: #f8fbff;
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
}

.airline-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.airline-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.airline-logo-container {
    height: 50px;
    display: flex;
    align-items: center;
    margin-left: -0.5rem;
    margin-bottom: 0.1rem;
}

.airline-logo {
    max-height: 100%;
    width: auto;
    object-fit: contain;
}

.airline-info {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.airline-hours {
    font-weight: 500;
    font-size: 1rem;
    color: #4092cc;
    margin-top: -0.2rem;
    margin-left: .5rem;
}

.airline-variants {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.1rem;
    margin-left: .5rem;
}

.no-airlines {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

.variants-label {
    display: block;
    width: 100%;
}

/* Aircraft Type Ratings Section */
.aircraft-type-section {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 2rem 0;
    width: 100%;
}

.aircraft-type-section h2 {
    color: #4092cc;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.aircraft-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    width: 100%;
    min-height: 100px;
}

.aircraft-type-card {
    background: #f8fbff;
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
}

.aircraft-type-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.aircraft-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.aircraft-family {
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
}

.aircraft-hours {
    font-weight: 500;
    color: #4092cc;
}

.aircraft-variants {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 1rem;
    min-height: 1.2rem;
}

.rating-progress {
    margin-top: 0.5rem;
}

.rating-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.qualification-level {
    font-weight: 600;
    color: #333;
}

.currency-badge {
    padding: 0.25rem 0.6rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.currency-badge.current {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.currency-badge.training {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.currency-badge.expired {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.currency-badge.no-flights {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.currency-badge.recent {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.captain-achieved {
    font-size: 0.85rem;
    color: #22c55e;
    font-weight: 500;
}

.next-level-text {
    font-size: 0.8rem;
    color: #666;
}

.no-ratings {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

/* Logbook Stats Grid */
.logbook-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.logbook-stat-box {
    background: #f8fbff;
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
}

.logbook-stat-label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.logbook-stat-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: #4092cc;
}

.logbook-button-container {
    text-align: center;
    margin-top: 1rem;
}

.logbook-button-container .data-link {
    display: inline-block;
    padding: 0.5rem 1.5rem;
}

.logbook-button-container .data-link i {
    margin-right: 0.5rem;
}

/* ================================================
   11. MAPS
   ================================================ */
#next-flight-map {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: 400px;
}

.flight-plan-map-container {
    position: relative;
    width: 100%;
    height: 500px;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

#flight-plan-map {
    width: 100%;
    height: 100%;
}

.map-legend {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1;
    min-width: 200px;
}

.legend-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    transition: background-color 0.2s, transform 0.2s;
}

.legend-item:hover {
    background-color: rgba(64, 146, 204, 0.1);
    transform: translateX(2px);
}

.legend-item-selected {
    background-color: rgba(64, 146, 204, 0.15);
    border-left: 3px solid #4092cc;
    padding-left: 0.25rem;
}

.legend-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #4092cc;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.legend-route-line {
    width: 30px;
    height: 3px;
    flex-shrink: 0;
}

.legend-details {
    flex: 1;
    min-width: 0;
}

.legend-route {
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.legend-airline {
    color: #666;
    font-size: 0.75rem;
}

/* Mapbox Overrides */
.mapboxgl-ctrl-bottom-left,
.mapboxgl-ctrl-bottom-right {
    z-index: 10;
}

.mapboxgl-canvas {
    width: 100% !important;
    height: 100% !important;
}

.mapboxgl-map {
    width: 100% !important;
    height: 100% !important;
}

.mapboxgl-canvas-container {
    width: 100%;
    height: 100%;
}

/* ================================================
   12. FORMS & INPUTS
   ================================================ */
/* (No form styles in this file - would go here if needed) */

/* ================================================
   13. BUTTONS & LINKS
   ================================================ */
.fly-button {
    display: inline-block;
    padding: 0.5rem 2rem;
    background: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    cursor: pointer;
    pointer-events: auto;
    border: none;
    font-family: inherit;
    font-size: 1rem;
    transition: background-color 0.2s;
}

.fly-button:hover {
    background: #218838;
}

.data-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #4092cc;
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background-color 0.2s;
}

.data-link:hover {
    background: #357abd;
}

/* ================================================
   14. LOADING STATES
   ================================================ */
.loading-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loadingAnimation 1.5s infinite;
    border-radius: 4px;
    min-height: 1em;
}

@keyframes loadingAnimation {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ================================================
   15. FOOTER
   ================================================ */
#footer-placeholder .footer {
    margin-top: auto;
    padding: 1rem 0;
    background-color: #f9f9f9;
    border-top: 1px solid #ddd;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    position: relative;
    left: 0;
    font-family: 'Poppins', Arial, sans-serif;
}

#footer-placeholder .discord-link-container {
    text-align: center;
    padding: 0.5rem 0;
    font-family: 'Poppins', Arial, sans-serif;  
    width: 100%;
}

.footer .discord-link {
    color: #5865F2;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: bold;
    padding: 0.5rem 1.25rem;
    border: 2px solid #5865F2;
    border-radius: 8px;
    display: inline-block;
    transition: all 0.3s ease;
    font-family: 'Poppins', Arial, sans-serif;  
}

#footer-placeholder .version-number {
    text-align: center;
    padding: 0.5rem 0 0.25rem 0;
    font-size: 0.9rem;
    color: #666;
    font-family: 'Poppins', Arial, sans-serif;
    width: 100%;
}

/* ================================================
   16. TIMELINE
   ================================================ */
.flight-plan-timeline {
    background: #f8fbff;
    border-radius: 0.5rem;
    padding: 1rem;
}

.timeline-header {
    text-align: center;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.timeline-days {
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
}

.timeline-day {
    flex: 1;
    min-width: 0;
}

.timeline-day-header {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 0.5rem;
}

.timeline-day-header.today {
    color: #4092cc;
}

.timeline-flights {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-height: 60px;
}

.timeline-flight-block {
    padding: 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    text-align: center;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s;
}

.timeline-flight-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.timeline-rest {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    color: #999;
    font-style: italic;
    font-size: 0.75rem;
}

/* ================================================
   TURNAROUND SECTION STYLES (UPDATED)
   ================================================ */

/* Compact Prompt Banner */
.turnaround-prompt {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px solid #4092cc;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    text-align: center;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.turnaround-prompt-text {
    color: #1565c0;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.turnaround-prompt-button {
    background: #22c55e;
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Poppins', sans-serif;
}

.turnaround-prompt-button:hover {
    background: #16a34a;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(34, 197, 94, 0.3);
}

/* Modal Overlay */
.turnaround-modal-overlay {
    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: 9999;
}

/* Modal Container */
.turnaround-modal {
    background: white;
    border-radius: 0.75rem;
    padding: 2rem;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.turnaround-modal h3 {
    color: #4092cc;
    margin: 0 0 1.5rem 0;
    font-size: 1.25rem;
    text-align: center;
}

.turnaround-modal-services {
    margin-bottom: 1.5rem;
}

.turnaround-modal-service {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8fbff;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: background 0.2s;
}

.turnaround-modal-service:hover {
    background: #e3f2fd;
}

.turnaround-modal-service input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.turnaround-modal-service label {
    flex: 1;
    cursor: pointer;
    font-size: 0.95rem;
    color: #333;
}

.turnaround-modal-time {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1.5rem;
    padding: 0.5rem;
    background: #f0f8ff;
    border-radius: 0.5rem;
}

.turnaround-modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.turnaround-modal-btn {
    padding: 0.6rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Poppins', sans-serif;
}

.turnaround-modal-btn.cancel {
    background: #e5e7eb;
    color: #374151;
}

.turnaround-modal-btn.cancel:hover {
    background: #d1d5db;
}

.turnaround-modal-btn.start {
    background: #22c55e;
    color: white;
}

.turnaround-modal-btn.start:hover {
    background: #16a34a;
}

/* Dedicated Turnaround Card */
.turnaround-card {
    background: white;
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.turnaround-card-header {
    background: white;
    border-bottom: 2px solid #e5e7eb;
    padding: 1rem 0 1.5rem 0;
    text-align: center;
    margin-bottom: 1.5rem;
}

.turnaround-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #4092cc;
    margin-bottom: 0.75rem;
}

.turnaround-card-timer {
    font-size: 2rem;
    font-weight: 700;
    color: #f59e0b;
    margin: 0.5rem 0;
    font-family: 'Courier New', monospace;
}

.turnaround-progress-bar {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    height: 10px;
    background: #e5e7eb;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 0.75rem;
}

.turnaround-progress-fill {
    height: 100%;
    background: #4092cc;
    transition: width 1s linear;
    border-radius: 5px;
}

.turnaround-card-phase {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: #4092cc;
    margin-bottom: 1.5rem;
}

.turnaround-activities {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}

.turnaround-activity {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 0.85rem;
    background: #f8fbff;
    border-radius: 0.4rem;
    border-left: 3px solid #e5e7eb;
}

.turnaround-activity.complete {
    border-left-color: #22c55e;
    background: #f0fdf4;
}

.turnaround-activity.active {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.turnaround-activity-icon {
    font-size: 1.25rem;
    width: 26px;
    text-align: center;
}

.turnaround-activity-details {
    flex: 1;
}

.turnaround-activity-name {
    font-weight: 600;
    color: #333;
    font-size: 0.85rem;
}

.turnaround-activity-time {
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.15rem;
}

.turnaround-activity-progress {
    flex: 0 0 130px;
}

.turnaround-activity-progress-bar {
    width: 100%;
    height: 7px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.2rem;
}

.turnaround-activity-progress-fill {
    height: 100%;
    background: #4092cc;
    transition: width 1s linear;
    border-radius: 3px;
}

.turnaround-activity-progress-text {
    font-size: 0.7rem;
    color: #666;
    text-align: right;
}

.turnaround-flight-info {
    background: #f0f8ff;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Turnaround Flight Info Card (new grid-based layout) */
.turnaround-flight-info-card {
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f7ff 100%);
    border-radius: 0.75rem;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
}

.flight-info-box {
    background: rgba(255, 255, 255, 0.7);
    padding: 0.6rem 0.85rem;
    border-radius: 0.4rem;
    text-align: center;
}

.flight-info-label {
    font-size: 0.65rem;
    color: #666;
    margin-bottom: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.flight-info-value {
    font-size: 0.8rem;
    font-weight: 500;
}

.aircraft-change-badge {
    font-size: 0.6rem;
    padding: 0.1rem 0.3rem;
    border-radius: 0.2rem;
    margin-left: 0.25rem;
    color: white;
}

.turnaround-weather-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.turnaround-weather-label {
    text-align: center;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #666;
}

.turnaround-metar-box {
    text-align: center;
    font-family: monospace;
    font-size: 0.85rem;
    color: #333;
    background: #f8fafc;
    padding: 0.85rem;
    border-radius: 0.5rem;
}

.turnaround-flight-info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.turnaround-flight-info-label {
    color: #666;
}

.turnaround-flight-info-value {
    color: #333;
    font-weight: 600;
}

.turnaround-aircraft-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.turnaround-aircraft-status.same {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.turnaround-aircraft-status.change {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.turnaround-metar {
    background: #f0f8ff;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.turnaround-metar-label {
    font-weight: 600;
    color: #4092cc;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.turnaround-metar-data {
    font-family: monospace;
    font-size: 0.8rem;
    color: #333;
    word-break: break-all;
}

.turnaround-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.turnaround-action-btn {
    padding: 0.6rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
}

.turnaround-action-btn.simbrief {
    background: #4092cc;
    color: white;
    text-decoration: none;
}

.turnaround-action-btn.simbrief:hover {
    background: #357abd;
    text-decoration: none;
}

.turnaround-action-btn.cancel {
    background: #ef4444;
    color: white;
}

.turnaround-action-btn.cancel:hover {
    background: #dc2626;
}

/* Dark Mode Support */
body.dark-mode .turnaround-prompt {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
    border-color: #5ab0e8;
}

body.dark-mode .turnaround-prompt-text {
    color: #93c5fd;
}

body.dark-mode .turnaround-modal {
    background: #2c2c2e;
}

body.dark-mode .turnaround-modal h3 {
    color: #5ab0e8;
}

body.dark-mode .turnaround-modal-service {
    background: #3a3a3c;
}

body.dark-mode .turnaround-modal-service:hover {
    background: #48484a;
}

body.dark-mode .turnaround-modal-service label {
    color: #e5e5e7;
}

body.dark-mode .turnaround-modal-time {
    background: rgba(90, 176, 232, 0.1);
    color: #a0a0a0;
}

body.dark-mode .turnaround-modal-btn.cancel {
    background: #48484a;
    color: #e5e5e7;
}

body.dark-mode .turnaround-modal-btn.cancel:hover {
    background: #5a5a5c;
}

body.dark-mode .turnaround-card {
    background: #2c2c2e;
}

body.dark-mode .turnaround-card-header {
    background: linear-gradient(135deg, #78350f 0%, #92400e 100%);
    border-color: #f59e0b;
}

body.dark-mode .turnaround-card-title {
    color: #fbbf24;
}

body.dark-mode .turnaround-card-timer {
    color: #fbbf24;
}

body.dark-mode .turnaround-card-phase {
    color: #5ab0e8;
}

body.dark-mode .turnaround-activity {
    background: #3a3a3c;
    border-left-color: #48484a;
}

body.dark-mode .turnaround-activity.complete {
    background: rgba(34, 197, 94, 0.1);
    border-left-color: #22c55e;
}

body.dark-mode .turnaround-activity.active {
    background: rgba(245, 158, 11, 0.1);
    border-left-color: #f59e0b;
}

body.dark-mode .turnaround-activity-name {
    color: #e5e5e7;
}

body.dark-mode .turnaround-activity-time {
    color: #a0a0a0;
}

body.dark-mode .turnaround-activity-progress-bar {
    background: #48484a;
}

body.dark-mode .turnaround-flight-info {
    background: rgba(90, 176, 232, 0.1);
}

body.dark-mode .turnaround-flight-info-label {
    color: #a0a0a0;
}

body.dark-mode .turnaround-flight-info-value {
    color: #e5e5e7;
}

body.dark-mode .turnaround-metar {
    background: rgba(90, 176, 232, 0.1);
}

body.dark-mode .turnaround-metar-label {
    color: #5ab0e8;
}

body.dark-mode .turnaround-metar-data {
    color: #e5e5e7;
}

/* ================================================
   DARK MODE: Turnaround Flight Info Card (new classes)
   ================================================ */

body.dark-mode .turnaround-flight-info-card {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c4a6e 100%);
}

body.dark-mode .flight-info-box {
    background: rgba(58, 58, 60, 0.8);
}

body.dark-mode .flight-info-label {
    color: #a0a0a0;
}

body.dark-mode .flight-info-value {
    color: #e5e5e7;
}

body.dark-mode .turnaround-weather-card {
    background: #2c2c2e;
}

body.dark-mode .turnaround-weather-label {
    color: #a0a0a0;
}

body.dark-mode .turnaround-metar-box {
    background: #3a3a3c;
    color: #e5e5e7;
}

/* ================================================
   DARK MODE: Next Flight Card (new class-based)
   ================================================ */

/* Next Flight Card header */
body.dark-mode .next-flight-card h2 {
    color: #5ab0e8 !important;
}

/* Flight info column (left) */
body.dark-mode .next-flight-info-column {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c4a6e 100%);
}

/* Info boxes */
body.dark-mode .next-flight-info-box {
    background: rgba(58, 58, 60, 0.8);
}

/* Info labels */
body.dark-mode .next-flight-info-label {
    color: #a0a0a0;
}

/* Info values */
body.dark-mode .next-flight-info-value {
    color: #e5e5e7;
}

/* Scheduled departure text */
body.dark-mode .next-flight-scheduled-dep {
    color: #a0a0a0;
}

/* METAR column (right) */
body.dark-mode .next-flight-metar-column {
    background: #2c2c2e;
}

/* Weather station labels */
body.dark-mode .weather-station {
    color: #5ab0e8 !important;
}

/* Detail items background */
body.dark-mode .next-flight-card .detail-item {
    background: #3a3a3c !important;
}

/* External links */
body.dark-mode .next-flight-external-link {
    background: #3a3a3c !important;
    border-color: #48484a !important;
    color: #e5e5e7 !important;
}

body.dark-mode .next-flight-external-link:hover {
    background: #48484a !important;
}

/* Turnaround card header override */
body.dark-mode .turnaround-card-header {
    background: #2c2c2e !important;
    border-bottom-color: #48484a !important;
}

/* ================================================
   17. RESPONSIVE DESIGN
   ================================================ */
@media (max-width: 1200px) {
    .dashboard-container {
        padding: 2rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .stat-card.location-card {
        grid-column: span 1;
    }
}

@media (max-width: 992px) {
    .airport-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        padding: 0.5rem;
        max-width: 100%;
        overflow-x: hidden;
    }

    .logbook-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .stat-card,
    .info-card,
    .content-card,
    .next-flight-card,
    .week-preview-section {
        width: 95%;
        margin-left: auto;
        margin-right: auto;
        max-width: 95%;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .content-grid {
        gap: 1rem;
    }

    .content-card {
        padding: 1rem;
    }
    
    .achievement-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .flight-list {
        width: 100%;
        max-width: 100%;
    }

    .flight-item {
        grid-template-columns: 80px 1fr;
        grid-template-rows: repeat(3, auto);
        gap: 0.5rem;
    }
    
    .flight-item .flight-logo-container {
        grid-row: span 3;
    }

    .flight-item .flight-number {
        grid-column: 2;
        grid-row: 1;
        text-align: left;
    }
    
    .flight-item .flight-route {
        grid-column: 2;
        grid-row: 2;
        justify-content: flex-start;
    }
    
    .flight-item .flight-aircraft, 
    .flight-item .flight-duration, 
    .flight-item .flight-extra-info {
        display: inline-block;
        text-align: left;
        margin-right: 0.75rem;
    }
    
    .flight-item .flight-status {
        grid-column: 1 / -1;
        grid-row: 4;
        justify-content: flex-end;
        margin-top: 0.5rem;
    }
    
    .week-preview-grid,
    .next-week-preview-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem;
        width: 100%;
        min-height: 300px;
    }
    
    .preview-day {
        min-height: 80px;
        width: 100%;
    }
    
    .preview-date {
        padding: 0.5rem 0.25rem;
        font-size: 0.75rem;
    }
    
    .preview-content {
        min-height: 80px;
        padding: 0.25rem;
    }

    .airline-tracking-grid {
        grid-template-columns: 1fr;
    }
    
    .aircraft-type-grid {
        grid-template-columns: 1fr;
    }
    
    .next-flight-card > div {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    #next-flight-map {
        height: 300px !important;
        position: relative !important;
        min-height: 300px;
    }
    
    .preview-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-bottom: 1.5rem;
        gap: 1rem;
    }

    .preview-header h2 {
        margin: 0;
        padding-bottom: 0.5rem;
        border-bottom: 2px solid #e2e8f0;
        width: 100%;
        text-align: center;
    }
    
    .calendar-link {
        width: auto;
        min-width: 150px;
        max-width: 200px;
        margin: 0 auto;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .airport-info-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .airport-code {
        align-self: center;
    }

    .current-location-section {
        padding: 1rem;
    }
    
    .location-header {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    
    .weather-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .flight-planning-section {
        padding: 1rem;
    }
    
    .planning-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .planning-btn {
        width: 200px;
        justify-content: center;
    }

    .flight-plan-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .flight-plan-map-container {
        height: 350px;
    }
    
    .map-legend {
        font-size: 0.75rem;
        padding: 0.75rem;
        max-width: 180px;
    }
    
    .timeline-days {
        flex-direction: column;
        gap: 1rem;
    }
    
    .timeline-day-header {
        text-align: left;
    }
}

@media (max-width: 576px) {
    .airport-info-grid {
        grid-template-columns: 1fr;
    }

    .logbook-stats-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .subtle-ad {
        width: 90%;
        padding: 10px;
        margin: 15px auto;
    }
    
    .subtle-ad-content {
        font-size: 13px;
        flex-direction: column;
        gap: 8px;
    }
    
    .dashboard-header h1 {
        font-size: 2rem;
    }

    .dashboard-header p {
        font-size: 0.9rem;
    }
    
    .time-grid {
        gap: 0.5rem;
        margin-top: 0.5rem;
    }

    .weather-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .metar-data {
        font-size: 0.75rem;
    }
}

/* ================================================
   18. DARK MODE
   ================================================ */

/* Base Dark Mode Colors */
body.dark-mode {
    background-color: #1a1a1c;
    color: #e5e5e7;
}

body.dark-mode .content-wrapper {
    background-color: #1a1a1c;
}

/* Cards & Containers */
body.dark-mode .content-card,
body.dark-mode .info-card,
body.dark-mode .next-flight-card,
body.dark-mode .week-preview-section,
body.dark-mode .current-location-section,
body.dark-mode .airline-tracking-section,
body.dark-mode .aircraft-type-section,
body.dark-mode .flight-planning-section,
body.dark-mode .flight-plan-overview-section,
body.dark-mode .stat-card {
    background: #2c2c2e;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Typography */
body.dark-mode .dashboard-header h1,
body.dark-mode .dashboard-header h1 i,
body.dark-mode .content-card h2,
body.dark-mode .info-card h3,
body.dark-mode .location-header h2,
body.dark-mode .airline-tracking-section h2,
body.dark-mode .aircraft-type-section h2,
body.dark-mode .planning-header h2,
body.dark-mode .preview-header h2 {
    color: #5ab0e8;
}

body.dark-mode .dashboard-header p {
    color: #a0a0a0;
}

/* Stats */
body.dark-mode .stat-icon {
    background: rgba(90, 176, 232, 0.15);
}

body.dark-mode .stat-content h3,
body.dark-mode .stat-content p {
    color: #e5e5e7;
}

body.dark-mode .time-item,
body.dark-mode .rank-container,
body.dark-mode .achievement-item {
    background: #3a3a3c;
}

body.dark-mode .time-label,
body.dark-mode .time-date,
body.dark-mode .rank-hours,
body.dark-mode .progress-text,
body.dark-mode .achievement-progress {
    color: #a0a0a0;
}

body.dark-mode .time-value,
body.dark-mode .rank-title,
body.dark-mode .achievement-title {
    color: #e5e5e7;
}

body.dark-mode .progress-bar {
    background: #48484a;
}

/* Flights */
body.dark-mode .flight-list {
    background: transparent;
}

body.dark-mode .flight-item {
    background: #3a3a3c;
}

body.dark-mode .flight-item .flight-number,
body.dark-mode .flight-item .flight-aircraft,
body.dark-mode .flight-item .flight-duration,
body.dark-mode .flight-item .flight-extra-info,
body.dark-mode .flight-info {
    color: #a0a0a0;
}

body.dark-mode .flight-item .flight-route {
    color: #5ab0e8;
}

body.dark-mode .no-flights-message {
    color: #a0a0a0;
}

/* Week Preview */
body.dark-mode .preview-day {
    background: #2c2c2e;
    border-color: #48484a;
}

body.dark-mode .preview-date {
    background: #3a3a3c;
    border-bottom-color: #48484a;
    color: #e5e5e7;
}

body.dark-mode .preview-date.current {
    background: #4092cc;
    color: white;
}

body.dark-mode .preview-flight {
    background: rgba(90, 176, 232, 0.15);
}

body.dark-mode .preview-flight .flight-number {
    color: #5ab0e8;
}

body.dark-mode .rest-day {
    color: #a0a0a0;
}

/* Weather & Location */
body.dark-mode .weather-box,
body.dark-mode .plan-stat-item {
    background: #3a3a3c;
}

body.dark-mode .weather-box span,
body.dark-mode .plan-stat-value {
    color: #e5e5e7;
}

body.dark-mode .plan-stat-label {
    color: #a0a0a0;
}

body.dark-mode .airport-code {
    background: rgba(90, 176, 232, 0.15);
    color: #5ab0e8;
}

body.dark-mode .metar-compact {
    background: rgba(90, 176, 232, 0.1);
}

body.dark-mode .metar-label {
    color: #5ab0e8;
}

body.dark-mode .metar-data,
body.dark-mode .metar-updated {
    color: #e5e5e7;
}

body.dark-mode .weather-data {
    background: rgba(90, 176, 232, 0.1);
    color: #e5e5e7;
}

/* Airlines & Aircraft */
body.dark-mode .airline-card,
body.dark-mode .aircraft-type-card {
    background: #3a3a3c;
}

body.dark-mode .airline-variants,
body.dark-mode .aircraft-variants,
body.dark-mode .next-level-text {
    color: #a0a0a0;
}

body.dark-mode .aircraft-family,
body.dark-mode .qualification-level {
    color: #e5e5e7;
}

body.dark-mode .airline-hours,
body.dark-mode .aircraft-hours {
    color: #5ab0e8;
}

body.dark-mode .no-airlines,
body.dark-mode .no-ratings {
    color: #a0a0a0;
}

/* Timeline */
body.dark-mode .flight-plan-timeline {
    background: #3a3a3c;
}

body.dark-mode .timeline-header,
body.dark-mode .timeline-day-header {
    color: #e5e5e7;
}

body.dark-mode .timeline-day-header.today {
    color: #5ab0e8;
}

body.dark-mode .timeline-rest {
    color: #a0a0a0;
}

/* Map Legend */
body.dark-mode .map-legend {
    background: rgba(44, 44, 46, 0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

body.dark-mode .legend-title,
body.dark-mode .legend-route {
    color: #e5e5e7;
}

body.dark-mode .legend-airline {
    color: #a0a0a0;
}

body.dark-mode .legend-item:hover {
    background-color: rgba(90, 176, 232, 0.15);
}

body.dark-mode .legend-item-selected {
    background-color: rgba(90, 176, 232, 0.2);
    border-left-color: #5ab0e8;
}

/* Buttons & Links */
body.dark-mode .header-link,
body.dark-mode .calendar-link,
body.dark-mode .planning-btn,
body.dark-mode .data-link {
    background: #4092cc;
    color: white;
}

body.dark-mode .header-link:hover,
body.dark-mode .calendar-link:hover,
body.dark-mode .planning-btn:hover,
body.dark-mode .data-link:hover {
    background: #357abd;
}

/* Subtle Ad */
body.dark-mode .subtle-ad {
    background-color: #2c2c2e;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

body.dark-mode .subtle-ad-content {
    color: #e5e5e7;
}

body.dark-mode .subtle-ad-content a {
    color: #5ab0e8;
}

body.dark-mode .subtle-ad-close {
    color: #a0a0a0;
}

body.dark-mode .subtle-ad-close:hover {
    color: #e5e5e7;
}

/* Pilot Logbook - Dark Mode */
body.dark-mode .logbook-stat-box {
    background: #3a3a3c;
}

body.dark-mode .logbook-stat-label {
    color: #a0a0a0;
}

body.dark-mode .logbook-stat-value {
    color: #5ab0e8;
}

/* Footer */
body.dark-mode #footer-placeholder .footer {
    background-color: #2c2c2e;
    border-top-color: #48484a;
}

body.dark-mode #footer-placeholder .version-number {
    color: #a0a0a0;
}

/* Loading State */
body.dark-mode .loading-placeholder {
    background: linear-gradient(90deg, #3a3a3c 25%, #48484a 50%, #3a3a3c 75%);
    background-size: 200% 100%;
}