﻿/* =============================================================================
   HumanCapital — Platform Owner Dashboard
   File: wwwroot/css/platform-owner-dashboard.css

   Extends site2.css tokens. Uses navy (#002868), Cormorant Garamond display,
   DM Sans body. Adds severity accents (red / amber) tuned to the existing
   tonal range.
   ============================================================================= */

:root {
    /* Extend existing --navy / --navy-pale with severity tokens */
    --po-red: #A01932; /* critical — sits next to navy without clashing */
    --po-red-pale: #FBECEF;
    --po-amber: #B27A1A; /* high — editorial tone, not highlighter yellow */
    --po-amber-pale: #FBF3E1;
    --po-green: #1B6B47; /* healthy — muted institutional green */
    --po-green-pale: #E8F2EC;
    /* Surface colour for panels — slightly warm off-white */
    --po-panel-bg: #FDFDFE;
    --po-panel-rule: rgba(0, 40, 104, 0.08);
    --po-panel-hover: #F7F9FD;
    /* Mono stack for numbers — inherits from system, no font loaded */
    --font-mono: 'SF Mono', ui-monospace, Menlo, Consolas, monospace;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SHELL
   ═══════════════════════════════════════════════════════════════════════════ */

.po-shell {
    padding: clamp(24px, 3vw, 40px) clamp(16px, 3vw, 32px) 48px;
    max-width: 1440px;
    margin: 0 auto;
    background: var(--bg);
    min-height: calc(100vh - var(--nav-h));
}

/* ── HEADLINE ──────────────────────────────────────────────────── */

.po-headline {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    padding-bottom: 16px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--navy);
    flex-wrap: wrap;
}

.po-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3.5vw, 2.75rem);
    font-weight: 600;
    color: var(--text);
    line-height: 1.1;
    letter-spacing: -0.01em;
    margin: 0;
}

    .po-title em {
        font-style: italic;
        color: var(--navy-mid);
        font-weight: 500;
    }

.po-headline-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.po-live {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-mid);
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.02em;
}

.po-live-dot {
    width: 7px;
    height: 7px;
    background: var(--po-green);
    border-radius: 50%;
    animation: po-pulse 2.2s ease-in-out infinite;
}

.po-live-text {
    color: var(--po-green);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.7rem;
}

.po-live-sep {
    color: var(--text-muted);
}

.po-refresh {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-style: italic;
}

@keyframes po-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.35;
        transform: scale(0.7);
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   KPI STRIP
   ═══════════════════════════════════════════════════════════════════════════ */

