.auth-page {
  color: var(--text);
  color-scheme: dark;
  letter-spacing: 0;
  min-height: 100vh;
  background: var(--bg);
}

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

.auth-panel {
  width: min(100%, 420px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 30px;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.32);
}

.auth-brand span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.auth-brand h1 {
  margin-top: 8px;
  font-size: 24px;
}

.auth-brand p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 26px;
  border-bottom: 1px solid var(--line);
}

.auth-tabs button {
  height: 42px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.auth-tabs button.active {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

.oauth-button {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
  border: 1px solid #8e918f;
  border-radius: 6px;
  background: #131314;
  color: var(--text);
  font-weight: 650;
  text-decoration: none;
}

.oauth-button:hover {
  background: var(--surface-hover);
  border-color: #c4c7c5;
  color: #e3e3e3;
}

.google-mark {
  display: block;
  flex: 0 0 20px;
  object-fit: contain;
  width: 20px;
  height: 20px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 11px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

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

.auth-form label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  margin-top: 5px;
}

.auth-form input {
  width: 100%;
  height: 43px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--text);
  padding: 0 12px;
  outline: none;
}

.auth-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
}

.auth-form input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--panel-2) inset;
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
}
.field-error { color: #ffb4ab; font-size: 13px; line-height: 1.5; margin: 0; }
.auth-form input[aria-invalid="true"] { border-color: #df827a; }

.auth-submit, #forgotPassword {
  width: 100%;
  height: 44px;
  font-size: 14px;
  padding: 0 16px;
  margin-top: 14px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
  font-weight: 700;
}

.auth-submit:hover {
  background: var(--accent-hover);
}

#forgotPassword { margin-top: 10px; background: var(--panel); border-color: var(--line); color: var(--text); font-weight: 500; }
#forgotPassword:hover { background: var(--surface-hover); border-color: var(--line-strong); }
.auth-page :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
#forgotPassword:disabled { cursor: wait; opacity: .65; }

.auth-submit:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  background: var(--surface-inset);
  border-color: var(--line);
  color: var(--muted);
}

.auth-message {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--muted);
  padding: 12px;
  line-height: 1.5;
}

.auth-message.error {
  border-color: rgba(251, 113, 133, 0.55);
  color: #fecdd3;
}

.hidden {
  display: none !important;
}

@media (max-width: 520px) {
  .auth-shell {
    align-items: start;
    padding: 18px;
  }

  .auth-panel {
    margin-top: 8vh;
    padding: 24px 20px;
  }
}
