/* AIRF — Advanced Intelligent Restock Forecast — Admin Dashboard */

/* ── Tab Navigation ──────────────────────────────── */
.airf-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #c3c4c7;
    margin: 16px 0 24px;
}
.airf-tab {
    padding: 10px 20px;
    text-decoration: none;
    color: #50575e;
    font-weight: 500;
    font-size: 14px;
    border: 2px solid transparent;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    margin-bottom: -2px;
    transition: color .15s, background .15s;
}
.airf-tab:hover {
    color: #2271b1;
    background: #f0f0f1;
}
.airf-tab--active {
    color: #1d2327;
    background: #fff;
    border-color: #c3c4c7;
    font-weight: 600;
}

/* ── Card Grid ───────────────────────────────────── */
.airf-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.airf-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    padding: 20px 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: box-shadow .2s, transform .2s;
}
.airf-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}
.airf-card h3 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
    text-transform: uppercase;
    letter-spacing: .4px;
}
.airf-card p {
    margin: 6px 0;
    color: #50575e;
    font-size: 13px;
    line-height: 1.5;
}
.airf-card .airf-big-number {
    font-size: 32px;
    font-weight: 700;
    color: #1d2327;
    line-height: 1.1;
}
.airf-card .airf-sub {
    font-size: 13px;
    color: #787c82;
    margin-top: 2px;
}

