body.auth {
  display: block;
  min-height: 100vh;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(31, 200, 219, 0.1), transparent 60%),
    radial-gradient(700px 420px at 110% 110%, rgba(255, 59, 59, 0.06), transparent 60%),
    var(--bg);
}

.auth main {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 32px 16px;
}

.auth .shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  width: min(980px, 100%);
  min-height: 580px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  animation: auth-rise 0.35s ease-out both;
}

@keyframes auth-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

.auth .panel-left {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: 40px;
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(31, 200, 219, 0.14), transparent 55%),
    var(--bg-raised);
  border-right: 1px solid var(--line);
}

.auth .panel-left::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -120px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  border: 1px solid rgba(31, 200, 219, 0.14);
  box-shadow: 0 0 0 40px rgba(31, 200, 219, 0.03), 0 0 0 80px rgba(31, 200, 219, 0.02);
  pointer-events: none;
}

.auth .left-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.auth .wordmark {
  display: flex;
  align-items: center;
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.auth .wordmark::before {
  content: "";
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: url("/assets/icons/logo.png") center / cover no-repeat;
  margin-right: 10px;
}

.auth .wordmark span {
  color: var(--accent);
}

.auth .tagline {
  margin: 0 0 0 44px;
  color: var(--text-3);
  font-size: 0.8rem;
}

.auth .left-body h2 {
  margin: 0 0 14px;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.auth .left-body h2 em {
  font-style: normal;
  color: var(--accent);
}

.auth .left-body p {
  margin: 0 0 22px;
  max-width: 420px;
  color: var(--text-2);
  line-height: 1.6;
}

.auth .feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
}

.auth .feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-2);
  font-size: 0.92rem;
  line-height: 1.45;
}

.auth .feature-list .dot {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: -1px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}

.auth .feature-list .dot::before {
  content: "\2713";
  font-size: 0.72rem;
  font-weight: 700;
}

.auth .left-footer {
  color: var(--text-3);
  font-size: 0.78rem;
}

.auth .panel-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 44px 40px;
}

.auth .form-title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.auth .form-sub {
  margin: 6px 0 26px;
  color: var(--text-2);
}

.auth .google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-strong);
  background: var(--bg-raised);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
}

.auth .google-btn:hover {
  background: var(--surface-hover);
  border-color: rgba(255, 255, 255, 0.2);
}

.auth .google-btn img {
  width: 18px;
  height: 18px;
}

.auth .google-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.auth .google-hint {
  margin: 8px 0 0;
  color: var(--text-3);
  font-size: 0.8rem;
  line-height: 1.45;
  text-align: center;
}

.auth .divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-3);
  font-size: 0.8rem;
}

.auth .divider::before,
.auth .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth .auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth label {
  color: var(--text-2);
  font-size: 0.86rem;
  font-weight: 600;
}

.auth input[type="text"],
.auth input[type="email"],
.auth input[type="password"],
.auth input[type="tel"] {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-strong);
  background: var(--bg-raised);
  color: var(--text);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.auth input::placeholder {
  color: var(--text-3);
}

.auth input:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.auth input:focus,
.auth input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus);
}

.auth .password-wrapper {
  position: relative;
}

.auth .password-wrapper input {
  padding-right: 46px;
}

.auth .toggle-password {
  position: absolute;
  top: 50%;
  right: 6px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  transform: translateY(-50%);
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
}

.auth .toggle-password:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.auth .forgot-link {
  margin-top: -6px;
  text-align: right;
}

.auth .forgot-link a {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

.auth .forgot-link a:hover {
  text-decoration: underline;
}

.auth .submit-btn,
.auth #submitBtn,
.auth .dashboard-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 10px 18px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--t-fast), transform var(--t-fast);
}

.auth .submit-btn:hover,
.auth #submitBtn:hover,
.auth .dashboard-btn:hover {
  background: var(--accent-strong);
}

.auth .submit-btn:active,
.auth #submitBtn:active {
  transform: translateY(1px);
}

