﻿/* ═══════════════════════════════════════════════════════════════════════════
   INTELLIGENCE SHELL — chrome shared by every workspace
   ═══════════════════════════════════════════════════════════════════════════
   Header, slot switcher, workspace tabs, stat strip, cards, verdict pills,
   error/empty states. Anything the shell page (intelligence.aspx) renders
   plus reusable building blocks (.card, .stat-strip, .v-pill) that any
   workspace control can use without redeclaring.

   Workspace-specific styles live in workspace-legacy.css (for the existing
   pattern) or workspace-pattern.css (for the new verdict/situation/play
   pattern).
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    --teal: #0D6B5E;
    --deep: #0A4A40;
    --ink2: #0D1C19;
    --light: #E8F5F2;
    --mid: #B8D8D2;
    --bordlt: #E5ECEA;
    --surf: #F7FAF9;
    --surf2: #F1F5F4;
    --text: #111827;
    --sub: #6B7280;
    --sub2: #9CA3AF;
    --crit: #DC2626;
    --warn: #EA580C;
    --med: #D97706;
}

* {
    box-sizing: border-box;
}

.intel-inner {
    max-width: 1240px;
    margin: 0 auto;
}

/* ═══ HEADER ═══════════════════════════════════════════════════════════ */

.intel-header {
    margin-bottom: 14px;
}

.intel-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--sub2);
    margin-bottom: 4px;
}

.intel-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.4px;
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.intel-business-badge {
    font-size: 14px;
    font-weight: 600;
    background: var(--light);
    color: var(--teal);
    padding: 4px 12px;
    border-radius: 100px;
    letter-spacing: 0;
}

.intel-sub {
    font-size: 13.5px;
    color: var(--sub);
    margin: 0;
}

    .intel-sub a {
        color: var(--teal);
        text-decoration: none;
        font-weight: 600;
    }

        .intel-sub a:hover {
            text-decoration: underline;
        }

/* ═══ SLOT SWITCHER (multi-URL users) ═══════════════════════════════════ */

.slot-switcher {
    display: flex;
    gap: 6px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.slot-tab {
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    background: #fff;
    border: 1.5px solid var(--bordlt);
    border-radius: 7px;
    color: var(--sub);
    text-decoration: none;
    cursor: pointer;
    transition: all .12s;
}

    .slot-tab:hover {
        border-color: var(--mid);
        color: var(--text);
    }

    .slot-tab.active {
        background: var(--ink2);
        color: #fff;
        border-color: var(--ink2);
    }

/* ═══ WORKSPACE TABS ═══════════════════════════════════════════════════ */

.ws-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    border-bottom: 1.5px solid var(--bordlt);
    overflow-x: auto;
    flex-wrap: nowrap;
}

.ws-tab {
    padding: 14px 20px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--sub);
    text-decoration: none;
    cursor: pointer;
    border-bottom: 2.5px solid transparent;
    margin-bottom: -1.5px;
    white-space: nowrap;
    transition: all .15s;
    display: flex;
    align-items: center;
    gap: 7px;
}

    .ws-tab:hover {
        color: var(--text);
    }

    .ws-tab.active {
        color: var(--teal);
        border-bottom-color: var(--teal);
    }

    .ws-tab .ws-soon {
        font-size: 9px;
        background: var(--surf2);
        color: var(--sub2);
        padding: 2px 7px;
        border-radius: 100px;
        font-weight: 700;
        letter-spacing: .04em;
        text-transform: uppercase;
    }

    .ws-tab.active .ws-soon {
        background: var(--light);
        color: var(--teal);
    }

/* ═══ STAT STRIP (4-card summary) ═══════════════════════════════════════ */

.stat-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.strip-card {
    background: #fff;
    border: 1.5px solid var(--bordlt);
    border-radius: 12px;
    padding: 16px 18px;
}

.strip-label {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--sub2);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 6px;
}

.strip-val {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.4px;
    line-height: 1.1;
}

.strip-sub {
    font-size: 11.5px;
    color: var(--sub);
    margin-top: 4px;
}

.strip-spark {
    height: 32px;
    margin-top: 6px;
}

/* ═══ GENERIC CARDS (reused everywhere) ═════════════════════════════════ */

.intel-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.card {
    background: #fff;
    border: 1.5px solid var(--bordlt);
    border-radius: 12px;
    padding: 22px 24px;
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 9px;
}

