:root {
  --identity-primary: #175cd3;
  --identity-primary-strong: #1849a9;
  --identity-primary-soft: #dbe8ff;
  --identity-surface: rgba(255, 255, 255, 0.92);
  --identity-surface-strong: #ffffff;
  --identity-surface-muted: #eef4ff;
  --identity-outline: rgba(15, 23, 42, 0.12);
  --identity-outline-strong: rgba(23, 92, 211, 0.2);
  --identity-text: #14213d;
  --identity-text-muted: #52607a;
  --identity-success-bg: #e7f8ee;
  --identity-success-fg: #1a7f4b;
  --identity-danger-bg: #feeceb;
  --identity-danger-fg: #b42318;
  --identity-warning-bg: #fff4db;
  --identity-warning-fg: #b54708;
  --identity-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
}

body.identity-body {
  color: var(--identity-text);
  background:
    radial-gradient(circle at top left, rgba(23, 92, 211, 0.16), transparent 30%),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.18), transparent 26%),
    linear-gradient(180deg, #f7faff 0%, #edf3ff 100%);
}

.identity-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem 4rem;
}

.identity-shell {
  width: min(100%, 960px);
}

.identity-footer {
  padding: 1rem;
}

.identity-footer-inner {
  width: min(100%, 960px);
  margin: 0 auto;
  padding: 0.875rem 1rem;
  border: 1px solid var(--identity-outline);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--identity-text-muted);
  font-size: 0.875rem;
  text-align: center;
  backdrop-filter: blur(14px);
}

.identity-appbar {
  padding: 1rem;
}

.identity-appbar-inner {
  width: min(100%, 1120px);
  margin: 0 auto;
  border: 1px solid var(--identity-outline);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(16px);
}

.identity-appbar-row {
  min-height: 4rem;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.identity-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
  color: var(--identity-text);
  text-decoration: none;
}

.identity-brand-mark {
  width: 2.125rem;
  height: 2.125rem;
  color: var(--identity-primary);
}

.identity-brand-text {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.identity-user-button {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  border: 0;
  background: transparent;
  color: var(--identity-text);
  cursor: pointer;
}

.identity-user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: var(--identity-primary-soft);
  color: var(--identity-primary);
  font-weight: 700;
}

.identity-user-chevron {
  width: 1.125rem;
  height: 1.125rem;
  color: var(--identity-text-muted);
}

.identity-user-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  width: 12rem;
  padding: 0.5rem;
  border: 1px solid var(--identity-outline);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--identity-shadow);
  backdrop-filter: blur(16px);
}

.identity-user-menu-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 0.875rem;
  border-radius: 0.875rem;
  color: var(--identity-text);
  text-decoration: none;
}

.identity-user-menu-item:hover {
  background: var(--identity-surface-muted);
}

.identity-user-menu-item .material-icons {
  font-size: 1.125rem;
}

.identity-hero {
  margin-bottom: 1.5rem;
  text-align: center;
}

.identity-hero--compact {
  margin-bottom: 1.25rem;
}

.identity-kicker {
  margin: 0 0 0.5rem;
  color: var(--identity-primary);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.identity-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.85rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.identity-title--compact {
  font-size: 1.75rem;
}

.identity-subtitle {
  margin: 0.75rem auto 0;
  max-width: 38rem;
  color: var(--identity-text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

.identity-auth-grid {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

.identity-auth-grid--single {
  max-width: 29rem;
  margin-inline: auto;
}

@media (min-width: 900px) {
  .identity-auth-grid:not(.identity-auth-grid--single) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.identity-card {
  width: 100%;
  padding: 1.75rem;
  border: 1px solid var(--identity-outline);
  border-radius: 1.75rem;
  background: var(--identity-surface);
  box-shadow: var(--identity-shadow);
  backdrop-filter: blur(14px);
}

.identity-card--accent {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 251, 255, 0.94) 100%),
    var(--identity-surface);
}

.identity-card-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.identity-card-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
}

.identity-card-copy {
  margin: 0.35rem 0 0;
  color: var(--identity-text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.identity-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  flex: 0 0 auto;
}

.identity-card-icon .material-icons {
  font-size: 1.5rem;
}

.identity-card-icon--centered {
  margin: 0 auto 1rem;
}

.identity-card-icon--primary {
  background: var(--identity-primary-soft);
  color: var(--identity-primary);
}

.identity-card-icon--neutral {
  background: rgba(15, 23, 42, 0.06);
  color: var(--identity-text);
}

.identity-card-icon--danger {
  background: var(--identity-danger-bg);
  color: var(--identity-danger-fg);
}

.identity-form {
  display: grid;
  gap: 1rem;
}

.identity-field {
  display: grid;
  gap: 0.5rem;
}

.identity-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--identity-text);
}

.identity-input-wrap {
  position: relative;
}

.identity-leading-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #667085;
  font-size: 1.2rem;
  pointer-events: none;
}

