* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: -apple-system, "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  background-color: #1f2620;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  color: #1f2933;
}
/* 隧道照片鋪滿整頁（用固定的底層，iPhone 上也不會跑版），加一層深色漸層讓登入框的字比較清楚 */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background:
    linear-gradient(rgba(10, 14, 20, .35), rgba(10, 14, 20, .55)),
    url("/static/img/login-bg.jpg") center 60% / cover no-repeat;
}
.card {
  width: min(380px, 100%);
  background: rgba(255, 255, 255, .88);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-radius: 16px;
  padding: 26px 24px 22px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
}
h1 { font-size: 20px; text-align: center; margin: 0 0 16px; color: #1565c0; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: #e6ebf2; border-radius: 10px; padding: 4px; margin-bottom: 14px; }
.tab {
  font: inherit; border: none; background: none; padding: 8px; border-radius: 8px; cursor: pointer; color: #546e7a;
}
.tab.active { background: #fff; color: #1565c0; font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
label { display: block; font-size: 13px; color: #546e7a; margin: 10px 0 4px; }
input {
  width: 100%; font: inherit; font-size: 16px; /* 16px 以上 iPhone 才不會自動放大畫面 */
  padding: 10px 12px; border: 1px solid #9aa5b8; border-radius: 8px; background: #fff;
}
input:focus { outline: 2px solid #90caf9; border-color: #1565c0; }
button[type=submit] {
  width: 100%; margin-top: 14px; font: inherit; font-size: 16px; font-weight: 700;
  padding: 11px; border: none; border-radius: 8px; background: #1565c0; color: #fff; cursor: pointer;
}
button[type=submit]:disabled { opacity: .6; cursor: default; }
.hint { font-size: 12px; color: #607d8b; margin: 10px 0 0; line-height: 1.5; }
.msg { min-height: 1.2em; margin: 10px 0 0; font-size: 14px; white-space: pre-line; }
.msg.error { color: #b71c1c; }
.msg.success { color: #2e7d32; font-weight: 600; }
