/* ── Google Fonts loaded via <link> in HTML (faster than @import) ─────────── */


/* ── Reset & Base ──────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --blue-dark: #0D6FA8;
    --blue: #1285C4;
    --blue-light: #E3F2FB;
    --orange: #F36F21;
    --orange-dark: #D45A0D;
    --green: #1A7F4B;
    --green-light: #E6F5EE;
    --red: #B91C1C;
    --red-light: #FEE2E2;
    --amber: #B45309;
    --amber-light: #FEF3C7;
    --purple: #6D28D9;
    --purple-light: #EDE9FE;
    --grey-50: #F8FAFC;
    --grey-100: #F1F5F9;
    --grey-200: #E2E8F0;
    --grey-400: #94A3B8;
    --grey-600: #475569;
    --grey-800: #1E293B;
    --white: #FFFFFF;
    --radius: 6px;
    --shadow: 0 1px 4px rgba(0, 0, 0, .10);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, .12);
}

body {
    font-family: "Raleway", sans-serif;
    font-size: 14px;
    color: var(--grey-800);
    background: #E8EDF3;
    line-height: 1.5;
}

a {
    color: var(--blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}


/* ── Buttons ───────────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 26px;
    border: none;
    border-radius: 50px;
    /* pill — matches TCAA site */
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s, box-shadow .18s, transform .18s;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.btn:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: .45;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: var(--orange);
    color: var(--white);
    box-shadow: 0 4px 16px rgba(242, 101, 34, .40);
}

.btn-primary:hover {
    background: var(--orange-dark);
    box-shadow: 0 6px 20px rgba(242, 101, 34, .50);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--blue);
    color: var(--blue);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--blue);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(18, 133, 196, .35);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-sm {
    padding: 6px 18px;
    font-size: 13px;
}


/* ── Badges ────────────────────────────────────────────────────────────────── */

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
}

.badge-lg {
    font-size: 13px;
    padding: 4px 12px;
}

.badge-sm {
    font-size: 10px;
    padding: 1px 6px;
}

.badge-active {
    background: var(--green-light);
    color: var(--green);
}

.badge-expired {
    background: var(--red-light);
    color: var(--red);
}

.badge-permanent {
    background: var(--purple-light);
    color: var(--purple);
}

.badge-estimated {
    background: var(--amber-light);
    color: var(--amber);
}

.badge-success {
    background: var(--green-light);
    color: var(--green);
}

.badge-failed {
    background: var(--red-light);
    color: var(--red);
}

.badge-partial {
    background: var(--amber-light);
    color: var(--amber);
}


/* ── Pills ─────────────────────────────────────────────────────────────────── */

.icao-pill {
    display: inline-block;
    background: var(--blue-light);
    color: var(--blue-dark);
    border-radius: var(--radius);
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 700;
    font-family: monospace;
}

.fir-pill {
    display: inline-block;
    background: #e6f4ea;
    color: #1a5c2a;
    border-radius: var(--radius);
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 700;
    font-family: monospace;
    letter-spacing: .03em;
}

.series-pill {
    display: inline-block;
    background: var(--grey-100);
    color: var(--grey-600);
    border-radius: var(--radius);
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
}


/* ── Alerts ────────────────────────────────────────────────────────────────── */

.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-weight: 500;
}

.alert-error {
    background: var(--red-light);
    color: var(--red);
    border: 1px solid #FECACA;
}

.alert-success {
    background: var(--green-light);
    color: var(--green);
    border: 1px solid #6EE7B7;
}

.alert-warning {
    background: var(--amber-light);
    color: var(--amber);
    border: 1px solid #FCD34D;
}


/* ── Site Header ───────────────────────────────────────────────────────────── */

.site-header {
    background: linear-gradient(135deg, #0B5E90 0%, var(--blue-dark) 60%, #0E7AB8 100%);
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 3px 16px rgba(0, 0, 0, .28);
    border-bottom: 4px solid var(--orange);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#logo {
    max-height: 40px;
    /* Adjust the maximum height as needed */
}

#logo2 {
    max-height: 60px;
    /* Adjust the maximum height as needed */
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-brand-link {
    text-decoration: none;
    color: inherit;
}

.header-brand-link:hover {
    text-decoration: none;
}

.brand-tcaa {
    color: var(--blue-dark);
    font-size: 18px;
    font-weight: 900;
    padding: 5px 11px;
    border-radius: 4px;
    letter-spacing: 1.5px;
    line-height: 1;
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.35;
}

.brand-text strong {
    font-size: 15px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: .01em;
}

.brand-text span {
    font-size: 11.5px;
    color: rgba(255, 255, 255, .60);
    letter-spacing: .02em;
}


/* Admin link — text only, subtle */

.header-admin-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--white);
    font-size: 12.5px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 50px;
    border: 1.5px solid rgba(255, 255, 255, .45);
    transition: color .15s, border-color .15s, background .15s, box-shadow .15s;
    text-decoration: none;
    white-space: nowrap;
}

.header-admin-link:hover {
    color: var(--white);
    border-color: var(--white);
    background: rgba(255, 255, 255, .15);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .20);
    text-decoration: none;
}

.btn-outline {
    border-color: rgba(255, 255, 255, .5);
    color: var(--white);
}


/* ── Search Page ───────────────────────────────────────────────────────────── */

.search-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 24px 24px;
}

.search-form {
    background: var(--white);
    border: 1px solid var(--grey-200);
    border-radius: 10px;
    border-top: 3px solid var(--blue-dark);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .10);
}


/* Compact label row at top of the search card */

.search-form-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--grey-100);
}

.search-form-heading-left {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.search-form-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--blue-dark);
    letter-spacing: .01em;
    white-space: nowrap;
    padding-left: 10px;
    border-left: 3px solid var(--orange);
}

.search-form-sub {
    font-size: 12px;
    color: var(--grey-400);
}


/* ── PDC download button ──────────────────────────────────────────────────── */

.btn-pdc {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 18px;
    border: 2px solid var(--orange);
    border-radius: 50px;
    background: var(--white);
    color: var(--orange);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
    transition: background .18s, color .18s, box-shadow .18s, transform .18s;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(242, 101, 34, .15);
}

.btn-pdc:hover {
    background: var(--orange);
    color: var(--white);
    box-shadow: 0 4px 16px rgba(242, 101, 34, .40);
    transform: translateY(-1px);
    text-decoration: none;
}


/* ── Results header + action buttons ─────────────────────────────────────── */

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--grey-600);
}

