/*
 * NCAS Flight Services
 * Pilots Directory v0.6.0
 */

.pilots-layout {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 28px 30px 42px;
    box-sizing: border-box;
}

.pilots-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 24px;
}

.pilots-eyebrow {
    color: #b31932;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.pilots-heading h1 {
    margin: 7px 0;
    color: #182638;
    font-size: 32px;
    line-height: 1.15;
}

.pilots-heading p {
    margin: 0;
    color: #718096;
    font-size: 14px;
}

.pilots-version {
    color: #8a95a5;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.7px;
    white-space: nowrap;
}

/* Summary */

.pilot-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.pilot-summary-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    padding: 21px 24px;
    background: #fff;
    border: 1px solid #e2e7ee;
    border-radius: 13px;
    box-shadow: 0 5px 18px rgba(19, 37, 58, 0.04);
}

.pilot-summary-card > span {
    color: #67768a;
    font-size: 13px;
    font-weight: 700;
}

.pilot-summary-card strong {
    color: #182638;
    font-size: 31px;
    font-weight: 800;
    line-height: 1.1;
}

.pilot-summary-card small {
    color: #8793a2;
    font-size: 12px;
}

/* Directory panel */

.pilots-panel {
    overflow: hidden;
    background: #fff;
    border: 1px solid #e2e7ee;
    border-radius: 13px;
    box-shadow: 0 5px 18px rgba(19, 37, 58, 0.04);
}

.pilots-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px;
    padding: 22px 24px;
    border-bottom: 1px solid #e7ebf0;
}

.pilots-panel-header h2 {
    margin: 0 0 5px;
    color: #182638;
    font-size: 18px;
}

.pilots-panel-header p {
    margin: 0;
    color: #8591a0;
    font-size: 12px;
}

