/* =====================================================================
   HA Portal 會員登入頁 v4（甲版「品牌分屏」設計感版，2026-10-08 老闆核定）
   登入類頁共用（登入／註冊／忘記密碼／重設／驗證／第三方登入結果）：V4::head() auth 模式自動載入、body.a-login.la
   標記由 V4::authAside()／authSideOpen()／authSideClose() 輸出；載入順序在 base.css、app.css 之後
   左＝品牌主視覺（固定品牌深藍），右＝玻璃登入卡（跟著深淺色）
   ===================================================================== */
body.a-login.la { height: auto; }

/* ---------- 登入表單共用零件（lg-） ---------- */
/* 品牌（沿用甲版頁首） */
.lg-brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; min-width: 0; }
.lg-logo {
  width: 40px; height: 40px; flex: none; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: var(--hp-brand-bg); border: 1px solid var(--hp-brand-bd); color: var(--hp-brand-ink);
  box-shadow: inset 0 1px 0 var(--hp-btn-hl);
}
.lg-logo .hp-icon { width: 22px; height: 22px; }
.lg-brand b { display: block; font-size: 17px; line-height: 1.2; letter-spacing: .01em; }
.lg-brand small { display: block; color: var(--hp-text-3); font-size: 12px; line-height: 1.35; white-space: nowrap; }

/* 標題 */
.lg-title { margin: 0; font-size: 26px; font-weight: 800; line-height: 1.3; letter-spacing: .01em; }
.lg-sub { margin: 6px 0 0; color: var(--hp-text-3); font-size: 14px; line-height: 1.6; }

/* 表單：登入頁的輸入框與按鈕一律 48px（戶外、手指好按） */
.lg-form { display: grid; gap: 16px; }
.lg-field { display: grid; gap: 8px; font-size: 13px; font-weight: 700; color: var(--hp-text-2); }
.lg-field .hp-input { height: 48px; padding: 0 14px; font-size: 15px; font-weight: 500; }
.lg-field__err { display: none; margin: -2px 0 0; color: var(--hp-error-ink); font-size: 12.5px; font-weight: 600; }
.lg-field.is-invalid .hp-input { border-color: var(--hp-error); }
.lg-field.is-invalid .lg-field__err { display: block; }
.lg-pw { position: relative; display: block; }
.lg-pw .hp-input { padding-right: 52px; }
.lg-pw__eye {                 /* 欄位內的小立體鈕：40×40，上下各留 4px */
  position: absolute; right: 4px; top: 4px;
  width: 40px; height: 40px; border-radius: 9px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--hp-btng-bd);
  background: linear-gradient(180deg, var(--hp-btng-top), var(--hp-btng-bot));
  color: var(--hp-text-2); cursor: pointer;
  box-shadow: inset 0 1px 0 var(--hp-btn-hl), var(--hp-btn-drop);
  transition: transform .12s ease, box-shadow .12s ease, color .12s;
}
.lg-pw__eye:hover { color: var(--hp-text); transform: translateY(-1px); }
.lg-pw__eye:active { transform: translateY(1px); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .25); transition-duration: .05s; }
.lg-pw__eye:focus-visible { outline: 2px solid var(--hp-ring); outline-offset: 0; }
.lg-pw__eye .hp-icon { width: 20px; height: 20px; }

.lg-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; }
.lg-line .hp-check { min-height: 40px; }
.lg-line .hp-check small { margin-left: -2px; padding: 2px 8px; border-radius: 999px; background: var(--hp-mute-bg); color: var(--hp-text-3); font-size: 12px; font-weight: 600; }
.lg-submit.hp-btn { height: 48px; font-size: 16px; letter-spacing: .08em; }

/* 第三方登入鈕（48px，圖示 20px） */
.lg-sso { display: grid; gap: 10px; }
.lg-sso .hp-btn { height: 48px; font-size: 15px; padding: 0 12px; }
.lg-sso .hp-btn .hp-icon,
.lg-sso .hp-btn svg { width: 20px; height: 20px; flex: none; }

