/* ==========================================================================
   BALIDA — login screen
   Geometry only: type, ink, rules and focus are defined in tokens.css, so the
   login screen and the app stay in sync. The card frame is the reference look
   for the rest of the product: 2px rule, floating wordmark in the top border.
   ========================================================================== */

.login-layout {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 4rem 1.5rem;
}

.login-card {
  position: relative;
  width: min(100%, 420px);
  padding: 38px 32px 28px;
  background: var(--paper);
  border: 2px solid var(--rule);
}

.wordmark {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 0 14px;
  background: var(--paper);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
}

form {
  display: grid;
  gap: 20px;
}

.field {
  display: grid;
  gap: 8px;
}

label {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}

input:not([type="hidden"]) {
  display: block;
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid var(--rule);
  border-radius: 0;
  background: var(--paper);
  color: inherit;
  font: inherit;
  font-size: 16px;
}

input::placeholder {
  color: var(--ink-muted);
  opacity: 1;
}

button {
  justify-self: center;
  min-height: 36px;
  margin-top: 2px;
  padding: 8px 22px;
  border: 1px solid var(--rule);
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--speed);
}

button:hover {
  background: #333;
}

.form-error {
  margin: 0 0 20px;
  padding: 12px;
  border: 1px solid var(--rule);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

@media (max-width: 380px) {
  .login-layout {
    padding: 3rem 1rem;
  }

  .login-card {
    padding: 32px 24px 24px;
  }
}

@media (pointer: coarse) {
  input:not([type="hidden"]),
  button {
    min-height: 44px;
  }
}
