.login-screen {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(29, 79, 145, 0.18), transparent 28%),
    linear-gradient(160deg, #eef3f8 0%, #f7f9fc 55%, #edf2f7 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 420px);
  gap: 22px;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
  z-index: 2000;
  padding: 28px;
}

.login-screen.hidden {
  display: none;
}

body.boot-authenticated .login-screen {
  display: none;
}

body:not(.boot-authenticated) .layout {
  display: none;
}

.login-card {
  width: min(420px, calc(100vw - 32px));
  background: var(--surface);
  border: 1px solid rgba(188, 200, 214, 0.8);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: grid;
  gap: 16px;
  box-shadow: var(--shadow-md);
}

.login-card h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 700;
}

.login-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

.login-card label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.login-card input {
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
}

.login-card input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(29, 79, 145, 0.08);
}

.login-card-brand,
.login-card-divider {
  display: none;
}

.login-error {
  min-height: 18px;
  color: var(--danger);
  font-size: 12px;
}

.login-notice {
  background: rgba(46, 139, 87, 0.08);
  border: 1px solid rgba(46, 139, 87, 0.35);
  border-radius: 10px;
  padding: 12px 14px;
  display: grid;
  gap: 6px;
}

.login-notice.hidden {
  display: none;
}

.login-notice .login-notice-label {
  font-size: 11px;
  color: #3c7f5b;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.login-notice .login-notice-code {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.18em;
  font-family: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color: #1d4f91;
  cursor: pointer;
  user-select: all;
}

.login-notice .login-notice-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.code-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.code-row input {
  flex: 1;
  min-width: 0;
}

.code-row button {
  flex: 0 0 auto;
  min-width: 108px;
}

.code-row button:disabled {
  background: var(--surface-alt);
  color: var(--text-muted);
  border-color: var(--border);
  cursor: not-allowed;
}

.login-hero-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  padding: 6px 36px 12px;
  border-radius: 28px;
  background:
    linear-gradient(160deg, rgba(7, 193, 96, 0.05), transparent 42%),
    linear-gradient(135deg, #ffffff 0%, #f7faf8 48%, #f2f7f4 100%);
  color: #1f2329;
  box-shadow: none;
}

.login-hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -60px -90px auto;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(7, 193, 96, 0.16) 0%, rgba(7, 193, 96, 0.03) 56%, transparent 72%);
  pointer-events: none;
}

.login-hero-panel .eyebrow {
  color: #94a0ac;
}

.login-hero-panel h1 {
  margin: 4px 0 0;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.login-hero-panel p {
  margin: 4px 0 0;
  max-width: 520px;
  font-size: 15px;
  line-height: 1.9;
  color: #65717d;
}

.login-hero-art {
  position: absolute;
  inset: 0;
  padding: 0;
  margin: 0;
  border-radius: inherit;
  background: transparent;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.login-hero-art img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
  mix-blend-mode: multiply;
  opacity: 0.85;
}

.login-hero-panel > .eyebrow,
.login-hero-panel > h1,
.login-hero-panel > p,
.login-hero-panel > .login-hero-points {
  position: relative;
  z-index: 1;
}

.login-hero-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: auto;
}

.login-hero-point {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 0;
  background: transparent;
  border: 0;
  min-width: 0;
}

.login-hero-point-value {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.login-hero-point-key {
  color: #169757;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.login-hero-point-value {
  color: #31404d;
  font-size: 12px;
  font-weight: 600;
}

.login-card {
  position: relative;
  align-self: stretch;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
  border: 1px solid rgba(31, 35, 41, 0.06);
  border-radius: 28px;
  padding: 38px 34px 32px;
  box-shadow: 0 24px 56px rgba(31, 35, 41, 0.08);
}

.login-card .eyebrow {
  color: #97a4af;
}

.login-card h2 {
  margin-top: 6px;
}

.login-card p {
  margin-bottom: 10px;
  line-height: 1.8;
}

.login-card::before,
.login-hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.login-card::before {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.login-hero-panel::before {
  box-shadow: none;
}

.login-card label {
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #52606d;
}

.login-card input {
  height: 46px;
  border-radius: 12px;
}

.code-row button {
  min-width: 120px;
}

@media (max-width: 960px) {
  .login-screen {
    padding: 18px;
    grid-template-columns: 1fr;
  }

  .login-hero-panel {
    min-height: auto;
    padding: 64px 24px;
  }

  .login-hero-panel h1 {
    font-size: 34px;
  }

  .login-card {
    min-height: auto;
    padding: 30px 24px 26px;
  }
}
