/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Landing Page */
.landing-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.landing-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.landing-header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.landing-logo {
    font-size: 64px;
    margin-bottom: 15px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.landing-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
}

.landing-subtitle {
    font-size: 16px;
    opacity: 0.9;
}

.landing-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.landing-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.landing-input {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.landing-input:focus {
    outline: none;
    border-color: #667eea;
}

.landing-button {
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.landing-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.landing-button:active {
    transform: translateY(0);
}

.landing-link {
    text-align: center;
    margin-top: 20px;
    color: white;
}

.landing-link a {
    color: white;
    text-decoration: underline;
}

/* Header */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    margin-bottom: 30px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    color: #666;
    font-weight: 500;
}

.btn-support {
    padding: 8px 16px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: background 0.2s;
}

.btn-support:hover {
    background: #e0e0e0;
}

.btn-logout {
    padding: 8px 16px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-logout:hover {
    background: #c0392b;
}

/* Progress Steps */
.progress-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
    gap: 10px;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.step-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    transition: all 0.3s;
}

.step-item.active .step-circle {
    background: #667eea;
    color: white;
}

.step-item.completed .step-circle {
    background: #27ae60;
    color: white;
}

.step-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.step-item.active .step-label {
    color: #667eea;
    font-weight: 600;
}

.step-connector {
    width: 80px;
    height: 3px;
    background: #e0e0e0;
    margin: 0 -10px;
    margin-top: -25px;
}

/* Step Content */
.step-content {
    display: none;
}

.step-content.active {
    display: block;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.card h2 {
    margin-bottom: 25px;
    color: #333;
    font-size: 28px;
}

.card h3 {
    margin-bottom: 15px;
    color: #555;
    font-size: 20px;
}

.card h4 {
    margin-bottom: 10px;
    color: #666;
    font-size: 16px;
}

/* Upload Section */
.upload-section {
    margin-bottom: 30px;
}

.upload-section h3 {
    margin-bottom: 15px;
    color: #333;
}

.upload-group {
    display: flex;
    gap: 20px;
}

.upload-area {
    position: relative;
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.upload-area.half {
    flex: 1;
}

.upload-area input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
}

.upload-icon {
    font-size: 48px;
}

.upload-text p {
    margin: 5px 0;
}

.upload-hint {
    color: #999;
    font-size: 14px;
}

.upload-status {
    margin-top: 10px;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}

.upload-status.success {
    background: #d4edda;
    color: #155724;
}

.upload-status.error {
    background: #f8d7da;
    color: #721c24;
}

.upload-status.processing {
    background: #d1ecf1;
    color: #0c5460;
}

/* Form Elements */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.input-field {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.input-field:focus {
    outline: none;
    border-color: #667eea;
}

.form-hint {
    margin-top: 5px;
    font-size: 14px;
    color: #999;
}

.date-range-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.date-range-item {
    flex: 1;
}

.date-range-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.date-range-separator {
    font-size: 24px;
    color: #999;
    margin-top: 30px;
}

/* Flight Selection */
.flight-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.flight-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.flight-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.flight-card.selected {
    border-color: #667eea;
    background: #f8f9ff;
}

.flight-card-content {
    display: flex;
    gap: 15px;
}

.flight-card-radio {
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 50%;
    margin-top: 2px;
    position: relative;
}

.flight-card.selected .flight-card-radio {
    border-color: #667eea;
}

.flight-card.selected .flight-card-radio::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: #667eea;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.flight-card-info {
    flex: 1;
}

.flight-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.flight-card-number {
    font-size: 20px;
    font-weight: 700;
    color: #667eea;
}

.flight-card-time {
    font-size: 14px;
    color: #999;
}

.flight-card-details {
    font-size: 14px;
    color: #7f8c8d;
    display: flex;
    gap: 15px;
}

.flight-card-detail {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Flight Info */
.flight-info {
    background: #f8f9ff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-label {
    font-size: 14px;
    color: #999;
    font-weight: 500;
}

.info-value {
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

/* Language Requirements */
.language-checklist {
    margin-top: 20px;
}

.checkbox-item {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.checkbox-item:hover {
    border-color: #667eea;
}

.checkbox-item label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.language-name {
    flex: 1;
    color: #333;
}

.help-text {
    margin-top: 8px;
    font-size: 13px;
    color: #999;
    margin-left: 30px;
}

.progress-container {
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s;
}

.progress-text {
    text-align: center;
    font-size: 14px;
    color: #666;
}

.warning-box {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 15px;
    margin-top: 20px;
    font-size: 14px;
    color: #856404;
}

.section-desc {
    color: #999;
    font-size: 14px;
    margin-bottom: 20px;
}

/* Buttons */
.button-group {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
}

.btn-primary {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-primary.btn-large {
    padding: 16px 32px;
    font-size: 18px;
}

.btn-secondary {
    padding: 12px 24px;
    background: #f0f0f0;
    color: #333;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

/* Summary */
.summary {
    background: #f8f9ff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item strong {
    color: #666;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 0;
    color: #999;
    font-size: 14px;
    margin-top: 50px;
}

/* Language Popup */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.language-popup-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.language-popup-content h3 {
    margin-bottom: 20px;
    color: #333;
}

.language-section-popup {
    margin-bottom: 25px;
}

.language-section-popup h4 {
    margin-bottom: 15px;
    color: #667eea;
    font-size: 18px;
}

.language-list {
    list-style: none;
    padding: 0;
}

.language-list li {
    padding: 10px 15px;
    background: #f8f9ff;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 16px;
}

.language-list li strong {
    color: #667eea;
    margin-right: 10px;
}

/* Parsing Result Display */
.parsing-result-container {
    margin-bottom: 20px;
}

.parsing-result-section {
    margin-bottom: 30px;
}

.parsing-result-section h4 {
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
}

.parsing-result-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.parsing-result-table thead {
    background: #667eea;
    color: white;
}

.parsing-result-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.parsing-result-table td {
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
}

.parsing-result-table tbody tr:hover {
    background: #f8f9ff;
}

.parsing-result-table tbody tr:last-child td {
    border-bottom: none;
}

/* BLANK day row highlighting */
.parsing-result-table tbody tr.blank-day-row {
    background: #fff8e1;
}

.parsing-result-table tbody tr.blank-day-row:hover {
    background: #fff3cd;
}

/* BLOCKED day row highlighting */
.parsing-result-table tbody tr.blocked-day-row {
    background: #fde8e8;
}

.parsing-result-table tbody tr.blocked-day-row:hover {
    background: #fcc;
}

/* Duty badge styles */
.duty-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.duty-badge.off {
    background: #e8f5e9;
    color: #2e7d32;
}

.duty-badge.duty {
    background: #e3f2fd;
    color: #1565c0;
}

.duty-badge.blank {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffcc80;
}

/* Parsing Editor */
.parsing-editor-container {
    margin-bottom: 20px;
}

.parsing-editor-section {
    margin-bottom: 30px;
}

.parsing-editor-section h4 {
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
}

.parsing-editor-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.parsing-editor-table thead {
    background: #667eea;
    color: white;
}

.parsing-editor-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.parsing-editor-table td {
    padding: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.parsing-editor-table tbody tr:hover {
    background: #f8f9ff;
}

.parsing-editor-table tbody tr:last-child td {
    border-bottom: none;
}

.parsing-editor-table input,
.parsing-editor-table select {
    width: 100%;
    padding: 8px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
}

.parsing-editor-table input:focus,
.parsing-editor-table select:focus {
    outline: none;
    border-color: #667eea;
}

.edit-date {
    min-width: 140px;
}

.edit-duty-type {
    min-width: 100px;
}

.edit-flight {
    min-width: 100px;
}

.edit-origin,
.edit-destination {
    min-width: 80px;
}
