/* ==========================================================
   NewebPay 申請頁 / 客服頁
   ========================================================== */

:root {
  --blue-700: #1a52d0;
  --blue-600: #1a5ce8;
  --blue-900: #17418f;
  --red: #e53935;
  --ink: #1f2937;
  --ink-soft: #6b7280;
  --line: #e3e8ef;
  --field-bg: #f5f7fa;
  --page-bg: #efefef;
  --radius: 22px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--page-bg);
  color: var(--ink);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei",
               -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; display: block; }

/* ---------- 頁首 ---------- */

.hero {
  background: var(--blue-700);
  padding: 26px 20px 42px;
  text-align: center;
  color: #fff;
}

.hero__title {
  margin: 0;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 1px;
}

.hero__subtitle {
  margin: 6px 0 0;
  font-size: 16px;
  color: rgba(255, 255, 255, .88);
}

/* ---------- 內容容器（向上重疊頁首）---------- */

.wrap {
  max-width: 520px;
  margin: -28px auto 0;
  padding: 0 20px 44px;
}

.card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px 18px;
  box-shadow: 0 2px 14px rgba(17, 24, 39, .07);
}

.card + .card { margin-top: 16px; }

.card__title {
  margin: 0;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
  font-size: 17px;
  font-weight: 700;
  color: var(--blue-900);
}

/* ---------- 商家資訊列 ---------- */

.kv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 11px;
  padding: 14px 17px;
  background: var(--field-bg);
  border-radius: 12px;
}

.kv__label {
  color: var(--ink-soft);
  font-size: 15px;
  flex: 0 0 auto;
}

.kv__value {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  text-align: right;
  word-break: break-all;
}

.kv__value--accent { color: var(--red); }

/* ---------- 表單欄位 ---------- */

.field { margin-top: 20px; }

.field__label {
  display: block;
  margin-bottom: 9px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.field__req {
  color: var(--red);
  margin-left: 3px;
}

.field__input {
  width: 100%;
  padding: 15px 16px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-family: inherit;
  transition: border-color .18s, box-shadow .18s;
}

.field__input::placeholder { color: #b6bec9; }

.field__input:focus {
  outline: none;
  border-color: var(--blue-700);
  box-shadow: 0 0 0 3px rgba(26, 82, 208, .13);
}

.field__input.is-invalid {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(229, 57, 53, .12);
}

/* ---------- 送出按鈕 ---------- */

.btn-submit {
  display: block;
  width: 100%;
  margin-top: 30px;
  padding: 17px;
  border: 0;
  border-radius: 14px;
  background: var(--blue-600);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(26, 92, 232, .32);
  transition: transform .12s, box-shadow .18s, opacity .18s;
}

.btn-submit:hover { box-shadow: 0 8px 20px rgba(26, 92, 232, .42); }
.btn-submit:active { transform: translateY(1px); }
.btn-submit[disabled] { opacity: .6; cursor: not-allowed; box-shadow: none; }

/* ---------- SSL 標籤 / 頁尾 ---------- */

.ssl-badge {
  width: fit-content;
  margin: 22px auto 0;
  padding: 8px 18px;
  background: #f1f3f6;
  border-radius: 999px;
  color: #4b5563;
  font-size: 13px;
}

.footer-note {
  margin-top: 14px;
  text-align: center;
  color: #9aa3af;
  font-size: 12.5px;
  line-height: 1.9;
}

.footer-note p { margin: 0; }

/* ---------- 維護中 ---------- */

.notice {
  padding: 34px 22px;
  text-align: center;
  color: var(--ink);
  white-space: pre-line;
  line-height: 1.8;
}

/* ==========================================================
   客服頁（圖 4）
   ========================================================== */

body.page-contact {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.contact {
  text-align: center;
}

.contact__avatar {
  width: 150px;
  height: 150px;
  margin: 0 auto;
  border-radius: 50%;
  overflow: hidden;
  background: #eef1f5;
}

.contact__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact__name {
  margin: 26px 0 0;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #111827;
}

.contact__btn {
  display: inline-block;
  margin-top: 30px;
  padding: 13px 36px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  color: #111827;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 2px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(17, 24, 39, .06);
  transition: box-shadow .18s, transform .12s;
}

.contact__btn:hover {
  box-shadow: 0 6px 16px rgba(17, 24, 39, .12);
  transform: translateY(-1px);
}

.contact__btn:active { transform: translateY(0); }

/* ==========================================================
   彈窗（圖 2 / 圖 3）
   ========================================================== */

.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, .45);
}

.modal.is-open { display: flex; }

.modal__dialog {
  width: 100%;
  max-width: 300px;
  background: rgba(250, 250, 250, .97);
  border-radius: 16px;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
  animation: modal-pop .2s ease-out;
}

@keyframes modal-pop {
  from { opacity: 0; transform: scale(.92); }
  to   { opacity: 1; transform: scale(1); }
}

.modal__icon {
  margin-top: 24px;
  font-size: 54px;
  line-height: 1;
}

.modal__title {
  margin: 12px 0 0;
  font-size: 19px;
  font-weight: 700;
  color: #1c1c1e;
}

.modal__message {
  margin: 14px 0 0;
  padding: 0 22px 22px;
  font-size: 15px;
  line-height: 1.65;
  color: #3a3a3c;
  white-space: pre-line;
}

.modal__actions {
  border-top: 1px solid #d8d8dc;
}

.modal__button {
  display: block;
  width: 100%;
  padding: 15px;
  border: 0;
  background: transparent;
  color: var(--blue-600);
  font-size: 19px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.modal__button:active { background: rgba(0, 0, 0, .05); }

@media (max-width: 380px) {
  .hero__title { font-size: 23px; }
  .contact__name { font-size: 24px; }
}