.results-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}


/* ── Per-page selector ───────────────────────────────────────────────────── */

.per-page-wrap {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--grey-600);
    font-weight: 500;
    white-space: nowrap;
}

.per-page-sel {
    padding: 5px 10px;
    border: 1.5px solid var(--grey-200);
    border-radius: 50px;
    font-size: 12px;
    font-family: inherit;
    background: var(--white);
    color: var(--grey-800);
    cursor: pointer;
    transition: border-color .18s, box-shadow .18s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .07);
}

.per-page-sel:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(18, 133, 196, .15);
}


/* Shared base for Print + Download PDF buttons */

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 16px;
    border: 1.5px solid var(--grey-200);
    border-radius: 50px;
    background: var(--white);
    color: var(--grey-600);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .18s, color .18s, background .18s, box-shadow .18s, transform .18s;
    white-space: nowrap;
    text-decoration: none;
    font-family: inherit;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}

.btn-action:hover {
    border-color: var(--blue);
    color: var(--blue);
    box-shadow: 0 3px 10px rgba(18, 133, 196, .20);
    transform: translateY(-1px);
    text-decoration: none;
}


/* Download PDF — orange filled variant */

.btn-action-primary {
    background: var(--orange);
    border-color: var(--orange);
    color: var(--white);
    box-shadow: 0 3px 12px rgba(242, 101, 34, .35);
}

.btn-action-primary:hover {
    background: var(--orange-dark);
    border-color: var(--orange-dark);
    color: var(--white);
    box-shadow: 0 5px 16px rgba(242, 101, 34, .45);
    transform: translateY(-1px);
}

.btn-action-primary.pdf-loading {
    opacity: .8;
    pointer-events: none;
    transform: none;
}

.pdf-btn-spinner {
    animation: spin .7s linear infinite;
}


/* ── Full/short message toggle ────────────────────────────────────────────── */

.msg-full {
    display: none;
}


/* ── Print-only header (hidden on screen) ─────────────────────────────────── */

.print-header {
    display: none;
}


/* ── Multi-select dropdown (Location filter) ──────────────────────────────── */

.multi-sel {
    position: relative;
}

.multi-sel-btn {
    /* identical to .filter-group select */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 7px 10px;
    border: 1.5px solid var(--grey-200);
    border-radius: var(--radius);
    background: var(--white);
    font-size: 13px;
    font-family: inherit;
    color: var(--grey-800);
    cursor: pointer;
    transition: border-color .15s;
    text-align: left;
    white-space: nowrap;
    width: 100%;
    overflow: hidden;
}

#icao-ms-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.multi-sel-btn:hover,
.multi-sel--open .multi-sel-btn {
    border-color: var(--blue);
}

.multi-sel-btn--active {
    border-color: var(--blue);
}

.multi-sel-chevron {
    flex-shrink: 0;
    color: var(--grey-400);
    transition: transform .18s;
    margin-left: 2px;
}

.multi-sel--open .multi-sel-chevron {
    transform: rotate(180deg);
}

.multi-sel-panel {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: max-content;
    min-width: 100%;
    max-height: 280px;
    overflow-y: auto;
    background: var(--white);
    border: 1.5px solid var(--blue);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    z-index: 200;
}

.multi-sel--open .multi-sel-panel {
    display: block;
}

.multi-sel-group {
    padding: 6px 12px 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--grey-400);
    background: var(--grey-50);
    border-bottom: 1px solid var(--grey-100);
    position: sticky;
    top: 0;
}

.multi-sel-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 12px;
    cursor: pointer;
    font-size: 13px;
    border-bottom: 1px solid var(--grey-100);
    transition: background .1s;
    user-select: none;
}

.multi-sel-item:last-of-type {
    border-bottom: none;
}

.multi-sel-item:hover {
    background: var(--blue-light);
}

.multi-sel-item:has(input:checked) {
    background: #edf3fd;
}

.multi-sel-item:has(input:checked):hover {
    background: var(--blue-light);
}


/* Hide native checkbox, replace with custom box */

.multi-sel-item input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    border: 1.5px solid var(--grey-200);
    border-radius: 3px;
    background: var(--white);
    flex-shrink: 0;
    cursor: pointer;
    transition: background .12s, border-color .12s;
    position: relative;
}

.multi-sel-item input[type="checkbox"]:checked {
    background: var(--blue);
    border-color: var(--blue);
}


/* Checkmark via pseudo-element */

.multi-sel-item input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 0px;
    width: 5px;
    height: 9px;
    border: 2px solid var(--white);
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

.multi-sel-item:hover input[type="checkbox"]:not(:checked) {
    border-color: var(--blue);
}

.multi-sel-item input:checked~.multi-sel-code {
    color: var(--blue-dark);
}

.multi-sel-code {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: 700;
    color: var(--grey-600);
    flex-shrink: 0;
    min-width: 38px;
}

.multi-sel-name {
    color: var(--grey-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.multi-sel-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 12px;
    border-top: 1px solid var(--grey-200);
    background: var(--grey-50);
    position: sticky;
    bottom: 0;
    gap: 8px;
}

.multi-sel-footer button {
    background: none;
    border: none;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

#icao-ms-clear {
    color: var(--grey-600);
}

#icao-ms-clear:hover {
    color: var(--red);
    text-decoration: underline;
}

#icao-ms-done {
    color: var(--white);
    background: var(--blue);
    padding: 4px 12px;
    border-radius: 50px;
    transition: background .15s;
}

#icao-ms-done:hover {
    background: var(--blue-dark);
}

.search-bar-row {
    display: flex;
    gap: 10px;
    margin-bottom: 0;
}


/* ── Filter toggle button ──────────────────────────────────────────────────── */

.btn-filter-toggle {
    background: var(--white);
    border: 2px solid var(--grey-200);
    color: var(--grey-600);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
    position: relative;
}

.btn-filter-toggle:hover {
    border-color: var(--blue);
    color: var(--blue);
    background: var(--white);
    box-shadow: 0 3px 10px rgba(18, 133, 196, .20);
}

.btn-filter-toggle.open {
    border-color: var(--orange);
    color: var(--orange);
    background: rgba(242, 101, 34, .05);
    box-shadow: 0 3px 12px rgba(242, 101, 34, .20);
}


/* Active filter count badge */

.filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 17px;
    height: 17px;
    border-radius: 50px;
    background: var(--orange);
    color: var(--white);
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    padding: 0 4px;
    margin-left: 1px;
}


