:where(.rhp-root, .rhp-dialog) {
  --rhp-text: #242a2c;
  --rhp-muted: #626c70;
  --rhp-line: #dfe5e4;
  --rhp-soft: #f5f7f6;
  --rhp-teal: #0f766e;
  --rhp-teal-soft: #edf8f5;
  --rhp-amber: #a6530b;
  --rhp-amber-soft: #fffaed;
  color: var(--rhp-text);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0;
}

dialog.rhp-dialog.rhi-dialog { width: min(960px, calc(100% - 24px)); max-width: 960px; }
.rhi-rows .rhp-table { min-width: 640px; }
.rhi-rows td:nth-child(2) { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }

:where(.rhp-root, .rhp-dialog),
:where(.rhp-root, .rhp-dialog) * {
  box-sizing: border-box;
  letter-spacing: 0;
}

.rhp-root {
  width: 100%;
  min-width: 0;
  background: #fff;
}

.rhp-toolbar,
.rhp-actions,
.rhp-band > header,
.rhp-band-header,
.rhp-band-heading,
.rhp-pool > header,
.rhp-pool-head,
.rhp-filters,
.rhp-pager,
.rhp-dialog-head,
.rhp-dialog-footer {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rhp-toolbar {
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--rhp-line);
}

.rhp-toolbar > :first-child {
  flex: 1 1 220px;
  min-width: 0;
}

.rhp-toolbar h3,
.rhp-dialog-head h3 {
  margin: 0;
  color: var(--rhp-text);
  font-size: 16px;
  font-weight: 650;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.rhp-toolbar p,
.rhp-toolbar small,
.rhp-dialog-head p {
  margin: 5px 0 0;
  color: var(--rhp-muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.rhp-actions {
  flex-wrap: wrap;
  flex-shrink: 0;
  gap: 8px;
  max-width: 100%;
}

.rhp-btn,
.rhp-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 36px;
  min-height: 36px;
  max-width: 100%;
  padding: 7px 11px;
  border: 1px solid #ccd5d2;
  border-radius: 5px;
  background: #fff;
  color: #303a3a;
  font: inherit;
  font-size: 13px;
  font-weight: 550;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.rhp-btn:hover:not(:disabled):not(.disabled):not([aria-disabled="true"]),
.rhp-icon:hover:not(:disabled):not([aria-disabled="true"]) {
  border-color: #a3b3ad;
  background: #f3f6f5;
}

.rhp-btn.primary {
  border-color: var(--rhp-teal);
  background: var(--rhp-teal);
  color: #fff;
}

.rhp-btn.primary:hover:not(:disabled):not(.disabled):not([aria-disabled="true"]) {
  border-color: #115e59;
  background: #115e59;
}

.rhp-btn:disabled,
.rhp-btn.disabled,
.rhp-btn[aria-disabled="true"],
.rhp-icon:disabled,
.rhp-icon[aria-disabled="true"] {
  border-color: #e0e5e3;
  background: #f1f4f2;
  color: #8a9390;
  box-shadow: none;
  cursor: not-allowed;
}

.rhp-icon,
.rhp-btn.rhp-icon {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
}

:is(.rhp-btn, .rhp-icon) svg {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
}

:is(.rhp-btn, .rhp-icon):focus-visible,
.rhp-key-name:focus-visible,
.rhp-root :is(input, select, textarea, summary):focus-visible,
.rhp-dialog :is(input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--rhp-teal);
  outline-offset: 2px;
}

.rhp-alert {
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid #c4dfd7;
  border-left: 3px solid var(--rhp-teal);
  border-radius: 4px;
  background: var(--rhp-teal-soft);
  color: #225c50;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.rhp-alert.warning {
  border-color: #ead6a6;
  border-left-color: var(--rhp-amber);
  background: var(--rhp-amber-soft);
  color: #7a420a;
}

.rhp-alert.error {
  border-color: #efc6c0;
  border-left-color: #b42318;
  background: #fff3f1;
  color: #9f2419;
}

.rhp-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
  border-bottom: 1px solid var(--rhp-line);
}

.rhp-stat {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding: 14px 16px;
  border-right: 1px solid var(--rhp-line);
}

.rhp-stat:last-child { border-right: 0; }
.rhp-stat small { color: var(--rhp-muted); font-size: 12px; overflow-wrap: anywhere; }
.rhp-stat strong { font-size: 24px; font-weight: 650; line-height: 1.25; overflow-wrap: anywhere; }
.rhp-stat strong, .rhp-metrics, .rhp-band-metrics, .rhp-table { font-variant-numeric: tabular-nums; }
.rhp-root small, .rhp-dialog small { font-size: 12px; }

.rhp-band {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 16px 0;
  border-bottom: 1px solid var(--rhp-line);
}

.rhp-band > header,
.rhp-band-header,
.rhp-band-heading,
.rhp-pool > header,
.rhp-pool-head {
  flex-wrap: wrap;
  justify-content: space-between;
  min-width: 0;
  margin: 0 0 12px;
}

.rhp-band h4,
.rhp-band > h3,
.rhp-pool > header h3,
.rhp-pool > header h4,
.rhp-pool-head h3,
.rhp-pool-head h4,
.rhp-config-resource h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.rhp-metrics,
.rhp-band-metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  color: var(--rhp-muted);
  font-size: 12px;
}

