/* Shared styling for setup.php and index.php (login) — centered card over the app background */

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--card-bg);
  border: 1px solid var(--section-border);
  border-radius: 10px;
  padding: 28px 26px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.auth-card__title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
}

.auth-card__subtitle {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--color-muted);
  text-align: center;
}

.auth-error-list {
  margin: 0 0 16px;
  padding: 10px 14px;
  background: var(--input-error-bg);
  border: 1px solid var(--color-red);
  border-radius: 6px;
  color: var(--color-red);
  font-size: 14px;
  list-style: none;
}

.auth-error-list li + li {
  margin-top: 4px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.auth-form label {
  font-size: 13px;
  color: var(--color-muted);
  margin-top: 10px;
}

.auth-form input {
  padding: 10px 12px;
  font-size: 16px;
}

/* Two PIN inputs stacked directly on top of each other (no label between
   them) need more separation than the form's own 4px gap provides. */
.login-pin-input + .login-pin-input {
  margin-top: 8px;
}

/* Inside the flex-column .login-pin-step (which already manages spacing via
   its own gap), the subtitle's default bottom margin would double up. */
.login-pin-step .auth-card__subtitle {
  margin: 0;
}

.auth-form__submit {
  margin-top: 20px;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 600;
}

/* --- Login-specific: name picker + PIN pad --- */

.login-user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
  margin-bottom: 4px;
}

.login-user-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  background: var(--section-bg);
  border: 1px solid var(--section-border);
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
}

.login-user-tile:hover {
  background: var(--button-hover-bg);
}

.login-user-tile--selected {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px var(--accent-color);
}

.login-user-tile__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: var(--avatar-bg-color);
}

.login-user-tile__name {
  font-size: 13px;
  word-break: break-word;
}

.login-pin-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.login-pin-step__back {
  align-self: flex-start;
  background: transparent;
  border: none;
  color: var(--link-text);
  cursor: pointer;
  font-size: 13px;
  padding: 0;
}

.login-pin-step__name {
  font-size: 16px;
  font-weight: 600;
}

.login-pin-input {
  width: 100%;
  text-align: center;
  font-size: 22px;
  letter-spacing: 6px;
  padding: 10px 12px;
}
