/* Login page — black frame palette preserved (#000 / #fff / #8A8A8A / #40A8D8 / #72C7E8) */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.login-page-body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000;
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #fff;
}

.login-phone-frame {
  width: 100%;
  max-width: 390px;
  min-height: min(100vh, 844px);
  aspect-ratio: 9 / 16;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 7vw, 40px) clamp(22px, 6vw, 32px) clamp(24px, 5vw, 36px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  background: #000;
}

.login-phone-frame::before {
  display: none;
}

.login-page {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  z-index: 1;
}

.login-hero {
  text-align: center;
  padding-top: 4px;
}

.login-hero .chiizu-wordmark--hero {
  color: #fff;
  margin-bottom: 6px;
}

.login-tagline {
  font-size: 0.82rem;
  font-weight: 300;
  color: #8A8A8A;
  line-height: 1.45;
  max-width: 18rem;
  margin: 0 auto;
}

.login-card {
  width: 100%;
  padding: 18px 16px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.login-section-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.login-card--signin {
  padding-bottom: 18px;
}

.auth-legal-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 0.74rem;
  line-height: 1.45;
  color: #8A8A8A;
  cursor: pointer;
}

.auth-legal-consent input[type="checkbox"] {
  appearance: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border: 2px solid #8A8A8A;
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.auth-legal-consent input[type="checkbox"]:checked {
  background: #8A8A8A;
  border-color: #8A8A8A;
}

.auth-legal-consent a {
  color: #40A8D8;
  text-decoration: underline;
}

.social-login {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 22px;
  width: 100%;
  padding: 4px 0 2px;
}

.social-login[hidden] {
  display: none;
}

.social-btn {
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow:
    0 4px 12px rgba(255, 255, 255, 0.4),
    0 2px 6px rgba(64, 168, 216, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.social-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    0 6px 16px rgba(255, 255, 255, 0.5),
    0 3px 8px rgba(64, 168, 216, 0.18);
}

.social-btn:active {
  transform: translateY(0);
}

.social-btn svg {
  display: block;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  color: #8A8A8A;
  font-size: 0.76rem;
  font-weight: 400;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(138, 138, 138, 0.35);
}

.login-divider span {
  flex-shrink: 0;
  white-space: nowrap;
}

.login-account-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.login-account-chip[hidden] {
  display: none;
}

.login-account-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.login-account-meta {
  min-width: 0;
  flex: 1;
}

.login-account-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 1px;
}

.login-account-email {
  font-size: 0.72rem;
  color: #8A8A8A;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-switch-account {
  border: none;
  background: transparent;
  color: #40A8D8;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  flex-shrink: 0;
  padding: 4px 0;
}

.form-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 400;
  color: #8A8A8A;
}

.form-group input {
  width: 100%;
  border: none;
  border-bottom: 2px solid rgba(138, 138, 138, 0.75);
  padding: 8px 0;
  font-size: 1rem;
  font-family: inherit;
  color: #fff;
  outline: none;
  background: transparent;
  transition: border-color 0.15s ease;
}

.form-group input::placeholder {
  color: rgba(138, 138, 138, 0.65);
}

.form-group input:focus {
  border-bottom-color: rgba(255, 255, 255, 0.55);
}

.password-field-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-field-wrap input {
  padding-right: 2.4rem;
}

.password-toggle {
  position: absolute;
  right: 0;
  bottom: 8px;
  border: none;
  background: transparent;
  color: #8A8A8A;
  cursor: pointer;
  padding: 2px;
  line-height: 0;
}

.password-toggle:hover {
  color: #fff;
}

.login-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin: -4px 0 14px;
  flex-wrap: wrap;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
}

.remember-me input[type="checkbox"] {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 2px solid #8A8A8A;
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}

.remember-me input[type="checkbox"]:checked {
  background: #8A8A8A;
}

.remember-me label {
  font-size: 0.8rem;
  font-weight: 300;
  color: #8A8A8A;
  cursor: pointer;
}

.forgot-password {
  font-size: 0.75rem;
  font-weight: 400;
  color: #40A8D8;
  text-decoration: underline;
  cursor: pointer;
}

.forgot-password:hover {
  color: #5bbde8;
}

.login-btn {
  width: 100%;
  padding: 14px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #72C7E8;
  background: #fff;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow:
    0 4px 14px rgba(255, 255, 255, 0.45),
    0 2px 8px rgba(64, 168, 216, 0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.login-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    0 6px 18px rgba(255, 255, 255, 0.55),
    0 3px 10px rgba(64, 168, 216, 0.2);
}

.login-btn:active {
  transform: translateY(0);
}

.login-lang {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
}

.login-lang-btn {
  border: 1px solid rgba(138, 138, 138, 0.35);
  background: transparent;
  color: #8A8A8A;
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.login-lang-btn.is-active,
.login-lang-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.06);
}

/* Account picker modal */
.login-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-modal[hidden] {
  display: none;
}

.login-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.login-modal-panel {
  position: relative;
  width: min(100%, 320px);
  max-height: min(88vh, 520px);
  overflow-y: auto;
  padding: 24px 22px 22px;
  border-radius: 20px;
  background:
    radial-gradient(ellipse 120% 80% at 50% 0%, rgba(252, 252, 223, 0.35) 0%, transparent 55%),
    #C6E6F9;
  box-shadow: 0 16px 40px rgba(64, 168, 216, 0.28);
}

.login-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  color: #5a8aaa;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.login-modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  margin-bottom: 6px;
}

.login-modal-subtitle {
  font-size: 0.78rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.82);
  text-align: center;
  margin-bottom: 18px;
  line-height: 1.45;
}

.account-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.account-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.account-option:hover,
.account-option.is-selected {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(64, 168, 216, 0.55);
}

.account-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.account-meta {
  min-width: 0;
  flex: 1;
}

.account-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #3d6f8f;
  margin-bottom: 2px;
}

.account-email {
  font-size: 0.75rem;
  font-weight: 400;
  color: #5a8aaa;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(64, 168, 216, 0.45);
  flex-shrink: 0;
}

.account-option.is-selected .account-check {
  border-color: #40A8D8;
  background: radial-gradient(circle, #40A8D8 0 45%, transparent 46%);
}

.modal-text-btn {
  width: 100%;
  padding: 10px;
  border: none;
  background: transparent;
  color: #40A8D8;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.modal-primary-btn {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 999px;
  background: #fff;
  color: #72C7E8;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.45);
  margin-top: 4px;
}

@media (max-height: 700px) {
  .login-phone-frame {
    min-height: 100vh;
    aspect-ratio: auto;
  }

  .login-hero .chiizu-wordmark--hero {
    font-size: clamp(2.8rem, 14vw, 4rem);
  }

  .login-page {
    gap: 14px;
  }
}