/* ── Collapsible filter panel ──────────────────────────────────────────────── */

.filter-panel {
    overflow: hidden;
    max-height: 0;
    padding-top: 0;
    opacity: 0;
    /* overflow switches back to hidden AFTER the close animation (0.29s delay) */
    transition: max-height 0.28s ease, padding-top 0.28s ease, opacity 0.22s ease, overflow 0s linear 0.29s;
}

.filter-panel.open {
    overflow: visible;
    /* ← lets the Location dropdown escape the panel */
    max-height: 300px;
    padding-top: 14px;
    opacity: 1;
    /* overflow becomes visible IMMEDIATELY when opening (no delay) */
    transition: max-height 0.28s ease, padding-top 0.28s ease, opacity 0.22s ease, overflow 0s linear 0s;
}


/* ── Active filter chips ───────────────────────────────────────────────────── */

.active-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
}

.active-chips.hidden {
    display: none;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px 3px 11px;
    background: var(--blue-light);
    color: var(--blue-dark);
    border: 1px solid rgba(13, 111, 168, .20);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    animation: chip-in .15s ease;
}

@keyframes chip-in {
    from {
        opacity: 0;
        transform: scale(.85);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.chip-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(13, 111, 168, .15);
    border: none;
    cursor: pointer;
    font-size: 11px;
    line-height: 1;
    color: var(--blue-dark);
    padding: 0;
    transition: background .15s;
}

.chip-remove:hover {
    background: var(--blue-dark);
    color: var(--white);
}

.chip-clear-all {
    font-size: 12px;
    font-weight: 600;
    color: var(--grey-600);
    background: none;
    border: none;
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 4px;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.chip-clear-all:hover {
    color: var(--red);
}

.search-input-wrap {
    position: relative;
    flex: 1;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--grey-400);
    pointer-events: none;
    transition: color .15s;
}

.search-input-wrap:focus-within .search-icon {
    color: var(--blue);
}

.search-input {
    width: 100%;
    padding: 11px 16px 11px 44px;
    border: 1.5px solid var(--grey-200);
    border-radius: 50px;
    font-size: 14px;
    font-family: inherit;
    background: var(--white);
    outline: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .07);
    transition: border-color .18s, box-shadow .18s;
}

.search-input::placeholder {
    color: var(--grey-400);
    font-style: italic;
}

.search-input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(18, 133, 196, .12), 0 1px 4px rgba(0, 0, 0, .07);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    padding-bottom: 4px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--grey-600);
    text-transform: uppercase;
    letter-spacing: .4px;
}

.filter-group select,
.filter-group input[type="date"] {
    padding: 7px 10px;
    border: 1.5px solid var(--grey-200);
    border-radius: var(--radius);
    font-size: 13px;
    background: var(--white);
    outline: none;
    cursor: pointer;
    transition: border-color .15s;
}

.filter-group select:focus,
.filter-group input[type="date"]:focus {
    border-color: var(--blue);
}


/* Toggle */

.filter-toggle {
    justify-content: flex-end;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--grey-800);
    padding-bottom: 8px;
}

.toggle-label input {
    display: none;
}

.toggle-track {
    width: 38px;
    height: 20px;
    background: var(--grey-200);
    border-radius: 20px;
    position: relative;
    transition: background .2s;
    flex-shrink: 0;
}

.toggle-track::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--white);
    transition: transform .2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}

.toggle-label input:checked+.toggle-track {
    background: var(--blue);
}

.toggle-label input:checked+.toggle-track::after {
    transform: translateX(18px);
}


/* ── Results ───────────────────────────────────────────────────────────────── */

#results-count {
    font-weight: 400;
    color: var(--grey-600);
    font-size: 13px;
}

#results-count strong {
    font-weight: 700;
    color: var(--blue-dark);
    font-size: 18px;
    margin-right: 3px;
}

.results-date {
    font-size: 12px;
}

.table-wrap {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid var(--grey-200);
    box-shadow: 0 2px 12px rgba(0, 0, 0, .08);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    font-size: 13px;
}

.data-table thead tr {
    border-bottom: 2px solid #CBD5E1;
    background: linear-gradient(to bottom, #f4f7fb, #edf1f7);
}

.data-table th {
    padding: 11px 14px;
    text-align: left;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--grey-600);
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
}

.data-table td {
    padding: 11px 14px;
    border-bottom: 1px solid #EEF2F7;
    vertical-align: top;
}

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

.data-table tbody tr:nth-child(even) {
    background: #FAFBFD;
}

.data-table tbody tr:hover {
    background: var(--blue-light);
    border-left: 3px solid var(--blue);
}

.data-table tbody tr:hover td:first-child {
    padding-left: 11px;
}

.clickable-row {
    cursor: pointer;
    transition: background .12s;
    border-left: 3px solid transparent;
}


/* Column sizing */

.col-location {
    width: 18%;
}

.col-number {
    width: 120px;
}

.col-series {
    width: 70px;
}

.col-date {
    width: 130px;
}

.col-status {
    width: 90px;
}


/* Cell types */

.td-location strong {
    display: block;
    font-weight: 700;
    color: var(--grey-800);
    font-size: 13px;
}

.td-icao {
    display: block;
    font-size: 11px;
    color: var(--grey-400);
    margin-top: 2px;
    font-family: monospace;
}

.td-number .notam-link {
    font-weight: 700;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: var(--orange);
}

.td-number .notam-link:hover {
    text-decoration: underline;
}

.td-series {
    font-weight: 700;
    color: var(--grey-600);
}


/* Series badges */

.badge-series {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .6px;
    padding: 3px 11px;
    border-radius: 20px;
    text-transform: uppercase;
    display: inline-block;
    align-self: flex-start;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .10);
}

.badge-series-a {
    background: var(--blue-dark);
    color: var(--white);
}

.badge-series-b {
    background: var(--green);
    color: var(--white);
}

.badge-series-c {
    background: var(--amber);
    color: var(--white);
}


/* Active dot on ACTIVE status badge */

.badge-active::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    margin-right: 5px;
    vertical-align: middle;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: .4;
    }
}

.td-date {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: var(--grey-800);
    white-space: nowrap;
}

.td-condition {
    color: var(--grey-800);
    font-size: 12.5px;
    line-height: 1.45;
}

.msg-preview {
    max-width: 320px;
    color: var(--grey-600);
    font-size: 13px;
    line-height: 1.4;
}

.mono {
    font-family: monospace;
    font-size: 12px;
}

