/* P75 — Cross-Product Workflow Cockpit styles
 *
 * 4-column plan cockpit: Legal / People / Claims / ESG
 * ~1200px wide; stacks vertically on narrower viewports.
 * Reuses --ip-accent, --vc-bg-2, --vc-border design tokens from existing cockpits.
 */

/* ── Mount ──────────────────────────────────────────────────────────────── */

.cpc-mount {
    margin: 0 0 16px;
}

/* ── Cockpit shell ──────────────────────────────────────────────────────── */

.cpc-cockpit {
    background: var(--vc-bg-2, rgba(20, 18, 40, 0.96));
    border: 1px solid var(--ip-accent, #7c6ff0);
    border-radius: 10px;
    padding: 18px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    animation: cpc-slide-in 0.2s ease;
}

@keyframes cpc-slide-in {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

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

.cpc-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--ip-text, #e0e0e0);
    letter-spacing: 0.01em;
}

.cpc-badge {
    font-size: 10px;
    font-weight: 600;
    color: var(--ip-accent, #7c6ff0);
    background: rgba(124, 111, 240, 0.12);
    border: 1px solid rgba(124, 111, 240, 0.35);
    border-radius: 20px;
    padding: 2px 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cpc-section-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--ip-text-muted, rgba(255, 255, 255, 0.5));
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

/* ── 4-column plan grid ─────────────────────────────────────────────────── */

.cpc-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 14px;
}

@media (max-width: 1100px) {
    .cpc-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 680px) {
    .cpc-columns {
        grid-template-columns: 1fr;
    }
}

/* ── Individual column ──────────────────────────────────────────────────── */

.cpc-column {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--vc-border, rgba(150, 145, 175, 0.2));
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Column accent borders */
.cpc-col-legal   { border-top: 3px solid #7c6ff0; }
.cpc-col-people  { border-top: 3px solid #22d3ee; }
.cpc-col-claims  { border-top: 3px solid #f59e0b; }
.cpc-col-esg     { border-top: 3px solid #22c55e; }

.cpc-col-header {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.cpc-col-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--ip-text, #e0e0e0);
}

.cpc-col-sublabel {
    font-size: 10px;
    color: var(--ip-text-muted, rgba(255, 255, 255, 0.45));
    font-weight: 500;
}

/* ── Approval pills ─────────────────────────────────────────────────────── */

.cpc-pill {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: auto;
}

.cpc-pill-pending {
    background: rgba(150, 145, 175, 0.1);
    border: 1px solid rgba(150, 145, 175, 0.3);
    color: rgba(255, 255, 255, 0.4);
}

.cpc-pill-approved {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #4ade80;
}

.cpc-pill-skipped {
    background: rgba(107, 114, 128, 0.12);
    border: 1px solid rgba(107, 114, 128, 0.3);
    color: #9ca3af;
}

/* ── Scope panel (inside each column) ──────────────────────────────────── */

.cpc-scope-panel {
    flex: 1;
}

.cpc-scope-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--ip-text-muted, rgba(255, 255, 255, 0.45));
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.cpc-scope-empty {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    font-style: italic;
}

.cpc-scope-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cpc-scope-item {
    display: flex;
    align-items: center;
}

.cpc-scope-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--vc-border, rgba(150, 145, 175, 0.2));
    border-radius: 5px;
    color: var(--ip-text, #e0e0e0);
    font-size: 11px;
    padding: 4px 7px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.cpc-scope-input:focus {
    outline: none;
    border-color: var(--ip-accent, #7c6ff0);
}

.cpc-scope-meta {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 6px;
}

.cpc-scope-meta strong {
    color: rgba(255, 255, 255, 0.7);
}

/* ── Per-column approve / skip ──────────────────────────────────────────── */

.cpc-col-actions {
    display: flex;
    gap: 6px;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--vc-border, rgba(150, 145, 175, 0.15));
}

.cpc-col-btn-approve {
    flex: 1;
    padding: 5px 8px;
    background: rgba(124, 111, 240, 0.18);
    border: 1px solid rgba(124, 111, 240, 0.5);
    border-radius: 5px;
    color: #c4bfff;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.13s;
}

.cpc-col-btn-approve:hover {
    background: rgba(124, 111, 240, 0.3);
}

.cpc-col-btn-skip {
    padding: 5px 8px;
    background: transparent;
    border: 1px solid var(--vc-border, rgba(150, 145, 175, 0.25));
    border-radius: 5px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.13s;
}

.cpc-col-btn-skip:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
}

/* ── Cross-product contradiction lane ───────────────────────────────────── */

.cpc-contradiction-lane {
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.05);
    padding: 12px;
    margin-bottom: 14px;
}

.cpc-contradiction-title {
    color: #fca5a5;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cpc-conflict-icon {
    color: #ef4444;
    font-size: 13px;
}

.cpc-contradiction-card {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 0;
    border-top: 1px solid rgba(239, 68, 68, 0.15);
    font-size: 11px;
}

.cpc-contra-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cpc-contra-badge-oraclea  { background: rgba(124, 111, 240, 0.2); color: #c4bfff; }
.cpc-contra-badge-hermera  { background: rgba(34, 211, 238, 0.15); color: #67e8f9; }
.cpc-contra-badge-veracita { background: rgba(245, 158, 11, 0.15);  color: #fcd34d; }
.cpc-contra-badge-verdara  { background: rgba(34, 197, 94, 0.15);   color: #86efac; }

.cpc-contra-arrow {
    color: #ef4444;
    font-size: 12px;
    align-self: center;
}

.cpc-contra-title {
    font-weight: 600;
    color: var(--ip-text, #e0e0e0);
    flex: 1;
    min-width: 120px;
}

.cpc-contra-note {
    font-size: 10px;
    color: #fca5a5;
    width: 100%;
    margin-top: 2px;
    line-height: 1.5;
}

/* ── Summary / master action bar ────────────────────────────────────────── */

.cpc-summary-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--vc-border, rgba(150, 145, 175, 0.15));
    flex-wrap: wrap;
}

.cpc-summary-credits {
    font-size: 12px;
    font-weight: 600;
    color: var(--ip-text, #e0e0e0);
}

.cpc-summary-time {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
}

.cpc-summary-partial {
    font-size: 11px;
    color: #fcd34d;
    padding: 2px 8px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 20px;
}

.cpc-summary-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: auto;
}

.cpc-btn-abort {
    padding: 6px 13px;
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 6px;
    color: #f87171;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.13s;
}

.cpc-btn-abort:hover {
    background: rgba(239, 68, 68, 0.1);
}

.cpc-btn-partial {
    padding: 6px 13px;
    background: transparent;
    border: 1px solid rgba(124, 111, 240, 0.4);
    border-radius: 6px;
    color: #c4bfff;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.13s;
}

.cpc-btn-partial:hover {
    background: rgba(124, 111, 240, 0.1);
}

.cpc-btn-approve-all {
    padding: 7px 18px;
    background: var(--ip-accent, #7c6ff0);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.13s;
    box-shadow: 0 2px 8px rgba(124, 111, 240, 0.35);
}

.cpc-btn-approve-all:hover {
    background: #6a5de0;
}

/* ── Evidence cockpit tabs ───────────────────────────────────────────────── */

.cpc-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--vc-border, rgba(150, 145, 175, 0.2));
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.cpc-tab {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 500;
    background: transparent;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 5px 5px 0 0;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-family: inherit;
    transition: color 0.13s, background 0.13s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.cpc-tab:hover {
    color: var(--ip-text, #e0e0e0);
    background: rgba(255, 255, 255, 0.04);
}

.cpc-tab-active {
    color: var(--ip-text, #e0e0e0);
    background: rgba(124, 111, 240, 0.1);
    border-color: var(--vc-border, rgba(150, 145, 175, 0.25));
}

/* Tab accent colors per product */
.cpc-tab.cpc-col-legal.cpc-tab-active   { border-top: 2px solid #7c6ff0; }
.cpc-tab.cpc-col-people.cpc-tab-active  { border-top: 2px solid #22d3ee; }
.cpc-tab.cpc-col-claims.cpc-tab-active  { border-top: 2px solid #f59e0b; }
.cpc-tab.cpc-col-esg.cpc-tab-active     { border-top: 2px solid #22c55e; }

.cpc-tab-count {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
}

.cpc-tab-gap-badge {
    font-size: 9px;
    padding: 1px 5px;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 10px;
    color: #fca5a5;
}

/* ── Evidence tab content ────────────────────────────────────────────────── */

.cpc-tab-content {
    min-height: 80px;
    margin-bottom: 12px;
}

.cpc-ev-tab-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cpc-ev-empty {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
    font-style: italic;
    padding: 12px 0;
}

.cpc-ev-gaps {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
}

.cpc-ev-gap {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
}

.cpc-ev-gap-high   { background: rgba(239, 68, 68, 0.1);  border: 1px solid rgba(239, 68, 68, 0.3);  }
.cpc-ev-gap-medium { background: rgba(245, 158, 11, 0.08); border: 1px solid rgba(245, 158, 11, 0.25); }
.cpc-ev-gap-low    { background: rgba(107, 114, 128, 0.06); border: 1px solid rgba(107, 114, 128, 0.2); }

.cpc-ev-gap-type {
    font-weight: 600;
    color: var(--ip-text, #e0e0e0);
    text-transform: capitalize;
    white-space: nowrap;
}

.cpc-ev-gap-desc {
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.5;
}

.cpc-ev-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 280px;
    overflow-y: auto;
}

.cpc-ev-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--vc-border, rgba(150, 145, 175, 0.15));
    border-radius: 6px;
    padding: 8px 10px;
}

.cpc-ev-item.cpc-ev-conflict {
    border-color: rgba(239, 68, 68, 0.45);
    background: rgba(239, 68, 68, 0.06);
}

.cpc-ev-item-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--ip-text, #e0e0e0);
    margin-bottom: 3px;
}

.cpc-ev-conflict-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 1px 6px;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
    border-radius: 4px;
    color: #fca5a5;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 3px;
}

.cpc-ev-snippet {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.5;
}

/* ── Evidence action bar (per-product approve row) ──────────────────────── */

.cpc-evidence-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--vc-border, rgba(150, 145, 175, 0.15));
    flex-wrap: wrap;
}

.cpc-ev-product-action {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border: 1px solid var(--vc-border, rgba(150, 145, 175, 0.2));
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.02);
    transition: border-color 0.15s;
}

.cpc-ev-product-action.cpc-ev-action-approved {
    border-color: rgba(34, 197, 94, 0.4);
    background: rgba(34, 197, 94, 0.06);
}

.cpc-ev-product-action.cpc-ev-action-skipped {
    border-color: rgba(107, 114, 128, 0.3);
    opacity: 0.6;
}

.cpc-ev-product-name {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
}

.cpc-ev-btn-approve,
.cpc-ev-btn-skip {
    padding: 3px 8px;
    font-size: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.13s;
}

.cpc-ev-btn-approve {
    background: rgba(124, 111, 240, 0.15);
    border: 1px solid rgba(124, 111, 240, 0.4);
    color: #c4bfff;
}

.cpc-ev-btn-approve:hover {
    background: rgba(124, 111, 240, 0.28);
}

.cpc-ev-btn-skip {
    background: transparent;
    border: 1px solid rgba(150, 145, 175, 0.25);
    color: rgba(255, 255, 255, 0.4);
}

.cpc-ev-btn-skip:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.65);
}

/* ── Skeleton cockpit ────────────────────────────────────────────────────── */

.cpc-skeleton-wrapper {
    margin-bottom: 14px;
}

.cpc-skeleton-header-row {
    display: flex;
    gap: 6px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 5px 5px 0 0;
    border-bottom: 1px solid var(--vc-border, rgba(150, 145, 175, 0.2));
    margin-bottom: 4px;
}

.cpc-skeleton-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 4px;
    border-bottom: 1px solid var(--vc-border, rgba(150, 145, 175, 0.1));
}

.cpc-skeleton-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.cpc-skel-col {
    flex: 1;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
}

.cpc-skel-col-title {
    flex: 2;
    text-align: left;
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cpc-skel-title-input {
    flex: 2;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    color: var(--ip-text, #e0e0e0);
    font-size: 12px;
    padding: 3px 6px;
    font-family: inherit;
    transition: border-color 0.15s;
}

.cpc-skel-title-input:focus {
    outline: none;
    border-color: var(--ip-accent, #7c6ff0);
    background: rgba(255, 255, 255, 0.03);
}

.cpc-skel-cell {
    font-size: 10px;
    text-align: center;
}

.cpc-skel-draws {
    color: #4ade80;
    font-weight: 600;
}

.cpc-skel-empty {
    color: rgba(255, 255, 255, 0.15);
}

.cpc-skel-remove {
    padding: 2px 6px;
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 4px;
    color: #f87171;
    font-size: 10px;
    cursor: pointer;
    font-family: inherit;
    opacity: 0.6;
    transition: opacity 0.13s;
}

.cpc-skel-remove:hover {
    opacity: 1;
}

.cpc-skel-add {
    margin-top: 8px;
    padding: 5px 12px;
    background: rgba(124, 111, 240, 0.08);
    border: 1px dashed rgba(124, 111, 240, 0.35);
    border-radius: 5px;
    color: rgba(124, 111, 240, 0.8);
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
    width: 100%;
    transition: background 0.13s;
}

.cpc-skel-add:hover {
    background: rgba(124, 111, 240, 0.14);
}

/* Per-product skeleton column header accents */
.cpc-skel-col.cpc-col-legal   { color: rgba(124, 111, 240, 0.8); }
.cpc-skel-col.cpc-col-people  { color: rgba(34, 211, 238, 0.8);  }
.cpc-skel-col.cpc-col-claims  { color: rgba(245, 158, 11, 0.8);  }
.cpc-skel-col.cpc-col-esg     { color: rgba(34, 197, 94, 0.8);   }

/* ── Toast notifications ─────────────────────────────────────────────────── */

.cpc-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    background: #1e1c38;
    border: 1px solid rgba(124, 111, 240, 0.4);
    border-radius: 8px;
    color: var(--ip-text, #e0e0e0);
    font-size: 12px;
    padding: 10px 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    animation: cpc-toast-in 0.2s ease;
    max-width: 360px;
}

.cpc-toast-error {
    border-color: rgba(239, 68, 68, 0.5);
    background: #2a1a1a;
    color: #fca5a5;
}

@keyframes cpc-toast-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
