/* ==========================================================================
   AF Companion Suite - Master Panel Design System
   ========================================================================== */

.af-status-container, 
.af-speed-container,
.af-growth-container { 
    max-width: 1000px; 
    margin: 20px auto 0; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; 
    color: #1d2327;
}

/* Header & Branding */
.af-status-header, 
.af-speed-header,
.af-growth-header { 
    margin-bottom: 30px; 
    border-bottom: 1px solid #dcdcde; 
    padding-bottom: 20px; 
}

.af-status-branding, 
.af-speed-branding,
.af-growth-branding { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
}

.af-status-branding h1, 
.af-speed-branding h1,
.af-growth-branding h1 { 
    font-size: 28px; 
    font-weight: 800; 
    color: #1d2327; 
    margin: 0; 
}

.af-badge,
.af-badge-status { 
    background: #2271b1; 
    color: #fff; 
    padding: 4px 10px; 
    border-radius: 4px; 
    font-size: 11px; 
    font-weight: 700; 
    letter-spacing: 0.5px; 
    text-transform: uppercase;
}

.af-subtitle { 
    color: #646970; 
    font-size: 15px; 
    margin-top: 8px; 
}

/* Metrics Grid Cards (Unified with Growth/Speed Card Style) */
.af-cm-metrics { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 20px; 
    margin-bottom: 25px; 
}

.af-cm-card, 
.af-speed-card,
.af-growth-card { 
    background: #fff; 
    border-radius: 12px; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.08); 
    border: 1px solid #e2e8f0; 
    padding: 25px; 
    margin-bottom: 25px; 
    transition: transform 0.2s;
}

.af-cm-card:hover { 
    transform: translateY(-2px); 
}

.af-card-num { 
    font-size: 32px; 
    font-weight: 800; 
    color: #1d2327; 
    line-height: 1;
}

.af-card-label { 
    font-size: 12px; 
    font-weight: 700; 
    text-transform: uppercase; 
    color: #64748b; 
    margin-top: 8px; 
    letter-spacing: 0.5px;
}

.card-warning .af-card-num { color: #dc2626; }
.card-success .af-card-num { color: #10b981; }

/* Section Title (Matching Growth & Speed Panels) */
.af-section-title { 
    font-size: 18px; 
    font-weight: 700; 
    color: #1d2327; 
    margin: 0 0 25px 0; 
    padding-bottom: 15px; 
    border-bottom: 1px solid #f0f0f1; 
    display: flex; 
    align-items: center; 
}

/* ==========================================================================
   AF Companion Suite - Refined Toolbar & Controls Fix
   ========================================================================== */

.af-cm-toolbar { 
    background: #fff; 
    border: 1px solid #e2e8f0; 
    border-radius: 12px; 
    padding: 16px 24px; 
    margin-bottom: 25px; 
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.af-cm-toolbar form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin: 0;
}

.af-cm-toolbar label { 
    font-weight: 700; 
    font-size: 13px;
    color: #1d2327;
    margin-right: 4px; 
}

/* Explicitly style all toolbar dropdowns so they never shrink or look broken */
.af-cm-toolbar select {
    appearance: auto;
    -webkit-appearance: auto;
    height: 38px;
    padding: 0 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #1e293b;
    background: #fff;
    min-width: 140px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.af-cm-toolbar select:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

/* Make toolbar submit buttons match clean heights */
.af-cm-toolbar .button {
    height: 38px !important;
    line-height: 36px !important;
    padding: 0 18px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
}

.af-cm-toolbar .button-primary {
    background: #2271b1 !important;
    border-color: #2271b1 !important;
}
/* Tables & Status Pills */
.af-cm-table, 
.wp-list-table.af-cm-table { 
    background: #fff; 
    border-radius: 12px; 
    border: 1px solid #e2e8f0; 
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.wp-list-table.af-cm-table th {
    background: #f8fafc;
    font-weight: 700;
    color: #1d2327;
    padding: 15px;
}

.wp-list-table.af-cm-table td {
    padding: 15px;
    vertical-align: middle;
}

.af-status-pill { 
    padding: 4px 10px; 
    border-radius: 6px; 
    font-size: 11px; 
    font-weight: 700; 
    text-transform: uppercase; 
    display: inline-block; 
    letter-spacing: 0.5px;
}

.status-fresh { background: #ecfdf5; color: #059669; }
.status-stale { background: #fef2f2; color: #dc2626; }

/* Pagination Component (Matching Theme Spacing) */
.af-cm-pagination {
    margin-top: 25px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
}

.af-cm-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
}

.af-cm-pagination .page-numbers:hover {
    background: #f8fafc;
    border-color: #2271b1;
    color: #2271b1;
}

.af-cm-pagination .page-numbers.current {
    background: #2271b1;
    border-color: #2271b1;
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(34, 113, 177, 0.2);
}

.af-cm-pagination .page-numbers.dots {
    background: transparent;
    border-color: transparent;
    color: #94a3b8;
    box-shadow: none;
    cursor: default;
}

/* Responsive Grid Adjustments */
@media screen and (max-width: 782px) {
    .af-cm-metrics {
        grid-template-columns: 1fr;
    }
    .af-cm-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Clear Unwanted Notices */
.notice, 
.aftc-notice, 
div.fs-notice.promotion, 
div.fs-notice.success, 
div.fs-notice.updated, 
.update-nag.gt-admin-notice { 
    display: none !important; 
}