/* stats_full.php: tabbed full analytics dashboard */
@import url('/assets/css/pages/stats.css');

.stats-full-page .header-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.sf-refreshed {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

.sf-sticky-filters {
    position: sticky;
    top: 0;
    z-index: 40;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 16px;
}

/* Section tabs: account-tabs pattern from site-theme */
.sf-section-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
    padding-bottom: 4px;
    border-bottom: 2px solid var(--border);
}

.sf-section-tab {
    flex-shrink: 0;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font);
    color: var(--text-muted);
    background: none;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    margin-bottom: -2px;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s, background 0.15s;
}

.sf-section-tab:hover {
    color: var(--link);
    background: var(--panel-head);
}

.sf-section-tab.active {
    color: var(--link);
    background: var(--white);
    border-color: var(--border);
    border-bottom-color: var(--white);
}

.sf-tab-panel { display: none; }
.sf-tab-panel.active { display: block; }

.kpi-grid-full {
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: 20px;
}

.kpi-grid-airports {
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 20px;
}

@media (max-width: 900px) {
    .kpi-grid-full { grid-template-columns: repeat(2, 1fr); }
    .kpi-grid-airports { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 500px) {
    .kpi-grid-full,
    .kpi-grid-airports { grid-template-columns: 1fr 1fr; }
}

.sf-maps-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (min-width: 800px) {
    .sf-maps-row { grid-template-columns: 1.2fr 1fr; }
    .sf-trend-row { grid-template-columns: 1.5fr 1fr; }
}

.sf-maps-row .panel { margin-bottom: 0; }
.sf-map-main .map-wrapper,
.sf-map-side .map-wrapper { height: 380px; }

#airport-activity-map { width: 100%; height: 100%; }

.sf-trend-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.sf-trend-row .panel { margin-bottom: 0; }

.chart-tall { height: 260px; }
.chart-medium { height: 220px; }

.sf-chart-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.sf-chart-grid-2 { grid-template-columns: 1fr 1fr; }
.sf-chart-grid .panel { margin-bottom: 0; }

@media (max-width: 700px) {
    .sf-chart-grid,
    .sf-chart-grid-2 { grid-template-columns: 1fr; }
}

.dow-hour-heatmap {
    display: grid;
    grid-template-columns: 36px repeat(24, 1fr);
    gap: 2px;
    overflow-x: auto;
}

.dow-hour-heatmap .dow-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 6px;
}

.dow-hour-heatmap .hour-label {
    font-size: 8px;
    font-weight: 700;
    color: var(--text-muted);
    text-align: center;
}

.dow-hour-heatmap .hm-cell {
    aspect-ratio: 1;
    min-width: 12px;
    border-radius: 2px;
    background: #e8eef7;
}

.sf-leaderboards-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.sf-leaderboards-2 .panel { margin-bottom: 0; }

@media (max-width: 700px) {
    .sf-leaderboards-2 { grid-template-columns: 1fr; }
}

.sf-rank-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
}

.sf-rank-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
}

.sf-rank-list li:last-child { border-bottom: none; }

.sf-rank-list .rank-num {
    width: 22px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-align: right;
}

.sf-rank-list .rank-label {
    flex: 1;
    font-weight: 600;
    color: var(--heading);
    font-family: monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sf-rank-list .rank-count {
    font-weight: 700;
    color: var(--link);
    font-family: monospace;
}

#airport-breakdown-table .th-right,
#airport-breakdown-table td.num { text-align: right; font-family: monospace; font-weight: 600; }

#airport-breakdown-table td.ident { font-family: monospace; font-weight: 700; color: var(--link); cursor: pointer; }
#airport-breakdown-table td.ident:hover { text-decoration: underline; }

.map-legend-scale {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.map-scale-bar {
    display: flex;
    height: 10px;
    width: 120px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.map-scale-bar span { flex: 1; }

.sf-memory-row {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

.sf-memory-row .panel { margin-bottom: 0; }

.sf-timeline-heading {
    flex-wrap: wrap;
    gap: 8px;
}

.sf-timeline-toolbar {
    padding: 0 16px 12px;
    border-bottom: 1px solid var(--border);
    background: var(--surface, #fff);
}

.sf-timeline-search-wrap {
    display: block;
    max-width: 420px;
}

.sf-timeline-search {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    font-size: 14px;
    font-family: var(--font);
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface, #fff);
    color: var(--text);
}

.sf-timeline-search:focus {
    outline: none;
    border-color: var(--link, #2563eb);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--link, #2563eb) 22%, transparent);
}

.sf2-sighting-lightbox {
    z-index: 1315;
}

.sf2-sighting-dialog .sf2-sighting-details-table {
    margin-top: 4px;
}

.sf-timeline-panel .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.sf-timeline-table td.mono { font-family: monospace; font-size: 11px; white-space: nowrap; }

.sf-table-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 0 4px;
}

.sf-table-pagination .page-info {
    font-size: 11px;
    color: var(--text-muted);
}

.sf-table-pagination .page-btn {
    min-width: 32px;
    height: 28px;
    border: 1px solid var(--border-dark);
    background: var(--btn-default);
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.sf-table-pagination .page-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.minute-heatmap,
.hour-strip-heatmap {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(18px, 1fr));
    gap: 2px;
    margin-top: 4px;
}

.hm-strip-cell {
    min-height: 28px;
    font-size: 9px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 2px;
    border-radius: 2px;
}

@media (max-width: 768px) {
    .sf-memory-row { gap: 16px; }
}

.otd-results,
.sf-recent-feed { max-height: 400px; overflow-y: auto; }

.otd-item,
.sf-recent-item {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
}

.sf-recent-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
}

.sf-recent-main { font-weight: 600; font-family: monospace; color: var(--heading); }
.sf-recent-meta { font-size: 11px; color: var(--text-muted); grid-column: 1 / -1; }
.sf-recent-time { font-size: 10px; color: var(--text-muted); font-family: monospace; }

.sf-footer-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 8px;
    font-size: 11px;
    color: var(--text-muted);
}

html[data-theme="dark"] .sf-section-tab.active {
    background: var(--white);
    border-bottom-color: var(--white);
}

.sf-preview-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    vertical-align: middle;
    color: var(--text-muted);
    background: var(--surface-alt, rgba(0, 0, 0, 0.04));
    border: 1px solid var(--border);
    border-radius: 999px;
}

.sf-operators-ranked {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* legacy op-row removed — use sf2-op-card */

.sf-op-rank {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 1.25rem;
    text-align: center;
}

.sf-op-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 6px;
    background: var(--surface-alt, rgba(0, 0, 0, 0.04));
    border: 1px solid var(--border);
    overflow: hidden;
}

.sf-op-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.sf-op-thumb-empty {
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 4px,
        var(--border) 4px,
        var(--border) 5px
    );
    opacity: 0.35;
}

.sf-op-main {
    min-width: 0;
    position: relative;
    z-index: 1;
}

.sf-op-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--heading);
    text-decoration: none;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sf-op-name:hover {
    text-decoration: underline;
}

