/* ===== 首页仪表盘（小清新薰衣草莫兰迪）===== */

.home{
  max-width: 1200px;
  margin: 0 auto;
  padding: 4px 2px 28px;
}

/* 问候横幅 */
.home-hero{
  background: linear-gradient(135deg, var(--brand-soft), #f4f1fa);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.hero-left{ flex: 1; min-width: 0; }
.hero-greet{
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .5px;
}
.hero-greet::after{
  content: "🌿";
  margin-left: 8px;
  font-size: 22px;
  vertical-align: middle;
}
.hero-daily{
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.hero-quote{
  font-size: 15px;
  color: var(--muted);
  font-weight: 500;
  padding: 8px 14px;
  background: rgba(255,255,255,.72);
  border-radius: 999px;
  border: 1px solid var(--line);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hero-daily-btn{
  border: none;
  background: rgba(255,255,255,.72);
  color: var(--brand-deep);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  transition: all .15s ease;
}
.hero-daily-btn:hover{
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

/* 每日寄语管理弹窗 */
.daily-edit{
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.daily-edit:focus{
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(139,124,180,.15);
}
textarea.daily-edit{ min-height: 84px; resize: vertical; line-height: 1.6; }
.daily-mgr{ padding: 2px 0; }
.daily-mgr-add{
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}
.daily-mgr-add .daily-edit{ flex: 1; }
.daily-mgr .hint{ margin: 4px 0 10px; color: var(--muted); font-size: 13px; }
.daily-mgr-list{
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 46vh;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.daily-mgr-item{
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
}
.daily-mgr-item:last-child{ border-bottom: none; }
.daily-mgr-idx{
  flex-shrink: 0;
  min-width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--brand-deep);
  border-radius: 50%;
}
.daily-mgr-text{
  flex: 1;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.5;
  word-break: break-word;
}
.daily-mgr-item .todo-del{
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  font-size: 16px;
}
.hero-right{ flex-shrink: 0; }
.hero-date-card{
  background: rgba(255,255,255,.78);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 22px;
  text-align: center;
  min-width: 132px;
  box-shadow: 0 2px 10px rgba(139,124,180,.08);
}
.hero-date-week{
  font-size: 13px;
  color: var(--brand-deep);
  font-weight: 700;
  margin-bottom: 4px;
}
.hero-date-text{
  font-size: 15px;
  color: var(--ink);
  font-weight: 700;
  margin-bottom: 2px;
}
.hero-date-weekday{
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

/* 统计卡片 */
.home-stats{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
  margin-bottom: 20px;
}
.stat-card{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  position: relative;
  overflow: hidden;
}
.stat-card::before{
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--brand);
}
.stat-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139,124,180,.16);
  border-color: var(--brand);
}
.stat-card.alert-3::before{ background: #c08b7e; }
.stat-card.alert-2::before{ background: #c9a86a; }
.stat-card.todo::before{ background: var(--brand-deep); }
.stat-label{
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}
.stat-num{
  font-size: 38px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.1;
  margin: 6px 0 4px;
}
.stat-card.alert-3 .stat-num{ color: #b9746a; }
.stat-card.alert-2 .stat-num{ color: #b08f4e; }
.stat-card.todo .stat-num{ color: var(--brand-deep); }
.stat-sub{
  font-size: 12px;
  color: var(--muted);
}

/* 今日待办区域 */
.home-today-sec{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px 24px;
  box-shadow: var(--shadow);
}
.today-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.today-title{
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.today-range-box{
  display: flex;
  align-items: center;
  gap: 8px;
}
.today-range{
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  min-width: 110px;
  text-align: center;
}
.today-link{
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 8px;
}
.arrow{
  font-size: 18px;
  padding: 2px 8px;
  line-height: 1;
}

/* 星期条 */
.week-strip{
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
}
.week-day{
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: all .15s ease;
  position: relative;
}
.week-day:hover{
  border-color: var(--brand);
  box-shadow: 0 2px 10px rgba(139,124,180,.12);
}
.week-day.active{
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 4px 14px rgba(139,124,180,.32);
}
.week-day.active .week-day-name,
.week-day.active .week-day-num{ color: #fff; }
.week-day-name{
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.week-day-num{
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}
.day-badge{
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: #e07070;
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.week-day.active .day-badge{ background: #fff; color: var(--brand); }

/* 日详情 */
.day-sections{
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.day-card{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px 18px;
}
.day-card-title{
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 14px;
}
.day-count{
  margin-left: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-deep);
  background: var(--brand-soft);
  padding: 3px 10px;
  border-radius: 999px;
}
.day-empty{
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 20px 0;
}

/* 辅导预约列表 */
.day-apt-list{
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.day-apt-item{
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #faf9fc;
  border: 1px solid var(--line);
  transition: background .15s ease;
}
.day-apt-item:hover{ background: var(--brand-soft); }
.day-apt-dot{
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  margin-top: 7px;
  flex-shrink: 0;
}
.day-apt-main{
  flex: 1;
  min-width: 0;
}
.day-apt-top{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}
.day-apt-time{
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-deep);
  background: var(--brand-soft);
  padding: 2px 8px;
  border-radius: 6px;
}
.day-apt-name{
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.day-apt-meta{
  font-size: 13px;
  color: var(--muted);
}
.day-apt-note{
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 2px;
}
.day-apt-btn{
  flex-shrink: 0;
  margin-top: 2px;
}

/* 待办 */
.todo-add{
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.todo-add input{
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  background: #fff;
  color: var(--ink);
}
.todo-add input:focus{ outline: none; border-color: var(--brand); }
.todo-list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.todo-item{
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
.todo-item.done .todo-text{
  text-decoration: line-through;
  color: var(--muted);
}
.todo-check{
  display: flex;
  align-items: center;
  cursor: pointer;
}
.todo-check input{ display: none; }
.todo-box{
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  display: inline-block;
  position: relative;
  transition: all .15s ease;
}
.todo-check input:checked + .todo-box{
  background: var(--brand);
  border-color: var(--brand);
}
.todo-check input:checked + .todo-box::after{
  content: "";
  position: absolute;
  left: 5px; top: 1px;
  width: 5px; height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.todo-text{
  flex: 1;
  font-size: 14px;
  color: var(--ink);
}
.todo-del{
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
}
.todo-del:hover{ background: #f3e9ef; color: #c08b7e; }
.todo-empty{
  list-style: none;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 14px 0;
}

/* 小按钮 */
.btn.sm{
  padding: 5px 12px;
  font-size: 13px;
  border-radius: 8px;
}

/* 移动端 */
@media (max-width: 720px){
  .home-stats{ grid-template-columns: repeat(2, 1fr); }
  .hero-greet{ font-size: 20px; }
  .stat-num{ font-size: 32px; }
  .home-hero{ padding: 22px 20px; }
  .today-header{ flex-direction: column; align-items: flex-start; gap: 10px; }
  .week-day{ padding: 8px 2px; }
  .week-day-name{ font-size: 11px; }
  .week-day-num{ font-size: 15px; }
  .day-apt-top{ flex-direction: column; align-items: flex-start; gap: 4px; }
  .day-apt-btn{ margin-top: 6px; }
}

/* 危机跟进提醒（首页日历 + 待办） */
.day-badge.crisis{
  top: auto;
  bottom: 4px;
  right: 4px;
  background: #c98a86;
}
.week-day.active .day-badge.crisis{ background: #fff; color: var(--brand-deep); }

.x-remind-card{ border-left: 3px solid #c98a86; }
.x-remind-list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.x-remind-item{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 10px;
  background: #fbf3f2;
  border: 1px solid #ecd9d6;
  transition: background .15s ease;
}
.x-remind-item:hover{ background: #f6e7e5; }
.x-remind-item.overdue{ background: #f7e3e1; border-color: #e0b4ae; }
.x-remind-dot{
  width: 10px; height: 10px; border-radius: 50%;
  flex-shrink: 0; margin-top: 2px;
}
.x-remind-main{ flex: 1; min-width: 0; }
.x-remind-top{
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 4px;
}
.x-remind-tag{
  font-size: 12px; font-weight: 700; color: #fff;
  padding: 2px 9px; border-radius: 6px;
}
.x-remind-name{ font-size: 15px; font-weight: 700; color: var(--ink); }
.x-remind-meta{ font-size: 13px; color: var(--muted); }
.x-remind-sub{ font-size: 13px; color: var(--muted); line-height: 1.5; }
.x-remind-sub b{ color: #b9746a; }
.x-remind-item.overdue .x-remind-sub b{ color: #c0504a; }
.x-remind-btn{ flex-shrink: 0; }

.x-remind-block{
  background: #faf7fb;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.x-remind-block-title{
  font-size: 14px; font-weight: 700; color: var(--ink);
  display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px;
}
.x-remind-block-sub{
  font-size: 12px; font-weight: 600; color: #b9746a;
  background: #f6e7e5; padding: 2px 10px; border-radius: 999px;
}
.x-remind-empty{
  color: var(--muted); font-size: 13px; text-align: center; padding: 16px 0;
}

/* 危机跟进提醒 移动端适配 */
@media (max-width: 720px){
  .x-remind-item{ flex-wrap: wrap; }
  .x-remind-btn{ margin-left: auto; }
}
