main.container-fluid {
  min-height: 60vh;
  display: flex;
}

.auth-container {
  flex: 1;
  display: flex;
  align-items: center; /* босоогоор төвд */
  justify-content: center; /* хэвтээгээр төвд */
  color: white;
}

.auth-card {
  background: var(--card-bg);
  padding: 30px;
  width: 100%;
  max-width: 400px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.auth-card h2 {
  text-align: center;
  margin-bottom: 20px;
}

.auth-card .btn-primary {
  display: inline-flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  border: 0;
  border-radius: 0.8rem;
  padding: 0.75rem 1.15rem;
  font-size: 0.94rem;
  font-weight: 700;
  color: #071827;
  background: var(--custom-blue, #42a9e1);
  box-shadow: 0 8px 22px rgba(66, 169, 225, 0.2);
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.auth-card .btn-primary:hover:not(:disabled),
.auth-card .btn-primary:focus-visible {
  color: #071827;
  background: #69c1eb;
  transform: translateY(-2px);
}

.auth-card .btn-primary:active:not(:disabled) {
  color: #071827;
  background: #69c1eb;
  transform: translateY(0);
}

.auth-card .btn-primary:focus-visible {
  outline: 2px solid var(--custom-blue);
  outline-offset: 3px;
}

.auth-link {
  text-align: center;
  margin-top: 15px;
}

.auth-link a {
  color: var(--custom-blue);
  text-decoration: none;
}

/* REGISTER */

.register-progress {
  display: flex;
  gap: 12px;
  margin: 24px 0;
}

.progress-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #8993a4;
}

.progress-step span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #16213e;
  border: 1px solid #334155;
}

.progress-step.active span {
  background: #0f3460;
  border-color: #42a9e1;
  color: #fff;
}

.progress-step.active {
  color: #e6e6e6;
}

.progress-step small {
  text-align: center;
  font-size: 11px;
}

.register-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 20px 0;
}

.method-option {
  cursor: pointer;
}

.method-option input {
  position: absolute;
  opacity: 0;
}

.method-option span {
  display: block;
  padding: 18px 10px;
  text-align: center;
  border: 1px solid #334155;
  border-radius: 10px;
  background: #16213e;
  color: #e6e6e6;
  transition: 0.2s ease;
}

.method-option input:checked + span {
  border-color: #42a9e1;
  background: #0f3460;
}

.method-option input:focus-visible + span {
  outline: 2px solid #42a9e1;
  outline-offset: 3px;
}

.register-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.register-actions button {
  flex: 1;
}

.field-error {
  color: #ff6b81;
  font-size: 13px;
  margin-top: 5px;
}

.auth-card .btn-secondary {
  border: 1px solid #334155;
  background: transparent;
  color: #e6e6e6;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  margin-top: 10px;
}
/* ===== auth.css-ийн төгсгөлд нэмнэ ===== */

/* radio input-ыг байрлуулахад container хэрэгтэй */
.method-option {
  position: relative;
  display: block;
}

.register-methods + .field-error {
  margin-bottom: 12px;
}

/* a.btn-primary, button.btn-primary адил харагдана */
.auth-card a.btn-primary,
.auth-card button.btn-primary {
  text-align: center;
  text-decoration: none;
}

.auth-card .btn-primary:disabled {
  cursor: not-allowed;
}

.auth-card .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* ===== Step 3: баталгаажуулалт ===== */

.verification-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
}

.verification-box p {
  margin: 0;
}

.verify-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 8px;
  padding: 14px 10px 14px 18px; /* letter-spacing-ийн баруун хоосон зайг тэнцүүлнэ */
  background: #16213e;
  border: 1px dashed #42a9e1;
  border-radius: 10px;
  color: #fff;
  user-select: all;
}

.sms-button {
  padding: 12px;
}

.verification-price {
  color: #8993a4;
  font-size: 14px;
}

.verification-hint {
  font-size: 14px;
  color: #cfd6e4;
}

.verify-timer {
  color: #8993a4;
  font-size: 14px;
  text-align: center;
}

.verify-timer b {
  color: #fff;
  font-variant-numeric: tabular-nums;
}

/* Имэйл: дахин илгээх товч */
.btn-link {
  width: 100%;
  padding: 10px;
  margin-top: 6px;
  background: none;
  border: none;
  color: var(--custom-blue);
  cursor: pointer;
  font-size: 14px;
}

.btn-link:disabled {
  color: #8993a4;
  cursor: not-allowed;
}

.btn-link:not(:disabled):hover {
  text-decoration: underline;
}

