/* universal-airline-styles.css */
/* Universal styling that adapts to any airline */

:root {
    /* Default colors (will be overridden by JavaScript) */
    --airline-primary: #051040;
    --airline-accent: #FF0000;
    --airline-secondary: #931116;
    
    /* Common colors */
    --light-gray: #F5F5F5;
    --medium-gray: #E5E5E5;
    --card-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
}

* {
    font-family: 'Source Sans Pro', sans-serif;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background: var(--light-gray);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    width: 100%;
}

/* ======= AIRLINE HEADER ======= */
.airline-header {
    background: var(--airline-primary);
    color: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.airline-header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0rem 4rem;  /* CHANGE from 16px 32px to 2rem 2rem for more vertical padding */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.airline-logo-section {
    text-align: center;
    margin-bottom: 0rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Add this new white box styling for the airline logo */
.airline-logo-section .logo-background {
    width: 100px;
    height: 80px;
    background: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin: 0 auto 0.5rem auto;
}


.airline-logo-section h3 {
    color: var(--airline-primary);
    font-size: 1.2rem;
    margin: 0;
    font-weight: 600;
    text-align: center;
}

.airline-logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.airline-logo-container img {
    height: 80px;
    width: auto;
    object-fit: contain;
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    filter: none;
    opacity: 1;
}

.airline-red-stripe {
    background: linear-gradient(135deg, var(--airline-accent) 0%, var(--airline-secondary) 100%);
    transform: skewX(-15deg);
    width: 60px;
    height: 24px;
    margin-left: 1rem;
}

.airline-portal-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    margin-left: 0.5rem;
}

.airline-pilot-info {
    text-align: right;
}

.airline-pilot-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.airline-pilot-details {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ======= DASHBOARD CONTAINER ======= */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
    width: 100%;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    color: var(--airline-primary);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.dashboard-header p {
    color: #666;
    font-size: 1.1rem;
}

/* ======= CARDS ======= */
.af-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
}

.af-card h2 {
    color: var(--airline-primary);
    font-size: 1.25rem;
    margin-bottom: 3rem;
    font-weight: 600;
    text-align: center;
    position: relative;
}

.af-card h2::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--airline-accent);
    border-radius: 2px;
}

/* ======= CURRENT POSITION SECTION ======= */
.current-position-section {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
}

.current-position-section h2 {
    color: var(--airline-primary);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    text-align: center;
    position: relative;
}

.current-position-section h2::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--airline-accent);
    border-radius: 2px;
}

.position-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.position-card {
    background: #f8fbff;
    border-radius: 0.5rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    border-left: 4px solid var(--airline-primary);
    transition: transform 0.2s, box-shadow 0.2s;
    min-height: 80px;
}

.position-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.position-card.weather-card {
    grid-column: span 1;
    background: #f8fbff;
}

.position-icon {
    width: 35px;
    height: 35px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #EBF5FF;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
}

.position-icon i {
    font-size: 1rem;
    color: var(--airline-primary);
}

.position-content {
    flex-grow: 1;
    text-align: center;
}

.position-label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.position-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--airline-primary);
    line-height: 1.2;
}

.position-weather {
    font-family: monospace;
    font-size: 0.75rem;
    color: #333;
    line-height: 1.2;
    word-break: break-all;
    max-height: 40px;
    overflow: hidden;
}

/* ======= NEXT FLIGHT SECTION ======= */
.next-flight-section {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
}

.next-flight-section h2 {
    color: var(--airline-primary);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    text-align: center;
    position: relative;
}

.next-flight-section h2::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--airline-accent);
    border-radius: 2px;
}

.next-flight-grid {
    display: grid;
    grid-template-columns: 40% 60%;
    gap: 1.5rem;
    min-height: 450px;
    align-items: stretch;
}

.flight-info-panel {
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f7ff 100%);
    border-radius: 0.75rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.airline-logo-section h3 {
    color: var(--airline-primary);
    font-size: 1.2rem;
    margin: 0;
    font-weight: 600;
    text-align: center;
}

.route-info {
    text-align: center;
    margin-bottom: 1.5rem;
}

.route-airports {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.airport-code {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--airline-primary);
}

.route-arrow {
    color: #666;
    font-size: 1.2rem;
}

.flight-details {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.flight-details div {
    margin-bottom: 0.25rem;
}

.weather-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex: 1;
}

