:root {
  color-scheme: light;
  --lm-bg: #f5f7fb;
  --lm-surface: #ffffff;
  --lm-text: #0f1723;
  --lm-accent: #356187;
  --lm-accent-strong: #274867;
  --lm-border: #d7deea;
  --lm-subtle: #617187;
  --lm-shadow: 0 10px 32px rgba(15, 23, 35, 0.12);
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Poppins, Arial, sans-serif;
  color: var(--lm-text);
  background: var(--lm-bg);
}

body {
  display: grid;
  place-items: center;
  padding: 24px 16px;
}

.auth-shell,
.portal-shell {
  width: min(100%, 480px);
  background: var(--lm-surface);
  border: 1px solid var(--lm-border);
  border-radius: 16px;
  box-shadow: var(--lm-shadow);
  padding: 28px 24px;
}

.brand-mark {
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}

h1 {
  margin: 0 0 22px;
  font-size: 1.65rem;
  line-height: 1.2;
}

label {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 7px;
  color: var(--lm-text);
}

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--lm-border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 1rem;
  color: var(--lm-text);
  background: #fff;
  margin-bottom: 16px;
}

input:focus,
button:focus {
  outline: 3px solid rgba(53, 97, 135, 0.25);
  outline-offset: 1px;
}

button {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  background: var(--lm-accent);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 120ms ease-in-out;
}

button:hover {
  background: var(--lm-accent-strong);
}

button:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.legal-note {
  margin: 18px 0 0;
  color: var(--lm-subtle);
  font-size: 0.95rem;
}

.status-message {
  margin: 14px 0 0;
  min-height: 1.2em;
  font-size: 0.95rem;
  color: #9a1d2f;
}

.portal-loading {
  color: var(--lm-subtle);
}

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

.portal-brand {
  font-weight: 800;
  font-size: 1.3rem;
}

.portal-kicker {
  margin: 16px 0 4px;
  color: var(--lm-subtle);
}

.portal-title {
  margin: 0 0 10px;
  font-size: 1.4rem;
}

.portal-description {
  margin: 0 0 18px;
  line-height: 1.5;
}

.preview-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.preview-card {
  border: 1px solid var(--lm-border);
  border-radius: 10px;
  padding: 12px;
  font-weight: 600;
  color: #243448;
  background: #fafcff;
}

.inline-button {
  width: auto;
  padding: 0 16px;
}

@media (max-width: 540px) {
  .auth-shell,
  .portal-shell {
    width: calc(100% - 8px);
    padding: 22px 16px;
    border-radius: 12px;
  }

  .preview-grid {
    grid-template-columns: 1fr;
  }
}
