:root {
  --font-ui: "Microsoft JhengHei UI", "Microsoft JhengHei", "Noto Sans TC", "PingFang TC", "Segoe UI", Arial, sans-serif;
  --liger-gold: #c08a35;
  --liger-gold-soft: #f5ead0;
  font-family: var(--font-ui);
  color: #16313a;
  background: #f2f5f1;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; font-family: var(--font-ui); font-size: 16px; line-height: 1.55; }
button, input, textarea, select { font: inherit; font-family: var(--font-ui); }

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(340px, 0.9fr) minmax(440px, 1.1fr);
}

.login-intro {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(44px, 8vw, 112px);
  color: #eef8f3;
  background:
    radial-gradient(circle at 16% 84%, rgba(154, 211, 186, .24), transparent 30%),
    radial-gradient(circle at 90% 10%, rgba(255, 255, 255, .1), transparent 24%),
    linear-gradient(145deg, #12383f 0%, #0e2d33 100%);
}

.login-intro::before {
  content: "";
  position: absolute;
  inset: -10% -9% auto auto;
  width: min(46vw, 560px);
  height: 120%;
  opacity: .12;
  transform: rotate(4deg);
  background: repeating-linear-gradient(118deg, transparent 0 30px, #d2a04e 31px 39px, transparent 40px 66px);
  pointer-events: none;
}

.login-intro > * { position: relative; z-index: 1; }

.login-intro::after {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  right: -160px;
  bottom: -120px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 50%;
  box-shadow: 0 0 0 56px rgba(255,255,255,.025), 0 0 0 112px rgba(255,255,255,.018);
}

.liger-brand-lockup { display: flex; align-items: center; gap: 15px; margin-bottom: 48px; }
.brand-mark { width: 58px; height: 58px; flex: 0 0 auto; overflow: hidden; border: 1px solid rgba(224,184,110,.62); border-radius: 17px; background: var(--liger-gold-soft); box-shadow: 0 16px 34px rgba(3,22,27,.24); }
.brand-mark img { display: block; width: 100%; height: 100%; }
.liger-brand-lockup strong { display: block; color: #f7f1e4; font-size: 24px; line-height: 1; letter-spacing: .18em; }
.liger-brand-lockup strong em { color: #e0b86e; font-style: normal; letter-spacing: .02em; }
.liger-brand-lockup small { display: block; max-width: 330px; margin-top: 9px; color: #d8b875; font-size: 10px; font-weight: 800; line-height: 1.35; letter-spacing: .12em; }
.eyebrow { color: #d4ad67; font-size: 13px; font-weight: 850; letter-spacing: .2em; }
.login-intro h1 { margin: 18px 0 20px; max-width: 620px; font-size: clamp(38px, 5vw, 68px); line-height: 1.12; letter-spacing: -.035em; }
.login-intro p { max-width: 500px; margin: 0; color: #abc2bc; font-size: 16px; line-height: 1.8; }
.security-note { width: fit-content; display: flex; align-items: center; gap: 9px; margin-top: 44px; padding: 10px 14px; border: 1px solid rgba(255,255,255,.09); border-radius: 999px; color: #c9dbd6; background: rgba(255,255,255,.05); font-size: 14px; }
.security-note span { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: #b9dacb; color: #143940; font-weight: 900; }

.login-panel { display: grid; place-items: center; padding: 32px; background: #f2f5f1; }
.login-theme-toggle { position: absolute; z-index: 2; top: 24px; right: 26px; height: 40px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; border: 1px solid #d4ddd8; border-radius: 11px; color: #4e625d; background: rgba(255,255,255,.8); box-shadow: 0 7px 20px rgba(24,49,54,.06); cursor: pointer; }
.login-theme-toggle span { font-size: 18px; line-height: 1; transform: translateY(-1px); }
.login-theme-toggle b { font-size: 13px; }
.login-theme-toggle:hover { border-color: #b7c7bf; background: #fff; }
.login-card { position: relative; overflow: hidden; width: min(100%, 440px); display: grid; gap: 22px; padding: 42px; border: 1px solid #dfe6e1; border-radius: 24px; background: rgba(255,255,255,.94); box-shadow: 0 24px 64px rgba(24, 49, 54, .1); }
.login-card::before { content: ""; position: absolute; top: 0; left: 42px; width: 78px; height: 4px; border-radius: 0 0 6px 6px; background: repeating-linear-gradient(120deg, var(--liger-gold) 0 9px, #e2c790 9px 15px); }
.login-card h2 { margin: 10px 0 8px; color: #16313a; font-size: 30px; letter-spacing: -.025em; }
.login-card p { margin: 0; color: #738087; font-size: 16px; line-height: 1.65; }
.login-card label { display: grid; gap: 8px; color: #314a52; font-size: 15px; font-weight: 750; }
.login-card input { width: 100%; height: 48px; padding: 0 14px; border: 1px solid #ccd8d2; border-radius: 11px; outline: none; color: #153039; background: #fbfcfb; transition: border-color .2s, box-shadow .2s, background .2s; }
.login-card input:focus { border-color: #a87a35; background: #fff; box-shadow: 0 0 0 4px rgba(192,138,53,.12); }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 66px; }
.password-wrap button { position: absolute; top: 7px; right: 7px; height: 34px; padding: 0 10px; border: 0; border-radius: 8px; color: #58716b; background: transparent; cursor: pointer; font-size: 14px; font-weight: 700; }
.password-wrap button:hover { background: #edf3ef; }
.login-error { padding: 11px 13px; border: 1px solid #efcbc5; border-radius: 10px; color: #9d493e; background: #fff2f0; font-size: 14px; line-height: 1.5; }
.submit-button { height: 50px; border: 0; border-radius: 11px; color: #f5faf7; background: #19454c; box-shadow: 0 8px 20px rgba(25,69,76,.18); cursor: pointer; font-weight: 800; transition: transform .15s, background .2s; }
.submit-button:hover { background: #21565e; }
.submit-button:active { transform: translateY(1px); }
.submit-button:disabled { cursor: wait; opacity: .68; }
.session-note { color: #8b9793; text-align: center; font-size: 13px; }

html[data-theme="dark"] {
  color-scheme: dark;
  color: #e8f0ee;
  background: #0e1619;
}
html[data-theme="dark"] .login-intro {
  background:
    radial-gradient(circle at 16% 84%, rgba(104, 178, 148, .17), transparent 30%),
    radial-gradient(circle at 90% 10%, rgba(255, 255, 255, .06), transparent 24%),
    linear-gradient(145deg, #0d2d33 0%, #092328 100%);
}
html[data-theme="dark"] .login-panel { background: #0e1619; }
html[data-theme="dark"] .login-card { border-color: #2b3a3e; background: rgba(23,35,38,.96); box-shadow: 0 26px 70px rgba(0,0,0,.34); }
html[data-theme="dark"] .login-card h2 { color: #e8f0ee; }
html[data-theme="dark"] .login-card p,
html[data-theme="dark"] .session-note { color: #9eadaf; }
html[data-theme="dark"] .login-card label { color: #cbd7d4; }
html[data-theme="dark"] .login-card input { border-color: #3a4b4e; color: #edf4f2; background: #111c1f; }
html[data-theme="dark"] .login-card input:focus { border-color: #bd8e49; background: #172528; box-shadow: 0 0 0 4px rgba(192,138,53,.14); }
html[data-theme="dark"] .password-wrap button { color: #a9b9b4; }
html[data-theme="dark"] .password-wrap button:hover { background: #223135; }
html[data-theme="dark"] .login-error { border-color: #70463f; color: #f1a299; background: #382624; }
html[data-theme="dark"] .submit-button { color: #f4faf7; background: #34736c; box-shadow: 0 10px 24px rgba(0,0,0,.26); }
html[data-theme="dark"] .submit-button:hover { background: #3f837a; }
html[data-theme="dark"] .login-theme-toggle { border-color: #334448; color: #f2c86e; background: rgba(23,35,38,.9); box-shadow: 0 8px 24px rgba(0,0,0,.24); }
html[data-theme="dark"] .login-theme-toggle:hover { background: #223236; }

@media (max-width: 820px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-intro { min-height: 330px; padding: 42px 28px; }
  .liger-brand-lockup { margin-bottom: 28px; }
  .login-intro h1 { font-size: 38px; }
  .login-intro p { font-size: 16px; }
  .security-note { margin-top: 24px; }
  .login-panel { padding: 24px 18px 36px; }
  .login-theme-toggle { position: fixed; top: 14px; right: 14px; height: 38px; }
  .login-card { padding: 30px 24px; }
}