.weather-card {
    background: rgba(255, 255, 255, 0.8);
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.weather-label {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.5rem;
    text-align: center;
    font-weight: 600;
}

.weather-data {
    font-family: monospace;
    font-size: 0.8rem;
    color: #333;
    text-align: center;
    line-height: 1.3;
    word-break: break-all;
}

.fly-button {
    background: var(--airline-accent);
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    margin-top: auto;
    transition: all 0.2s;
    text-align: center;
    width: auto;
    max-width: 300px;
    font-size: 1rem;
    align-self: center;
}

.fly-button:hover {
    background: var(--airline-secondary);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.map-section {
    background: white;
    border-radius: 0.75rem;
    position: relative;
    height: 100%;
    padding-right: 1.5rem;
    box-sizing: border-box;
}

#next-flight-map {
    width: 100%;
    height: 100%;
    min-height: 450px;
    border-radius: 0.75rem;
}

.map-controls {
    position: absolute;
    top: 15px;
    right: 35px;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.5rem;
    border-radius: 0.5rem;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.control-group {
    margin-bottom: 0.75rem;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--airline-primary);
    font-size: 0.75rem;
    font-weight: 600;
}

.control-group input[type="range"] {
    width: 100%;
}

/* ======= FLIGHTS SECTION ======= */
.flights-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.flight-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 150px;
}

.flight-item {
    background: #f8fbff;
    border-radius: 0.5rem;
    padding: 1rem;
    border-left: 4px solid var(--airline-primary);
    transition: all 0.2s;
}

.flight-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.flight-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.flight-number {
    font-weight: 600;
    color: var(--airline-primary);
    font-size: 1rem;
}

.flight-status {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-confirmed {
    background: #e8f5e8;
    color: #2d5016;
}

.status-completed {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success-color);
}

.flight-route {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--airline-primary);
}

.flight-route span:nth-child(2) {
    color: #666;
}

.flight-meta {
    font-size: .95rem;
    color: #666;
    line-height: 1.4;
}

.no-flights {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
    background: #f8fbff;
    border-radius: 0.5rem;
    border: 2px dashed var(--medium-gray);
}

/* ======= AIRCRAFT RATINGS SECTION ======= */
.aircraft-ratings-section {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
}

.aircraft-ratings-section h2 {
    color: var(--airline-primary);
    font-size: 1.25rem;
    margin-bottom: 2rem;
    font-weight: 600;
    text-align: center;
    position: relative;
}

.aircraft-ratings-section h2::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--airline-accent);
    border-radius: 2px;
}

.ratings-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.rating-card {
    background: #f8fbff;
    border-radius: 0.75rem;
    padding: 1.25rem;
    border-left: 4px solid var(--airline-primary);
    transition: all 0.2s;
    width: 375px;
    min-width: 375px;
}

.rating-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.rating-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.aircraft-family {
    font-weight: 600;
    color: var(--airline-primary);
    font-size: 1.1rem;
}

.aircraft-hours {
    font-weight: 600;
    color: var(--airline-accent);
    font-size: 1rem;
}

.aircraft-variants {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 1rem;
    min-height: 1.2rem;
    line-height: 1.3;
}

.rating-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.qualification-level {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.currency-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.currency-current {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success-color);
}

.currency-expired {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
}

.currency-training {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.progress-fill {
    height: 100%;
    background: var(--airline-accent);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.next-level-text {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.3;
}

.captain-achieved {
    font-size: 0.85rem;
    color: var(--success-color);
    font-weight: 600;
}

.no-ratings {
    text-align: center;
    padding: 3rem 2rem;
    color: #666;
    font-style: italic;
    grid-column: 1 / -1;
    background: #f8fbff;
    border-radius: 0.75rem;
    border: 2px dashed var(--medium-gray);
}

/* ======= WEEK PREVIEW ======= */
.week-preview {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
}

.week-preview h2 {
    color: var(--airline-primary);
    font-size: 1.25rem;
    margin-bottom: 2rem;
    font-weight: 600;
    text-align: center;
    position: relative;
}

.week-preview h2::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--airline-accent);
    border-radius: 2px;
}

.week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
}

.day-cell {
    border: 1px solid var(--medium-gray);
    border-radius: 0.5rem;
    background: white;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    transition: all 0.2s;
}