.filename {
    font-family: monospace;
    font-size: 12px;
    max-width: 200px;
    word-break: break-all;
}

.notes {
    font-size: 12px;
    color: var(--grey-600);
}


/* ── Pagination ────────────────────────────────────────────────────────────── */

.pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.page-btn {
    padding: 6px 14px;
    border: 1.5px solid var(--grey-200);
    border-radius: 50px;
    background: var(--white);
    font-size: 13px;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.page-btn:hover:not([disabled]) {
    background: var(--blue-light);
    border-color: var(--blue);
}

.page-btn.active {
    background: var(--blue);
    color: var(--white);
    border-color: var(--blue);
}

.page-btn[disabled] {
    opacity: .4;
    cursor: not-allowed;
}

.page-info {
    margin-left: 8px;
    font-size: 13px;
    color: var(--grey-600);
}


/* ── Loading / Empty ───────────────────────────────────────────────────────── */

.loading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 32px;
    justify-content: center;
    color: var(--grey-600);
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--grey-200);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* ── Skeleton loader ───────────────────────────────────────────────────────── */

.skel {
    display: inline-block;
    height: 11px;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--grey-200) 25%, var(--grey-100) 50%, var(--grey-200) 75%);
    background-size: 200% 100%;
    animation: skel-shimmer 1.4s ease-in-out infinite;
}

@keyframes skel-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

tr.skel-row td {
    padding-top: 13px;
    padding-bottom: 13px;
}

.skel-row td .skel {
    display: block;
}

.skel-w-full {
    width: 90%;
}

.skel-w-sub {
    width: 50%;
    margin-top: 5px;
    height: 9px;
    opacity: .6;
}

.skel-w-short {
    width: 70%;
}

.skel-w-xs {
    width: 40%;
}

.skel-w-badge {
    width: 32px;
}

.empty-state {
    text-align: center;
    padding: 56px 24px 48px;
    color: var(--grey-400);
}

.empty-state-icon {
    display: block;
    margin: 0 auto 20px;
    opacity: .45;
}

.empty-state-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--grey-600);
    margin-bottom: 6px;
}

.empty-state-sub {
    font-size: 13px;
    color: var(--grey-400);
}

.hidden {
    display: none !important;
}


/* ── Detail Page ───────────────────────────────────────────────────────────── */

.detail-main {
    max-width: 960px;
    margin: 32px auto;
    padding: 0 24px;
}

.detail-header {
    background: var(--white);
    border: 1px solid var(--grey-200);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.detail-id-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}

.detail-id {
    font-size: 28px;
    font-weight: 800;
    font-family: monospace;
    color: var(--blue-dark);
}

.detail-location {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    flex-wrap: wrap;
}

.detail-location strong {
    font-size: 16px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
}

.detail-card {
    background: var(--white);
    border: 1px solid var(--grey-200);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.detail-card h2 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--grey-600);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--grey-100);
}

.field-table {
    width: 100%;
    border-collapse: collapse;
}

.field-table th {
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--grey-600);
    padding: 7px 0;
    width: 110px;
    vertical-align: top;
}

.field-table td {
    padding: 7px 0;
    font-size: 13px;
    font-family: monospace;
    border-bottom: 1px solid var(--grey-100);
}

.field-table tr:last-child td,
.field-table tr:last-child th {
    border-bottom: none;
}

.notam-message {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--grey-800);
}


/* ── Admin Nav ─────────────────────────────────────────────────────────────── */


/* ── Admin shell ───────────────────────────────────────────────────────────── */

.admin-shell {
    display: flex;
    min-height: 100vh;
}


/* Sidebar */

.admin-sidebar {
    width: 230px;
    flex-shrink: 0;
    background: linear-gradient(180deg, #0B5E90 0%, var(--blue-dark) 100%);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.admin-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 18px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    text-decoration: none;
}

.admin-sidebar-brand img {
    height: 34px;
    flex-shrink: 0;
}

.admin-sidebar-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.admin-sidebar-brand-text strong {
    font-size: 12px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: .02em;
}

.admin-sidebar-brand-text span {
    font-size: 10.5px;
    color: rgba(255, 255, 255, .55);
}

.admin-sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 14px 10px;
    flex: 1;
    gap: 2px;
}

.admin-sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 12px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, .72);
    text-decoration: none;
    transition: background .15s, color .15s;
}

.admin-sidebar-nav a svg {
    flex-shrink: 0;
    opacity: .7;
    transition: opacity .15s;
}

.admin-sidebar-nav a:hover {
    background: rgba(255, 255, 255, .10);
    color: var(--white);
    text-decoration: none;
}

.admin-sidebar-nav a:hover svg {
    opacity: 1;
}

.admin-sidebar-nav a.active {
    background: rgba(255, 255, 255, .16);
    color: var(--white);
    font-weight: 600;
    border-left: 3px solid var(--orange);
    padding-left: 9px;
}

.admin-sidebar-nav a.active svg {
    opacity: 1;
}

.admin-sidebar-nav .nav-spacer {
    flex: 1;
}

.admin-sidebar-nav .nav-signout {
    border-top: 1px solid rgba(255, 255, 255, .12);
    margin-top: 8px;
    padding-top: 10px;
}

.admin-sidebar-nav .nav-signout a {
    color: rgba(255, 200, 200, .75);
}

.admin-sidebar-nav .nav-signout a:hover {
    background: rgba(220, 50, 50, .15);
    color: #FCA5A5;
}


/* Main content area */

.admin-body {
    flex: 1;
    background: #E8EDF3;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    background: var(--white);
    border-bottom: 1px solid var(--grey-200);
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
}

.admin-topbar-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--grey-800);
}

.admin-topbar-sub {
    font-size: 12px;
    color: var(--grey-400);
    margin-top: 1px;
}

.admin-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--grey-400);
}

.admin-topbar-right svg {
    color: var(--grey-400);
}


/* Legacy nav — hidden now (sidebar replaces it) */

.admin-nav {
    display: none;
}


/* ── Admin Pages ───────────────────────────────────────────────────────────── */

.admin-main {
    padding: 28px;
    flex: 1;
}

.admin-main h1 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--grey-800);
}

.subtitle {
    color: var(--grey-600);
    font-size: 13px;
    margin-bottom: 24px;
}

.upload-card {
    background: var(--white);
    border: 1px solid var(--grey-200);
    border-radius: 10px;
    border-top: 3px solid var(--blue-dark);
    padding: 28px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .08);
    max-width: 680px;
}