/* 分隔「或」 */
.lg-or { display: flex; align-items: center; gap: 12px; color: var(--hp-text-3); font-size: 12.5px; }
.lg-or::before, .lg-or::after { content: ""; flex: 1; height: 1px; background: var(--hp-border); }

/* 訊息框（錯誤／提示／成功／注意，同一個位置） */
.lg-msg {
  --_bg: var(--hp-info-bg); --_bd: var(--hp-info-bd); --_ink: var(--hp-info-ink);
  display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start;
  padding: 12px 14px; border: 1px solid var(--_bd); border-radius: 12px; background: var(--_bg);
  color: var(--_ink); font-size: 14px; line-height: 1.55; font-weight: 600;
}
.lg-msg .hp-icon { width: 20px; height: 20px; margin-top: 1px; }
.lg-msg p { margin: 0; }
.lg-msg small { display: block; margin-top: 4px; color: var(--hp-text-2); font-size: 13px; font-weight: 500; }
.lg-msg--error { --_bg: var(--hp-error-bg); --_bd: var(--hp-error-bd); --_ink: var(--hp-error-ink); }
.lg-msg--ok { --_bg: var(--hp-ok-bg); --_bd: var(--hp-ok-bd); --_ink: var(--hp-ok-ink); }
.lg-msg--warn { --_bg: var(--hp-warn-bg); --_bd: var(--hp-warn-bd); --_ink: var(--hp-warn-ink); }


/* ---------- 版面（la-） ---------- */
body.la {
  --la-pad: clamp(28px, 2.6vw, 56px);   /* 左右兩半四周同一個留白 */
  min-height: 100vh; min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(480px, 1fr);
}

/* =====================================================================
   左：品牌主視覺。固定深色，所以在這裡把會用到的色票鎖回深色值
   ===================================================================== */
