:root {
    --brand: #0a4d8c;
    --brand-soft: #e9f1fb;
    --accent: #ffb703;
}

body { font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }

.navbar.bg-primary { background-color: var(--brand) !important; }

.hero {
    background: linear-gradient(135deg, #0a4d8c 0%, #1976d2 100%);
    color: #fff;
    padding: 4rem 0 5rem;
    margin: -1.5rem -15px 2rem;
    border-radius: 0 0 8px 8px;
}

.flight-card {
    border-left: 4px solid var(--brand);
    transition: box-shadow 0.15s ease;
}
.flight-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }

/* ------- Seat map ------- */
.seat-map-wrapper {
    background: linear-gradient(to bottom, #f8fafc, #fff);
    padding: 16px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow-x: auto;
}
.seat-map-wrapper.cabin-divider { border-top: 4px dashed #cbd5e1; margin-top: 18px; padding-top: 18px; }
.cabin-header {
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-size: 11px;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
}
.cabin-header .cabin-pill {
    display: inline-block;
    padding: 2px 12px;
    border-radius: 12px;
    border: 1px solid currentColor;
}
.cabin-header.F .cabin-pill { color: #92400e; background: #fef3c7; }
.cabin-header.J .cabin-pill { color: #1e3a8a; background: #dbeafe; }
.cabin-header.W .cabin-pill { color: #6b21a8; background: #ede9fe; }
.cabin-header.Y .cabin-pill { color: #475569; background: #f1f5f9; }

.seat-map { display: grid; gap: 4px; user-select: none; justify-content: center; }
.seat {
    width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #f1f5f9;
    cursor: pointer;
    font-size: 11px; font-weight: 600;
    color: #475569;
    transition: all 0.1s;
    position: relative;
}
.seat.available:hover { background: #e0f2fe; border-color: #0284c7; transform: scale(1.06); z-index: 1; }
.seat.selected {
    background: #2563eb; color: #fff; border-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.25);
}
.seat.held-by-party {
    background: #14b8a6; color: #fff; border-color: #0f766e;
    cursor: not-allowed;
}
.seat.held-by-party::after {
    content: '✓';
    position: absolute; top: -3px; right: -3px;
    background: #fff; color: #0f766e; border-radius: 50%;
    width: 14px; height: 14px; font-size: 10px; line-height: 14px;
    border: 1px solid #0f766e;
}
.seat.taken { background: #cbd5e1; color: #94a3b8; cursor: not-allowed; border-color: #94a3b8; }
.seat.taken::after { content: '✕'; font-size: 10px; opacity: 0.5; position: absolute; }
.seat.blocked { background: repeating-linear-gradient(45deg, #fef2f2, #fef2f2 2px, transparent 2px, transparent 4px); cursor: not-allowed; }
.seat.aisle-gap { background: transparent !important; border: none !important; cursor: default; box-shadow: none !important; }
.seat.aisle-gap.exit-mark { color: #dc2626; font-size: 9px; font-weight: 700; }
.seat.exit { border-color: #dc2626; border-width: 2px; }
.seat.extra-legroom { box-shadow: inset 0 -3px 0 #22c55e; }

/* Cabin-specific shapes/sizes */
.seat.cabin-F {
    width: 64px; height: 56px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-color: #b45309; border-width: 2px;
    border-radius: 10px;
    box-shadow: inset 0 -4px 0 rgba(180,83,9,0.2);
    color: #78350f;
    font-size: 13px;
}
.seat.cabin-J {
    width: 56px; height: 50px;
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border-color: #1e40af; border-width: 2px;
    border-radius: 10px;
    box-shadow: inset 0 -4px 0 rgba(30,64,175,0.2);
    color: #1e3a8a;
}
.seat.cabin-W {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    border-color: #7c3aed; border-width: 2px;
    border-radius: 8px;
    color: #6b21a8;
}
.seat.cabin-Y { /* default */ }
.seat.cabin-Y.basic { opacity: 0.55; cursor: not-allowed; }

.seat-row-label { color: #94a3b8; font-size: 10px; text-align: right; }

/* Aircraft fuselage outline */
.fuselage {
    position: relative;
    background: #fff;
    padding: 22px 28px 22px 28px;
    border-radius: 60px / 18px;
    border: 2px solid #e2e8f0;
    box-shadow: inset 0 0 0 4px #f8fafc;
    max-width: max-content;
    margin: 0 auto;
}
.fuselage::before, .fuselage::after {
    content: ''; position: absolute;
    width: 32px; height: 32px;
    border-radius: 50%; background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    top: 50%; transform: translateY(-50%);
}
.fuselage::before { left: -16px; }
.fuselage::after { right: -16px; }

/* Legend */
.seat-legend {
    display: flex; flex-wrap: wrap; gap: 10px;
    padding: 8px 0 12px; font-size: 12px;
}
.seat-legend .chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 10px; border-radius: 12px;
    border: 1px solid #cbd5e1; background: #f8fafc;
}
.seat-legend .swatch { width: 14px; height: 14px; border-radius: 4px; border: 1px solid #cbd5e1; }

.pnr-display {
    font-family: "SF Mono", Menlo, Consolas, monospace;
    letter-spacing: 3px;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--brand);
}

.fare-bucket {
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
}
.fare-bucket:hover { border-color: #94a3b8; }
.fare-bucket.selected { border-color: var(--brand); background: var(--brand-soft); }

/* Cross-link helpers for internal pages */
a.link-pnr, a.link-flight, a.link-crew, a.link-tail {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted #94a3b8;
    transition: border-color 0.15s, color 0.15s;
}
a.link-pnr:hover, a.link-flight:hover, a.link-crew:hover, a.link-tail:hover {
    color: #0a4d8c;
    border-bottom-color: #0a4d8c;
    border-bottom-style: solid;
    text-decoration: none;
}

.timeline {
    position: relative;
    padding: 0 1rem;
}
.timeline::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0; right: 0;
    height: 2px;
    background: #cbd5e1;
    z-index: 0;
}
.timeline .endpoint {
    position: relative;
    z-index: 1;
    background: #fff;
    padding: 0 0.5rem;
}
