:root {
  color-scheme: light;
  --auth-blue: #2454ff;
  --auth-ink: #0f172a;
  --auth-muted: #64748b;
  --auth-border: #e5e7eb;
  --auth-soft: #f3f6ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--auth-ink);
  font-family: "DM Sans", sans-serif;
  font-size: 15px;
  background: #fff;
}

button,
input,
textarea,
select {
  font-family: inherit;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(420px, 1.05fr) minmax(420px, 0.95fr);
}

.auth-visual {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  color: #fff;
  background: #0f172a;
}

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

.auth-visual::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(180deg, rgb(15 23 42 / 15%), rgb(15 23 42 / 72%)),
    radial-gradient(circle at 62% 42%, rgb(36 84 255 / 30%), transparent 30%);
}

.visual-content {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: flex-end;
  padding: 72px;
}

.visual-badge {
  width: max-content;
  border: 1px solid rgb(255 255 255 / 24%);
  border-radius: 999px;
  padding: 8px 14px;
  background: rgb(255 255 255 / 12%);
  backdrop-filter: blur(12px);
  font-size: 14px;
  font-weight: 700;
}

.visual-title {
  max-width: 560px;
  margin: 24px 0 14px;
  color: #fff;
  font-size: clamp(42px, 5vw, 72px);
  line-height: 0.98;
  letter-spacing: 0;
}

.visual-copy {
  max-width: 600px;
  margin: 0;
  color: rgb(255 255 255 / 88%);
  font-size: 20px;
  line-height: 1.55;
}

.auth-panel {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  padding: 48px min(8vw, 96px);
}

.auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--auth-ink);
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 194px;
  height: auto;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  background: var(--auth-blue);
  color: #fff;
  font-weight: 900;
}

.brand strong {
  font-size: 26px;
  letter-spacing: 0;
}

.top-links {
  display: inline-flex;
  align-items: center;
  gap: 26px;
  font-size: 15px;
}

.top-links a {
  color: var(--auth-ink);
  text-decoration: none;
}

.top-links .auth-lang-compact {
  display: inline-flex;
  position: relative;
}

.top-links .auth-lang-compact summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  width: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--auth-ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  list-style: none;
  box-shadow: none;
  cursor: pointer;
}

.top-links .auth-lang-compact summary::-webkit-details-marker,
.top-links .auth-lang-compact summary::after {
  display: none;
}

.top-links .auth-lang-compact svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2.2;
}

.top-links .auth-lang-compact .lang-dropdown-menu {
  left: 50%;
  right: auto;
  top: calc(100% + 13px);
  width: 156px;
  min-width: 156px;
  transform: translateX(-50%);
  z-index: 60;
}

.auth-card {
  width: min(100%, 480px);
  margin: auto;
}

.tabs {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
}

.tab {
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 0 0 6px;
  background: transparent;
  color: var(--auth-ink);
  cursor: default;
  font-size: 20px;
  font-weight: 800;
}

.tab.is-active {
  border-color: var(--auth-blue);
  color: var(--auth-blue);
}

.field {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.field label,
.field-header label {
  font-size: 14px;
  font-weight: 700;
}

.field-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.field-link {
  color: var(--auth-blue);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.field-link:hover {
  text-decoration: underline;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.input {
  width: 100%;
  height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  outline: none;
  background: var(--auth-soft);
  padding: 0 14px;
  color: var(--auth-ink);
  font-size: 15px;
}

.input:focus {
  border-color: rgb(36 84 255 / 45%);
  box-shadow: 0 0 0 3px rgb(36 84 255 / 12%);
}

.input[readonly] {
  color: #475569;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--auth-blue);
  border-radius: 8px;
  padding: 0 18px;
  background: var(--auth-blue);
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}

.button.secondary {
  background: #fff;
  color: var(--auth-blue);
}

.button.full {
  width: 100%;
  margin-top: 18px;
}

.button:disabled {
  border-color: #cbd5e1;
  background: #cbd5e1;
  cursor: not-allowed;
}

.agree {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 18px;
  color: #334155;
  font-size: 14px;
  line-height: 1.5;
}

.agree a,
.form-footer a {
  color: var(--auth-blue);
}

.message {
  min-height: 22px;
  margin-top: 14px;
  color: var(--auth-muted);
  font-size: 14px;
  line-height: 1.5;
}

.message.is-error {
  color: #dc2626;
}

.message.is-success {
  color: #16a34a;
}

.success-panel {
  display: none;
  margin-top: 22px;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 18px;
  background: #f0fdf4;
}

.success-panel.is-visible {
  display: block;
}

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

@media (max-width: 980px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    min-height: 360px;
  }

  .visual-content {
    min-height: 360px;
    padding: 40px 24px;
  }

  .auth-panel {
    min-height: auto;
    padding: 28px 20px 48px;
  }

  .auth-card {
    margin-top: 48px;
  }
}
