/* ── Register Modal inner styles ── */
#regApp { font-family: 'Nunito', sans-serif; }
#regApp .reg-tabs {
  display: flex; background: #fce4ec; border-radius: 12px; padding: 4px; margin-bottom: 20px;
}
#regApp .reg-tab {
  flex: 1; padding: 9px 6px; border: none; background: transparent;
  font-size: 14px; font-weight: 700; color: #e91e63; cursor: pointer;
  border-radius: 9px; transition: all 0.25s ease; font-family: inherit;
}
#regApp .reg-tab.active { background: #e91e63; color: #fff; box-shadow: 0 2px 8px rgba(233,30,99,.28); }
#regApp .reg-tab:hover:not(.active) { background: rgba(233,30,99,.1); }
#regApp .reg-panel { display: none; animation: regFadeIn 0.25s ease; }
#regApp .reg-panel.active { display: block; }
@keyframes regFadeIn { from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:translateY(0)} }
#regApp .rg { margin-bottom: 14px; }
#regApp .rg label {
  display: block; margin-bottom: 5px; font-size: 13px; font-weight: 700; color: #880e4f;
}
#regApp .rg label .hint { font-weight: 500; color: #e91e63; font-size: 11px; }
#regApp .ri {
  width: 100%; padding: 11px 14px; border: 2px solid #f8bbd0; border-radius: 11px;
  font-size: 14px; font-family: inherit; transition: all .25s; background: #fff; color: #333;
  outline: none;
}
#regApp .ri:focus { border-color: #e91e63; box-shadow: 0 0 0 3px rgba(233,30,99,.13); }
#regApp .ri::placeholder { color: #f48fb1; }
#regApp .captcha-row { display: flex; gap: 10px; align-items: center; }
#regApp .captcha-row .ri { flex: 1; }
#regApp .captcha-img {
  height: 44px; border-radius: 9px; cursor: pointer;
  border: 2px solid #f8bbd0; flex-shrink: 0; transition: border-color .2s;
}
#regApp .captcha-img:hover { border-color: #e91e63; }
#regApp .rbtn {
  width: 100%; padding: 13px; border: none; border-radius: 11px;
  font-size: 15px; font-weight: 800; color: #fff; cursor: pointer;
  font-family: inherit; margin-top: 6px; transition: all .25s;
  background: linear-gradient(135deg, #ec407a, #ab47bc);
  box-shadow: 0 4px 14px rgba(233,30,99,.28);
}
#regApp .rbtn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(233,30,99,.38); }
#regApp .rbtn:active { transform: translateY(0); }
#regApp .rbtn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
/* account panel */
#regApp .acc-info {
  background: linear-gradient(135deg,#fce4ec,#f3e5f5); border-radius: 13px;
  padding: 13px 16px; margin-bottom: 18px; text-align: center; border: 1px solid #f8bbd0;
}
#regApp .acc-info .a-label { font-size: 11px; color: #e91e63; margin-bottom: 2px; }
#regApp .acc-info .a-val { font-size: 19px; font-weight: 800; color: #880e4f; }
#regApp .invite-block {
  background: linear-gradient(135deg,#e3f2fd,#fce4ec);
  border-radius: 14px; padding: 15px 16px; margin-bottom: 20px;
  border: 2px solid #f8bbd0;
}
#regApp .invite-block .ib-title {
  font-size: 13px; font-weight: 700; color: #ad1457; margin-bottom: 10px;
  display: flex; align-items: center; gap: 5px;
}
#regApp .invite-code-row { display: flex; align-items: center; gap: 8px; }
#regApp .invite-code-val {
  flex: 1; background: #fff; border: 2px solid #f48fb1; border-radius: 9px;
  padding: 10px 12px; font-size: 18px; font-weight: 800; letter-spacing: 3px;
  color: #880e4f; text-align: center; font-family: 'Courier New', monospace;
}
#regApp .btn-copy {
  padding: 10px 14px; border: none; border-radius: 9px;
  background: linear-gradient(135deg,#ec407a,#ab47bc); color: #fff;
  font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit;
  transition: all .25s; white-space: nowrap; flex-shrink: 0;
}
#regApp .btn-copy:hover { opacity: .85; transform: translateY(-1px); }
#regApp .btn-copy.copied { background: linear-gradient(135deg,#43a047,#1b5e20); }
#regApp .ib-hint { font-size: 11px; color: #e91e63; margin-top: 7px; line-height: 1.5; }
#regApp .sec-title {
  font-size: 14px; font-weight: 700; color: #ad1457;
  margin-bottom: 13px; padding-bottom: 7px; border-bottom: 2px solid #fce4ec;
}
#regApp .btn-logout {
  width: 100%; padding: 11px; margin-top: 12px;
  border: 2px solid #f48fb1; border-radius: 11px;
  font-size: 14px; font-weight: 700; color: #e91e63;
  cursor: pointer; font-family: inherit; background: transparent; transition: all .25s;
}
#regApp .btn-logout:hover { background: #fce4ec; }
/* 邀請統計 */
#regApp .stats-section {
  background: linear-gradient(135deg,#f3e5f5,#fce4ec);
  border-radius: 14px; padding: 14px 16px; margin-bottom: 16px;
  border: 2px solid #ce93d8;
}
#regApp .stats-row { display: flex; gap: 8px; margin-bottom: 12px; }
#regApp .stat-mini {
  flex: 1; background: #fff; border-radius: 10px; padding: 10px 8px;
  text-align: center; border: 1.5px solid #f8bbd0;
}
#regApp .stat-mini .sm-val { font-size: 22px; font-weight: 800; color: #880e4f; line-height: 1.1; }
#regApp .stat-mini .sm-label { font-size: 10px; color: #e91e63; margin-top: 3px; line-height: 1.4; }
/* 里程碑 */
#regApp .ms-item {
  background: #fff; border-radius: 10px; padding: 10px 12px;
  border: 1.5px solid #f8bbd0; margin-bottom: 8px;
}
#regApp .ms-item:last-child { margin-bottom: 0; }
#regApp .ms-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
#regApp .ms-target { font-size: 12px; font-weight: 700; color: #880e4f; }
#regApp .ms-prog { font-size: 11px; color: #e91e63; font-weight: 600; }
#regApp .ms-bar-wrap { height: 7px; background: #fce4ec; border-radius: 5px; overflow: hidden; margin-bottom: 5px; }
#regApp .ms-bar-fill { height: 100%; border-radius: 5px; background: linear-gradient(90deg,#ec407a,#ab47bc); transition: width .6s ease; }
#regApp .ms-bar-fill.done { background: linear-gradient(90deg,#43a047,#1b5e20); }
#regApp .ms-reward { font-size: 11px; color: #7b1fa2; line-height: 1.4; }
#regApp .ms-badge { display: inline-block; padding: 1px 6px; border-radius: 6px; font-size: 10px; font-weight: 700; margin-left: 4px; }
#regApp .ms-badge.done { background: #c8e6c9; color: #2e7d32; }
#regApp .ms-badge.pending { background: #fce4ec; color: #c62828; }
#regApp .ms-badge.sent { background: #e3f2fd; color: #1565c0; }
/* 回饋 */
#regApp .cashback-block {
  background: linear-gradient(135deg,#fff8e1,#fce4ec);
  border-radius: 13px; padding: 13px 15px; margin-bottom: 16px;
  border: 2px solid #ffcc80;
}
#regApp .cashback-text { font-size: 12px; color: #bf360c; line-height: 1.7; }
#regApp .cashback-rate { font-size: 20px; font-weight: 800; color: #e65100; vertical-align: middle; }
/* 密碼折疊 toggle */
#regApp .sec-toggle {
  width: 100%; padding: 10px 14px; margin-bottom: 12px;
  background: linear-gradient(135deg,#fce4ec,#f3e5f5);
  border: 2px solid #f8bbd0; border-radius: 11px;
  font-size: 13px; font-weight: 700; color: #ad1457;
  cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: space-between; transition: all .25s;
}
#regApp .sec-toggle:hover { background: linear-gradient(135deg,#f8bbd0,#e1bee7); }
#regApp .reg-arrow { transition: transform .3s ease; font-size: 9px; }
#regApp .reg-arrow.open { transform: rotate(180deg); }
#regApp .collapsible { display: none; }
#regApp .collapsible.open { display: block; }
#regApp .no-ms { font-size: 12px; color: #e91e63; text-align: center; padding: 6px 0; }
/* 新人大禮包 */
#regApp .ng-block {
  background: linear-gradient(135deg,#e8f5e9,#f3e5f5);
  border-radius: 14px; padding: 16px 18px; margin-bottom: 14px;
  border: 2px solid #a5d6a7;
}
#regApp .ng-title {
  font-size: 13px; font-weight: 700; color: #2e7d32;
  display: flex; align-items: center; gap: 6px; margin-bottom: 12px;
}
#regApp .ng-task {
  background: #fff; border-radius: 10px; padding: 10px 12px;
  border: 1.5px solid #c8e6c9; display: flex; align-items: center;
  gap: 8px; margin-bottom: 8px;
}
#regApp .ng-task.done { border-color: #81c784; background: #f1f8e9; }
#regApp .ng-check {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid #a5d6a7;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 12px; background: #fff; color: transparent; transition: all .3s;
}
#regApp .ng-check.checked { background: #43a047; border-color: #2e7d32; color: #fff; }
#regApp .ng-info { flex: 1; min-width: 0; }
#regApp .ng-name { font-size: 12px; font-weight: 700; color: #2e7d32; }
#regApp .ng-desc { font-size: 10px; color: #66bb6a; margin-top: 2px; }
#regApp .ng-btn {
  padding: 6px 12px; border: none; border-radius: 7px;
  background: linear-gradient(135deg,#43a047,#1b5e20);
  color: #fff; font-size: 11px; font-weight: 700; cursor: pointer;
  font-family: inherit; flex-shrink: 0; transition: opacity .2s;
}
#regApp .ng-btn:hover { opacity: .85; }
#regApp .ng-btn:disabled { opacity: .45; cursor: not-allowed; }
#regApp .ng-reward-row {
  display: flex; align-items: center; gap: 10px;
  padding-top: 10px; border-top: 1px solid #c8e6c9; margin-top: 4px;
}
#regApp .ng-reward-info { flex: 1; font-size: 11px; color: #2e7d32; line-height: 1.5; }
#regApp .ng-reward-info strong { font-size: 13px; }
#regApp .ng-claim-btn {
  padding: 8px 14px; border: none; border-radius: 9px;
  background: linear-gradient(135deg,#ff8f00,#e65100);
  color: #fff; font-size: 13px; font-weight: 700; cursor: pointer;
  font-family: inherit; transition: all .2s; flex-shrink: 0;
}
#regApp .ng-claim-btn:hover { transform: translateY(-1px); }
#regApp .ng-claim-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
#regApp .ng-char-section { margin-top: 10px; padding-top: 10px; border-top: 1px solid #c8e6c9; }
#regApp .ng-char-title { font-size: 11px; color: #2e7d32; font-weight: 700; margin-bottom: 6px; }
#regApp .ng-char-list { display: flex; flex-direction: column; gap: 5px; max-height: 130px; overflow-y: auto; }
#regApp .ng-char-item {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  border-radius: 7px; border: 1.5px solid #c8e6c9; cursor: pointer;
  background: #fff; transition: all .2s; font-size: 12px;
}
#regApp .ng-char-item:hover { background: #e8f5e9; }
#regApp .ng-char-item.selected { background: #c8e6c9; border-color: #43a047; }
/* ng modals */
.ng-modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,.6); z-index: 99999;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.ng-modal-box {
  background: #fff; border-radius: 18px; padding: 22px 20px;
  max-width: 380px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.ng-modal-title { font-size: 15px; font-weight: 700; color: #ad1457; margin-bottom: 10px; }
.ng-modal-text {
  background: #f3e5f5; border-radius: 9px; padding: 10px 12px;
  font-size: 12px; color: #4a148c; line-height: 1.6;
  margin-bottom: 10px; white-space: pre-wrap; word-break: break-all;
}
.ng-modal-label { font-size: 11px; color: #ad1457; font-weight: 700; margin-bottom: 5px; }
.ng-modal-input {
  width: 100%; padding: 9px 12px; border: 2px solid #f48fb1;
  border-radius: 9px; font-size: 13px; font-family: inherit; margin-bottom: 8px;
}
.ng-modal-input:focus { outline: none; border-color: #e91e63; }
.ng-modal-btns { display: flex; gap: 8px; }
.ng-modal-btns .ng-primary { flex: 1; }
.ng-primary {
  padding: 10px 16px; border: none; border-radius: 9px;
  background: linear-gradient(135deg,#ec407a,#ab47bc);
  color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.ng-cancel {
  padding: 10px 14px; border: 2px solid #f48fb1; border-radius: 9px;
  font-size: 13px; color: #e91e63; background: transparent;
  cursor: pointer; font-family: inherit; font-weight: 700;
}
/* toast inside modal */
#regToast {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%) translateY(-80px);
  padding: 10px 22px; border-radius: 10px; font-size: 13px; font-weight: 600;
  z-index: 9999; transition: transform .35s ease; white-space: nowrap;
  pointer-events: none; max-width: 90%;
}
#regToast.show { transform: translateX(-50%) translateY(0); }
#regToast.success { background: #c8e6c9; color: #2e7d32; border: 1px solid #a5d6a7; }
#regToast.error   { background: #ffcdd2; color: #c62828; border: 1px solid #ef9a9a; }
