.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; }
.col-1 { grid-column: span 1; }
.col-2 { grid-column: span 2; }
.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-6 { grid-column: span 6; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }
label { display: block; font-weight: 650; margin-bottom: 6px; }
input, select, textarea {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: var(--element);
  color: var(--text);
  font: inherit;
}
textarea { min-height: 84px; resize: vertical; }
input[type="checkbox"] { width: auto; }
.is-locked,
input[readonly].is-locked {
  border-style: dashed;
  background: color-mix(in srgb, var(--element) 62%, var(--panel));
  color: var(--muted);
}
.flow-parent-context {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.flow-parent-context span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--element) 58%, transparent);
  color: var(--muted);
  font-size: 12px;
}
.flow-parent-context b {
  color: var(--text);
}
.flow-combo { position: relative; }
.flow-combo-input-wrap { display: flex; align-items: center; gap: 6px; }
.flow-combo-input-wrap .flow-combo-value { flex: 1; min-width: 0; }
.flow-combo-clear {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line, #444);
  border-radius: 50%;
  background: transparent;
  color: var(--muted, #999);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background .15s, color .15s, border-color .15s;
}
.flow-combo-clear:hover { background: var(--danger, #e55); color: #fff; border-color: var(--danger, #e55); }
.flow-combo-clear[hidden] { display: none; }
.flow-combo-menu {
  display: none;
  position: absolute;
  z-index: 25;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 54px rgba(0,0,0,.34);
}
.flow-combo.open .flow-combo-menu,
.health-source-combo.open .flow-combo-menu { display: block; }
.flow-combo-search { margin-bottom: 8px; }
.flow-combo-list {
  max-height: 260px;
  overflow: auto;
  display: grid;
  gap: 4px;
}
.flow-combo-option,
.flow-combo-create {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.flow-combo-option:hover,
.flow-combo-option:focus,
.flow-combo-create:hover,
.flow-combo-create:focus {
  border-color: var(--line);
  background: color-mix(in srgb, var(--brand) 10%, var(--element));
  outline: none;
}
.flow-combo-option span { display: block; font-weight: 700; }
.flow-combo-option small { display: block; color: var(--muted); margin-top: 2px; }
.flow-combo-create {
  margin-top: 8px;
  border-color: var(--line);
  color: var(--brand);
}
.flow-combo-empty {
  padding: 10px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 7px;
}
.pricing-rules {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: color-mix(in srgb, var(--element) 46%, transparent);
}
.pricing-rules .split { align-items: flex-start; }
.pricing-rules .muted { margin: 2px 0 0; }
.assessment-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: color-mix(in srgb, var(--element) 34%, transparent);
}
.integration-box .split { align-items: center; }
.integration-row {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 12px;
}
.integration-row:first-child {
  border-top: 0;
  margin-top: 10px;
  padding-top: 0;
}
.integration-row-head {
  margin-bottom: 8px;
}
.integration-row h4 {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.pricing-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 10px;
}
.pricing-row-actions {
  min-width: 58px;
  display: flex;
  justify-content: flex-end;
}
.unit-input {
  display: flex;
  align-items: center;
}
.unit-input input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.unit-input span {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  background: color-mix(in srgb, var(--panel) 72%, var(--element));
  color: var(--muted);
  font-weight: 700;
}
.pricing-rule-line + .pricing-rule-line { margin-top: 4px; }
.pricing-detail {
  margin: 12px 0;
}
.pricing-detail > b {
  display: block;
  margin-bottom: 6px;
}
.resource-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: color-mix(in srgb, var(--element) 30%, transparent);
  margin-bottom: 14px;
}
.resource-block-head {
  margin-bottom: 12px;
}
.resource-block h3 {
  margin: 0;
  font-size: 16px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: var(--bg);
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  line-height: 1.2;
  font-weight: 700;
}
.btn:hover { text-decoration: none; filter: brightness(.96); }
.btn.secondary { background: transparent; color: var(--brand); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.small { padding: 5px 9px; font-size: 12px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.global-monitor-widget {
  position: fixed;
  top: 76px;
  right: 14px;
  z-index: 7400;
  width: min(430px, calc(100vw - 28px));
  min-width: 300px;
  min-height: 156px;
  max-width: calc(100vw - 16px);
  max-height: calc(100vh - 16px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  box-shadow: 0 14px 42px rgba(0,0,0,.26);
  overflow: hidden;
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
}
.global-monitor-widget[hidden] { display: none; }
.global-monitor-widget.is-ok {
  border-color: color-mix(in srgb, var(--success) 46%, var(--line));
}
.global-monitor-widget.is-alert {
  border-color: color-mix(in srgb, var(--warning) 78%, var(--line));
  box-shadow: 0 16px 46px color-mix(in srgb, var(--warning) 18%, rgba(0,0,0,.22));
}
.global-monitor-widget.is-danger {
  border-color: color-mix(in srgb, var(--danger) 82%, var(--line));
  box-shadow: 0 16px 46px color-mix(in srgb, var(--danger) 20%, rgba(0,0,0,.22));
}
.global-monitor-widget.is-warning {
  border-color: color-mix(in srgb, var(--warning) 78%, var(--line));
  box-shadow: 0 16px 46px color-mix(in srgb, var(--warning) 18%, rgba(0,0,0,.22));
}
.global-monitor-widget.is-moving,
.global-monitor-widget.is-resizing {
  user-select: none;
}
.global-monitor-head {
  display: grid;
  gap: 7px;
  min-height: 42px;
  padding: 9px 11px 10px;
  border-bottom: 1px solid var(--line);
  cursor: move;
}
.global-monitor-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.global-monitor-row-main {
  flex-wrap: nowrap;
}
.global-monitor-row-actions {
  flex-wrap: wrap;
}
.global-monitor-head b {
  color: var(--text);
  flex: 0 0 auto;
  font-size: 13px;
  white-space: nowrap;
}
.global-monitor-status-label {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.global-monitor-head [data-global-monitor-state] {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.global-monitor-widget.is-alert .global-monitor-head [data-global-monitor-state] {
  color: var(--warning);
  font-weight: 800;
}
.global-monitor-widget.is-danger .global-monitor-head [data-global-monitor-state] {
  color: var(--danger);
}
.global-monitor-head a {
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.global-monitor-head button,
.global-monitor-head a,
.global-monitor-head input,
.global-monitor-head label {
  cursor: auto;
}
.global-monitor-sound,
.global-monitor-ack {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--element);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 7px 9px;
  white-space: nowrap;
}
.global-monitor-row-actions .global-monitor-sound,
.global-monitor-row-actions .global-monitor-ack {
  flex: 0 1 auto;
}
.global-monitor-ack[hidden] { display: none; }
.global-monitor-sound:hover,
.global-monitor-sound:focus-visible,
.global-monitor-ack:hover,
.global-monitor-ack:focus-visible {
  border-color: var(--brand);
  color: var(--brand);
  outline: none;
}
.global-monitor-sound.is-on {
  border-color: color-mix(in srgb, var(--success) 52%, var(--line));
  color: var(--success);
}
.global-monitor-widget.is-alert .global-monitor-sound.needs-enable {
  border-color: color-mix(in srgb, var(--danger) 64%, var(--line));
  color: var(--danger);
}
.global-monitor-widget.is-alert .global-monitor-ack {
  border-color: color-mix(in srgb, var(--danger) 64%, var(--line));
  color: var(--danger);
}
.global-monitor-ack.is-snoozed {
  border-color: color-mix(in srgb, var(--warning) 54%, var(--line));
  color: var(--warning);
}
.global-monitor-interval {
  display: inline-grid;
  grid-template-columns: auto 48px auto;
  flex: 0 0 auto;
  gap: 4px;
  align-items: center;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.global-monitor-detail {
  flex: 0 0 auto;
}
.global-monitor-interval span,
.global-monitor-interval em {
  font-style: normal;
}
.global-monitor-interval input {
  width: 48px;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 5px;
  background: var(--element);
  color: var(--text);
  font: inherit;
  text-align: center;
}
.global-monitor-interval input:focus {
  border-color: var(--brand);
  outline: none;
}
.global-monitor-feed {
  flex: 1 1 auto;
  min-height: 70px;
  overflow: auto;
  padding: 7px 11px 10px;
}
.global-monitor-resize {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 18px;
  height: 18px;
  border: 0;
  background:
    linear-gradient(135deg, transparent 0 48%, color-mix(in srgb, var(--muted) 70%, transparent) 49% 54%, transparent 55%),
    linear-gradient(135deg, transparent 0 66%, color-mix(in srgb, var(--muted) 70%, transparent) 67% 72%, transparent 73%);
  cursor: nwse-resize;
  opacity: .72;
}
.global-monitor-resize:hover,
.global-monitor-resize:focus-visible {
  opacity: 1;
  outline: none;
}
.global-monitor-line {
  overflow: hidden;
  padding: 4px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.global-monitor-line.danger { color: var(--danger); font-weight: 800; }
.global-monitor-line.warning { color: var(--warning); font-weight: 800; }
.global-monitor-line.info { color: var(--brand); }
.global-monitor-line.ok { color: var(--success); }
table { width: 100%; border-collapse: collapse; background: transparent; }
th, td { border-bottom: 1px solid var(--line); padding: 12px 10px; text-align: left; vertical-align: top; }
th { font-size: 12px; color: var(--muted); background: color-mix(in srgb, var(--element) 76%, transparent); }
.tag {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  background: var(--element);
  margin: 1px 3px 1px 0;
}
.health-picker { display: flex; flex-direction: column; gap: 12px; }
.health-picker-row {
  display: grid;
  grid-template-columns: 130px 170px minmax(0, 1fr);
  gap: 10px;
  align-items: end;
}
.health-picked-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}
.health-stage-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) minmax(220px, .55fr) 120px;
  gap: 10px;
  align-items: start;
}
.health-picker-row > label,
.health-picked-row > label,
.health-stage-row > label {
  margin: 0 0 9px;
}
.health-key-combo {
  position: relative;
  display: flex;
  min-height: 38px;
}
.health-key-combo input {
  flex: 1;
  min-width: 0;
  height: 38px;
  border: 1px solid var(--line);
  border-left: 0;
  border-right: 0;
  background: var(--panel);
  color: var(--text);
}
.health-key-toggle {
  width: 40px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}
.health-key-toggle.left { border-right: 0; }
.health-key-toggle.right { border-left: 0; }
.health-key-menu {
  display: none;
  position: absolute;
  z-index: 21;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 14px 30px color-mix(in srgb, #000 18%, transparent);
  padding: 6px;
}
.health-key-combo.open .health-key-menu { display: block; }
.health-key-option {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 7px 8px;
  cursor: pointer;
}
.health-key-option:hover,
.health-key-option.active {
  background: color-mix(in srgb, var(--brand) 12%, var(--element));
}
.health-dropdown { position: relative; }
.health-dropdown-trigger {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  text-align: center;
  padding: 0;
  cursor: pointer;
}
.health-dropdown-trigger b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 400;
  text-align: left;
}
.health-dropdown-trigger span {
  color: var(--muted);
}
.health-model-list {
  display: none;
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 14px 30px color-mix(in srgb, #000 18%, transparent);
  padding: 8px;
}
.health-dropdown.open .health-model-list { display: block; }
.health-model-option {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 7px 5px;
}
.health-model-option.all {
  border-bottom: 1px solid var(--line);
  margin-bottom: 5px;
  padding-bottom: 9px;
  font-weight: 600;
}
.health-selected-tags {
  min-height: 40px;
  border: 1px solid var(--line);
  background: var(--element);
  padding: 7px;
}
.health-stage-row input {
  min-height: 40px;
}
.health-stage-row .btn {
  min-height: 40px;
}
.btn.loading::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -2px;
  animation: flowhub-spin .75s linear infinite;
}
@keyframes flowhub-spin {
  to { transform: rotate(360deg); }
}
.health-source-combo {
  position: relative;
}
.health-source-combo > input[type="text"] {
  width: 100%;
}
.health-model-tag { cursor: pointer; }
.flowhub-live-refresh-control {
  width: auto;
  margin: 0;
  display: inline-grid;
  grid-template-columns: auto 70px auto;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.flowhub-live-refresh-control input {
  min-width: 0;
  height: 32px;
  padding: 4px 7px;
}
.flowhub-live-refresh-control em {
  font-style: normal;
}
.health-probe-sections {
  display: grid;
  gap: 14px;
}
.health-probe-group {
  display: grid;
  gap: 6px;
}
.health-probe-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.health-probe-group-label {
  color: var(--text);
  font-weight: 800;
}
.health-probe-stagger {
  width: auto;
  margin: 0;
  display: inline-grid;
  grid-template-columns: auto 78px auto;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.health-probe-stagger input {
  min-width: 0;
  height: 30px;
  padding: 4px 7px;
}
.health-probe-stagger em {
  font-style: normal;
}
.health-probe-options {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--element);
  padding: 10px;
  display: grid;
  gap: 10px;
}
@media (max-width: 900px) {
  .health-stage-row {
    grid-template-columns: 1fr;
  }
}
.health-probe-tier {
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}
.health-probe-tier-label {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  font-weight: 800;
  padding: 9px 10px;
  display: flex;
  align-items: center;
}
.health-probe-tier-items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.health-probe-tier-items-1 {
  grid-template-columns: minmax(0, 1fr);
}
.health-probe-tier-items-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.health-probe-tier-items-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.health-probe-option {
  min-height: 46px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 8px 9px;
}
.health-probe-option .health-probe-toggle {
  margin: 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.health-probe-option .health-probe-toggle span {
  min-width: 0;
  flex: 1;
  font-weight: 700;
}
.health-probe-period {
  width: auto;
  margin: 0;
  display: grid;
  grid-template-columns: auto 56px auto;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.health-probe-period input {
  min-width: 0;
  height: 28px;
  padding: 4px 6px;
}
.health-probe-period em {
  font-style: normal;
}
.health-probe-tip {
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--element);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  cursor: help;
  flex: 0 0 22px;
}
.health-probe-tip:hover,
.health-probe-tip:focus {
  border-color: var(--brand);
  color: var(--brand);
}
@media (max-width: 900px) {
  .health-probe-tier {
    grid-template-columns: 1fr;
  }
  .health-probe-tier-items,
  .health-probe-tier-items-1,
  .health-probe-tier-items-2,
  .health-probe-tier-items-3 {
    grid-template-columns: 1fr;
  }
  .health-probe-option {
    grid-template-columns: minmax(0, 1fr) 22px;
  }
  .health-probe-period {
    grid-column: 1 / -1;
  }
}
.health-advanced {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--element) 72%, transparent);
  padding: 10px 12px;
}
.health-advanced summary {
  cursor: pointer;
  color: var(--brand);
  font-weight: 700;
}
.health-advanced .grid {
  margin-top: 10px;
}
.tool-title { display: flex; flex-direction: column; gap: 6px; }
.tool-title h2 { margin: 0; font-size: 30px; line-height: 1.1; }
.tool-title p { margin: 0; }
.notice {
  border-left: 4px solid var(--brand);
  background: color-mix(in srgb, var(--brand) 10%, var(--panel));
  padding: 13px 14px;
  margin-bottom: 16px;
}
.status-row { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--element);
  padding: 7px 12px;
  color: var(--muted);
  font-size: 12px;
  font-family: inherit;
}
.status-filter { cursor: pointer; }
.status-filter.active {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 18%, transparent);
}
.status-badge.success { border-color: color-mix(in srgb, var(--success) 36%, transparent); color: var(--success); background: color-mix(in srgb, var(--success) 9%, var(--element)); }
.status-badge.danger { border-color: color-mix(in srgb, var(--danger) 36%, transparent); color: var(--danger); background: color-mix(in srgb, var(--danger) 9%, var(--element)); }
.status-badge.info { border-color: color-mix(in srgb, var(--info) 36%, transparent); color: var(--info); background: color-mix(in srgb, var(--info) 9%, var(--element)); }
.status-badge.warning { border-color: color-mix(in srgb, var(--warning) 36%, transparent); color: var(--warning); background: color-mix(in srgb, var(--warning) 9%, var(--element)); }
.two-line-cell,
.balance-monitor-cell {
  display: grid;
  gap: 3px;
  line-height: 1.35;
}
.two-line-cell span,
.balance-monitor-cell span {
  color: var(--muted);
  font-size: 12px;
}
.balance-monitor-cell b {
  font-size: 13px;
}
.price-compare-compact {
  display: inline-grid;
  gap: 4px;
  min-width: 190px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--element);
  padding: 7px 9px;
  font-size: 12px;
  line-height: 1.35;
  position: relative;
  cursor: help;
}
.price-compare-compact > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.price-compare-compact.success { border-color: color-mix(in srgb, var(--success) 40%, var(--line)); color: var(--success); background: color-mix(in srgb, var(--success) 9%, var(--element)); }
.price-compare-compact.danger { border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); color: var(--danger); background: color-mix(in srgb, var(--danger) 9%, var(--element)); }
.price-compare-compact.warning { border-color: color-mix(in srgb, var(--warning) 40%, var(--line)); color: var(--warning); background: color-mix(in srgb, var(--warning) 9%, var(--element)); }
.price-compare-compact.muted { border-color: color-mix(in srgb, var(--muted) 30%, var(--line)); color: var(--muted); background: color-mix(in srgb, var(--muted) 5%, var(--element)); }
.price-compare-compact .success { color: var(--success); }
.price-compare-compact .warning { color: var(--warning); }
.price-compare-compact .danger { color: var(--danger); }
.price-compare-compact .muted { color: var(--muted); }
.price-compare-compact:hover::after {
  content: attr(data-tip);
  position: absolute;
  z-index: 80;
  left: 0;
  top: calc(100% + 8px);
  width: min(420px, 78vw);
  white-space: pre-line;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: 0 18px 46px rgba(0,0,0,.36);
  padding: 10px 12px;
  border-radius: 6px;
  line-height: 1.55;
}
.price-compare-counts {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.price-compare-counts span {
  font-weight: 700;
}
.price-compare-counts .price-diff { color: var(--danger); }
.price-compare-counts .shape-diff { color: var(--warning); }
.price-compare-counts .extra { color: var(--info); }
.price-compare-counts .missing { color: #d14f8f; }
.price-compare-counts .same { color: var(--success); }
.progress {
  height: 6px;
  background: var(--element);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--brand);
  transition: width .25s ease;
}
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 9px 12px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.tld-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 330px;
  overflow: auto;
  padding: 2px 0;
}
.tld-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 11px;
  background: var(--element);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.tld-item:hover,
.tld-item.selected {
  border-color: var(--brand);
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 10%, var(--element));
}
.tld-item .price { color: var(--muted); font-size: 11px; }
.result-list { list-style: none; margin: 0; padding: 0; }
.result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 6px;
  border-bottom: 1px solid var(--line);
}
.result-item:last-child { border-bottom: 0; }
.result-item .domain-name { flex: 1; font-weight: 650; }
.result-item .price-tag { color: var(--muted); white-space: nowrap; }

