body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.card {
  width: min(520px, 100%);
  padding: 1.2rem;
}

.startup-hint {
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid #d59d2a;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff8e8 0%, #fff2cf 100%);
}

.startup-hint h2 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
}

.startup-hint p {
  margin: 0.35rem 0;
}

.startup-hint__command {
  color: #674300;
}

.startup-hint__actions {
  margin-top: 0.8rem;
}

h1 {
  margin-top: 0;
}

.field {
  margin-top: 0.8rem;
}

.actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.session {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.handbook-dialog[hidden] {
  display: none;
}

.handbook-dialog {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(16, 34, 29, 0.62);
}

.handbook-dialog__panel {
  width: min(620px, 100%);
  padding: 1.2rem;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f0faf7 100%);
  box-shadow: 0 22px 48px rgba(12, 34, 29, 0.24);
}

.handbook-dialog__panel h2 {
  margin-top: 0;
}

.handbook-dialog__grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 1rem;
}

.handbook-dialog__grid label {
  display: grid;
  gap: 0.35rem;
}

.handbook-dialog__grid select {
  width: 100%;
  padding: 0.65rem 0.75rem;
}

.handbook-dialog__hint {
  margin-top: 0.9rem;
}

.handbook-dialog__actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.password-field-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
}

.password-field-wrapper input {
  width: 100%;
  padding-right: 2.5rem;
}

.btn-toggle-password {
  position: absolute;
  right: 0.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.4rem 0.5rem;
  font-size: 1.2rem;
  color: #4a6a62;
  transition: opacity 0.2s;
  filter: grayscale(100%);
}

.btn-toggle-password:hover {
  opacity: 0.7;
}

.btn-toggle-password:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}

.forgot-password {
  margin-top: 0.6rem;
  text-align: center;
}

.link-secondary,
button.link-secondary {
  color: #006858;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.link-secondary,
button.link-secondary {
  background: transparent;
  border: none;
  padding: 0;
  font: inherit;
}

.link-secondary:hover,
button.link-secondary:hover {
  text-decoration: underline;
}

button.link-secondary:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .password-field-wrapper {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: stretch;
    gap: 0.35rem;
  }

  .password-field-wrapper input {
    margin-top: 0;
    padding-right: 0.7rem;
  }

  .btn-toggle-password {
    position: static;
    align-self: stretch;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    padding: 0 0.55rem;
    border: 1px solid #a8ccc5;
    border-radius: 4px;
    background: #fff;
  }
}
