:root {
  --bg: #f4f6f2;
  --panel: #ffffff;
  --ink: #17201b;
  --muted: #667064;
  --line: #dfe6dc;
  --brand: #f4b63e;
  --brand-strong: #d99000;
  --green: #256f45;
  --red: #b42318;
  --shadow: 0 24px 70px rgba(27, 36, 30, 0.13);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(115deg, rgba(244, 182, 62, 0.18), transparent 34%),
    linear-gradient(180deg, #fbfcf7 0%, var(--bg) 100%);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

button,
input {
  font: inherit;
}

.auth-page {
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;
  align-items: center;
  gap: 56px;
  padding: 40px 0;
}

.brand-panel {
  min-height: 620px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px 0;
}

.brand {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: 24px;
  font-weight: 800;
}

.brand img {
  width: 54px;
  height: 54px;
}

.brand-copy {
  max-width: 560px;
}

.domain {
  margin: 0 0 14px;
  color: var(--brand-strong);
  font-size: 18px;
  font-weight: 800;
}

h1 {
  margin: 0;
  max-width: 650px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.95;
  letter-spacing: 0;
}

.brand-copy p:last-child {
  max-width: 520px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.auth-panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(223, 230, 220, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 4px;
  background: #eef3eb;
  border-radius: 8px;
}

.tab {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
}

.tab.active {
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(27, 36, 30, 0.08);
}

.auth-form {
  display: none;
  padding-top: 24px;
}

.auth-form.active {
  display: block;
}

h2 {
  margin: 0 0 18px;
  font-size: 28px;
  line-height: 1.15;
}

label {
  display: block;
  margin: 14px 0;
  color: #334137;
  font-size: 14px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 46px;
  margin-top: 7px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfa;
  color: var(--ink);
  outline: none;
}

input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(244, 182, 62, 0.18);
}

.captcha-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf5;
}

.captcha-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.captcha-question {
  font-size: 18px;
}

.icon-button {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  font-size: 20px;
}

.primary-button {
  width: 100%;
  min-height: 48px;
  margin-top: 10px;
  border: 0;
  border-radius: 7px;
  background: #1d6b43;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

.primary-button:hover {
  background: #185735;
}

.strength {
  margin: -4px 0 6px;
}

.strength-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ece3;
}

#strength-bar {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--red);
  transition: width 160ms ease, background 160ms ease;
}

#strength-bar[data-score="3"] {
  background: #c47a16;
}

#strength-bar[data-score="4"],
#strength-bar[data-score="5"] {
  background: var(--green);
}

#strength-text {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.form-message {
  min-height: 22px;
  margin: 14px 0 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.ok {
  color: var(--green);
}

.error {
  color: var(--red);
}

@media (max-width: 900px) {
  .auth-page {
    grid-template-columns: 1fr;
    gap: 28px;
    align-items: start;
    padding: 24px 0;
  }

  .brand-panel {
    min-height: auto;
    gap: 34px;
  }

  .brand-copy p:last-child {
    margin-top: 16px;
  }
}

@media (max-width: 520px) {
  .auth-page {
    width: min(100% - 20px, 1120px);
  }

  .auth-panel {
    padding: 14px;
  }

  .tabs {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 40px;
  }
}
