/* Auth gate — matches desktop-client AuthGateLayout + Zeus sign-in / sign-up forms */

.auth-gate-page {
  --ag-bg: hsl(45, 36.4%, 91.4%);
  --ag-foreground: hsl(222.2, 84%, 4.9%);
  --ag-muted: hsl(215.4, 16.3%, 46.9%);
  --ag-border: hsl(214.3, 31.8%, 91.4%);
  --ag-primary: hsl(221.2, 83.2%, 53.3%);
  --ag-primary-hover: hsl(221.2, 83.2%, 48%);
  --ag-input-border: rgba(120, 113, 108, 0.7);
  --ag-input-border-focus: rgb(120, 113, 108);
  --ag-ring: rgba(120, 113, 108, 0.3);
  background: var(--ag-bg);
  color: var(--ag-foreground);
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  line-height: 1.5;
}

.auth-gate-page * {
  box-sizing: border-box;
}

.auth-gate-root {
  display: flex;
  flex: 1;
  width: 100%;
  min-height: 100vh;
  flex-direction: column;
  position: relative;
}

.auth-gate-home {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 10;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ag-muted);
  text-decoration: none;
}

.auth-gate-home:hover {
  color: var(--ag-foreground);
  text-decoration: underline;
}

.auth-gate-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow: auto;
}

.auth-gate-inner {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.auth-gate-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

.auth-gate-logo {
  height: 4rem;
  width: 4rem;
  object-fit: contain;
}

.auth-gate-title {
  font-family: Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: 2.25rem;
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin: 0 0 0.75rem;
  color: var(--ag-foreground);
}

.auth-gate-subtitle {
  font-size: 15px;
  color: var(--ag-muted);
  margin: 0;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.auth-gate-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  text-align: left;
}

.auth-gate-form[hidden],
.auth-gate-form.is-hidden {
  display: none !important;
}

/* Google — matches ZeusGoogleAuthButton */
.auth-gate-btn-google {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 9999px;
  border: 1px solid var(--ag-border);
  background: #fff;
  color: var(--ag-foreground);
  padding: 0.625rem 1.25rem;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: background 0.15s ease;
  cursor: pointer;
  font-family: inherit;
}

.auth-gate-btn-google:hover {
  background: hsl(210, 40%, 96%);
}

.auth-gate-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 13px;
  color: var(--ag-muted);
}

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

.auth-gate-label {
  display: block;
  width: 100%;
  text-align: left;
  font-size: 15px;
  font-weight: 500;
  color: var(--ag-foreground);
  margin-bottom: 0.5rem;
}

/* Inputs — ZEUS_AUTH_INPUT_CLASS */
.auth-gate-input {
  width: 100%;
  height: 2.75rem;
  border-radius: 0.75rem;
  border: 2px solid var(--ag-input-border);
  background: #fff;
  color: var(--ag-foreground);
  padding: 0 0.75rem;
  font-size: 0.875rem;
  font-family: inherit;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.auth-gate-input::placeholder {
  color: var(--ag-muted);
  opacity: 0.85;
}

.auth-gate-input:focus {
  outline: none;
  border-color: var(--ag-input-border-focus);
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ag-ring);
}

/* Primary pill — default Button */
.auth-gate-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
  width: 100%;
  border-radius: 9999px;
  border: none;
  background: var(--ag-primary);
  color: #fff;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease;
}

.auth-gate-btn-primary:hover:not(:disabled) {
  background: var(--ag-primary-hover);
}

.auth-gate-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Outline — Sign up */
.auth-gate-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border-radius: 9999px;
  border: 1px solid var(--ag-border);
  background: #fff;
  color: var(--ag-foreground);
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.auth-gate-btn-outline:hover {
  background: hsl(210, 40%, 96%);
}

.auth-gate-link {
  font-size: 14px;
  color: var(--ag-muted);
  margin: 0;
  padding-top: 0.25rem;
}

.auth-gate-link a {
  color: var(--ag-foreground);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.auth-gate-link a:hover {
  opacity: 0.8;
}

.auth-gate-inline-link {
  color: var(--ag-foreground);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
  font-size: 14px;
  width: fit-content;
}

.auth-gate-inline-link:hover {
  opacity: 0.8;
}

.auth-gate-hint {
  font-size: 13px;
  color: var(--ag-muted);
  margin: 0;
}

.auth-gate-stack-sm {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.auth-gate-footer-note {
  font-size: 0.875rem;
  color: var(--ag-muted);
  text-align: center;
  margin-top: 0.5rem;
}

.auth-gate-footer-note a {
  color: var(--ag-foreground);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Flash messages */
.auth-gate-page #flash .msg {
  font-size: 0.875rem;
  margin: 0;
  padding: 0.6rem 0.75rem;
  border-radius: 0.5rem;
}

.auth-gate-page #flash .msg.ok {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.auth-gate-page #flash .msg.err {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

/* Secondary (forgot / email reset) */
.auth-gate-btn-secondary {
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
  background: #fff;
  color: var(--ag-foreground);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
}

.auth-gate-btn-secondary:hover:not(:disabled) {
  background: #f9fafb;
}

.auth-gate-forgot-block {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 0.25rem;
}

.auth-gate-back {
  font-size: 0.875rem;
  margin-top: 1rem;
}

.auth-gate-back a {
  color: var(--ag-muted);
  text-decoration: none;
  font-weight: 500;
}

.auth-gate-back a:hover {
  color: var(--ag-foreground);
  text-decoration: underline;
}