.card-ico {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.card-meta {
    font-size: 11.5px;
    color: var(--sub);
}

.card-full {
    grid-column: 1 / -1;
}

/* ═══ RED FLAGS (overview) ══════════════════════════════════════════════ */

.flag-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.flag-item {
    background: var(--surf);
    border: 1px solid var(--bordlt);
    border-radius: 9px;
    padding: 13px 16px;
    border-left: 4px solid var(--sub2);
}

    .flag-item.crit {
        border-left-color: var(--crit);
        background: #fef2f2;
    }

    .flag-item.high {
        border-left-color: var(--warn);
        background: #fff7ed;
    }

    .flag-item.med {
        border-left-color: var(--med);
    }

.flag-sev {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--sub2);
    margin-bottom: 3px;
}

.flag-item.crit .flag-sev {
    color: var(--crit);
}

.flag-item.high .flag-sev {
    color: var(--warn);
}

.flag-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 5px;
}

.flag-detail {
    font-size: 12.5px;
    color: var(--sub);
    line-height: 1.5;
}

/* ═══ SCAN FEED (overview) ══════════════════════════════════════════════ */

.scan-feed {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.scan-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 14px;
    background: var(--surf);
    border: 1px solid var(--bordlt);
    border-radius: 9px;
    text-decoration: none;
}

    .scan-row:hover {
        border-color: var(--mid);
        background: #fff;
    }

.scan-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--ink2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.scan-info {
    flex: 1;
    min-width: 0;
}

.scan-when {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.scan-trigger {
    font-size: 11.5px;
    color: var(--sub);
}

.scan-arrow {
    color: var(--sub2);
    font-size: 14px;
}

/* ═══ EMPTY / PLACEHOLDER STATES ═══════════════════════════════════════ */

.placeholder-pane {
    background: #fff;
    border: 1.5px solid var(--bordlt);
    border-radius: 14px;
    padding: 48px 32px;
    text-align: center;
}

    .placeholder-pane h3 {
        font-size: 18px;
        font-weight: 800;
        color: var(--text);
        margin: 0 0 8px;
    }

    .placeholder-pane p {
        font-size: 14px;
        color: var(--sub);
        margin: 0 auto 16px;
        max-width: 520px;
        line-height: 1.6;
    }

.placeholder-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin-top: 24px;
    text-align: left;
}

.placeholder-item {
    background: var(--surf);
    border: 1px solid var(--bordlt);
    border-radius: 9px;
    padding: 12px 14px;
    font-size: 12.5px;
    color: var(--text);
}

    .placeholder-item strong {
        display: block;
        font-size: 13px;
        color: var(--text);
        margin-bottom: 3px;
    }

.history-empty {
    background: var(--surf);
    border: 1px dashed var(--bordlt);
    border-radius: 9px;
    padding: 24px;
    text-align: center;
    font-size: 13px;
    color: var(--sub);
}

.text-empty {
    font-size: 13px;
    color: var(--sub2);
    font-style: italic;
    margin: 0;
}

/* ═══ VERDICT PILLS (used everywhere) ═══════════════════════════════════ */

.v-pill {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.v-strong, .v-positive {
    background: var(--light);
    color: var(--teal);
}

.v-moderate, .v-mixed {
    background: #fef9c3;
    color: #92400e;
}

.v-weak, .v-negative {
    background: #fef2f2;
    color: #991b1b;
}

/* ═══ PRIORITY / STATUS PILLS (used by multiple workspaces) ═════════════ */

.priority-pill {
    font-size: 10px;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

    .priority-pill.pri-high {
        background: #fef2f2;
        color: #991b1b;
    }

    .priority-pill.pri-mid {
        background: #fef9c3;
        color: #854d0e;
    }

    .priority-pill.pri-low {
        background: #f3f4f6;
        color: #4b5563;
    }

.status-pill {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

    .status-pill.stat-present {
        background: #dcfce7;
        color: #166534;
    }

    .status-pill.stat-absent {
        background: #fee2e2;
        color: #991b1b;
    }

    .status-pill.stat-unknown {
        background: #f3f4f6;
        color: #4b5563;
    }

/* ═══ RESPONSIVE ════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
    .stat-strip {
        grid-template-columns: repeat(2, 1fr);
    }

    .intel-grid {
        grid-template-columns: 1fr;
    }
}
