/*
 * ==============================================================================
 * Cash/Frontend/sama/cash_sama-styles.css
 * ==============================================================================
 * What:
 *     Page-specific styles for the SAMA Draws & Returns dashboard (P5.2).
 *     Extends the shared hex design system.
 *
 * Depends:
 *     /shared/css/hex-design-system.css
 *     /shared/css/hex-components.css
 *     /shared/css/hex-utilities.css
 * ==============================================================================
 */

/* ── Compliance status badges ─────────────────────────────────────────────── */
.compliance-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.compliance-COMPLIANT {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.compliance-WARNING {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.compliance-BREACH {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

/* ── Draw vs Return headline strip ───────────────────────────────────────── */
.flow-headline-strip {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin: 12px 0 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 6px;
}

.flow-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.flow-label {
    font-size: 11px;
    color: var(--text-dim, #8b949e);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.flow-value {
    font-size: 16px;
    font-weight: 700;
}

.flow-draw {
    color: #10b981;
}

.flow-unfit {
    color: #f87171;
}

.flow-excess {
    color: #fbbf24;
}

/* ── Reserve gauge container ──────────────────────────────────────────────── */
.reserve-gauge-wrap {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
    margin-bottom: 24px;
}

/* ── Draw plan card ───────────────────────────────────────────────────────── */
.draw-plan-card {
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    margin: 8px 0 16px;
}

.draw-plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.plan-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.plan-label {
    font-size: 11px;
    color: var(--text-dim, #8b949e);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plan-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary, #e6edf3);
}

.plan-rulebook {
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.20);
    border-left: 3px solid #6366f1;
    border-radius: 4px;
    font-size: 12px;
    color: #a5b4fc;
}

/* ── Compliance timeline summary bar ─────────────────────────────────────── */
.compliance-summary-bar {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin: 8px 0 12px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 6px;
}

.compliance-summary-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: center;
}

.compliance-summary-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.compliance-summary-count {
    font-size: 18px;
    font-weight: 700;
}

/* ── R33 Unfit table ──────────────────────────────────────────────────────── */
.r33-headline {
    margin: 8px 0 4px;
    padding: 10px 16px;
    background: rgba(239, 68, 68, 0.07);
    border: 1px solid rgba(239, 68, 68, 0.20);
    border-left: 4px solid #ef4444;
    border-radius: 6px;
    color: #fca5a5;
    font-size: 13px;
    font-weight: 600;
}

.pct-bar-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
}

.pct-bar-bg {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.pct-bar-fill {
    height: 100%;
    background: #f87171;
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* ── Transaction type badges (reuse vault pattern) ────────────────────────── */
.tx-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.tx-RECEIPT {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.30);
}

.tx-RETURN_UNFIT {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.30);
}

.tx-RETURN_EXCESS {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.30);
}

/* ── Denomination kind badges ─────────────────────────────────────────────── */
.denom-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.denom-note {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.30);
}

.denom-coin {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.30);
}
