/**
 * 续保页专用样式（xubao.html）
 *
 * 布局壳层与今日/增员/获客统一：recruit-app + recruit-mobile.css + recruit-head/scroll
 * 本文件仅保留续保业务组件（Tab、日历、卡片等）
 */
/* —— 桌面预览回退（无 recruit-app 时） —— */
body:not(.recruit-app) #renewal-phone {
  display: flex;
  flex-direction: column;
  height: 760px;
  max-height: calc(100vh - 68px);
  overflow: hidden;
}

body:not(.recruit-app) #renewal-phone .scr {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 12px 18px 88px;
}

#renewal-phone .tab {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin-top: 0;
  z-index: 4;
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

#renewal-phone .fab {
  bottom: 78px;
  z-index: 5;
}

/* —— 列表 / 日历 Tab —— */
.view-tabs {
  display: flex;
  gap: 8px;
  margin: 14px 0 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 4px;
}

.view-tab {
  flex: 1;
  border: 0;
  background: transparent;
  border-radius: 11px;
  padding: 9px 8px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

.view-tab.on {
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(38, 48, 58, .08);
}

.view-tab i {
  font-size: 15px;
}

.hidden {
  display: none !important;
}

/* —— 卡片评估因子 —— */
.eval-factor {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.4;
  padding: 6px 8px;
  background: var(--surface);
  border-radius: 8px;
  border-left: 3px solid var(--teal);
}

/* —— 安安建议 —— */
.ai-tip {
  display: block;
  width: 100%;
  text-align: left;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(58, 142, 122, .25);
  border-radius: 12px;
  background: linear-gradient(135deg, #F0FAF7, #F8FBFF);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}

.ai-tip:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(58, 142, 122, .12);
}

.ai-tip-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: .04em;
}

.ai-tip-text {
  display: block;
  font-size: 12px;
  line-height: 1.55;
  color: #3A454E;
  margin-top: 6px;
}

.ai-tip-more {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  font-size: 11px;
  color: var(--teal);
  margin-top: 8px;
  font-weight: 600;
}

/* —— 日历 —— */
.cal-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 12px 12px;
  margin-bottom: 4px;
}

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.cal-title {
  font-size: 15px;
  font-weight: 600;
  font-family: var(--serif);
}

.cal-nav {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}

.cal-legend {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.cal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brick);
  flex: none;
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-day {
  aspect-ratio: 1;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  position: relative;
  padding: 4px 0;
}

.cal-day.other {
  color: #C8CCD4;
  background: transparent;
  cursor: default;
}

.cal-day.today {
  border-color: var(--peri);
  background: #EEF0FB;
  font-weight: 600;
}

.cal-day.selected {
  border-color: var(--brick);
  background: var(--rose-fill);
  font-weight: 600;
}

.cal-day.has-renewal .cal-mark {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brick);
}

.cal-day.other .cal-mark {
  display: none;
}

/* —— 流失风险温度计 —— */
.risk-gauge {
  margin: 10px 0;
  padding: 12px;
  background: linear-gradient(135deg, #FAFBFF, #F4F7FC);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.risk-gauge.compact {
  padding: 10px;
  margin: 8px 0;
}

.risk-gauge-main {
  display: flex;
  gap: 12px;
  align-items: center;
}

.risk-ring-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  flex: none;
}

.risk-ring-wrap.small {
  width: 56px;
  height: 56px;
}

.risk-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.risk-ring-bg {
  fill: none;
  stroke: var(--line);
  stroke-width: 6;
}

.risk-ring-fill {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset .25s, stroke .25s;
}

.risk-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.risk-pct {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  font-family: var(--serif);
}

.risk-pct small {
  font-size: 11px;
  font-weight: 600;
}

.risk-lbl {
  font-size: 10px;
  font-weight: 700;
  margin-top: 2px;
}

.risk-side {
  flex: 1;
  min-width: 0;
}

.risk-title {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.risk-meta {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 8px;
}

.risk-thermo {
  margin-top: 4px;
}

.risk-thermo-track {
  height: 8px;
  border-radius: 999px;
  background: var(--surface);
  overflow: hidden;
  border: 1px solid var(--line);
}

.risk-thermo-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 1.1s cubic-bezier(.22, 1, .36, 1), background .4s;
}

.risk-thermo-labels {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--muted);
  margin-top: 3px;
}

.risk-action {
  width: 100%;
  margin-top: 10px;
  font-size: 12px;
}

.risk-done {
  margin-top: 10px;
  font-size: 11px;
  color: var(--teal);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
  padding: 8px;
  background: #EEF8F4;
  border-radius: 10px;
}

.risk-toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  z-index: 1300;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s;
  box-shadow: 0 10px 30px rgba(38, 48, 58, .25);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.risk-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.risk-xp {
  color: #7FD7C4;
  font-size: 12px;
}

.list-load-more {
  text-align: center;
  padding: 14px 8px 18px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.list-load-more i {
  display: block;
  font-size: 20px;
  margin-bottom: 6px;
  color: var(--teal);
  animation: renewal-list-bounce 1.4s ease-in-out infinite;
}

.list-end-hint {
  text-align: center;
  padding: 12px 8px 16px;
  font-size: 11px;
  color: var(--muted);
}

@keyframes renewal-list-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}
