/* ══════════════════════════════════════════════════════════════
   CEO Intelligence — Styles
   Premium "Anti-Generic" aesthetic: OLED blacks, accent glows,
   glassmorphism cards, purposeful motion.
   ══════════════════════════════════════════════════════════════ */

/* ── Tab Bar ─────────────────────────────────────────────── */

.kw-tabs-bar {
    display: flex;
    gap: 2px;
    padding: 4px;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 1rem;
    width: fit-content;
}

.kw-tab-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    letter-spacing: 0.01em;
}

.kw-tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.kw-tab-btn.active {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.kw-tab-btn svg,
.kw-tab-btn i {
    width: 15px;
    height: 15px;
}

/* ── Loading & Empty ─────────────────────────────────────── */

.ceo-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
    color: var(--text-secondary);
}

/* Spinners Reemplazados por Particle Loader global en premium.css */
.ceo-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ── Cards ────────────────────────────────────────────────── */

.ceo-card {
    background: var(--bg-card, var(--bg-secondary));
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    transition: border-color 0.4s var(--ease-antigravity, cubic-bezier(0.16,1,0.3,1)),
                transform 0.4s var(--ease-antigravity, cubic-bezier(0.16,1,0.3,1)),
                box-shadow 0.4s var(--ease-antigravity, cubic-bezier(0.16,1,0.3,1));
}

.ceo-card:hover {
    border-color: rgba(99, 102, 241, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 12px var(--accent-glow, rgba(56,189,248,0.15));
}

.ceo-card-highlight {
    border-left: 3px solid var(--accent);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(99, 102, 241, 0.04) 100%);
}

.ceo-card-live {
    border: 1px solid rgba(245, 158, 11, 0.4);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(245, 158, 11, 0.03) 100%);
    animation: ceoPulse 2s ease-in-out infinite;
}

@keyframes ceoPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.15);
    }

    50% {
        box-shadow: 0 0 12px 2px rgba(245, 158, 11, 0.1);
    }
}

.ceo-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}

.ceo-card-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
}

.ceo-card-body {
    padding: 1rem;
}

/* ── Status Pill ──────────────────────────────────────────── */

.ceo-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: color-mix(in srgb, var(--pill-color) 15%, transparent);
    color: var(--pill-color);
}

.ceo-status-pill::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--pill-color);
}

/* ── Stats ────────────────────────────────────────────────── */

.ceo-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.ceo-stat-card {
    background: var(--bg-card, var(--bg-secondary));
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    text-align: center;
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    transition: border-color 0.4s var(--ease-antigravity, cubic-bezier(0.16,1,0.3,1)),
                transform 0.4s var(--ease-antigravity, cubic-bezier(0.16,1,0.3,1)),
                box-shadow 0.4s var(--ease-antigravity, cubic-bezier(0.16,1,0.3,1));
}

.ceo-stat-card:hover {
    border-color: rgba(99, 102, 241, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 12px var(--accent-glow, rgba(56,189,248,0.15));
}

.ceo-stat-icon {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.ceo-stat-row {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.ceo-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.ceo-stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    font-family: 'JetBrains Mono', monospace;
    font-variant-numeric: tabular-nums;
}

.ceo-stat-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Header Actions ───────────────────────────────────────── */

.ceo-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1rem;
    justify-content: flex-end;
}

.ceo-header-actions .btn {
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 0.78rem;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
}

.ceo-header-actions .btn-primary {
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.25);
}

.ceo-header-actions .btn-primary:hover {
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
    transform: translateY(-1px);
}

.ceo-header-actions .btn-accent {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.ceo-header-actions .btn-accent:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.ceo-study-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* ── Phases Progress ──────────────────────────────────────── */

.ceo-phases {
    display: flex;
    gap: 4px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 0.75rem 0;
}

.ceo-phase {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.68rem;
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.03));
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.ceo-phase-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-secondary);
    transition: all 0.3s ease;
}

.ceo-phase-completed .ceo-phase-dot {
    background: #10b981;
}

.ceo-phase-completed {
    color: #10b981;
    background: rgba(16, 185, 129, 0.08);
}

.ceo-phase-running .ceo-phase-dot {
    background: #f59e0b;
    animation: ceoPhasePulse 1s ease-in-out infinite;
}

.ceo-phase-running {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.08);
}

