.login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--s7);
}

.card {
  width: 400px;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-radius: var(--radius-outer);
  box-shadow: var(--shadow-card);
}

.card-header {
  padding: var(--s6) var(--s6) var(--s5);
  text-align: center;
  color: var(--text);
}

.logo {
  display: block;
  width: 85px;
  height: 52px;
  margin: 0 auto;
}

.card h1 {
  margin: 24px 0 0;
  font-size: var(--fs-title);
  font-weight: 400;
  line-height: 36px;
  color: var(--text);
}

.card-header p {
  margin: 18px 0 2px;
  font-size: var(--fs-body);
  line-height: 17px;
}

.card-body {
  padding: 0 var(--s6) var(--s6);
  color: var(--text);
  font-size: var(--fs-body);
}

/* Social buttons */
.social {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.social-btn {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 52px;
  padding: 0 var(--s4) 0 53px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: var(--fs-base);
  text-align: left;
  cursor: pointer;
  transition: box-shadow 0.15s ease, background 0.15s ease;
}

.social-btn:hover {
  background: rgba(0, 0, 0, 0.04);
}

.social-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--focus-soft);
  border-color: var(--focus);
}

.social-btn svg {
  position: absolute;
  left: 17px;
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
}

/* OR divider */
.divider {
  display: flex;
  align-items: center;
  height: 60px;
  font-size: var(--fs-sm);
  color: var(--text);
  text-transform: uppercase;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.divider span {
  padding: 0 var(--s4);
}

/* Inputs with floating labels */
.field {
  position: relative;
  display: flex;
  height: 52px;
  margin-bottom: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field.is-focused {
  border-color: var(--focus);
  box-shadow: 0 0 0 1px var(--focus);
}

.field.has-error {
  border-color: var(--error);
}

.field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 var(--s4);
  border: 0;
  outline: none;
  background: transparent;
  color: #000;
  font-size: var(--fs-base);
  border-radius: var(--radius);
}

.field label {
  position: absolute;
  left: 22px;
  top: 50%;
  padding: 0 1px;
  color: var(--text-light);
  font-size: var(--fs-base);
  background: var(--bg);
  transform: translateY(-50%);
  transform-origin: left top;
  pointer-events: none;
  transition: top 0.15s ease, left 0.15s ease, font-size 0.15s ease, color 0.15s ease;
}

.field.is-focused label,
.field.is-filled label {
  top: -1px;
  left: 10px;
  padding: 0 4px;
  font-size: var(--fs-body);
}

.field.is-focused label {
  color: var(--focus);
}

.field.has-error label {
  color: var(--error);
}

.eye {
  flex: 0 0 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--icon);
  cursor: pointer;
  border-radius: 0 3px 3px 0;
}

.eye svg {
  width: 20px;
  height: 20px;
}

.error-text {
  display: none;
  margin: -6px 0 12px;
  color: var(--error);
  font-size: var(--fs-sm);
}

.error-text.show {
  display: block;
}

.social-form {
  margin: 0;
}

.links {
  margin: 17px 0 0;
  line-height: 21px;
}

.link {
  display: inline;
  padding: 2px 4px;
  color: var(--link);
  font-weight: 700;
  font-size: var(--fs-body);
  text-decoration: none;
  border-radius: var(--radius);
  background: none;
  border: 0;
  cursor: pointer;
}

.link:hover {
  text-decoration: underline;
}

.primary {
  display: block;
  width: 100%;
  height: 52px;
  margin-top: 24px;
  border: 0;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  font-size: var(--fs-base);
  cursor: pointer;
  transition: box-shadow 0.15s ease, filter 0.15s ease;
}

.primary:hover {
  box-shadow: inset 0 0 0 150px rgba(0, 0, 0, 0.1);
}

.primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--focus-soft);
}

.alt {
  margin: 16px 0 0;
  line-height: 21px;
  color: var(--text);
}

.alt .link {
  padding: 2px 4px;
}

.notice {
  display: none;
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: rgba(19, 166, 136, 0.12);
  color: var(--text);
  font-size: var(--fs-body);
  line-height: 1.4;
}

.notice.show {
  display: block;
}

.hidden {
  display: none !important;
}

/* Phone: the card fills the screen without a shadow */
@media (max-width: 480px) {
  .login {
    padding: 0;
    align-items: stretch;
  }

  .card {
    width: 100%;
    min-height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }
}

/* Restore link: pinned to the bottom so the sign-in card itself is unchanged */
.restore-row {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 14px;
  margin: 0;
  text-align: center;
  font-size: 12px;
}

.restore-row .link {
  font-size: 12px;
  font-weight: 600;
}
