/* App-specific tweaks on top of Tailwind (app.css). */

/* ScanSession/Details: explicit spacing in count pill (doesn't rely on Tailwind utilities being present). */
.auditv2-summary-count-sep {
    margin: 0 0.5rem;
    opacity: 0.7;
}

/* ScanSession/Details: Assessment Insight tone + state count pills */
.auditv2-side-copy-clear {
    color: #065f46; /* emerald-800 */
}

.auditv2-side-copy-neutral {
    color: #525252; /* neutral-600-ish */
}

.auditv2-side-copy-warn {
    color: #92400e; /* amber-800 */
}

.auditv2-side-copy-hit {
    color: #991b1b; /* red-800 */
}

/* ScanSession/Details: At a Glance — status pill beside section title */
.auditv2-side-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem 0.75rem;
    margin-bottom: 0.65rem;
}

    .auditv2-side-section-head .auditv2-card-title {
        margin-bottom: 0;
    }

.auditv2-side-result-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 9999px;
    padding: 0.38rem 0.8rem 0.38rem 0.58rem;
    border-width: 1px;
    border-style: solid;
    line-height: 1.2;
}

.auditv2-side-result-pill__dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.auditv2-side-result-pill__text {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.auditv2-side-result-pill--clear {
    background: #ecfdf5;
    border-color: #6ee7b7;
}

    .auditv2-side-result-pill--clear .auditv2-side-result-pill__dot {
        background: #10b981;
    }

    .auditv2-side-result-pill--clear .auditv2-side-result-pill__text {
        color: #065f46;
    }

.auditv2-side-result-pill--hit {
    background: #fef2f2;
    border-color: #fca5a5;
}

    .auditv2-side-result-pill--hit .auditv2-side-result-pill__dot {
        background: #ef4444;
    }

    .auditv2-side-result-pill--hit .auditv2-side-result-pill__text {
        color: #991b1b;
    }

.auditv2-pep-state-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.auditv2-pep-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    padding: 0.2rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.auditv2-pep-pill-active {
    background: #fee2e2; /* red-100 */
    color: #991b1b; /* red-800 */
}

.auditv2-pep-pill-former {
    background: #fef3c7; /* amber-100 */
    color: #92400e; /* amber-800 */
}

.auditv2-pep-pill-fp {
    background: #f5f5f5; /* neutral-100 */
    color: #404040; /* neutral-700 */
}

.auditv2-pep-pill-classified {
    background: #cffafe; /* cyan-100 */
    color: #0e7490; /* cyan-700 */
}

/* ScanSession/Details: Assessment Insight header */
.auditv2-insight-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0.25rem 0 0.5rem;
}

.auditv2-insight-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    padding: 0.15rem 0.55rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.auditv2-insight-badge-clear {
    background: #d1fae5; /* emerald-100 */
    color: #065f46; /* emerald-800 */
}

.auditv2-insight-badge-hit {
    background: #fee2e2; /* red-100 */
    color: #991b1b; /* red-800 */
}

.auditv2-insight-badge-muted {
    background: #f5f5f5; /* neutral-100 */
    color: #525252; /* neutral-600 */
}

.auditv2-insight-factors {
    margin-top: 0.55rem;
    display: grid;
    gap: 0.45rem;
}

.auditv2-insight-factor {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.65rem;
    padding: 0.45rem 0.55rem;
    background: #ffffff;
}

.auditv2-insight-factor-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.auditv2-insight-factor-title {
    font-size: 0.78rem;
    font-weight: 800;
    color: #171717;
}

.auditv2-insight-factor-msg {
    margin: 0.3rem 0 0;
    font-size: 0.8rem;
    line-height: 1.3;
    color: #404040;
}

/* ScanSession/Details: Assessment Insight — inspired header + factor rows */
.auditv2-assessment-insight {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

    /* Panel matches padded content width of the section (no horizontal bleed — avoids sidebar overflow). */
    .auditv2-assessment-insight .auditv2-insight-panel {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        box-sizing: border-box;
    }

.auditv2-insight-panel {
    margin-top: 0;
    border-radius: 0;
    border: 1px solid #e5e5e5;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    max-width: 100%;
}

.auditv2-insight-panel__body {
    background: #ffffff;
    max-width: 100%;
    min-width: 0;
}

.auditv2-assessment-insight .auditv2-insight-row-v2 {
    padding: 0.65rem 0.75rem;
}

.auditv2-insight-row-v2 {
    padding: 0.85rem 1rem;
    border-top: 1px solid #f0f0f0;
    box-sizing: border-box;
    min-width: 0;
}

.auditv2-insight-panel__body > .auditv2-insight-row-v2:first-child {
    border-top: 0;
}

.auditv2-insight-row-v2__top {
    display: flex;
    align-items: center;
    min-width: 0;
}

.auditv2-insight-row-v2__lead {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.45rem;
    min-width: 0;
}

/* Category = plain label; CLEAR | HIT | … = pill */
.auditv2-insight-cat-label {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #171717;
    line-height: 1.2;
}

.auditv2-insight-status-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    padding: 0.2rem 0.55rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid transparent;
    line-height: 1.2;
}

