/* AMX Flights — modern ticket log + boarding pass */

.amx-flights-page .home-hero__lead {
    max-width: 36rem;
}

.amx-flights.home-section--light {
    background:
        radial-gradient(ellipse 80% 50% at 10% 0%, rgba(250, 0, 115, 0.05), transparent 55%),
        radial-gradient(ellipse 70% 45% at 90% 100%, rgba(3, 13, 117, 0.06), transparent 50%),
        #f7f8fc;
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
}

.amx-flights__wrap {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.amx-flights__panel {
    border: 1px solid rgba(3, 13, 117, 0.08);
    border-radius: 1.5rem;
    overflow: hidden;
    background: #fff;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.8) inset,
        0 22px 56px rgba(2, 12, 65, 0.08);
}

.amx-flights__scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.stat-network-logo {
    filter: brightness(0) saturate(100%) invert(11%) sepia(98%) saturate(2842%) hue-rotate(221deg) brightness(92%) contrast(101%);
}

.network-ivao {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: #fff;
}

.network-vatsim {
    background: linear-gradient(135deg, #047857, #10b981);
    color: #fff;
}

.network-offline {
    background: linear-gradient(135deg, #6b7280, #9ca3af);
    color: #fff;
}

.status-accepted,
.status-pending,
.status-rejected {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.status-accepted {
    color: #047857;
    background: rgba(16, 185, 129, 0.12);
}

.status-pending {
    color: #b45309;
    background: rgba(245, 158, 11, 0.14);
}

.status-rejected {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.12);
}

.bp-value.status-accepted,
.bp-value.status-pending,
.bp-value.status-rejected {
    display: block;
    padding: 0;
    border-radius: 0;
    background: transparent;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

.landing-excellent { color: #10b981; font-weight: 800; }
.landing-good { color: #eab308; font-weight: 800; }
.landing-acceptable { color: #f97316; font-weight: 800; }
.landing-bad { color: #ef4444; font-weight: 800; }

/* —— Ticket-style table —— */
.compact-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 720px;
}

.compact-table thead th {
    padding: 0.95rem 1.1rem;
    text-align: center;
    font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    background: #020c41;
    color: rgba(255, 255, 255, 0.78);
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 2px solid #fa0073;
}

.compact-table thead th.text-center {
    text-align: center;
}

.compact-table tbody tr {
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    background: #fff;
}

.compact-table tbody tr + tr td {
    border-top: 1px dashed rgba(3, 13, 117, 0.1);
}

.compact-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(250, 0, 115, 0.05), rgba(3, 13, 117, 0.03));
}

.compact-table tbody tr:active {
    background: rgba(250, 0, 115, 0.08);
}

.compact-table tbody td {
    padding: 1.05rem 1.1rem;
    font-size: 0.875rem;
    vertical-align: middle;
    text-align: center;
}

.flight-pilot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-width: 0;
    text-align: left;
}

.flight-pilot__avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(145deg, rgba(3, 13, 117, 0.1), rgba(250, 0, 115, 0.1));
    color: #030d75;
    font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
}

.flight-pilot__name {
    font-weight: 700;
    color: #020c41;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 10rem;
}

.flight-pilot__ident {
    margin-top: 0.15rem;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0.04em;
}

.flight-num {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.65rem;
    border-radius: 0.5rem;
    background: #020c41;
    color: #fff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 700;
    font-size: 0.8125rem;
    letter-spacing: 0.04em;
}

.flight-route {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #020c41;
    letter-spacing: 0.02em;
}

.flight-route i {
    color: #fa0073;
    font-size: 0.7rem;
}

.flight-meta {
    color: #64748b;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.flight-meta--mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.flight-empty {
    text-align: center;
    padding: 3.5rem 1.5rem !important;
    color: #94a3b8;
}

.flight-empty i {
    display: block;
    font-size: 2.25rem;
    margin-bottom: 0.85rem;
    color: #cbd5e1;
}

.amx-flights__footer {
    padding: 1.1rem 1.35rem 1.25rem;
    border-top: 1px solid rgba(3, 13, 117, 0.06);
    background: #fafbfd;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.amx-flights__pager,
.amx-flights__filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
}

.amx-flights__chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 700;
    background: #fff;
    color: #334155;
    border: 1px solid rgba(3, 13, 117, 0.1);
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}

.amx-flights__chip:hover {
    background: #fa0073;
    border-color: #fa0073;
    color: #fff;
    transform: translateY(-1px);
}

.amx-flights__chip--active {
    background: #030d75;
    border-color: #030d75;
    color: #fff;
}

.amx-flights__chip--active:hover {
    background: #fa0073;
    border-color: #fa0073;
}

.amx-flights__meta {
    color: #64748b;
    font-size: 0.8125rem;
    font-weight: 600;
}

/* —— Aeromexico-style boarding pass —— */
.boarding-pass-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(20, 20, 20, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.28s ease;
}

.boarding-pass-overlay.active {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.boarding-pass {
    position: relative;
    width: min(100%, 58rem);
    max-height: min(94vh, 40rem);
    overflow: auto;
    border-radius: 0.65rem;
    background: #f7f7f5;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.4);
    transform: translateY(24px) scale(0.97);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    color: #111;
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
}

.boarding-pass-overlay.active .boarding-pass {
    transform: translateY(0) scale(1);
}

.boarding-pass-close {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    z-index: 30;
    width: 2.1rem;
    height: 2.1rem;
    border: 1px solid #111;
    border-radius: 0;
    background: #fff;
    color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.boarding-pass-close:hover {
    background: #111;
    color: #fff;
}

.bp-hidden { display: none !important; }

.bp-ticket {
    display: grid;
    grid-template-columns: 1fr 13.5rem;
    min-height: 100%;
    background: #f7f7f5;
}

.bp-main {
    position: relative;
    padding: 1.35rem 1.5rem 1.1rem;
    border-right: 1.5px dashed #1a1a1a;
}

.bp-main::before,
.bp-main::after,
.bp-stub::before,
.bp-stub::after {
    content: '';
    position: absolute;
    width: 1.15rem;
    height: 1.15rem;
    background: #141414;
    border-radius: 50%;
    z-index: 2;
}

.bp-main::before { top: -0.6rem; right: -0.65rem; }
.bp-main::after { bottom: -0.6rem; right: -0.65rem; }
.bp-stub::before { top: -0.6rem; left: -0.65rem; }
.bp-stub::after { bottom: -0.6rem; left: -0.65rem; }

.bp-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    margin-bottom: 1.15rem;
    padding-right: 2rem;
}

.bp-brand--stub {
    padding-right: 0;
    margin-bottom: 0.85rem;
    flex-direction: column;
    gap: 0.35rem;
}

.bp-brand__mark {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
    filter: invert(1);
}

.bp-brand--stub .bp-brand__mark {
    width: 1.65rem;
    height: 1.65rem;
}

.bp-brand__name {
    font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #111;
}

.bp-brand--stub .bp-brand__name {
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-align: center;
    line-height: 1.2;
}

.bp-row {
    display: grid;
    gap: 0.75rem 1rem;
    margin-bottom: 0.95rem;
}

.bp-row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bp-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bp-row--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bp-row--stub {
    grid-template-columns: 1fr;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
}

.bp-field {
    text-align: center;
    min-width: 0;
}

.bp-label {
    display: block;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #555;
    margin-bottom: 0.28rem;
    text-align: center;
}

.bp-value {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #111;
    line-height: 1.2;
    word-break: break-word;
    text-align: center;
}

.bp-value--lg {
    font-size: 1.35rem;
    letter-spacing: 0.04em;
}

.bp-value--route {
    font-size: 1.05rem;
}

.bp-value--seat {
    font-size: 1.65rem;
    letter-spacing: 0.06em;
}

.bp-code {
    display: block;
    margin-top: 0.2rem;
    font-style: normal;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #333;
    text-align: center;
}

.bp-bottom {
    display: grid;
    grid-template-columns: 7.5rem 1fr auto;
    gap: 0.85rem;
    align-items: end;
    margin-top: 0.35rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.bp-barcode {
    height: 3.4rem;
    background:
        repeating-linear-gradient(
            90deg,
            #111 0 1px,
            #f7f7f5 1px 2px,
            #111 2px 3px,
            #f7f7f5 3px 5px,
            #111 5px 6px,
            #f7f7f5 6px 8px,
            #111 8px 11px,
            #f7f7f5 11px 12px,
            #111 12px 13px,
            #f7f7f5 13px 16px
        ),
        repeating-linear-gradient(
            0deg,
            transparent 0 2px,
            rgba(0, 0, 0, 0.04) 2px 3px
        );
    border: 1px solid #111;
}

.bp-barcode--stub {
    height: 2.75rem;
    margin-top: auto;
    width: 100%;
}

.bp-eticket,
.bp-idline {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #222;
    text-align: center;
    line-height: 1.35;
}

.bp-stub {
    position: relative;
    padding: 1.1rem 0.8rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    background: #f0f0ec;
}

.bp-stub .bp-field {
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.bp-stub .bp-value {
    font-size: 0.78rem;
}

.bp-stub .bp-label {
    font-size: 0.52rem;
}

@media (max-width: 860px) {
    .bp-ticket {
        grid-template-columns: 1fr;
    }

    .bp-main {
        border-right: none;
        border-bottom: 1.5px dashed #1a1a1a;
    }

    .bp-main::before,
    .bp-main::after,
    .bp-stub::before,
    .bp-stub::after {
        display: none;
    }

    .bp-row--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bp-stub {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.65rem 0.75rem;
    }

    .bp-brand--stub,
    .bp-barcode--stub {
        grid-column: 1 / -1;
    }

    .bp-row--stub {
        grid-column: 1 / -1;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* —— Mobile boarding pass (recent flights popup) —— */
@media (max-width: 640px) {
    .boarding-pass-overlay.active {
        align-items: flex-end;
        justify-content: stretch;
        padding: 0;
    }

    .boarding-pass {
        width: 100%;
        max-width: none;
        max-height: min(88vh, 40rem);
        margin: 0;
        border-radius: 1.15rem 1.15rem 0 0;
        box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.28);
        transform: translateY(100%);
        -webkit-overflow-scrolling: touch;
    }

    .boarding-pass-overlay.active .boarding-pass {
        transform: translateY(0);
    }

    .boarding-pass-close {
        top: 0.75rem;
        right: 0.75rem;
        width: 2.35rem;
        height: 2.35rem;
        border-radius: 999px;
        border: none;
        background: rgba(0, 0, 0, 0.08);
    }

    .bp-ticket {
        grid-template-columns: 1fr;
    }

    .bp-stub {
        display: none;
    }

    .bp-main {
        border-right: none;
        border-bottom: none;
        padding: 1.15rem 1rem 1.25rem;
    }

    .bp-main::before,
    .bp-main::after {
        display: none;
    }

    .bp-brand {
        margin-bottom: 0.95rem;
        padding-right: 2.5rem;
        gap: 0.5rem;
    }

    .bp-brand__mark {
        width: 1.65rem;
        height: 1.65rem;
    }

    .bp-brand__name {
        font-size: 0.78rem;
        letter-spacing: 0.1em;
    }

    .bp-row {
        gap: 0.55rem 0.65rem;
        margin-bottom: 0.7rem;
        padding: 0.65rem 0.55rem;
        background: #fff;
        border: 1px solid rgba(0, 0, 0, 0.08);
        border-radius: 0.75rem;
    }

    .bp-row--2,
    .bp-row--3,
    .bp-row--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bp-row--3 > .bp-field:last-child {
        grid-column: 1 / -1;
    }

    .bp-label {
        font-size: 0.52rem;
        letter-spacing: 0.1em;
        margin-bottom: 0.2rem;
        color: #777;
    }

    .bp-value {
        font-size: 0.82rem;
        line-height: 1.25;
    }

    .bp-value--lg {
        font-size: 1.15rem;
    }

    .bp-value--route {
        font-size: 0.72rem;
        font-weight: 600;
        text-transform: none;
        letter-spacing: 0;
        color: #555;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.3;
        max-height: 2.6em;
    }

    .bp-value--seat {
        font-size: 1.25rem;
    }

    .bp-code {
        font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
        font-size: 1.05rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        color: #111;
        margin-top: 0.15rem;
    }

    .bp-row--2 .bp-field {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .bp-row--2 .bp-label { order: 0; }
    .bp-row--2 .bp-code { order: 1; margin-top: 0; margin-bottom: 0.2rem; }
    .bp-row--2 .bp-value--route { order: 2; }

    .bp-bottom {
        grid-template-columns: 5.5rem 1fr;
        gap: 0.65rem;
        align-items: center;
        margin-top: 0.15rem;
        padding: 0.75rem 0.55rem 0.15rem;
        border-top: none;
    }

    .bp-barcode {
        height: 2.6rem;
        width: 100%;
        border-radius: 0.25rem;
    }

    .bp-eticket,
    .bp-idline {
        font-size: 0.58rem;
        text-align: left;
        line-height: 1.45;
    }

    .bp-idline {
        grid-column: 2;
    }

    .amx-flights.home-section--light {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}
