:root {
  --auth-bg-1: #f5f5ef;
  --auth-bg-2: #f0f6f8;
  --auth-ink: #1e2a2f;
  --auth-muted: #5f6d73;
  --auth-card-bg: rgba(255, 255, 255, 0.88);
  --auth-line: rgba(15, 55, 61, 0.14);
  --auth-accent: #0e7a70;
  --auth-accent-strong: #0b615a;
  --auth-accent-soft: #d7f0ed;
  --auth-highlight: #ef9f31;
}

html,
body.auth-shell {
  min-height: 100%;
}

body.auth-shell {
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  color: var(--auth-ink);
  background:
    radial-gradient(1200px 700px at -10% -20%, #dfece8 0%, transparent 55%),
    radial-gradient(1100px 650px at 110% 0%, #ffeacd 0%, transparent 50%),
    linear-gradient(150deg, var(--auth-bg-1) 0%, var(--auth-bg-2) 100%);
  position: relative;
  overflow-x: hidden;
}

.auth-main {
  position: relative;
  z-index: 3;
}

.auth-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(4px);
  opacity: 0.6;
  z-index: 1;
  pointer-events: none;
  animation: authFloat 8s ease-in-out infinite;
}

.auth-orb--a {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle at 30% 30%, #8ed8d0 0%, #43b7aa 55%, #1f8f84 100%);
  top: -80px;
  right: -60px;
}

.auth-orb--b {
  width: 220px;
  height: 220px;
  background: radial-gradient(circle at 40% 40%, #ffd99e 0%, #f4b450 60%, #dd8d22 100%);
  bottom: -70px;
  left: -40px;
  animation-delay: 1s;
}

.auth-card {
  border: 1px solid var(--auth-line);
  border-radius: 1.15rem;
  background: var(--auth-card-bg);
  backdrop-filter: blur(8px);
  box-shadow: 0 14px 34px rgba(19, 39, 45, 0.14);
  padding: 1.55rem;
}

.auth-fade-in {
  animation: authFadeUp 460ms ease-out;
}

.auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--auth-accent-soft);
  color: var(--auth-accent-strong);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.auth-title {
  font-family: "Sora", "Segoe UI", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
  font-size: clamp(1.4rem, 1.8vw, 1.8rem);
}

.auth-subtitle {
  color: var(--auth-muted);
  margin-bottom: 1.15rem;
}

.auth-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--auth-line), transparent);
  margin: 1.25rem 0;
}

.auth-card label {
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.auth-card input[type="text"],
.auth-card input[type="password"],
.auth-card input[type="email"],
.auth-card input[type="tel"],
.auth-card input[type="number"],
.auth-card input[type="url"],
.auth-card select,
.auth-card textarea {
  width: 100%;
  border: 1px solid #d7dfdf;
  border-radius: 0.7rem;
  padding: 0.6rem 0.72rem;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-card input:focus,
.auth-card select:focus,
.auth-card textarea:focus {
  border-color: #88cfc8;
  box-shadow: 0 0 0 0.2rem rgba(14, 122, 112, 0.15);
  outline: 0;
}

.auth-card .btn-primary {
  background: linear-gradient(140deg, var(--auth-accent) 0%, #109487 100%);
  border-color: transparent;
  font-weight: 600;
}

.auth-card .btn-primary:hover,
.auth-card .btn-primary:focus {
  background: linear-gradient(140deg, var(--auth-accent-strong) 0%, #0e7a70 100%);
}

.auth-card .btn-outline-secondary {
  border-color: #bcc8cb;
  color: #39484e;
}

.auth-card .btn-link {
  color: #5f767d;
}

.auth-token-open {
  box-shadow: 0 10px 28px rgba(17, 102, 94, 0.28);
}

.auth-token-overlay {
  position: fixed;
  inset: 0;
  z-index: 1060;
  background: rgba(17, 31, 37, 0.42);
  backdrop-filter: blur(2px);
  padding: 1rem;
}

.auth-token-overlay .modal {
  pointer-events: none;
}

.auth-token-overlay .modal-dialog {
  margin: 0 auto;
  max-width: 520px;
  pointer-events: auto;
}

.auth-modal {
  border: 1px solid var(--auth-line);
  border-radius: 1rem;
}

.auth-modal .modal-title {
  font-family: "Sora", "Segoe UI", sans-serif;
  font-weight: 700;
}

.auth-qr-wrap {
  padding: 0.85rem;
  border-radius: 0.95rem;
  background: linear-gradient(160deg, #f8fbfc, #e9f3f6);
  border: 1px solid #d5e2e7;
  display: inline-block;
}

.auth-qr {
  max-width: 220px;
  width: min(70vw, 220px);
  border-radius: 0.5rem;
  padding: 0.4rem;
}

.auth-secret {
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.92rem;
}

@keyframes authFadeUp {
  0% {
    opacity: 0;
    transform: translateY(18px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes authFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(12px);
  }
}

@media (max-width: 767.98px) {
  .auth-card {
    padding: 1.15rem;
    border-radius: 0.95rem;
  }
}
