.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 50;
}
#modalBackdrop {
  z-index: 3000;
}
.modal-backdrop.open {
  display: flex;
}
.modal {
  width: min(560px, 100%);
  background: rgba(15, 26, 46, 0.96);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.modal.learn-add-modal {
  width: min(1400px, 96vw);
}
.modal.modal-wide {
  width: min(1200px, 100%);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.18);
}
.modal-title {
  font-weight: 800;
  font-size: 13px;
}
.modal-x {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  cursor: pointer;
}
.modal-body {
  padding: 14px;
  display: grid;
  gap: 12px;
  overflow: auto;
  min-height: 0;
}
.modal-message {
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  white-space: pre-line;
}
.modal-input {
  margin-top: 2px;
}
.modal-actions {
  display: flex;
  justify-content: end;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.14);
}

/* Simple tabs (QR modal) */
.tabs {
  display: flex;
  gap: 8px;
}
.tab-btn {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 800;
}
.tab-btn.active {
  border-color: rgba(144, 250, 235, 0.45);
  box-shadow: 0 0 0 2px rgba(144, 250, 235, 0.12) inset;
}


