:root {
  --auth-bg: #171717;
  --auth-surface: #212121;
  --auth-surface-soft: rgba(33, 33, 33, 0.72);
  --auth-border: rgba(255, 255, 255, 0.12);
  --auth-border-strong: rgba(255, 255, 255, 0.2);
  --auth-text: #f4f4f4;
  --auth-muted: #b4b4b4;
  --auth-faint: #8f8f8f;
  --auth-accent: #1198a8;
  --auth-accent-soft: rgba(17, 152, 168, 0.22);
  --auth-danger: #ffb4b4;
}

body {
  color-scheme: dark;
  background:
    radial-gradient(circle at 14% 8%, rgba(17, 152, 168, 0.2), transparent 34%),
    radial-gradient(circle at 86% 14%, rgba(91, 74, 131, 0.16), transparent 35%),
    linear-gradient(180deg, #242424 0%, #212121 52%, #1f1f1f 100%);
}

.auth-page-wrap {
  position: relative;
  min-height: 100vh;
}

.auth-page-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 120%, rgba(17, 152, 168, 0.14), transparent 36%);
  pointer-events: none;
}

.auth-page-inner {
  position: relative;
  z-index: 1;
}

.auth-panel {
  border: 1px solid var(--auth-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 36%),
    var(--auth-surface-soft);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.06),
    0 30px 90px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(14px);
}

.auth-brand {
  display: grid;
  width: 100%;
  margin: 0 auto 18px;
  place-items: center;
  border-radius: 14px;
  padding: 8px 10px;
  transition: background 160ms ease;
}

.auth-brand:hover {
  background: rgba(255, 255, 255, 0.06);
}

.auth-brand img {
  width: 34px;
  height: 34px;
  display: block;
}

.auth-title {
  color: var(--auth-text);
}

.auth-subtitle {
  color: var(--auth-muted);
}

.auth-label {
  color: #e8e8e8;
}

.auth-input {
  border-color: var(--auth-border);
  background: rgba(24, 24, 24, 0.72);
  color: var(--auth-text);
}

.auth-input::placeholder {
  color: #888;
}

.auth-input:focus {
  border-color: var(--auth-border-strong);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.045);
}

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

.auth-submit-btn {
  background: #f4f4f4;
  color: #111;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2);
}

.auth-submit-btn:hover:not(:disabled) {
  background: #fff;
}

.auth-submit-btn:disabled {
  opacity: 0.55;
}

.auth-footnote {
  color: var(--auth-faint);
}

.otp-box {
  border-color: var(--auth-border);
  background: rgba(24, 24, 24, 0.72);
  color: var(--auth-text);
}

.otp-box:focus {
  border-color: var(--auth-border-strong);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.045);
}

.otp-box.success {
  border-color: rgba(34, 197, 94, 0.62) !important;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14);
  background-color: rgba(34, 197, 94, 0.1);
}

.otp-box.error {
  border-color: rgba(244, 63, 94, 0.7) !important;
  box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.14);
  background-color: rgba(244, 63, 94, 0.1);
  animation: auth-shake 0.22s linear;
}

.auth-link {
  color: #8bd6e1;
}

.auth-link:hover {
  color: #b4eef5;
}

@keyframes auth-shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  50% { transform: translateX(3px); }
  75% { transform: translateX(-2px); }
  100% { transform: translateX(0); }
}
