.cpanalyzer-stats-dashboard {
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
}

.cpanalyzer-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.cpanalyzer-stat-card {
    text-align: center;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
}

.cpanalyzer-stat-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.cpanalyzer-stat-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
}

.cpanalyzer-upload-section,
.cpanalyzer-batch-controls,
.cpanalyzer-urls-table-section {
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
}

.cpanalyzer-batch-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.cpanalyzer-progress-bar {
    width: 100%;
    height: 20px;
    background: #f0f0f1;
    border-radius: 10px;
    overflow: hidden;
}

.cpanalyzer-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0073aa, #005a87);
    transition: width 0.3s ease;
}

.cpanalyzer-progress-text {
    margin-top: 10px;
    text-align: center;
    font-weight: 500;
}

.cpanalyzer-status-success { color: #00a32a; font-weight: bold; }
.cpanalyzer-status-failed { color: #d63638; font-weight: bold; }
.cpanalyzer-status-progress { color: #0073aa; font-weight: bold; }
.cpanalyzer-status-pending { color: #dba617; font-weight: bold; }

/* Content Refresh Brief modal + action buttons (moved from inline template styles) */
/* ── Modal overlay & container ── */
.cpanalyzer-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}
.cpanalyzer-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(2px);
}
.cpanalyzer-modal-container {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 780px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ── Modal header ── */
.cpanalyzer-modal-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 4px;
}
.cpanalyzer-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1d2327;
    flex: 1;
    min-width: 0;
}
.cpanalyzer-modal-url {
    width: 100%;
    margin: 4px 0 0;
    font-size: 12px;
    color: #646970;
    word-break: break-all;
}
.cpanalyzer-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #646970;
    cursor: pointer;
    padding: 0 4px;
    margin-left: auto;
    flex-shrink: 0;
}
.cpanalyzer-modal-close:hover { color: #d63638; }

/* ── Modal body ── */
.cpanalyzer-modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}

/* ── Brief sections ── */
.cpanalyzer-brief-section {
    margin-bottom: 24px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}
.cpanalyzer-brief-section:last-child { margin-bottom: 0; }

.cpanalyzer-brief-section-title {
    margin: 0;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
}
.cpanalyzer-brief-gap        { background: #0073aa; }
.cpanalyzer-brief-structure  { background: #6f42c1; }
.cpanalyzer-brief-performance{ background: #e65c00; }

.cpanalyzer-brief-icon { font-style: normal; font-size: 16px; }

.cpanalyzer-brief-content { padding: 14px 16px; }

.cpanalyzer-brief-row {
    margin-bottom: 12px;
}
.cpanalyzer-brief-row:last-child { margin-bottom: 0; }
.cpanalyzer-brief-row > strong {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #646970;
    margin-bottom: 5px;
}
.cpanalyzer-brief-row p { margin: 0; color: #1d2327; line-height: 1.6; }

.cpanalyzer-brief-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 600px) {
    .cpanalyzer-brief-two-col { grid-template-columns: 1fr; }
}

.cpanalyzer-brief-list {
    margin: 4px 0 0 18px;
    padding: 0;
    color: #1d2327;
    line-height: 1.7;
}
.cpanalyzer-brief-list li { margin-bottom: 2px; }

/* ── Priority badge ── */
.cpanalyzer-priority-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.cpanalyzer-priority-high   { background: #fce4e4; color: #d63638; }
.cpanalyzer-priority-medium { background: #fef3cd; color: #9a6700; }
.cpanalyzer-priority-low    { background: #d1fad9; color: #007c2e; }

/* ── Modal footer ── */
.cpanalyzer-modal-footer {
    padding: 14px 24px;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
    text-align: right;
}

/* ── Spinner for Generate Brief button ── */
.cpanalyzer-btn-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(0,0,0,0.15);
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: cpanalyzer-spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 5px;
}
@keyframes cpanalyzer-spin { to { transform: rotate(360deg); } }

/* ── Site page picker (import from site content) ── */
.cpanalyzer-site-pages-list {
    max-height: 360px;
    overflow-y: auto;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    background: #fff;
    padding: 8px 12px;
    margin: 8px 0 12px;
}

.cpanalyzer-page-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 4px;
    border-bottom: 1px solid #f0f0f1;
    cursor: pointer;
}

.cpanalyzer-page-row:last-child {
    border-bottom: none;
}

.cpanalyzer-page-row:hover {
    background: #f6f7f7;
}

.cpanalyzer-page-title {
    font-weight: 500;
}

.cpanalyzer-page-path {
    color: #646970;
    font-size: 12px;
}

.cpanalyzer-page-type {
    margin-left: auto;
    background: #f0f0f1;
    color: #50575e;
    border-radius: 3px;
    padding: 1px 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.cpanalyzer-selected-count {
    margin-left: 12px;
    color: #646970;
}