.pilots-search {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.pilots-search input[type="search"] {
    width: 275px;
    max-width: 100%;
    padding: 11px 13px;
    color: #243449;
    background: #f8fafc;
    border: 1px solid #dce2ea;
    border-radius: 8px;
    font: inherit;
    font-size: 13px;
}

.pilots-search input[type="search"]:focus {
    outline: 2px solid rgba(179, 25, 50, 0.22);
    outline-offset: 1px;
    border-color: #b31932;
}

.pilots-search button {
    padding: 11px 17px;
    color: #fff;
    background: #b31932;
    border: 1px solid #b31932;
    border-radius: 8px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.pilots-search button:hover {
    background: #94142a;
}

.pilots-clear {
    padding: 10px;
    color: #6f7c8d;
    text-decoration: none;
    font-size: 13px;
}

/* Table */

.pilots-table-scroll {
    width: 100%;
    overflow-x: auto;
}

.pilots-table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
    font-size: 13px;
}

.pilots-table th {
    padding: 15px 17px;
    color: #6f7c8d;
    background: #f8fafc;
    border-bottom: 1px solid #e7ebf0;
    text-align: left;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.pilots-table th a {
    color: inherit;
    text-decoration: none;
}

.pilots-table th a:hover {
    color: #b31932;
}

.pilots-table td {
    padding: 15px 17px;
    color: #344256;
    border-bottom: 1px solid #eef1f5;
}

.pilots-table tbody tr:hover {
    background: #fbfcfe;
}

.pilots-table tbody tr:last-child td {
    border-bottom: none;
}

.pilots-table .numeric {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.pilot-identity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pilot-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    height: 36px;
    color: #b31932;
    background: #fff0f2;
    border: 1px solid #f3d8dd;
    border-radius: 10px;
    font-size: 17px;
}

.pilot-identity strong {
    display: block;
    color: #182638;
    font-size: 13px;
}

.pilot-identity small {
    display: block;
    margin-top: 4px;
    color: #929eac;
    font-size: 11px;
}

.pilot-cid {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    color: #5e6f82;
}

.pilot-status {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.pilot-status.active {
    color: #177749;
    background: #e8f6ee;
}

.pilot-status.inactive {
    color: #7a8593;
    background: #eef1f4;
}

.pilot-date {
    color: #6f7c8d;
    font-variant-numeric: tabular-nums;
}

.muted {
    color: #a0aab6;
}

.pilots-empty {
    padding: 45px !important;
    text-align: center;
    color: #8793a2 !important;
}

.pilots-table-footer {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 24px;
    color: #8793a2;
    border-top: 1px solid #e7ebf0;
    font-size: 11px;
}

@media (max-width: 800px) {
    .pilots-layout {
        padding: 20px 15px 30px;
    }

    .pilots-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .pilot-summary {
        grid-template-columns: 1fr;
    }

    .pilots-panel-header {
        align-items: stretch;
        flex-direction: column;
    }

    .pilots-search input[type="search"] {
        flex: 1;
        min-width: 180px;
    }
}

/*
 * =====================================================
 * NCAS PILOT PROFILE — v0.6.1
 * =====================================================
 */

.pilot-profile {
    max-width: 1600px;
}

.pilot-back {
    display: inline-block;
    margin-bottom: 22px;
    color: #b31932;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.pilot-back:hover {
    text-decoration: underline;
}

.pilot-profile-heading {
    margin-bottom: 24px;
}

.pilot-profile-identity {
    display: flex;
    align-items: center;
    gap: 21px;
}

.pilot-profile-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 76px;
    height: 76px;
    color: #b31932;
    background: #fff0f2;
    border: 1px solid #f3d8dd;
    border-radius: 17px;
    font-size: 36px;
}

.pilot-profile-heading h1 {
    margin: 6px 0 11px;
    color: #182638;
    font-size: 31px;
    line-height: 1.15;
}

.pilot-profile-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 18px;
    color: #738094;
    font-size: 13px;
}

.pilot-profile-meta strong {
    color: #2d3e52;
}

.pilot-summary-card .pilot-summary-date {
    font-size: clamp(18px, 2vw, 26px);
    white-space: nowrap;
}

.pilot-profile-section {
    margin-bottom: 22px;
}

.pilot-profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.pilot-profile-grid .pilots-panel {
    min-width: 0;
}

.pilot-flight-status {
    display: inline-block;
    padding: 5px 9px;
    color: #53657b;
    background: #eff3f7;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.pilot-flight-link {
    color: #b31932;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.pilot-flight-link:hover {
    text-decoration: underline;
}

.pilot-profile-note {
    margin-top: 22px;
    color: #8793a2;
    font-size: 12px;
}

@media (max-width: 900px) {
    .pilot-profile-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .pilot-profile-identity {
        align-items: flex-start;
        gap: 14px;
    }

    .pilot-profile-avatar {
        flex-basis: 54px;
        height: 54px;
        border-radius: 12px;
        font-size: 25px;
    }

    .pilot-profile-heading h1 {
        font-size: 24px;
    }

    .pilot-profile-meta {
        gap: 8px 12px;
    }
}

.pilot-name-link {
    color: #182638;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.pilot-name-link:hover {
    color: #b31932;
    text-decoration: underline;
}

/*
 * =====================================================
 * NCAS PILOT FLIGHT HISTORY PAGINATION — v0.6.3
 * =====================================================
 */

.pilot-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 18px 22px;
    background: #ffffff;
    border-top: 1px solid #e7ebf0;
}

.pilot-pagination-info {
    color: #758397;
    font-size: 12px;
}

.pilot-pagination-info strong {
    color: #26364a;
    font-weight: 800;
}

.pilot-pagination-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.pilot-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 34px;
    padding: 6px 11px;
    box-sizing: border-box;
    color: #344256;
    background: #f8fafc;
    border: 1px solid #dfe5ec;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.pilot-page-link:hover {
    color: #b31932;
    background: #fff3f5;
    border-color: #e8b5be;
}

.pilot-page-link.current {
    color: #ffffff;
    background: #b31932;
    border-color: #b31932;
    cursor: default;
}

.pilot-page-link.current:hover {
    color: #ffffff;
    background: #b31932;
}

@media (max-width: 700px) {
    .pilot-pagination {
        align-items: flex-start;
        flex-direction: column;
        padding: 15px;
    }

    .pilot-pagination-links {
        width: 100%;
    }
}