.auth .submit-btn:disabled,
.auth #submitBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth .resend-btn,
.auth #prevBtn,
.auth #nextBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
}

.auth .resend-btn:hover,
.auth #prevBtn:hover {
  background: var(--surface-hover);
}

.auth #nextBtn {
  border-color: transparent;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}

.auth #nextBtn:hover {
  background: var(--accent-strong);
}

.auth .resend-btn[data-busy] {
  opacity: 0.6;
  pointer-events: none;
}

.auth .buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 22px;
}

.auth .auth-footer {
  margin-top: 22px;
  color: var(--text-2);
  font-size: 0.9rem;
  text-align: center;
}

.auth .auth-footer a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.auth .auth-footer a:hover {
  text-decoration: underline;
}

.auth .back-home {
  align-self: center;
  margin-top: 14px;
  color: var(--text-3);
  font-size: 0.84rem;
  text-decoration: none;
}

.auth .back-home:hover {
  color: var(--text);
}

.auth .messages {
  margin-top: 14px;
  font-size: 0.86rem;
  text-align: center;
}

.auth .messages p {
  margin: 0;
}

.auth .messages p:not(:empty) {
  margin-top: 8px;
}

.auth #error,
.auth .error {
  color: var(--danger);
}

.auth #success,
.auth .success {
  color: var(--success);
}

.auth #nameGroup {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.auth .nameSurname {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.auth .loader {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: auth-spin 0.8s linear infinite;
}

@keyframes auth-spin {
  to {
    transform: rotate(360deg);
  }
}

.auth .step-indicator {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 4px;
}

.auth .step-indicator::before {
  content: "";
  display: block;
  height: 4px;
  border-radius: 999px;
  background: var(--surface-hover);
}

.auth .step-progress {
  height: 4px;
  width: 50%;
  margin-top: -12px;
  border-radius: 999px;
  background: var(--accent);
  transition: width var(--t);
}

.auth #stepCounter {
  color: var(--text-3);
  font-size: 0.78rem;
  font-weight: 600;
}

.auth .step {
  display: none;
  animation: auth-rise 0.25s ease-out;
}

.auth .step.active {
  display: block;
}

.auth .step h3 {
  margin: 0 0 14px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.auth .step .form-group + .form-group {
  margin-top: 16px;
}

.auth .step-desc {
  margin: 0;
  color: var(--text-3);
  font-size: 0.8rem;
}

.auth .step-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.auth .step-actions > button {
  flex: 1;
}

.auth .success-page {
  display: flex;
  flex-direction: column;
}

.auth .success-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 18px;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.5rem;
}

.auth .success-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--bg-raised);
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: 0.9rem;
  line-height: 1.55;
}

.auth .success-card p {
  margin: 0;
}

.auth .success-card b {
  color: var(--text);
}

.auth .modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(3, 6, 10, 0.7);
  backdrop-filter: blur(3px);
}

.auth .modal.active {
  display: flex;
}

.auth .modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 26px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}

.auth .modal-content h2 {
  margin: 0;
  padding-right: 32px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.auth .modal-content p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.92rem;
}

.auth .modal-content a {
  color: var(--accent);
}

.auth .close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  color: var(--text-3);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.auth .close:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.auth .dashboard-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth .dashboard-btn[data-type="admin"] {
  background: #ff8a1f;
  color: #1f0f00;
}

.auth .dashboard-btn[data-type="admin"]:hover {
  background: #f07400;
}

@media (max-width: 860px) {
  .auth main {
    place-items: start center;
    padding: 20px 16px;
  }

  .auth .shell {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    max-width: 480px;
  }

  .auth .panel-left {
    gap: 0;
    padding: 22px 24px;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .auth .panel-left::after,
  .auth .left-body,
  .auth .left-footer {
    display: none;
  }

  .auth .panel-right {
    padding: 28px 24px 30px;
  }
}

@media (max-width: 420px) {
  .auth #nameGroup {
    grid-template-columns: minmax(0, 1fr);
  }
}

.auth .google-btn + .google-btn {
  margin-top: 10px;
}
