/* Auth pages — CloudSpire Pay login / register / admin */

:root {
  --auth-primary-rgb: 16, 185, 129;
  --auth-primary: #10b981;
  --auth-primary-dark: #059669;
  --auth-primary-light: #34d399;
  --auth-accent: #06b6d4;
  --auth-brand-blue: #2563eb;
  --auth-bg-start: #ecfdf5;
  --auth-bg-end: #f0fdfa;
  --auth-blob-a: rgba(16, 185, 129, 0.16);
  --auth-blob-b: rgba(6, 182, 212, 0.12);
  --auth-card-bg: #ffffff;
  --auth-text: #1e293b;
  --auth-text-muted: #64748b;
  --auth-border: #e2e8f0;
  --auth-shadow: 0 20px 60px rgba(var(--auth-primary-rgb), 0.12), 0 4px 16px rgba(15, 23, 42, 0.06);
  --auth-radius: 16px;
  --auth-input-radius: 10px;
  --auth-toggle-bg: rgba(var(--auth-primary-rgb), 0.1);
  --auth-toggle-border: rgba(var(--auth-primary-rgb), 0.22);
  --auth-toggle-color: #059669;
}

html[data-theme="blue"] {
  --auth-primary-rgb: 37, 99, 235;
  --auth-primary: #2563eb;
  --auth-primary-dark: #1d4ed8;
  --auth-primary-light: #60a5fa;
  --auth-accent: #38bdf8;
  --auth-bg-start: #eff6ff;
  --auth-bg-end: #f8fafc;
  --auth-blob-a: rgba(37, 99, 235, 0.14);
  --auth-blob-b: rgba(56, 189, 248, 0.1);
  --auth-shadow: 0 20px 60px rgba(var(--auth-primary-rgb), 0.12), 0 4px 16px rgba(15, 23, 42, 0.06);
  --auth-toggle-bg: rgba(var(--auth-primary-rgb), 0.08);
  --auth-toggle-border: rgba(var(--auth-primary-rgb), 0.18);
  --auth-toggle-color: #2563eb;
}

/* Page background */
body.auth-page {
  min-height: 100vh;
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  -webkit-font-smoothing: antialiased;
  background: linear-gradient(135deg, var(--auth-bg-start) 0%, #e8ecff 40%, var(--auth-bg-end) 100%);
  position: relative;
  overflow-x: hidden;
  transition: background 0.25s ease;
}
body.auth-page::before,
body.auth-page::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

body.auth-page::before {
  width: 520px;
  height: 520px;
  top: -180px;
  right: -120px;
  background: radial-gradient(circle, var(--auth-blob-a) 0%, transparent 70%);
}

body.auth-page::after {
  width: 400px;
  height: 400px;
  bottom: -100px;
  left: -80px;
  background: radial-gradient(circle, var(--auth-blob-b) 0%, transparent 70%);
}

body.auth-page .app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

body.auth-page .app::before {
  display: none;
}

body.auth-page .app-header-fixed {
  padding-top: 0;
}

/* Container */
body.auth-page .auth-container {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  position: relative;
}

/* Theme toggle */
body.auth-page .auth-topbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

body.auth-page .auth-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--auth-toggle-border);
  border-radius: 50%;
  background: var(--auth-toggle-bg);
  color: var(--auth-toggle-color);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

body.auth-page .auth-theme-toggle:hover {
  transform: scale(1.05);
  background: rgba(var(--auth-primary-rgb), 0.16);
}

body.auth-page .auth-theme-toggle .auth-icon-to-green {
  display: none;
}

html[data-theme="blue"] body.auth-page .auth-theme-toggle .auth-icon-to-blue {
  display: none;
}

html[data-theme="blue"] body.auth-page .auth-theme-toggle .auth-icon-to-green {
  display: block;
}

/* Header */
body.auth-page .auth-header {
  text-align: center;
  margin-bottom: 28px;
}

body.auth-page .auth-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  margin-bottom: 14px;
  padding: 0;
  text-decoration: none;
  transition: transform 0.25s ease;
}

body.auth-page .auth-logo:hover {
  transform: translateY(-2px);
  box-shadow: none;
}

body.auth-page .auth-logo img,
body.auth-page .auth-logo-img {
  width: 64px;
  height: 64px;
  display: block;
}

body.auth-page .auth-brand-logo {
  display: none;
}

