.qbc-maint-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #fed7aa;
  border-radius: 6px;
  background: #fff7ed;
  color: #c2410c;
  padding: 2px 8px;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 600;
  white-space: nowrap;
  cursor: help;
}

.qbc-maint-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #f97316;
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.18);
}

.qbc-maint-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
}

.qbc-maint-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
  color: #c2410c;
  padding: 6px 12px;
  font-size: 13px;
  line-height: 1;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.qbc-maint-toggle:hover {
  border-color: #fdba74;
  background: #ffedd5;
  color: #9a3412;
}

.qbc-maint-toggle.is-active {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.qbc-maint-toggle.is-active:hover {
  border-color: #86efac;
  background: #dcfce7;
  color: #166534;
}

.qbc-maint-toggle.is-detail {
  padding: 10px 16px;
  font-size: 14px;
}

button.qbc-maint-blocked,
button.qbc-maint-blocked:hover {
  cursor: not-allowed;
  opacity: 0.55;
  border-color: #fed7aa !important;
  background: #fff7ed !important;
  color: #b45309 !important;
}

.qbc-maint-detail-hint {
  border-color: #fed7aa !important;
  color: #b45309 !important;
}

.qbc-maint-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(4px);
}

.qbc-maint-dialog {
  width: min(480px, 100%);
  overflow: hidden;
  border: 1px solid #fed7aa;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 28px 80px -28px rgba(15, 23, 42, 0.55);
  animation: qbc-maint-in 0.18s ease-out;
}

@keyframes qbc-maint-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.qbc-maint-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #ffedd5;
  background: linear-gradient(135deg, #fff7ed, #ffffff 70%);
  padding: 18px 20px;
}

.qbc-maint-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #7c2d12;
}

.qbc-maint-header p {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: #9a3412;
}

.qbc-maint-close {
  border: none;
  background: transparent;
  color: #b45309;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.qbc-maint-body {
  padding: 18px 20px;
}

.qbc-maint-target {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #ffedd5;
  border-radius: 10px;
  background: #fffbf5;
  padding: 10px 12px;
  font-size: 13px;
  color: #9a3412;
}

.qbc-maint-target strong {
  font-weight: 600;
  color: #7c2d12;
  word-break: break-all;
}

.qbc-maint-field {
  display: block;
  margin-top: 14px;
}

.qbc-maint-field span {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #475569;
}

.qbc-maint-field textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.6;
  outline: none;
  color: #0f172a;
}

.qbc-maint-field textarea:focus {
  border-color: #fb923c;
  box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.14);
}

.qbc-maint-status {
  min-height: 18px;
  margin: 12px 0 0;
  font-size: 12px;
  color: #64748b;
}

.qbc-maint-status[data-tone="success"] {
  color: #15803d;
}

.qbc-maint-status[data-tone="error"] {
  color: #b91c1c;
}

.qbc-maint-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid #f1f5f9;
  background: #f8fafc;
  padding: 14px 20px;
}

.qbc-maint-footer button {
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.qbc-maint-cancel {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
}

.qbc-maint-cancel:hover {
  background: #f1f5f9;
}

.qbc-maint-save {
  border: 1px solid #ea580c;
  background: #ea580c;
  color: #fff;
}

.qbc-maint-save:hover {
  background: #c2410c;
  border-color: #c2410c;
}

.qbc-maint-save:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .qbc-maint-toggle {
    padding: 5px 9px;
    font-size: 12px;
  }

  .qbc-maint-dialog {
    border-radius: 14px;
  }
}