.ceo-phase-failed .ceo-phase-dot {
    background: #ef4444;
}

.ceo-phase-failed {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

@keyframes ceoPhasePulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.5);
    }
}

.ceo-phase-label {
    white-space: nowrap;
}

.ceo-live-phase {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* ── Meta / Timestamps ────────────────────────────────────── */

.ceo-meta {
    font-size: 0.72rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

/* ── History ──────────────────────────────────────────────── */

.ceo-history-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s ease;
}

.ceo-history-item:last-child {
    border-bottom: none;
}

.ceo-history-item:hover {
    background: rgba(99, 102, 241, 0.04);
}

.ceo-history-date {
    font-size: 0.8rem;
    color: var(--text-primary);
    font-weight: 500;
    min-width: 100px;
}

.ceo-history-trigger {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--accent);
    font-weight: 600;
    min-width: 75px;
}

.ceo-history-stats {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

/* ── Alerts ───────────────────────────────────────────────── */

.ceo-alert {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--border);
    border-left: 3px solid transparent;
    font-size: 0.82rem;
}

.ceo-alert:last-child {
    border-bottom: none;
}

.ceo-alert-critical {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.04);
}

.ceo-alert-high {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.04);
}

.ceo-alert-info {
    border-left-color: #6366f1;
    background: rgba(99, 102, 241, 0.04);
}

/* ── Clusters ─────────────────────────────────────────────── */

.ceo-cluster-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 3px solid transparent;
    overflow: hidden;
}

.ceo-cluster-item:last-child {
    border-bottom: none;
}

/* Processing state — pulsing accent glow */
.ceo-cluster-item.ceo-cluster-processing {
    border-left-color: var(--accent, #6366f1);
    background: rgba(99, 102, 241, 0.06);
    animation: clusterProcess 1.2s ease-in-out infinite;
}

@keyframes clusterProcess {

    0%,
    100% {
        box-shadow: inset 0 0 0 0 rgba(99, 102, 241, 0);
    }

    50% {
        box-shadow: inset 0 0 12px 0 rgba(99, 102, 241, 0.08);
    }
}

/* Success state — green confirmation */
.ceo-cluster-item.ceo-cluster-added {
    border-left-color: #22c55e;
    background: rgba(34, 197, 94, 0.06);
}

/* Slide-out removal */
.ceo-cluster-item.ceo-cluster-removing {
    opacity: 0;
    max-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin: 0 !important;
    border-bottom-width: 0 !important;
    border-left-width: 0 !important;
    transform: translateX(30px);
    pointer-events: none;
}

.ceo-cluster-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.ceo-cluster-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.ceo-intent-pill {
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ceo-intent-informational {
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
}

.ceo-intent-transactional {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
}

.ceo-intent-commercial {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
}

.ceo-intent-navigational {
    background: rgba(139, 92, 246, 0.12);
    color: #a78bfa;
}

.ceo-priority-pill {
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ceo-priority-critical {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
}

.ceo-priority-high {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
}

.ceo-priority-medium {
    background: rgba(99, 102, 241, 0.12);
    color: #818cf8;
}

.ceo-priority-low {
    background: rgba(107, 114, 128, 0.12);
    color: #9ca3af;
}

.ceo-cluster-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-height: 120px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
    mask-image: linear-gradient(to bottom, #000 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, #000 85%, transparent 100%);
    padding-bottom: 6px;
}

.ceo-kw-pill {
    padding: 3px 8px;
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.04));
    border-radius: 4px;
    font-size: 0.72rem;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
}

.ceo-kw-more {
    padding: 3px 8px;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 600;
}

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

.ceo-opportunity-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}

.ceo-opportunity-item:last-child {
    border-bottom: none;
}

.ceo-opp-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.ceo-opp-keyword {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.ceo-opp-reason {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.ceo-opp-action {
    font-size: 0.78rem;
    color: var(--accent);
    font-weight: 500;
}

/* ── Action Checklist ─────────────────────────────────────── */

.ceo-table-row {
    border-bottom: 1px solid var(--border);
    transition: background 0.15s ease;
}

.ceo-table-row:hover {
    background: var(--bg-tertiary);
}

.ceo-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.2rem;
    opacity: 0.5;
    color: var(--text-secondary);
    transition: opacity 0.15s, color 0.15s;
}

.ceo-icon-btn:hover {
    opacity: 1;
}

.ceo-icon-btn-danger:hover {
    color: #ef4444;
}

.ceo-action-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s ease;
}