body.auth-page .auth-brand-text {
  display: block;
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.5px;
  color: var(--auth-primary-dark);
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  -webkit-text-fill-color: unset;
  text-shadow: none;
  filter: none;
  transition: color 0.25s ease;
}

body.auth-page .auth-brand-cn {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--auth-text);
}

body.auth-page .auth-brand-text small,
body.auth-page .auth-brand-tagline {
  display: block;
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  color: #94a3b8;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
}
body.auth-page .auth-logo i {
  font-size: 26px;
  color: #fff;
}

body.auth-page .auth-title {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--auth-text);
  letter-spacing: 0.5px;
  margin: 0 0 6px;
  line-height: 1.3;
}

body.auth-page .auth-subtitle {
  font-size: 14px;
  color: var(--auth-text-muted);
  font-weight: 400;
  margin: 0;
}

/* Card */
body.auth-page .auth-card {
  background: var(--auth-card-bg);
  border-radius: var(--auth-radius);
  box-shadow: var(--auth-shadow);
  padding: 32px 28px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  animation: authFadeIn 0.5s ease-out;
}

@keyframes authFadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Tabs */
body.auth-page .auth-tabs {
  display: flex;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 24px;
  list-style: none;
  border: none;
}

body.auth-page .auth-tabs > li {
  flex: 1;
  width: auto !important;
  text-align: center;
  float: none;
  margin: 0;
}

body.auth-page .auth-tabs > li > a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px !important;
  border: none !important;
  color: var(--auth-text-muted) !important;
  font-size: 14px;
  font-weight: 500;
  background: transparent !important;
  transition: all 0.25s ease;
  margin: 0;
}

body.auth-page .auth-tabs > li.active > a,
body.auth-page .auth-tabs > li > a:hover {
  background: #fff !important;
  color: var(--auth-primary) !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

/* Form fields */
body.auth-page .swaplogin {
  border-radius: var(--auth-input-radius);
  overflow: hidden;
  border: 1px solid var(--auth-border);
  margin-bottom: 20px;
  box-shadow: none;
}

body.auth-page .swaplogin .list-group-item {
  border-color: var(--auth-border);
  padding: 0;
  background: #fff;
  overflow: visible;
}

body.auth-page .swaplogin .list-group-item:first-child {
  border-top-left-radius: var(--auth-input-radius);
  border-top-right-radius: var(--auth-input-radius);
}

body.auth-page .swaplogin .list-group-item:last-child {
  border-bottom-left-radius: var(--auth-input-radius);
  border-bottom-right-radius: var(--auth-input-radius);
}

body.auth-page .auth-input-wrap {
  display: flex;
  align-items: center;
  padding: 0 14px;
}

body.auth-page .auth-input-wrap .auth-input-icon {
  color: #94a3b8;
  font-size: 15px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

body.auth-page .swaplogin .form-control.no-border,
body.auth-page .swaplogin .form-control {
  border: none;
  box-shadow: none;
  height: 48px;
  padding: 12px 10px;
  font-size: 14px;
  color: var(--auth-text);
  background: transparent;
}

body.auth-page .swaplogin .form-control::placeholder {
  color: #94a3b8;
}

body.auth-page .swaplogin .form-control:focus {
  border-color: transparent;
  box-shadow: none;
}

body.auth-page .auth-input-wrap:focus-within .auth-input-icon {
  color: var(--auth-primary);
}

body.auth-page .swaplogin .input-group {
  display: flex;
  align-items: stretch;
  width: 100%;
}

body.auth-page .swaplogin .input-group .auth-input-wrap {
  flex: 1;
  min-width: 0;
}

body.auth-page .swaplogin .input-group .form-control {
  flex: 1;
  min-width: 0;
  width: 100%;
}

body.auth-page .auth-code-row {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-height: 48px;
}

body.auth-page .auth-code-row .auth-input-wrap {
  flex: 1;
  min-width: 0;
  border-right: 1px solid var(--auth-border);
  overflow: hidden;
}

body.auth-page .auth-code-row .form-control {
  width: 100%;
  min-width: 0;
}

body.auth-page .auth-code-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 108px;
  min-width: 108px;
  padding: 0 8px;
  border: none;
  background: #f8fafc;
  color: var(--auth-primary);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  box-sizing: border-box;
}

body.auth-page .auth-code-btn:hover,
body.auth-page .auth-code-btn:focus {
  color: var(--auth-primary-dark);
  background: #ecfdf5;
  text-decoration: none;
}

body.auth-page .auth-code-btn[disabled],
body.auth-page .auth-code-btn[data-lock="true"] {
  color: #94a3b8;
  cursor: not-allowed;
  background: #f8fafc;
}

body.auth-page .swaplogin .input-group-addon {
  background: transparent;
  border: none;
  border-left: 1px solid var(--auth-border);
  color: var(--auth-primary);
  font-size: 13px;
  font-weight: 500;
  padding: 0 16px;
  line-height: 48px;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s;
  flex-shrink: 0;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: auto !important;
  min-width: 102px;
  float: none !important;
}

body.auth-page .swaplogin .input-group-addon:hover {
  color: var(--auth-primary-dark);
}

body.auth-page .swaplogin select.form-control {
  height: 48px;
  padding: 12px 14px;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

/* Checkbox */
body.auth-page .i-checks {
  color: var(--auth-text-muted);
  font-size: 13px;
}

body.auth-page .i-checks input:checked + i {
  border-color: var(--auth-primary);
}

body.auth-page .i-checks input:checked + i:before {
  background-color: var(--auth-primary);
}

body.auth-page .i-checks a {
  color: var(--auth-primary);
}

/* Price tag */
body.auth-page .auth-price-tag {
  text-align: center;
  padding: 10px 16px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff5f5 0%, #fef2f2 100%);
  border: 1px solid rgba(239, 68, 68, 0.15);
  border-radius: 10px;
  font-size: 14px;
  color: var(--auth-text-muted);
}

body.auth-page .auth-price-badge {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border-radius: 999px;
  vertical-align: middle;
  letter-spacing: 0.04em;
}

body.auth-page .auth-price-tag b {
  color: #ef4444;
  font-size: 18px;
  font-weight: 700;
}

/* Primary button */
body.auth-page .btn-auth-primary {
  display: block;
  width: 100%;
  height: 48px;
  line-height: 48px;
  padding: 0;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #fff !important;
  background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-accent) 100%);
  box-shadow: 0 6px 20px rgba(var(--auth-primary-rgb), 0.35);
  transition: all 0.25s ease;
  margin-bottom: 12px;
}

