:root {
  font-family: Inter, "Microsoft YaHei", Arial, sans-serif;
  color: #22262c;
  background: #f3f4f5;
}

* { box-sizing: border-box; }

body { margin: 0; min-width: 320px; }

.auth-layout {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-panel {
  width: min(100%, 380px);
  padding: 34px;
  border: 1px solid #e2e4e7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 40px rgb(24 28 33 / 8%);
}

.registration-panel { width: min(100%, 430px); }

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  background: #24282e;
  font-size: 15px;
  font-weight: 700;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: cover;
}

.eyebrow {
  margin: 20px 0 6px;
  color: #8b9098;
  font-size: 10px;
  font-weight: 700;
}

h1 {
  margin: 0 0 26px;
  font-size: 23px;
  letter-spacing: 0;
}

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

label { margin-top: 6px; font-size: 12px; font-weight: 600; }

input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #d9dce0;
  border-radius: 6px;
  outline: none;
  font: inherit;
}

input:focus { border-color: #4c89ff; box-shadow: 0 0 0 3px rgb(76 137 255 / 12%); }

button {
  width: 100%;
  height: 42px;
  margin-top: 13px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: #292d33;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

button:hover { background: #3a3f46; }

.primary-link {
  width: 100%;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: #fff;
  background: #292d33;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.primary-link:hover { background: #3a3f46; }

.form-error {
  margin: -10px 0 15px;
  padding: 10px 12px;
  border-radius: 6px;
  color: #a63535;
  background: #fff0f0;
  font-size: 12px;
  line-height: 1.5;
}

.form-success {
  margin: -10px 0 15px;
  padding: 10px 12px;
  border-radius: 6px;
  color: #247348;
  background: #e9f7ef;
  font-size: 12px;
  line-height: 1.5;
}

.field-error {
  margin: -3px 0 2px;
  color: #b43a3a;
  font-size: 11px;
  line-height: 1.45;
}

.email-code-request {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 8px;
}

.code-send-button {
  width: 112px;
  margin: 0;
  padding: 0 10px;
  white-space: nowrap;
}

.code-send-button:disabled {
  color: #777d85;
  background: #e4e6e9;
  cursor: not-allowed;
}

.code-message {
  min-height: 17px;
  margin: -3px 0 0;
  color: #247348;
  font-size: 11px;
  line-height: 1.45;
}

.code-message.is-error { color: #b43a3a; }

.auth-footer {
  margin: 20px 0 0;
  color: #7a8088;
  font-size: 12px;
  text-align: center;
}

.auth-footer a { color: #2f68c5; text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

.status-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #247348;
  background: #e9f7ef;
  font-size: 20px;
  font-weight: 700;
}

.status-copy {
  margin: -10px 0 4px;
  color: #696f77;
  font-size: 13px;
  line-height: 1.7;
}

.account-panel { text-align: left; }
.account-name { margin: -10px 0 20px; color: #666c74; font-size: 13px; }
.avatar-form { margin: 0 0 18px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.avatar-upload { position: relative; width: 72px; height: 72px; margin: 0; display: grid; place-items: center; overflow: hidden; border: 1px solid #dfe2e5; border-radius: 50%; color: #fff; background: #292d33; cursor: pointer; font-size: 24px; font-weight: 700; }
.avatar-upload:hover { border-color: #9ca3ac; }
.avatar-upload img { width: 100%; height: 100%; display: block; object-fit: cover; }
.avatar-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.avatar-submit { width: auto; min-width: 96px; margin: 0; padding: 0 14px; }
.avatar-error { flex-basis: 100%; margin: 0; }
.secondary-button { margin-top: 10px; color: #30353c; background: #eef0f2; }
.secondary-button:hover { background: #e2e5e8; }

@media (max-width: 480px) {
  .auth-layout { padding: 14px; }
  .auth-panel { padding: 26px 22px; }
  .email-code-request { grid-template-columns: minmax(0, 1fr) 104px; }
  .code-send-button { width: 104px; font-size: 12px; }
}