.drop-zone {
    border: 2px dashed var(--grey-200);
    border-radius: 8px;
    padding: 36px 24px;
    text-align: center;
    color: var(--grey-600);
    transition: border-color .18s, background .18s;
    cursor: pointer;
    margin-bottom: 16px;
    background: var(--grey-50);
}

.drop-zone:hover {
    border-color: var(--blue);
    background: var(--blue-light);
}

.drop-zone.dragover {
    border-color: var(--blue);
    background: var(--blue-light);
    border-style: solid;
}

.drop-zone.has-file {
    border-color: var(--green);
    background: var(--green-light);
    border-style: solid;
}

.drop-zone svg {
    color: var(--blue);
    margin-bottom: 12px;
    opacity: .7;
}

.drop-zone.has-file svg {
    color: var(--green);
    opacity: 1;
}

.drop-zone p {
    font-size: 14px;
    margin-bottom: 4px;
}

.drop-zone .hint {
    font-size: 12px;
    color: var(--grey-400);
}

.drop-zone .file-selected-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--green);
    margin-top: 4px;
}

.drop-zone .file-selected-size {
    font-size: 12px;
    color: var(--grey-600);
}

.drop-zone input[type="file"] {
    display: none;
}

.file-label {
    color: var(--blue);
    cursor: pointer;
    font-weight: 600;
}

.file-label:hover {
    text-decoration: underline;
}

.file-info {
    background: var(--green-light);
    border: 1px solid #A7F3D0;
    border-radius: var(--radius);
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--green);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.result {
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: 14px;
    line-height: 1.7;
}

.result-success {
    background: var(--green-light);
    color: var(--green);
    border: 1px solid #A7F3D0;
}

.result-warning {
    background: var(--amber-light);
    color: var(--amber);
    border: 1px solid #FDE68A;
}

.result-error {
    background: var(--red-light);
    color: var(--red);
    border: 1px solid #FECACA;
}


/* ── Reset & Re-import Page ────────────────────────────────────────────────── */

.reset-stat-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.reset-stat-card {
    background: var(--white);
    border: 1px solid var(--grey-200);
    border-radius: 10px;
    padding: 14px 20px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 120px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .07);
}

.reset-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--blue-dark);
    line-height: 1;
}

.reset-stat-label {
    font-size: 11px;
    color: var(--grey-400);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.reset-last-import {
    font-size: 12px;
    color: var(--grey-600);
    margin-bottom: 16px;
}

.reset-warning {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #FEF3C7;
    border: 1px solid #FDE68A;
    border-left: 4px solid var(--amber);
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--amber);
    line-height: 1.5;
}

.reset-warning svg {
    flex-shrink: 0;
    margin-top: 1px;
}

.reset-warning strong {
    color: #92400E;
}

.reset-warning code {
    background: rgba(0, 0, 0, .08);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 12px;
}

.reset-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--grey-800);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.reset-pdf-count {
    font-size: 12px;
    font-weight: 400;
    color: var(--grey-400);
}

.reset-select-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 12px;
}

.btn-text-link {
    background: none;
    border: none;
    color: var(--blue);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}

.btn-text-link:hover {
    text-decoration: underline;
}

.reset-divider {
    color: var(--grey-400);
}

.reset-pdf-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
    max-height: 340px;
    overflow-y: auto;
    padding-right: 4px;
}

.reset-pdf-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid var(--grey-200);
    border-radius: 8px;
    cursor: pointer;
    transition: background .12s, border-color .12s;
}

.reset-pdf-item:hover {
    background: var(--blue-light);
    border-color: var(--blue);
}

.reset-pdf-item input[type="checkbox"] {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    accent-color: var(--blue);
}

.reset-pdf-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.reset-pdf-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--grey-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reset-pdf-meta {
    font-size: 11px;
    color: var(--grey-400);
}

.reset-pdf-badge {
    font-size: 10px;
    font-weight: 700;
    background: var(--green);
    color: var(--white);
    padding: 2px 8px;
    border-radius: 20px;
    flex-shrink: 0;
}

.reset-actions {
    display: flex;
    gap: 10px;
    padding-top: 4px;
}

.btn-danger {
    background: var(--red);
    color: var(--white);
    border: none;
    box-shadow: 0 3px 10px rgba(185, 28, 28, .25);
}

.btn-danger:hover {
    background: #991B1B;
    color: var(--white);
    box-shadow: 0 5px 16px rgba(185, 28, 28, .35);
    transform: translateY(-1px);
    text-decoration: none;
}


/* Confirm modal */

.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

.confirm-overlay.hidden {
    display: none;
}

.confirm-box {
    background: var(--white);
    border-radius: 12px;
    padding: 32px 28px;
    max-width: 440px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    text-align: center;
}

.confirm-icon {
    color: var(--amber);
    margin-bottom: 14px;
}

.confirm-box h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--grey-800);
}

.confirm-box p {
    font-size: 13px;
    color: var(--grey-600);
    line-height: 1.6;
    margin-bottom: 24px;
}

.confirm-btns {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.reset-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    color: var(--grey-600);
    font-size: 13px;
}


/* ── Login Page ────────────────────────────────────────────────────────────── */

.login-page {
    background: var(--blue-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-box {
    background: var(--white);
    border-radius: 10px;
    padding: 36px;
    width: 360px;
    box-shadow: var(--shadow-md);
}

.login-logo {
    text-align: center;
    margin-bottom: 28px;
}

.login-logo h2 {
    background: var(--orange);
    color: var(--blue-dark);
    display: inline-block;
    padding: 6px 18px;
    border-radius: 6px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.login-logo p {
    color: var(--grey-600);
    font-size: 13px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--grey-600);
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid var(--grey-200);
    border-radius: var(--radius);
    font-size: 14px;
    outline: none;
    transition: border-color .15s;
}

.form-group input:focus {
    border-color: var(--blue);
}


/* ── Footer ────────────────────────────────────────────────────────────────── */

.site-footer {
    text-align: center;
    padding: 24px;
    color: var(--grey-400);
    font-size: 12px;
    border-top: 1px solid var(--grey-200);
    margin-top: 48px;
    line-height: 2;
}


/* ── FIR Checklist Display ──────────────────────────────────────────────────── */

.cl-section {
    border: 1px solid var(--grey-200);
    border-radius: var(--radius);
    margin-bottom: 16px;
    overflow: hidden;
}

.cl-section-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    background: var(--grey-50);
    border-bottom: 1px solid var(--grey-200);
    padding: 10px 16px;
}

.cl-section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--blue-dark);
    margin: 0;
}