body.auth-page .btn-auth-primary:hover,
body.auth-page .btn-auth-primary:focus {
  background: linear-gradient(135deg, var(--auth-primary-dark) 0%, var(--auth-primary) 100%);
  box-shadow: 0 8px 28px rgba(var(--auth-primary-rgb), 0.45);
  transform: translateY(-1px);
  color: #fff !important;
}
body.auth-page .btn-auth-primary:active {
  transform: translateY(0);
}

/* Secondary button */
body.auth-page .btn-auth-secondary {
  display: block;
  width: 100%;
  height: 44px;
  line-height: 44px;
  padding: 0;
  border: 1px solid var(--auth-border);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--auth-text-muted) !important;
  background: #fff;
  transition: all 0.2s ease;
  text-align: center;
}

body.auth-page .btn-auth-secondary:hover {
  border-color: var(--auth-primary);
  color: var(--auth-primary) !important;
  background: #f8faff;
}

/* Action links row */
body.auth-page .auth-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--auth-border);
}

body.auth-page .auth-actions a {
  font-size: 13px;
  font-weight: 500;
  color: var(--auth-text-muted);
  transition: color 0.2s;
  text-decoration: none;
}

body.auth-page .auth-actions a:hover {
  color: var(--auth-primary);
}

body.auth-page .auth-actions a i {
  margin-right: 4px;
}

body.auth-page .auth-actions .auth-link-register {
  color: var(--auth-primary);
}

/* Social login */
body.auth-page .auth-social {
  margin-top: 24px;
  text-align: center;
}

body.auth-page .auth-social-label {
  position: relative;
  font-size: 12px;
  color: var(--auth-text-muted);
  margin-bottom: 16px;
}

body.auth-page .auth-social-label::before,
body.auth-page .auth-social-label::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 30%;
  height: 1px;
  background: var(--auth-border);
}

body.auth-page .auth-social-label::before {
  left: 0;
}

body.auth-page .auth-social-label::after {
  right: 0;
}

body.auth-page .auth-social-btns {
  display: flex;
  justify-content: center;
  gap: 16px;
}

body.auth-page .auth-social-btns .btn-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--auth-border);
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  transition: all 0.25s ease;
}

body.auth-page .auth-social-btns .btn-icon:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.1);
  border-color: var(--auth-primary);
}

body.auth-page .auth-social-btns .btn-icon img {
  width: 22px;
  height: 22px;
}

