/* AEO Content AI Studio - Admin Styles */

.aeo-settings h1 {
    margin-bottom: 0.5em;
}

.aeo-subtitle {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.6;
    margin: 0 0 20px 0;
    max-width: 800px;
}

.aeo-status-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 24px;
    font-weight: 500;
}

.aeo-status-bar.aeo-connected {
    background: #e6f4ea;
    border: 1px solid #34a853;
    color: #137333;
}

.aeo-status-bar.aeo-disconnected {
    background: #fce8e6;
    border: 1px solid #ea4335;
    color: #a50e0e;
}

.aeo-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.aeo-connected .aeo-status-dot {
    background: #34a853;
}

.aeo-disconnected .aeo-status-dot {
    background: #ea4335;
}

.aeo-version {
    margin-left: auto;
    font-size: 12px;
    opacity: 0.7;
}

.aeo-features-table td label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.aeo-features-table input[type="checkbox"] {
    margin-top: 2px;
}

.aeo-status-table {
    max-width: 600px;
}

.aeo-status-table td:first-child {
    width: 200px;
}

/* ─── Activity Log ───────────────────────────────────── */

.aeo-log-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.aeo-stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 24px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    min-width: 120px;
}

.aeo-stat-number {
    font-size: 24px;
    font-weight: 700;
    color: #1d2327;
    line-height: 1.2;
}

.aeo-stat-number.aeo-stat-success {
    color: #34a853;
}

.aeo-stat-number.aeo-stat-time {
    font-size: 16px;
}

.aeo-stat-label {
    font-size: 12px;
    color: #646970;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.aeo-log-filters {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.aeo-log-filters select,
.aeo-log-filters input[type="date"] {
    max-width: 180px;
}

.aeo-log-table {
    margin-top: 0;
}

.aeo-log-command {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    background: #f0f0f1;
    color: #50575e;
}

.aeo-cmd-write {
    background: #e8f0fe;
    color: #1a56db;
}

.aeo-cmd-read {
    background: #fef7e0;
    color: #b45309;
}

.aeo-cmd-system {
    background: #e6f4ea;
    color: #137333;
}

.aeo-cmd-audit {
    background: #f3e8fd;
    color: #7c3aed;
}

.aeo-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.aeo-badge-success {
    background: #e6f4ea;
    color: #137333;
}

.aeo-badge-error {
    background: #fce8e6;
    color: #a50e0e;
}

.aeo-log-details {
    display: inline-block;
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    background: #f6f7f7;
    padding: 2px 6px;
    border-radius: 3px;
}

.aeo-log-muted {
    color: #a7aaad;
}

.aeo-log-pagination {
    display: flex;
    gap: 4px;
    align-items: center;
    margin-top: 16px;
}

.aeo-log-empty {
    padding: 40px;
    text-align: center;
    background: #f6f7f7;
    border-radius: 6px;
    color: #646970;
}

/* ─── Audit Report ──────────────────────────────────── */

.aeo-audit-loading {
    display: flex;
    align-items: center;
    padding: 24px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #646970;
}

/* Re-audit progress */
.aeo-reaudit-bar {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: #e8f0fe;
    border: 1px solid #4285f4;
    border-radius: 6px 6px 0 0;
    color: #1d2327;
    font-weight: 500;
    font-size: 14px;
}

.aeo-reaudit-track {
    height: 4px;
    background: #ddd;
    border-radius: 0 0 6px 6px;
    overflow: hidden;
}

.aeo-reaudit-fill {
    height: 100%;
    background: #4285f4;
    border-radius: 0 0 6px 6px;
    transition: width 0.5s ease;
}

.aeo-audit-tabs {
    margin-bottom: 0;
}

.aeo-tab-panel {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-top: none;
    padding: 24px;
}

/* ── Overview: Hero ───────────────────────────────── */

.aeo-hero {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.aeo-hero-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.aeo-hero-favicon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.aeo-hero-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.aeo-hero-domain {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: #1d2327;
}

.aeo-hero-tags {
    display: flex;
    gap: 6px;
}

.aeo-hero-center {
    flex: 1;
    padding: 0 16px;
}

.aeo-hero-verdict {
    color: #50575e;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 6px 0;
}

.aeo-v2-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    background: #e8f0fe;
    color: #4285f4;
    border: 1px solid #c2d9fc;
}

.aeo-hero-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.aeo-score-legend {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.aeo-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #646970;
    white-space: nowrap;
}

.aeo-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.aeo-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    background: #e8f0fe;
    color: #1a73e8;
}

.aeo-tag-muted {
    background: #f0f0f1;
    color: #646970;
}

@media (max-width: 960px) {
    .aeo-hero {
        flex-direction: column;
        align-items: stretch;
    }
    .aeo-hero-right {
        justify-content: center;
    }
}

/* ── Overview: Bottom Line ────────────────────────── */

.aeo-bottom-line {
    padding: 20px 24px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, rgba(62,118,230,0.06) 0%, rgba(62,118,230,0.02) 100%);
    border: 1px solid rgba(62,118,230,0.15);
    border-radius: 8px;
}

.aeo-bottom-line-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #3b82f6;
    margin-bottom: 8px;
}

.aeo-bottom-line-text {
    font-size: 15px;
    line-height: 1.6;
    color: #1d2327;
    margin: 0;
}