.cl-section-sub {
    font-size: 12px;
    color: var(--grey-400);
}


/* Year groups for active NOTAMs */

.cl-years {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cl-year-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.cl-year-label {
    flex: 0 0 44px;
    font-size: 11px;
    font-weight: 700;
    color: var(--grey-600);
    padding-top: 4px;
    text-align: right;
}


/* Chips row */

.cl-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}

.cl-chip {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
}

.cl-chip-notam {
    background: var(--blue-light);
    color: var(--blue-dark);
    text-decoration: none;
    transition: background .15s;
}

.cl-chip-notam:hover {
    background: #c5d8f5;
    text-decoration: none;
}

.cl-chip-airac {
    background: var(--amber-light);
    color: var(--amber);
}

.cl-chip-sup {
    background: var(--green-light);
    color: var(--green);
}

.cl-chip-aic {
    background: var(--purple-light);
    color: var(--purple);
}


/* AIP Amendments */

.cl-amdt-list {
    list-style: none;
    padding: 12px 16px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cl-amdt-list li {
    font-size: 13px;
    padding-left: 14px;
    position: relative;
    color: var(--grey-800);
}

.cl-amdt-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--blue-dark);
    font-weight: 700;
}


/* Supplement groups */

.cl-sup-group {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--grey-100);
}

.cl-sup-group:last-child {
    border-bottom: none;
}

.cl-sup-label {
    flex: 0 0 100px;
    font-size: 11px;
    font-weight: 700;
    color: var(--grey-600);
    text-transform: uppercase;
    letter-spacing: .04em;
    padding-top: 4px;
}

.cl-empty {
    color: var(--grey-400);
    font-size: 13px;
    padding: 12px 16px;
    margin: 0;
}


/* ── Responsive — Tablet (≤900px) ──────────────────────────────────────────── */

@media (max-width: 900px) {
    .search-main {
        padding: 0 16px 40px;
    }
    .fns-main {
        padding: 0 16px 40px;
    }
    .col-series {
        display: none;
    }
    /* hide Series col on tablet */
}


/* ── Responsive — Mobile (≤640px) ──────────────────────────────────────────── */

@media (max-width: 640px) {
    /* Header */
    .header-inner {
        padding: 10px 16px;
    }
    .brand-tcaa {
        font-size: 16px;
        padding: 4px 9px;
    }
    .brand-text strong {
        font-size: 13px;
    }
    .brand-text span {
        display: none;
    }
    /* hide subtitle on mobile — saves space */
    .header-admin-link {
        font-size: 11px;
        padding: 4px 8px;
    }
    /* Search form heading */
    .search-form-heading {
        gap: 6px;
    }
    .search-form-sub {
        display: none;
    }
    /* Multi-select — full width on mobile, panel doesn't overflow */
    .multi-sel {
        width: 100%;
    }
    .multi-sel-btn {
        width: 100%;
        min-width: 0;
    }
    .multi-sel-panel {
        width: 100%;
        min-width: 0;
        max-height: 220px;
    }
    /* Search form */
    .search-form {
        padding: 16px;
        border-radius: var(--radius);
    }
    .search-bar-row {
        flex-direction: column;
        gap: 8px;
    }
    .search-input-wrap {
        width: 100%;
    }
    .search-bar-row .btn {
        width: 100%;
        justify-content: center;
    }
    .filter-row {
        flex-direction: column;
        gap: 10px;
    }
    .filter-group {
        width: 100%;
    }
    .filter-group select,
    .filter-group input[type="date"] {
        width: 100%;
    }
    /* Results header */
    .results-header {
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
    }
    /* Pagination */
    .pagination {
        flex-wrap: wrap;
        gap: 6px;
        justify-content: center;
    }
    .page-info {
        width: 100%;
        text-align: center;
    }
    /* ── Table → Card view ── */
    .table-wrap {
        border: none;
        box-shadow: none;
        background: transparent;
    }
    .data-table {
        display: block;
    }
    .data-table thead {
        display: none;
    }
    .data-table tbody {
        display: block;
    }
    .data-table tbody tr {
        display: block;
        background: var(--white);
        border: 1px solid var(--grey-200);
        border-radius: var(--radius);
        margin-bottom: 10px;
        box-shadow: var(--shadow);
        overflow: hidden;
    }
    .data-table td {
        display: flex;
        align-items: baseline;
        gap: 10px;
        padding: 9px 14px;
        border-bottom: 1px solid var(--grey-100);
        font-size: 13px;
    }
    .data-table td:last-child {
        border-bottom: none;
    }
    .data-table td::before {
        content: attr(data-label);
        flex: 0 0 68px;
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .05em;
        color: var(--grey-400);
        padding-top: 2px;
    }
    /* Location cell: stack name + ICAO vertically */
    .td-location {
        flex-direction: column;
        gap: 0;
    }
    .td-location::before {
        align-self: flex-start;
        margin-bottom: 4px;
    }
    .td-location strong {
        font-size: 14px;
    }
    .td-icao {
        display: inline;
    }
    /* Condition: allow wrapping */
    .td-condition {
        white-space: normal;
    }
    /* FNS detail page */
    .fns-main {
        padding: 0 12px 32px;
        margin-top: 16px;
    }
    .fns-location-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 12px 16px;
    }
    .fns-location-name {
        font-size: 1rem;
    }
    .fns-meta-strip,
    .fns-dates-strip {
        flex-direction: column;
    }
    .fns-meta-cell,
    .fns-date-cell {
        border-right: none;
        border-bottom: 1px solid var(--grey-200);
        padding: 10px 16px;
    }
    .fns-meta-cell:last-child,
    .fns-date-cell:last-child {
        border-bottom: none;
    }
    .fns-body {
        padding: 14px;
    }
    /* Detail grid (old) */
    .detail-grid {
        grid-template-columns: 1fr;
    }
}


/* ── FNS-style NOTAM Detail ─────────────────────────────────────────────────── */

.fns-main {
    max-width: 1100px;
    margin: 28px auto;
    padding: 0 24px 40px;
}

.fns-error {
    background: var(--red-light);
    color: var(--red);
    padding: 16px 20px;
    border-radius: var(--radius);
    border: 1px solid #fca5a5;
}

.fns-location-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #0B5E90 0%, var(--blue-dark) 100%);
    color: #fff;
    padding: 18px 24px;
    border-radius: 10px 10px 0 0;
    gap: 16px;
}

