/* ==========================================================================
   G01 多因素驗證
   桌機驗收基準 1440px（原圖 1586px，比例 0.908）
   ========================================================================== */

.g01 { background: var(--c-navy); }

.g01__layout {
  display: flex;
  min-height: 100vh;
  background: var(--c-navy);
}

/* ==========================================================================
   左：品牌面板
   ========================================================================== */

.brand {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  padding: 101px 0 57px 68px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* --- 標題 --- */
.brand__head {
  display: flex;
  align-items: center;
  gap: 32px;
  position: relative;
  z-index: 2;
}

.brand__logo { flex: none; display: block; }

.brand__title {
  font-size: 43px;
  font-weight: 700;
  color: var(--c-on-dark);
  letter-spacing: .01em;
  line-height: 1.2;
}

.brand__subtitle {
  margin-top: 8px;
  font-size: 23px;
  color: #A8C3CC;
  letter-spacing: .01em;
}

/* --- 特色清單 --- */
.features {
  margin-top: 33px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  z-index: 2;
  width: 300px;
}

.feature { display: flex; align-items: center; gap: 16px; }

.feature__icon {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(159, 216, 210, .34);
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .02);
}

.feature__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--c-on-dark);
  line-height: 1.35;
}

.feature__desc {
  margin-top: 3px;
  font-size: 14px;
  color: #7E9AA5;
  line-height: 1.5;
}

/* --- 裝飾插圖（獨立素材） --- */
.brand__art {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  pointer-events: none;
}

.brand__art-core {
  position: absolute;
  left: 325px;
  top: 216px;
  width: 576px;
  height: 585px;
}

.brand__art-flow {
  position: absolute;
  left: 9px;
  top: 495px;
  width: 316px;
  height: 86px;
}

/* --- 底部狀態列 --- */
.brand__foot {
  margin-top: auto;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 44px;
  margin-left: -6px;
  padding-right: 76px;
  font-size: 15px;
  color: #9FB3BC;
}

.brand__foot-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.brand__foot-sep {
  width: 1px;
  height: 22px;
  background: rgba(159, 179, 188, .28);
}

.brand__version {
  margin-left: auto;
  font-size: 14px;
  color: #7E9AA5;
  letter-spacing: .04em;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.dot--ok { background: #14C06A; }

/* ==========================================================================
   右：驗證卡片
   ========================================================================== */

.auth {
  flex: none;
  width: 536px;              /* 518 卡片 + 18 右側留白 */
  padding: 18px 18px 18px 0;
  display: flex;
}

.auth__card {
  flex: 1;
  background: var(--c-cream);
  border-radius: var(--r-lg);
  padding: 64px 62px 42px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-raised);
}

/* --- 步驟 --- */
.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.steps__item { display: inline-flex; align-items: center; gap: 11px; }

.steps__num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 600;
}

.steps__item--done .steps__num {
  border: 1.5px solid var(--c-teal-700);
  color: var(--c-teal-700);
}

.steps__item--done .steps__label {
  color: var(--c-teal-700);
  font-weight: 500;
}

.steps__item--current .steps__num {
  background: #0D1F2C;
  color: #fff;
}

.steps__item--current .steps__label {
  color: var(--c-ink);
  font-weight: 500;
}

.steps__label { font-size: 15px; white-space: nowrap; }

.steps__line {
  flex: none;
  width: 120px;
  height: 1px;
  background: #2C3A42;
}

/* --- SSO 已通過 --- */
.auth__passed {
  margin-top: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 700;
  color: var(--c-ink);
}

.auth__passed-icon {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #1C7A45;
  display: grid;
  place-items: center;
  flex: none;
}

.auth__divider {
  margin: 33px 0 0;
  border: 0;
  border-top: 1px solid var(--c-divider);
}

.auth__divider--foot { margin-top: auto; }

/* --- 主體 --- */
.auth__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.auth__lock {
  margin-top: 36px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #EFEDE9;
  display: grid;
  place-items: center;
}

.auth__user {
  margin-top: 7px;
  font-size: 31px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--c-ink);
}

.auth__hint {
  margin-top: 14px;
  font-size: 15px;
  color: var(--c-muted);
  display: block;
}

/* --- OTP --- */
.otp {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  width: 100%;
}

.otp__box {
  height: 66px;
  border: 1px solid #DCD9D4;
  border-radius: 10px;
  background: #FCFAF7;
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  color: var(--c-ink);
  min-width: 0;
}

.otp__box:focus {
  outline: none;
  border-color: var(--c-teal-700);
  border-width: 1.5px;
  box-shadow: 0 0 0 1px rgba(1, 92, 103, .18);
}

