.rv-module,.rv-content,.rv-stack,.rv-section,.rv-form,.rv-fieldset { display:grid; min-width:0; gap:1rem; }
.rv-module { --rv-line:var(--line,#d6e0d3); --rv-muted:var(--muted,#526457); color:var(--ink,#192a20); }
.rv-module h2,.rv-module h3,.rv-module p,.rv-dialog h2,.rv-dialog h3,.rv-dialog p,.rv-dialog dl { margin:0; }
.rv-toolbar,.rv-filters,.rv-tabs,.rv-actions,.rv-pager,.rv-section-head { display:flex; align-items:center; flex-wrap:wrap; gap:.65rem; }
.rv-toolbar,.rv-section-head { justify-content:space-between; }
.rv-tabs button.is-active { color:#254625; border-color:#73a459; background:#e6f4db; }
.rv-filters { align-items:end; }
.rv-field { display:grid; gap:.42rem; min-width:0; font-weight:600; }
.rv-field>input,.rv-field>select,.rv-field>textarea { width:100%; min-width:0; box-sizing:border-box; }
.rv-filters>.rv-field:has(input[type=search]) { flex:1 1 15rem; }
.rv-stats,.rv-values,.rv-mapping,.rv-template-grid { display:grid; gap:.8rem; }
.rv-stats { grid-template-columns:repeat(auto-fit,minmax(min(100%,9rem),1fr)); }
.rv-stat { display:grid; align-content:center; justify-items:center; text-align:center; gap:.4rem; padding:1rem; border:1px solid var(--line,#d6e0d3); border-radius:.8rem; background:#f6f9f2; }
.rv-stat strong { font-size:1.23rem; overflow-wrap:anywhere; }
.rv-scroll { overflow:auto; min-width:0; max-width:100%; border:1px solid var(--line,#d6e0d3); border-radius:.8rem; }
.rv-table { width:100%; border-collapse:collapse; }
.rv-table th,.rv-table td { padding:.68rem .75rem; text-align:start; vertical-align:middle; }
.rv-table th { white-space:nowrap; background:#eff4eb; font-size:.8rem; }
.rv-table tbody tr+tr { border-top:1px solid var(--line,#d6e0d3); }
.rv-table td:first-child>.button { color:#24472f; }
.rv-pager { justify-content:flex-end; margin-top:.75rem; }
.rv-pager span:first-child { margin-inline-end:auto; }
.rv-feedback:not(:empty) { padding:.6rem 0; color:#3e5743; }
.rv-feedback.is-error:not(:empty) { border:1px solid #e2b9b9; background:#fff4f3; color:#932b25; border-radius:.5rem; padding:.65rem .8rem; }
.rv-dialog { padding:0; width:min(68rem,calc(100vw - 2rem)); max-height:min(92vh,62rem); border:1px solid var(--line,#d6e0d3); background:#fcfdfb; color:inherit; border-radius:1.2rem; }
.rv-dialog::backdrop { background:rgba(23,43,31,.6); }
.rv-dialog-head { display:flex; justify-content:space-between; align-items:center; gap:1rem; position:sticky; top:0; z-index:2; background:#fcfdfb; padding:1.05rem 1.4rem; border-bottom:1px solid var(--line,#d6e0d3); }
.rv-dialog-head h2 { font-size:1.35rem; }
.rv-dialog-body { display:grid; gap:1rem; padding:1.4rem; min-width:0; }
.rv-dialog [hidden],.rv-module [hidden] { display:none!important; }
.rv-values { grid-template-columns:repeat(auto-fit,minmax(min(100%,11rem),1fr)); }
.rv-values>div,.rv-preview-card,.rv-example { padding:.8rem; background:#f4f7f0; border-radius:.6rem; }
.rv-values dt,.rv-tag,.rv-import-head small { color:#46594b; font-size:.85rem; }
.rv-values dd { margin:.25rem 0 0; overflow-wrap:anywhere; }
.rv-mapping,.rv-template-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,15rem),1fr)); }
.rv-import-head { display:grid; gap:1.4rem; grid-template-columns:minmax(0,1.25fr) minmax(0,1fr); align-items:start; }
.rv-import-head small { display:block; margin:.5rem 0; }
.rv-drop { display:flex; flex-direction:column; gap:.65rem; justify-content:center; align-items:center; min-height:13rem; padding:1rem; border:2px dashed #8aab85; border-radius:.8rem; background:#f5faf1; text-align:center; cursor:pointer; }
.rv-drop:focus-within,.rv-drop.is-dragging { outline:2px solid #487449; background:#e7f3dd; }
.rv-file-input { position:absolute; width:1px!important; height:1px!important; overflow:hidden; clip-path:inset(50%); }
.rv-file-name:not(:empty) { display:inline-block; margin-top:.5rem; color:#245130; background:#e3f1db; border-radius:1rem; padding:.35rem .8rem; font-weight:700; overflow-wrap:anywhere; }
.rv-step,.rv-fieldset { padding:1rem; border:1px solid var(--line,#d6e0d3); border-radius:.75rem; }
.rv-step summary { cursor:pointer; font-weight:700; }
.rv-step[open]>summary { margin-bottom:1rem; }
.rv-check { display:inline-flex; align-items:center; gap:.45rem; }
.rv-check input { width:auto; }
.rv-body-copy { white-space:pre-wrap; overflow-wrap:anywhere; }
.rv-tag { border:1px solid var(--line,#d6e0d3); border-radius:1rem; padding:.3rem .65rem; }
.rv-form textarea { resize:vertical; min-height:4.5rem; }
.rv-form>.button,.rv-stack>.button { justify-self:start; }
.rv-message-columns { display:grid; grid-template-columns:minmax(15rem,2fr) minmax(0,3fr); gap:1.25rem; align-items:start; }
.rv-message-editor,.rv-message-preview { display:grid; min-width:0; gap:.75rem; }
.rv-message-editor textarea { min-height:11rem; }
.rv-email-preview { display:block; width:100%; height:34rem; max-height:70vh; box-sizing:border-box; border:1px solid var(--line,#d6e0d3); border-radius:.7rem; background:white; }
.rv-sms-preview { width:fit-content; max-width:100%; box-sizing:border-box; padding:.85rem 1rem; border-radius:1rem; background:#ecf4e7; }
@media(max-width:700px) {
  .rv-import-head,.rv-template-grid,.rv-message-columns { grid-template-columns:1fr; }
  .rv-toolbar,.rv-filters { align-items:stretch; }
  .rv-filters>.rv-field { flex:1 1 9rem; }
  .rv-dialog { width:calc(100vw - .8rem); max-height:96vh; }
  .rv-dialog-head,.rv-dialog-body { padding:.85rem; }
}