/* ── Progress Bar (Credits) ──────────────────────── */
.airf-progress {
    width: 100%;
    height: 8px;
    background: #dcdcde;
    border-radius: 4px;
    margin: 10px 0 6px;
    overflow: hidden;
}
.airf-progress__fill {
    height: 100%;
    border-radius: 4px;
    transition: width .4s ease;
}
.airf-progress__fill--ok { background: #00a32a; }
.airf-progress__fill--warn { background: #dba617; }
.airf-progress__fill--danger { background: #d63638; }

/* ── Urgency Badges ──────────────────────────────── */
.airf-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.6;
    text-transform: capitalize;
}
.airf-badge--critical { background: #fcecec; color: #8a1e1e; }
.airf-badge--soon     { background: #fef3e0; color: #8a5500; }
.airf-badge--monitor  { background: #e8f0fe; color: #1a56db; }
.airf-badge--ok       { background: #ecfce5; color: #14532d; }
.airf-badge--abc-a    { background: #ffe8cc; color: #8a3c00; }
.airf-badge--abc-b    { background: #e8f0fe; color: #1a56db; }
.airf-badge--abc-c    { background: #ecfce5; color: #14532d; }


/* Plan badge */
.airf-badge--free     { background: #f0f0f1; color: #50575e; }
.airf-badge--starter  { background: #e8f0fe; color: #1a56db; }
.airf-badge--growth   { background: #ecfce5; color: #14532d; }

/* ── Trend Arrows ────────────────────────────────── */
.airf-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
}
.airf-trend--accelerating { color: #d63638; }
.airf-trend--stable       { color: #50575e; }
.airf-trend--declining    { color: #00a32a; }
.airf-trend--seasonal_peak_approaching { color: #dba617; }

/* ── Recommendations Table ───────────────────────── */
.airf-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.airf-table + .airf-pagination {
    margin-top: 0;
}
/* Tables without pagination keep bottom margin */
.airf-table:not([data-airf-paginate]) {
    margin-bottom: 24px;
}
.airf-table th {
    text-align: left;
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #50575e;
    text-transform: uppercase;
    letter-spacing: .3px;
    background: #f6f7f7;
    border-bottom: 1px solid #dcdcde;
}
.airf-table td {
    padding: 10px 14px;
    font-size: 13px;
    color: #1d2327;
    border-bottom: 1px solid #f0f0f1;
    vertical-align: middle;
}
.airf-table tbody tr:last-child td { border-bottom: none; }
.airf-table tbody tr:hover td { background: #f6f7f7; }

.airf-table-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 12px;
}

.airf-table-tools__controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.airf-table-tools__label {
    display: inline-flex;
    align-items: center;
}

.airf-table-tools__search,
.airf-table-tools__select {
    min-width: 180px;
}

.airf-table-tools__results {
    color: #50575e;
    font-size: 12px;
}

/* ── ABC Summary Card ───────────────────────────── */
.airf-abc-card {
    margin-bottom: 24px;
}
.airf-abc-tiers {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 14px 0 10px;
}
.airf-abc-tier {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 10px;
    padding: 8px 10px;
}
.airf-abc-tier strong {
    font-size: 14px;
    color: #1d2327;
}
.airf-abc-tier span:last-child {
    color: #50575e;
    font-size: 12px;
}
.airf-abc-meta {
    margin: 0;
    color: #50575e;
}
.airf-abc-upgrade {
    margin: 12px 0 0;
}

/* Stockout days coloring */
.airf-stockout--critical { color: #d63638; font-weight: 600; }
.airf-stockout--soon     { color: #dba617; font-weight: 600; }

/* ── History Timeline ────────────────────────────── */
.airf-timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.airf-timeline-item {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    overflow: hidden;
}
.airf-timeline-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    cursor: pointer;
    user-select: none;
}
.airf-timeline-header:hover { background: #f6f7f7; }
.airf-timeline-toggle {
    font-size: 11px;
    color: #787c82;
    transition: transform .2s;
}
.airf-timeline-toggle--open { transform: rotate(90deg); }
.airf-timeline-date {
    font-size: 13px;
    font-weight: 600;
    color: #1d2327;
}
.airf-timeline-summary {
    font-size: 13px;
    color: #50575e;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.airf-timeline-body {
    display: none;
    padding: 0 20px 16px;
    border-top: 1px solid #f0f0f1;
}
.airf-timeline-body--open { display: block; }

/* ── Pagination ──────────────────────────────────── */
.airf-pagination {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 8px;
    padding: 12px 0;
    border-top: 1px solid #e0e0e0;
}
.airf-pagination-info {
    color: #50575e;
    font-size: 13px;
}

/* ── SVG Sparklines ──────────────────────────────── */
.airf-sparkline {
    display: inline-block;
    vertical-align: middle;
}
.airf-sparkline polyline {
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ── Buttons & Actions ───────────────────────────── */
.airf-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}
.airf-actions .button:active,
.airf-export-buttons .button:active {
    transform: scale(0.97);
}

/* ── Settings Cards ──────────────────────────────── */
.airf-settings-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 16px;
    max-width: 640px;
}
.airf-settings-card h3 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
}
.airf-settings-card label {
    font-size: 13px;
    color: #1d2327;
}
.airf-site-info {
    font-size: 13px;
    color: #50575e;
}
.airf-site-info code {
    background: #f0f0f1;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

/* ── Auto Analysis Scheduler ─────────────────────── */
.airf-toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #1d2327;
    cursor: pointer;
}
.airf-auto-config {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f1;
}
.airf-auto-config--hidden {
    display: none;
}
.airf-label {
    font-size: 12px;
    font-weight: 600;
    color: #787c82;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin: 0 0 8px;
}
.airf-day-picker {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.airf-day-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid #dcdcde;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: #787c82;
    background: #fff;
    transition: all .15s;
    user-select: none;
}
.airf-day-pill input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}
.airf-day-pill--active,
.airf-day-pill:has(input:checked) {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}
.airf-day-pill:hover:not(.airf-day-pill--active) {
    border-color: #2271b1;
    color: #2271b1;
}
.airf-time-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.airf-time-row .airf-label {
    margin: 0;
    white-space: nowrap;
}
.airf-time-input {
    border: 1px solid #dcdcde;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 13px;
    color: #1d2327;
    background: #fff;
    width: 120px;
}
.airf-time-input:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(34,113,177,.15);
}
.airf-next-run {
    margin: 12px 0 0;
    font-size: 12px;
    color: #2271b1;
    font-weight: 500;
}
.airf-settings-form-actions {
    margin-top: 4px;
    max-width: 640px;
}

/* ── Country Picker ──────────────────────────────── */
.airf-country-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    min-height: 32px;
}
.airf-country-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f0f6fc;
    border: 1px solid #c5d9ed;
    border-radius: 16px;
    padding: 4px 10px 4px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #2271b1;
}
.airf-country-tag__remove {
    background: none;
    border: none;
    color: #787c82;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0 2px;
    border-radius: 50%;
    transition: color .15s;
}
.airf-country-tag__remove:hover {
    color: #d63638;
}
.airf-country-add-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}
.airf-country-dropdown {
    flex: 1;
    max-width: 300px;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 13px;
    background: #fff;
}
.airf-country-dropdown:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(34,113,177,.15);
}
.airf-country-count {
    font-size: 12px;
    color: #787c82;
    white-space: nowrap;
}

/* ── Market Events ───────────────────────────────── */
.airf-market-events {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}
.airf-market-event {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    padding: 12px 16px;
}
.airf-market-event--sale {
    border-left: 3px solid #d63638;
}
.airf-market-event--holiday {
    border-left: 3px solid #2271b1;
}
.airf-market-event--cultural {
    border-left: 3px solid #dba617;
}
.airf-market-event--seasonal {
    border-left: 3px solid #00a32a;
}
.airf-market-event__icon {
    font-size: 20px;
    flex-shrink: 0;
}
.airf-market-event__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.airf-market-event__body strong {
    font-size: 13px;
    color: #1d2327;
}
.airf-market-event__meta {
    font-size: 12px;
    color: #787c82;
}

/* ── Empty State ─────────────────────────────────── */
.airf-empty {
    text-align: center;
    padding: 48px 24px;
    color: #787c82;
    background: #f6f7f7;
    border-radius: 8px;
    margin-bottom: 24px;
}
.airf-empty p {
    margin: 8px 0;
    font-size: 14px;
}
.airf-empty__icon {
    display: block;
    font-size: 36px;
    width: 36px;
    height: 36px;
    margin: 0 auto 12px;
    color: #c3c4c7;
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 782px) {
    .airf-cards {
        grid-template-columns: 1fr;
    }
    .airf-tabs {
        flex-wrap: wrap;
    }
    .airf-insights-main {
        flex-direction: column;
    }
    .airf-product-info {
        min-width: 0 !important;
        flex: none !important;
    }
    .airf-product-selector select {
        min-width: 0;
        flex: 1;
    }
    .airf-table-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .airf-pagination__btn {
        min-width: 44px;
        min-height: 44px;
    }
}

/* ── Section Headers ─────────────────────────────── */
.airf-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 28px 0 16px;
}
.airf-section-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
}

/* ── Product Selector ────────────────────────────── */
.airf-product-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}
.airf-product-selector select {
    flex: 1;
    max-width: 400px;
    min-width: 200px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    color: #1d2327;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}
.airf-product-selector select:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(34,113,177,.15);
}
.airf-product-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    background: #fff;
    color: #50575e;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    line-height: 1;
    padding: 0;
}
.airf-product-nav:hover {
    border-color: #2271b1;
    color: #2271b1;
    background: #f0f6fc;
}
.airf-product-nav:active {
    transform: scale(0.95);
}
.airf-product-counter {
    font-size: 13px;
    color: #787c82;
    font-weight: 500;
    white-space: nowrap;
    margin-left: 4px;
}

/* ── Insights Main Layout ────────────────────────── */
.airf-insights-main {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}
.airf-insights-chart {
    flex: 2;
    min-width: 0;
    max-height: 400px;
    position: relative;
}
.airf-insights-chart canvas {
    max-height: 360px;
}
.airf-chart-zoom-hint {
    font-size: 11px;
    color: #787c82;
    margin-top: 6px;
    text-align: right;
}
.airf-print-only {
    display: none;
}

/* ── Product Info Panel ──────────────────────────── */
.airf-product-info {
    flex: 1;
    min-width: 240px;
    max-width: 300px;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: opacity .2s ease;
    align-self: flex-start;
}
.airf-product-info__urgency {
    margin-bottom: 16px;
}
.airf-product-info__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f1;
}
.airf-product-info__row:last-of-type {
    border-bottom: none;
}
.airf-product-info__label {
    font-size: 12px;
    font-weight: 600;
    color: #787c82;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.airf-product-info__value {
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
}
.airf-product-info__reasoning {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #f0f0f1;
    font-size: 13px;
    color: #50575e;
    line-height: 1.5;
}

/* ── Gated Banner (compact, replaces full overlay) ── */
.airf-gated-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #f0f6fc 0%, #e8f0fe 100%);
    border: 1px solid #c3d9f0;
    border-radius: 8px;
    padding: 14px 20px;
    margin-bottom: 24px;
    font-size: 13px;
    color: #1a56db;
}
.airf-gated-banner .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}
.airf-gated-banner a {
    font-weight: 600;
    margin-left: auto;
}

/* ── Chart Card (shared) ─────────────────────────── */
.airf-chart-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.airf-chart-card h4 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
}

/* ── Pagination ──────────────────────────────────── */
.airf-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 0;
    margin-bottom: 24px;
}
.airf-pagination__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #2271b1;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    cursor: pointer;
    transition: all .15s;
}
.airf-pagination__btn:hover:not(:disabled) {
    border-color: #2271b1;
    background: #f0f6fc;
}
.airf-pagination__btn:active:not(:disabled) {
    transform: scale(0.97);
}
.airf-pagination__btn:disabled {
    color: #c3c4c7;
    cursor: default;
    background: #f6f7f7;
}
.airf-pagination__info {
    font-size: 13px;
    color: #50575e;
    font-weight: 500;
}

