* {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f3f4f6;
  min-height: 100vh;
}

.page {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 3rem 1rem;
}

.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  width: 100%;
  max-width: 540px;
  overflow: hidden;
}

.branding {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 2rem 2rem 0;
}

.logo {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, 320px);
  max-height: 120px;
}

.logo.hidden {
  display: none;
}

.tenant-name {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: #374151;
  text-align: center;
}

.tenant-name.hidden {
  display: none;
}

.tenant-name.tenant-name-primary {
  font-size: 1.35rem;
  font-weight: 600;
  color: #1e293b;
}

.hidden {
  display: none;
}

.card-body {
  padding: 1.5rem 2rem 2rem;
}

.loading-shell {
  text-align: center;
  color: #9ca3af;
  padding: 2rem 0;
  font-size: 0.9rem;
}

.loading-shell.hidden {
  display: none;
}

.error-message {
  text-align: center;
  color: #6b7280;
  padding: 2rem 0;
  font-size: 0.9rem;
}

/* Hide the loading shell once status-page is defined */
status-page:defined ~ .loading-shell,
status-page:defined + .loading-shell {
  display: none;
}

@media (max-width: 600px) {
  .page {
    padding: 0;
    align-items: stretch;
  }

  .card {
    max-width: none;
    border-radius: 0;
    min-height: 100vh;
    box-shadow: none;
  }

  .branding {
    padding: 1.5rem 1.5rem 0;
  }

  .card-body {
    padding: 1.25rem 1.5rem 1.5rem;
  }
}