.la-brand {
  color-scheme: dark;
  --hp-bg-2: #0a1322; --hp-surface: #111c33; --hp-surface-2: #152339;
  --hp-border: rgba(255, 255, 255, .09); --hp-border-2: rgba(255, 255, 255, .15);
  --hp-text: rgba(255, 255, 255, .96); --hp-text-2: rgba(255, 255, 255, .74); --hp-text-3: rgba(255, 255, 255, .6);
  --hp-brand-3: #60a5fa; --hp-mute: #94a3b8;
  --hp-ok-bg: rgba(34, 197, 94, .14);    --hp-ok-bd: rgba(34, 197, 94, .42);    --hp-ok-ink: #4ade80;
  --hp-error-bg: rgba(239, 68, 68, .14); --hp-error-bd: rgba(239, 68, 68, .42); --hp-error-ink: #f87171;
  --hp-brand-bg: rgba(59, 130, 246, .16); --hp-brand-bd: rgba(96, 165, 250, .42); --hp-brand-ink: #93c5fd;
  --hp-mute-bg: rgba(148, 163, 184, .12); --hp-mute-bd: rgba(148, 163, 184, .34); --hp-mute-ink: #cbd5e1;
  --hp-btn-hl: rgba(255, 255, 255, .10);

  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column;
  padding: var(--la-pad);
  color: var(--hp-text);
  background:
    radial-gradient(ellipse 65% 50% at 12% 4%, rgba(37, 99, 235, .45), transparent 70%),
    radial-gradient(ellipse 55% 45% at 100% 100%, rgba(34, 211, 238, .16), transparent 70%),
    radial-gradient(ellipse 50% 40% at 40% 62%, rgba(59, 130, 246, .16), transparent 70%),
    linear-gradient(160deg, #0b1a3c 0%, #071229 55%, #050c1c 100%);
}
/* 藍圖格線：中間亮、四周淡出 */
.la-brand::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(147, 197, 253, .10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(147, 197, 253, .10) 1px, transparent 1px),
    linear-gradient(rgba(147, 197, 253, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(147, 197, 253, .045) 1px, transparent 1px);
  background-size: 88px 88px, 88px 88px, 22px 22px, 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 80% 75% at 45% 45%, #000 30%, transparent 85%);
  mask-image: radial-gradient(ellipse 80% 75% at 45% 45%, #000 30%, transparent 85%);
}
/* 細微雜訊質感 */
.la-brand::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* 施工藍圖線稿（塔吊＋發電機）：靠右下、左側淡出 */
.la-art {
  position: absolute; z-index: -1; right: -2%; bottom: 0;
  height: 96%; width: auto; aspect-ratio: 400 / 600;
  color: rgba(147, 197, 253, .19);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 42%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 42%);
  pointer-events: none;
}

/* 右半比視窗高（例：註冊的長表單）時，左半固定在視窗內，捲動時不會只看到半張示意；右半不比視窗高時高度與原本相同 */
@media (min-width: 901px) {
  .la-brand { position: sticky; top: 0; align-self: start; min-height: 100vh; min-height: 100dvh; }
}

.la-top { align-self: flex-start; }
.la-hero { margin: auto 0; padding: 28px 0; display: grid; justify-items: start; gap: 22px; }

/* 主標：第二行品牌漸層字 */
.la-h { margin: 0; font-size: 44px; font-weight: 800; line-height: 1.22; letter-spacing: .02em; }
.la-h span {
  display: block;
  background: linear-gradient(90deg, #bfdbfe 0%, #60a5fa 45%, #22d3ee 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* 三個功能標籤（不能按，所以做成輕的標籤，不做按鈕立體） */
.la-feats { display: flex; flex-wrap: wrap; gap: 10px; margin: -4px 0 0; padding: 0; list-style: none; }
.la-feats li {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px 0 11px;
  border: 1px solid rgba(147, 197, 253, .22); border-radius: 999px;
  background: linear-gradient(180deg, rgba(59, 130, 246, .16), rgba(59, 130, 246, .06));
  color: var(--hp-text-2); font-size: 13.5px; font-weight: 600; white-space: nowrap;
}
.la-feats .hp-icon { color: #93c5fd; }

/* ---------- 畫面示意：接線圖＋浮起的紀錄卡（立體錯位） ---------- */
.la-stage {
  position: relative; width: min(520px, calc(100% - 46px)); margin-top: 48px;   /* 右側留空間給浮起的紀錄卡，右緣留白不小於左緣 */
  transform-style: preserve-3d;
  transform: perspective(1600px) rotateY(-7deg) rotateX(4deg);
  transform-origin: 30% 50%;
}
.la-stage::before {            /* 卡片後方柔光 */
  content: ""; position: absolute; inset: 10% -6% -8% 4%; z-index: -1;
  background: radial-gradient(closest-side, rgba(59, 130, 246, .38), transparent);
  filter: blur(26px);
}
.la-board {
  padding: 16px;
  border: 1px solid rgba(147, 197, 253, .22); border-radius: 18px;
  background: linear-gradient(180deg, rgba(21, 35, 57, .92), rgba(13, 24, 44, .92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 30px 60px -20px rgba(0, 0, 0, .75), 0 0 0 1px rgba(0, 0, 0, .25);
}
.la-board__head { display: flex; align-items: center; gap: 8px; padding: 0 2px 14px; color: var(--hp-text-2); font-size: 13px; font-weight: 700; }
.la-board__head .hp-icon { color: #93c5fd; }
.la-board__head .hp-pill { margin-left: 4px; }

/* 電表節點 */
.la-meter {
  display: flex; align-items: center; gap: 12px; width: fit-content; margin: 0 auto;
  padding: 10px 14px 10px 10px; border-radius: 14px;
  border: 1px solid var(--hp-brand-bd); background: linear-gradient(180deg, rgba(59, 130, 246, .20), rgba(59, 130, 246, .08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 0 24px -6px rgba(59, 130, 246, .55);
}
.la-meter__ic { width: 38px; height: 38px; flex: none; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: rgba(59, 130, 246, .22); border: 1px solid var(--hp-brand-bd); color: #bfdbfe; }
.la-meter__t b { display: block; font-size: 14px; }
.la-meter__t small { display: block; color: var(--hp-text-3); font-size: 12px; font-weight: 600; white-space: nowrap; }
.la-spark { width: 96px; height: 28px; flex: none; }
.la-spark path { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.la-spark__base { stroke: rgba(96, 165, 250, .45); }
.la-spark__flow { stroke: #bfdbfe; stroke-dasharray: 16 84; animation: la-spark 3.2s linear infinite; filter: drop-shadow(0 0 3px rgba(147, 197, 253, .9)); }
@keyframes la-spark { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }

/* 接線：主幹＋左右匯流排，各設備從匯流排往下接 */
.la-bus { position: relative; height: 30px; }
.la-bus i { position: absolute; display: block; }
.la-bus__trunk { left: calc(50% - 1px); top: 0; width: 2px; height: 16px; }
.la-bus__rail { top: 15px; height: 2px; }
.la-bus__rail--l { left: calc((100% - 30px) / 8); right: 50%; }
.la-bus__rail--r { left: 50%; right: calc((100% - 30px) / 8); }
.la-bus__trunk, .la-bus__rail, .la-dev::before { background-color: rgba(96, 165, 250, .5); background-repeat: no-repeat; }
.la-bus__trunk { background-image: linear-gradient(180deg, transparent, #dbeafe, transparent); background-size: 100% 60%; animation: la-flow-y 1.6s linear infinite; }
.la-bus__rail--r { background-image: linear-gradient(90deg, transparent, #dbeafe, transparent); background-size: 40% 100%; animation: la-flow-r 1.6s linear infinite .4s; }
.la-bus__rail--l { background-image: linear-gradient(90deg, transparent, #dbeafe, transparent); background-size: 40% 100%; animation: la-flow-l 1.6s linear infinite .4s; }
@keyframes la-flow-y { from { background-position: 0 -200%; } to { background-position: 0 300%; } }
@keyframes la-flow-r { from { background-position: -100% 0; } to { background-position: 250% 0; } }
@keyframes la-flow-l { from { background-position: 250% 0; } to { background-position: -100% 0; } }

/* 設備小卡 */
.la-devs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.la-dev {
  position: relative; display: grid; justify-items: center; gap: 4px;
  padding: 12px 6px 11px; border-radius: 13px; text-align: center;
  border: 1px solid var(--hp-border-2); background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
.la-dev::before { content: ""; position: absolute; left: calc(50% - 1px); top: -14px; width: 2px; height: 14px; }
.la-dev[data-state="on"]::before { background-image: linear-gradient(180deg, transparent, #bbf7d0, transparent); background-color: rgba(74, 222, 128, .55); background-size: 100% 70%; animation: la-flow-y 1.6s linear infinite .9s; }
.la-dev[data-state="off"]::before { background-color: rgba(148, 163, 184, .35); }
.la-dev[data-state="offline"]::before { background: repeating-linear-gradient(180deg, rgba(148, 163, 184, .45) 0 3px, transparent 3px 6px); }
.la-dev__ic { width: 38px; height: 38px; margin-bottom: 4px; border-radius: 11px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--hp-mute-bd); background: var(--hp-mute-bg); color: var(--hp-mute-ink); }
.la-dev b { font-size: 13px; line-height: 1.3; white-space: nowrap; }
.la-dev small { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; line-height: 1.3; color: var(--hp-mute-ink); }
.la-dev small::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.la-dev[data-state="on"] { border-color: var(--hp-ok-bd); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 0 22px -8px rgba(34, 197, 94, .6); }
.la-dev[data-state="on"] .la-dev__ic { border-color: var(--hp-ok-bd); background: var(--hp-ok-bg); color: var(--hp-ok-ink); }
.la-dev[data-state="on"] small { color: var(--hp-ok-ink); }
.la-dev[data-state="on"] small::before { box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); animation: la-pulse 2s ease-out infinite; }
.la-dev[data-state="off"] .la-dev__ic { border-color: var(--hp-error-bd); background: var(--hp-error-bg); color: var(--hp-error-ink); }
.la-dev[data-state="off"] small { color: var(--hp-error-ink); }
.la-dev[data-state="offline"] { border-style: dashed; border-color: var(--hp-mute-bd); }
@keyframes la-pulse { 0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); } 80%, 100% { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); } }

/* 浮起的操作紀錄卡 */
.la-toast {
  position: absolute; top: -34px; right: -30px;
  display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px;
  border: 1px solid rgba(147, 197, 253, .28); border-radius: 14px;
  background: linear-gradient(180deg, rgba(30, 48, 82, .96), rgba(17, 30, 54, .96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10), 0 24px 48px -16px rgba(0, 0, 0, .8), 0 0 0 1px rgba(0, 0, 0, .3);
  transform: translateZ(60px);
  animation: la-float 6s ease-in-out infinite;
}
.la-toast .hp-toggle { zoom: .8; pointer-events: none; }
.la-toast__t b { display: block; font-size: 13px; white-space: nowrap; }
.la-toast__t small { display: block; color: var(--hp-text-3); font-size: 12px; font-weight: 600; white-space: nowrap; }
@keyframes la-float { 0%, 100% { transform: translateZ(60px) translateY(0); } 50% { transform: translateZ(60px) translateY(-6px); } }

/* 軟體品牌（峰煜科技 · AI-BOS） */
.la-maker { display: inline-flex; align-items: center; gap: 10px; color: var(--hp-text-3); font-size: 12.5px; font-weight: 600; letter-spacing: .06em; }
.la-maker__mark { width: 9px; height: 9px; border-radius: 2px; transform: rotate(45deg); background: linear-gradient(135deg, #60a5fa, #22d3ee); box-shadow: 0 0 10px rgba(56, 189, 248, .6); }
.la-maker i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .7; }
.la-brand .la-maker { align-self: flex-start; }

/* =====================================================================
   右：登入（跟著深淺色）
   ===================================================================== */
.la-side {
  --la-card-bg: linear-gradient(180deg, rgba(20, 33, 58, .78), rgba(13, 23, 42, .66));
  --la-card-bd: rgba(255, 255, 255, .13);
  --la-card-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 40px 80px -32px rgba(0, 0, 0, .85), 0 0 0 1px rgba(0, 0, 0, .35);
  --la-card-hair: rgba(147, 197, 253, .7);
  --la-glow-a: rgba(37, 99, 235, .24);
  --la-glow-b: rgba(34, 211, 238, .10);
  position: relative; isolation: isolate;
  display: flex; flex-direction: column;
  min-height: 100vh; min-height: 100dvh; gap: 20px;
  padding: var(--la-pad);
  background:
    radial-gradient(ellipse 70% 45% at 90% 0%, var(--la-glow-a), transparent 70%),
    radial-gradient(ellipse 60% 40% at 0% 100%, var(--la-glow-b), transparent 70%),
    var(--hp-bg);
}
:root[data-theme="light"] .la-side {
  --la-card-bg: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .80));
  --la-card-bd: #a3aebe;
  --la-card-shadow: inset 0 1px 0 #fff, 0 30px 60px -30px rgba(15, 23, 42, .40), 0 2px 6px rgba(15, 23, 42, .06);
  --la-card-hair: rgba(29, 78, 216, .55);
  --la-glow-a: rgba(37, 99, 235, .16);
  --la-glow-b: rgba(14, 165, 233, .12);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .la-side {
    --la-card-bg: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .80));
    --la-card-bd: #a3aebe;
    --la-card-shadow: inset 0 1px 0 #fff, 0 30px 60px -30px rgba(15, 23, 42, .40), 0 2px 6px rgba(15, 23, 42, .06);
    --la-card-hair: rgba(29, 78, 216, .55);
    --la-glow-a: rgba(37, 99, 235, .16);
    --la-glow-b: rgba(14, 165, 233, .12);
  }
}
.la-tools { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.la-mbrand { display: none; margin-right: auto; }
.la-mintro, .la-mfoot { display: none; }

/* 玻璃登入卡 */
.la-card {
  position: relative;
  width: min(464px, 100%); margin: auto; padding: 36px;
  display: grid; gap: 20px;
  border: 1px solid var(--la-card-bd); border-radius: 24px;
  background: var(--la-card-bg);
  box-shadow: var(--la-card-shadow);
  -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
}
/* 玻璃卡同時是 .a-login__box（給各頁掛樣式的穩定 class）：蓋掉 app.css 舊登入框的段落間距，間距一律用卡片的 gap */
.la-card.a-login__box > p { margin: 0; }
.la-card::before {             /* 卡片上緣細亮邊 */
  content: ""; position: absolute; top: -1px; left: 28px; right: 28px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--la-card-hair), transparent);
}
.la-head { display: grid; justify-items: start; gap: 8px; }
.la-eyebrow {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px 0 9px; margin-bottom: 2px;
  border: 1px solid var(--hp-brand-bd); border-radius: 999px; background: var(--hp-brand-bg);
  color: var(--hp-brand-ink); font-size: 12.5px; font-weight: 700; letter-spacing: .04em;
}
.la-card .lg-title { font-size: 30px; letter-spacing: .03em; }
.la-card .lg-sub { margin: 0; }

/* 欄位前置圖示＋聚焦藍光 */
.la-in { position: relative; display: block; }
.la-in__ic { position: absolute; left: 14px; top: 15px; width: 18px; height: 18px; display: flex; color: var(--hp-text-3); pointer-events: none; transition: color .15s; }
.la-in .hp-input { padding-left: 44px; }
.la-in:focus-within .la-in__ic { color: var(--hp-brand-3); }
.la-card .lg-field .hp-input:focus {
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .18), 0 0 0 4px color-mix(in srgb, var(--hp-brand-2) 24%, transparent), 0 10px 28px -10px color-mix(in srgb, var(--hp-brand-2) 70%, transparent);
}

/* 空白送出：框、圖示、聚焦光都轉紅 */
.la-card .lg-field.is-invalid .la-in__ic { color: var(--hp-error-ink); }
.la-card .lg-field.is-invalid .hp-input:focus {
  border-color: var(--hp-error);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .18), 0 0 0 4px color-mix(in srgb, var(--hp-error) 22%, transparent);
}

/* 主按鈕：漸層＋上半光澤＋滑過一道光 */
.la-card .lg-submit { position: relative; overflow: hidden; isolation: isolate; --_top: #4f8ff9; --_bot: #1d4ed8; }
.la-card .lg-submit::before { content: ""; position: absolute; inset: 0 0 52% 0; z-index: -1; background: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0)); pointer-events: none; }
.la-card .lg-submit::after { content: ""; position: absolute; top: 0; bottom: 0; left: -45%; width: 30%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .30), transparent); transform: skewX(-18deg); transition: left .7s ease; pointer-events: none; }
.la-card .lg-submit:hover::after { left: 125%; }

.la-sso { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.la-more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-top: 20px; border-top: 1px solid var(--hp-border); }
.la-more .hp-btn { height: 44px; }

/* 動態效果：系統設定「減少動態」時全部關掉 */
@media (prefers-reduced-motion: reduce) {
  .la-spark__flow, .la-bus i, .la-dev::before, .la-dev small::before, .la-toast { animation: none !important; }
  .la-spark__flow { stroke-dasharray: none; opacity: 0; }
  .la-card .lg-submit::after { transition: none; display: none; }
  .lg-pw__eye, .lg-pw__eye:hover, .lg-pw__eye:active { transform: none; transition: none; }
}

/* 大螢幕：左半主視覺放大多一點，避免 2560 左邊顯得空 */
/* 放大倍率用實測過「按鈕字上下置中」的值（1.22／1.375 誤差 <1px；1.18／1.36 會偏上近 2px） */
@media (min-width: 1800px) and (min-height: 1000px) { .lg-zoom { zoom: 1.22; } .la-hero.lg-zoom { zoom: 1.28; } }
@media (min-width: 2300px) and (min-height: 1200px) { .lg-zoom { zoom: 1.375; } .la-hero.lg-zoom { zoom: 1.5; } }

/* =====================================================================
   斷點
   ===================================================================== */
@media (max-width: 1100px) {
  body.la { grid-template-columns: minmax(0, 1fr) minmax(460px, 1fr); }
  body.la { --la-pad: 28px; }
  .la-h { font-size: 36px; }
  .la-card { padding: 28px; }
}
@media (min-width: 901px) and (max-height: 820px) {
  .la-hero { gap: 18px; padding: 16px 0; }
  .la-stage { margin-top: 44px; }
  .la-side { gap: 16px; }
  .la-card { gap: 16px; padding: 28px; }
  .la-head { gap: 6px; }
  .la-card .lg-form { gap: 14px; }
  .la-more { padding-top: 16px; }
}
/* 單欄斷點用 900（不是全站的 820）：821～900 寬時左半太窄，接線示意會被切到（iPad 直向 834） */
@media (max-width: 900px) {
  body.la { display: block; }
  .la-brand { display: none; }
  .la-side {
    padding: 12px 16px 20px;
    background:
      radial-gradient(ellipse 90% 34% at 50% 0%, var(--la-glow-a), transparent 75%),
      var(--hp-bg);
  }
  .la-side::before {            /* 手機頂端淡淡的藍圖格線 */
    content: ""; position: absolute; inset: 0 0 auto; height: 300px; z-index: -1; pointer-events: none;
    --_g: color-mix(in srgb, var(--hp-border) 55%, transparent);
    background-image: linear-gradient(var(--_g) 1px, transparent 1px), linear-gradient(90deg, var(--_g) 1px, transparent 1px);
    background-size: 28px 28px;
    -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .7), transparent);
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, .7), transparent);
  }
  .la-tools { height: 56px; }
  .la-mbrand { display: inline-flex; }
  .la-home { width: 40px; padding: 0; }
  .la-home__t { display: none; }
  .la-mintro {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px;
    width: min(464px, 100%); margin: auto auto 0; padding: 12px 6px; list-style: none;
    border: 1px solid var(--hp-border); border-radius: 16px;
    background: color-mix(in srgb, var(--hp-surface) 70%, transparent);
  }
  .la-mintro li { display: grid; justify-items: center; gap: 6px; color: var(--hp-text-2); font-size: 12px; font-weight: 600; }
  .la-mintro .hp-icon { width: 24px; height: 24px; color: var(--hp-brand-3); }   /* 只是說明，不做成按鈕樣子 */
  .la-side { gap: 0; }
  .la-card { margin: 16px auto auto; }
  .lg-title { font-size: 26px; }
  .la-mfoot { display: flex; justify-content: center; padding-top: 24px; }
}
@media (max-width: 500px) {
  /* 手機：表單不包卡，用滿寬度 */
  .la-card { padding: 0; margin-top: 20px; gap: 18px; border: 0; border-radius: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .la-card::before { display: none; }
  .la-card .lg-title { font-size: 26px; }
  .lg-field .hp-input { font-size: 16px; }   /* iPhone 輸入框小於 16px 點下去會自動放大頁面 */
}
