@import url("./routes.css");

.auth-page .subpage-intro__label {
  text-transform: uppercase;
}

.auth-panel {
  inline-size: min(520px, calc(100% - 40px));
  margin-inline: auto;
  padding: clamp(22px, 3vw, 38px);
  border-radius: 32px;
  background: linear-gradient(160deg, var(--surface-raised), var(--surface) 38%);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-md);
}

.auth-panel fieldset {
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.auth-field {
  display: grid;
  gap: 6px;
  margin-block-end: 16px;
}

.auth-field label {
  color: var(--muted);
  font-size: .9rem;
  font-weight: 700;
}

.auth-field input {
  inline-size: 100%;
  min-block-size: 52px;
  padding: 0 16px;
  border: 2px solid #455e72;
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--ink);
}

.auth-field input:focus-visible {
  border-color: var(--accent);
  outline-color: var(--accent);
  outline-offset: 1px;
}

.auth-field input::placeholder {
  color: #94a9bd;
  opacity: 1;
}

.auth-field input:disabled {
  border-color: var(--line);
  background: #152336;
  color: #91a6bb;
  cursor: not-allowed;
}

.auth-button {
  display: flex;
  align-items: center;
  justify-content: center;
  inline-size: 100%;
  min-block-size: 50px;
  margin-block-start: 22px;
  padding: 11px 24px;
  border: 2px solid var(--gold-action-line);
  border-radius: 12px;
  background: var(--gold-action-bg);
  box-shadow: 0 5px 0 #201b19;
  color: var(--gold);
  font: 700 1.02rem/1.35 var(--display);
  text-align: center;
}

.auth-button:not(:disabled):hover {
  border-color: var(--gold);
  background: var(--gold-action-hover);
}

.auth-button:not(:disabled):active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #201b19;
}

.auth-button:disabled {
  border-color: #344b61;
  background: var(--surface-raised);
  color: #96abc0;
  box-shadow: none;
  cursor: not-allowed;
}

.auth-button--recovery {
  border-color: var(--action-line);
  background: var(--action-bg);
  box-shadow: 0 5px 0 var(--bg);
  color: var(--action-ink);
}

.auth-button--recovery:not(:disabled):hover {
  border-color: var(--accent);
  background: var(--action-bg-hover);
}

.auth-links {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: .93rem;
  text-align: center;
}

.auth-links a {
  color: var(--accent);
  font-weight: 700;
}

.auth-links .auth-forgot-link {
  color: var(--muted);
  font-weight: inherit;
}

.auth-links a:hover {
  text-decoration: underline;
}

.auth-recovery-intro {
  margin: 0;
  color: var(--muted);
}

.register-status {
  margin: 16px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #14343d;
  box-shadow: inset 0 0 0 1px #33585d;
  color: #c6f0f5;
  overflow-wrap: anywhere;
}

.register-status:empty {
  margin: 0;
  padding: 0;
}

.register-status[data-state="error"] {
  background: #3b232a;
  box-shadow: inset 0 0 0 1px #70404b;
  color: #ffc2ba;
}

.register-status[data-state="success"] {
  background: #19382f;
  box-shadow: inset 0 0 0 1px #38745d;
  color: #b9f0c8;
}

.auth-panel .register-status:not(:empty) {
  margin: 0 0 16px;
}

.register-link {
  display: inline-flex;
  align-items: center;
  min-block-size: 44px;
  padding: 8px 14px;
  border: 1px solid var(--action-line);
  border-radius: 12px;
  background: var(--action-bg);
  color: var(--action-ink);
  font-weight: 700;
}

.register-link:hover {
  border-color: var(--accent);
  background: var(--action-bg-hover);
}