.ceo-action-item:last-child {
    border-bottom: none;
}

.ceo-action-item:hover {
    background: rgba(99, 102, 241, 0.03);
}

.ceo-checkbox {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border-radius: 5px;
    border: 2px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-top: 1px;
}

.ceo-checkbox:hover {
    border-color: var(--accent);
}

.ceo-checkbox.checked {
    background: #6366f1;
    border-color: #6366f1;
}

.ceo-action-content {
    flex: 1;
    min-width: 0;
}

.ceo-action-text {
    font-size: 0.82rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.ceo-action-text.completed {
    text-decoration: line-through;
    opacity: 0.5;
}

.ceo-action-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.3rem;
}

.ceo-category-pill {
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 0.65rem;
    background: rgba(139, 92, 246, 0.1);
    color: #a78bfa;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ── Executive Summary ────────────────────────────────────── */

.ceo-executive-summary {
    font-size: 0.88rem;
    /* Slightly larger text */
    line-height: 1.5;
    /* Tighter line-height than 1.6 */
    color: var(--text-primary);
}

.ceo-markdown-content h1,
.ceo-markdown-content h2,
.ceo-markdown-content h3 {
    color: var(--accent);
    /* Blue accent color instead of white */
    font-weight: 600;
    margin: 1.25rem 0 0.5rem 0;
}

.ceo-markdown-content h1:first-child,
.ceo-markdown-content h2:first-child,
.ceo-markdown-content h3:first-child {
    margin-top: 0;
}

.ceo-markdown-content h1 {
    font-size: 1.2rem;
}

.ceo-markdown-content h2 {
    font-size: 1.1rem;
}

.ceo-markdown-content h3 {
    font-size: 1rem;
}

/* Control paragraphs */
.ceo-markdown-content p {
    margin-bottom: 0.75rem;
}

.ceo-markdown-content p:last-child {
    margin-bottom: 0;
}

/* Control `<br><br>` injection spacing */
.ceo-markdown-content br {
    display: block;
    content: "";
    margin-top: 0.5rem;
    /* Reduces the drastic jump of a double <br> */
}

.ceo-markdown-content ul {
    margin: 0.25rem 0 1rem 1.25rem;
    padding: 0;
}

.ceo-markdown-content li {
    margin-bottom: 0.35rem;
    line-height: 1.5;
}

.ceo-markdown-content strong {
    font-weight: 600;
    color: #f8fafc;
    /* Keep bold text popping white, contrasting with the blue headers and soft gray paragraph text */
}

/* ── Timeline ─────────────────────────────────────────────── */

.ceo-timeline {
    position: relative;
    padding-left: 1.5rem;
}

.ceo-timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.ceo-timeline-item {
    position: relative;
    padding: 0.5rem 0 0.5rem 1rem;
}

.ceo-timeline-dot {
    position: absolute;
    left: -1.5rem;
    top: 0.7rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg-secondary);
}

.ceo-timeline-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ceo-timeline-action {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.ceo-timeline-reasoning {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.35;
}

/* ── Source Pills ─────────────────────────────────────────── */

.ceo-source-pill {
    padding: 4px 10px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 6px;
    font-size: 0.72rem;
    color: var(--accent);
    font-weight: 500;
}

/* ── Delete Button ─────────────────────────────────────── */

.btn-icon-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.5;
}

.btn-icon-delete:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    opacity: 1;
}

.btn.btn-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
}

/* ── Clear / Limpiar Button ──────────────────────────────── */

.ceo-clear-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.ceo-clear-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    opacity: 1;
}

.ceo-clear-btn svg,
.ceo-clear-btn i {
    width: 12px;
    height: 12px;
}

