.elechouse-rfid-firmware-update {
  margin: 14px 0;
  color: #172033;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.erf-launcher {
  display: flex;
  justify-content: flex-end;
}

.erf-launch,
.erf-actions button {
  min-height: 40px;
  border: 1px solid #0f766e;
  border-radius: 6px;
  padding: 9px 14px;
  background: #0f766e;
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.erf-launch:hover,
.erf-actions button:hover {
  background: #115e59;
}

.erf-modal-open {
  overflow: hidden;
}

.erf-modal-backdrop {
  position: fixed;
  z-index: 100000;
  inset: 0;
  overflow-y: auto;
  padding: 28px 16px;
  background: rgba(15, 23, 42, 0.62);
}

.erf-modal-backdrop[hidden] {
  display: none;
}

.erf-dialog {
  width: min(980px, 100%);
  margin: 0 auto;
  border: 1px solid #d9e1ef;
  border-radius: 8px;
  padding: 20px;
  background: #ffffff;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.24);
}

.erf-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.erf-dialog-header h2 {
  margin: 0 0 5px;
  color: #111827;
  font-size: 22px;
  line-height: 1.2;
}

.erf-dialog-header p {
  max-width: 720px;
  margin: 0;
  color: #657188;
  font-size: 14px;
  line-height: 1.45;
}

.erf-close {
  display: inline-grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #374151;
  font: inherit;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.erf-close:hover {
  background: #f1f5f9;
}

.erf-status-row {
  display: flex;
  margin: 16px 0 12px;
}

.erf-grid,
.erf-release {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
}

.erf-grid label,
.erf-release div {
  display: grid;
  gap: 6px;
  margin: 0;
  color: #657188;
  font-size: 13px;
  font-weight: 600;
}

.erf-grid input,
.erf-grid select {
  width: 100%;
  box-sizing: border-box;
  min-height: 40px;
  border: 1px solid #c9d3e3;
  border-radius: 6px;
  padding: 8px 10px;
  background: #ffffff;
  color: #172033;
  font: inherit;
  font-size: 14px;
}

.erf-grid input[readonly] {
  background: #f7f9fc;
}

.erf-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.erf-actions button.erf-secondary {
  border-color: #c9d3e3;
  background: #ffffff;
  color: #24324a;
}

.erf-actions button.erf-secondary:hover {
  background: #f1f5f9;
}

.erf-actions button:disabled {
  border-color: #c9d3e3;
  background: #d8deea;
  color: #7a8498;
  cursor: not-allowed;
}

.erf-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 700;
}

.erf-pill.neutral,
.erf-message.neutral {
  background: #eef3fb;
  color: #40506a;
}

.erf-pill.ok,
.erf-message.ok {
  background: #e8f7ef;
  color: #17603a;
}

.erf-pill.warn,
.erf-message.warn {
  background: #fff6df;
  color: #795112;
}

.erf-pill.bad,
.erf-message.bad {
  background: #ffebec;
  color: #9d1f2d;
}

.erf-message {
  margin-top: 12px;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
}

.erf-release {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e6edf6;
}

.erf-release[hidden] {
  display: none;
}

.erf-release b {
  color: #23304a;
}

.erf-release span,
.erf-release code,
.erf-release pre {
  color: #172033;
  overflow-wrap: anywhere;
}

.erf-full {
  grid-column: 1 / -1;
}

.erf-release pre {
  min-height: 44px;
  margin: 0;
  padding: 10px;
  border-radius: 6px;
  background: #f7f9fc;
  white-space: pre-wrap;
}

.erf-installer {
  margin-top: 14px;
}

@media (max-width: 860px) {
  .erf-modal-backdrop {
    padding: 12px;
  }

  .erf-dialog {
    padding: 16px;
  }

  .erf-grid,
  .erf-release {
    grid-template-columns: 1fr;
  }

  .erf-full {
    grid-column: auto;
  }

  .erf-actions button {
    width: 100%;
  }
}