.day-header {
    background: var(--light-gray);
    padding: 0.75rem 0.5rem;
    text-align: center;
    border-bottom: 1px solid var(--medium-gray);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--airline-primary);
}

.day-header.today {
    background: var(--airline-primary);
    color: white;
}

.day-content {
    padding: 0.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.day-flight {
    background: #ebf5ff;
    padding: 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    color: var(--airline-primary);
    border-left: 3px solid var(--airline-accent);
}

.day-flight.completed {
    opacity: 0.6;
    text-decoration: line-through;
}

.day-rest {
    color: #999;
    font-size: 0.75rem;
    font-style: italic;
    text-align: center;
    margin-top: auto;
    margin-bottom: auto;
}

/* ======= SCHEDULE GENERATOR ======= */
.schedule-generator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: stretch;
}

.generator-form-section {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1.5rem;
    border: 2px solid var(--medium-gray);
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.generator-form-section h2 {
    color: var(--airline-primary);
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    position: relative;
}

.generator-form-section h2::after {
    content: '';
    position: absolute;
    bottom: -0.3rem;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: var(--airline-accent);
    border-radius: 2px;
}

.generator-results-section {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    border: 2px solid var(--medium-gray);
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.generator-results-section h2 {
    color: var(--airline-primary);
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    position: relative;
}

.generator-results-section h2::after {
    content: '';
    position: absolute;
    bottom: -0.3rem;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: var(--airline-accent);
    border-radius: 2px;
}

/* Form styling */
#schedule-generator-form {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

#schedule-generator-form > div:first-child {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

#schedule-generator-form > div:first-child > div {
    display: flex;
    flex-direction: column;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.empty-state i {
    font-size: 2rem;
    color: var(--airline-accent);
    margin-bottom: 1rem;
    display: block;
}

.empty-state p {
    font-size: 1rem;
    margin: 0;
}

#schedule-generator-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--airline-primary);
    font-size: 14px;
}

#schedule-generator-form input,
#schedule-generator-form select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--medium-gray);
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s;
    background: white;
    text-transform: uppercase;
    box-sizing: border-box;
}

#schedule-generator-form input:focus,
#schedule-generator-form select:focus {
    outline: none;
    border-color: var(--airline-accent);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

#generate-schedule-btn {
    width: 40%;
    background: var(--airline-accent);
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    margin-top: auto;
    align-self: center;
}

#generate-schedule-btn:hover {
    background: var(--airline-secondary);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#generate-schedule-btn:active {
    transform: translateY(0);
}

/* Generated flights container */
#generated-flights {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 1rem;
    max-height: 350px;
    overflow-y: auto;
}

.generated-flight-item {
    background: #f8fafc;
    border-radius: 6px;
    padding: 10px 25px;
    border-left: 4px solid var(--airline-primary);
    display: grid;
    grid-template-columns: 20px 180px 70px 85px 70px;
    gap: 30px;
    align-items: center;
    margin-bottom: 8px;
    transition: all 0.2s;
}

.generated-flight-registration {
    color: var(--airline-primary);
    background: #e6f7ff;
    font-size: 0.75rem;
    text-align: center;
    padding: 3px 6px;
    border-radius: 8px;
    font-weight: 600;
    border: 1px solid var(--airline-primary);
}

.generated-flight-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-left-color: var(--airline-accent);
}

.generated-flight-number {
    font-weight: 600;
    color: var(--airline-primary);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.generated-flight-route {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    color: var(--airline-primary);
    font-size: 0.85rem;
    justify-content: center;
}

.generated-flight-route span:nth-child(2) {
    color: #666;
    font-size: 0.8rem;
    margin: 0 2px;
}

.generated-flight-aircraft {
    color: #666;
    font-size: 0.8rem;
    text-align: center;
    background: white;
    padding: 3px 6px;
    border-radius: 4px;
    border: 1px solid var(--medium-gray);
    font-weight: 500;
}

.generated-flight-duration {
    color: white;
    background: var(--airline-primary);
    font-size: 0.8rem;
    text-align: center;
    padding: 3px 6px;
    border-radius: 12px;
    font-weight: 600;
}

#generated-schedule h3 {
    color: var(--airline-primary);
    margin-bottom: 0.75rem;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
}

#generated-schedule .action-buttons {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--medium-gray);
    text-align: center;
}

#save-generated-schedule {
    background: var(--success-color);
    color: white;
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

#save-generated-schedule:hover {
    background: #16a34a;
}

