:root {
  --bg: #0B0B10;
  --surface: #140D1F;
  --surface-2: #1A0F26;
  --input: #0D0915;
  --purple: #8B5CF6;
  --lavender: #C084FC;
  --sakura: #E9D5FF;
  --border: rgba(192, 132, 252, 0.2);
  --border-strong: rgba(192, 132, 252, 0.42);
  --text: #F8F5FF;
  --text-2: #B9A8D0;
  --text-3: #83729B;
  --mono: "JetBrains Mono", Consolas, ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
  background: var(--bg);
  background-image: radial-gradient(ellipse 65% 50% at 50% 10%, rgba(139, 92, 246, 0.16) 0%, transparent 65%);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.hidden { display: none !important; }

.auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-topbar {
  height: 64px;
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 11, 16, 0.85);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
}

.brand-name {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}

.back-link {
  color: var(--text-2);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

.back-link:hover { color: #fff; }

.auth-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 18px;
}

.auth-panel {
  width: 100%;
  max-width: 840px;
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
}

@media (max-width: 760px) {
  .auth-panel { grid-template-columns: 1fr; }
  .auth-art { display: none; }
}

.auth-art {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: #120a1f;
  border-right: 1px solid var(--border);
}

.auth-art > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-art-overlay {
  position: relative;
  z-index: 2;
  padding: 24px;
  background: linear-gradient(0deg, rgba(11, 11, 16, 0.95) 0%, rgba(11, 11, 16, 0.65) 65%, transparent 100%);
}

.art-logo {
  height: 44px;
  width: auto;
  margin-bottom: 10px;
}

.auth-art-overlay p {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--sakura);
}

.auth-form-side {
  display: flex;
  flex-direction: column;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #100a19;
  border-bottom: 1px solid var(--border);
}

.auth-tab {
  position: relative;
  height: 48px;
  background: transparent;
  border: none;
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.auth-tab.active {
  color: #fff;
}

.auth-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2.5px;
  background: var(--purple);
}

.auth-alert {
  margin: 18px 28px 0;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.45;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.auth-alert.info {
  background: rgba(139, 92, 246, 0.16);
  border-color: rgba(192, 132, 252, 0.45);
  color: var(--sakura);
}

.form-body,
.signed-box {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

h2 {
  font-size: 19px;
  font-weight: 800;
  color: #fff;
}

.form-sub {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
  margin-top: -6px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}

.field input {
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--input);
  color: #fff;
  font-size: 13px;
  outline: none;
}

.field input:focus {
  border-color: var(--lavender);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  border-radius: 9px;
  border: 1px solid rgba(233, 213, 255, 0.35);
  background: linear-gradient(135deg, #9d6bff 0%, #8B5CF6 60%, #7c3aed 100%);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  margin-top: 4px;
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.08);
}

.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.ok-badge {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 5px;
  background: rgba(34, 197, 94, 0.16);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #86efac;
}

.signed-links {
  display: flex;
  gap: 10px;
}

.btn-ghost {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--sakura);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn-ghost:hover { border-color: var(--border-strong); color: #fff; }

.otp-badge {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 5px;
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid var(--border-strong);
  color: var(--sakura);
}

.otp-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.otp-input {
  height: 54px !important;
  font-family: var(--mono);
  font-size: 26px !important;
  font-weight: 800;
  letter-spacing: 10px;
  text-align: center;
  color: #ffffff !important;
}
