/*
  ==============================================================================
  Cash/Frontend/forecast/cash_forecast-styles.css — Cash Prediction Dashboard
  ==============================================================================
  What: Additional styles for the CC.3 Cash Prediction (forward-facing forecast)
        dashboard. Extends the hex design system.
  Depends: /shared/css/hex-design-system.css, hex-components.css, hex-utilities.css
  ==============================================================================
*/

/* ── Urgency badges ──────────────────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.badge-mandatory     { background: rgba(255, 80, 80, 0.25); color: #ff5050; border: 1px solid rgba(255,80,80,0.4); }
.badge-recommended   { background: rgba(255,165, 30, 0.25); color: #ffa51e; border: 1px solid rgba(255,165,30,0.4); }
.badge-precautionary { background: rgba(80, 180,255, 0.20); color: #50b4ff; border: 1px solid rgba(80,180,255,0.3); }
.badge-defer         { background: rgba(100,100,100, 0.18); color: #888;    border: 1px solid rgba(100,100,100,0.3); }

/* ── Replenishment action list table rows ────────────────────────────────── */
tr.row-mandatory     { background: rgba(255, 80, 80, 0.07); }
tr.row-recommended   { background: rgba(255,165, 30, 0.07); }
tr.row-precautionary { background: rgba(80, 180,255, 0.06); }
tr.row-defer         { background: transparent; }

/* ── Risk heat bubbles ───────────────────────────────────────────────────── */
.risk-bubble {
    display: inline-block;
    width: 14px; height: 14px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 4px;
}
.risk-high   { background: #ff5050; }
.risk-medium { background: #ffa51e; }
.risk-low    { background: #50b4ff; }

/* ── Denom pills ─────────────────────────────────────────────────────────── */
.denom-pill {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 10px;
    background: rgba(100,200,120,0.15);
    color: #64c878;
    border: 1px solid rgba(100,200,120,0.3);
    margin: 1px 2px;
    white-space: nowrap;
}

/* ── Summary KPI strip ───────────────────────────────────────────────────── */
.summary-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.summary-card {
    background: var(--panel-bg, rgba(255,255,255,0.04));
    border: 1px solid var(--border-color, rgba(255,255,255,0.08));
    border-radius: 8px;
    padding: 14px 16px;
    text-align: center;
}
.summary-card .s-val  { font-size: 28px; font-weight: 700; }
.summary-card .s-label{ font-size: 12px; color: var(--text-dim, #888); margin-top: 4px; }
.s-mandatory   { color: #ff5050; }
.s-recommended { color: #ffa51e; }
.s-precautionary { color: #50b4ff; }
.s-total       { color: var(--text-primary, #fff); }

/* ── Center summary cards ────────────────────────────────────────────────── */
.center-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    margin-top: 12px;
}
.center-card {
    background: var(--panel-bg, rgba(255,255,255,0.04));
    border: 1px solid var(--border-color, rgba(255,255,255,0.08));
    border-radius: 8px;
    padding: 14px 16px;
}
.center-card .cc-name     { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.center-card .cc-row      { display: flex; justify-content: space-between; font-size: 12px; margin: 3px 0; }
.center-card .cc-val      { font-weight: 600; }
.center-card .cc-positive { color: #64c878; }
.center-card .cc-negative { color: #ff5050; }
.center-card .cc-risk     { color: #ffa51e; }
.dq-stale { font-size: 10px; padding: 1px 5px; border-radius: 3px;
            background: rgba(255,165,30,0.2); color: #ffa51e;
            border: 1px solid rgba(255,165,30,0.4); }

/* ── Forecast bands chart container ─────────────────────────────────────── */
.bands-select-row {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.bands-select-row label { font-size: 12px; color: var(--text-dim, #888); }
.bands-select-row select { min-width: 180px; }

/* ── Risk heat table ─────────────────────────────────────────────────────── */
.risk-bar {
    display: inline-block;
    height: 10px;
    border-radius: 3px;
    vertical-align: middle;
    min-width: 4px;
    max-width: 120px;
}

/* ── Pagination ──────────────────────────────────────────────────────────── */
.pager {
    display: flex; align-items: center; gap: 8px;
    margin-top: 10px; justify-content: flex-end;
    font-size: 13px;
}
.pager button {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: var(--text-primary, #fff);
    border-radius: 4px;
    padding: 4px 12px;
    cursor: pointer;
    font-size: 12px;
}
.pager button:disabled { opacity: 0.35; cursor: default; }
.pager .page-info { color: var(--text-dim, #888); font-size: 12px; }
