/* V2 website auth/dashboard styling.
 * This file provides the mounted website shell only; auth/session logic stays in JS and API modules.
 */

:root {
  color-scheme: light;
  font-family: "Inter", "Avenir Next", "PingFang SC", sans-serif;
  background:
    radial-gradient(circle at top, rgba(191, 219, 254, 0.45), transparent 42%),
    linear-gradient(180deg, #f7fafc 0%, #edf2f7 100%);
  color: #172133;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

button,
input {
  font: inherit;
}

#app {
  min-height: 100vh;
}

.auth-shell,
.dashboard-shell {
  margin: 0 auto;
  max-width: 1080px;
  min-height: 100vh;
  padding: 48px 24px 64px;
}

.auth-hero {
  display: grid;
  gap: 10px;
  justify-items: center;
  margin: 0 auto 28px;
  max-width: 720px;
  text-align: center;
}

.auth-eyebrow,
.dashboard-kicker {
  color: #365983;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.auth-hero h1,
.dashboard-identity__copy h1,
.dashboard-section-heading h2 {
  margin: 0;
}

.auth-hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
  max-width: 12ch;
  text-wrap: balance;
}

.auth-hero p {
  color: #44536b;
  margin: 0;
  max-width: 52ch;
}

.auth-card,
.dashboard-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(214, 220, 228, 0.92);
  border-radius: 20px;
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.08),
    0 6px 12px rgba(0, 0, 0, 0.04);
}

.auth-card,
.dashboard-card {
  padding: 32px;
}

.auth-card {
  display: grid;
  gap: 20px;
  margin: 0 auto;
  max-width: 640px;
}

