
:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --line: #e5eaf2;
  --line-strong: #d6ddea;
  --text: #16233a;
  --muted: #7d8da6;
  --blue: #2d6cff;
  --blue-soft: #eaf1ff;
  --blue-soft-2: #f4f8ff;
  --shadow: 0 18px 40px rgba(29, 50, 91, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Chakra Petch", system-ui, -apple-system, sans-serif;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.auth-page {
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: clamp(20px, 4vw, 42px);
  background:
    linear-gradient(90deg, rgba(45, 108, 255, 0.05) 0 1px, transparent 1px 100%) 0 0 / 86px 86px,
    linear-gradient(180deg, rgba(45, 108, 255, 0.05) 0 1px, transparent 1px 100%) 0 0 / 86px 86px,
    radial-gradient(circle at 18% 18%, rgba(45, 108, 255, 0.1), transparent 32%),
    radial-gradient(circle at 82% 78%, rgba(22, 35, 58, 0.08), transparent 34%),
    var(--bg);
}

.auth-brand {
  text-align: center;
  margin-bottom: 6px;
}

.register-page {
  gap: 14px;
}

.register-page .auth-brand {
  margin-bottom: 0;
}

.register-page .auth-logo {
  width: 72px;
  height: 72px;
  margin-bottom: 12px;
}

.auth-logo {
  width: 96px;
  height: 96px;
  margin: 0 auto 12px;
  border-radius: 8px;
  background: #030303;
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: 0 16px 30px rgba(3, 8, 20, 0.18);
}

.auth-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.auth-brand h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text);
}

.auth-brand p {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

.auth-card {
  width: min(100%, 410px);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 0;
  padding: 24px 24px 18px;
}

.register-card {
  width: min(100%, 430px);
  padding: 24px 28px 18px;
}

.auth-heading {
  text-align: center;
  margin-bottom: 18px;
}

.auth-heading h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.auth-heading p {
  font-size: 12px;
  color: var(--muted);
}

.auth-form {
  display: grid;
  gap: 8px;
}

.auth-form label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

.input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 2px;
  padding: 0 10px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.input-wrap:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(45, 108, 255, 0.08);
}

.input-wrap i {
  color: #9aa7bb;
  font-size: 15px;
  flex: 0 0 auto;
}

.input-wrap input {
  border: 0;
  outline: none;
  width: 100%;
  min-width: 0;
  height: 36px;
  font-size: 14px;
  color: var(--text);
  background: transparent;
}

.input-wrap input::placeholder { color: #b0bbca; }

.email-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px;
  gap: 10px;
  align-items: stretch;
}

.email-code-row .input-wrap {
  min-width: 0;
}

.send-code-btn {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #f1f4f9;
  color: #7f8ca0;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.send-code-btn:hover {
  background: var(--blue-soft);
  border-color: #cbd8ff;
  color: var(--blue);
}

.send-code-btn:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
}

.otp-status {
  min-height: 16px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted);
}

.otp-status.success {
  color: #138a5b;
}

.otp-status.error {
  color: #b42334;
}

.icon-btn {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #8a96a8;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: 0 0 auto;
}

.icon-btn i { font-size: 16px; }

.submit-btn {
  margin-top: 10px;
  min-height: 38px;
  border: 0;
  border-radius: 2px;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: filter 0.16s ease, transform 0.16s ease;
}

.submit-btn:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
}

.submit-btn i { font-size: 16px; }

.auth-switch {
  margin-top: 14px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.auth-switch a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

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

.card-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 11px;
  color: #98a4b5;
}

.auth-links {
  display: flex;
  gap: 18px;
  justify-content: center;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding-bottom: 6px;
}

.auth-links a {
  color: #7f8ca0;
  text-decoration: none;
  font-weight: 700;
}

.auth-links a:hover { color: var(--blue); }

.error,
.message {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 2px;
  font-size: 13px;
  line-height: 1.4;
}

.error {
  background: #fff1f2;
  color: #b42334;
  border: 1px solid #f3c6cf;
}

.message {
  background: var(--blue-soft-2);
  color: #3059b1;
  border: 1px solid #d4e0fb;
}

@media (max-width: 520px) {
  .auth-page {
    width: 100%;
    gap: 14px;
    padding: 18px 12px 22px;
  }

  .register-page {
    justify-content: flex-start;
    padding-top: 10px;
  }

  .auth-logo {
    width: 82px;
    height: 82px;
  }

  .auth-brand h1 {
    font-size: 22px;
  }

  .register-page .auth-logo {
    width: 56px;
    height: 56px;
    margin-bottom: 10px;
  }

  .register-page .auth-brand h1 {
    font-size: 18px;
  }

  .register-page .auth-brand p {
    font-size: 10px;
  }

  .auth-card {
    width: 100%;
    padding: 20px 18px 16px;
  }

  .register-card {
    padding: 22px 20px 16px;
  }

  .email-code-row {
    grid-template-columns: minmax(0, 1fr) 76px;
    gap: 8px;
  }

  .send-code-btn {
    font-size: 11px;
  }

  .auth-links {
    gap: 14px;
    flex-wrap: wrap;
  }
}

/* Color-only BOTZL dark pass: keep the old layout, change palette only. */
:root {
  --bg: #0a0a0a;
  --panel: #171717;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #fafafa;
  --muted: #a1a1a1;
  --blue: #7c3aed;
  --blue-soft: rgba(124, 58, 237, 0.16);
  --blue-soft-2: rgba(124, 58, 237, 0.12);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

body {
  background: var(--bg);
  color: var(--text);
}

.auth-page {
  background:
    radial-gradient(720px 420px at 50% -12%, rgba(124, 58, 237, 0.28), transparent 64%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(180deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px) 0 0 / 72px 72px,
    #0a0a0a;
}

.auth-logo {
  border: 1px solid var(--line-strong);
  background: #050505;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
}

.auth-card {
  background: var(--panel);
  border-color: var(--line);
  box-shadow: var(--shadow);
}

.auth-brand h1,
.auth-heading h2 {
  color: var(--text);
}

.auth-brand p,
.auth-heading p,
.auth-form label,
.auth-switch,
.card-footer,
.auth-links a,
.otp-status {
  color: var(--muted);
}

.input-wrap {
  background: #1f1f1f;
  border-color: var(--line);
}

.input-wrap:focus-within {
  background: #202020;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18);
}

.input-wrap input {
  color: var(--text);
}

.input-wrap input::placeholder,
.input-wrap i,
.icon-btn {
  color: #8f8f8f;
}

.icon-btn:hover {
  background: rgba(124, 58, 237, 0.12);
  color: #ddd6fe;
}

.submit-btn,
.send-code-btn:hover {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.submit-btn:hover {
  filter: brightness(1.08);
}

.send-code-btn {
  background: #1f1f1f;
  border-color: var(--line);
  color: var(--muted);
}

.auth-switch a,
.auth-links a:hover {
  color: #a78bfa;
}

.card-footer {
  border-top-color: var(--line);
}

.error {
  background: rgba(255, 101, 104, 0.12);
  color: #fca5a5;
  border-color: rgba(255, 101, 104, 0.28);
}

.message {
  background: rgba(124, 58, 237, 0.14);
  color: #ddd6fe;
  border-color: rgba(124, 58, 237, 0.28);
}

/* Keep the real logo fully visible inside the auth badge. */
.auth-logo {
  padding: 8px;
  overflow: visible;
}

.auth-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
