/* login.css — 頁面專屬樣式（共用元件請見 global.css） */

.login-page {
  background: linear-gradient(145deg, #EDECEA 0%, #E8E6E3 50%, #E4E2DE 100%);
  min-height: calc(100vh - 130px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 169, 74, 0.28) 0%, transparent 65%);
  pointer-events: none
}

.login-page::after {
  content: "";
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(52, 193, 170, 0.18) 0%, transparent 65%);
  pointer-events: none
}

.login-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden
}

.login-bg svg {
  width: 100%;
  height: 100%;
  display: block
}

.login-page-dots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(rgba(160, 155, 148, 0.35) 1px, transparent 1px);
  background-size: 22px 22px;
}

.login-wrap {
  max-width: 920px;
  width: 100%;
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), 0 40px 80px rgba(0, 0, 0, 0.20);
  display: inline-flex;
  margin-right: 10px;
}

.login-wrap .login-user {
  font-size: 1rem;
  color: var(--ink);
}

.login-wrap .logout {
  font-size: 0.9rem;
}

.login-left {
  display: flex;
  background: linear-gradient(145deg, #083D4A 0%, #0C5262 40%, #116878 70%, #0B5A68 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 3.25rem 2.75rem;
  border-radius: 24px 0 0 24px;
  width: 50%;
  flex: 0 0 50%;
  box-sizing: border-box;
}

.login-left::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(160, 155, 148, 0.35) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
  z-index: 0
}

.l-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none
}

.l-orb1 {
  width: 380px;
  height: 380px;
  top: -100px;
  right: -80px;
  background: radial-gradient(circle, rgba(212, 169, 74, 0.30) 0%, transparent 65%);
  animation: lOrb 12s ease-in-out infinite
}

.l-orb2 {
  width: 280px;
  height: 280px;
  bottom: -80px;
  left: -60px;
  background: radial-gradient(circle, rgba(52, 193, 170, 0.22) 0%, transparent 65%);
  animation: lOrb 16s ease-in-out infinite reverse
}

@keyframes lOrb {

  0%,
  100% {
    transform: translate(0, 0)
  }

  50% {
    transform: translate(10px, -14px)
  }
}

.login-left-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.875rem
}

.login-left-brand-name {
  font-family: 'Noto Sans TC', sans-serif;
  font-weight: 600;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.88);
  letter-spacing: 0.04em;
  line-height: 1.35
}

.login-left-brand-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.5312rem;
  color: rgba(255, 255, 255, 0.42);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  margin-top: 0.125rem
}

.login-left-content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 0
}

.l-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem;
  color: var(--gold-soft);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.625rem
}

.l-eyebrow::before {
  content: "";
  width: 14px;
  height: 1px;
  background: var(--gold)
}

.l-welcome {
  font-family: 'Noto Serif TC', serif;
  font-weight: 700;
  font-size: 3rem;
  line-height: 1.2;
  color: #fff;
  letter-spacing: 0.04em;
  margin-bottom: 0.375rem
}

.l-welcome em {
  color: var(--gold-soft);
  font-style: normal
}

.l-tagline {
  font-size: 0.9375rem;
  color: #fff;
  line-height: 1.85;
  font-weight: 300;
  margin-top: 0.875rem;
  max-width: 300px
}

.l-divider {
  height: 1px;
  background: linear-gradient(90deg, var(--gold) 0%, rgba(212, 169, 74, 0.1) 70%, transparent);
  margin: 1.75rem 0
}

.l-features {
  display: flex;
  flex-direction: column;
  gap: 0.875rem
}

.l-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem
}

.l-feature-icon {
  width: 2rem;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0
}

.l-feature-icon svg {
  width: 14px;
  height: 14px;
  color: var(--gold-soft)
}

.l-feature-icon img {
  width: 14px;
  height: 14px;
  display: block;
  object-fit: contain
}

.l-feature-text {}

.l-feature-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.04em
}