.airf-section-description {
    margin: -8px 0 14px;
    font-size: 13px;
    color: #50575e;
}

.airf-chart-card--overview .description {
    margin: 12px 0 0;
    color: #50575e;
}

/* ── Gated/Locked Content ────────────────────────── */
.airf-gated-wrapper {
    position: relative;
    margin-bottom: 24px;
}
.airf-gated-content--locked {
    filter: blur(5px);
    pointer-events: none;
    user-select: none;
}
.airf-gated-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 8px;
}
.airf-upgrade-cta {
    text-align: center;
    background: #fff;
    padding: 32px 40px;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    max-width: 420px;
}
.airf-upgrade-cta .dashicons {
    font-size: 36px;
    width: 36px;
    height: 36px;
    color: #2271b1;
    margin-bottom: 12px;
}
.airf-upgrade-cta h4 {
    margin: 0 0 8px;
    font-size: 16px;
    color: #1d2327;
}
.airf-upgrade-cta p {
    margin: 0 0 16px;
    font-size: 13px;
    color: #50575e;
}

/* ── Locked Card ─────────────────────────────────── */
.airf-locked-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #f6f7f7;
    border: 2px dashed #c3c4c7;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}
.airf-locked-card .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: #787c82;
    margin-top: 2px;
}
.airf-locked-card h4 {
    margin: 0 0 6px;
    font-size: 15px;
    color: #1d2327;
}
.airf-locked-card p {
    margin: 0 0 14px;
    font-size: 13px;
    color: #50575e;
}

