/* klevs FX trading App — shared auth modal (register / login / forgot password) */

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(2, 6, 18, 0.82);
  backdrop-filter: blur(10px);
  overflow-y: auto;
}

.auth-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  background: rgba(13, 21, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  padding: 1.6rem 1.6rem 1.8rem;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.55);
  color: var(--text, #e8eefb);
}

.auth-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: transparent;
  color: var(--muted, #94a3b8);
  font-size: 0.95rem;
  cursor: pointer;
}
.auth-close:hover { background: rgba(148, 163, 184, 0.15); color: #fff; }

.auth-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.auth-tab {
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: transparent;
  color: var(--muted, #94a3b8);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}
.auth-tab.active {
  background: linear-gradient(135deg, var(--brand, #22d3ee), var(--accent, #6366f1));
  border-color: transparent;
  color: #06121f;
}

.auth-view h3 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  color: var(--text, #e8eefb);
}

.auth-sub {
  margin: 0 0 1.15rem;
  color: var(--muted, #94a3b8);
  font-size: 0.92rem;
  line-height: 1.55;
}

.auth-field {
  display: block;
  margin-bottom: 1rem;
}

.auth-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted, #94a3b8);
  margin-bottom: 0.4rem;
}

.auth-field input,
.auth-field select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 11px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(2, 6, 18, 0.55);
  color: var(--text, #e8eefb);
  font: inherit;
  font-size: 0.95rem;
}
.auth-field input:focus,
.auth-field select:focus {
  outline: 2px solid var(--brand, #22d3ee);
  outline-offset: 1px;
  border-color: transparent;
}

.pw-row { display: flex; gap: 0.5rem; }
.pw-row input { flex: 1; }

.pw-toggle {
  width: 46px;
  flex: 0 0 46px;
  border-radius: 11px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(2, 6, 18, 0.55);
  cursor: pointer;
  font-size: 1.05rem;
}
.pw-toggle:hover { background: rgba(148, 163, 184, 0.18); }

.pw-meter {
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  margin: 0.65rem 0 0.35rem;
  overflow: hidden;
}
.pw-meter i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: #64748b;
  transition: width 0.25s ease, background 0.25s ease;
}
.pw-meter i.st-weak { background: #ef4444; }
.pw-meter i.st-fair { background: #f59e0b; }
.pw-meter i.st-strong { background: #22c55e; }
.pw-meter i.st-vstrong { background: #10b981; }

.pw-strength {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted, #94a3b8);
}
.pw-strength.st-weak { color: #ef4444; }
.pw-strength.st-fair { color: #f59e0b; }
.pw-strength.st-strong { color: #22c55e; }
.pw-strength.st-vstrong { color: #10b981; }

.pw-checklist {
  list-style: none;
  margin: 0.55rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem 0.85rem;
}
.pw-checklist li {
  font-size: 0.78rem;
  color: var(--muted, #94a3b8);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.pw-checklist li .tick {
  font-weight: 700;
  color: #64748b;
}
.pw-checklist li.ok { color: #34d399; }
.pw-checklist li.ok .tick { color: #34d399; }

.auth-note {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--muted, #94a3b8);
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  margin: 0.85rem 0 1.15rem;
}

.auth-submit {
  width: 100%;
  padding: 0.85rem 1.15rem;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--brand, #22d3ee), var(--accent, #6366f1));
  color: #06121f;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 800;
  cursor: pointer;
}
.auth-submit:hover { filter: brightness(1.08); }
.auth-submit:disabled { opacity: 0.6; cursor: wait; }

.auth-link {
  display: block;
  width: 100%;
  margin-top: 0.9rem;
  background: none;
  border: none;
  color: var(--brand, #22d3ee);
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  text-decoration: underline;
}

.auth-success { text-align: center; padding: 1.2rem 0 0.4rem; }
.auth-check {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #22d3ee);
  color: #052e1b;
  font-size: 2rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-success p { color: var(--muted, #94a3b8); line-height: 1.6; }

/* ---- payments (plan, method, invoice, status) ---- */
.auth-modal [hidden] { display: none !important; }
.auth-error {
  background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fecaca; border-radius: 10px; padding: 9px 12px; margin-bottom: 12px; font-size: 13px;
}
.auth-error[hidden] { display: none; }
.pay-plans, .pay-methods { display: grid; gap: 8px; margin: 12px 0; }
.pay-opt {
  display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: 10px; cursor: pointer;
  border: 1px solid rgba(148, 163, 184, 0.25); background: rgba(15, 23, 42, 0.5); font-size: 14px;
}
.pay-opt span { color: var(--muted, #94a3b8); font-size: 13px; }
.pay-opt.selected { border-color: #60a5fa; background: rgba(96, 165, 250, 0.12); }
.pay-opt.disabled { opacity: 0.5; cursor: not-allowed; }
.pay-box {
  border: 1px solid rgba(148, 163, 184, 0.25); border-radius: 12px; padding: 12px 14px;
  background: rgba(15, 23, 42, 0.6); margin: 12px 0;
}
.pay-line { display: flex; gap: 12px; justify-content: space-between; align-items: baseline; padding: 6px 0; font-size: 13px; }
.pay-line span { color: var(--muted, #94a3b8); white-space: nowrap; }
.pay-line code { text-align: right; word-break: break-all; font-size: 12px; }
.pay-addr { user-select: all; }
.inv-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.85em; color: #93c5fd; }
#pay-network-wrap { margin: 4px 0 8px; }