/* Registration and password recovery */
.auth-flow-card { max-width: 460px; padding: 32px; border-radius: 22px; background: linear-gradient(145deg, #1c293e, var(--card-bg)); box-shadow: 0 20px 60px #00000020; }
.auth-flow-card h2 { font-size: 1.55rem; font-weight: 750; letter-spacing: -.035em; margin-bottom: 28px; }
.auth-flow-card h3 { font-size: 1.05rem; line-height: 1.5; font-weight: 650; margin-bottom: 18px; }
.auth-flow-card .register-progress { display: block; margin: 0 0 18px; }
.auth-step-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; padding: 0; margin: 0; }
.auth-flow-card .progress-step { position: relative; gap: 11px; min-width: 0; color: #8495ad; }
.auth-flow-card .progress-step:not(:last-child)::after { content: ''; position: absolute; top: 20px; left: calc(50% + 25px); width: calc(100% - 50px); height: 2px; background: #34445a; }
.auth-flow-card .progress-step.complete::after { background: var(--custom-blue); }
.auth-flow-card .progress-step span { width: 40px; height: 40px; background: #182438; border: 1px solid #3a4b63; font-size: .85rem; font-weight: 700; }
.auth-flow-card .progress-step.current { color: #e6f4ff; }
.auth-flow-card .progress-step.current span { background: var(--custom-blue); color: #071827; border-color: var(--custom-blue); box-shadow: 0 0 0 5px #42a9e117, 0 5px 16px #42a9e125; }
.auth-flow-card .progress-step.complete span { color: #7dd0f5; background: #42a9e11a; border-color: #42a9e160; }
.auth-flow-card .progress-step small { font-size: .65rem; line-height: 1.4; overflow-wrap: anywhere; }
.auth-step-caption { color: #7dbde1; font-size: .62rem; font-weight: 700; letter-spacing: .15em; padding-bottom: 22px; margin-bottom: 24px; border-bottom: 1px solid #ffffff0c; }
.auth-flow-card .register-methods { gap: 12px; margin: 20px 0 24px; }
.auth-flow-card .method-option > span { display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 22px 10px; min-height: 150px; border-radius: 16px; background: #142034; border-color: #34445a; }
.auth-flow-card .method-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #ffffff06; color: #8babc6; font-size: 1.2rem; }
.auth-flow-card .method-option strong { font-size: .85rem; font-weight: 650; }
.auth-flow-card .method-option small { color: #8fa2ba; font-size: .68rem; line-height: 1.5; }
.auth-flow-card .method-option:hover > span { border-color: #5c8aad; background: #1a2b42; }
.auth-flow-card .method-option input:checked + span { background: #42a9e110; border-color: var(--custom-blue); box-shadow: inset 0 0 0 1px #42a9e140; }
.auth-flow-card .method-option input:checked + span .method-icon { color: #071827; background: var(--custom-blue); }
.auth-flow-card .form-group { margin-bottom: 20px; }
.auth-flow-card input:not([type=radio]):not([type=checkbox]):not([type=hidden]) { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid #3a4b63; border-radius: 12px; background: #142034; color: #edf4fc; transition: border-color 160ms ease, box-shadow 160ms ease; }
.auth-flow-card input:focus-visible { outline: none; border-color: var(--custom-blue); box-shadow: 0 0 0 3px #42a9e11a; }
.auth-flow-card .verification-box { padding: 18px; border: 1px solid #34445a; border-radius: 16px; background: #142034; margin-bottom: 20px; gap: 16px; }
.auth-flow-card .verify-code { color: #91d9fb; background: #42a9e10c; border-style: solid; border-color: #42a9e145; border-radius: 12px; }
.auth-flow-card .register-actions { align-items: stretch; gap: 12px; }
.auth-flow-card .register-actions .btn-secondary { margin-top: 0; border-radius: .8rem; }
.auth-flow-card .auth-link { font-size: .85rem; margin-top: 24px; color: #9baec5; }
@media (max-width: 480px) {
  .auth-flow-card { padding: 24px 18px; border-radius: 18px; }
  .auth-flow-card .progress-step small { font-size: .6rem; }
  .auth-flow-card .method-option > span { padding: 18px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-flow-card *, .auth-flow-card .btn-primary { transition: none; }
  .auth-flow-card .btn-primary:hover { transform: none; }
}

.otp-field { margin: 18px 0; }
.otp-enhanced { position: relative; }
.auth-flow-card .otp-enhanced input[data-otp] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; z-index: 1; padding: 0; cursor: text; }
.otp-cells { display: grid; grid-template-columns: repeat(var(--otp-length), minmax(0, 1fr)); gap: 8px; }
.otp-cells span { display: grid; place-items: center; min-width: 0; height: 56px; border: 1px solid #3a4b63; border-radius: 12px; background: #142034; color: #eaf6ff; font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; transition: border-color 160ms ease, background-color 160ms ease; }
.otp-cells span.filled { border-color: #42a9e160; background: #42a9e10c; }
.otp-cells span.current { border-color: var(--custom-blue); box-shadow: 0 0 0 3px #42a9e11a; }
.otp-enhanced:has(input[aria-invalid=true]) .otp-cells span { border-color: #ff6b81; }
@media(max-width: 380px) { .otp-cells { gap: 6px; } .otp-cells span { height: 48px; border-radius: 9px; } }

/* Login typography and remember-me control */
.auth-login-card .form-group { margin-bottom: 20px; }
.auth-login-card .form-group > label { display: block; margin-bottom: 8px; font-size: .875rem; font-weight: 500; line-height: 1.5; color: #c5d2e2; }
.auth-login-card .form-check { display: flex; align-items: center; gap: 10px; padding-left: 0; margin: 4px 0 22px !important; }
.auth-login-card .form-check-input { flex-shrink: 0; width: 18px; height: 18px; margin: 0; border-radius: 5px; cursor: pointer; accent-color: var(--custom-blue); }
.auth-login-card .form-check-input:checked { background-color: var(--custom-blue); border-color: var(--custom-blue); }
.auth-login-card .form-check-input:focus { border-color: var(--custom-blue); box-shadow: 0 0 0 3px #42a9e126; }
.auth-login-card .form-check-label { font-size: .875rem; line-height: 1.5; color: #b5c5d9; cursor: pointer; }
.auth-login-card .btn-primary { font-size: .9375rem; }
.auth-login-card .auth-link { font-size: .875rem; line-height: 1.65; margin: 20px 0 0; color: #a6b8ce; }
.auth-login-card .auth-link + .auth-link { margin-top: 12px; }
.auth-login-card .auth-link a { font-size: inherit; line-height: inherit; font-weight: 500; }
.auth-login-card .auth-link a:hover { color: #69c1eb; text-decoration: underline; text-underline-offset: 3px; }
.auth-login-card .alert, .auth-login-card .field-error, .auth-login-card .errorlist { font-size: .875rem; line-height: 1.6; }