.l-feature-desc {
  font-size: 0.8125rem;
  color: #fff;
  margin-top: 0.1875rem;
  line-height: 1.5
}

.l-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none
}

.l-orb1 {
  width: 340px;
  height: 340px;
  top: -90px;
  right: -70px;
  background: radial-gradient(circle, rgba(212, 169, 74, 0.26) 0%, transparent 65%);
  animation: lOrb 12s ease-in-out infinite
}

.l-orb2 {
  width: 260px;
  height: 260px;
  bottom: -70px;
  left: -50px;
  background: radial-gradient(circle, rgba(52, 193, 170, 0.18) 0%, transparent 65%);
  animation: lOrb 16s ease-in-out infinite reverse
}

@keyframes lOrb {

  0%,
  100% {
    transform: translate(0, 0)
  }

  50% {
    transform: translate(10px, -12px)
  }
}

.login-left-content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center
}

.l-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9375rem;
  color: var(--gold-soft);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-bottom: 1.125rem;
  display: flex;
  align-items: center;
  gap: 0.625rem
}

.l-eyebrow::before {
  content: "";
  width: 14px;
  height: 1px;
  background: var(--gold)
}

.l-title {
  font-family: 'Noto Serif TC', serif;
  font-weight: 700;
  font-size: 2.125rem;
  line-height: 1.25;
  color: #fff;
  letter-spacing: 0.04em;
  margin-bottom: 0.875rem
}

.l-title em {
  color: var(--gold-soft);
  font-style: normal;
  border-bottom: 2px solid rgba(212, 169, 74, 0.38);
  padding-bottom: 0.125rem
}

.l-desc {
  font-size: 0.8125rem;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.58);
  font-weight: 300;
  max-width: 280px
}

.l-divider {
  position: relative;
  z-index: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--gold) 0%, rgba(212, 169, 74, 0.12) 70%, transparent);
  margin: 1.625rem 0
}

.l-stats {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 1.5rem
}

.l-stat-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  line-height: 1
}

.l-stat-label {
  font-size: 0.625rem;
  color: rgba(255, 255, 255, 0.42);
  margin-top: 0.3125rem;
  letter-spacing: 0.06em
}

.l-footer {
  position: relative;
  z-index: 1;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.5625rem;
  color: rgba(255, 255, 255, 0.22);
  letter-spacing: 0.08em
}

.login-right {
  background: #fff;
  padding: 3.25rem 3rem;
  width: 50%;
  flex: 0 0 50%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  border-radius: 0 24px 24px 0;
  overflow: hidden;
}

.login-right::before {
  content: "";
  position: absolute;
  top: 0;
  left: 44px;
  right: 44px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-soft) 50%, transparent 100%);
  border-radius: 0 0 3px 3px
}

.p-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.625rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem
}

.p-eyebrow::before {
  content: "";
  width: 12px;
  height: 1px;
  background: var(--gold)
}

.p-title {
  font-family: 'Noto Serif TC', serif;
  font-weight: 700;
  font-size: 1.625rem;
  color: var(--ink);
  letter-spacing: 0.06em;
  margin-bottom: 0.3125rem
}

.p-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  line-height: 1.7
}

.field {
  margin-bottom: 1rem
}

.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem
}

.field-label a {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.6875rem;
  text-decoration: none;
  transition: color .2s
}

.field-label a:hover {
  color: var(--green-deep)
}

.field-hint {
  font-size: 0.625rem;
  color: var(--text-muted);
  font-weight: 400
}

.field-wrap {
  position: relative
}

.field-input {
  width: 100%;
  padding: 0.6875rem 2.5rem 0.6875rem 0.8125rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 0.8125rem;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color .2s, box-shadow .2s
}

.field-input::placeholder {
  color: var(--text-muted);
  font-weight: 300
}

.field-input:focus {
  border-color: #2A9E8A;
  box-shadow: 0 0 0 3px rgba(42, 158, 138, 0.14)
}

.field-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: color .2s
}

