.app-root,
body {
  min-height: 100%;
}

html {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  color: #0f172a;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.5;
  background: radial-gradient(circle at top, rgba(59, 130, 246, 0.08), transparent 35%), linear-gradient(180deg, #f8fafc 0%, #eef4fb 100%);
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.app-shell {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.nav-page {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}

.app-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 24px;
}

.app-nav-brand {
  color: #0f172a;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.app-nav-brand:hover {
  color: #1d4ed8;
  text-decoration: none;
}

.app-nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-nav-user {
  color: #475569;
  font-weight: 600;
}

.app-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid #d6dee8;
  border-radius: 999px;
  background-color: #f8fafc;
  color: #1f2937;
  font-weight: 600;
  text-decoration: none;
}

.app-nav-link:hover {
  background-color: #eef3f8;
  color: #111827;
  text-decoration: none;
}

.welcome-page .logo {
  width: 64px;
}

.icon-banner {
  width: 32px;
}

.body-container {
  margin-top: 60px;
  padding-bottom: 40px;
}

.welcome-page li {
  list-style: none;
  padding: 4px;
}

.identity-page {
  display: flex;
  justify-content: center;
  padding: 48px 0;
}

.identity-shell {
  width: 100%;
  max-width: 920px;
  padding: 32px;
  border: 1px solid #d9dee6;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.identity-shell-compact {
  max-width: 760px;
}

.identity-kicker {
  margin-bottom: 10px;
  color: #4b5563;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.identity-shell h1 {
  margin-bottom: 12px;
}

.identity-message {
  margin-bottom: 24px;
  color: #374151;
  font-size: 17px;
}

.identity-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.identity-panel {
  padding: 24px;
  border: 1px solid #d9dee6;
  border-radius: 18px;
  background-color: rgba(255, 255, 255, 0.82);
}

.identity-panel-header {
  margin-bottom: 18px;
}

.identity-panel-header h2 {
  margin-bottom: 8px;
  font-size: 24px;
}

.identity-panel-header p {
  margin-bottom: 0;
  color: #6b7280;
}

.identity-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.identity-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.identity-field label {
  margin: 0;
  color: #1f2937;
  font-weight: 600;
}

.identity-input {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background-color: #fff;
  color: #111827;
  font: inherit;
}

.identity-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.identity-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #374151;
  font-weight: 500;
}

.identity-checkbox input {
  width: 16px;
  height: 16px;
}

.identity-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.identity-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  text-decoration: none;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.identity-button:hover {
  text-decoration: none;
}

.identity-button-primary {
  background-color: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}

.identity-button-primary:hover {
  background-color: #1e40af;
  border-color: #1e40af;
  color: #fff;
}

.identity-button-secondary {
  background-color: #eef3f8;
  border-color: #d6dee8;
  color: #1f2937;
}

.identity-button-secondary:hover {
  background-color: #e4ebf4;
  border-color: #c6d2e1;
  color: #111827;
}

.identity-alert {
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: 14px;
}

.identity-alert strong {
  display: block;
  margin-bottom: 4px;
}

.identity-alert-warning {
  border-color: #f3d39b;
  background-color: #fff5df;
  color: #7c4a03;
}

.identity-alert-danger {
  border-color: #f1b5b5;
  background-color: #fff1f1;
  color: #8a1c1c;
}

.identity-alert-info {
  border-color: #bfd7f4;
  background-color: #eff6ff;
  color: #1d4e89;
}

.identity-alert ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.identity-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.identity-meta-item {
  min-width: 160px;
  padding: 14px 16px;
  border-radius: 14px;
  background-color: #eef3f8;
}

.identity-meta-label {
  display: block;
  margin-bottom: 6px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.identity-provider-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.identity-provider-form {
  width: 100%;
  max-width: none;
}

.identity-provider-form .identity-button {
  width: 100%;
}

.identity-inline-link {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
}

@media (max-width: 768px) {
  .app-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .app-nav {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 16px;
  }

  .app-nav-actions {
    width: 100%;
    justify-content: space-between;
  }

  .body-container {
    margin-top: 32px;
    padding-bottom: 24px;
  }

  .identity-page {
    padding: 24px 0;
  }

  .identity-shell {
    padding: 22px;
    border-radius: 18px;
  }

  .identity-panel {
    padding: 18px;
  }

  .identity-actions {
    flex-direction: column;
  }

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