/* ---- 登入頁版面（僅外觀；欄位名稱、ID、送出流程與虛擬鍵盤不變） ---- */
/* 左右分欄：左側深灰品牌區（呼應 logo 底部「APP & POS SYSTEM」灰色膠囊），右側白色表單 */
/* 配色取自 OneClick logo：藍 #0f72ba、深灰 #3e3a39 / #595757、紅 #e60012 */
body.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  background: #f1f3f6;
  font-family: "Helvetica Neue", Arial, "PingFang TC", "Microsoft JhengHei", sans-serif;
}

.login-page:before {
  background-color: #f1f3f6;
  background-image: radial-gradient(#d9dee5 1px, transparent 1px);
  background-size: 22px 22px;
}

.login-page .login-wrapper {
  width: 100%;
  max-width: 820px;
}

.login-page .login-wrapper form {
  display: flex;
  width: 100%;
  padding: 0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(35, 24, 21, .14), 0 4px 12px rgba(35, 24, 21, .06);
  overflow: hidden;
}

/* ---- 左側品牌區 ---- */
.lp-brand {
  position: relative;
  flex: 0 0 40%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 28px 28px;
  background: linear-gradient(160deg, #4a4645 0%, #2f2b2a 100%);
  overflow: hidden;
}

/* 左上角三道藍色短線：呼應 logo 手指上方的「點擊」光芒 */
.lp-brand .lp-spark {
  position: absolute;
  top: 28px;
  left: 30px;
  width: 46px;
  height: 30px;
}

.lp-brand .lp-spark i {
  position: absolute;
  bottom: 0;
  width: 6px;
  height: 18px;
  border-radius: 3px;
  background: #2b8fd6;
}

.lp-brand .lp-spark i:nth-child(1) {
  left: 4px;
  transform: rotate(-45deg);
  transform-origin: bottom center;
}

.lp-brand .lp-spark i:nth-child(2) {
  left: 20px;
  bottom: 6px;
}

.lp-brand .lp-spark i:nth-child(3) {
  left: 36px;
  transform: rotate(45deg);
  transform-origin: bottom center;
}

/* 右下角紅色游標箭頭：呼應 logo 的紅色箭頭 */
.lp-brand:after {
  content: "";
  position: absolute;
  right: 26px;
  bottom: 64px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0 26px 26px;
  border-color: transparent transparent #e60012 transparent;
  transform: rotate(15deg);
  opacity: .9;
}

/* 大圓光暈裝飾 */
.lp-brand:before {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  left: -120px;
  bottom: -170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 114, 186, .35) 0%, rgba(15, 114, 186, 0) 70%);
}

.lp-logo-tile {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 210px;
  padding: 6px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .28);
}

.lp-logo {
  display: block;
  width: 100%;
  border-radius: 16px;
}

.lp-copy {
  position: relative;
  z-index: 1;
  margin: 32px 0 0;
  color: rgba(255, 255, 255, .55);
  font-size: 12px;
  text-align: center;
}

/* ---- 右側表單 ---- */
.lp-body {
  flex: 1 1 auto;
  min-width: 0;
  padding: 44px 44px 36px;
}

.login-page form .lp-title {
  position: relative;
  margin: 0 0 26px;
  padding-bottom: 14px;
  color: #231815;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 2px;
}

.lp-title:after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, #0f72ba 0%, #0f72ba 70%, #e60012 70%, #e60012 100%);
}

/* 錯誤訊息：與 feedback 提示框一致的左側色條樣式 */
.lp-alert {
  margin-bottom: 18px;
  padding: 10px 14px;
  border: 1px solid #f3d0d3;
  border-left: 4px solid #e60012;
  border-radius: 6px;
  background: #fdf4f5;
  color: #8a1c24;
  line-height: 1.6;
}

.lp-alert .fa {
  margin-right: 6px;
}

/* 輸入欄：左側圖示 + 輸入框 + 右側虛擬鍵盤按鈕，合成一個圓角框 */
.login-page .lp-field {
  display: flex;
  align-items: stretch;
  width: 100%;
  margin-bottom: 16px;
  border: 1.5px solid #e1e4e8;
  border-radius: 10px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}

.login-page .lp-field:hover {
  border-color: #c9ced5;
}

.login-page .lp-field:focus-within {
  border-color: #0f72ba;
  box-shadow: 0 0 0 4px rgba(15, 114, 186, .12);
}

.login-page .lp-field .input-group-addon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #9aa0a6;
  font-size: 16px;
}