/* --- 按鈕 --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 10px;
  font-size: 19px;
  font-weight: 700;
}

.btn--primary {
  margin-top: 32px;
  width: 100%;
  height: 59px;
  background: var(--c-teal-800);
  color: #fff;
  transition: background .16s ease;
}

.btn--primary:hover { background: #004E58; }

.auth__link {
  margin-top: 16px;
  font-size: 16px;
  font-weight: 700;
  color: var(--c-teal-700);
}

.auth__link:hover { text-decoration: underline; }

/* --- 其他登入方式 --- */
.fallback {
  margin-top: 29px;
  width: 100%;
  border: 1px solid #E7E3DE;
  border-radius: var(--r-md);
  background: #FBF9F6;
  overflow: hidden;
}

.fallback__head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 17px 18px;
  text-align: left;
}

.fallback__icon { flex: none; display: block; }

.fallback__text { flex: 1; min-width: 0; }

.fallback__title {
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: var(--c-ink);
  line-height: 1.4;
}

.fallback__desc {
  display: block;
  margin-top: 3px;
  font-size: 14px;
  color: var(--c-muted);
  line-height: 1.5;
}

.fallback__chevron { transition: transform .18s ease; }

.fallback__head[aria-expanded="true"] .fallback__chevron { transform: rotate(180deg); }

.fallback__panel {
  padding: 0 18px 16px 60px;
  font-size: 14px;
  color: var(--c-muted);
  line-height: 1.7;
}

/* --- 卡片底部 --- */
.auth__foot {
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.auth__foot-icon { flex: none; }

.auth__foot-title {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--c-ink);
  line-height: 1.45;
}

.auth__foot-desc {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  color: var(--c-muted);
  line-height: 1.5;
}

/* ==========================================================================
   響應式：≤1180px 單欄；手機驗收基準 390px
   ========================================================================== */

@media (max-width: 1180px) {
  .g01__layout { flex-direction: column; }

  .brand {
    padding: 44px 32px 28px;
    min-height: 420px;
  }

  .brand__art-core {
    left: auto;
    right: -80px;
    top: 180px;
    width: 460px;
    height: 467px;
    opacity: .9;
  }

  .brand__art-flow { display: none; }

  .auth {
    width: 100%;
    padding: 0 18px 18px;
  }

  .auth__card { padding: 40px 32px; }
}

@media (max-width: 640px) {
  .brand {
    padding: 34px 22px 22px;
    min-height: 0;
  }

  .brand__head { gap: 14px; }
  .brand__logo svg { width: 40px; height: 40px; }
  .brand__title { font-size: 27px; }
  .brand__subtitle { font-size: 15px; margin-top: 6px; }

  .features {
    margin-top: 28px;
    gap: 18px;
    width: auto;
    max-width: 320px;
  }

  .feature__icon { width: 40px; height: 40px; }
  .feature__icon svg { width: 19px; height: 19px; }
  .feature__title { font-size: 15px; }
  .feature__desc { font-size: 13px; }

  /* 插圖於窄版縮為右下裝飾，不干擾文字 */
  .brand__art-core {
    right: -140px;
    top: 210px;
    width: 360px;
    height: 366px;
    opacity: .55;
  }

  .brand__foot {
    margin-top: 30px;
    flex-wrap: wrap;
    gap: 10px 14px;
    padding-right: 0;
    font-size: 12.5px;
  }

  .brand__foot-sep { display: none; }
  .brand__version { margin-left: 0; width: 100%; }

  .auth { padding: 0 12px 12px; }
  .auth__card { padding: 28px 20px 24px; border-radius: var(--r-md); }

  .steps { gap: 8px; }
  .steps__item { gap: 8px; }
  .steps__label { font-size: 13px; }
  .steps__num { width: 26px; height: 26px; font-size: 13px; }
  .steps__line { width: 34px; }

  .auth__passed { margin-top: 30px; font-size: 17px; }

  .auth__lock { margin-top: 26px; width: 50px; height: 50px; }
  .auth__lock svg { width: 22px; height: 22px; }

  .auth__user { font-size: 27px; margin-top: 14px; }
  .auth__hint { font-size: 13.5px; }

  .otp { gap: 7px; margin-top: 18px; }
  .otp__box { height: 48px; font-size: 19px; border-radius: 8px; }

  .btn--primary { height: 52px; font-size: 17px; margin-top: 20px; }
  .auth__link { font-size: 15px; }

  .fallback__head { padding: 14px; gap: 12px; }
  .fallback__icon svg { width: 22px; height: 22px; }
  .fallback__title { font-size: 15px; }
  .fallback__desc { font-size: 12.5px; }
  .fallback__panel { padding: 0 14px 14px 48px; font-size: 13px; }

  .auth__foot { padding-top: 20px; gap: 11px; }
  .auth__foot-icon { width: 26px; height: 26px; }
  .auth__foot-title { font-size: 14px; }
  .auth__foot-desc { font-size: 12.5px; }
}