/* ── Responsive: CEO Intelligence ──────────────────────────────────────── */
@media (max-width: 1024px) {

    /* Tab Bar → scrollable */
    .kw-tabs-bar {
        width: 100%;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .kw-tabs-bar::-webkit-scrollbar {
        display: none;
    }

    .kw-tab-btn {
        white-space: nowrap;
        font-size: 0.8rem;
        padding: 6px 12px;
        flex-shrink: 0;
    }

    /* Stats Grid → 2 columns */
    .ceo-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Header Actions → wrap */
    .ceo-header-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    /* Study Cards → full width */
    .ceo-study-card {
        min-width: 0;
    }

    /* Phases Progress → compact */
    .ceo-phases-progress {
        gap: 0.25rem;
    }

    .ceo-phase-item {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }

    /* Clusters / Opportunities → single column */
    .ceo-clusters-grid,
    .ceo-opportunities-grid {
        grid-template-columns: 1fr !important;
    }

    /* Executive Summary → compact */
    .ceo-executive-summary {
        padding: 1rem;
    }

    /* Action Checklist → compact */
    .ceo-action-item {
        flex-wrap: wrap;
    }

    /* Timeline → full width */
    .ceo-timeline {
        padding-left: 1rem;
    }
}

/* ── Extracted Action Plan & PDF Styles ─────────────────────────────────── */

.ceo-btn-icon-sm {
    width: 14px;
    height: 14px;
}

.ceo-spin {
    animation: spin 1s linear infinite;
}

.ceo-text-danger {
    color: #ef4444;
}

.ceo-pdf-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.ceo-pdf-table-header {
    background: #f9fafb;
    color: #374151;
    text-align: left;
}

.ceo-pdf-th {
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 600;
}

.ceo-pdf-table-row {
    border-bottom: 1px solid #f3f4f6;
}

.ceo-pdf-td {
    padding: 10px;
}

.ceo-pdf-fw-500 {
    font-weight: 500;
    color: #111827;
}

.ceo-pdf-text-muted {
    color: #6b7280;
}

.ceo-pdf-text-dark {
    color: #4b5563;
}

.ceo-pdf-text-lighter {
    color: #9ca3af;
}

.ceo-action-plan-wrapper {
    margin-bottom: 20px;
    border: 1px solid var(--accent);
    border-radius: 12px;
    overflow: hidden;
}

.ceo-action-plan-header {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.15), rgba(139, 92, 246, 0.1));
    padding: 14px 18px;
    border-bottom: 1px solid rgba(96, 165, 250, 0.2);
}

.ceo-flex-between-center {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ceo-action-plan-title {
    font-size: 15px;
    display: flex;
    align-items: center;
}

.ceo-action-plan-icon {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    color: var(--accent);
}

.ceo-action-plan-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 16px;
}

.ceo-action-plan-summary {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 8px 0 0;
    line-height: 1.5;
}

.ceo-action-plan-body {
    padding: 16px;
}

.ceo-action-plan-empty {
    color: var(--text-secondary);
    text-align: center;
}

