:root {
  --bg: #f1f3f2;
  --panel: #ffffff;
  --ink: #171717;
  --muted: #68635e;
  --line: #d9d7d3;
  --brand: #111111;
  --warm: #f4a261;
  --green: #2f6f57;
  --danger: #b42318;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button, input { font: inherit; }
a { color: inherit; }

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.auth-topbar {
  min-height: 68px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.94);
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #211309;
  background: var(--warm);
  font-weight: 800;
}

.back-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #3e3a36;
  text-decoration: none;
  font-size: 14px;
}

.auth-main {
  width: min(920px, calc(100% - 32px));
  margin: 40px auto;
  display: grid;
  place-items: center;
}

.auth-frame {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(280px, .82fr) minmax(0, 1.18fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 22px 60px rgba(27, 25, 22, .1);
}

.auth-intro {
  min-width: 0;
  padding: 40px 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  color: #fff;
  background: #171512;
}

.auth-intro small {
  color: #f7c99f;
  font-weight: 700;
}

.auth-intro h1 {
  margin: 12px 0 14px;
  font-size: 31px;
  line-height: 1.24;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.auth-intro p {
  margin: 0;
  color: #d8d0c7;
  font-size: 14px;
  line-height: 1.75;
}

.rights-note {
  padding: 14px;
  border: 1px solid rgba(116,198,157,.4);
  border-radius: 7px;
  color: #d9f3e6;
  background: rgba(47,111,87,.22);
  font-size: 13px;
  line-height: 1.6;
}

.auth-form-wrap {
  min-width: 0;
  padding: 40px 44px;
}

.auth-form-wrap h2 {
  margin: 0 0 8px;
  font-size: 26px;
  letter-spacing: 0;
}

.form-subtitle {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

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

.field { min-width: 0; }

label {
  display: block;
  margin-bottom: 7px;
  color: #4d4742;
  font-size: 13px;
  font-weight: 680;
}

input[type="tel"],
input[type="text"],
input[type="password"] {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid #d2cfca;
  border-radius: 8px;
  outline: none;
  color: var(--ink);
  background: #fff;
}

input:focus {
  border-color: #171717;
  box-shadow: 0 0 0 3px rgba(244,162,97,.2);
}

.consent-list {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f8f7;
}

.consent-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.55;
}

.consent-row input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: #111;
}

.consent-row a { color: var(--ink); font-weight: 700; }

.submit-btn {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--brand);
  font-weight: 750;
  cursor: pointer;
}

.submit-btn:disabled { cursor: wait; opacity: .62; }

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

.switch-auth a { color: var(--ink); font-weight: 750; }

.form-error {
  min-height: 20px;
  margin: 0;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.5;
}

.auth-footer {
  padding: 20px 24px 26px;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.auth-footer a { text-decoration: none; }

@media (max-width: 720px) {
  .auth-topbar { padding: 0 16px; }
  .auth-main { width: min(100% - 24px, 520px); margin: 20px auto 28px; }
  .auth-frame { grid-template-columns: 1fr; }
  .auth-intro { padding: 24px 22px; gap: 20px; }
  .auth-intro h1 { font-size: 25px; }
  .auth-form-wrap { padding: 28px 22px 30px; }
}

@media (max-width: 420px) {
  .auth-topbar { min-height: 62px; }
  .back-link { padding: 0 10px; font-size: 13px; }
  .auth-main { width: calc(100% - 20px); }
  .auth-intro, .auth-form-wrap { padding-left: 18px; padding-right: 18px; }
  .auth-form-wrap h2 { font-size: 23px; }
}
