:root {
  --lm-bg: #f5f5f7;
  --lm-surface: #fcf8fb;
  --lm-surface-2: #ffffff;
  --lm-surface-3: #f6f3f5;
  --lm-surface-4: #f0edef;
  --lm-text: #1b1b1d;
  --lm-muted: #414755;
  --lm-soft: #717786;
  --lm-line: rgba(193, 198, 215, 0.58);
  --lm-primary: #0058bc;
  --lm-primary-hover: #0070eb;
  --lm-radius-lg: 12px;
  --lm-radius-xl: 18px;
  --lm-radius-2xl: 24px;
  --lm-shadow-card: 0 8px 40px -12px rgba(15, 23, 42, 0.11);
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  min-height: 100vh;
  color: var(--lm-text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::selection,
::selection {
  background: rgba(0, 88, 188, 0.18);
  color: var(--lm-primary);
}

.font-display {
  font-family: Geist, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -0.02em;
}

.lm-auth-page {
  background:
    radial-gradient(circle at 50% -10%, rgba(0, 88, 188, 0.06), transparent 34%),
    var(--lm-surface);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-shell {
  width: min(100%, 420px);
}

.auth-card {
  width: 100%;
  background: var(--lm-surface-2);
  border: 1px solid var(--lm-line);
  border-radius: var(--lm-radius-2xl);
  box-shadow: var(--lm-shadow-card);
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.auth-logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--lm-primary);
  background: rgba(0, 88, 188, 0.10);
  font-size: 25px;
}

.auth-title {
  margin: 0;
  color: var(--lm-text);
  font-size: 24px;
  line-height: 1.3;
  font-weight: 600;
}

.auth-subtitle {
  color: var(--lm-muted);
  font-size: 15px;
  line-height: 1.5;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group-lm {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label-lm {
  margin: 0;
  padding-inline: 4px;
  color: var(--lm-muted);
  font-family: Geist, Inter, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.form-control-lm {
  min-height: 48px;
  padding-inline: 16px;
  border-radius: var(--lm-radius-lg);
  border-color: var(--lm-line);
  background: #fcf8fb;
  color: var(--lm-text);
  font-size: 15px;
  line-height: 1.5;
  box-shadow: none;
}

.form-control-lm::placeholder { color: var(--lm-soft); }

.form-control-lm:focus {
  border-color: var(--lm-primary);
  box-shadow: 0 0 0 0.18rem rgba(0, 88, 188, 0.12);
  background: #ffffff;
  color: var(--lm-text);
}

.auth-small-link,
.auth-footer a {
  color: var(--lm-primary);
  font-family: Geist, Inter, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 600;
  text-decoration: none;
}

.auth-small-link:hover,
.auth-footer a:hover { text-decoration: underline; }

.btn-lm-primary {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: var(--lm-primary);
  color: #ffffff;
  font-family: Geist, Inter, sans-serif;
  font-size: 15px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.btn-lm-primary:hover,
.btn-lm-primary:focus {
  background: var(--lm-primary-hover);
  color: #ffffff;
  box-shadow: 0 8px 22px rgba(0, 88, 188, 0.18);
}

.btn-lm-primary:active { transform: scale(0.985); }

.auth-submit { margin-top: 8px; width: 100%; }

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-block: 32px;
}

.auth-divider span {
  height: 1px;
  background: rgba(193, 198, 215, 0.44);
}

.auth-divider small {
  color: var(--lm-soft);
  font-family: Geist, Inter, sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.social-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-social {
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid var(--lm-line);
  background: var(--lm-surface-2);
  color: var(--lm-text);
  font-family: Geist, Inter, sans-serif;
  font-size: 15px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: background-color 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.btn-social:hover,
.btn-social:focus {
  background: var(--lm-surface-3);
  border-color: rgba(113, 119, 134, 0.35);
  color: var(--lm-text);
}

.btn-social:active { transform: scale(0.985); }

.social-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.auth-footer {
  margin: 32px 0 0;
  color: var(--lm-muted);
  font-size: 15px;
  line-height: 1.5;
}

.invalid-feedback {
  padding-inline: 4px;
  font-size: 13px;
}

@media (max-width: 575.98px) {
  .lm-auth-page { padding: 16px; }
  .auth-card { padding: 32px 24px; border-radius: 22px; }
  .auth-title { font-size: 22px; }
}

.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 2px;
  margin-bottom: 2px;
  padding-left: 0;
}

.auth-check .form-check-input {
  float: none;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 4px 0 0;
  border-color: var(--lm-line);
  background-color: #fcf8fb;
  cursor: pointer;
}

.auth-check .form-check-input:checked {
  background-color: var(--lm-primary);
  border-color: var(--lm-primary);
}

.auth-check .form-check-input:focus {
  border-color: var(--lm-primary);
  box-shadow: 0 0 0 0.18rem rgba(0, 88, 188, 0.12);
}

.auth-check .form-check-label {
  margin: 0;
  color: var(--lm-muted);
  font-size: 15px;
  line-height: 1.55;
  cursor: pointer;
}

.auth-check a {
  color: var(--lm-primary);
  text-decoration: none;
}

.auth-check a:hover { text-decoration: underline; }

.auth-check .invalid-feedback {
  margin-left: -28px;
  padding-left: 4px;
}