.auditv2-insight-status-pill--clear {
    background: #d1fae5;
    color: #065f46;
    border-color: rgba(16, 185, 129, 0.35);
}

.auditv2-insight-status-pill--hit {
    background: #fce7f3;
    color: #9d174d;
    border-color: rgba(236, 72, 153, 0.35);
}

.auditv2-insight-status-pill--muted {
    background: #fef9c3;
    color: #854d0e;
    border-color: rgba(234, 179, 8, 0.45);
}

.auditv2-insight-row-v2__desc {
    margin: 0.45rem 0 0;
    padding-right: 0.25rem;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #737373;
    overflow-wrap: anywhere;
}

.auditv2-insight-kicker {
    font-size: 0.75rem;
    color: #737373; /* neutral-500 */
}

.auditv2-insight-subcopy {
    margin: 0.5rem 0 0;
    font-size: 0.8rem;
    color: #525252; /* neutral-600 */
    line-height: 1.4;
}

/* ScanSession/Details: PEP tabs (match main auditv2 tab bar) */
.pep-tabs {
    margin: 0.25rem 0 0.75rem;
}

    .pep-tabs .auditv2-tab {
        width: 100%;
        text-align: center;
        line-height: 1.2;
    }

/* ScanSession/Details: PEP + screening metrics card (scroll list only) */
.auditv2-pep-screening-scroll {
    display: flex;
    min-height: 0;
    flex-direction: column;
    height: 52dvh;
}

    .auditv2-pep-screening-scroll .auditv2-summary-indicators-body {
        flex: 1 1 auto;
        min-height: 0;
    }

.auditv2-pep-screening-top {
    flex: 0 0 auto;
}

.auditv2-summary-head-tight {
    margin-top: 0.75rem;
}

.auditv2-screening-metrics {
    margin-top: 0.75rem;
}

    .auditv2-screening-metrics > div > strong {
        margin-top: 0.15rem;
    }

.auditv2-screening-metric-sub {
    margin-top: 0.35rem;
    display: grid;
    gap: 0.2rem;
    font-size: 0.72rem;
    color: #525252;
    line-height: 1.25;
}

.auditv2-screening-jump {
    margin-top: 0.45rem;
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    font-size: 0.78rem;
    font-weight: 700;
    color: #0e7490; /* cyan-700 */
    text-decoration: underline;
    cursor: pointer;
}

    .auditv2-screening-jump:hover {
        color: #155e75; /* cyan-800-ish */
    }

.auditv2-screening-banner {
    margin-top: 0.45rem;
    border-radius: 0.65rem;
    padding: 0.45rem 0.55rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

    .auditv2-screening-banner.is-clear {
        background: rgba(209, 250, 229, 0.55); /* emerald-100-ish */
    }

    .auditv2-screening-banner.is-hit {
        background: rgba(254, 226, 226, 0.55); /* red-100-ish */
    }

.auditv2-screening-banner-title {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #404040;
}

.auditv2-screening-banner-value {
    margin-top: 0.15rem;
    font-size: 0.95rem;
    font-weight: 900;
}

.auditv2-screening-banner.is-clear .auditv2-screening-banner-value {
    color: #065f46;
}

.auditv2-screening-banner.is-hit .auditv2-screening-banner-value {
    color: #991b1b;
}

/* ScanSession/Details: Enhanced HIT summary in sidebar */
.auditv2-hit-summary {
    margin: 0.75rem 0 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(254, 226, 226, 0.35); /* red-100-ish */
}

.auditv2-hit-summary-title {
    font-size: 0.75rem;
    font-weight: 800;
    color: #991b1b; /* red-800 */
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auditv2-hit-summary-list {
    margin-top: 0.5rem;
    display: grid;
    gap: 0.5rem;
}

.auditv2-hit-summary-item {
    width: 100%;
    text-align: left;
    appearance: none;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #ffffff;
    border-radius: 0.65rem;
    padding: 0.45rem 0.6rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #7f1d1d; /* red-900-ish */
    cursor: pointer;
}

    .auditv2-hit-summary-item:hover {
        background: rgba(0, 0, 0, 0.02);
    }

.nav-toolbar .toolbar-button--primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 8px;
    background: var(--teal);
    color: #fff !important;
    font-weight: 600;
    text-decoration: none;
    line-height: 1;
    border: 1px solid var(--teal);
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}

    .nav-toolbar .toolbar-button--primary:hover {
        background: var(--teal-mid);
        border-color: var(--teal-mid);
        color: #fff !important;
        text-decoration: none;
    }

    .nav-toolbar .toolbar-button--primary:active {
        transform: scale(0.98);
    }