* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  font-family: Arial, sans-serif;
  background: #f6f7f9;
}

body {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: calc(24px + env(safe-area-inset-top)) 24px calc(24px + env(safe-area-inset-bottom));
}

.loginBox {
  width: 100%;
  max-width: 500px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 18px;
  padding: 34px 28px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.brand {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  background: #111827;
  color: white;
  font-size: 20px;
  font-weight: 800;
}

h1 {
  font-size: 30px;
  margin-bottom: 20px;
  color: #111827;
}

.loginTabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 5px;
  margin-bottom: 18px;
  background: #eef2f7;
  border-radius: 12px;
}

.tabBtn {
  height: 46px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: #374151;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.tabBtn.active {
  background: white;
  color: #111827;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.loginPanel.hidden {
  display: none;
}

input {
  width: 100%;
  height: 58px;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 0 16px;
  font-size: 18px;
  margin-bottom: 16px;
}

input:focus {
  outline: none;
  border-color: #2563eb;
}

button {
  width: 100%;
  height: 58px;
  border: none;
  border-radius: 10px;
  background: #2563eb;
  color: white;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
}

button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.linkBtn {
  height: auto;
  margin-top: 14px;
  padding: 8px;
  background: transparent;
  color: #2563eb;
  font-size: 16px;
}

@media (min-width: 768px) {
  .loginBox {
    max-width: 540px;
    padding: 42px 36px;
  }

  h1 {
    font-size: 34px;
  }

  input,
  button {
    height: 64px;
    font-size: 21px;
  }
}

/* iPad 横屏登录页 */
@media (orientation: landscape) and (min-width: 768px) {
  body {
    height: 100dvh;
    align-items: flex-start;
    padding-top: calc(32px + env(safe-area-inset-top));
    overflow: hidden;
  }

  .loginBox {
    width: 520px;
    max-width: 520px;
    padding: 24px 32px;
    border-radius: 22px;
  }

  input {
    height: 54px;
    font-size: 18px;
  }

  button {
    height: 56px;
    font-size: 20px;
  }
}

/* iPhone 横屏登录页 */
@media (orientation: landscape) and (max-height: 500px) {
  body {
    height: 100dvh;
    overflow: hidden;
  }

  .loginBox {
    max-width: 560px;
    padding: 18px 24px;
  }

  h1 {
    font-size: 28px;
    margin-bottom: 16px;
  }

  .loginTabs {
    min-height: 52px;
    margin-bottom: 16px;
  }

  input {
    height: 54px;
    font-size: 20px;
    margin-bottom: 12px;
  }

  button {
    height: 56px;
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .loginBox {
    width: 100%;
    padding: 30px 22px;
  }

  h1 {
    font-size: 28px;
  }
}