.auth-card--single-flow {
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.auth-card__header {
  display: grid;
  gap: 18px;
}

.auth-card__copy {
  display: grid;
  gap: 8px;
}

.auth-card__copy h2 {
  font-size: 1.5rem;
  margin: 0;
}

.auth-card__copy p {
  color: #5b677c;
  margin: 0;
}

.auth-email-summary {
  align-items: center;
  background: rgba(248, 250, 252, 0.98);
  border: 1px solid rgba(214, 220, 228, 0.94);
  border-radius: 16px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 14px;
}

.auth-email-summary__identity {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.auth-email-summary__avatar {
  align-items: center;
  background: linear-gradient(180deg, var(--auth-avatar-start, #365983) 0%, var(--auth-avatar-end, #243b5a) 100%);
  border-radius: 999px;
  color: #f8fafc;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.92rem;
  font-weight: 700;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.auth-email-summary__email {
  color: #172133;
  font-size: 0.98rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

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

.auth-field {
  display: grid;
  gap: 8px;
}

.auth-field-help {
  color: #5b677c;
  font-size: 0.95rem;
  margin: -4px 0 0;
  text-align: left;
}

.auth-field span {
  color: #24364a;
  font-size: 0.95rem;
  font-weight: 600;
}

.auth-field input,
.dashboard-input {
  background: #fff;
  border: 1px solid #d8e0e8;
  border-radius: 12px;
  min-height: 52px;
  padding: 14px 16px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.auth-field input:focus,
.dashboard-input:focus {
  border-color: #2f4b73;
  box-shadow: 0 0 0 3px rgba(47, 75, 115, 0.12);
  outline: none;
}

.auth-field input[readonly] {
  background: rgba(247, 250, 252, 0.98);
  color: #44536b;
}

.auth-primary-button,
.dashboard-primary-button,
.dashboard-signout,
.dashboard-list__remove {
  appearance: none;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.auth-primary-button,
.dashboard-primary-button {
  align-items: center;
  background: linear-gradient(180deg, #2f4b73 0%, #243b5a 100%);
  box-shadow:
    0 8px 20px rgba(36, 59, 90, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  color: #f8fafc;
  display: inline-flex;
  justify-content: center;
  min-height: 52px;
  padding: 0 18px;
}

.auth-primary-button[disabled] {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.auth-primary-button__content {
  align-items: center;
  display: inline-flex;
  gap: 10px;
  justify-content: center;
}

.auth-primary-button__spinner {
  animation: auth-spin 900ms linear infinite;
  border: 2px solid rgba(248, 250, 252, 0.28);
  border-top-color: #f8fafc;
  border-radius: 999px;
  height: 16px;
  width: 16px;
}

.auth-primary-button:hover,
.dashboard-primary-button:hover,
.dashboard-signout:hover,
.dashboard-list__remove:hover {
  transform: translateY(-1px);
}

.auth-secondary-actions {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: center;
}

.auth-secondary-actions--start {
  justify-content: flex-start;
}

.auth-text-button {
  appearance: none;
  background: transparent;
  border: 0;
  color: #2f4b73;
  cursor: pointer;
  font-weight: 600;
  padding: 0;
}

.auth-text-button:hover {
  text-decoration: underline;
}

.auth-text-button[disabled] {
  cursor: default;
  opacity: 0.72;
}

.auth-text-button[disabled]:hover {
  text-decoration: none;
}

.auth-inline-meta,
.auth-helper-copy {
  color: #5b677c;
  font-size: 0.95rem;
  margin: 0;
  text-align: center;
}

.auth-mode-hint {
  align-items: center;
  color: #5b677c;
  display: flex;
  font-size: 0.95rem;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin: -2px 0 0;
}

.auth-mode-hint__action {
  font-size: inherit;
}

.auth-loading-state {
  align-items: center;
  display: grid;
  gap: 14px;
  justify-items: center;
  min-height: 180px;
  text-align: center;
}

.auth-loading-state__spinner {
  animation: auth-spin 900ms linear infinite;
  border: 3px solid rgba(47, 75, 115, 0.12);
  border-top-color: #2f4b73;
  border-radius: 999px;
  height: 36px;
  width: 36px;
}

@keyframes auth-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.auth-status {
  color: #44536b;
  font-size: 0.95rem;
  margin: 0;
  min-height: 24px;
  text-align: left;
}

.auth-status[data-tone="success"] {
  color: #166534;
}

.auth-status[data-tone="error"] {
  color: #b91c1c;
}

.onboarding-hero h1 {
  max-width: 14ch;
}

.onboarding-card {
  max-width: 720px;
}

.onboarding-card__copy {
  display: grid;
  gap: 8px;
}

.onboarding-card__copy h2 {
  font-size: 1.5rem;
  margin: 0;
}

.onboarding-card__copy p {
  color: #5b677c;
  margin: 0;
}

.onboarding-profile {
  align-items: center;
  background: rgba(247, 250, 252, 0.96);
  border: 1px solid rgba(214, 220, 228, 0.92);
  border-radius: 18px;
  display: flex;
  gap: 20px;
  padding: 18px;
}

.onboarding-profile__avatar {
  border-radius: 22px;
  flex: 0 0 auto;
  height: 96px;
  width: 96px;
}

.onboarding-profile__details {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.onboarding-profile__row {
  display: grid;
  gap: 4px;
}

.onboarding-profile__row span {
  color: #5b677c;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.onboarding-profile__row strong {
  color: #172133;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.onboarding-actions {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.dashboard-shell {
  display: grid;
  gap: 20px;
}

.dashboard-card--hero {
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: space-between;
}

.dashboard-identity {
  align-items: center;
  display: flex;
  gap: 16px;
}

.dashboard-avatar {
  border-radius: 18px;
  height: 72px;
  width: 72px;
}

@media (max-width: 640px) {
  .auth-shell,
  .dashboard-shell {
    padding: 32px 16px 48px;
  }

  .auth-card,
  .dashboard-card {
    padding: 24px;
  }

  .auth-email-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .auth-email-summary__identity {
    width: 100%;
  }

  .auth-email-summary .auth-text-button {
    align-self: flex-start;
  }
}

.dashboard-identity__copy {
  display: grid;
  gap: 4px;
}

.dashboard-identity__copy p {
  color: #5b677c;
  margin: 0;
}

.dashboard-signout,
.dashboard-list__remove {
  background: rgba(36, 59, 90, 0.08);
  color: #243b5a;
  padding: 10px 16px;
}

.dashboard-section-heading {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
}

.dashboard-section-heading h2 {
  font-size: 1.4rem;
}

.dashboard-copy,
.dashboard-inline-status {
  color: #5b677c;
  margin: 0 0 16px;
}

.dashboard-inline-status {
  margin: 16px 0 0;
  min-height: 24px;
}

.dashboard-inline-status[data-tone="success"] {
  color: #166534;
}

.dashboard-inline-status[data-tone="error"] {
  color: #b91c1c;
}

.dashboard-entry {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 18px;
}

.dashboard-list {
  display: grid;
  gap: 10px;
}

.dashboard-list__row {
  align-items: center;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid rgba(214, 220, 228, 0.92);
  border-radius: 14px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 14px;
}

.dashboard-list__text {
  color: #172133;
  font-weight: 500;
}

@media (max-width: 720px) {
  .auth-shell,
  .dashboard-shell {
    padding: 28px 16px 40px;
  }

  .auth-card,
  .dashboard-card {
    padding: 24px;
  }

  .auth-email-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .onboarding-profile,
  .onboarding-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-card--hero,
  .dashboard-identity,
  .dashboard-entry {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .dashboard-card--hero {
    display: grid;
  }

  .dashboard-identity {
    display: grid;
    justify-items: start;
  }
}
