:root {
  color-scheme: dark;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: #171918;
  color: #f3f4f1;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: #171918;
}

.auth-shell {
  width: min(100% - 32px, 420px);
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  padding: 32px 0;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid #4f866d;
  border-radius: 8px;
  background: #20352c;
  color: #bde7ce;
  font: 700 20px/1 Georgia, serif;
}

.auth-brand h1 {
  margin: 0;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: 0;
}

.auth-brand p {
  margin: 4px 0 0;
  color: #8e9690;
  font-size: 12px;
}

.auth-card {
  border: 1px solid #353936;
  border-radius: 8px;
  background: #202321;
  box-shadow: 0 18px 48px rgb(0 0 0 / 28%);
  padding: 26px;
}

.auth-heading { margin-bottom: 22px; }

.auth-kicker {
  margin: 0 0 8px;
  color: #77c79e;
  font-size: 12px;
  font-weight: 700;
}

.auth-heading h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: 0;
}

.auth-heading p:last-child {
  margin: 8px 0 0;
  color: #a6ada8;
  font-size: 13px;
  line-height: 1.6;
}

#authForm {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #cdd1ce;
  font-size: 13px;
  font-weight: 600;
}

.field input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #434844;
  border-radius: 6px;
  outline: none;
  background: #171918;
  color: #f7f8f5;
  padding: 10px 12px;
  font: inherit;
  font-weight: 400;
}

.field input:focus {
  border-color: #6cc697;
  box-shadow: 0 0 0 3px rgb(108 198 151 / 14%);
}

.show-password {
  min-height: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #9fa6a1;
  font-size: 12px;
  cursor: pointer;
}

.show-password input {
  width: 16px;
  height: 16px;
  accent-color: #69bd91;
}

.primary-action {
  min-height: 44px;
  border: 1px solid #70c79a;
  border-radius: 6px;
  background: #70c79a;
  color: #102018;
  font: 700 14px/1 inherit;
  cursor: pointer;
}

.primary-action:hover { background: #82d5aa; }
.primary-action:disabled { cursor: wait; opacity: .65; }

.auth-message {
  margin: -8px 0 16px;
  border-left: 3px solid #e78375;
  background: #362421;
  color: #f2b6ad;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
}

.auth-security {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #333734;
  color: #8e9690;
  font-size: 11px;
}

.security-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #70c79a;
  box-shadow: 0 0 0 3px rgb(112 199 154 / 12%);
}

.hidden { display: none !important; }

@media (max-width: 480px) {
  .auth-shell {
    width: min(100% - 24px, 420px);
    justify-content: flex-start;
    padding-top: max(24px, env(safe-area-inset-top));
  }

  .auth-card { padding: 22px 18px; }
}
