:root {
  color-scheme: light;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #1d1d1f;
  background: #fff;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; }

.login {
  width: min(416px, calc(100% - 48px));
  margin-inline: auto;
  padding-block: clamp(40px, 8vh, 92px) 48px;
  text-align: center;
}

.flower {
  display: block;
  width: 144px;
  height: 144px;
  margin: 0 auto 20px;
}

.intro {
  margin: 0;
  color: #1d1d1f;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.6;
}

.maintenance-estimate {
  margin-top: 24px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #f5f5f7;
}

.maintenance-estimate p { margin: 0; }

#maintenance-countdown {
  margin-top: 4px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

form {
  display: grid;
  gap: 16px;
  margin-top: 30px;
  text-align: start;
}

.fields {
  display: grid;
  gap: 10px;
}

.field { position: relative; }

.field input {
  width: 100%;
  min-height: 57px;
  padding: 21px 16px 7px;
  border: 1px solid #888891;
  border-radius: 12px;
  background: #fff;
  color: #1d1d1f;
  font: inherit;
  font-size: 16px;
}

.field span {
  position: absolute;
  inset-inline-start: 17px;
  top: 50%;
  transform: translateY(-50%);
  color: #626267;
  font-size: 16px;
  line-height: 1.2;
  pointer-events: none;
  transition: top 150ms ease, font-size 150ms ease, transform 150ms ease;
}

.field input:focus + span,
.field input:not(:placeholder-shown) + span,
.field input:autofill + span {
  top: 8px;
  transform: none;
  font-size: 12px;
}

.field input:focus {
  border-color: #0066cc;
  outline: 2px solid #0066cc;
  outline-offset: -2px;
}

button {
  min-height: 48px;
  padding: 10px 16px;
  border: 0;
  border-radius: 12px;
  background: #0066cc;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

button:hover { background: #005ab5; }
button:active { background: #004b96; }
button:focus-visible {
  outline: 2px solid #0066cc;
  outline-offset: 3px;
}

.error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff1f0;
  color: #a32222;
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 480px) {
  .flower {
    width: 124px;
    height: 124px;
    margin-bottom: 16px;
  }
  form { margin-top: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .field span { transition: none; }
}
