:root{
  --rm-green:#10b981;
  --rm-green-900:#166534;
  --rm-green-50:#dcfce7;
  --rm-red:#ef4444;
  --rm-red-900:#991b1b;
  --rm-red-50:#fee2e2;
  --rm-bg:#f9fafb;
  --rm-card:#ffffff;
  --rm-border:#e5e7eb;
  --rm-text:#111827;
  --rm-muted:#6b7280;
}
.rm-card{background:#fff;border:1px solid var(--rm-border);border-radius:12px;padding:16px;margin:12px 0}
.rm-form-title{margin-top:0;margin-bottom:12px}
.rm-field{margin-bottom:12px}
.rm-field.two-col{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.rm-field label{display:block;margin-bottom:6px;color:var(--rm-muted);font-size:13px}
.rm-field input[type="text"],
.rm-field input[type="date"],
.rm-field input[type="file"],
.rm-field input[type="email"],
.rm-field select,
.rm-field textarea{width:100%;border:1px solid var(--rm-border);border-radius:8px;padding:8px}
.rm-actions{display:flex;align-items:center;gap:10px}
.rm-subtle{color:var(--rm-muted);font-size:13px}

.rm-table{width:100%;border-collapse:separate;border-spacing:0;margin:8px 0}
.rm-table th,.rm-table td{padding:10px;border-bottom:1px solid var(--rm-border);text-align:left}
.rm-table-compact thead th{font-size:12px;text-transform:uppercase;letter-spacing:.02em;color:var(--rm-muted)}

.rm-status{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;font-size:12px}
.rm-status .dot{width:6px;height:6px;border-radius:999px;display:inline-block}
.rm-status-open{background:var(--rm-green-50);color:var(--rm-green-900)}
.rm-status-open .dot{background:var(--rm-green)}
.rm-status-closed{background:#eef2ff;color:#3730a3}
.rm-status-closed .dot{background:#6366f1}
.rm-status-danger{background:#fee2e2;color:#991b1b}
.rm-status-danger .dot{background:#ef4444}
.rm-status-paused{background:#f3f4f6;color:#111827}
.rm-status-paused .dot{background:#9ca3af}

.rm-builder .rm-builder-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.rm-head-actions{display:flex;gap:8px;align-items:center}
.rm-bulk-panel{border:1px dashed var(--rm-border);border-radius:10px;padding:12px;margin:8px 0;background:#fafafa}
.rm-bulk-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.rm-bulk-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:10px}

.rm-fieldset{border:1px solid var(--rm-border);border-radius:10px;padding:12px;margin-bottom:10px;background:#fff}
.rm-field-actions{display:flex;align-items:flex-end;justify-content:flex-end;height:100%}

.rm-email-sendbar{display:flex;gap:8px;align-items:center}
.rm-email-sendbar input[type="email"]{flex:1;border:1px solid var(--rm-border);border-radius:8px;padding:8px}


/* --- New layout for list view --- */
.rm-list{display:flex;flex-direction:column;gap:12px}
.rm-list-item{border:1px solid var(--rm-border);border-radius:12px;padding:12px;background:#fff}
.rm-row-top{display:flex;justify-content:space-between;gap:12px;align-items:center}
.rm-param-title{font-weight:600}
.rm-row-note{margin-top:8px;color:var(--rm-text)}
.rm-row-link{margin-top:8px}

/* --- Status chip palette --- */
.rm-status{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;font-size:12px}
.rm-status .dot{width:6px;height:6px;border-radius:999px;display:inline-block}
.rm-status-queued{background:#fef9c3;color:#854d0e}.rm-status-queued .dot{background:#facc15}
.rm-status-execution{background:#dbeafe;color:#1e3a8a}.rm-status-execution .dot{background:#3b82f6}
.rm-status-paused{background:#ffedd5;color:#9a3412}.rm-status-paused .dot{background:#fb923c}
.rm-status-completed{background:#dcfce7;color:#065f46}.rm-status-completed .dot{background:#10b981}
.rm-status-urgent{background:#fee2e2;color:#991b1b}.rm-status-urgent .dot{background:#ef4444}
.rm-status-improve{background:#f3e8ff;color:#6b21a8}.rm-status-improve .dot{background:#a855f7}
.rm-status-excellent{background:#d1fae5;color:#065f46}.rm-status-excellent .dot{background:#10b981}


/* --- Status presentation enhancements --- */
.rm-param-status{display:flex;align-items:center;justify-content:flex-end}
.rm-status{
  font-weight:600;
  letter-spacing:.2px;
  border:1px solid rgba(17,24,39,.08);
  box-shadow:0 1px 2px rgba(0,0,0,.04);
  transition:transform .12s ease-out, box-shadow .12s ease-out;
}
.rm-status:hover{transform:translateY(-1px);box-shadow:0 4px 10px rgba(0,0,0,.06)}
/* ensure compact spacing on small screens */
@media (max-width:640px){
  .rm-row-top{flex-direction:column;align-items:flex-start}
  .rm-param-status{justify-content:flex-start;margin-top:6px}
}


/* --- V3 layout: Parameter -> Note -> (Status + Button) --- */
.rm-box{border:1.8px solid var(--rm-border);border-radius:14px;padding:12px}
.rm-box + .rm-box{margin-top:10px}
.rm-box-parameter{font-weight:700;font-size:1.05rem;text-align:center}
.rm-box-note{background:var(--rm-bg)}
.rm-bottom-row{display:flex;gap:12px;align-items:center;justify-content:space-between;margin-top:10px}
.rm-bottom-row .rm-param-status{flex:1}
.rm-bottom-row .rm-landmark{min-width:180px;text-align:center;border-radius:12px}
@media (max-width:640px){
  .rm-bottom-row{flex-direction:column;align-items:stretch}
  .rm-bottom-row .rm-landmark{width:100%}
}


/* --- V4 layout refinement --- */
.rm-list-item{
  background:#fff;
  border:1px solid var(--rm-border);
  border-radius:16px;
  padding:16px;
  margin-bottom:16px;
  box-shadow:0 2px 6px rgba(0,0,0,0.04);
  transition:box-shadow .2s ease-in-out,transform .2s ease-in-out;
}
.rm-list-item:hover{
  transform:translateY(-2px);
  box-shadow:0 4px 10px rgba(0,0,0,0.08);
}
.rm-card-item{display:flex;flex-direction:column;gap:10px}
.rm-box{
  border:1.6px solid var(--rm-border);
  border-radius:10px;
  padding:10px 14px;
}
.rm-box-parameter{
  font-weight:700;
  font-size:1.05rem;
  text-align:center;
  background:var(--rm-bg);
}
.rm-box-note{
  background:#f9fafb;
  font-size:.95rem;
  color:var(--rm-text);
}
.rm-bottom-row{
  display:grid;
  grid-template-columns:1fr auto;
  align-items:center;
  gap:10px;
  margin-top:4px;
}
.rm-param-status{justify-self:start}
.rm-landmark{
  justify-self:end;
  background:#e0f2fe;
  color:#0369a1;
  border-radius:10px;
  font-weight:600;
  border:1px solid #bae6fd;
  padding:6px 14px;
  text-transform:uppercase;
}
.rm-landmark:hover{
  background:#bae6fd;
  color:#075985;
}
@media(max-width:640px){
  .rm-bottom-row{grid-template-columns:1fr}
  .rm-landmark{width:100%;text-align:center}
}
