.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-7) var(--space-6);
}

.auth-brand {
  text-align: center;
  margin-bottom: var(--space-6);
}

.auth-brand .auth-logo {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
  margin: 0 auto var(--space-4);
  border-radius: var(--radius-md);
}

.auth-brand p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.auth-error-box {
  background: var(--color-danger-light);
  color: var(--color-danger);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}

.password-field { position: relative; }
.password-field .input { padding-right: 64px; }
.password-toggle-btn {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 56px;
  min-height: 44px;
  border: none;
  background: none;
  color: var(--color-text-secondary);
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.password-toggle-btn:hover { color: var(--color-text); }
.password-toggle-btn .pw-toggle-label-hide { display: none; }
.password-toggle-btn.revealed .pw-toggle-label-show { display: none; }
.password-toggle-btn.revealed .pw-toggle-label-hide { display: inline; }

/* On-screen keyboard switch — plain CSS track/thumb (no icon asset), matches
   the rest of the app's icon-free control style (see .theme-toggle above). */
.login-osk-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  min-height: 44px;
  margin-top: var(--space-5);
  padding: 8px 12px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-surface-alt);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}
.login-osk-toggle:hover { background: var(--color-surface); }
.login-osk-toggle-track {
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: var(--radius-full);
  background: var(--color-border-strong);
  transition: background var(--transition-fast);
  flex-shrink: 0;
}
.login-osk-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-xs);
  transition: transform var(--transition-fast);
}
.login-osk-toggle[data-osk-enabled="1"] .login-osk-toggle-track { background: var(--color-primary); }
.login-osk-toggle[data-osk-enabled="1"] .login-osk-toggle-thumb { transform: translateX(18px); }
.login-osk-toggle[data-osk-enabled="1"] #login-osk-toggle-state,
.login-osk-toggle[data-osk-enabled="1"] strong { color: var(--color-primary); }

.auth-footer {
  text-align: center;
  margin-top: var(--space-5);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.auth-theme-toggle { position: fixed; top: var(--space-4); right: var(--space-4); }

.error-shell {
  text-align: center;
  max-width: 420px;
}
.error-shell .error-code { font-size: 3.5rem; font-weight: 700; color: var(--color-primary); line-height: 1; margin-bottom: var(--space-3); }
.error-shell h1 { font-size: var(--text-lg); margin-bottom: var(--space-2); }
.error-shell p { color: var(--color-text-secondary); margin-bottom: var(--space-5); }

.install-card { max-width: 520px; }
.install-steps { display: flex; justify-content: space-between; margin-bottom: var(--space-6); gap: var(--space-1); }
.install-steps .step { flex: 1; text-align: center; font-size: var(--text-xs); color: var(--color-text-muted); position: relative; padding-top: 28px; }
.install-steps .step::before { content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 20px; height: 20px; border-radius: 50%; background: var(--color-surface-alt); border: 2px solid var(--color-border-strong); }
.install-steps .step.done::before { background: var(--color-success); border-color: var(--color-success); }
.install-steps .step.active { color: var(--color-primary); font-weight: 600; }
.install-steps .step.active::before { background: var(--color-primary); border-color: var(--color-primary); }
.install-welcome-icon { width: 56px; height: 56px; border-radius: var(--radius-lg); background: var(--color-primary-light); color: var(--color-primary); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin: 0 auto var(--space-4); }
