/* ===== Reset / base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --accent-blue: #10adf4;      /* labels + links */
  --link-blue: #149ce8;        /* link text */
  --login-grey: #a9b1b9;       /* disabled Log In button */
  --input-border: #d6d7d9;     /* field border */
  --divider-grey: #d9dadb;     /* OR lines */
  --or-grey: #b7bbbf;          /* OR text */
  --text-dark: #111111;
  --black-btn: #000000;
  --cursor-green: #2ecc4a;
  --bg: #f7f8fa;        /* soft off-white, not stark white */
}

html, body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text-dark);
  font-family: "Helvetica Neue", Helvetica, Arial, "Segoe UI", Roboto, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

/* ===== Top nav (back arrow) ===== */
.top-nav {
  padding: 10px 16px 0;
}
.back-btn {
  background: none;
  border: none;
  color: #9aa0a6;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  font-weight: 400;
}

/* ===== Main login ===== */
.login {
  flex: 1;
  padding: 10px 26px 0;
  display: flex;
  flex-direction: column;
}

.title {
  text-align: center;
  font-size: 34px;
  font-weight: 500;
  color: #0b0b0b;
  margin: 8px 0 34px;
}

.login-form {
  display: flex;
  flex-direction: column;
}

.field-label {
  color: var(--accent-blue);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.4px;
  margin-bottom: 10px;
}
.pwd-label { margin-top: 26px; }

.input-wrap {
  position: relative;
}
.text-input {
  width: 100%;
  height: 54px;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  padding: 0 46px 0 16px;
  font-size: 17px;
  color: #111;
  outline: none;
  background: #fff;
  caret-color: var(--cursor-green);
}
.text-input:focus {
  border-color: #b9babc;
}

.eye-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  padding: 4px;
}

.small-link {
  margin-top: 16px;
}

.link {
  color: var(--link-blue);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
}

/* ===== Log In button ===== */
.login-btn {
  margin-top: 40px;
  height: 58px;
  border: none;
  border-radius: 30px;
  background: var(--login-grey);
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}
.login-btn:not(:disabled) {
  background: #16b5f3;
}
.login-btn:disabled {
  cursor: default;
}

.forgot-link {
  text-align: center;
  margin-top: 26px;
  align-self: center;
}

/* ===== OR divider ===== */
.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 54px 0 34px;
}
.line {
  flex: 1;
  height: 1px;
  background: var(--divider-grey);
}
.or {
  color: var(--or-grey);
  font-size: 17px;
  font-weight: 500;
}

/* ===== Social buttons ===== */
.social-btn {
  width: 100%;
  height: 60px;
  border: none;
  border-radius: 30px;
  background: var(--black-btn);
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  margin-bottom: 20px;
}
.social-btn:last-of-type { margin-bottom: 0; }
.g-logo, .passkey-icon {
  display: inline-flex;
  align-items: center;
}
.social-text { line-height: 1; }

/* ===== Save login row ===== */
.save-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 30px 0 24px;
  cursor: pointer;
}
.save-check {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.checkbox-ui {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: #1aa7e8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.save-check:not(:checked) + .checkbox-ui {
  background: #fff;
  border: 2px solid #c4c6c8;
}
.save-check:not(:checked) + .checkbox-ui svg {
  visibility: hidden;
}
.save-text {
  color: #3a3a3a;
  font-size: 17px;
  font-weight: 400;
}

/* ===== Responsive / media queries ===== */

/* Small phones */
@media (max-width: 360px) {
  .login { padding: 8px 18px 0; }
  .title { font-size: 29px; margin-bottom: 26px; }
  .text-input { height: 50px; font-size: 16px; }
  .login-btn { height: 54px; font-size: 18px; margin-top: 32px; }
  .social-btn { height: 56px; font-size: 17px; }
  .divider { margin: 40px 0 28px; }
  .save-text, .link { font-size: 15px; }
}

/* Large phones / small tablets */
@media (min-width: 420px) {
  .login { padding: 14px 32px 0; }
  .title { font-size: 36px; }
}

/* Landscape: keep it scrollable, don't stretch */
@media (orientation: landscape) and (max-height: 500px) {
  body { min-height: auto; }
  .divider { margin: 30px 0 22px; }
  .login-btn { margin-top: 26px; }
}

/* Honor reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
