/* ── Backdrop ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* ── Modal card ── */
.modal {
  background: #1e2130;
  border: 1px solid #2e3348;
  border-radius: 10px;
  padding: 2rem;
  width: 360px;
  max-width: 90vw;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: #8892a4;
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
}
.modal-close:hover {
  color: #e2e8f0;
}

/* ── Tabs ── */
.modal-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid #2e3348;
  margin-bottom: 0.25rem;
}

.modal-tab {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: #8892a4;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.5rem;
  transition:
    color 0.15s,
    border-color 0.15s;
}
.modal-tab.active {
  color: #e2e8f0;
  border-bottom-color: #5865f2;
}
.modal-tab:hover:not(.active) {
  color: #cbd5e1;
}

/* ── Form ── */
.modal-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.modal-form label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  color: #8892a4;
  font-size: 0.8rem;
}

.modal-form input {
  background: #141622;
  border: 1px solid #2e3348;
  border-radius: 6px;
  color: #e2e8f0;
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  outline: none;
}
.modal-form input:focus {
  border-color: #5865f2;
}

.modal-error {
  color: #f87171;
  font-size: 0.8rem;
  margin: 0;
}

/* ── Buttons ── */
.btn-primary {
  background: #5865f2;
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem;
  transition: background 0.15s;
}
.btn-primary:hover:not(:disabled) {
  background: #4752c4;
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ── Divider ── */
.modal-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #4a5568;
  font-size: 0.75rem;
}
.modal-divider::before,
.modal-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #2e3348;
}

/* ── Discord button ── */
.btn-discord {
  align-items: center;
  background: #5865f2;
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  display: flex;
  font-size: 0.9rem;
  font-weight: 600;
  gap: 0.5rem;
  justify-content: center;
  padding: 0.6rem;
  transition: background 0.15s;
}
.btn-discord:hover {
  background: #4752c4;
}
