/* Login page (design login.html) — uses minimal top bar; hides base chrome */
body.login-page #navbar,
body.login-page #mobNav,
body.login-page #site-footer,
body.login-page #auth-modal {
  display: none !important;
}

body.login-page {
  background: #f7f6f2;
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: 0;
  overflow-x: clip;
  max-width: 100vw;
}

.login-page-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 76px 20px max(32px, env(safe-area-inset-bottom, 32px));
  font-family: 'Inter', sans-serif;
}

.login-top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: #f7f6f2;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  padding: 0 28px;
  z-index: 100;
}

.login-top-nav .logo {
  font-size: 20px;
  font-weight: 800;
  color: #11132e;
  text-decoration: none;
}

.login-top-nav .logo span {
  color: #0e8b61;
}

.login-top-nav .lang-toggle {
  margin-left: auto;
  display: flex;
  background: #f3f4f6;
  border-radius: 20px;
  padding: 3px;
  gap: 2px;
}

.login-top-nav .lang-btn {
  border: none;
  background: transparent;
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  color: #6b7280;
  transition: 0.2s;
  font-family: inherit;
}

.login-top-nav .lang-btn.active {
  background: #11132e;
  color: #fff;
}

.login-top-nav .back-link {
  margin-left: 0;
  font-size: 13px;
  color: #6b7280;
  text-decoration: none;
  font-weight: 500;
}

.login-top-nav .back-link:hover {
  color: #11132e;
}

.login-container {
  width: 100%;
  max-width: 480px;
  min-width: 0;
}

.login-card {
  background: #fff;
  border-radius: 28px;
  padding: 44px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

.login-card .logo-text {
  font-size: 28px;
  font-weight: 800;
  color: #11132e;
  margin-bottom: 28px;
}

.login-card .logo-text span {
  color: #0e8b61;
}

.login-screen {
  display: none;
}

.login-screen.active {
  display: block;
  animation: loginFade 0.3s ease;
}

@keyframes loginFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.login-screen h2 {
  font-size: 30px;
  font-weight: 800;
  color: #11132e;
  line-height: 1.15;
  margin-bottom: 8px;
}

.login-screen .sub {
  font-size: 15px;
  color: #6b7280;
  margin-bottom: 28px;
  line-height: 1.5;
}

.role-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 8px;
}

.role-card {
  border: 2.5px solid #e5e7eb;
  border-radius: 20px;
  padding: 24px 20px;
  cursor: pointer;
  transition: 0.2s;
  text-align: center;
}

.role-card:hover {
  border-color: #0e8b61;
  background: #f0faf5;
}

.role-card.selected {
  border-color: #11132e;
  background: #11132e;
}

.role-card.selected .role-icon,
.role-card.selected .role-label,
.role-card.selected .role-sub {
  color: #fff;
}

.role-icon {
  font-size: 36px;
  margin-bottom: 10px;
}

.role-label {
  font-size: 16px;
  font-weight: 800;
  color: #11132e;
  margin-bottom: 4px;
}

.role-sub {
  font-size: 12px;
  color: #6b7280;
}

.phone-row {
  display: flex;
  gap: 10px;
  margin-bottom: 6px;
}

.phone-prefix {
  height: 64px;
  min-width: 90px;
  border: 2px solid #e5e7eb;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  color: #11132e;
  flex-shrink: 0;
  padding: 0 14px;
}

.login-screen .input {
  width: 100%;
  height: 64px;
  border: 2px solid #e5e7eb;
  border-radius: 18px;
  padding: 0 20px;
  font-size: 18px;
  outline: none;
  transition: 0.25s;
  color: #11132e;
  font-family: inherit;
}

.login-screen .input:focus {
  border-color: #0e8b61;
}

.login-screen .input.input-error {
  border-color: #ef4444;
}

.input-hint {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 24px;
}

.input-hint a {
  color: #0e8b61;
  font-weight: 600;
  text-decoration: none;
}

.otp-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
  max-width: 100%;
}

.otp-box {
  width: 100%;
  min-width: 0;
  height: 68px;
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  color: #11132e;
  outline: none;
  transition: 0.25s;
  font-family: inherit;
}

.otp-box:focus {
  border-color: #0e8b61;
}

.otp-box.otp-error {
  border-color: #ef4444;
}

.resend .otp-resend-disabled {
  pointer-events: none;
  opacity: 0.45;
  cursor: not-allowed;
}

.resend {
  text-align: center;
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 24px;
}

.resend a {
  color: #0e8b61;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.resend a:hover {
  text-decoration: underline;
}

.login-status {
  font-size: 13px;
  color: #6b7280;
  text-align: center;
  min-height: 1.25rem;
  margin-bottom: 12px;
}

.login-btn {
  width: 100%;
  height: 58px;
  border: none;
  border-radius: 18px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
  margin-top: 6px;
  font-family: inherit;
}

.login-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.login-btn-dark {
  background: #11132e;
  color: #fff;
}

.login-btn-dark:hover:not(:disabled) {
  opacity: 0.9;
}

.login-btn-green {
  background: #0e8b61;
  color: #fff;
}

.login-btn-green:hover:not(:disabled) {
  opacity: 0.9;
}

.btn-back-link {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 14px;
  cursor: pointer;
  margin-top: 16px;
  display: block;
  text-align: center;
  font-weight: 500;
  width: 100%;
  font-family: inherit;
}

.btn-back-link:hover {
  color: #11132e;
}

.login-footer-link {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: #6b7280;
}

.login-footer-link a {
  color: #0e8b61;
  font-weight: 600;
  text-decoration: none;
}

.sent-to {
  background: #f0faf5;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  color: #0e8b61;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
}

@media (max-width: 768px) {
  .login-page-wrap {
    padding: 64px 16px max(24px, env(safe-area-inset-bottom, 24px));
    justify-content: flex-start;
  }

  .login-top-nav {
    height: auto;
    min-height: 52px;
    flex-wrap: nowrap;
    padding: 10px 16px;
    gap: 10px;
  }

  .login-top-nav .lang-toggle {
    margin-left: auto;
    flex-shrink: 0;
  }

  .login-top-nav .back-link {
    display: none;
  }

  .login-card {
    padding: 28px 22px;
    border-radius: 22px;
  }

  .login-card .logo-text {
    display: none;
  }

  .login-screen h2 {
    font-size: 26px;
  }

  .login-screen .sub {
    font-size: 14px;
    margin-bottom: 22px;
  }

  .role-cards {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .role-card {
    padding: 18px 12px;
  }

  .role-label {
    font-size: 14px;
  }

  .phone-row {
    flex-direction: column;
  }

  .phone-prefix {
    width: 100%;
    min-width: 0;
    height: 52px;
    justify-content: flex-start;
    padding: 0 16px;
  }

  .login-screen .input {
    height: 56px;
    font-size: 16px;
  }

  .login-btn {
    height: 52px;
    font-size: 15px;
  }

  .otp-row {
    gap: 6px;
  }

  .otp-box {
    height: 54px;
    font-size: 22px;
    border-radius: 12px;
  }
}

@media (max-width: 480px) {
  .login-page-wrap {
    padding-left: 12px;
    padding-right: 12px;
  }

  .login-card {
    padding: 24px 18px;
  }

  .login-screen h2 {
    font-size: 24px;
  }

  .role-cards {
    grid-template-columns: 1fr;
  }

  .role-card {
    padding: 18px 16px;
  }

  .sent-to {
    font-size: 13px;
    padding: 10px 12px;
    word-break: break-word;
  }
}

@media (max-width: 360px) {
  .otp-box {
    height: 48px;
    font-size: 18px;
  }
}