.fns-location-bar-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.fns-location-name {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: .01em;
    color: #fff;
    margin: 0;
    text-transform: none;
}

.fns-location-icao {
    font-size: 12px;
    color: rgba(255, 255, 255, .60);
    font-family: 'Courier New', monospace;
    letter-spacing: .08em;
}

.fns-location-bar .btn-action-primary {
    background: var(--orange);
    border-color: var(--orange);
    color: #fff;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .25);
    flex-shrink: 0;
}

.fns-location-bar .btn-action-primary:hover {
    background: var(--orange-dark);
    border-color: var(--orange-dark);
    color: #fff;
    box-shadow: 0 5px 16px rgba(0, 0, 0, .30);
    text-decoration: none;
}

.fns-card {
    background: var(--white);
    border: 1px solid var(--grey-200);
    border-top: none;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .10);
    overflow: hidden;
}


/* Metadata strip */

.fns-meta-strip {
    display: flex;
    border-bottom: 1px solid var(--grey-200);
}

.fns-meta-cell {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 20px;
    border-right: 1px solid var(--grey-200);
    font-size: 13px;
}

.fns-meta-cell:last-child {
    border-right: none;
}

.fns-meta-label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--grey-400);
}

.fns-notam-num {
    font-size: 16px;
    font-weight: 700;
    color: var(--orange);
    font-family: 'Courier New', monospace;
}


/* Status cell — badge inline, not stretched */

.fns-meta-cell .badge {
    align-self: flex-start;
}


/* Dates strip */

.fns-dates-strip {
    display: flex;
    border-bottom: 1px solid var(--grey-200);
    background: #F7F9FC;
}

.fns-date-cell {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 12px 20px;
    border-right: 1px solid var(--grey-200);
    font-size: 13px;
}

.fns-date-cell:last-child {
    border-right: none;
}

.fns-date-label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--grey-400);
}

.fns-date-cell strong {
    font-size: 13px;
    font-weight: 700;
    color: var(--grey-800);
    font-family: 'Courier New', monospace;
}


/* PERM / EST alert banners */

.fns-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
}

.fns-banner-perm {
    background: var(--purple-light);
    color: var(--purple);
    border-bottom: 1px solid #DDD6FE;
}

.fns-banner-est {
    background: var(--amber-light);
    color: var(--amber);
    border-bottom: 1px solid #FDE68A;
}


/* Tab strip — only shown when multiple tabs exist */

.fns-tab-strip {
    display: flex;
    background: var(--grey-100);
    border-bottom: 1px solid var(--grey-200);
    padding: 0 16px;
}

.fns-tab-strip-hidden {
    display: none;
}

.fns-section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px 0;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--grey-400);
}

.fns-tab {
    padding: 9px 18px;
    border: none;
    border-bottom: 3px solid transparent;
    background: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--grey-600);
    margin-bottom: -1px;
    transition: color .15s, border-color .15s;
    font-family: inherit;
}

.fns-tab:hover {
    color: var(--blue-dark);
}

.fns-tab-active {
    color: var(--blue-dark);
    font-weight: 700;
    border-bottom-color: var(--orange);
    background: var(--white);
}


/* Message body */

.fns-body {
    padding: 20px;
    position: relative;
}

.fns-body .notam-message {
    background: var(--white);
    border: 1px solid var(--grey-200);
    border-radius: 8px;
    padding: 18px 20px;
    margin: 0;
    color: var(--grey-800);
    font-size: 13.5px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

.fns-copy-btn {
    position: absolute;
    top: 28px;
    right: 28px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    background: var(--white);
    border: 1.5px solid var(--grey-200);
    border-radius: 50px;
    color: var(--grey-600);
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
    font-family: inherit;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .07);
}

.fns-copy-btn:hover {
    border-color: var(--blue);
    color: var(--blue);
    background: var(--blue-light);
}

.fns-copy-btn.copied {
    border-color: var(--green);
    color: var(--green);
    background: var(--green-light);
}


/* ══════════════════════════════════════════════════════════════════════════════
   DISCLAIMER MODAL
   ══════════════════════════════════════════════════════════════════════════════ */

.disclaimer-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: linear-gradient(155deg, #061E35 0%, #0D4E78 60%, #0D6FA8 100%);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding: 48px 20px 60px;
    transition: opacity 0.4s ease;
}

.disclaimer-overlay.disclaimer-hiding {
    opacity: 0;
    pointer-events: none;
}

.disclaimer-inner {
    max-width: 560px;
    width: 100%;
    text-align: center;
}


/* Logo box — matches FAA's icon-in-frame style */

.disclaimer-logo-wrap {
    width: 110px;
    height: 110px;
    margin: 0 auto 28px;
    border: 2px solid rgba(255, 255, 255, .25);
    border-radius: 18px;
    background: rgba(255, 255, 255, .08);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    backdrop-filter: blur(4px);
}

.disclaimer-logo-img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    /* make SVG white on dark bg */
}

.disclaimer-title {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -.01em;
    margin-bottom: 6px;
    line-height: 1.2;
}

.disclaimer-sub {
    font-size: 12.5px;
    color: rgba(255, 255, 255, .60);
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 32px;
}

.disclaimer-body {
    color: rgba(255, 255, 255, .82);
    font-size: 14.5px;
    line-height: 1.78;
    text-align: center;
    margin-bottom: 36px;
}

.disclaimer-body p {
    margin-bottom: 18px;
}

.disclaimer-body p:last-child {
    margin-bottom: 0;
}

.disclaimer-body strong {
    color: #fff;
    font-weight: 700;
}


/* Accept button */

.disclaimer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 460px;
    padding: 15px 32px;
    border: none;
    border-radius: 50px;
    background: var(--orange);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    letter-spacing: .01em;
    box-shadow: 0 6px 24px rgba(242, 101, 34, .55);
    transition: background .18s, box-shadow .18s, transform .18s;
}

.disclaimer-btn:hover {
    background: var(--orange-dark);
    box-shadow: 0 8px 28px rgba(242, 101, 34, .65);
    transform: translateY(-2px);
}

.disclaimer-btn:active {
    transform: translateY(0);
}


/* Mobile adjustments */

@media (max-width: 640px) {
    .disclaimer-overlay {
        padding: 32px 16px 48px;
    }
    .disclaimer-title {
        font-size: 22px;
    }
    .disclaimer-body {
        font-size: 14px;
    }
    .disclaimer-logo-wrap {
        width: 90px;
        height: 90px;
    }
    .disclaimer-logo-img {
        width: 56px;
        height: 56px;
    }
}