:is(.rhp-metrics, .rhp-band-metrics) strong { color: var(--rhp-text); font-size: 13px; }

.rhp-pool {
  width: 100%;
  min-width: 0;
  margin: 0;
  border-top: 1px solid var(--rhp-line);
}

.rhp-pool.dedicated { --rhp-pool-accent: var(--rhp-teal); }
.rhp-pool.member { --rhp-pool-accent: var(--rhp-amber); }
.rhp-pool > header, .rhp-pool-head { margin: 0; padding: 11px 12px; }
.rhp-pool.dedicated > header, .rhp-pool.dedicated .rhp-pool-head { border-left: 3px solid var(--rhp-teal); background: var(--rhp-teal-soft); }
.rhp-pool.member > header, .rhp-pool.member .rhp-pool-head { border-left: 3px solid var(--rhp-amber); background: var(--rhp-amber-soft); }
.rhp-pool-head > div, .rhp-pool-head h4 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rhp-pool-head h4 svg { flex-shrink: 0; }
.rhp-pool-metrics { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 12px; border-bottom: 1px solid var(--rhp-line); color: var(--rhp-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.rhp-pool-metrics b { color: var(--rhp-text); font-weight: 600; }
.rhp-pool > .rhp-filters { margin-right: 12px; margin-left: 12px; }

.rhp-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

.rhp-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  border-spacing: 0;
  color: var(--rhp-text);
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
}

.rhp-table th,
.rhp-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e8ecea;
  vertical-align: middle;
  text-align: left;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.45;
}