.po-kpi-strip {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

@media (max-width: 900px) {
    .po-kpi-strip {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .po-kpi-strip {
        grid-template-columns: 1fr;
    }
}

.po-kpi {
    background: var(--po-panel-bg);
    padding: 18px 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.po-kpi--warn {
    background: var(--po-red-pale);
}

    .po-kpi--warn .po-kpi-value {
        color: var(--po-red);
    }

.po-kpi-value {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 600;
    color: var(--navy);
    line-height: 1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.po-kpi-sub {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
    margin: 0 2px;
}

.po-kpi-label {
    font-size: 0.72rem;
    color: var(--text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════════════════
   GRID
   ═══════════════════════════════════════════════════════════════════════════ */

.po-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.po-panel--span1 {
    grid-column: span 2;
}

.po-panel--span2 {
    grid-column: span 3;
}

.po-panel--span3 {
    grid-column: span 6;
}

@media (max-width: 1200px) {
    .po-panel--span1 {
        grid-column: span 3;
    }

    .po-panel--span2 {
        grid-column: span 3;
    }

    .po-panel--span3 {
        grid-column: span 6;
    }
}

@media (max-width: 760px) {
    .po-grid {
        grid-template-columns: 1fr;
    }

    .po-panel--span1,
    .po-panel--span2,
    .po-panel--span3 {
        grid-column: span 1;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PANEL
   ═══════════════════════════════════════════════════════════════════════════ */

.po-panel {
    background: var(--po-panel-bg);
    border: 1px solid var(--po-panel-rule);
    border-radius: 12px;
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
}

.po-panel-head {
    margin-bottom: 16px;
}

.po-panel-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
    letter-spacing: -0.005em;
    margin: 0 0 4px;
}

    .po-panel-title em {
        font-style: italic;
        color: var(--navy-mid);
        font-weight: 500;
    }

.po-panel-sub {
    font-size: 0.8rem;
    color: var(--text-subtle);
    margin: 0;
    font-weight: 300;
    line-height: 1.5;
}

.po-panel-foot {
    margin-top: auto;
    padding-top: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--po-panel-rule);
    font-size: 0.75rem;
}

.po-panel-foot-meta {
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.po-panel-foot-link {
    color: var(--navy);
    text-decoration: none;
    font-weight: 500;
    letter-spacing: 0.02em;
}

    .po-panel-foot-link:hover {
        text-decoration: underline;
    }

/* ═══════════════════════════════════════════════════════════════════════════
   CYCLE HISTOGRAM (staggered cycles)
   ═══════════════════════════════════════════════════════════════════════════ */

.po-cycle-histogram {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2px;
    align-items: end;
    min-height: 180px;
    padding-top: 12px;
}

@media (max-width: 900px) {
    .po-cycle-histogram {
        grid-template-columns: repeat(6, 1fr);
        row-gap: 24px;
    }
}

@media (max-width: 480px) {
    .po-cycle-histogram {
        grid-template-columns: repeat(4, 1fr);
    }
}

.po-bucket {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    min-height: 160px;
    color: inherit;
    position: relative;
}

    .po-bucket:hover .po-bucket-bar {
        transform: scaleY(1.04);
        transform-origin: bottom;
    }

    .po-bucket:hover .po-bucket-count {
        color: var(--navy);
    }

    .po-bucket:focus {
        outline: none;
    }

    .po-bucket:focus-visible .po-bucket-bar {
        outline: 2px solid var(--navy);
        outline-offset: 2px;
    }

.po-bucket-count {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    transition: color .15s;
}

.po-bucket-count--zero {
    color: var(--text-muted);
    font-weight: 400;
}

.po-bucket-bar {
    width: 70%;
    min-height: 2px;
    background: var(--navy-mid);
    border-radius: 2px 2px 0 0;
    transition: transform .2s ease;
}

.po-bucket-bar--intake {
    background: #7B8AB0;
}

.po-bucket-bar--calc {
    background: #4E6BA5;
}

.po-bucket-bar--recon {
    background: var(--po-amber);
}

.po-bucket-bar--approve {
    background: var(--navy-mid);
}

.po-bucket-bar--output {
    background: var(--navy);
}

.po-bucket-bar--post {
    background: var(--po-green);
}

.po-bucket-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-mid);
    letter-spacing: 0.04em;
    font-weight: 500;
    padding-top: 6px;
    border-top: 1px solid var(--border);
    width: 100%;
    text-align: center;
}

.po-bucket--today .po-bucket-label {
    color: var(--navy);
    font-weight: 600;
    border-top-color: var(--navy);
}

.po-bucket--today::after {
    content: "today";
    position: absolute;
    bottom: -18px;
    font-size: 0.6rem;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.po-cycle-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 40px;
    padding-top: 14px;
    border-top: 1px solid var(--po-panel-rule);
    font-size: 0.75rem;
    color: var(--text-subtle);
}

    .po-cycle-legend span {
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

.po-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.po-dot--intake {
    background: #7B8AB0;
}

.po-dot--calc {
    background: #4E6BA5;
}

.po-dot--recon {
    background: var(--po-amber);
}

.po-dot--approve {
    background: var(--navy-mid);
}

.po-dot--output {
    background: var(--navy);
}

.po-dot--post {
    background: var(--po-green);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ATTENTION LIST
   ═══════════════════════════════════════════════════════════════════════════ */

.po-attention {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}

.po-attention-item {
    display: grid;
    grid-template-columns: 24px 1fr auto;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--po-panel-rule);
    cursor: pointer;
    transition: background .15s;
    align-items: start;
}

    .po-attention-item:last-child {
        border-bottom: none;
    }

    .po-attention-item:hover {
        background: var(--po-panel-hover);
    }

    .po-attention-item:focus-visible {
        outline: 2px solid var(--navy);
        outline-offset: -2px;
    }

.po-sev {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 6px;
}

.po-sev--critical {
    background: var(--po-red);
}

.po-sev--high {
    background: var(--po-amber);
}

.po-sev--medium {
    background: #C9A24E;
}

.po-sev--low {
    background: var(--text-muted);
}

.po-sev--critical.po-sev--pulse {
    animation: po-dotpulse 1.6s infinite;
}

@keyframes po-dotpulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(160, 25, 50, 0.6);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(160, 25, 50, 0);
    }
}

.po-attention-client {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.25;
    letter-spacing: -0.005em;
}

.po-attention-reason {
    font-size: 0.85rem;
    color: var(--text-mid);
    line-height: 1.5;
    margin-top: 3px;
    font-weight: 300;
}

.po-attention-meta {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-top: 6px;
}

.po-attention-action {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding-top: 6px;
    white-space: nowrap;
}

    .po-attention-action::after {
        content: " \2192";
    }

/* ═══════════════════════════════════════════════════════════════════════════
   WORKFLOW GRID
   ═══════════════════════════════════════════════════════════════════════════ */

.po-workflow-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 2px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

@media (max-width: 900px) {
    .po-workflow-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .po-workflow-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.po-wf {
    background: var(--po-panel-bg);
    padding: 14px 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 78px;
    cursor: pointer;
    border: none;
    text-align: left;
    font-family: inherit;
    color: inherit;
    transition: background .15s;
}

    .po-wf:hover {
        background: var(--po-panel-hover);
    }

    .po-wf:focus-visible {
        outline: 2px solid var(--navy);
        outline-offset: -2px;
    }

.po-wf-count {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.po-wf-label {
    font-size: 0.72rem;
    color: var(--text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.po-wf--flagged .po-wf-count {
    color: var(--po-red);
}

.po-wf--flagged {
    background: var(--po-red-pale);
}

.po-wf--warn .po-wf-count {
    color: var(--po-amber);
}

.po-wf--good .po-wf-count {
    color: var(--po-green);
}

.po-wf--zero .po-wf-count {
    color: var(--text-muted);
    font-weight: 400;
}

.po-wf--zero {
    cursor: default;
    opacity: 0.6;
}

    .po-wf--zero:hover {
        background: var(--po-panel-bg);
    }

/* ═══════════════════════════════════════════════════════════════════════════
   COMPLIANCE TABLE
   ═══════════════════════════════════════════════════════════════════════════ */

.po-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

    .po-table th {
        font-size: 0.7rem;
        font-weight: 500;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.06em;
        padding: 6px 8px 10px;
        text-align: right;
        border-bottom: 1px solid var(--navy);
        font-family: var(--font-body);
    }

        .po-table th:first-child {
            text-align: left;
        }

    .po-table td {
        padding: 10px 8px;
        font-family: var(--font-mono);
        font-variant-numeric: tabular-nums;
        text-align: right;
        border-bottom: 1px solid var(--po-panel-rule);
    }

        .po-table td:first-child {
            font-family: var(--font-body);
            text-align: left;
            font-weight: 500;
            color: var(--text);
        }

    .po-table tr:last-child td {
        border-bottom: none;
    }

    .po-table tr {
        cursor: pointer;
        transition: background .15s;
    }

    .po-table tbody tr:hover {
        background: var(--po-panel-hover);
    }

.po-c-ok {
    color: var(--po-green);
    font-weight: 600;
}

.po-c-due {
    color: var(--po-amber);
    font-weight: 600;
}

.po-c-miss {
    color: var(--po-red);
    font-weight: 600;
}

.po-rule-meta {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed var(--po-panel-rule);
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-subtle);
}

    .po-rule-meta b {
        color: var(--text);
        font-weight: 600;
    }

.po-pending {
    color: var(--po-amber);
}

/* ═══════════════════════════════════════════════════════════════════════════
   FINANCIAL
   ═══════════════════════════════════════════════════════════════════════════ */

.po-fin-primary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--po-panel-rule);
}

@media (max-width: 480px) {
    .po-fin-primary {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

.po-fin-label {
    font-size: 0.72rem;
    color: var(--text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 500;
    margin-bottom: 4px;
}

.po-fin-value {
    font-family: var(--font-display);
    font-size: 1.65rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.po-fin-ccy {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    margin-right: 6px;
}

.po-fin-spark {
    width: 100%;
    height: 44px;
    margin: 12px 0;
}

.po-fin-list {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.po-fin-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 10px 0;
    border-bottom: 1px solid var(--po-panel-rule);
}

    .po-fin-row:last-child {
        border-bottom: none;
    }

    .po-fin-row dt {
        font-size: 0.82rem;
        color: var(--text-mid);
        font-weight: 400;
    }

    .po-fin-row dd {
        margin: 0;
        font-family: var(--font-mono);
        font-size: 0.95rem;
        color: var(--text);
        font-weight: 500;
        font-variant-numeric: tabular-nums;
    }

.po-delta {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    margin-left: 8px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.po-delta--up {
    color: var(--po-green);
}

.po-delta--down {
    color: var(--po-red);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ANOMALY GRID
   ═══════════════════════════════════════════════════════════════════════════ */

.po-anomaly-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

@media (max-width: 900px) {
    .po-anomaly-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .po-anomaly-grid {
        grid-template-columns: 1fr;
    }
}

.po-anomaly {
    background: var(--po-panel-bg);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    transition: background .15s;
    border: none;
    text-align: left;
    font-family: inherit;
    color: inherit;
}

    .po-anomaly:hover {
        background: var(--po-panel-hover);
    }

    .po-anomaly:focus-visible {
        outline: 2px solid var(--navy);
        outline-offset: -2px;
    }

.po-anomaly--zero {
    cursor: default;
}

    .po-anomaly--zero:hover {
        background: var(--po-panel-bg);
    }

.po-anomaly-count {
    font-family: var(--font-display);
    font-size: 1.85rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.po-anomaly--zero .po-anomaly-count {
    color: var(--po-green);
}

.po-anomaly--low .po-anomaly-count {
    color: var(--po-amber);
}

.po-anomaly--high .po-anomaly-count {
    color: var(--po-red);
}

.po-anomaly-label {
    font-size: 0.72rem;
    color: var(--text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    margin-top: 4px;
    line-height: 1.35;
}

.po-anomaly-note {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 4px;
    line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PORTFOLIO
   ═══════════════════════════════════════════════════════════════════════════ */

.po-portfolio {
    margin: 0;
    padding: 0;
}

.po-portfolio-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 9px 0;
    border-bottom: 1px solid var(--po-panel-rule);
}

    .po-portfolio-row:last-child {
        border-bottom: none;
    }

    .po-portfolio-row dt {
        font-size: 0.82rem;
        color: var(--text-mid);
        margin: 0;
    }

    .po-portfolio-row dd {
        margin: 0;
        font-family: var(--font-mono);
        font-size: 0.95rem;
        font-weight: 500;
        color: var(--text);
        font-variant-numeric: tabular-nums;
    }

.po-portfolio-warn {
    color: var(--po-amber);
}

.po-capacity {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--po-panel-rule);
}

.po-capacity-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-subtle);
    letter-spacing: 0.04em;
    margin-bottom: 8px;
    text-transform: uppercase;
    font-weight: 500;
}

    .po-capacity-label b {
        color: var(--navy);
        font-family: var(--font-mono);
        font-weight: 600;
    }

.po-capacity-bar {
    position: relative;
    height: 6px;
    background: var(--navy-pale);
    border-radius: 3px;
    overflow: visible;
}

.po-capacity-fill {
    height: 100%;
    background: var(--navy);
    border-radius: 3px;
    max-width: 100%;
}

.po-capacity-marker {
    position: absolute;
    top: -3px;
    width: 2px;
    height: 12px;
    background: var(--text);
    transform: translateX(-1px);
}

.po-capacity-rule {
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   TICKER
   ═══════════════════════════════════════════════════════════════════════════ */

.po-ticker {
    background: var(--navy);
    color: rgba(255, 255, 255, 0.85);
    border-radius: 10px;
    padding: 10px 0;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.po-ticker-track {
    display: inline-block;
    animation: po-ticker-scroll 90s linear infinite;
    padding-left: 100%;
}

    .po-ticker-track span {
        margin-right: 48px;
        color: rgba(255, 255, 255, 0.65);
    }

    .po-ticker-track b {
        color: var(--white);
        font-weight: 600;
    }

.po-t-warn {
    color: #FFBFB0 !important;
}

@keyframes po-ticker-scroll {
    from {
        transform: translate3d(0, 0, 0);
    }

    to {
        transform: translate3d(-100%, 0, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .po-ticker-track {
        animation: none;
        padding-left: 0;
        white-space: normal;
        display: block;
    }

        .po-ticker-track span {
            display: block;
            margin: 4px 16px;
        }
}

/* ═══════════════════════════════════════════════════════════════════════════
   DRILL-DOWN SLIDE-OVER
   ═══════════════════════════════════════════════════════════════════════════ */

.po-drill {
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
    opacity: 0;
    transition: opacity .25s ease;
}

    .po-drill[aria-hidden="false"] {
        pointer-events: auto;
        opacity: 1;
    }

.po-drill-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 18, 38, 0.4);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.po-drill-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(600px, 100%);
    background: var(--bg);
    border-left: 1px solid var(--navy);
    box-shadow: -12px 0 40px rgba(0, 40, 104, 0.12);
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.2,.9,.3,1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.po-drill[aria-hidden="false"] .po-drill-panel {
    transform: translateX(0);
}

.po-drill-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 24px 28px 20px;
    border-bottom: 1px solid var(--po-panel-rule);
}

.po-drill-eyebrow {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 6px;
}

.po-drill-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.po-drill-meta {
    margin-top: 6px;
    font-size: 0.82rem;
    color: var(--text-subtle);
    font-weight: 300;
}

.po-drill-close {
    background: none;
    border: 1px solid var(--border-mid);
    border-radius: 6px;
    width: 34px;
    height: 34px;
    font-size: 1.25rem;
    color: var(--text-mid);
    cursor: pointer;
    line-height: 1;
    flex-shrink: 0;
    transition: background .15s, color .15s;
}

    .po-drill-close:hover {
        background: var(--navy-pale);
        color: var(--navy);
    }

.po-drill-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 28px 28px;
}

/* Drill-down client list */
.po-drill-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.po-drill-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 14px 0;
    border-bottom: 1px solid var(--po-panel-rule);
    cursor: pointer;
    transition: background .15s;
    align-items: center;
}

    .po-drill-item:hover {
        background: var(--po-panel-hover);
    }

    .po-drill-item:last-child {
        border-bottom: none;
    }

.po-drill-client {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
    margin-bottom: 3px;
}

.po-drill-sub {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.po-drill-status {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    background: var(--navy-pale);
    border: 1px solid var(--border-mid);
    border-radius: 100px;
    white-space: nowrap;
}

.po-drill-status--warn {
    color: var(--po-amber);
    background: var(--po-amber-pale);
    border-color: var(--po-amber);
}

.po-drill-status--crit {
    color: var(--po-red);
    background: var(--po-red-pale);
    border-color: var(--po-red);
}

.po-drill-status--ok {
    color: var(--po-green);
    background: var(--po-green-pale);
    border-color: var(--po-green);
}

.po-drill-empty {
    padding: 40px 0;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
}