.field-icon-btn {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit
}

.field-icon:hover {
  color: var(--green)
}

.field-icon svg {
  width: 14px;
  height: 14px
}

.field-toggle {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.375rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  cursor: pointer
}

.field-toggle input[type=checkbox] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid var(--line);
  background: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color .2s, background .2s;
  flex-shrink: 0;
  position: relative;
}

.field-toggle input[type=checkbox]:checked {
  background: var(--gold);
  border-color: var(--gold);
}

.field-toggle input[type=checkbox]:checked::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}

.action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.875rem
}

.btn-secondary {
  display: inline-block;
  text-decoration: none;
  text-align: center;
  vertical-align: middle;
  box-sizing: border-box;
  outline: none;

  padding: 0.6875rem;
  background: #fff;
  color: var(--text);
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 0.9375rem;
  font-weight: 500;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: all .2s;
  letter-spacing: 0.05em;
}

.btn-secondary:hover {
  border-color: #2A9E8A;
  color: #2A9E8A;
  text-decoration: none;
}

.btn-help {
  padding: 0.6875rem;
  background: #fff;
  color: #c0392b;
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  border: 1.5px solid rgba(192, 57, 43, 0.18);
  border-radius: 10px;
  cursor: pointer;
  transition: all .2s;
  letter-spacing: 0.05em
}

.btn-help:hover {
  background: rgba(192, 57, 43, 0.05);
  border-color: rgba(192, 57, 43, 0.38)
}

.btn-login {
  width: 100%;
  padding: 0.875rem;
  background: linear-gradient(135deg, #2EA398 0%, #226B5C 100%);
  color: #fff;
  font-family: 'Noto Sans TC', sans-serif;
  font-weight: 700;
  font-size: 1.062rem;
  letter-spacing: 0.14em;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 6px 18px -6px rgba(34, 107, 92, 0.4);
  transition: all .25s;
  margin-bottom: 1.375rem
}

.btn-login:hover {
  transform: translateY(-0.125rem);
  box-shadow: 0 10px 24px -8px rgba(34, 107, 92, 0.4)
}

.form-divider {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
  font-size: 0.9375rem
}

.form-divider::before,
.form-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-soft)
}

.register-note {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.register-note a {
  color: #2A9E8A;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(42, 158, 138, 0.28);
  padding-bottom: 0.0625rem;
  transition: all .2s
}

.register-note a:hover {
  color: var(--gold);
  border-color: var(--gold)
}

@media(max-width:768px) {

  /* 卡片改單欄、登入面板在上（HTML order 不動，用 order 控制） */
  .login-wrap {
    grid-template-columns: 1fr;
    max-width: 480px;
  }

  .login-right {
    order: -1;
    border-radius: 20px 20px 0 0;
    padding: 2rem 1.75rem 1.75rem;
  }

  .login-right::before {
    left: 24px;
    right: 24px
  }

  /* login-left 收合為迷你品牌條 */
  .login-left {
    border-radius: 0 0 20px 20px;
    padding: 1.125rem 1.75rem;
    flex-direction: row;
    align-items: center;
    gap: 0.875rem;
    min-height: 0;
  }

  /* 隱藏左側的裝飾、內容、features */
  .l-orb1,
  .l-orb2,
  .login-left>svg,
  .login-left-content {
    display: none;
  }

  /* 顯示品牌 logo 區（login-left-top） */
  .login-left-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    z-index: 1;
  }

  .login-left-brand-name {
    font-size: 0.875rem;
    white-space: nowrap;
  }
}

@media(max-width:520px) {
  .login-right {
    padding: 1.75rem 1.25rem
  }

  .login-left {
    padding: 0.875rem 1.25rem
  }

  .login-page {
    padding: 1.5rem 0.875rem
  }
}

@media(max-width:30rem) {
  .login-right {
    padding: 1.5rem 1rem
  }

  .login-page {
    padding: 1.25rem 0.75rem
  }
}