/* ── Locked Teaser (inline, for dashboard) ───────── */
.airf-locked-teaser {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f0f0f1;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    padding: 14px 20px;
    margin: 16px 0 24px;
    font-size: 13px;
    color: #50575e;
}
.airf-locked-teaser .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #787c82;
}
.airf-locked-teaser a {
    font-weight: 600;
}
.airf-locked-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #787c82;
}
.airf-locked-inline .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* ── Revenue Loss Card ───────────────────────────── */
.airf-revenue-loss {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fef3e0;
    border: 1px solid #dba617;
    border-radius: 8px;
    padding: 16px 20px;
    margin: 16px 0 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.airf-revenue-loss__icon {
    font-size: 32px;
    line-height: 1;
    color: #b32d2e;
}
.airf-revenue-loss__amount {
    font-size: 28px;
    font-weight: 700;
    color: #8a5500;
}
.airf-revenue-loss__label {
    font-size: 13px;
    color: #666;
    margin-top: 2px;
}

/* ── Reorder Calendar (legacy card styles removed — now uses .airf-table) ── */

/* ── Demand Anomaly Alerts ───────────────────────── */
.airf-anomaly {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 13px;
}
.airf-anomaly--spike { border-left: 4px solid #d63638; }
.airf-anomaly--drop  { border-left: 4px solid #2271b1; }
.airf-anomaly__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.airf-anomaly__icon {
    font-size: 10px;
    line-height: 1;
}
.airf-anomaly__badge--spike { background: #fcecec; color: #8a1e1e; }
.airf-anomaly__badge--drop  { background: #e8f0fe; color: #1a56db; }

/* ── Seasonal Pattern Bar ────────────────────────── */
.airf-seasonal-bar {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 120px;
    margin: 12px 0;
}
.airf-seasonal-bar__value {
    font-size: 10px;
    color: #3c434a;
    font-weight: 600;
    margin-bottom: 2px;
}
.airf-seasonal-bar__label {
    text-align: center;
    font-size: 10px;
    color: #787c82;
    margin-top: 4px;
}
.airf-seasonal-bar__hint {
    font-size: 11px;
    color: #787c82;
    font-style: italic;
    margin: 8px 0 0;
}

/* ── Export Section ───────────────────────────────── */
.airf-export-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

/* ── Print Styles ────────────────────────────────── */
@media print {
    #wpadminbar,
    #adminmenumain,
    #adminmenuwrap,
    #adminmenuback,
    #wpfooter,
    .airf-tabs,
    .airf-actions,
    .airf-export-buttons,
    .airf-locked-card,
    .airf-locked-teaser,
    .airf-gated-overlay,
    .airf-gated-banner,
    .airf-pagination,
    .airf-table-tools,
    .airf-product-selector,
    .airf-product-nav,
    .airf-product-counter,
    .airf-chart-zoom-hint,
    #airf-reset-zoom,
    .airf-seasonal-nav,
    .airf-seasonal-counter,
    .notice {
        display: none !important;
    }
    #wpcontent {
        margin-left: 0 !important;
        padding-left: 0 !important;
    }
    .airf-gated-content--locked {
        filter: none !important;
        pointer-events: auto !important;
    }
    body {
        background: #fff !important;
    }
    /* Force background colors to print (bars, badges, etc.) */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    /* Hide the Export & Reports section entirely */
    .airf-export-section {
        display: none !important;
    }
    /* Show print-only notes */
    .airf-print-only {
        display: block !important;
    }
    /* Show all hidden carousel panels */
    .airf-seasonal-panel {
        display: block !important;
        page-break-inside: avoid;
    }
    /* Show all paginated table rows */
    .airf-table tbody tr {
        display: table-row !important;
    }
    /* Page break hints between major sections */
    .airf-card {
        page-break-inside: avoid;
        margin-bottom: 16px !important;
    }
    /* Widen content for print */
    .wrap, #wpcontent, #wpbody-content {
        width: 100% !important;
        max-width: 100% !important;
    }
}

@media (max-width: 782px) {
    .airf-table-tools {
        align-items: stretch;
    }

    .airf-table-tools__controls,
    .airf-table-tools__label,
    .airf-table-tools__search,
    .airf-table-tools__select {
        width: 100%;
    }
}
