/* ===== 2026-10-31 注册门禁（配合 scripts/auth-service） ===== */

/* 右下角常驻状态胶囊 */
.gate-pill {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 8px 14px;
  background: #fff;
  border: 1px solid #E1F5EE;
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(15, 110, 86, .12);
  font-size: 13px;
  color: #0F6E56;
  line-height: 1.2;
}

.gate-pill.is-warn {
  border-color: #F2C6C6;
  color: #B42318;
}

.gate-pill-text {
  white-space: nowrap;
}

.gate-pill-btn {
  border: 0;
  background: #0F6E56;
  color: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.gate-pill-btn:hover { background: #0b5844; }

.gate-pill-btn.ghost {
  background: transparent;
  color: #0F6E56;
  border: 1px solid #CFEAE0;
}

/* 额度用尽的拦截页 */
.gate-wall {
  margin: 24px 0 8px;
  padding: 28px 24px;
  border: 1px solid #E1F5EE;
  border-radius: 14px;
  background: linear-gradient(180deg, #F7FCFA 0%, #fff 100%);
  text-align: center;
}

.gate-wall-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: #E1F5EE;
  color: #0F6E56;
  font-size: 12px;
  margin-bottom: 10px;
}

.gate-wall h2 {
  margin: 6px 0 12px !important;
  padding: 0 !important;
  border: 0 !important;
  font-size: 22px !important;
  color: #1f2d2a;
}

.gate-wall p {
  margin: 0 0 10px;
  color: #4a5b57;
  font-size: 15px;
  line-height: 1.75;
}

.gate-wall-note {
  font-size: 13px !important;
  color: #7b8c88 !important;
}

.gate-wall-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 18px;
}

.gate-btn {
  border: 0;
  border-radius: 10px;
  padding: 11px 20px;
  font-size: 15px;
  background: #0F6E56;
  color: #fff;
  cursor: pointer;
}

.gate-btn:hover { background: #0b5844; }

.gate-btn.ghost {
  background: #fff;
  color: #0F6E56;
  border: 1px solid #CFEAE0;
}

.gate-wall-foot {
  text-align: center;
  color: #9aa8a4;
  font-size: 13px;
  margin-top: 14px;
}

/* 注册 / 登录弹层 */
.gate-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 40, 34, .45);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.gate-mask[hidden] { display: none; }

.gate-modal {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 16px;
  padding: 24px 22px 20px;
  box-shadow: 0 24px 60px rgba(6, 30, 24, .28);
  position: relative;
}

.gate-modal h3 {
  margin: 0 0 4px;
  font-size: 19px;
  color: #16241f;
}

.gate-modal-sub {
  margin: 0 0 16px;
  font-size: 13px;
  color: #7b8c88;
  line-height: 1.6;
}

.gate-tabs {
  display: flex;
  gap: 6px;
  background: #F1F7F5;
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 16px;
}

.gate-tab {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 9px 0;
  border-radius: 8px;
  font-size: 14px;
  color: #4a5b57;
  cursor: pointer;
}

.gate-tab.active {
  background: #fff;
  color: #0F6E56;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(15, 110, 86, .10);
}

.gate-field {
  margin-bottom: 12px;
}

.gate-field label {
  display: block;
  font-size: 13px;
  color: #4a5b57;
  margin-bottom: 6px;
}

.gate-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 12px;
  border: 1px solid #DCE7E3;
  border-radius: 10px;
  font-size: 15px;
  outline: none;
  background: #fff;
  color: #16241f;
}

.gate-field input:focus {
  border-color: #5DCAA5;
  box-shadow: 0 0 0 3px rgba(93, 202, 165, .18);
}

/* 验证码：输入框 + 发送按钮同一行 */
.gate-field-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.gate-field-row input {
  flex: 1 1 auto;
  min-width: 0;
  letter-spacing: .32em;
  font-size: 17px;
  text-indent: 2px;
}

.gate-code-btn {
  flex: 0 0 auto;
  white-space: nowrap;
  border: 1px solid #CFEAE0;
  background: #fff;
  color: #0F6E56;
  border-radius: 10px;
  padding: 0 13px;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}

.gate-code-btn:hover:not(:disabled) {
  background: #E1F5EE;
  border-color: #5DCAA5;
}

.gate-code-btn:disabled {
  color: #9aa8a4;
  border-color: #E6EDEA;
  background: #F6F9F8;
  cursor: default;
}

.gate-submit {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 12px;
  font-size: 15px;
  background: #0F6E56;
  color: #fff;
  cursor: pointer;
  margin-top: 4px;
}

.gate-submit:disabled {
  opacity: .6;
  cursor: default;
}

.gate-msg {
  min-height: 18px;
  margin: 10px 0 0;
  font-size: 13px;
  color: #B42318;
  line-height: 1.5;
}

.gate-msg.ok { color: #0F6E56; }

.gate-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: #9aa8a4;
  cursor: pointer;
}

.gate-foot-note {
  margin: 12px 0 0;
  font-size: 12px;
  color: #9aa8a4;
  text-align: center;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .gate-pill {
    right: 12px;
    bottom: 12px;
    font-size: 12px;
    padding: 7px 8px 7px 12px;
  }
  .gate-wall { padding: 22px 16px; }
  .gate-wall h2 { font-size: 19px !important; }
  .gate-modal { padding: 20px 16px 16px; }
  .gate-code-btn { padding: 0 10px; font-size: 12px; }
  .gate-field-row input { letter-spacing: .24em; font-size: 16px; }
}