.sf-op-bar-track {
    height: 6px;
    border-radius: 999px;
    background: var(--border);
    overflow: hidden;
}

.sf-op-bar-fill {
    height: 100%;
    border-radius: inherit;
    background: var(--sf-op-accent, var(--accent, #2a6db5));
    min-width: 2px;
}

.sf-op-count {
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--heading);
    position: relative;
    z-index: 1;
}

.sf-rank-list-media .sf-rank-media-row,
.sf-rank-list .sf-rank-media-row {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    align-items: center;
    gap: 8px 10px;
}

.sf-rank-list-media .sf-op-thumb {
    width: 32px;
    height: 32px;
}

.sf-timeline-op {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 14rem;
}

.sf-timeline-op-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 4px;
    background: var(--surface-alt, rgba(0, 0, 0, 0.04));
}

.sf-timeline-table td:nth-child(6) {
    max-width: 14rem;
}

/* ── Hero (operator page op-hero pattern) ───────────────────────────────── */
.stats-full2-page .sf2-hero {
    margin-bottom: 22px;
}

.sf2-hero-title-link {
    color: inherit;
    text-decoration: none;
}

.sf2-hero-title-link:hover {
    color: var(--op-accent, var(--link));
}

.stats-full2-page .sf2-hero-kicker {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--op-accent, var(--accent, #2a6db5));
    margin: 0 0 8px;
}

.stats-full2-page .sf2-hero-stat {
    margin: 10px 0 0;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
}

.sf2-hero-skeleton-wrap {
    padding: 22px 24px;
}

.sf2-hero-skeleton,
.sf2-hero-empty {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

.sf2-hero-banner {
    position: relative;
    min-height: 200px;
    display: flex;
    align-items: flex-end;
    --sf2-hero-accent: var(--accent, #2a6db5);
}

.sf2-hero-banner-bg {
    position: absolute;
    inset: 0;
    background-color: var(--panel-head);
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
}

.sf2-hero-banner-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        95deg,
        var(--surface, #fff) 0%,
        rgba(255, 255, 255, 0.92) 38%,
        rgba(255, 255, 255, 0.55) 62%,
        rgba(255, 255, 255, 0.15) 100%
    );
}

html[data-theme="dark"] .sf2-hero-banner-bg::after {
    background: linear-gradient(
        95deg,
        rgba(18, 24, 34, 0.98) 0%,
        rgba(18, 24, 34, 0.88) 40%,
        rgba(18, 24, 34, 0.45) 70%,
        rgba(18, 24, 34, 0.1) 100%
    );
}

.sf2-hero-banner-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 22px 22px 20px;
}

.sf2-hero-skeleton,
.sf2-hero-empty {
    font-size: 13px;
    color: var(--text-muted);
    padding: 8px 0;
}

.sf2-hero-link {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    text-decoration: none;
    color: inherit;
    max-width: 100%;
}

.sf2-hero-logo {
    width: 88px;
    height: 88px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    border: 2px solid var(--sf2-hero-accent);
    padding: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

html[data-theme="dark"] .sf2-hero-logo {
    background: rgba(0, 0, 0, 0.45);
}

.sf2-hero-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.sf2-hero-text {
    min-width: 0;
}

.sf2-hero-kicker {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--sf2-hero-accent);
    margin-bottom: 6px;
}

.sf2-hero-title {
    display: block;
    font-size: clamp(22px, 4vw, 30px);
    font-weight: 800;
    color: var(--heading);
    line-height: 1.15;
    margin-bottom: 6px;
}

.sf2-hero-stat {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
}

.sf2-hero-liveries-wrap {
    padding: 12px 14px 14px;
    border-top: 1px solid var(--border);
    background: var(--panel-head);
}

.sf2-hero-liveries-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.sf2-hero-liveries {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
    gap: 8px;
}

.sf2-hero-livery {
    position: relative;
    display: block;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface, #fff);
    min-height: 64px;
    padding: 6px 4px 22px;
}

.sf2-hero-livery img {
    width: 100%;
    height: 52px;
    object-fit: contain;
    object-position: center bottom;
    display: block;
}

.sf2-hero-livery-meta {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2px 4px;
    font-size: 8px;
    font-weight: 700;
    font-family: monospace;
    text-align: center;
    color: var(--text-muted);
    background: var(--panel-head);
    border-top: 1px solid var(--border);
}

.sf2-hero-livery-fallback {
    font-size: 12px;
    color: var(--text-muted);
}

.sf-aircraft-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 18px;
}