/* ── Overview: Category Cards ─────────────────────── */

.aeo-category-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 960px) {
    .aeo-category-cards {
        grid-template-columns: 1fr;
    }
}

.aeo-category-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.aeo-category-card-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.aeo-category-card-weight {
    font-size: 13px;
    color: #646970;
}

.aeo-category-card-score {
    flex-shrink: 0;
}

/* Score badge pill (inline) */
.aeo-score-badge-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 400;
    white-space: nowrap;
}

/* Fix Summary */
.aeo-fix-summary {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px 24px;
}

.aeo-fix-summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.aeo-fix-summary h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.aeo-fix-summary-stats {
    display: flex;
    gap: 20px;
}

.aeo-fix-stat {
    font-size: 13px;
    color: #646970;
}

.aeo-fix-stat strong {
    color: #1d2327;
}

.aeo-stat-success {
    color: #34a853 !important;
}

.aeo-fix-top3-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.aeo-fix-top3-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #f9f9f9;
    border-radius: 6px;
}

.aeo-fix-top3-rank {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8f0fe;
    color: #1a73e8;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.aeo-fix-top3-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #1d2327;
}

.aeo-fix-top3-pts {
    font-size: 12px;
    font-weight: 600;
    color: #34a853;
    background: rgba(52,168,83,0.1);
    padding: 3px 10px;
    border-radius: 12px;
    white-space: nowrap;
}

/* ── Scoreboard ───────────────────────────────────── */

.aeo-scoreboard-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.aeo-scoreboard-cols {
    display: flex;
    align-items: center;
    padding: 8px 14px;
    padding-left: 120px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #646970;
}

.aeo-scoreboard-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    background: #f9f9f9;
    user-select: none;
}

.aeo-scoreboard-header:hover {
    background: #f0f0f1;
}

.aeo-sb-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.aeo-sb-col-criteria {
    flex: 1;
    min-width: 0;
}

.aeo-sb-col-status {
    width: 100px;
    text-align: center;
    flex-shrink: 0;
}

.aeo-sb-col-potential {
    width: 90px;
    text-align: center;
    flex-shrink: 0;
}

.aeo-sb-col-score {
    width: 80px;
    text-align: center;
    flex-shrink: 0;
}

.aeo-cat-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.aeo-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
}

.aeo-key-findings {
    font-size: 13px;
    color: #1d2327;
    line-height: 1.6;
}

.aeo-sb-links-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 14px;
    border-bottom: 1px solid #f0f0f1;
}

.aeo-sb-guide-link {
    font-size: 13px;
    font-weight: 500;
    color: #1a73e8;
    text-decoration: none;
}

.aeo-sb-guide-link:hover {
    opacity: 0.7;
}

.aeo-sb-preview-link {
    font-size: 13px;
    font-weight: 400;
    color: #646970;
    text-decoration: none;
}

.aeo-sb-preview-link:hover {
    opacity: 0.7;
}

.aeo-sb-finding-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
}

.aeo-sb-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    flex-shrink: 0;
}

.aeo-sb-finding-desc {
    flex: 1;
    font-size: 14px;
    color: #1d2327;
    line-height: 1.4;
}

.aeo-sb-severity-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Accordion Arrow ─────────────────────────────── */

.aeo-accordion-arrow {
    display: inline-block;
    font-size: 18px;
    color: #646970;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    line-height: 1;
}

.aeo-accordion-arrow.is-open {
    transform: rotate(180deg);
}

.aeo-accordion-item.is-open > .aeo-accordion-header {
    background: #f0f0f1;
}

/* ── Findings ─────────────────────────────────────── */

.aeo-findings-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.aeo-finding-group {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.aeo-finding-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    background: #f9f9f9;
    user-select: none;
}

.aeo-finding-header:hover {
    background: #f0f0f1;
}

.aeo-finding-id {
    font-family: monospace;
    font-size: 12px;
    color: #646970;
    min-width: 30px;
}

.aeo-finding-name {
    font-weight: 600;
    flex: 1;
    font-size: 14px;
}

.aeo-score-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 400;
    white-space: nowrap;
}

.aeo-finding-details-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.aeo-finding-details-table th {
    text-align: left;
    padding: 8px 12px;
    background: #f0f0f1;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    color: #646970;
}

.aeo-finding-details-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f1;
    vertical-align: top;
}

.aeo-finding-type {
    font-family: monospace;
    font-size: 11px;
    background: #e8f0fe;
    color: #1a73e8;
    padding: 1px 6px;
    border-radius: 3px;
}

.aeo-finding-severity {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.aeo-no-findings {
    padding: 12px 14px;
    color: #646970;
    font-size: 13px;
}

/* ── Opportunities ────────────────────────────────── */

.aeo-opportunities-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.aeo-opp-card {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.aeo-opp-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    user-select: none;
}

.aeo-opp-header:hover {
    background: #f9f9f9;
}

.aeo-opp-impact {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.aeo-opp-name {
    font-weight: 600;
    flex: 1;
    font-size: 14px;
}

.aeo-opp-effort {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
    white-space: nowrap;
}

.aeo-opp-card .aeo-accordion-body p {
    padding: 17px 14px 14px;
    margin: 0;
    color: #1d2327;
    font-size: 14px;
    line-height: 1.6;
}