.ceo-pdf-header {
    border-bottom: 2px solid #6366f1;
    padding-bottom: 20px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.ceo-pdf-main-title {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.ceo-pdf-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 5px 0 0;
}

.ceo-pdf-date-container {
    text-align: right;
}

.ceo-pdf-date-label {
    font-size: 12px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ceo-pdf-date-value {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.ceo-pdf-section {
    margin-bottom: 40px;
}

.ceo-pdf-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 8px;
    margin-bottom: 16px;
}

.ceo-pdf-footer {
    margin-top: 50px;
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
    font-size: 10px;
    color: #9ca3af;
    text-align: center;
}

.ceo-action-plan-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.ceo-action-plan-badge {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.ceo-action-plan-deadline {
    font-size: 11px;
    color: var(--text-secondary);
}

.ceo-action-plan-item-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 6px;
}

.ceo-action-plan-item-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.ceo-action-plan-item-impact {
    font-size: 11px;
    color: var(--accent);
    margin: 6px 0 0;
    font-style: italic;
}

.ceo-text-white {
    color: white !important;
}


/* ── Utilities ─────────────────────────────────────────────────────── */

.ceo-empty-error {
    text-align: center;
    padding: 4rem 2rem;
    border-radius: 12px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.05);
}

.ceo-empty-error-icon {
    width: 48px;
    height: 48px;
    color: #ef4444;
    margin-bottom: 1rem;
}

.ceo-empty-error-title {
    color: #ef4444;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.ceo-empty-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.ceo-mt-1 {
    margin-top: 1rem;
}

.ceo-pointer {
    cursor: pointer;
}

.ceo-flex-center-gap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ceo-flex-wrap-gap {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ceo-flex-1 {
    flex: 1;
}

.ceo-nowrap {
    white-space: nowrap;
}

.ceo-card-icon {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    color: var(--accent);
}

.ceo-mr-1 {
    margin-right: 4px;
}

.ceo-btn-xs {
    padding: 2px 6px;
}

.ceo-btn-icon-xs {
    width: 12px;
    height: 12px;
}

.ceo-btn-md {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
}

.ceo-btn-icon-md {
    width: 16px;
    height: 16px;
}

.ceo-ml-auto {
    margin-left: auto;
}

.ceo-empty-premium {
    text-align: center;
    padding: 4rem 2rem;
    border-radius: 12px;
    background: rgba(124, 77, 255, 0.05);
    border: 1px solid rgba(124, 77, 255, 0.1);
}

.ceo-empty-icon {
    width: 64px;
    height: 64px;
    color: var(--accent);
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 15px rgba(124, 77, 255, 0.4));
}

.ceo-empty-title {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.ceo-empty-desc {
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto 2rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.ceo-btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(124, 77, 255, 0.3);
}

.ceo-pill-10b981 {
    --pill-color: #10b981;
}

.ceo-pill-f59e0b {
    --pill-color: #f59e0b;
}

.ceo-pill-6366f1 {
    --pill-color: #6366f1;
}

.ceo-pill-ef4444 {
    --pill-color: #ef4444;
}


/* ── Table & Keywords ─────────────────────────────────────────────── */

.ceo-empty-state {
    text-align: center;
    border-radius: 12px;
    background: rgba(124, 77, 255, 0.05);
    border: 1px solid rgba(124, 77, 255, 0.1);
    padding: 3rem 1rem;
}

.ceo-empty-icon-muted {
    width: 48px;
    height: 48px;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.ceo-empty-title-sm {
    color: var(--text);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.ceo-empty-desc-sm {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.ceo-td-main {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    color: var(--text);
}

.ceo-td-center {
    padding: 0.5rem 0.75rem;
    text-align: center;
}

.ceo-td-muted {
    padding: 0.5rem 0.75rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.ceo-td-small {
    padding: 0.5rem 0.75rem;
    text-align: center;
    font-size: 0.75rem;
}

.ceo-td-actions {
    padding: 0.5rem 0.75rem;
    text-align: center;
    white-space: nowrap;
}

.ceo-intent-pill {
    display: inline-block;
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.ceo-text-tertiary {
    color: var(--text-tertiary);
}

.ceo-text-success {
    color: #34d399;
}

.ceo-fw-600 {
    font-weight: 600;
}

.ceo-fw-400 {
    font-weight: 400;
}

.ceo-flex-col-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
}

.ceo-text-xs-muted {
    font-size: 0.65rem;
    color: var(--text-tertiary);
}

.ceo-status-success {
    color: #34d399;
    font-weight: 600;
}

.ceo-status-danger {
    color: #ef4444;
    font-weight: 600;
}

.ceo-status-muted {
    color: #94a3b8;
    font-weight: 600;
}

.ceo-btn-icon-sm-13 {
    width: 13px;
    height: 13px;
}

.ceo-padding-4-2 {
    padding: 4rem 2rem;
}

.ceo-color-danger {
    color: #ef4444;
}

.ceo-stat-row-mb {
    margin-bottom: 1rem;
}

.ceo-card-body-no-padding {
    padding: 0;
}

.ceo-alert-center-danger {
    text-align: center;
    padding: 2rem;
    color: #ef4444;
}

.ceo-empty-state-large {
    text-align: center;
    padding: 4rem 2rem;
    border-radius: 12px;
    background: rgba(124, 77, 255, 0.05);
    border: 1px solid rgba(124, 77, 255, 0.1);
}

.ceo-icon-large-muted {
    width: 64px;
    height: 64px;
    color: var(--accent);
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 15px rgba(124, 77, 255, 0.4));
}

/* ── More Utilities ────────────────────────────────────────────────── */

.ceo-td-empty-select {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.ceo-stat-accent {
    border-color: var(--accent);
}

.ceo-stat-accent .ceo-stat-icon,
.ceo-stat-accent .ceo-stat-value {
    color: var(--accent);
}

.ceo-executive-summary-text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.ceo-btn-auto-fix {
    margin-top: 8px;
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ceo-action-plan-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.ceo-btn-execute-all {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    font-family: inherit;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.ceo-btn-execute-all:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.5);
}

.ceo-btn-execute-all:disabled {
    opacity: 0.7;
    cursor: wait;
}