:root {
  --auth-overlay-tint: rgba(6, 10, 24, 0.32);
  --auth-page-fallback: #eef2f6;
  --auth-card-background: rgba(255, 255, 255, 0.96);
  --auth-card-shadow: 0 18px 44px rgba(15, 23, 42, 0.22);
  --auth-text: #0f172a;
  --auth-muted-text: #4b5563;
  --auth-subtle-text: #6b7280;
  --auth-border: #d1d5db;
  --auth-provider-border: #dbe4f0;
  --auth-provider-text: #42526e;
  --auth-primary: #0f766e;
  --auth-primary-hover: #0b5f59;
  --auth-focus: #4f80d9;
  --auth-error: #dc2626;
}

#auth-overlay {
  background:
    linear-gradient(var(--auth-overlay-tint), var(--auth-overlay-tint)),
    url("../signin-background.jpg") center / cover no-repeat,
    var(--auth-page-fallback);
}

#auth-box {
  width: min(100%, 360px);
  padding: 28px 38px 28px;
  color: var(--auth-text);
  background: var(--auth-card-background);
  box-shadow: var(--auth-card-shadow);
}

#auth-brand {
  min-height: 34px;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#auth-brand-logo {
  max-width: 150px;
  max-height: 34px;
  object-fit: contain;
}

#auth-box h2 {
  color: var(--auth-text);
  font-size: 18px;
  line-height: 23px;
  text-align: center;
  text-transform: none;
}

#auth-status,
.auth-field label {
  color: var(--auth-muted-text);
}

.auth-field input {
  border-color: var(--auth-border);
}

.auth-field input:focus {
  border-color: var(--auth-focus);
  outline-color: rgba(79, 128, 217, 0.24);
}

#auth-submit {
  background: var(--auth-primary);
  box-shadow: 0 3px 7px rgba(15, 118, 110, 0.28);
}

#auth-submit:hover {
  background: var(--auth-primary-hover);
}

.auth-link,
#auth-mode-prompt,
#auth-secondary-row {
  color: var(--auth-subtle-text);
}

#auth-actions {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
}

.auth-btn {
  min-height: 40px;
  padding: 8px 10px;
  color: var(--auth-provider-text);
  border-color: var(--auth-provider-border);
  background: #ffffff;
  gap: 8px;
  white-space: normal;
  line-height: 15px;
  text-align: left;
}

.auth-btn span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.auth-btn:hover {
  color: var(--auth-provider-text);
  border-color: var(--auth-focus);
}

.auth-name-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.provider-logo {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  object-fit: contain;
}

#auth-error {
  color: var(--auth-error);
}

@media (max-width: 420px) {
  #auth-box {
    padding: 26px 24px 24px;
  }

  .auth-name-row {
    grid-template-columns: 1fr;
  }
}
