/* ================================================================
   PROCESS SIMULATION — Flow Process Charts
   ================================================================ */

#processSimulation {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: var(--bg-primary, #f8f9fa);
    position: relative;
}

/* ── Header ──────────────────────────────────────────────────── */
.psim-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--color-primary, #1a1a2e);
    color: #fff;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.psim-header h2 {
    font-size: 13px;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
    color: #fff;
}

.psim-select {
    height: 28px;
    padding: 0 8px;
    font-size: 12px;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 4px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    cursor: pointer;
    min-width: 140px;
}

.psim-select option { color: #1a1a2e; background: #fff; }

.psim-btn {
    height: 28px;
    padding: 0 12px;
    font-size: 11px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
.psim-btn-primary { background: #3b82f6; color: #fff; }
.psim-btn-danger  { background: #ef4444; color: #fff; }
.psim-btn-ghost   { background: rgba(255,255,255,0.15); color: #fff; }
.psim-btn:hover   { filter: brightness(1.1); }
.psim-btn:disabled { opacity: .45; cursor: default; }

.psim-chart-name {
    flex: 1;
    min-width: 120px;
    height: 28px;
    padding: 0 8px;
    font-size: 12px;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 4px;
    background: rgba(255,255,255,0.1);
    color: #fff;
}
.psim-chart-name::placeholder { color: rgba(255,255,255,0.45); }

/* ── Body: left panel + canvas ────────────────────────────────── */
.psim-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* ── Left panel ──────────────────────────────────────────────── */
.psim-left {
    width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e2e8f0;
    background: #fff;
    overflow: hidden;
}

.psim-panel-title {
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 8px 12px 4px;
    border-bottom: 1px solid #f1f5f9;
}

/* Steps list */
.psim-steps-list {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.psim-step-row {
    display: flex;
    align-items: center;
    padding: 5px 8px;
    gap: 6px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background .15s;
}
.psim-step-row:hover    { background: #f8fafc; }
.psim-step-row.selected { background: #eff6ff; border-left: 3px solid #3b82f6; }
.psim-step-row.critical { border-left: 3px solid #ef4444; }
.psim-step-row.selected.critical { background: #fef2f2; border-left: 3px solid #ef4444; }

.psim-step-codigo {
    font-size: 11px;
    font-weight: 700;
    width: 28px;
    color: #1e3a5f;
}

.psim-step-icon {
    font-size: 13px;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.psim-step-nombre {
    flex: 1;
    font-size: 11px;
    color: #374151;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.psim-step-time {
    font-size: 10px;
    color: #9ca3af;
    white-space: nowrap;
}

.psim-step-del {
    font-size: 10px;
    color: #d1d5db;
    border: none;
    background: none;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
}
.psim-step-del:hover { color: #ef4444; background: #fef2f2; }

.psim-add-step-bar {
    padding: 6px 8px;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
}

/* Step edit form */
.psim-step-form {
    padding: 8px 10px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    flex-shrink: 0;
}

.psim-form-row {
    display: flex;
    gap: 6px;
    margin-bottom: 5px;
    align-items: center;
}

.psim-form-row label {
    font-size: 10px;
    color: #6b7280;
    width: 52px;
    flex-shrink: 0;
}

.psim-input {
    flex: 1;
    height: 24px;
    padding: 0 6px;
    font-size: 11px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: #fff;
    color: #374151;
}

/* Edges section */
.psim-edges-section {
    padding: 6px 8px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    flex-shrink: 0;
}

.psim-edge-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
    min-height: 20px;
}

.psim-edge-tag {
    font-size: 10px;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 10px;
    padding: 1px 7px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.psim-edge-tag button {
    border: none;
    background: none;
    font-size: 9px;
    color: #93c5fd;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.psim-edge-tag button:hover { color: #ef4444; }

/* Resources section */
.psim-resources-section {
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
    max-height: 260px;
    overflow-y: auto;
}

.psim-resource-row {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-bottom: 1px solid #f9fafb;
    font-size: 10px;
}
.psim-resource-row:last-child { border-bottom: none; }

.psim-resource-row.header {
    background: #f1f5f9;
    font-weight: 700;
    color: #6b7280;
    font-size: 9px;
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 4px;
}

.psim-res-nombre {
    flex: 1;
    font-size: 10px;
    color: #374151;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.psim-res-und {
    width: 32px;
    text-align: center;
    font-size: 10px;
    color: #9ca3af;
    flex-shrink: 0;
}

.psim-resource-input {
    width: 60px;
    height: 22px;
    padding: 0 4px;
    font-size: 10px;
    text-align: right;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    background: #fff;
    flex-shrink: 0;
}
.psim-resource-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #fafcff;
}

.psim-tipo-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 8px;
    text-align: center;
    width: 34px;
    flex-shrink: 0;
    box-sizing: border-box;
}
.psim-tipo-MO  { background: #dcfce7; color: #166534; }
.psim-tipo-MAT { background: #dbeafe; color: #1e40af; }
.psim-tipo-EQ  { background: #fef3c7; color: #92400e; }

/* ── Canvas ───────────────────────────────────────────────────── */
.psim-canvas-wrap {
    flex: 1;
    position: relative;
    overflow: auto;
    background:
        radial-gradient(circle, #e2e8f0 1px, transparent 1px) 0 0 / 20px 20px;
    min-width: 0;
}

#psimSVG {
    display: block;
    min-width: 600px;
    min-height: 400px;
}

.psim-node rect {
    rx: 6px;
    stroke-width: 1.5;
    cursor: pointer;
    transition: filter .15s;
}
.psim-node rect:hover { filter: brightness(.95); }
.psim-node.selected rect { stroke-width: 2.5; }
.psim-node.critical rect { stroke: #ef4444 !important; stroke-width: 2; }

/* ── Bottom results bar (simplificada) ────────────────────────── */
.psim-results {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0;
    background: #1e3a5f;
    color: #fff;
    font-size: 11px;
    flex-shrink: 0;
    min-height: 34px;
    flex-wrap: nowrap;
}

.psim-result-chip {
    padding: 0 14px;
    height: 34px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-right: 1px solid rgba(255,255,255,.15);
    flex-shrink: 0;
}

.psim-result-label { color: rgba(255,255,255,.55); font-size: 10px; }
.psim-result-value { font-weight: 700; font-size: 12px; }

.psim-result-chip.pipeline .psim-result-value { color: #34d399; }
.psim-result-chip.proyecto  .psim-result-value { color: #fbbf24; }

.psim-apu-toggle-btn {
    margin-left: auto;
    margin-right: 10px;
    height: 24px;
    padding: 0 12px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(59,130,246,.8);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    transition: background .15s;
}
.psim-apu-toggle-btn:hover  { background: #3b82f6; }
.psim-apu-toggle-btn.active { background: #1d4ed8; }

/* ── APU Emergente panel ──────────────────────────────────────── */
.psim-apu-panel {
    flex-direction: column;
    flex-shrink: 0;
    max-height: 360px;
    border-top: 2px solid #3b82f6;
    background: #fff;
    overflow: hidden;
}

.psim-apu-meta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 8px;
}

.psim-apu-meta-left {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    flex-wrap: wrap;
}

.psim-apu-meta-label { color: #6b7280; font-weight: 600; }
.psim-apu-meta-val   { color: #111827; font-weight: 700; }

.psim-apu-mode-toggle {
    display: flex;
    gap: 4px;
}

.psim-mode-btn {
    height: 24px;
    padding: 0 10px;
    font-size: 10px;
    font-weight: 600;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #f9fafb;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all .15s;
}
.psim-mode-btn.active {
    background: #1e3a5f;
    color: #fff;
    border-color: #1e3a5f;
}
.psim-mode-btn:hover:not(.active) { background: #e2e8f0; color: #374151; }

.psim-apu-body-wrap {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

/* ── APU tabla ────────────────────────────────────────────────── */
.psim-apu-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.psim-apu-table th,
.psim-apu-table td {
    padding: 3px 10px;
    border-bottom: 1px solid #f1f5f9;
    color: #374151;
}

.psim-apu-section th {
    background: #1e3a5f;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 4px 10px;
    text-align: left;
}

.psim-apu-cols th {
    background: #f1f5f9;
    font-size: 9px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.psim-apu-cols th.num { text-align: right; }

.psim-apu-table tbody tr:hover { background: #f8fafc; }

.psim-apu-td-desc { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psim-apu-td-num  { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.psim-apu-parcial { font-weight: 600; color: #111827; }

.psim-apu-subtotal td {
    background: #f8fafc;
    font-size: 10px;
    font-weight: 600;
    color: #374151;
    border-top: 1px solid #e2e8f0;
    padding: 4px 10px;
}
.psim-apu-subtotal td.num { text-align: right; color: #1e3a5f; }

.psim-apu-total td {
    background: #1e3a5f;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 10px;
    border-top: 2px solid #3b82f6;
}
.psim-apu-total td.num { text-align: right; font-size: 14px; color: #93c5fd; }

.psim-apu-empty {
    text-align: center;
    color: #9ca3af;
    font-size: 10px;
    padding: 8px;
    font-style: italic;
}

/* ── Empty state ──────────────────────────────────────────────── */
.psim-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #9ca3af;
    font-size: 12px;
    gap: 8px;
    text-align: center;
    padding: 32px;
}
.psim-empty i { font-size: 36px; color: #d1d5db; }

/* ── Scrollbar ────────────────────────────────────────────────── */
.psim-steps-list::-webkit-scrollbar,
.psim-canvas-wrap::-webkit-scrollbar,
.psim-resources-section::-webkit-scrollbar { width: 5px; height: 5px; }
.psim-steps-list::-webkit-scrollbar-track,
.psim-canvas-wrap::-webkit-scrollbar-track,
.psim-resources-section::-webkit-scrollbar-track { background: transparent; }
.psim-steps-list::-webkit-scrollbar-thumb,
.psim-canvas-wrap::-webkit-scrollbar-thumb,
.psim-resources-section::-webkit-scrollbar-thumb { background: #cbd5e0; border-radius: 3px; }

/* ── Modal (reemplaza prompt/confirm) ─────────────────────────── */
.psim-modal-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.psim-modal-overlay.show { display: flex; }

.psim-modal {
    background: #fff;
    border-radius: 10px;
    min-width: 340px;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(0,0,0,.25);
    overflow: hidden;
}

.psim-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px 10px;
    border-bottom: 1px solid #e2e8f0;
}

.psim-modal-title {
    font-size: 13px;
    font-weight: 700;
    color: #1e3a5f;
}

.psim-modal-close {
    border: none;
    background: none;
    font-size: 12px;
    color: #9ca3af;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
}
.psim-modal-close:hover { background: #f1f5f9; color: #374151; }

.psim-modal-body {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.psim-modal-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.psim-modal-label {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.psim-modal-input {
    height: 32px;
    padding: 0 10px;
    font-size: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #f9fafb;
    color: #111827;
    width: 100%;
    box-sizing: border-box;
    transition: border-color .15s;
}
.psim-modal-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #fff;
}

.psim-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 10px 18px 14px;
    border-top: 1px solid #f1f5f9;
}

.psim-modal-btn {
    height: 32px;
    padding: 0 16px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: filter .15s;
}
.psim-modal-btn:hover { filter: brightness(.93); }

.psim-modal-cancel  { background: #f1f5f9; color: #374151; }
.psim-modal-confirm { background: #3b82f6; color: #fff; }
.psim-modal-confirm.danger { background: #ef4444; }

/* ── Supply picker ────────────────────────────────────────────── */
.psim-supply-results {
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-top: 2px;
}

.psim-supply-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background .1s;
}
.psim-supply-row:last-child { border-bottom: none; }
.psim-supply-row:hover { background: #eff6ff; }

.psim-supply-nombre {
    flex: 1;
    font-size: 11px;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.psim-supply-und {
    font-size: 10px;
    color: #6b7280;
    width: 36px;
    text-align: center;
}

.psim-supply-precio {
    font-size: 10px;
    color: #374151;
    font-weight: 600;
    white-space: nowrap;
}

/* ── Calc btn & popover ───────────────────────────────────────── */
.psim-calc-btn {
    width: 18px;
    height: 18px;
    padding: 0;
    font-size: 10px;
    line-height: 1;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 3px;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #92400e;
    transition: background .12s;
}
.psim-calc-btn:hover { background: #fef3c7; border-color: #f59e0b; }

.psim-calc-popover {
    position: absolute;
    z-index: 500;
    width: 260px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,.16);
    font-size: 11px;
    overflow: hidden;
}

.psim-calc-pop-title {
    font-size: 11px;
    font-weight: 700;
    color: #1e3a5f;
    padding: 8px 12px 6px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.psim-calc-section { padding: 8px 12px; }

.psim-calc-section-title {
    font-size: 9px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 6px;
}

.psim-calc-cp-line {
    font-size: 11px;
    color: #374151;
    margin-bottom: 4px;
}

.psim-calc-info-note {
    font-size: 10px;
    color: #6b7280;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 5px 8px;
    line-height: 1.5;
}

.psim-calc-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
}

.psim-calc-label {
    font-size: 10px;
    color: #6b7280;
    min-width: 58px;
    flex-shrink: 0;
}

.psim-calc-eq {
    font-size: 10px;
    color: #374151;
    flex: 1;
}

.psim-calc-input {
    flex: 1;
    height: 24px;
    padding: 0 6px;
    font-size: 11px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #f9fafb;
    min-width: 0;
}
.psim-calc-input:focus { outline: none; border-color: #3b82f6; background: #fff; }

.psim-calc-apply-btn {
    height: 22px;
    padding: 0 9px;
    font-size: 10px;
    font-weight: 600;
    background: #10b981;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background .12s;
}
.psim-calc-apply-btn:not(:disabled):hover { background: #059669; }
.psim-calc-apply-btn:disabled { background: #d1d5db; color: #9ca3af; cursor: default; }

.psim-calc-sep { height: 1px; background: #e2e8f0; margin: 0 8px; }

.psim-calc-preview {
    font-size: 10px;
    color: #374151;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 4px;
    padding: 4px 8px;
    margin-bottom: 6px;
    line-height: 1.4;
}

/* ── Ciclo físico preview (bajo duración/producción) ─────────── */
.psim-ciclo-preview {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 4px 8px;
    margin-bottom: 5px;
    background: #f1f5f9;
    border-radius: 4px;
    font-size: 10px;
    color: #9ca3af;
    min-height: 22px;
}
.psim-ciclo-preview.has-data {
    background: #eff6ff;
    color: #1e40af;
}
.psim-ciclo-hint { font-style: italic; color: #d1d5db; }

/* ── Resource groups (MO vs MAT/EQ) ──────────────────────────── */
.psim-res-group { border-bottom: 1px solid #e2e8f0; }
.psim-res-group:last-child { border-bottom: none; }

.psim-res-group-hdr {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.psim-res-hdr-mo  { background: #f0fdf4; color: #166534; border-bottom: 1px solid #d1fae5; }
.psim-res-hdr-mat { background: #eff6ff; color: #1e40af; border-bottom: 1px solid #bfdbfe; }

.psim-res-empty {
    padding: 5px 12px;
    font-size: 10px;
    color: #d1d5db;
    font-style: italic;
}

.psim-calc-btn-gap { display: inline-block; width: 18px; flex-shrink: 0; }

/* ── Step groups (panel izquierdo) ───────────────────────────── */
.psim-step-group {
    border-bottom: 1px solid #e5e7eb;
}
.psim-step-group-hdr {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    background: #f8f9fa;
    user-select: none;
    border-left: 3px solid var(--group-color, #6b7280);
    position: sticky;
    top: 0;
    z-index: 2;
}
.psim-step-group-hdr:hover { background: #f1f5f9; }
.psim-group-toggle {
    font-size: 8px;
    color: #9ca3af;
    width: 12px;
    flex-shrink: 0;
    cursor: pointer;
    padding: 2px;
}
.psim-group-toggle:hover { color: #374151; }

/* PARTIDA / SUBPARTIDA badges */
.psim-tipo-partida, .psim-tipo-subpartida {
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .04em;
    padding: 1px 5px;
    border-radius: 6px;
    flex-shrink: 0;
    text-transform: uppercase;
}
.psim-tipo-partida    { background: #fef3c7; color: #92400e; border: 1px solid #fbbf24; }
.psim-tipo-subpartida { background: #f3f4f6; color: #6b7280; border: 1px solid #d1d5db; }

.psim-group-name {
    font-size: 10px;
    font-weight: 600;
    color: #374151;
    flex: 1;
    cursor: text;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.psim-group-name-input {
    font-size: 10px;
    font-weight: 600;
    flex: 1;
    border: 1px solid #3b82f6;
    border-radius: 3px;
    padding: 0 4px;
    height: 18px;
    outline: none;
    min-width: 0;
}
.psim-group-count {
    font-size: 9px;
    color: #9ca3af;
    background: #e5e7eb;
    border-radius: 10px;
    padding: 0 5px;
    min-width: 16px;
    text-align: center;
}
.psim-group-star {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 11px;
    color: #d1d5db;
    padding: 0 2px;
    line-height: 1;
    flex-shrink: 0;
}
.psim-group-star:hover { color: #f59e0b; }
.psim-group-star.active { color: #f59e0b; }
.psim-step-group .psim-step-row { padding-left: 14px; }

/* ── Resource section titles ──────────────────────────────────── */
.psim-res-section-title {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 4px 8px 2px;
}
.psim-res-mo-title  { background: #f0fdf4; color: #166534; border-top: 1px solid #d1fae5; }
.psim-res-mat-title { background: #eff6ff; color: #1e40af; border-top: 1px solid #bfdbfe; margin-top: 4px; }