.login-page .lp-field .lp-icon {
  padding-left: 4px;
}

.login-page .lp-field:focus-within .lp-icon {
  color: #0f72ba;
}

.login-page .lp-field .form-control {
  flex: 1 1 auto;
  width: 1%;
  min-width: 0;
  padding: 14px 4px !important;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #231815;
  font-size: 16px;
}

.login-page .lp-field .form-control::placeholder {
  color: #a3a9b0;
}

.login-page .lp-field .lp-kb {
  margin: 6px 6px 6px 0;
  border-radius: 8px;
  background: #f3f5f7;
  cursor: pointer;
  transition: background-color .15s, color .15s;
}

.login-page .lp-field .lp-kb:hover {
  background: #e6f0f8;
  color: #0f72ba;
}

.lp-remember {
  margin: 2px 0 22px;
}

.lp-remember label {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
  color: #595757;
  font-weight: normal;
  cursor: pointer;
}

.lp-remember input[type="checkbox"] {
  position: static;
  margin: 0 8px 0 0;
  width: 16px;
  height: 16px;
  accent-color: #0f72ba;
}

/* 登入按鈕：深灰底（同 logo 灰色膠囊），滑過轉為 logo 藍 */
.login-page form .lp-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
  padding: 14px 10px !important;
  border: 0;
  border-radius: 10px;
  background: #3e3a39;
  box-shadow: 0 6px 16px rgba(35, 24, 21, .22);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 2px;
  transition: background-color .15s, box-shadow .15s, transform .05s;
}

.login-page form .lp-submit .fa {
  margin-left: 10px;
  color: #ff4d5a;
  transition: transform .15s, color .15s;
}

.login-page form .lp-submit:hover,
.login-page form .lp-submit:focus {
  background: #0f72ba;
  box-shadow: 0 8px 20px rgba(15, 114, 186, .3);
  color: #fff;
  outline: none;
}

.login-page form .lp-submit:hover .fa,
.login-page form .lp-submit:focus .fa {
  color: #fff;
  transform: translateX(4px);
}

.login-page form .lp-submit:active {
  transform: translateY(1px);
}

/* 版權文字：桌機顯示在左側品牌區，手機改顯示在表單下方 */
.lp-copy-mobile {
  display: none;
  margin: 20px 0 0;
  color: #9aa0a6;
  font-size: 12px;
  text-align: center;
}

/* 平板以下：上下堆疊，品牌區縮成頂部橫幅 */
@media (max-width: 767px) {
  body.login-page {
    align-items: flex-start;
    padding: 24px 16px;
  }

  .login-page .login-wrapper {
    max-width: 420px;
  }

  .login-page .login-wrapper form {
    flex-direction: column;
    width: 100%;
    border-radius: 16px;
  }

  .lp-brand {
    flex: 0 0 auto;
    padding: 28px 20px 22px;
  }

  .lp-logo-tile {
    max-width: 140px;
    border-radius: 18px;
  }

  .lp-logo {
    border-radius: 13px;
  }

  .lp-brand .lp-spark {
    top: 18px;
    left: 20px;
    transform: scale(.8);
    transform-origin: top left;
  }

  .lp-brand:after {
    right: 22px;
    bottom: 22px;
    border-width: 0 0 20px 20px;
  }

  .lp-copy {
    display: none;
  }

  .lp-body {
    padding: 28px 20px 24px;
  }

  .login-page form .lp-title {
    font-size: 22px;
    margin-bottom: 20px;
  }

  .lp-copy-mobile {
    display: block;
  }
}


/* Dashboard 保留原有 reCAPTCHA，窄螢幕也需容納驗證元件。 */
.login-page .lp-captcha { margin: 0 0 20px; }
.login-page #message-wrap { margin-top: 8px; color: #8a1c24; }
.login-page .lp-field .lp-kb { flex: 0 0 40px; }
.login-page form .lp-kb { margin-top: 6px; padding: 0 !important; }
.login-page .lp-field .lp-kb:focus-visible { outline: 2px solid #0f72ba; outline-offset: 2px; }
@media (min-width: 375px) and (max-width: 399px) {
    .lp-body { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 374px) {
    body.login-page { padding: 16px 8px; }
    .lp-body { padding: 24px 16px; }
    .login-page #google_recaptcha { width: 304px; height: 68px; transform: scale(.85); transform-origin: top left; }
}
@media (prefers-reduced-motion: reduce) {
    .login-page *, .login-page *:after { transition: none !important; }
}