body.auth-page .auth-social-btns .btn-icon i {
  line-height: 44px;
  font-size: 20px;
}

/* Footer */
body.auth-page .auth-footer {
  text-align: center;
  margin-top: 28px;
  padding-top: 0;
}

body.auth-page .auth-footer a {
  color: var(--auth-text-muted);
  font-size: 13px;
  transition: color 0.2s;
}

body.auth-page .auth-footer a:hover {
  color: var(--auth-primary);
}

body.auth-page .auth-footer small {
  color: #94a3b8;
  font-size: 12px;
}

/* Captcha */
body.auth-page #captcha {
  padding: 12px 14px;
}

/* Modal */
body.auth-page .modal-content {
  border-radius: var(--auth-radius);
  border: none;
  box-shadow: var(--auth-shadow);
}

body.auth-page .modal-header {
  border-bottom: 1px solid var(--auth-border);
  padding: 20px 24px;
}

body.auth-page .modal-header .modal-title {
  font-weight: 600;
  color: var(--auth-text);
}

body.auth-page .modal-body {
  padding: 20px 24px;
  color: var(--auth-text-muted);
  line-height: 1.7;
}

body.auth-page .modal-footer {
  border-top: 1px solid var(--auth-border);
  padding: 16px 24px;
}

/* Autofill */
body.auth-page input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
  -webkit-text-fill-color: var(--auth-text) !important;
}

/* Hide legacy elements */
body.auth-page .line.line-dashed,
body.auth-page .navbar-brand.block {
  display: none;
}

/* Responsive */
@media (max-width: 480px) {
  body.auth-page .auth-card {
    padding: 24px 20px;
  }

  body.auth-page .auth-title {
    font-size: 20px;
  }
}

/* Test pay page */
body.auth-page .auth-container--test {
  max-width: 520px;
}

body.auth-page .auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--auth-text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

body.auth-page .auth-back-link:hover {
  color: var(--auth-primary);
  text-decoration: none;
}

body.auth-page .auth-test-fields {
  margin-bottom: 20px;
}

body.auth-page .auth-test-fields .list-group-item {
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-input-radius);
  margin-bottom: 12px;
  padding: 0;
  background: #fff;
}

body.auth-page .auth-test-fields .list-group-item:last-child {
  margin-bottom: 0;
}

body.auth-page .auth-test-fields .auth-input-wrap {
  display: flex;
  align-items: center;
  min-height: 48px;
}

body.auth-page .auth-test-fields .form-control[disabled] {
  background: #f8fafc;
  color: var(--auth-text-muted);
  cursor: not-allowed;
}

body.auth-page .auth-test-tip {
  font-size: 13px;
  color: var(--auth-text-muted);
  line-height: 1.6;
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(var(--auth-primary-rgb), 0.06);
  border: 1px solid rgba(var(--auth-primary-rgb), 0.12);
}

body.auth-page .auth-test-success {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  margin-bottom: 20px;
  border-radius: 12px;
  background: rgba(var(--auth-primary-rgb), 0.08);
  border: 1px solid rgba(var(--auth-primary-rgb), 0.18);
  color: var(--auth-primary-dark);
}

body.auth-page .auth-test-success i {
  font-size: 22px;
  margin-top: 2px;
}

body.auth-page .auth-test-success strong {
  display: block;
  font-size: 16px;
  margin-bottom: 4px;
}

body.auth-page .auth-test-success span {
  font-size: 13px;
  color: var(--auth-text-muted);
}

body.auth-page .auth-pay-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

body.auth-page .auth-pay-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--auth-border);
  border-radius: 12px;
  background: #fff;
  color: var(--auth-text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

body.auth-page .auth-pay-btn img {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

body.auth-page .auth-pay-btn:hover {
  border-color: rgba(var(--auth-primary-rgb), 0.35);
  background: rgba(var(--auth-primary-rgb), 0.04);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(var(--auth-primary-rgb), 0.1);
}

body.auth-page .auth-pay-btn:active {
  transform: translateY(0);
}

body.auth-page .auth-test-captcha {
  margin: 0 0 16px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--auth-border);
}

body.auth-page .auth-test-actions {
  margin-top: 18px;
}

body.auth-page .auth-test-actions .btn-auth-primary {
  width: 100%;
}

@media (max-width: 480px) {
  body.auth-page .auth-pay-grid {
    grid-template-columns: 1fr;
  }
}
