@import url("/brand-tokens.css");
@import url("/brand-components.css");
@import url("/experience-foundation.css");
@import url("/trusted-browsers.css");

:root {
  --auth-page-background: #f8fafc;
  --auth-surface: #ffffff;
  --auth-text: #0f172a;
  --auth-text-secondary: #475569;
  --auth-border: #e2e8f0;
  --auth-border-strong: #cbd5e1;
  --auth-accent: #0f766e;
  --auth-accent-hover: #115e59;
  --auth-danger: #b91c1c;
  --auth-danger-soft: #fef2f2;
  --auth-info: #075985;
  --auth-info-soft: #f0f9ff;
  --auth-focus: rgba(15, 118, 110, 0.28);
  --auth-radius-small: 8px;
  --auth-radius-medium: 12px;
  --auth-control-height: 46px;
  --auth-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.auth-shell {
  box-sizing: border-box;
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background: var(--auth-page-background);
  color: var(--auth-text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.auth-shell *,
.auth-shell *::before,
.auth-shell *::after {
  box-sizing: border-box;
}

.auth-shell .auth-card {
  width: min(560px, 100%);
  max-width: 100%;
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius-medium);
  background: var(--auth-surface);
  padding: 32px;
  box-shadow: var(--auth-shadow);
}

.auth-shell .auth-card-compact {
  width: min(420px, 100%);
}

.auth-shell .brand-component-logo {
  margin: 0 0 24px;
}

.auth-shell h1 {
  margin: 0;
  color: var(--auth-text);
  font-size: clamp(26px, 4vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.auth-shell p {
  margin: 8px 0 0;
  color: var(--auth-text-secondary);
  line-height: 1.55;
}

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

.auth-shell .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 16px;
}

.auth-shell label {
  display: grid;
  gap: 8px;
  color: var(--auth-text);
  font-size: 13px;
  font-weight: 750;
}

.auth-shell input,
.auth-shell select,
.auth-shell textarea,
.auth-shell button,
.auth-shell .auth-primary {
  width: 100%;
  min-height: var(--auth-control-height);
  border-radius: var(--auth-radius-small);
  font: inherit;
}

.auth-shell input,
.auth-shell select,
.auth-shell textarea {
  border: 1px solid var(--auth-border-strong);
  background: var(--auth-surface);
  color: var(--auth-text);
  padding: 0 14px;
}

.auth-shell :where(input, select, textarea, button, a):focus-visible {
  outline: 3px solid var(--auth-focus);
  outline-offset: 2px;
}

.auth-shell input[aria-invalid="true"] {
  border-color: var(--auth-danger);
}

.auth-shell button,
.auth-shell .auth-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: var(--auth-accent);
  color: #ffffff;
  cursor: pointer;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.auth-shell button:hover,
.auth-shell .auth-primary:hover {
  background: var(--auth-accent-hover);
}

.auth-shell button:disabled {
  background: #e2e8f0;
  color: #64748b;
  cursor: not-allowed;
}

.auth-shell .links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-top: 20px;
  font-size: 14px;
  font-weight: 750;
}

.auth-shell a {
  color: var(--auth-accent);
}

.auth-shell .error,
.auth-shell .note,
.auth-shell .notice,
.auth-shell .warning {
  margin-top: 16px;
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius-small);
  padding: 12px 14px;
  line-height: 1.5;
}

.auth-shell .error {
  border-color: #fca5a5;
  background: var(--auth-danger-soft);
  color: var(--auth-danger);
}

.auth-shell .note,
.auth-shell .notice {
  border-color: #7dd3fc;
  background: var(--auth-info-soft);
  color: var(--auth-info);
}

.auth-shell .optional-marker {
  color: var(--auth-text-secondary);
  font-size: 12px;
  font-weight: 600;
}

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

  .auth-shell .auth-card {
    padding: 24px 20px;
  }

  .auth-shell .grid {
    grid-template-columns: 1fr;
  }
}