#cancel-generated-schedule {
    background: #6b7280;
    color: white;
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-left: 0.5rem;
    font-size: 0.9rem;
}

#cancel-generated-schedule:hover {
    background: #4b5563;
}

#schedule-loading {
    text-align: center;
    padding: 2rem;
}

#schedule-loading > div {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--medium-gray);
    border-radius: 50%;
    border-top-color: var(--airline-accent);
    animation: spin 1s ease-in-out infinite;
}

#schedule-loading p {
    margin-top: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.airline-flight-logo {
    height: 12px;
    width: auto;
    opacity: 0.8;
}

/* ======= PILOT OVERVIEW SECTION ======= */
.pilot-overview-section {
    margin-bottom: 2rem;
}

.pilot-summary-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    color: var(--airline-primary);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.pilot-summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--airline-primary);
}

.pilot-avatar-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.pilot-basic-info {
    flex-grow: 1;
    margin-left: 1.5rem;
}

.pilot-base-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: right;
}

.pilot-base-info i {
    color: var(--airline-primary);
    font-size: 1rem;
}

.pilot-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f8faff, #e6f7ff);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--airline-primary);
    overflow: hidden;
}

.pilot-image {
    width: 70px;
    height: 70px;
    object-fit: contain;
    margin-top: 7px;
}

.pilot-basic-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--airline-primary);
}

.pilot-rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #f8faff, #e6f7ff);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    border: 2px solid var(--airline-primary);
    color: var(--airline-primary);
    margin-left: -0.4rem;
}

.pilot-rank-badge #pilot-rank-text {
    font-weight: 600;
    font-size: 0.95rem;
}

.pilot-rank-badge #pilot-rank-stripes {
    font-weight: bold;
    font-size: 1rem;
}

.pilot-stats-row {
    display: flex;
    align-items: center;
    justify-content: space-around;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8faff, #f0f8ff);
    border-radius: 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--airline-primary);
    margin-bottom: 0.25rem;
    line-height: 1;
}

.stat-label {
    font-size: 0.65rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(0, 0, 0, 0.2);
    margin: 0 1rem;
}

.pilot-actions {
    text-align: center;
}

.pilot-id-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--airline-accent);
    color: white;
    padding: 0.675rem 1rem;
    border-radius: 0.75rem;
    text-decoration: none;
    font-weight: 600;
    font-size: .8rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.pilot-id-button:hover {
    background: var(--airline-secondary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.pilot-id-button i {
    font-size: 1.1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ======= RESPONSIVE DESIGN ======= */
@media (max-width: 1200px) {
    .next-flight-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    #next-flight-map {
        height: 350px;
    }
    
    .flights-section {
        grid-template-columns: 1fr;
    }
    
    .schedule-generator-container {
        grid-template-columns: 350px 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 1024px) {
    .schedule-generator-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .generator-form-section {
        order: 1;
    }
    
    .generator-results-section {
        order: 2;
        min-height: 300px;
    }
    
    .position-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        padding: 1rem;
    }
    
    .airline-header-content {
        padding: 0 1rem;
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .airline-logo-section {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .week-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ratings-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-header h1 {
        font-size: 2rem;
    }
    
    .af-card {
        padding: 1rem;
    }

    .position-grid {
        grid-template-columns: 1fr;
    }
    
    .position-card {
        min-height: 70px;
    }
    
    #schedule-generator-form > div:first-child {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .generator-form-section,
    .generator-results-section {
        padding: 1rem;
    }
    
    .generated-flight-item {
        grid-template-columns: 1fr;
        gap: 4px;
        text-align: center;
        padding: 8px;
    }

    .generated-flight-route {
        justify-content: center;
    }

    .generated-flight-number,
    .generated-flight-aircraft,
    .generated-flight-duration,
    .generated-flight-registration {
        justify-self: center;
    }
    
    .pilot-summary-card {
        padding: 1.5rem;
    }
    
    .pilot-avatar-section {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .pilot-stats-row {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .stat-divider {
        width: 40px;
        height: 1px;
        margin: 0;
    }
    
    .pilot-basic-info {
        margin-left: 0;
    }
    
    .pilot-base-info {
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .schedule-generator-container {
        gap: 1rem;
    }
    
    #save-generated-schedule,
    #cancel-generated-schedule {
        display: block;
        width: 100%;
        margin: 0.25rem 0;
    }
}