:root {
  --bg: #f0f0ef;
  --card-bg: #ffffff;
  --text-main: #333333;
  --text-muted: #666666;
  --link-blue: #1c8ad9;
  --border-grey: #999999;
  --accent-disabled: #fff7cc;   /* button color before typing anything */
  --accent-disabled-text: #d6d6d6;
  --accent-active: #ffd21f;     /* button color once typing starts */
  --accent-active-text: #4a3b00;
  --error-red: #d40000;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

.card {
  width: 100%;
  max-width: 368px;
  min-height: 544px;
  background: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
}

.card-top {
  padding: 40px 32px 24px;
  text-align: center;
  flex: 1;
}

.logo {
  width: 48px;
  height: 48px;
  margin: 0 auto 32px;
  display: block;
  border-radius: 10px;
}

h1 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--text-main);
}

.subtitle {
  font-size: 14px;
  color: var(--text-main);
  font-weight: 400;
  margin: 0 0 32px;
}

.field {
  position: relative;
  margin-bottom: 16px;
}

.field input {
  width: 100%;
  height: 50px;
  padding: 13px 44px 13px 18px;
  border: 1px solid var(--border-grey);
  border-radius: 999px;
  font-size: 15px;
  color: var(--text-main);
  outline: none;
  background: #fff;
}

.field input::placeholder { color: #999; }
.field input:focus { border-color: var(--link-blue); }

.field.floating input {
  padding-top: 20px;
  padding-bottom: 6px;
}

.field.error input {
  border-color: var(--error-red);
}
.field.error .field-label {
  color: var(--error-red);
}

.error-message {
  display: none;
  align-items: center;
  gap: 6px;
  color: var(--error-red);
  font-size: 13px;
  margin: -8px 0 16px;
}
.error-message.visible {
  display: flex;
}
.error-message svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.field-label {
  position: absolute;
  left: 19px;
  top: 7px;
  font-size: 11px;
  color: var(--text-muted);
  pointer-events: none;
}

.field-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
}

.field-icon svg { width: 18px; height: 18px; }

button.primary {
  width: 100%;
  height: 40px;
  padding: 0 18px;
  border: none;
  border-radius: 999px;
  background: var(--accent-disabled);
  color: var(--accent-disabled-text);
  font-size: 15px;
  font-weight: 500;
  cursor: default;
  margin-bottom: 20px;
  transition: background 0.15s ease, color 0.15s ease;
}

button.primary.active {
  background: var(--accent-active);
  color: var(--accent-active-text);
  cursor: pointer;
}

.forgot-link {
  display: block;
  text-align: right;
  color: var(--link-blue);
  text-decoration: none;
  font-size: 13px;
  margin: -8px 0 16px;
}
.forgot-link:hover { text-decoration: underline; }

.back-link {
  display: block;
  width: 100%;
  height: 40px;
  line-height: 40px;
  text-align: center;
  color: var(--link-blue);
  text-decoration: none;
  font-size: 15px;
  border-radius: 999px;
  transition: background 0.15s ease;
}
.back-link:hover {
  background: #d6eaf8;
}

hr {
  border: none;
  border-top: 1px solid #ececec;
  margin: 0;
}

.card-bottom {
  padding: 24px 32px 32px;
  text-align: center;
}

.card-bottom p {
  font-size: 14px;
  color: var(--text-main);
  margin: 0 0 14px;
}

.btn-outline {
  display: inline-block;
  height: 36px;
  line-height: 34px;
  padding: 0 22px;
  border: 1.5px solid var(--link-blue);
  border-radius: 999px;
  color: var(--link-blue);
  text-decoration: none;
  font-size: 14px;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn-outline:hover {
  background: #d6eaf8;
  border-color: #d6eaf8;
}

footer {
  margin-top: 32px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
  margin: 0 10px;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
footer a:hover { border-bottom-color: var(--text-muted); }
footer .bold { font-weight: 600; color: var(--text-main); }
footer .bold:hover { border-bottom-color: var(--text-main); }

.footer-wrap {
  position: fixed;
  bottom: 16px;
  left: 0;
  right: 0;
}

@media (max-width: 420px) {
  .footer-wrap { position: static; margin-top: 24px; }
}

.step { display: none; }
.step.active { display: block; }
