/*
 * ==============================================================================
 * Cash/Frontend/risk/cash_risk-styles.css — Risk & Deviations Dashboard (CC.5)
 * ==============================================================================
 * What:
 *     Page-specific styles for the Risk & Deviations alert dashboard.
 *     Extends the shared hex design system.
 *
 * Depends:
 *     /shared/css/hex-design-system.css
 *     /shared/css/hex-components.css
 *     /shared/css/hex-utilities.css
 * ==============================================================================
 */

/* ── Alert severity badges ───────────────────────────────────────────────── */
.sev-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.4px;
    white-space: nowrap;
    text-transform: uppercase;
}

.sev-critical {
    background: rgba(239, 68, 68, 0.18);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.40);
}

.sev-high {
    background: rgba(249, 115, 22, 0.18);
    color: #fb923c;
    border: 1px solid rgba(249, 115, 22, 0.40);
}

.sev-medium {
    background: rgba(234, 179, 8, 0.15);
    color: #facc15;
    border: 1px solid rgba(234, 179, 8, 0.35);
}

.sev-info {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.35);
}

/* ── Alert type chip ─────────────────────────────────────────────────────── */
.type-chip {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.2px;
    white-space: nowrap;
    background: rgba(99, 102, 241, 0.12);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.28);
}

/* ── Breach annotation banner ────────────────────────────────────────────── */
.breach-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 20px 8px;
    padding: 10px 16px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.28);
    border-left: 4px solid #ef4444;
    border-radius: 6px;
    color: #f87171;
    font-size: 13px;
    line-height: 1.5;
}

/* ── Calibration reference line annotation ───────────────────────────────── */
.calib-annotation {
    margin: 0 20px 10px;
    padding: 8px 14px;
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.18);
    border-radius: 4px;
    color: #94a3b8;
    font-size: 11px;
    line-height: 1.5;
}

/* ── Filter controls row ─────────────────────────────────────────────────── */
.alert-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 20px 14px;
    flex-wrap: wrap;
}

.alert-controls select,
.alert-controls input[type="date"] {
    background: var(--bg-card, #1a1f2e);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 4px;
    color: var(--text-primary, #e2e8f0);
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
}

/* ── Alert count headline ────────────────────────────────────────────────── */
.alert-headline {
    display: flex;
    gap: 18px;
    margin: 0 20px 16px;
    flex-wrap: wrap;
}

.alert-count-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 18px;
    border-radius: 8px;
    min-width: 80px;
}

.alert-count-card .count-num {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.1;
}

.alert-count-card .count-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    margin-top: 2px;
    opacity: 0.85;
}

.card-critical {
    background: rgba(239, 68, 68, 0.10);
    border: 1px solid rgba(239, 68, 68, 0.28);
    color: #f87171;
}

.card-high {
    background: rgba(249, 115, 22, 0.10);
    border: 1px solid rgba(249, 115, 22, 0.28);
    color: #fb923c;
}

.card-medium {
    background: rgba(234, 179, 8, 0.10);
    border: 1px solid rgba(234, 179, 8, 0.28);
    color: #facc15;
}

.card-info {
    background: rgba(59, 130, 246, 0.10);
    border: 1px solid rgba(59, 130, 246, 0.28);
    color: #60a5fa;
}

.card-total {
    background: rgba(99, 102, 241, 0.10);
    border: 1px solid rgba(99, 102, 241, 0.28);
    color: #a5b4fc;
}

/* ── Alert table row highlight ───────────────────────────────────────────── */
tr.row-critical td { background: rgba(239, 68, 68, 0.04); }
tr.row-high     td { background: rgba(249, 115, 22, 0.03); }

/* ── Champion coverage bar highlight ────────────────────────────────────── */
.champion-label {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.35);
    margin-left: 4px;
}

/* ── Risk register table ─────────────────────────────────────────────────── */
.register-count {
    font-size: 18px;
    font-weight: 700;
    color: #a5b4fc;
}