@media (min-width: 900px) {
    .sf-aircraft-grid {
        grid-template-columns: 1.2fr 1fr;
    }
    .sf-aircraft-span-wide {
        grid-column: 1 / -1;
    }
}

.sf-type-tiles {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sf-type-tile {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 10px;
    align-items: center;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--panel-head);
}

.sf-type-art {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: var(--surface, #fff);
    border: 1px solid var(--border);
    overflow: hidden;
}

.sf-type-art img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.sf-type-fallback {
    font-size: 10px;
    font-weight: 700;
    font-family: monospace;
    color: var(--text-muted);
}

.sf-type-meta {
    min-width: 0;
}

.sf-type-code {
    font-size: 12px;
    font-weight: 700;
    font-family: monospace;
    color: var(--link);
    text-decoration: none;
}

.sf-type-bar {
    height: 4px;
    border-radius: 999px;
    background: var(--border);
    margin: 6px 0 4px;
    overflow: hidden;
}

.sf-type-bar span {
    display: block;
    height: 100%;
    background: var(--accent, #2a6db5);
    border-radius: inherit;
}

.sf-type-count {
    font-size: 11px;
    color: var(--text-muted);
}

.sf-aircraft-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sf-ac-card {
    display: grid;
    grid-template-columns: auto 64px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    background: var(--surface, #fff);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.sf-ac-card:hover {
    border-color: var(--link);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.sf-ac-card-rank {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    width: 1.25rem;
    text-align: center;
}

.sf-ac-art {
    width: 64px;
    height: 44px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    background: var(--panel-head);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sf-ac-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sf-ac-art.sf-ac-art-empty {
    background: repeating-linear-gradient(-45deg, transparent, transparent 4px, var(--border) 4px, var(--border) 5px);
    opacity: 0.4;
}

.sf-ac-art.ac-thumb .placeholder {
    font-size: 0;
}

.sf-ac-card-reg {
    display: block;
    font-size: 14px;
    font-weight: 700;
    font-family: monospace;
    color: var(--heading);
}

.sf-ac-card-op,
.sf-ac-card-type {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.35;
}

.sf-ac-card-count {
    font-size: 14px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.sf-th-visual,
.sf-td-visual {
    width: 52px;
    padding-right: 4px !important;
}

.sf-td-visual .sf-ac-art {
    width: 48px;
    height: 36px;
}

.legend-swatch-img {
    background: var(--surface, #fff) !important;
    padding: 1px;
    overflow: hidden;
}

.legend-swatch-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Overview glance */
.sf2-overview-glance {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 18px;
}

@media (min-width: 900px) {
    .sf2-overview-glance {
        grid-template-columns: 1.1fr 1fr;
    }
}

.sf2-op-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sf2-op-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px 8px 8px;
    border-radius: 999px;
    border: 1px solid var(--border);
    border-left: 3px solid var(--chip-accent, var(--accent));
    background: var(--surface, #fff);
    text-decoration: none;
    color: inherit;
    max-width: 100%;
}

.sf2-op-chip-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sf2-op-chip-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.sf2-op-chip-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.sf2-op-chip-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.sf2-op-chip-count {
    font-size: 10px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.sf2-route-glance {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sf2-route-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12px;
}

.sf2-flag,
.sf2-flag-table {
    width: 18px;
    height: 12px;
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid var(--border);
    vertical-align: middle;
}

.sf-flag-cell {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sf2-ap {
    font-family: monospace;
    font-weight: 600;
    color: var(--link);
    text-decoration: none;
}

.sf2-route-arrow {
    color: var(--text-muted);
    font-size: 11px;
}

.sf2-route-count {
    margin-left: auto;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--heading);
}

/* Airports tab */
.sf2-airport-spotlights {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

@media (min-width: 720px) {
    .sf2-airport-spotlights {
        grid-template-columns: repeat(3, 1fr);
    }
}

.sf2-ap-spotlight {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface, #fff);
    text-decoration: none;
    color: inherit;
    width: 100%;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.sf2-ap-spotlight:hover,
.sf2-airport-card:hover,
.sf2-country-card:hover {
    border-color: color-mix(in srgb, var(--primary, #2563eb) 35%, var(--border));
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.sf2-ap-spot-kicker {
    grid-column: 1 / -1;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.sf2-ap-spot-flag img {
    width: 28px;
    height: 20px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid var(--border);
}

.sf2-airport-card-flag img {
    width: 32px;
    height: 22px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid var(--border);
}

.sf2-route-flag {
    width: 24px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.sf2-ap-ident-cell {
    white-space: nowrap;
}

.sf2-ap-ident-cell .sf2-ap-link {
    font-family: monospace;
    font-weight: 700;
    color: var(--link);
    text-decoration: none;
    margin-left: 6px;
}

.sf2-country-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sf2-country-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    background: var(--surface, #fff);
    width: 100%;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.sf2-country-card-flag img {
    width: 36px;
    height: 24px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid var(--border);
}

.sf2-country-card-name {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--heading);
}

.sf2-country-card-meta {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.sf2-share-bar {
    display: block;
    height: 4px;
    margin-top: 6px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.sf2-share-bar span {
    display: block;
    height: 100%;
    background: var(--accent, #2a6db5);
    border-radius: 2px;
}

.sf2-ac-sightings-cell {
    min-width: 7rem;
}

.sf2-ac-sightings-count {
    display: block;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.sf2-ac-sightings-cell .sf2-share-bar {
    margin-top: 4px;
    max-width: 120px;
    margin-left: auto;
}

.sf2-country-card-stat {
    font-size: 12px;
    color: var(--text-muted);
    text-align: right;
    white-space: nowrap;
}

.sf2-country-card-stat strong {
    display: block;
    font-size: 16px;
    color: var(--heading);
}


.sf2-ap-spot-ident {
    display: block;
    font-size: 16px;
    font-weight: 800;
    font-family: monospace;
    color: var(--heading);
}

.sf2-ap-spot-name {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 12rem;
}

.sf2-ap-spot-stat {
    font-size: 12px;
    font-weight: 700;
    color: var(--heading);
}

.sf2-top-airports-panel {
    margin-bottom: 16px;
}

.sf2-airport-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sf2-airport-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    background: var(--surface, #fff);
    width: 100%;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.sf2-airport-card-ident {
    font-size: 14px;
    font-weight: 800;
    font-family: monospace;
    color: var(--heading);
}

.sf2-airport-card-name {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
}

.sf2-airport-card-stats {
    text-align: right;
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.4;
}

.sf2-airport-card-stats strong {
    display: block;
    font-size: 14px;
    color: var(--heading);
}

/* Patterns tab */
.sf2-patterns-insights {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

@media (min-width: 720px) {
    .sf2-patterns-insights {
        grid-template-columns: repeat(4, 1fr);
    }
}

.sf2-insight-card {
    padding: 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: linear-gradient(145deg, var(--panel-head) 0%, var(--surface, #fff) 100%);
}

.sf2-insight-label {
    display: block;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.sf2-insight-value {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: var(--heading);
    line-height: 1.1;
}

.sf2-insight-sub {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
}

.stats-full2-page .dow-hour-heatmap .hm-cell {
    border-radius: 3px;
}

/* Brand colours */
.sf2-brand-bar {
    display: block;
    height: 4px;
    width: 100%;
    border-radius: 4px 4px 0 0;
    margin: -1px -1px 8px;
}

.sf2-brand-bar-default {
    background: var(--border);
}

.sf2-brand-swatches {
    display: inline-flex;
    gap: 3px;
    vertical-align: middle;
    margin-left: 6px;
}

.sf2-brand-swatch {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    display: inline-block;
}

.sf2-hero-kicker {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

/* Type gallery (overview) */
.sf2-type-panel-body {
    padding: 16px 18px 18px;
    background: linear-gradient(180deg, var(--panel-head) 0%, var(--surface, #fff) 100%);
}

.sf2-type-gallery-pagination {
    margin-top: 14px;
    justify-content: center;
}

.sf2-type-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(188px, 1fr));
    gap: 16px;
}

.sf2-type-tile {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 12px 14px;
    min-height: 200px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface, #fff);
    cursor: pointer;
    text-align: center;
    color: inherit;
    font: inherit;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.sf2-type-tile:hover {
    border-color: var(--accent, #2a6db5);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.sf2-type-tile-art {
    flex: 1;
    min-height: 112px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 4px 2px;
}

.sf2-type-tile-art img {
    max-width: 100%;
    max-height: 108px;
    width: auto;
    object-fit: contain;
}

.sf2-type-fallback {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    word-break: break-word;
}

.sf2-type-tile-code {
    font-family: monospace;
    font-size: 13px;
    font-weight: 700;
    color: var(--heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sf2-type-tile-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.sf2-type-tile-sub {
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sf2-ac-tile {
    text-decoration: none;
    color: inherit;
}

.sf2-ac-tile-photo .sf-ac-art {
    max-height: 108px;
}

.sf2-aircraft-tile-gallery .sf2-type-tile {
    min-height: 220px;
}

/* Full-card airline brand tint (no top bar) */
.sf2-brand-themed.sf2-op-card,
.sf2-brand-themed.sf2-type-modal-card,
.sf2-brand-themed.sf2-operator-dialog {
    background: linear-gradient(
        145deg,
        color-mix(in srgb, var(--sf-brand-1, var(--accent, #2a6db5)) 20%, var(--surface, #fff)) 0%,
        color-mix(in srgb, var(--sf-brand-2, var(--sf-brand-1, var(--accent, #2a6db5))) 11%, var(--surface, #fff)) 46%,
        var(--surface, #fff) 100%
    );
    border-color: color-mix(in srgb, var(--sf-brand-1, var(--border)) 40%, var(--border));
}

.sf2-brand-themed .sf2-brand-bar {
    display: none !important;
}

.sf2-type-op-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 4px;
}

.sf2-type-op-bar {
    display: block;
    height: 4px;
    border-radius: 999px;
    background: var(--border);
    margin-top: 6px;
    overflow: hidden;
}

.sf2-type-op-bar span {
    display: block;
    height: 100%;
    background: var(--sf-brand-accent, var(--accent, #2a6db5));
}

.sf2-type-op-no-livery {
    color: var(--text-muted);
    font-size: 12px;
}

/* Full-screen type / livery modal */
body.sf2-modal-open {
    overflow: hidden;
}

.sf2-type-modal[hidden] {
    display: none !important;
}

.sf2-type-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 12px;
}

.sf2-type-modal-scrim {
    position: absolute;
    inset: 0;
    background: rgba(10, 20, 40, 0.55);
}

.sf2-type-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(1200px, 100%);
    max-height: calc(100vh - 24px);
    margin: auto;
    display: flex;
    flex-direction: column;
    background: var(--surface, #fff);
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.sf2-type-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--panel-head);
}

.sf2-type-modal-head-main {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.sf2-type-modal-white {
    flex: 0 0 160px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0;
}

.sf2-type-modal-white img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.sf2-type-modal-title {
    margin: 0;
    font-size: 18px;
    font-family: monospace;
    color: var(--heading);
}

.sf2-type-modal-sub {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--text-muted);
}

.sf2-type-modal-close {
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0 4px;
}

.sf2-type-modal-grid {
    flex: 1;
    overflow: auto;
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    align-content: start;
}

.sf2-type-modal-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    background: var(--surface, #fff);
    width: 100%;
    text-align: left;
    font: inherit;
    cursor: pointer;
    padding: 0;
}

.sf2-type-tile--static {
    cursor: default;
}

.sf2-type-tile--static:hover {
    transform: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    border-color: var(--border);
}

.sf2-preview-lightbox[hidden] {
    display: none !important;
}

.sf2-preview-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.sf2-preview-scrim {
    position: absolute;
    inset: 0;
    background: rgba(8, 16, 32, 0.72);
}

.sf2-preview-dialog {
    position: relative;
    z-index: 1;
    width: min(920px, 100%);
    max-height: calc(100vh - 32px);
    overflow: auto;
    background: var(--surface, #fff);
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
    padding: 16px 16px 20px;
}

.sf2-preview-close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted);
    z-index: 2;
}

.sf2-preview-main-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-height: 200px;
    justify-content: center;
    padding: 8px 24px 0;
}

.sf2-preview-main {
    max-width: 100%;
    max-height: min(62vh, 520px);
    object-fit: contain;
}

.sf2-preview-credit {
    margin: 0;
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
}

.sf2-preview-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.sf2-preview-thumb {
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 2px;
    background: transparent;
    cursor: pointer;
}

.sf2-preview-thumb.is-active {
    border-color: var(--accent, #2a6db5);
}

.sf2-preview-thumb img {
    width: 72px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.sf2-preview-title {
    margin: 0 0 4px;
    font-size: 18px;
    font-family: monospace;
}

.sf2-preview-sub {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

.sf2-preview-meta {
    margin-top: 12px;
}

.sf2-preview-actions {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

body.sf2-preview-open,
body.sf2-sighting-open {
    overflow: hidden;
}

/* Full-page load overlay (large date ranges) */
.sf2-page-loading[hidden] {
    display: none !important;
}

.sf2-page-loading {
    position: fixed;
    inset: 0;
    z-index: 1250;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(8, 16, 32, 0.55);
    backdrop-filter: blur(2px);
}

.sf2-page-loading-panel {
    width: min(420px, 100%);
    padding: 28px 24px 26px;
    text-align: center;
    background: var(--surface, #fff);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.sf2-page-loading-spinner {
    display: inline-block;
    width: 28px;
    height: 28px;
    margin-bottom: 14px;
}

.sf2-page-loading-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    color: var(--heading);
}

.sf2-page-loading-msg {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-muted);
}

.sf2-page-loading-hint {
    margin: 12px 0 0;
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.85;
}

body.sf2-page-loading-open {
    overflow: hidden;
}

body.sf2-page-loading-open .sf2-page-loading {
    pointer-events: auto;
}

/* Sighting log detail modal */
.sf2-sighting-lightbox[hidden] {
    display: none !important;
}

.sf2-sighting-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1310;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-sizing: border-box;
}

.sf2-sighting-scrim {
    position: absolute;
    inset: 0;
    background: rgba(8, 16, 32, 0.78);
}

.sf2-sighting-dialog {
    position: relative;
    z-index: 1;
    width: min(1280px, calc(100vw - 24px));
    height: min(960px, calc(100vh - 24px));
    max-height: calc(100vh - 24px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--surface, #fff);
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}

.sf2-sighting-close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: 0;
    background: rgba(255, 255, 255, 0.92);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted);
    z-index: 5;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

html[data-theme="dark"] .sf2-sighting-close {
    background: rgba(30, 40, 55, 0.92);
}

.sf2-sighting-map-wrap {
    position: relative;
    flex: 1 1 auto;
    min-height: 400px;
    border-bottom: 1px solid var(--border);
}

#sf2-sighting-map {
    width: 100%;
    height: 100%;
}

.sf2-sighting-map-empty {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text-muted);
    background: var(--surface, #fff);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    pointer-events: none;
    z-index: 2;
}

.sf2-sighting-body {
    flex: 0 1 auto;
    overflow: auto;
    padding: 14px 18px 18px;
}

.sf2-sighting-head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.sf2-sighting-thumb .sf-ac-art {
    width: 88px;
    height: 60px;
}

.sf2-sighting-title {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 700;
    font-family: monospace;
    color: var(--heading);
}

.sf2-sighting-sub {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

.sf2-sighting-details-table {
    margin: 0;
    width: 100%;
}

.sf2-sighting-details-table tbody tr:last-child {
    border-bottom: none;
}

.sf2-sighting-details-table th {
    width: 34%;
    max-width: 11rem;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: var(--panel-head, var(--stripe));
    vertical-align: middle;
    white-space: nowrap;
}

.sf2-sighting-details-table td {
    font-size: 14px;
    font-weight: 600;
}

.sf2-sighting-details-table td a {
    color: var(--link, var(--accent, #2a6db5));
    text-decoration: none;
}

.sf2-sighting-details-table td a:hover {
    text-decoration: underline;
}

.sf2-sighting-route-dd {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.sf-timeline-table tbody tr.sf2-tl-row.row-clickable,
.sf-timeline-table tbody tr.sf2-tl-row.row-clickable td,
.sf-timeline-table tbody tr.sf2-tl-row.row-clickable .sf-ac-art,
.sf-timeline-table tbody tr.sf2-tl-row.row-clickable img {
    cursor: pointer;
}

.sf-timeline-table tbody tr.sf2-tl-row.row-clickable:hover td {
    background: color-mix(in srgb, var(--accent, #2a6db5) 8%, var(--stripe, transparent));
}

html[data-theme="dark"] .sf-timeline-table tbody tr.sf2-tl-row.row-clickable:hover td {
    background: color-mix(in srgb, var(--accent, #2a6db5) 14%, transparent);
}

.sf-timeline-table tbody tr.sf2-tl-row.row-clickable:focus-visible {
    outline: 2px solid var(--accent, #2a6db5);
    outline-offset: -2px;
}

.sf2-type-modal-card-livery {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    padding: 8px 10px;
}

.sf2-type-modal-card-livery img {
    max-height: 112px;
    max-width: 100%;
    object-fit: contain;
}

.sf2-type-modal-card-foot {
    padding: 10px 12px 12px;
    border-top: 1px solid var(--border);
}

.sf2-type-modal-card-op {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sf2-type-modal-card-count {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
    font-variant-numeric: tabular-nums;
}

/* Top routes (overview) */
.sf2-route-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sf2-route-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 10px 12px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface, #fff);
}

.sf2-route-leg {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
    font-size: 12px;
}

.sf2-route-leg-right {
    justify-content: flex-end;
    text-align: right;
}

.sf2-route-place-inline {
    flex: 1 1 100%;
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sf2-route-leg-right .sf2-route-place-inline {
    text-align: right;
}

.sf2-route-core {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 64px;
}

.sf2-route-bar {
    width: 56px;
    height: 4px;
    border-radius: 999px;
    background: var(--border);
    overflow: hidden;
}

.sf2-route-bar span {
    display: block;
    height: 100%;
    background: var(--accent, #2a6db5);
}

@media (max-width: 720px) {
    .sf2-route-row {
        grid-template-columns: 1fr;
        text-align: left;
    }
    .sf2-route-leg-right {
        justify-content: flex-start;
        text-align: left;
    }
    .sf2-route-leg-right .sf2-route-place-inline {
        text-align: left;
    }
    .sf2-route-core {
        flex-direction: row;
        justify-content: flex-start;
        width: 100%;
    }
}

/* Operator grid (overview + aircraft) */
.sf2-operator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
}

.sf2-operator-grid-compact {
    grid-template-columns: 1fr;
    gap: 8px;
}

.sf2-op-card {
    position: relative;
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    gap: 8px 10px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface, #fff);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    width: 100%;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.sf2-op-card:hover,
.sf2-op-line:hover {
    border-color: color-mix(in srgb, var(--primary, #2563eb) 35%, var(--border));
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.sf2-op-card-compact {
    padding: 10px 12px;
}

.sf2-op-card-rank {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
}

.sf2-op-card-logo {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sf2-op-card-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.sf2-op-card-body {
    min-width: 0;
}

.sf2-op-card-name {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sf2-op-card-bar {
    display: block;
    height: 4px;
    border-radius: 999px;
    background: var(--border);
    margin-top: 6px;
    overflow: hidden;
}

.sf2-op-card-bar span {
    display: block;
    height: 100%;
    background: var(--sf-brand-accent, var(--accent, #2a6db5));
    border-radius: inherit;
}

.sf2-op-card-count {
    font-size: 14px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.sf2-operators-panel {
    margin-bottom: 16px;
}

/* Aircraft tab */
.sf2-aircraft-v2 {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sf2-air-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 768px) {
    .sf2-air-row {
        grid-template-columns: 1fr 1fr;
    }
}

.sf2-op-lines {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sf2-op-line {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface, #fff);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    width: 100%;
    font: inherit;
    text-align: left;
    cursor: pointer;
    padding: 0;
}

.sf2-op-line-main {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    gap: 10px 12px;
    align-items: center;
    padding: 12px 14px;
    min-height: 52px;
    width: 100%;
    box-sizing: border-box;
    background: transparent;
}

.sf2-brand-themed.sf2-op-line {
    background: linear-gradient(
        145deg,
        color-mix(in srgb, var(--sf-brand-1, var(--accent, #2a6db5)) 20%, var(--surface, #fff)) 0%,
        color-mix(in srgb, var(--sf-brand-2, var(--sf-brand-1, var(--accent, #2a6db5))) 11%, var(--surface, #fff)) 46%,
        var(--surface, #fff) 100%
    );
    border-color: color-mix(in srgb, var(--sf-brand-1, var(--border)) 40%, var(--border));
}

.sf2-op-line-foot {
    padding: 8px 14px 10px;
    background: var(--surface, #fff);
    border-top: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
}

.sf2-op-line-foot .sf2-share-bar {
    margin-top: 0;
}

.sf2-op-line-rank {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
}

.sf2-op-line-logo {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sf2-op-line-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.sf2-op-line-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.sf2-op-line-count {
    font-size: 15px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.chart-compact {
    height: 160px;
    margin-top: 12px;
}

.sf2-wake-chart {
    height: 200px;
    min-height: 200px;
    margin-top: 0;
}

.sf-aircraft-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
}

.sf-ac-card {
    position: relative;
    overflow: hidden;
}

.sf-ac-card .sf2-brand-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    margin: 0;
}

/* Patterns brand strip */
.sf2-patterns-brand-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.sf2-patterns-brand-cell {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px 6px 6px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface, #fff);
    font-size: 10px;
    font-weight: 600;
    color: var(--heading);
    position: relative;
    overflow: hidden;
}

.sf2-patterns-brand-cell .sf2-brand-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    margin: 0;
    height: 3px;
}

.sf2-patterns-brand-cell img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.sf2-insight-card {
    position: relative;
    overflow: hidden;
}

.sf2-insight-card .sf2-brand-bar {
    margin: -14px -14px 10px;
}

/* Timeline static logos */
.sf-timeline-op-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
    padding: 2px;
    border-radius: 4px;
    background: var(--panel-head);
    border: 1px solid var(--border);
}

.sf-timeline-table .sf-ac-art {
    width: 44px;
    height: 32px;
}

.sf-timeline-table .sf-ac-art img {
    object-fit: contain;
}

.sf-timeline-table .ac-photo-credit {
    display: none;
}

.sf2-tl-row td {
    vertical-align: middle;
    padding-top: 10px;
    padding-bottom: 10px;
}

.sf2-tl-route-icaos {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    white-space: nowrap;
}

.sf2-tl-arrow {
    color: var(--text-muted);
}

.sf2-tl-type {
    font-size: 11px;
    max-width: 120px;
    word-break: break-word;
}

/* Operator range detail modal */
.sf2-operator-lightbox[hidden] {
    display: none !important;
}

.sf2-operator-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1315;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-sizing: border-box;
}

.sf2-operator-scrim {
    position: absolute;
    inset: 0;
    background: rgba(8, 16, 32, 0.78);
}

.sf2-operator-dialog {
    position: relative;
    z-index: 1;
    width: min(920px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--surface, #fff);
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}

.sf2-operator-close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: 0;
    background: rgba(255, 255, 255, 0.92);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted);
    z-index: 5;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.sf2-operator-dialog .sf2-brand-bar {
    display: block;
    height: 4px;
    border-radius: 12px 12px 0 0;
    margin: 0;
}

.sf2-brand-themed.sf2-operator-dialog .sf2-operator-hero-inner.sf2-brand-themed {
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--sf-brand-1, var(--accent, #2a6db5)) 22%, var(--surface, #fff)) 0%,
        var(--surface, #fff) 72%
    );
}

.sf2-brand-themed.sf2-operator-dialog .sf2-share-bar span {
    background: var(--sf-brand-accent, var(--accent, #2a6db5));
}

.sf2-brand-themed.sf2-operator-dialog .sf2-operator-kpi {
    border-color: color-mix(in srgb, var(--sf-brand-1, var(--border)) 35%, var(--border));
    background: color-mix(in srgb, var(--sf-brand-1, var(--surface-alt, #f8fafc)) 8%, var(--surface-alt, #f8fafc));
}

.sf2-operator-hero-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--border);
}

.sf2-operator-hero-brand {
    display: flex;
    gap: 14px;
    align-items: center;
    min-width: 0;
}

.sf2-operator-hero-logo {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sf2-operator-hero-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.sf2-operator-hero-text {
    min-width: 0;
}

.sf2-operator-hero-kicker {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.sf2-operator-hero-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--heading);
    line-height: 1.2;
}

.sf2-operator-hero-stat {
    margin: 6px 0 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--heading);
}

.sf2-brand-themed.sf2-operator-dialog .sf2-operator-hero-stat {
    color: color-mix(in srgb, var(--sf-brand-1, var(--heading)) 55%, var(--heading));
}

.sf2-operator-code {
    display: inline-block;
    margin-top: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    font-family: monospace;
    background: var(--surface-alt, #f3f4f6);
    border: 1px solid var(--border);
}

.sf2-brand-themed.sf2-operator-dialog .sf2-operator-code {
    border-color: color-mix(in srgb, var(--sf-brand-1, var(--border)) 45%, var(--border));
    background: color-mix(in srgb, var(--sf-brand-1, var(--surface-alt, #f3f4f6)) 12%, var(--surface-alt, #f3f4f6));
}

.sf2-operator-banner {
    max-width: min(280px, 42vw);
}

.sf2-operator-banner img {
    max-width: 100%;
    max-height: 72px;
    object-fit: contain;
}

.sf2-operator-body {
    padding: 16px 20px;
    overflow: auto;
    flex: 1;
}

.sf2-operator-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

@media (max-width: 520px) {
    .sf2-operator-kpi-grid {
        grid-template-columns: 1fr;
    }
}

.sf2-operator-kpi {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-alt, #f8fafc);
}

.sf2-operator-kpi-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.sf2-operator-kpi-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--heading);
}

.sf2-operator-seen-range {
    margin: 0 0 16px;
    font-size: 12px;
    color: var(--text-muted);
}

.sf2-operator-seen-range span {
    font-weight: 600;
    color: var(--heading);
}

.sf2-operator-rank-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.sf2-operator-rank-title {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--heading);
}

.sf2-operator-rank-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sf2-operator-rank-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 72px auto;
    gap: 8px;
    align-items: center;
    font-size: 12px;
}

.sf2-operator-rank-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sf2-operator-route-label {
    white-space: normal;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.sf2-operator-rank-link {
    color: var(--primary, #2563eb);
    text-decoration: none;
    font-weight: 600;
}

.sf2-brand-themed.sf2-operator-dialog .sf2-operator-rank-link {
    color: color-mix(in srgb, var(--sf-brand-accent, var(--primary, #2563eb)) 88%, var(--heading));
}

.sf2-operator-rank-link.reg,
.sf2-operator-rank-label .reg {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 11px;
    letter-spacing: 0.02em;
}

.sf2-operator-type-label {
    font-size: 11px;
    font-weight: 600;
}

.sf2-operator-rank-count {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--heading);
}

.sf2-operator-actions {
    padding: 12px 20px 18px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

body.sf2-operator-open,
body.sf2-aircraft-range-open {
    overflow: hidden;
}

.sf2-ac-op-banner-cell {
    position: relative;
    padding: 0 !important;
    vertical-align: middle;
}

.sf2-ac-op-cell-inner {
    display: flex;
    align-items: stretch;
    min-height: 52px;
    position: relative;
    width: 100%;
}

.sf2-ac-op-name {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    flex: 1;
    min-width: 0;
    z-index: 1;
}

.sf2-ac-op-banner {
    flex: 0 0 min(42%, 160px);
    margin-left: auto;
    background-repeat: no-repeat;
    background-position: right center;
    background-size: contain;
    min-height: 100%;
    align-self: stretch;
}

.sf2-aircraft-range-hero-art {
    width: 88px;
    height: 56px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sf2-aircraft-range-hero-art img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.sf2-aircraft-range-hero-brand {
    align-items: center;
}

.sf2-operator-hero-sub {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--text-muted);
}

.sf2-aircraft-sightings-table {
    font-size: 12px;
}

tr.sf2-ac-row.row-clickable {
    cursor: pointer;
}

.sf2-aircraft-range-dialog {
    width: min(1020px, calc(100vw - 20px));
    height: min(940px, calc(100vh - 20px));
    max-height: calc(100vh - 20px);
}

.sf2-brand-themed.sf2-aircraft-range-dialog {
    border-color: color-mix(in srgb, var(--sf-brand-1, var(--border)) 38%, var(--border));
}

.sf2-aircraft-range-dialog .sf-ac-range-tabs {
    flex-shrink: 0;
    margin: 0;
    margin-bottom: 0;
    padding: 0 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}

.sf2-aircraft-range-dialog .sf-ac-range-tabs::-webkit-scrollbar {
    display: none;
}

.sf2-brand-themed.sf2-aircraft-range-dialog .sf2-operator-actions {
    border-top-color: color-mix(in srgb, var(--sf-brand-1, var(--border)) 22%, var(--border));
    background: color-mix(in srgb, var(--sf-brand-1, var(--surface, #fff)) 5%, var(--surface, #fff));
}

.sf2-ac-range-details-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sf2-ac-range-details-layout {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sf2-ac-range-details-grid {
    flex-shrink: 0;
}

.sf2-aircraft-range-panel[data-ac-range-panel="details"] .sf2-aircraft-sightings-block {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

.sf2-aircraft-range-panel[data-ac-range-panel="details"] .sf2-aircraft-sightings-scroll {
    flex: 1 1 auto;
    min-height: 120px;
    overflow: auto;
}

.sf2-ac-ap-touch {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 2px;
}

.sf2-ac-range-images-body {
    overflow: auto;
}

.sf2-ac-range-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.sf2-ac-range-image-card {
    margin: 0;
}

.sf2-ac-range-image-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.sf2-ac-range-image-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: hidden;
    padding: 0;
}

.sf2-ac-range-image-frame img {
    max-width: 100%;
    max-height: 320px;
    object-fit: contain;
}

.sf2-ac-range-image-credit {
    margin: 8px 0 0;
    font-size: 11px;
    color: var(--text-muted);
}

.sf2-aircraft-range-panels {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.sf2-aircraft-range-panel {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    display: flex;
    flex-direction: column;
}

.sf2-aircraft-range-panel[hidden] {
    display: none !important;
}

.sf2-aircraft-range-map-wrap {
    position: relative;
    flex: 1 1 auto;
    min-height: 400px;
    height: 100%;
    isolation: isolate;
    z-index: 0;
}

#sf2-aircraft-range-map {
    width: 100%;
    height: 100%;
    min-height: 280px;
}

.sf2-aircraft-range-scroll {
    flex: 1 1 auto;
    overflow: auto;
    min-height: 0;
}

.sf2-ac-range-map-legend {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    background: color-mix(in srgb, var(--surface, #fff) 92%, transparent);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    pointer-events: none;
}

.sf2-ac-op-banner-brand {
    opacity: 0.92;
}

.sf2-brand-themed.sf2-ac-row .sf2-share-bar span {
    background: var(--sf-brand-1, var(--accent, #2a6db5));
}

.sf2-ac-range-first-seen {
    margin: 0 0 16px;
    font-size: 14px;
    color: var(--text);
}

.sf2-ac-range-first-seen span {
    font-weight: 600;
    color: var(--text-muted);
}

.sf2-ac-range-details-grid {
    margin-bottom: 12px;
}

.sf2-brand-themed.sf2-aircraft-range-dialog .sf2-operator-body {
    background: color-mix(in srgb, var(--sf-brand-1, var(--accent, #2a6db5)) 4%, var(--surface, #fff));
}

body.sf2-place-open {
    overflow: hidden;
}

.sf2-place-hero-meta {
    margin: 6px 0 0;
    font-size: 13px;
    font-weight: 600;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    letter-spacing: 0.02em;
    color: var(--text-muted);
}

.sf2-place-ap-link {
    border: 0;
    background: none;
    padding: 0;
    font: inherit;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 700;
    color: var(--primary, #2563eb);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.sf2-place-ap-sub {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 400;
    font-family: inherit;
    margin-top: 2px;
}