/* ══════════════════════════════════════════════════════════════════════════════
   PRINT STYLES
   ══════════════════════════════════════════════════════════════════════════════ */

@media print {
    /* ── Page setup ── */
    @page {
        size: A4;
        margin: 15mm 12mm 15mm 12mm;
    }
    * {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    body {
        background: white;
        font-size: 10pt;
        color: #000;
    }
    /* ── Hide screen-only elements ── */
    .disclaimer-overlay,
    .site-header,
    .search-form,
    .pagination,
    .site-footer,
    .results-actions,
    .btn-pdc,
    .loading,
    #no-results {
        display: none !important;
    }
    /* ── Show print-only header ── */
    .print-header {
        display: block !important;
        margin-bottom: 10mm;
        padding-bottom: 4mm;
        border-bottom: 2pt solid #0D6FA8;
    }
    .print-header-top {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 3mm;
    }
    .print-brand {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .print-brand-badge {
        background: #F36F21;
        /* TCAA corporate orange */
        color: #0D6FA8;
        font-size: 14pt;
        font-weight: 900;
        padding: 3px 9px;
        border-radius: 3px;
        letter-spacing: 1px;
    }
    .print-brand strong {
        display: block;
        font-size: 11pt;
        font-weight: 700;
        color: #0D6FA8;
    }
    .print-brand span {
        display: block;
        font-size: 8pt;
        color: #555;
    }
    .print-meta-right {
        text-align: right;
        font-size: 8pt;
        color: #555;
        line-height: 1.7;
    }
    .print-meta-right span {
        display: block;
    }
    .print-filters-row {
        font-size: 8.5pt;
        color: #333;
        background: #f5f7fa;
        padding: 3mm 4mm;
        border-radius: 2px;
        border-left: 3pt solid #1285C4;
    }
    .print-filters-row strong {
        color: #0D6FA8;
        margin-right: 6px;
    }
    /* Results count row */
    .results-header {
        display: flex !important;
        margin-bottom: 4mm;
        font-size: 9pt;
        color: #333;
    }
    #results-count {
        font-weight: 700;
    }
    /* ── Table ── */
    .search-main {
        max-width: none;
        padding: 0;
    }
    .table-wrap {
        overflow: visible;
    }
    .data-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 8.5pt;
        /* Override mobile card view */
        display: table !important;
    }
    .data-table thead {
        display: table-header-group !important;
    }
    .data-table tbody {
        display: table-row-group !important;
    }
    .data-table thead tr {
        background: #E8F0FC !important;
        border-bottom: 1.5pt solid #0D6FA8;
    }
    .data-table th {
        padding: 4px 8px;
        font-size: 7.5pt;
        font-weight: 700;
        color: #0D6FA8;
        text-transform: uppercase;
        letter-spacing: .04em;
    }
    .data-table tbody tr {
        /* Override mobile card overrides */
        display: table-row !important;
        background: white !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        page-break-inside: avoid;
    }
    .data-table tbody tr:nth-child(even) {
        background: #f8fafc !important;
    }
    .data-table td {
        /* Override mobile card overrides */
        display: table-cell !important;
        padding: 5px 8px;
        border-bottom: 0.5pt solid #ddd;
        vertical-align: top;
        font-size: 8.5pt;
    }
    .data-table td::before {
        display: none !important;
    }
    /* hide mobile data-label */
    .data-table tbody tr:hover {
        background: inherit !important;
    }
    /* ── Show full message, hide short ── */
    .msg-short {
        display: none !important;
    }
    .msg-full {
        display: block !important;
        white-space: pre-wrap;
        font-family: 'Courier New', monospace;
        font-size: 7.5pt;
        line-height: 1.45;
        color: #222;
    }
    /* ── Badges in print ── */
    .badge {
        border: 0.5pt solid currentColor;
        padding: 1px 4px;
        border-radius: 2px;
        font-size: 7pt;
    }
    .icao-pill,
    .fir-pill,
    .series-pill {
        border: 0.5pt solid #aaa;
        padding: 1px 4px;
        border-radius: 2px;
        font-size: 7pt;
    }
    .td-icao {
        font-size: 7pt;
        color: #555;
    }
    /* Wider condition column for full messages */
    .col-condition {
        width: auto;
    }
    .col-date {
        width: 90px;
    }
    .col-series {
        width: 50px;
    }
    .col-status {
        width: 60px;
    }
    .col-number {
        width: 90px;
    }
    .col-location {
        width: 14%;
    }
}


/* ── Password strength checklist ─────────────────────────────────────────────*/

#pw-checklist {
    list-style: none;
    /* remove browser default bullets */
    margin: 10px 0 0;
    padding: 0;
}

.pw-rule {
    font-size: 13px;
    padding: 3px 0 3px 22px;
    position: relative;
    color: #64748B;
    /* slightly darker neutral — more readable */
    transition: color 0.2s;
}

.pw-rule::before {
    content: '●';
    position: absolute;
    left: 4px;
    font-size: 9px;
    top: 5px;
    color: #CBD5E1;
    transition: color 0.2s;
}

.pw-rule.pw-rule-pass {
    color: #16A34A;
}

.pw-rule.pw-rule-pass::before {
    content: '✓';
    color: #16A34A;
    font-size: 12px;
    font-weight: 700;
    top: 3px;
}

.pw-rule.pw-rule-fail {
    color: #DC2626;
}

.pw-rule.pw-rule-fail::before {
    content: '✗';
    color: #DC2626;
    font-size: 12px;
    font-weight: 700;
    top: 3px;
}


/* ── Password expiry warning banner ─────────────────────────────────────────*/

.pw-expiry-warning {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #FFFBEB;
    border: 1px solid #FCD34D;
    border-left: 4px solid #F59E0B;
    color: #78350F;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 13.5px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.pw-expiry-warning svg {
    margin-top: 2px;
    flex-shrink: 0;
    color: #F59E0B;
}

.pw-expiry-warning a {
    color: #92400E;
    font-weight: 700;
    text-decoration: underline;
}

.pw-expiry-expired {
    background: #FEF2F2;
    border-color: #FCA5A5;
    border-left-color: #EF4444;
    color: #7F1D1D;
}

.pw-expiry-expired svg {
    color: #EF4444;
}

.pw-expiry-expired a {
    color: #991B1B;
}


/* ── Upload card subtle shadow ───────────────────────────────────────────────*/

.upload-card {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
}