.identity-input {
  width: 100%;
  min-height: 3.35rem;
  padding: 0.95rem 1rem 0.95rem 3rem;
  border: 1px solid transparent;
  border-radius: 1.15rem;
  background: var(--identity-surface-muted);
  color: var(--identity-text);
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.identity-input:focus {
  outline: none;
  border-color: var(--identity-outline-strong);
  background: var(--identity-surface-strong);
  box-shadow: 0 0 0 4px rgba(23, 92, 211, 0.12);
}

.identity-input::placeholder {
  color: #7a8699;
}

.identity-check-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.identity-checkbox {
  width: 1rem;
  height: 1rem;
  accent-color: var(--identity-primary);
}

.identity-check-label {
  font-size: 0.92rem;
  color: var(--identity-text-muted);
}

.identity-actions {
  display: flex;
  gap: 0.875rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.identity-actions--stacked-sm > * {
  flex: 1 1 12rem;
}

.identity-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.25rem;
  padding: 0.875rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.identity-button:hover {
  transform: translateY(-1px);
}

.identity-button .material-icons {
  font-size: 1.1rem;
}

.identity-button--full {
  width: 100%;
}

.identity-button--primary {
  background: var(--identity-primary);
  color: #ffffff;
  box-shadow: 0 14px 24px rgba(23, 92, 211, 0.22);
}

.identity-button--primary:hover {
  background: var(--identity-primary-strong);
}

.identity-button--secondary {
  background: rgba(255, 255, 255, 0.66);
  color: var(--identity-text);
  border-color: var(--identity-outline);
}

.identity-button--secondary:hover {
  background: rgba(255, 255, 255, 0.92);
}

.identity-button--danger {
  background: var(--identity-danger-fg);
  color: #ffffff;
  box-shadow: 0 14px 24px rgba(180, 35, 24, 0.2);
}

.identity-button--danger:hover {
  background: #912018;
}

.identity-provider-list {
  display: grid;
  gap: 0.875rem;
}

.identity-support-row {
  margin-top: 0.25rem;
  color: var(--identity-text-muted);
  font-size: 0.92rem;
  text-align: center;
}

.identity-inline-link {
  margin-left: 0.35rem;
  color: var(--identity-primary);
  font-weight: 600;
  text-decoration: none;
}

.identity-inline-link:hover {
  text-decoration: underline;
}

.identity-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 1.25rem;
  border: 1px solid transparent;
}

.identity-banner .material-icons {
  font-size: 1.2rem;
}

.identity-banner--info {
  background: #edf5ff;
  border-color: rgba(23, 92, 211, 0.16);
  color: #1e4d8c;
}

.identity-banner--error {
  background: var(--identity-danger-bg);
  border-color: rgba(180, 35, 24, 0.14);
  color: var(--identity-danger-fg);
}

.identity-banner--warning {
  background: var(--identity-warning-bg);
  border-color: rgba(181, 71, 8, 0.18);
  color: var(--identity-warning-fg);
}

.identity-credential-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.7);
}

.identity-copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.identity-copy-button .material-icons {
  font-size: 1rem;
}

.identity-surface-note {
  padding: 1rem;
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--identity-outline);
  color: var(--identity-text-muted);
}

.identity-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
}

@media (max-width: 720px) {
  .identity-main {
    padding-top: 2rem;
  }

  .identity-card {
    padding: 1.25rem;
    border-radius: 1.35rem;
  }

  .identity-card-header {
    gap: 0.75rem;
  }

  .identity-actions,
  .identity-actions--stacked-sm {
    flex-direction: column;
  }

  .identity-actions > *,
  .identity-actions--stacked-sm > * {
    width: 100%;
  }

  .identity-title {
    font-size: 2rem;
  }
}