@import url("https://api.fontshare.com/v2/css?f[]=satoshi@400;500;700&f[]=cabinet-grotesk@700;800&display=swap");

:root {
  --bg: #050807;
  --bg-elev: #0c1411;
  --bg-field: #111b17;
  --line: rgba(232, 255, 180, 0.14);
  --text: #eef6f0;
  --muted: #8aa399;
  --accent: #d6ff3f;
  --accent-dim: #a8c932;
  --accent-ink: #0a1208;
  --danger: #ff6b5a;
  --danger-bg: rgba(255, 107, 90, 0.12);
  --display: "Cabinet Grotesk", "Segoe UI", sans-serif;
  --body: "Satoshi", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body.auth-body {
  font-family: var(--body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.auth-stage {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem 2.5rem;
  overflow: hidden;
}

.auth-stage::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(42% 38% at 18% 22%, rgba(214, 255, 63, 0.16), transparent 70%),
    radial-gradient(36% 34% at 82% 70%, rgba(56, 140, 110, 0.28), transparent 72%),
    radial-gradient(60% 50% at 50% 100%, rgba(214, 255, 63, 0.06), transparent 65%);
  pointer-events: none;
}

.auth-stage::after {
  content: "BINIBIT";
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(5rem, 22vw, 14rem);
  letter-spacing: -0.06em;
  line-height: 0.85;
  color: transparent;
  -webkit-text-stroke: 1px rgba(238, 246, 240, 0.055);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.auth-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 24.5rem);
  animation: auth-in 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-brand {
  margin: 0 0 1.75rem;
  text-align: center;
}

.auth-brand-name {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.6rem, 8vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.95;
  color: var(--text);
}

.auth-brand-tag {
  margin: 0.65rem 0 0;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.auth-box {
  padding: 1.75rem 1.5rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: linear-gradient(165deg, rgba(17, 27, 23, 0.92), rgba(12, 20, 17, 0.88));
  backdrop-filter: blur(14px);
}

.auth-title {
  margin: 0 0 0.3rem;
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.auth-subtitle {
  margin: 0 0 1.4rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--muted);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.auth-field > label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.auth-field input[type="text"],
.auth-field input[type="email"],
.auth-field input[type="password"],
.auth-field input[type="tel"],
.auth-field select {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: var(--bg-field);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.auth-field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 1.15rem) calc(50% - 0.15rem),
    calc(100% - 0.75rem) calc(50% - 0.15rem);
  background-size: 0.4rem 0.4rem, 0.4rem 0.4rem;
  background-repeat: no-repeat;
  padding-right: 2.4rem;
}

.auth-field select option {
  background: var(--bg-elev);
  color: var(--text);
}

.auth-field input::placeholder {
  color: #61786e;
}

.auth-field input:hover,
.auth-field select:hover {
  border-color: rgba(214, 255, 63, 0.28);
}

.auth-field input:focus,
.auth-field select:focus {
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 3px rgba(214, 255, 63, 0.14);
}

.auth-field .text-danger,
.auth-form .text-danger,
.auth-form .validation-summary-errors {
  font-size: 0.8rem;
  color: var(--danger);
}

.auth-form .validation-summary-errors {
  margin: 0;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(255, 107, 90, 0.35);
  border-radius: 0.7rem;
  background: var(--danger-bg);
}

.auth-form .validation-summary-errors ul {
  margin: 0;
  padding-left: 1.1rem;
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.auth-link {
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 500;
  text-decoration: none;
}

.auth-link:hover {
  color: #eaff7a;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.86rem;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.auth-checkbox input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
}

.auth-btn,
a.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.15rem;
  margin-top: 0.35rem;
  padding: 0.8rem 1.25rem;
  border: 0;
  border-radius: 0.75rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, filter 140ms ease;
}

.auth-btn:hover {
  background: #e2ff66;
  filter: brightness(1.04);
}

.auth-btn:active {
  transform: translateY(1px);
}

.auth-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(214, 255, 63, 0.28);
}

.auth-btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 600;
}

.auth-btn-ghost:hover {
  background: rgba(214, 255, 63, 0.08);
  border-color: rgba(214, 255, 63, 0.32);
  color: var(--text);
  filter: none;
}

.auth-message {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--muted);
}

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

.auth-message a:hover {
  color: #eaff7a;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-code {
  display: block;
  margin: 0.85rem 0 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: var(--bg-field);
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  word-break: break-all;
}

.auth-footer {
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--muted);
}

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

.auth-footer a:hover {
  color: #eaff7a;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@keyframes auth-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-shell {
    animation: none;
  }
}
