/* Auth modal — Node.js style, single popup */
.nso-pony .auth-modal .modal-dialog {
  max-width: 440px;
  width: calc(100vw - 24px);
  margin: 0 auto;
}

.nso-pony .auth-modal .modal-content {
  position: relative;
  border-radius: 12px;
  background: #fff !important;
  border: 1px solid #e5e7eb;
  box-shadow:
    0 4px 6px -1px rgba(15, 23, 42, 0.06),
    0 20px 48px -12px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}

.nso-pony .auth-modal .auth-modal-accent {
  height: 4px;
  background: linear-gradient(90deg, var(--nso-primary-deep) 0%, var(--nso-primary) 50%, var(--nso-gold) 100%);
}

.nso-pony .auth-modal .modal-body {
  padding: 22px 22px 20px;
  background: #fff !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.nso-pony .auth-modal .auth-modal-head {
  margin-bottom: 18px;
  text-align: center;
}

.nso-pony .auth-modal .auth-modal-title {
  margin: 0 0 4px;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #29343d;
}

.nso-pony .auth-modal .auth-modal-sub {
  margin: 0;
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.45;
  min-height: 1.25em;
  transition: opacity 0.2s ease;
}

.nso-pony .auth-modal .auth-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 18px;
  padding: 4px;
  background: #f3f4f6;
  border-radius: 10px;
  border: none;
}

.nso-pony .auth-modal .auth-tab {
  flex: 1;
  text-align: center;
  font-weight: 600;
  font-size: 0.875rem;
  color: #6b7280;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  margin-bottom: 0;
}

.nso-pony .auth-modal .auth-tab:hover {
  color: #29343d;
}

.nso-pony .auth-modal .auth-tab.active {
  color: var(--nso-primary-deep);
  background: #fff;
  box-shadow: 0 1px 3px rgba(145, 50, 0, 0.1);
}

/* Tab đăng nhập: cao vừa nội dung. Tab đăng ký: đủ form, không cuộn */
.nso-pony .auth-modal .auth-panel-stage {
  position: relative;
  transition: min-height 0.25s ease;
}

.nso-pony .auth-modal .auth-panel-stage.is-login {
  min-height: 0;
}

.nso-pony .auth-modal .auth-panel-stage.is-register {
  min-height: 0;
}

.nso-pony .auth-modal .auth-panel {
  display: none;
  flex-direction: column;
}

.nso-pony .auth-modal .auth-panel.is-active {
  display: flex;
}

.nso-pony .auth-modal .auth-panel-stage.is-login .auth-panel--register {
  display: none !important;
}

.nso-pony .auth-modal .auth-panel-stage.is-register .auth-panel--login {
  display: none !important;
}

/* Đăng nhập — gọn */
.nso-pony .auth-modal .auth-panel--login .mb-2 {
  margin-bottom: 10px !important;
}

.nso-pony .auth-modal .auth-panel--login .auth-input .form-control {
  min-height: 40px;
}

.nso-pony .auth-modal .auth-panel--login .auth-actions {
  margin-top: 4px;
}

.nso-pony .auth-modal .auth-panel--login .auth-primary {
  min-height: 42px;
}

/* Đăng ký — đủ chỗ, không scrollbar */
.nso-pony .auth-modal .auth-panel--register .mb-2 {
  margin-bottom: 10px !important;
}

.nso-pony .auth-modal .auth-panel--register .auth-input .form-control {
  min-height: 40px;
}

.nso-pony .auth-modal .auth-panel--register .auth-captcha-block {
  margin-bottom: 0;
  padding: 10px;
}

.nso-pony .auth-modal .auth-panel--register .auth-captcha-code {
  padding: 10px 8px;
  font-size: 1.45rem;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  margin-bottom: 6px;
}

.nso-pony .auth-modal .auth-panel--register .auth-captcha-hint {
  margin-bottom: 6px;
}

.nso-pony .auth-modal .auth-panel--register .auth-actions {
  margin-top: 6px;
}

.nso-pony .auth-modal .auth-panel--register .auth-primary {
  min-height: 42px;
}

.nso-pony .auth-modal .auth-form {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent;
}

.nso-pony .auth-modal label {
  display: block;
  color: #374151 !important;
  font-size: 0.8125rem;
  font-weight: 600 !important;
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

.nso-pony .auth-modal .auth-input .form-control {
  background: #fafafa !important;
  border: 1px solid #e5e7eb !important;
  color: #111827 !important;
  border-radius: 8px !important;
  min-height: 44px;
  font-size: 0.9375rem;
  font-weight: 400;
  box-shadow: none !important;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.nso-pony .auth-modal .auth-input .form-control:hover {
  border-color: #d1d5db !important;
  background: #fff !important;
}

.nso-pony .auth-modal .auth-input .form-control::placeholder {
  color: #9ca3af !important;
}

.nso-pony .auth-modal .auth-input .form-control:focus {
  border-color: var(--nso-primary) !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(159, 84, 36, 0.15) !important;
}

.nso-pony .auth-modal .invalid-feedback {
  color: #dc2626 !important;
  font-size: 0.75rem;
  font-weight: 500;
  margin-top: 4px;
}

.nso-pony .auth-modal .auth-actions {
  margin-top: 8px;
}

.nso-pony .auth-modal .auth-primary {
  width: 100%;
  border: none;
  border-radius: 8px;
  min-height: 46px;
  font-weight: 600;
  font-size: 0.9375rem;
  color: #fff;
  background: linear-gradient(180deg, var(--nso-accent) 0%, var(--nso-primary-deep) 100%);
  box-shadow: 0 2px 8px rgba(145, 50, 0, 0.3);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.nso-pony .auth-modal .auth-primary:hover {
  filter: brightness(1.04);
  box-shadow: 0 4px 14px rgba(145, 50, 0, 0.35);
}

.nso-pony .auth-modal .auth-primary:active {
  transform: translateY(1px);
}

.nso-pony .auth-modal .mb-2 {
  margin-bottom: 14px !important;
}

.nso-pony .auth-modal .auth-captcha-block {
  margin-bottom: 4px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}

.nso-pony .auth-modal .auth-captcha-label {
  margin-bottom: 8px;
}

.nso-pony .auth-modal .auth-captcha-code {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  padding: 14px 12px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  color: var(--nso-primary-deep);
  background: #fff;
  border: 2px dashed var(--nso-border);
  border-radius: 8px;
  user-select: none;
}

.nso-pony .auth-modal .auth-captcha-refresh {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 4px 8px;
  border: none;
  border-radius: 6px;
  background: rgba(159, 84, 36, 0.1);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--nso-primary);
  cursor: pointer;
  transition: background 0.15s ease;
}

.nso-pony .auth-modal .auth-captcha-refresh:hover {
  background: rgba(159, 84, 36, 0.18);
}

.nso-pony .auth-modal .auth-captcha-hint {
  margin: 0 0 8px;
  font-size: 0.75rem;
  color: #6b7280;
}

.nso-pony .auth-modal .auth-captcha-input {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  text-align: center;
  font-family: ui-monospace, Consolas, monospace;
  font-weight: 700;
  font-size: 1rem !important;
}

@media (max-width: 575.98px) {
  .nso-pony .auth-modal .modal-dialog {
    width: calc(100vw - 14px);
  }
  .nso-pony .auth-modal .modal-body {
    padding: 18px 16px 16px;
  }
  .nso-pony .auth-modal .auth-input .form-control {
    font-size: 16px !important;
  }
}