.rhp-table th { background: var(--rhp-soft); color: #58635f; font-size: 12px; font-weight: 600; }
.rhp-table td { font-weight: 400; }
.rhp-table tbody > tr:not(.rhp-expanded):hover > td { background: #f8faf9; }
.rhp-table td > .rhp-actions { flex-wrap: nowrap; }
.rhp-table td > .rhp-icon + .rhp-icon { margin-left: 5px; }
.rhp-key-name { display: block; min-width: 140px; max-width: 320px; font-weight: 600; white-space: normal; overflow-wrap: anywhere; }
button.rhp-key-name { display: inline-flex; align-items: flex-start; gap: 7px; min-height: 32px; padding: 5px 0; border: 0; border-radius: 3px; background: transparent; color: var(--rhp-text); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
button.rhp-key-name > span { flex: 0 0 16px; width: 16px; line-height: 20px; text-align: center; }
button.rhp-key-name:hover { color: var(--rhp-teal); }
.rhp-key-sub { display: block; max-width: 340px; margin-top: 3px; color: var(--rhp-muted); font-size: 12px; white-space: normal; overflow-wrap: anywhere; }
.rhp-task-table td > small { display: block; margin-top: 3px; color: var(--rhp-muted); }
.rhp-reference { font-family: Consolas, "Cascadia Mono", monospace; font-size: 12px; }
.rhp-icon.danger { color: #b42318; }
.rhp-icon.danger:hover:not(:disabled) { border-color: #e4b3ad; background: #fff3f1; }

.rhp-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  padding: 2px 6px;
  border: 1px solid #dce3df;
  border-radius: 4px;
  background: #f4f6f5;
  color: #56635d;
  font-size: 12px;
  font-weight: 550;
  line-height: 1.35;
  white-space: nowrap;
}

.rhp-badge.active { border-color: #b9dbd1; background: var(--rhp-teal-soft); color: #17675a; }
.rhp-badge.warning { border-color: #ead4a3; background: var(--rhp-amber-soft); color: #88500e; }
.rhp-badge.muted { border-color: #e0e5e2; background: #f2f4f3; color: #69736d; }

.rhp-mini-progress {
  display: inline-block;
  width: 80px;
  height: 5px;
  margin-right: 6px;
  overflow: hidden;
  border: 0;
  border-radius: 2px;
  background: #e4e9e6;
  vertical-align: middle;
  appearance: none;
}

.rhp-mini-progress > :is(i, span, div) { display: block; height: 100%; border-radius: 2px; background: var(--rhp-pool-accent, var(--rhp-teal)); }
.rhp-mini-progress::-webkit-progress-bar { background: #e4e9e6; }
.rhp-mini-progress::-webkit-progress-value { background: var(--rhp-pool-accent, var(--rhp-teal)); }
.rhp-mini-progress::-moz-progress-bar { background: var(--rhp-pool-accent, var(--rhp-teal)); }
.rhp-table td > .rhp-mini-progress { display: block; margin: 5px 0 0; }
.rhp-expanded { min-width: 0; background: #f8faf9; }
.rhp-expanded > td { padding: 14px 16px; background: #f8faf9; white-space: normal; }
.rhp-task-name { display: block; max-width: 420px; color: var(--rhp-text); font-weight: 600; white-space: normal; overflow-wrap: anywhere; }
.rhp-empty { padding: 28px 16px; color: var(--rhp-muted); font-size: 13px; text-align: center; overflow-wrap: anywhere; }
.rhp-empty strong { display: block; margin-bottom: 4px; color: var(--rhp-text); font-size: 14px; }

.rhp-filters { flex-wrap: wrap; gap: 10px 14px; margin: 12px 0; }
.rhp-filters label { display: inline-flex; align-items: center; gap: 6px; min-width: 0; color: var(--rhp-muted); font-size: 12px; }
.rhp-filters :is(input[type="search"], input[type="text"]) { width: 280px; max-width: 100%; min-width: 0; min-height: 34px; padding: 6px 9px; border: 1px solid #ccd5d2; border-radius: 4px; background: #fff; color: var(--rhp-text); font: inherit; font-size: 13px; }
.rhp-filters input[type="checkbox"], .rhp-toggle input[type="checkbox"] { flex: 0 0 18px; width: 18px; height: 18px; margin: 0; accent-color: var(--rhp-teal); }
.rhp-filters .rhp-search { width: 280px; max-width: 100%; min-height: 34px; padding: 0 9px; border: 1px solid #ccd5d2; border-radius: 4px; background: #fff; }
.rhp-search > svg { flex: 0 0 16px; }
.rhp-filters .rhp-search > input { flex: 1 1 0; width: 100%; min-width: 0; min-height: 32px; margin: 0; padding: 5px 0; border: 0; border-radius: 0; background: transparent; color: var(--rhp-text); font: inherit; font-size: 13px; box-shadow: none; }
.rhp-search:focus-within { outline: 2px solid var(--rhp-teal); outline-offset: 2px; }
.rhp-search > input:focus-visible { outline: 0; }
.rhp-pager { flex-wrap: wrap; justify-content: space-between; min-height: 48px; padding: 12px 0; color: var(--rhp-muted); font-size: 12px; }
.rhp-pager .rhp-btn { min-height: 32px; padding: 5px 9px; font-size: 12px; }

dialog.rhp-dialog {
  width: min(620px, calc(100% - 32px));
  max-width: 620px;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #d2dbd6;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 18px 64px rgb(24 34 28 / 20%);
}

dialog.rhp-dialog::backdrop { background: rgb(22 29 25 / 44%); }
.rhp-dialog-head { position: sticky; top: 0; z-index: 1; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--rhp-line); background: #fff; }
.rhp-dialog-head > :first-child { min-width: 0; }
.rhp-dialog-form, .rhp-dialog > form:not(.rhp-dialog-form) { display: grid; gap: 16px; min-width: 0; margin: 0; padding: 18px 20px; }
.rhp-dialog-grid, .rhp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; min-width: 0; }
.rhp-field { display: grid; align-content: start; gap: 6px; min-width: 0; font-size: 13px; line-height: 1.5; }
.rhp-field.full { grid-column: 1 / -1; }
.rhp-field > label, .rhp-field > span { color: #44514a; font-size: 12px; font-weight: 600; }
.rhp-field small { color: var(--rhp-muted); font-size: 12px; overflow-wrap: anywhere; }
.rhp-field-note { margin: 0; color: var(--rhp-muted); font-size: 12px; overflow-wrap: anywhere; }

.rhp-field input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.rhp-field select,
.rhp-field textarea,
.rhp-secret > input {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid #ccd5d2;
  border-radius: 4px;
  background: #fff;
  color: var(--rhp-text);
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
}

.rhp-field textarea { min-height: 84px; max-height: 260px; resize: vertical; }
.rhp-field :is(input, select, textarea):disabled { border-color: #e0e5e3; background: #f4f6f5; color: #7b867f; cursor: not-allowed; }
.rhp-field :is(input, select, textarea)[aria-invalid="true"] { border-color: #c64135; }
.rhp-dialog-footer, .rhp-dialog form > footer { position: sticky; bottom: 0; z-index: 1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--rhp-line); background: #fff; }
.rhp-dialog form > footer { margin: 0 -20px -18px; }
.rhp-dialog form > .rhp-alert { display: flex; align-items: flex-start; gap: 8px; margin: 0; }
.rhp-toggle { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; color: var(--rhp-text); font-size: 13px; cursor: pointer; }
.rhp-toggle:has(input:disabled) { color: #7b867f; cursor: not-allowed; }
.rhp-secret { display: flex; align-items: center; gap: 6px; min-width: 0; }
.rhp-secret > input { flex: 1 1 0; font-family: Consolas, "Cascadia Mono", monospace; font-size: 12px; }
.rhp-secret > :is(.rhp-icon, .rhp-btn) { flex-shrink: 0; }
.rhp-error { margin: 0; color: #b42318; font-size: 12px; overflow-wrap: anywhere; }
.rhp-config-resource { width: 100%; min-width: 0; margin: 0; padding: 14px 0; border-bottom: 1px solid var(--rhp-line); }
.rhp-config-resource > header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.rhp-config-key { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 10px 12px; width: 100%; min-width: 0; padding: 12px 0; border-bottom: 1px solid #e8ecea; }
.rhp-config-key > * { min-width: 0; }
.rhp-config-resource .rhp-config-key:last-child { border-bottom: 0; }
.rhp-legacy { width: 100%; min-width: 0; margin: 0; padding: 12px 0; border-top: 1px solid var(--rhp-line, #dfe5e4); color: var(--rhp-text, #242a2c); font-size: 13px; line-height: 1.5; letter-spacing: 0; }
.rhp-legacy > summary { display: list-item; margin: 0; padding: 8px 0; border: 0; border-radius: 0; background: transparent; color: #52615a; font-size: 13px; font-weight: 600; line-height: 1.5; list-style-position: inside; overflow-wrap: anywhere; cursor: pointer; }
.rhp-legacy > summary::marker { color: #0f766e; }
.rhp-legacy[open] > summary { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--rhp-line, #dfe5e4); }
.rhp-legacy > summary:focus-visible { outline: 2px solid #0f766e; outline-offset: 2px; }

@media (max-width: 600px) {
  .rhp-toolbar { align-items: flex-start; gap: 12px; }
  .rhp-toolbar > :first-child { flex-basis: 100%; }
  .rhp-toolbar > .rhp-actions { width: 100%; }
  .rhp-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rhp-stat { padding: 12px; }
  .rhp-stat:nth-child(2n) { border-right: 0; }
  .rhp-stat:nth-child(-n + 2) { border-bottom: 1px solid var(--rhp-line); }
  .rhp-band > header, .rhp-band-header, .rhp-band-heading { align-items: flex-start; }
  .rhp-filters :is(input[type="search"], input[type="text"]) { width: 100%; }
  .rhp-filters .rhp-search { width: 100%; }
  .rhp-filters > label:has(input[type="search"]), .rhp-filters > label:has(input[type="text"]) { width: 100%; }
  .rhp-dialog-grid, .rhp-grid { grid-template-columns: minmax(0, 1fr); }
  dialog.rhp-dialog { width: calc(100% - 24px); max-height: 90dvh; }
  .rhp-dialog-head { padding: 14px 16px; }
  .rhp-dialog-form, .rhp-dialog > form:not(.rhp-dialog-form) { padding: 16px; }
  .rhp-dialog-footer, .rhp-dialog form > footer { gap: 8px; padding: 12px 16px; }
  .rhp-dialog form > footer { margin: 0 -16px -16px; }
  .rhp-dialog-footer > .rhp-btn:not(.rhp-icon), .rhp-dialog form > footer > .rhp-btn:not(.rhp-icon) { flex: 1 1 100px; }
  .rhp-config-key { grid-template-columns: minmax(0, 1fr); }
}
.rhi-dialog{width:min(960px,calc(100% - 32px))}.rhi-body{padding:20px 24px;overflow:auto;min-height:0}.rhi-tabs{display:flex;border-bottom:1px solid #d9dfdc;margin-bottom:20px;gap:12px}.rhi-tabs button{display:flex;align-items:center;gap:6px;font:inherit;font-weight:600;border:0;border-bottom:2px solid transparent;background:transparent;padding:10px 4px;color:#5d6b65;cursor:pointer}.rhi-tabs button[aria-selected=true]{border-color:#247969;color:#176554}.rhi-body textarea{width:100%;min-height:180px;resize:vertical;border:1px solid #cad5cf;border-radius:6px;padding:12px;font:13px/1.6 ui-monospace,monospace;box-sizing:border-box}.rhi-file{display:flex;gap:12px;flex-wrap:wrap;align-items:center}.rhi-file input{max-width:100%}.rhi-file small{color:#607169}.rhi-progress{display:flex;justify-content:space-between;gap:12px;margin-bottom:14px;flex-wrap:wrap}.rhi-rows{max-height:330px;overflow:auto}.rhi-rows th{position:sticky;top:0;background:#f5f8f6}.rhi-rows code{white-space:nowrap}.rhi-import-options{display:flex;align-items:center;gap:24px;flex-wrap:wrap;margin-top:20px}.rhi-import-options .rhp-field{max-width:250px}.rhi-collector-actions{display:flex;gap:10px;flex-wrap:wrap}.rhi-collector-actions a{text-decoration:none}.rhi-result{padding:24px 0;text-align:center;color:#226c5a}.rhi-result h4{font-size:22px;margin:12px 0}.rhi-result p{color:#596960}.rhi-pair{margin-top:18px}.rhi-body input[type=checkbox]{width:16px;height:16px;accent-color:#237565}.rhi-dialog .rhp-dialog-footer{margin:0}.rhi-dialog .rhp-field{min-width:0}@media(max-width:600px){.rhi-body{padding:16px}.rhi-collector-actions a{width:100%;justify-content:center}.rhi-dialog .rhp-dialog-footer{flex-wrap:wrap}.rhi-import-options{gap:10px}.rhi-rows{max-height:260px}.rhi-tabs button{font-size:14px}.rhp-pool-head{flex-wrap:wrap;gap:12px}}