/* ============================================
   Password input with eye toggle
   ============================================ */
.password-input {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
}
.password-input input {
  flex: 1;
  padding-right: 38px; /* 给按钮留位置 */
  min-width: 0;
}
.password-toggle-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-radius: 3px;
  font-size: 15px;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}
.password-toggle-btn:hover { background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--text); }
.password-toggle-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.password-toggle-icon { display: inline-flex; align-items: center; justify-content: center; }
.password-toggle-icon[hidden] { display: none; }


/* ============================================
   Balance monitor status badges
   ============================================ */
.balance-state-line { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* 脉冲动画：提醒性强但不刺眼 */
@keyframes balance-status-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 45%, transparent); }
  50%      { box-shadow: 0 0 0 6px color-mix(in srgb, currentColor 0%, transparent); }
}
.balance-status-pulse { animation: balance-status-pulse 1.8s ease-in-out infinite; }
.balance-status-pulse.warning { animation-duration: 2.2s; }

/* 原生 title 之外提供一个基于 data-tooltip 的浮窗（更宽，支持换行） */
.balance-status-with-tip { position: relative; cursor: help; }
.balance-status-with-tip::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 40;
  max-width: 520px;
  min-width: 240px;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font: 12px/1.5 var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  white-space: pre-wrap;
  box-shadow: 0 10px 32px rgba(0, 0, 0, .35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .12s ease, transform .12s ease, visibility .12s;
  pointer-events: none;
}
.balance-status-with-tip:hover::after,
.balance-status-with-tip:focus-within::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
/* Prefer showing above if close to viewport bottom */
.balance-task-cell { overflow: visible !important; }

/* 轻量 tooltip：用在任何 [data-tooltip] 元素（可选扩散到平台层） */
[data-tooltip].tip-above::after { top: auto; bottom: calc(100% + 6px); }


/* Inline icon button (used for balance recharge, refresh, etc.) */
.balance-inline-icon-btn,
.balance-refresh-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-right: 6px;
  padding: 0;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
  vertical-align: -4px;
  transition: color .12s, background .12s, border-color .12s, transform .12s;
}
.balance-inline-icon-btn:hover,
.balance-inline-icon-btn:focus,
.balance-refresh-icon-btn:hover,
.balance-refresh-icon-btn:focus {
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  border-color: color-mix(in srgb, var(--brand) 35%, transparent);
  transform: translateY(-1px);
  outline: none;
}
.balance-inline-icon-btn svg,
.balance-refresh-icon-btn svg {
  display: block;
}
.balance-refresh-inline {
  display: inline-flex;
  margin: 0;
}
