/* ==========================================================================
   续费弹窗样式（登录页 / 看板页共用）
   --------------------------------------------------------------------------
   由 assets/css/login.css 抽离而来，供 login.php（登录时账号过期引导）
   与 dashboard.php（个人中心「看板状态」随时续费）共用。

   注意：动画使用本文件私有的 @keyframes renewModalIn，不复用 login.css 的
        modalIn，保证两个页面互相独立、无跨文件依赖。
   ========================================================================== */

@keyframes renewModalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.renew-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
}
.renew-modal.show {
  display: flex;
}
.renew-modal .renew-box {
  background: #fff;
  border-radius: 16px;
  width: 90%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 0 22px 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.15);
  animation: renewModalIn 0.3s ease;
}
.renew-modal .renew-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 10px;
  border-bottom: 1px solid #f0f2f8;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}
.renew-modal .renew-header h3 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: #1a1a2e;
  margin: 0;
}
.renew-modal .renew-header h3 i {
  color: #4f6ef7;
  margin-right: 6px;
  font-size: 0.9em;
}
.renew-modal .renew-close {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #9098a8;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}
.renew-modal .renew-close:hover {
  background: #4f6ef7;
  color: #fff;
}
.renew-modal .renew-expired-tip {
  margin: 14px 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff1f2;
  border-left: 3px solid #f43f5e;
  color: #b91c1c;
  font-size: 0.8rem;
  line-height: 1.6;
}
.renew-modal .renew-expired-tip i {
  margin-right: 6px;
  color: #f43f5e;
}
.renew-modal .plan-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.renew-modal .plan-card {
  position: relative;
  border: 2px solid #e8ecf4;
  border-radius: 12px;
  padding: 16px 14px 12px;
  cursor: pointer;
  background: #fff;
  transition: all 0.25s ease;
}
.renew-modal .plan-card:hover {
  border-color: rgba(79, 110, 247, 0.4);
}
.renew-modal .plan-card.selected {
  border-color: #4f6ef7;
  background: linear-gradient(135deg, #f5f8ff, #eef2ff);
}
.renew-modal .plan-badge {
  display: inline-block;
  font-size: 0.68rem;
  color: #6b7280;
  background: #f3f4f6;
  border-radius: 4px;
  padding: 1px 6px;
  margin-bottom: 6px;
}
.renew-modal .plan-card.selected .plan-badge {
  color: #4f6ef7;
  background: rgba(79, 110, 247, 0.1);
}
.renew-modal .plan-name {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 4px;
}
.renew-modal .plan-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: #c2720a;
  line-height: 1.2;
  margin-bottom: 8px;
}
.renew-modal .plan-price .unit {
  font-size: 0.8rem;
  margin-right: 1px;
}
.renew-modal .plan-price .suffix {
  font-size: 0.72rem;
  font-weight: 400;
  color: #9aa1ad;
}
.renew-modal .plan-features {
  list-style: none;
  margin: 0;
  padding: 0;
}
.renew-modal .plan-features li {
  font-size: 0.74rem;
  color: #666;
  line-height: 1.9;
}
.renew-modal .plan-features li i {
  color: #34d399;
  margin-right: 5px;
  font-size: 0.7rem;
}
.renew-modal .plan-check {
  display: none;
  position: absolute;
  top: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #4f6ef7;
  color: #fff;
  font-size: 0.6rem;
  align-items: center;
  justify-content: center;
}
.renew-modal .plan-card.selected .plan-check {
  display: flex;
}
.renew-modal .plan-ribbon {
  position: absolute;
  top: -2px;
  right: -2px;
  padding: 2px 10px;
  font-size: 0.68rem;
  color: #fff;
  border-radius: 0 12px 0 12px;
  background: linear-gradient(135deg, #c2720a, #eab308);
}
.renew-modal .renew-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 18px;
}
.renew-modal .years-stepper {
  display: flex;
  align-items: center;
  gap: 8px;
}
.renew-modal .stepper-label {
  font-size: 0.78rem;
  color: #6b7280;
  white-space: nowrap;
}
.renew-modal .stepper-ctrl {
  display: flex;
  align-items: center;
  border: 1px solid #e0e4ec;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.renew-modal .stepper-btn {
  width: 30px;
  height: 30px;
  border: none;
  background: #fff;
  color: #4f6ef7;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}
.renew-modal .stepper-btn:hover:not(:disabled) {
  background: #eef2ff;
}
.renew-modal .stepper-btn:disabled {
  color: #d1d5db;
  cursor: not-allowed;
}
.renew-modal .stepper-value {
  min-width: 52px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: #1a1a2e;
  line-height: 30px;
  border-left: 1px solid #eef0f5;
  border-right: 1px solid #eef0f5;
}
.renew-modal .actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.renew-modal .stepper-total {
  font-size: 0.95rem;
  font-weight: 700;
  color: #c2720a;
  white-space: nowrap;
}
.renew-modal .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 32px;
  border: 1px solid #e0e4ec;
  background: #fff;
  color: #6b7280;
  border-radius: 8px;
  padding: 0 20px;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.25s ease;
}
.renew-modal .btn-ghost:hover {
  border-color: #c4ccda;
  color: #374151;
}
.renew-modal .btn-pay {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 32px;
  border: none;
  border-radius: 8px;
  padding: 0 26px;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #4f6ef7, #6c5ce7);
  box-shadow: 0 4px 16px rgba(79, 110, 247, 0.25);
  transition: all 0.3s ease;
}
.renew-modal .btn-pay:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(79, 110, 247, 0.35);
}
.renew-modal .order-summary {
  margin: 16px 0 4px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #f8faff;
  font-size: 0.82rem;
  line-height: 1.45;
}
.renew-modal .order-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
  color: #6b7280;
}
.renew-modal .order-row strong {
  color: #1a1a2e;
}
.renew-modal .order-row .order-amount {
  color: #c2720a;
  font-size: 1.05rem;
}
.renew-modal .order-row em {
  font-style: normal;
  color: #6b7280;
  font-size: 0.78rem;
}
.renew-modal .qr-wrap {
  text-align: center;
  padding: 16px 0 6px;
}
.renew-modal .qr-box {
  display: inline-block;
  padding: 10px;
  background: #fff;
  border: 1px solid #e8ecf4;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  line-height: 0;
}
.renew-modal .qr-box img,
.renew-modal .qr-box canvas {
  display: block;
  width: 220px;
  height: 220px;
}
.renew-modal .qr-tip {
  margin: 10px 0 0;
  font-size: 0.78rem;
  color: #6b7280;
}
.renew-modal .qr-tip i {
  color: #22c55e;
  margin-right: 4px;
}
.renew-modal .pay-status {
  text-align: center;
  font-size: 0.78rem;
  color: #c2720a;
  padding: 8px 0 2px;
}
.renew-modal .pay-status i {
  margin-right: 5px;
}
/* 支付状态变体：由 renew.js 的 setPayStatus() 切换 */
.renew-modal .pay-status.is-success {
  color: #16a34a;
}
.renew-modal .pay-status.is-expired {
  color: #dc2626;
}
@media (max-width: 520px) {
  .renew-modal .plan-list {
    grid-template-columns: 1fr;
  }
}
