/* ========================================
   彩虹督学 - 主样式表
   温馨励志的儿童学习计划系统
   ======================================== */

/* === 字体导入 === */
@import url('https://fonts.googleapis.com/css2?family=ZCOOL+KuaiLe&family=Nunito:wght@400;600;700;800&family=Quicksand:wght@400;500;600;700&display=swap');

/* === 全局变量 === */
:root {
  --rainbow-1: #FF6B9D;
  --rainbow-2: #C44569;
  --rainbow-3: #F8B500;
  --rainbow-4: #4ECDC4;
  --rainbow-5: #6C5CE7;
  --rainbow-6: #A29BFE;
  --bg-main: #FFF5F7;
  --bg-card: #FFFFFF;
  --text-main: #2D3436;
  --text-muted: #636E72;
  --text-light: #B2BEC3;
  --border-light: #FFE0EC;
  --shadow-soft: 0 4px 20px rgba(255, 107, 157, 0.1);
  --shadow-medium: 0 8px 30px rgba(108, 92, 231, 0.15);
  --shadow-hover: 0 12px 40px rgba(255, 107, 157, 0.2);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
}

/* === 重置 === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Quicksand', 'Nunito', sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* === 登录页样式 === */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #FF6B9D 0%, #C44569 25%, #F8B500 50%, #4ECDC4 75%, #6C5CE7 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  position: relative;
  overflow: hidden;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* 浮动云朵装饰 */
.login-page::before,
.login-page::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.4;
}

.login-page::before {
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.6);
  top: 10%;
  left: -50px;
  animation: float 8s ease-in-out infinite;
}

.login-page::after {
  width: 400px;
  height: 400px;
  background: rgba(255, 255, 255, 0.3);
  bottom: 5%;
  right: -80px;
  animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}

/* 浮动星星 */
.star-decoration {
  position: absolute;
  color: rgba(255, 255, 255, 0.8);
  font-size: 24px;
  animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

.login-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  padding: 50px 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  width: 420px;
  max-width: 90vw;
  position: relative;
  z-index: 10;
  animation: cardEntry 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cardEntry {
  from { opacity: 0; transform: translateY(40px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-logo {
  text-align: center;
  margin-bottom: 30px;
}

.login-logo .rainbow-icon {
  font-size: 64px;
  display: inline-block;
  animation: bounce 2s ease-in-out infinite;
}

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

.login-logo h1 {
  font-family: 'ZCOOL KuaiLe', sans-serif;
  font-size: 36px;
  background: linear-gradient(135deg, #FF6B9D, #F8B500, #4ECDC4, #6C5CE7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-top: 10px;
}

.login-logo p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 8px;
  font-weight: 500;
}

/* 登录表单切换 */
.form-tabs {
  display: flex;
  background: #FFF0F5;
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 30px;
}

.form-tab {
  flex: 1;
  text-align: center;
  padding: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.form-tab.active {
  background: white;
  color: var(--rainbow-1);
  box-shadow: 0 2px 8px rgba(255, 107, 157, 0.2);
}

/* 输入框 */
.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  margin-left: 4px;
}

.input-group input {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-family: inherit;
  background: #FAFAFE;
  color: var(--text-main);
  transition: all 0.3s ease;
  outline: none;
}

.input-group input:focus {
  border-color: var(--rainbow-1);
  background: white;
  box-shadow: 0 0 0 4px rgba(255, 107, 157, 0.1);
}

.btn-login {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #FF6B9D, #C44569);
  color: white;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 107, 157, 0.4);
  margin-top: 10px;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 107, 157, 0.5);
}

.btn-login:active {
  transform: translateY(0);
}

.login-error {
  color: #E84393;
  font-size: 13px;
  text-align: center;
  margin-top: 15px;
  min-height: 20px;
  font-weight: 600;
}

/* === 主界面样式 === */
.main-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 顶部导航栏 */
.navbar {
  background: white;
  box-shadow: var(--shadow-soft);
  padding: 0 30px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1300;
  gap: 16px;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.navbar-logo {
  font-size: 28px;
}

.navbar-title {
  font-family: 'ZCOOL KuaiLe', sans-serif;
  font-size: 24px;
  background: linear-gradient(135deg, #FF6B9D, #F8B500, #4ECDC4, #6C5CE7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-quote {
  flex: 1;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--rainbow-2);
  font-style: italic;
  max-width: 500px;
  padding: 0 20px;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.navbar-user-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.navbar-actions:empty {
  display: none;
}

.btn-navbar-menu {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(196, 69, 105, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 24px rgba(196, 69, 105, 0.12);
  backdrop-filter: blur(16px);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  transition: all 0.25s ease;
}

.btn-navbar-menu span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: var(--rainbow-2);
  transition: all 0.25s ease;
}

.btn-navbar-menu:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(196, 69, 105, 0.18);
}

.btn-navbar-menu.active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.btn-navbar-menu.active span:nth-child(2) {
  opacity: 0;
}

.btn-navbar-menu.active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.navbar-actions-overlay {
  display: none;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #FFF0F5, #F0E6FF);
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 14px;
  color: var(--rainbow-2);
}

.user-badge-button {
  border: none;
  cursor: pointer;
  font-family: inherit;
  max-width: min(280px, calc(100vw - 24px));
}

#user-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-badge-caret {
  font-size: 11px;
  color: var(--text-muted);
}

.navbar-user-dropdown {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  left: auto;
  min-width: 180px;
  max-width: calc(100vw - 24px);
  padding: 8px;
  border-radius: 18px;
  background: #FFFFFF;
  border: 1px solid rgba(196, 69, 105, 0.12);
  box-shadow: 0 18px 40px rgba(108, 92, 231, 0.14);
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 1350;
}

.user-dropdown-menu.show {
  display: flex;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: none;
  background: transparent;
  border-radius: 14px;
  padding: 10px 12px;
  text-align: left;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
}

.user-dropdown-item:hover {
  background: #FFF5F7;
  color: var(--rainbow-2);
}

.user-dropdown-danger {
  color: #E17055;
}

.settings-section-label {
  margin-top: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF6B9D, #6C5CE7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 16px;
}

.btn-logout {
  border: 2px solid var(--border-light);
  background: white;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.btn-logout:hover {
  background: #FFF5F7;
  color: var(--rainbow-1);
  border-color: var(--rainbow-1);
}

/* 主内容区 */
.content-area {
  flex: 1;
  display: flex;
  gap: 24px;
  padding: 24px 30px;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

/* === 左侧日历 === */
.calendar-panel {
  width: 380px;
  flex-shrink: 0;
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-soft);
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.calendar-title {
  font-family: 'ZCOOL KuaiLe', sans-serif;
  font-size: 20px;
  color: var(--text-main);
}

.btn-calendar-nav {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #FFF0F5;
  color: var(--rainbow-1);
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.btn-calendar-nav:hover {
  background: var(--rainbow-1);
  color: white;
  transform: scale(1.1);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}

.calendar-weekday {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-light);
  padding: 8px 0;
}

.calendar-weekday.weekend {
  color: var(--rainbow-1);
}

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

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  transition: all 0.2s ease;
  position: relative;
  background: #FAFAFE;
}

.calendar-day:hover {
  background: #FFF0F5;
  transform: scale(1.05);
}

.calendar-day.other-month {
  color: var(--text-light);
  opacity: 0.4;
}

.calendar-day.today {
  background: linear-gradient(135deg, #FF6B9D, #C44569);
  color: white;
  font-weight: 700;
}

.calendar-day.selected {
  background: linear-gradient(135deg, #4ECDC4, #44A39E);
  color: white;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(78, 205, 196, 0.4);
}

.calendar-day .day-dot {
  position: absolute;
  bottom: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rainbow-3);
}

.calendar-day.today .day-dot,
.calendar-day.selected .day-dot {
  background: white;
}

.calendar-day .day-completed {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 10px;
}

/* === 右侧面板 === */
.plans-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

/* 视图切换 */
.view-switcher {
  display: flex;
  gap: 8px;
  background: white;
  padding: 6px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  width: fit-content;
}

.view-tab {
  padding: 10px 24px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-muted);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.view-tab.active {
  background: linear-gradient(135deg, #FF6B9D, #C44569);
  color: white;
  box-shadow: 0 2px 8px rgba(255, 107, 157, 0.3);
}

/* 计划列表 */
.plans-list-container {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-soft);
  flex: 1;
}

.plans-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.plans-list-title {
  font-family: 'ZCOOL KuaiLe', sans-serif;
  font-size: 22px;
  color: var(--text-main);
}

.plans-list-title .date-badge {
  font-size: 14px;
  font-family: 'Quicksand', sans-serif;
  font-weight: 600;
  color: var(--rainbow-1);
  background: #FFF0F5;
  padding: 4px 12px;
  border-radius: 12px;
  margin-left: 8px;
}

.plans-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn-action {
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  justify-content: center;
}

.btn-add {
  background: linear-gradient(135deg, #4ECDC4, #44A39E);
  color: white;
  box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
}

.btn-add:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(78, 205, 196, 0.4);
}

.btn-print {
  background: linear-gradient(135deg, #6C5CE7, #5A4BD1);
  color: white;
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

.btn-print:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(108, 92, 231, 0.4);
}

/* 计划项卡片 */
.plan-card {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  background: #FAFAFE;
  border-left: 4px solid var(--rainbow-1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.plan-card:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-soft);
}

.plan-card.completed {
  background: linear-gradient(135deg, #E8F8F5, #F0FFF4);
  border-left-color: #00B894;
}

.plan-card.completed .plan-title {
  text-decoration: line-through;
  color: var(--text-light);
}

.plan-icon {
  font-size: 28px;
  margin-right: 16px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: white;
  flex-shrink: 0;
}

.plan-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.plan-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.plan-time {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.plan-time .time-badge {
  background: var(--border-light);
  padding: 2px 8px;
  border-radius: 8px;
  color: var(--rainbow-2);
}

.plan-type-tag {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 10px;
  font-weight: 600;
}

.plan-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 完成按钮 */
.btn-complete {
  width: 40px;
  height: 40px;
  border: 2px solid var(--border-light);
  border-radius: 50%;
  background: white;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: var(--text-light);
}

.btn-complete:hover {
  border-color: #00B894;
  color: #00B894;
  transform: scale(1.1);
}

.btn-complete.completed {
  background: #00B894;
  border-color: #00B894;
  color: white;
}

.btn-edit {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #D6D6F7;
  background: white;
  color: #6C5CE7;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}

.btn-edit:hover {
  background: #6C5CE7;
  border-color: #6C5CE7;
  color: white;
}

.btn-delete {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #FFF5F5;
  color: #E84393;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  opacity: 0;
}

.plan-card:hover .btn-delete {
  opacity: 1;
}

.btn-delete:hover {
  background: #E84393;
  color: white;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}

.empty-state .empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  display: block;
  animation: bounce 2s ease-in-out infinite;
}

.empty-state p {
  font-size: 16px;
  font-weight: 600;
}

/* === 模态框 === */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 520px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalEntry 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalEntry {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.modal-title {
  font-family: 'ZCOOL KuaiLe', sans-serif;
  font-size: 24px;
  color: var(--text-main);
}

.modal-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #FFF0F5;
  color: var(--rainbow-1);
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: var(--rainbow-1);
  color: white;
  transform: rotate(90deg);
}

/* 表单 */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.field-label-with-tip {
  display: flex !important;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.field-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(108, 92, 231, 0.12);
  color: var(--rainbow-4);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  cursor: help;
  user-select: none;
  outline: none;
}

.field-tip:hover,
.field-tip:focus-visible {
  background: rgba(108, 92, 231, 0.2);
}

.field-tip-bubble {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: min(260px, calc(100vw - 48px));
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(43, 47, 67, 0.96);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
  box-shadow: 0 12px 32px rgba(43, 47, 67, 0.28);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 10;
}

.field-tip-bubble::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  width: 12px;
  height: 12px;
  background: rgba(43, 47, 67, 0.96);
  transform: translateX(-50%) rotate(45deg);
}

.field-tip:hover .field-tip-bubble,
.field-tip:focus-visible .field-tip-bubble,
.field-tip:active .field-tip-bubble {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.switch-toggle {
  display: inline-flex !important;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(196, 69, 105, 0.12);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 246, 250, 0.92));
  box-shadow: 0 10px 24px rgba(196, 69, 105, 0.08);
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.switch-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(196, 69, 105, 0.24);
  box-shadow: 0 14px 28px rgba(196, 69, 105, 0.12);
}

.switch-toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.switch-toggle-slider {
  position: relative;
  width: 52px;
  height: 30px;
  flex: 0 0 52px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(183, 192, 214, 0.95), rgba(155, 167, 193, 0.92));
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.12);
  transition: background 0.22s ease, box-shadow 0.22s ease;
}

.switch-toggle-slider::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, #FFFFFF, #F9F4FF);
  box-shadow: 0 4px 10px rgba(60, 57, 92, 0.18);
  transition: transform 0.22s ease;
}

.switch-toggle-text {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.switch-toggle input:checked + .switch-toggle-slider {
  background: linear-gradient(135deg, #FF7FAE, #C44569);
  box-shadow: inset 0 2px 6px rgba(196, 69, 105, 0.28), 0 8px 18px rgba(196, 69, 105, 0.18);
}

.switch-toggle input:checked + .switch-toggle-slider::after {
  transform: translateX(22px);
}

.switch-toggle input:focus-visible + .switch-toggle-slider {
  outline: 3px solid rgba(108, 92, 231, 0.18);
  outline-offset: 3px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-family: inherit;
  background: #FAFAFE;
  color: var(--text-main);
  transition: all 0.3s ease;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--rainbow-1);
  background: white;
  box-shadow: 0 0 0 4px rgba(255, 107, 157, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-row .form-group {
  flex: 1;
}

/* 计划类型选择器 */
.type-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.type-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.type-option:hover {
  border-color: var(--rainbow-1);
  background: #FFF0F5;
}

.type-option.selected {
  border-color: var(--rainbow-1);
  background: #FFF0F5;
  color: var(--rainbow-1);
}

.type-option .type-icon {
  font-size: 24px;
  margin-bottom: 4px;
}

.btn-submit {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #FF6B9D, #C44569);
  color: white;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 107, 157, 0.4);
  margin-top: 10px;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 107, 157, 0.5);
}

/* === 每周甘特图视图 === */
.gantt-container {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-soft);
  flex: 1;
  overflow-x: auto;
}

.gantt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.gantt-title {
  font-family: 'ZCOOL KuaiLe', sans-serif;
  font-size: 22px;
}

.gantt-week-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gantt-week-label {
  font-weight: 700;
  font-size: 15px;
  color: var(--rainbow-2);
}

/* 7天卡片网格 */
.gantt-week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  min-width: 1000px;
}

/* 每天卡片 */
.gantt-day-card {
  background: #FAFAFE;
  border-radius: var(--radius-md);
  padding: 12px 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gantt-day-card:hover {
  background: #FFF5F7;
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.gantt-day-card.today {
  background: linear-gradient(135deg, #FFF0F5, #F0E6FF);
  border-color: var(--rainbow-1);
}

.gantt-day-card.selected {
  border-color: var(--rainbow-4);
  box-shadow: 0 0 0 2px rgba(78, 205, 196, 0.3);
}

/* 卡片头部 */
.gantt-day-card-header {
  text-align: center;
  position: relative;
}

.gantt-day-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.gantt-day-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--rainbow-2);
  line-height: 1.2;
}

.gantt-day-num.today-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--rainbow-1);
  color: white;
  border-radius: 50%;
  font-size: 18px;
}

.gantt-day-date {
  font-size: 10px;
  color: var(--text-light);
  margin-top: 2px;
}

.gantt-day-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--rainbow-4);
  background: rgba(78, 205, 196, 0.15);
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 4px;
  display: inline-block;
}

/* 完成进度条 */
.gantt-day-progress {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gantt-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
}

.gantt-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00B894, #4ECDC4);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.gantt-progress-text {
  font-size: 10px;
  font-weight: 700;
  color: #00B894;
  white-space: nowrap;
}

/* 时间轴区域 */
.gantt-timeline {
  position: relative;
  margin-top: 4px;
}

.gantt-time-marks {
  position: relative;
  height: 16px;
  margin-bottom: 4px;
  border-bottom: 1px dashed var(--border-light);
}

.gantt-time-mark {
  position: absolute;
  font-size: 9px;
  color: var(--text-light);
  transform: translateX(-50%);
  white-space: nowrap;
}

.gantt-bars-area {
  position: relative;
  min-height: 32px;
}

/* 任务条 */
.gantt-task-bar {
  position: absolute;
  height: 28px;
  border-radius: 6px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.gantt-task-bar:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  z-index: 10;
}

.gantt-task-bar.completed {
  opacity: 0.65;
}

.gantt-task-bar.completed .gantt-bar-text {
  text-decoration: line-through;
}

.gantt-bar-icon {
  font-size: 13px;
  flex-shrink: 0;
}

.gantt-bar-text {
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.gantt-bar-time {
  font-size: 9px;
  opacity: 0.9;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.25);
  padding: 1px 4px;
  border-radius: 4px;
}

.gantt-bar-check {
  font-size: 12px;
  flex-shrink: 0;
  font-weight: 800;
}

/* 查看详情按钮 */
.btn-gantt-detail {
  width: 100%;
  padding: 8px;
  border: none;
  border-radius: var(--radius-sm);
  background: rgba(108, 92, 231, 0.1);
  color: var(--rainbow-5);
  font-family: inherit;
  font-weight: 600;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-gantt-detail:hover {
  background: var(--rainbow-5);
  color: white;
}

/* 空状态 */
.gantt-day-empty {
  text-align: center;
  font-size: 12px;
  color: var(--text-light);
  padding: 20px 0;
}

/* === 每月视图 === */
.month-container {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-soft);
  flex: 1;
}

.month-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.month-title {
  font-family: 'ZCOOL KuaiLe', sans-serif;
  font-size: 22px;
}

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

.month-day-card {
  min-height: 100px;
  border-radius: var(--radius-md);
  padding: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.month-day-card:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-soft);
}

.month-day-card .day-num {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.month-day-card.has-plans {
  background: linear-gradient(135deg, #FFF5F7, #F0E6FF);
}

.month-day-card.no-plans {
  background: #FAFAFE;
}

.month-day-card.today {
  border: 2px solid var(--rainbow-1);
}

.month-day-card.other-month {
  opacity: 0.3;
}

.month-day-card .plan-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-top: 4px;
}

.month-day-card .plan-icon-small {
  font-size: 16px;
}

.month-day-card .completion-rate {
  margin-top: auto;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.month-day-card .completion-bar {
  flex: 1;
  height: 4px;
  background: var(--border-light);
  border-radius: 2px;
  overflow: hidden;
}

.month-day-card .completion-fill {
  height: 100%;
  background: linear-gradient(90deg, #00B894, #4ECDC4);
  border-radius: 2px;
  transition: width 0.5s ease;
}

/* === 统计卡片 === */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-soft);
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-medium);
}

.stat-card .stat-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--rainbow-1);
}

.stat-card .stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 4px;
}

/* === Toast 通知 === */
.toast {
  position: fixed;
  top: 80px;
  right: 30px;
  padding: 16px 24px;
  border-radius: var(--radius-md);
  color: white;
  font-weight: 600;
  font-size: 14px;
  z-index: 4000;
  animation: toastSlide 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast.success {
  background: linear-gradient(135deg, #00B894, #00CEC9);
}

.toast.error {
  background: linear-gradient(135deg, #E84393, #D63031);
}

.toast.info {
  background: linear-gradient(135deg, #6C5CE7, #A29BFE);
}

@keyframes toastSlide {
  from { transform: translateX(400px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.fade-out {
  animation: toastFade 0.3s ease forwards;
}

@keyframes toastFade {
  to { transform: translateX(400px); opacity: 0; }
}

/* === 评分、点赞、评论交互 === */

.plan-interactions {
  margin-top: 8px;
}

.interaction-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.rating-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.interaction-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.stars {
  display: flex;
  gap: 2px;
}

.star {
  font-size: 18px;
  color: #DDD;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.star:hover {
  transform: scale(1.2);
  color: #FFD93D;
}

.star.active {
  color: #FFD93D;
  text-shadow: 0 0 4px rgba(255, 217, 61, 0.5);
}

.rating-current {
  font-size: 12px;
  font-weight: 600;
  color: var(--rainbow-2);
  background: #FFF0F5;
  padding: 2px 8px;
  border-radius: 8px;
}

.like-group {
  display: flex;
  align-items: center;
}

.btn-like {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 2px solid var(--border-light);
  background: white;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.btn-like:hover {
  border-color: var(--rainbow-1);
  transform: scale(1.05);
}

.btn-like.liked {
  border-color: #FF6B9D;
  background: linear-gradient(135deg, #FFF0F5, #FFE0EC);
  color: var(--rainbow-1);
  animation: likePop 0.4s ease;
}

@keyframes likePop {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.btn-like .like-icon {
  font-size: 16px;
}

.btn-like .like-count {
  font-size: 13px;
  min-width: 16px;
}

.btn-comment-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 2px solid var(--border-light);
  background: white;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.btn-comment-toggle:hover {
  border-color: var(--rainbow-5);
  color: var(--rainbow-5);
  transform: scale(1.05);
}

.comment-section {
  margin-top: 8px;
  padding: 12px;
  background: #FAFAFE;
  border-radius: var(--radius-md);
  animation: fadeIn 0.3s ease;
}

.comment-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.comment-input {
  flex: 1;
  padding: 8px 12px;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: all 0.3s ease;
}

.comment-input:focus {
  border-color: var(--rainbow-5);
  background: white;
}

.btn-comment-send {
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #6C5CE7, #5A4BD1);
  color: white;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-comment-send:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(108, 92, 231, 0.3);
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
}

.comment-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: white;
  border-radius: var(--radius-sm);
  font-size: 13px;
  flex-wrap: wrap;
}

.comment-user {
  font-weight: 700;
  color: var(--rainbow-5);
  font-size: 12px;
}

.comment-text {
  flex: 1;
  color: var(--text-main);
  min-width: 0;
  word-break: break-word;
}

.comment-time {
  font-size: 11px;
  color: var(--text-light);
}

.comment-delete {
  border: none;
  background: transparent;
  color: var(--text-light);
  cursor: pointer;
  font-size: 12px;
  transition: color 0.3s ease;
}

.comment-delete:hover {
  color: #E84393;
}

/* === 设置按钮 === */

.btn-settings {
  border: 2px solid var(--border-light);
  background: white;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-muted);
  transition: all 0.3s ease;
  align-items: center;
  gap: 4px;
}

.btn-settings:hover {
  background: linear-gradient(135deg, #F0E6FF, #FFF0F5);
  color: var(--rainbow-5);
  border-color: var(--rainbow-5);
  transform: rotate(45deg);
}

/* === 设置页面 Tab === */

.settings-tabs {
  display: flex;
  gap: 4px;
  background: #FAFAFE;
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.settings-tab {
  flex: 1;
  text-align: center;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-muted);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.settings-tab.active {
  background: white;
  color: var(--rainbow-5);
  box-shadow: 0 2px 8px rgba(108, 92, 231, 0.15);
}

.settings-panel {
  display: none;
}

.settings-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.daily-template-add {
  display: grid;
  grid-template-columns: minmax(180px, 1.6fr) minmax(120px, 1fr) repeat(2, minmax(110px, 0.9fr)) minmax(90px, 0.7fr) auto;
  gap: 8px;
  align-items: center;
}

.daily-template-manager-list {
  display: grid;
  gap: 12px;
}

.daily-template-row {
  border: 1px solid #F1E7F3;
  background: linear-gradient(180deg, #FFFCFE, #FFF7FB);
  border-radius: 18px;
  padding: 14px;
}

.daily-template-row.disabled {
  opacity: 0.6;
}

.daily-template-row-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.daily-template-row-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.daily-template-row-actions {
  display: flex;
  gap: 8px;
}

.daily-template-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(120px, 1fr) repeat(2, minmax(110px, 0.8fr)) minmax(90px, 0.6fr) minmax(72px, 0.5fr);
  gap: 8px;
  margin-bottom: 8px;
}

.daily-template-row textarea {
  min-height: 68px;
}

/* === AI生成计划模态框 === */

.ai-type-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.ai-type-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 8px;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.ai-type-option:hover {
  border-color: var(--rainbow-5);
  background: #F0E6FF;
}

.ai-type-option.selected {
  border-color: var(--rainbow-5);
  background: #F0E6FF;
}

.ai-type-icon {
  font-size: 32px;
  margin-bottom: 6px;
}

.ai-type-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.ai-type-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* === 拍照上传 === */

.photo-upload-area {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-md);
  padding: 30px;
  text-align: center;
  transition: all 0.3s ease;
}

.photo-upload-area:hover {
  border-color: var(--rainbow-5);
  background: #FAFAFE;
}

.photo-placeholder {
  cursor: pointer;
}

.photo-placeholder p {
  margin-top: 8px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 14px;
}

/* === 用户管理 === */

.user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: #FAFAFE;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.user-row:hover {
  background: #FFF5F7;
}

.user-row-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-row-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF6B9D, #6C5CE7);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.user-row-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-main);
}

.user-row-date {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 2px;
}

.admin-badge {
  font-size: 10px;
  background: var(--rainbow-1);
  color: white;
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: 4px;
}

.user-row-actions {
  display: flex;
  gap: 6px;
}

.btn-user-pass,
.btn-user-del {
  border: none;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-user-pass {
  background: #F0E6FF;
  color: var(--rainbow-5);
}

.btn-user-pass:hover {
  background: var(--rainbow-5);
  color: white;
}

.btn-user-del {
  background: #FFF5F5;
  color: #E84393;
}

.btn-user-del:hover {
  background: #E84393;
  color: white;
}

/* === AI/拍照按钮 === */

.btn-ai {
  background: linear-gradient(135deg, #6C5CE7, #5A4BD1) !important;
  color: white !important;
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

.btn-photo {
  background: linear-gradient(135deg, #F8B500, #E89400) !important;
  color: white !important;
  box-shadow: 0 4px 12px rgba(248, 181, 0, 0.3);
}

/* === 学习报告 === */

.report-container {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-soft);
  flex: 1;
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.report-title {
  font-family: 'ZCOOL KuaiLe', sans-serif;
  font-size: 22px;
}

.report-tabs {
  display: flex;
  gap: 4px;
  background: #FAFAFE;
  border-radius: var(--radius-md);
  padding: 4px;
}

.report-tab {
  padding: 8px 16px;
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.report-tab.active {
  background: white;
  color: var(--rainbow-5);
  box-shadow: 0 2px 8px rgba(108, 92, 231, 0.15);
}

.report-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.report-card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.report-card:hover {
  border-color: var(--rainbow-5);
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

.report-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.report-card-icon {
  font-size: 28px;
}

.report-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.report-card-meta {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 2px;
}

.report-card-rate {
  margin-left: auto;
  font-size: 24px;
  font-weight: 800;
  color: var(--rainbow-4);
}

.report-card-stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.report-card-advice {
  font-size: 12px;
  color: var(--text-muted);
  background: #F0E6FF;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  line-height: 1.5;
}

/* 报告详情 */
.report-detail {
  padding: 0;
}

.report-detail-stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.rd-stat {
  text-align: center;
  background: #FAFAFE;
  border-radius: var(--radius-md);
  padding: 12px 4px;
}

.rd-stat-val {
  font-size: 20px;
  font-weight: 800;
  color: var(--rainbow-2);
}

.rd-stat-label {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 2px;
}

.report-section {
  margin-bottom: 20px;
}

.report-section h3 {
  font-size: 15px;
  margin-bottom: 10px;
  color: var(--text-main);
}

.report-type-bars {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.report-type-tag {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  background: #FFF0F5;
  color: var(--rainbow-2);
}

.report-trend {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  height: 120px;
  padding: 10px;
  background: #FAFAFE;
  border-radius: var(--radius-md);
}

.trend-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  position: relative;
  min-width: 24px;
}

.trend-bar-fill {
  width: 100%;
  background: linear-gradient(180deg, #FF6B9D, #F8B500);
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  max-height: 100%;
  transition: height 0.5s ease;
}

.trend-bar-label {
  font-size: 9px;
  color: var(--text-light);
  margin-top: 4px;
}

.trend-bar-rate {
  font-size: 9px;
  font-weight: 700;
  color: var(--rainbow-2);
  position: absolute;
  top: -16px;
}

.report-plan-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}

.rp-title {
  flex: 1;
  font-weight: 600;
}

.rp-time {
  font-size: 11px;
  color: var(--text-light);
}

.rp-rating {
  font-size: 11px;
  color: #F8B500;
}

.report-advice {
  background: linear-gradient(135deg, #F0E6FF, #FFF0F5);
  border-radius: var(--radius-md);
  padding: 16px;
}

.advice-content {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-main);
}

/* === 积分系统 === */

.points-tabs {
  display: flex;
  gap: 4px;
  background: #FAFAFE;
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 16px;
}

.points-tab {
  flex: 1;
  text-align: center;
  padding: 10px;
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.points-tab.active {
  background: white;
  color: var(--rainbow-5);
  box-shadow: 0 2px 8px rgba(108, 92, 231, 0.15);
}

/* 积分总览 */
.points-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.ps-card {
  text-align: center;
  background: #FAFAFE;
  border-radius: var(--radius-md);
  padding: 16px 8px;
}

.ps-icon { font-size: 28px; }
.ps-val { font-size: 24px; font-weight: 800; color: var(--rainbow-2); margin: 4px 0; }
.ps-label { font-size: 11px; color: var(--text-light); }

/* 积分明细 */
.points-log-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-bottom: 1px solid var(--border-light);
}

.pl-icon { font-size: 20px; flex-shrink: 0; }
.pl-info { flex: 1; min-width: 0; }
.pl-title { font-size: 13px; font-weight: 600; }
.pl-meta { font-size: 11px; color: var(--text-light); }
.pl-points { font-size: 16px; font-weight: 800; color: #00B894; }

/* 积分榜 */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #FAFAFE;
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
}

.leaderboard-row.me {
  background: linear-gradient(135deg, #FFF0F5, #F0E6FF);
  border: 2px solid var(--rainbow-5);
}

.lb-rank {
  font-size: 20px;
  font-weight: 800;
  width: 32px;
  text-align: center;
}

.lb-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF6B9D, #6C5CE7);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}

.lb-info { flex: 1; }
.lb-name { font-size: 14px; font-weight: 700; }
.lb-count { font-size: 11px; color: var(--text-light); }
.lb-points { font-size: 22px; font-weight: 800; color: #F8B500; }

/* 礼物 */
.my-points-bar {
  text-align: center;
  padding: 12px;
  background: linear-gradient(135deg, #FFF0F5, #F0E6FF);
  border-radius: var(--radius-md);
  font-size: 16px;
  margin-bottom: 16px;
}

.my-points-bar strong {
  font-size: 24px;
  color: var(--rainbow-2);
}

.gifts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.gift-card {
  text-align: center;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 8px;
  transition: all 0.3s ease;
}

.gift-card:hover {
  border-color: var(--rainbow-5);
  transform: translateY(-2px);
}

.gift-card.disabled {
  opacity: 0.6;
}

.gift-icon { font-size: 36px; }
.gift-name { font-size: 14px; font-weight: 700; margin-top: 4px; }
.gift-desc { font-size: 11px; color: var(--text-light); margin-top: 2px; }
.gift-points { font-size: 18px; font-weight: 800; color: #F8B500; margin: 8px 0; }

.btn-exchange {
  width: 100%;
  padding: 8px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #FF6B9D, #F8B500);
  color: white;
  font-family: inherit;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-exchange:disabled {
  background: var(--border-light);
  color: var(--text-light);
  cursor: not-allowed;
}

.gift-exchange-card {
  width: 420px;
  max-width: min(92vw, 420px);
  padding: 32px 28px 24px;
  border: 1px solid rgba(255, 107, 157, 0.16);
  box-shadow: 0 24px 56px rgba(108, 92, 231, 0.2);
}

.gift-exchange-header {
  margin-bottom: 18px;
}

.gift-exchange-summary {
  text-align: center;
  padding: 24px 18px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top, rgba(255, 214, 102, 0.32), transparent 54%),
    linear-gradient(180deg, rgba(255, 240, 245, 0.95), rgba(255, 255, 255, 0.98));
  border: 1px solid rgba(255, 107, 157, 0.14);
}

.gift-exchange-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--rainbow-1);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.gift-exchange-name {
  margin-top: 14px;
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.35;
}

.gift-exchange-points {
  margin-top: 10px;
  font-size: 30px;
  font-weight: 900;
  color: #F8B500;
  text-shadow: 0 8px 18px rgba(248, 181, 0, 0.18);
}

.gift-exchange-hint {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-light);
}

.gift-exchange-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.gift-exchange-cancel,
.gift-exchange-confirm {
  width: 100%;
  margin: 0;
}

.gift-exchange-cancel {
  padding: 12px 14px;
  border-radius: 14px;
}

.gift-exchange-confirm {
  box-shadow: 0 14px 24px rgba(255, 107, 157, 0.2);
}

@media (max-width: 768px) {
  .gift-exchange-card {
    padding: 26px 18px 18px;
  }

  .gift-exchange-summary {
    padding: 20px 14px;
    border-radius: 20px;
  }

  .gift-exchange-name {
    font-size: 20px;
  }

  .gift-exchange-points {
    font-size: 26px;
  }

  .gift-exchange-actions {
    grid-template-columns: 1fr;
  }
}

/* 日常打卡 */
.daily-checkin-date {
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--rainbow-5);
  margin-bottom: 12px;
}

.daily-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.daily-task-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #FAFAFE;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.daily-task-row:hover {
  background: #FFF5F7;
}

.daily-task-row.checked {
  background: #E8F8F5;
  border-color: #00B894;
}

.dt-icon { font-size: 24px; }
.dt-info { flex: 1; }
.dt-title { font-size: 14px; font-weight: 600; }
.dt-points { font-size: 14px; font-weight: 700; color: #F8B500; }
.dt-check { font-size: 20px; }

/* 计划积分标签 */
.points-badge {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 8px;
  background: #FFF3E0;
  color: #F8B500;
  font-weight: 700;
}

/* 复制按钮 */
.btn-copy {
  background: linear-gradient(135deg, #A29BFE, #6C5CE7) !important;
  color: white !important;
  box-shadow: 0 4px 12px rgba(162, 155, 254, 0.3);
}

/* === 复制计划模态框 === */

.copy-plan-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  margin-bottom: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  background: #FAFAFE;
}

.copy-plan-row:hover {
  background: #FFF5F7;
}

.copy-plan-row.selected {
  background: #F0E6FF;
  border-color: var(--rainbow-5);
}

.cp-check {
  font-size: 20px;
  flex-shrink: 0;
}

.cp-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.cp-info {
  flex: 1;
  min-width: 0;
}

.cp-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.cp-time {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 2px;
}

.copy-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.btn-select-all {
  border: 2px solid var(--rainbow-5);
  background: white;
  color: var(--rainbow-5);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.btn-select-all:hover {
  background: var(--rainbow-5);
  color: white;
}

/* === 礼物管理 === */

.gift-add-form {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.gift-mgr-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #FAFAFE;
  border-radius: var(--radius-md);
  margin-bottom: 6px;
}

.gm-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.gm-info {
  flex: 1;
  min-width: 0;
}

.gm-name {
  font-size: 14px;
  font-weight: 700;
}

.gm-desc {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 2px;
}

.gm-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.gm-btn {
  border: 1px solid var(--border-light);
  background: white;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.gm-btn:hover {
  background: var(--rainbow-5);
  color: white;
}

.gm-btn.approve:hover {
  background: #00B894;
  color: white;
}

.gm-btn.reject:hover {
  background: #E84393;
  color: white;
}

.exchange-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #FAFAFE;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
}

.ex-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.ex-info {
  flex: 1;
  min-width: 0;
}

.ex-name {
  font-size: 13px;
  font-weight: 600;
}

.ex-meta {
  font-size: 11px;
  color: var(--text-light);
}

.ex-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

/* === 智能生成 Tab === */

.smart-gen-tabs {
  display: flex;
  gap: 4px;
  background: #FAFAFE;
  border-radius: var(--radius-md);
  padding: 4px;
  margin: 16px 0;
}

.smart-gen-tab {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.smart-gen-tab.active {
  background: white;
  color: var(--rainbow-5);
  box-shadow: 0 2px 8px rgba(108, 92, 231, 0.15);
}

.smart-gen-panel {
  display: none;
}

.smart-gen-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.smart-daily-toolbar {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}

.smart-daily-toolbar::-webkit-scrollbar {
  display: none;
}

.smart-toolbar-btn {
  display: inline-flex;
  align-items: center;
  border: 1px solid #E6DDF6;
  background: #FFFDFE;
  color: #7A4C93;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.smart-toolbar-btn:hover {
  background: #F8F3FF;
  border-color: #CDB6FF;
}

.smart-template-section {
  border: 1px solid #F1E7F3;
  background: linear-gradient(180deg, #FFFFFF, #FFF8FC);
  border-radius: 18px;
  padding: 16px;
}

.smart-template-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
}

.smart-template-hint {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 4px;
  margin-bottom: 12px;
}

.smart-daily-unified-list {
  display: grid;
  gap: 10px;
}

.smart-daily-selected-summary {
  margin-top: 14px;
  border: 1px solid #F1E7F3;
  border-radius: 20px;
  background: linear-gradient(180deg, #FFFFFF, #FFF8FC);
  padding: 14px;
}

.smart-daily-selected-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.smart-daily-selected-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
}

.smart-daily-selected-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.smart-daily-selected-list {
  display: grid;
  gap: 12px;
}

.smart-daily-result-card {
  border: 1px solid #EAE4F4;
  border-radius: 18px;
  padding: 14px;
  background: #FFFFFF;
  box-shadow: 0 10px 24px rgba(246, 188, 210, 0.12);
}

.smart-daily-result-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.smart-daily-result-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
}

.smart-daily-result-meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.smart-daily-unified-card {
  border: 1px solid #EAE4F4;
  border-radius: 20px;
  padding: 14px;
  background: linear-gradient(180deg, #FFFFFF, #FFFDFE);
  box-shadow: 0 10px 24px rgba(246, 188, 210, 0.12);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.smart-daily-unified-card.selected {
  border-color: #CDB6FF;
  box-shadow: 0 16px 34px rgba(170, 135, 255, 0.14);
}

.smart-daily-unified-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.smart-daily-check {
  flex-shrink: 0;
  padding-top: 2px;
}

.smart-daily-check input {
  width: 18px;
  height: 18px;
}

.smart-daily-unified-main {
  flex: 1;
  min-width: 0;
}

.smart-daily-unified-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
}

.smart-template-empty {
  padding: 20px 14px;
  border-radius: 14px;
  background: #FAFAFE;
  color: var(--text-muted);
  text-align: center;
  font-size: 13px;
}

.smart-template-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid #ECE6F6;
  background: #FFFFFF;
  cursor: pointer;
  transition: all 0.2s ease;
}

.smart-template-option.selected {
  border-color: #CDB6FF;
  background: #F7F2FF;
  box-shadow: 0 10px 24px rgba(108, 92, 231, 0.08);
}

.smart-template-option input {
  width: auto;
  margin-top: 3px;
}

.smart-template-option-body {
  min-width: 0;
}

.smart-template-option-title {
  font-size: 14px;
  font-weight: 700;
}

.smart-template-option-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.smart-daily-card {
  border: 1px solid #EAE4F4;
  border-radius: 20px;
  padding: 16px;
  background: linear-gradient(180deg, #FFFFFF, #FFFDFE);
  box-shadow: 0 10px 24px rgba(246, 188, 210, 0.12);
}

.smart-daily-card.editing {
  background: linear-gradient(180deg, #FFFDFE, #FBF7FF);
  border-color: #CDB6FF;
  box-shadow: 0 16px 34px rgba(170, 135, 255, 0.14);
}

.smart-daily-card-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.smart-daily-head-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.smart-daily-card-main {
  min-width: 0;
  flex: 1;
}

.smart-daily-seq {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #FAD0E5, #E5DAFF);
  color: #7A4C93;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 8px;
}

.smart-daily-card-title {
  font-size: 15px;
  font-weight: 800;
}

.smart-daily-meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.smart-daily-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #F8F3FF;
  color: #7A4C93;
  font-size: 12px;
  font-weight: 600;
}

.smart-daily-card-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  flex-shrink: 0;
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}

.smart-daily-card-actions::-webkit-scrollbar {
  display: none;
}

.smart-daily-card-actions .gm-btn {
  white-space: nowrap;
}

.smart-daily-drag-handle {
  color: #B28ACA;
  font-size: 16px;
  line-height: 1;
  cursor: grab;
  user-select: none;
}

.smart-daily-card[draggable="true"] {
  cursor: grab;
}

.smart-daily-card[draggable="true"]:active {
  cursor: grabbing;
}

.smart-daily-editor {
  margin-top: 14px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(225, 213, 248, 0.95);
}

.smart-daily-form-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.smart-daily-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.smart-daily-field-span {
  grid-column: span 2;
}

.smart-daily-field span {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 700;
}

.smart-daily-field input,
.smart-daily-field select,
.smart-daily-field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #E5DCF5;
  border-radius: 14px;
  background: #FFFDFE;
  padding: 10px 12px;
  font-size: 13px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.smart-daily-field input:focus,
.smart-daily-field select:focus,
.smart-daily-field textarea:focus {
  outline: none;
  border-color: #BA9BFF;
  box-shadow: 0 0 0 3px rgba(186, 155, 255, 0.14);
}

.smart-daily-field textarea {
  min-height: 84px;
  resize: vertical;
}

.smart-generate-skipped {
  margin: 10px 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #FFF7E8;
  color: #9A6C00;
  font-size: 13px;
}

/* === 鼓励动画 === */

.encouragement-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
  cursor: pointer;
}

.encouragement-overlay.fade-out {
  animation: encouragementFadeOut 0.5s ease forwards;
}

@keyframes encouragementFadeOut {
  to { opacity: 0; }
}

.encouragement-card {
  background: white;
  border-radius: 32px;
  padding: 50px 40px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(255, 107, 157, 0.4);
  position: relative;
  overflow: hidden;
  max-width: 90vw;
  width: 400px;
  animation: encouragementEntry 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes encouragementEntry {
  from { opacity: 0; transform: scale(0.5) translateY(40px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.encouragement-card.overtime {
  box-shadow: 0 20px 60px rgba(108, 92, 231, 0.4);
}

.encouragement-emoji {
  font-size: 80px;
  animation: encouragementBounce 1s ease-in-out infinite;
  margin-bottom: 16px;
  display: inline-block;
}

@keyframes encouragementBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-15px) scale(1.1); }
}

.encouragement-title {
  font-family: 'ZCOOL KuaiLe', sans-serif;
  font-size: 32px;
  background: linear-gradient(135deg, #FF6B9D, #F8B500, #4ECDC4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.encouragement-plan {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
}

.encouragement-text {
  font-size: 16px;
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1.6;
}

/* 彩纸效果 */
.encouragement-confetti {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  top: -10px;
  animation: confettiFall 2s linear forwards;
}

@keyframes confettiFall {
  0% { transform: translateY(-10px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(400px) rotate(720deg); opacity: 0; }
}

/* === 计划图片上传 === */

.plan-photo-upload {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  transition: all 0.3s ease;
}

.plan-photo-upload:hover {
  border-color: var(--rainbow-1);
  background: #FAFAFE;
}

.photo-placeholder-small {
  cursor: pointer;
}

.photo-placeholder-small p {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}

.btn-remove-image {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.plan-image {
  display: inline-block;
}

/* === 打印样式 === */
@media print {
  /* 强制彩色打印 */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  html {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* 隐藏所有不需要打印的元素 */
  .navbar, .view-switcher, .plans-actions, .plan-actions, .calendar-panel,
  .btn-action, .btn-print, .btn-add, .btn-complete, .btn-delete, .btn-edit,
  .plan-interactions, .btn-settings, .btn-logout, .btn-users,
  .btn-calendar-toggle, .btn-calendar-close,
  .btn-gantt-detail, .gantt-time-marks, .btn-smart-gen,
  .btn-ai, .btn-photo, .plan-image,
  .modal-overlay, .toast,
  .gantt-week-grid .gantt-timeline,
  .empty-state {
    display: none !important;
  }

  body {
    background: white;
    margin: 0;
    padding: 0;
    font-size: 12px;
  }

  .content-area {
    padding: 0;
    display: block;
  }

  .plans-panel {
    display: block;
    width: 100%;
  }

  /* 统计卡片紧凑显示 */
  .stats-row {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;
    margin-bottom: 10px;
  }

  .stat-card {
    border: 1px solid #ccc;
    box-shadow: none;
    padding: 8px;
    border-radius: 6px;
  }

  .stat-card .stat-icon { font-size: 20px; }
  .stat-card .stat-value { font-size: 18px; }
  .stat-card .stat-label { font-size: 11px; }

  /* 计划列表容器 */
  .plans-list-container, .gantt-container, .month-container {
    box-shadow: none;
    border: none;
    padding: 0;
    page-break-inside: auto;
  }

  .plans-list-header {
    page-break-after: avoid;
  }

  /* 计划卡片紧凑布局 */
  .plan-card {
    border: 1px solid #ccc;
    border-left-width: 4px;
    box-shadow: none;
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 5px;
    padding: 8px 10px;
    border-radius: 6px;
  }

  .plan-icon {
    width: 32px;
    height: 32px;
    font-size: 18px;
    margin-right: 8px;
  }

  .plan-title {
    font-size: 13px;
    margin-bottom: 2px;
  }

  .plan-time {
    font-size: 11px;
  }

  .time-badge {
    font-size: 10px;
    padding: 1px 6px;
  }

  .plan-type-tag {
    font-size: 10px;
    padding: 1px 5px;
  }

  /* 标题 */
  .plans-list-title {
    font-size: 18px;
    margin-bottom: 8px;
  }

  .plans-list-title .date-badge {
    font-size: 11px;
  }

  /* 甘特图打印优化 */
  .gantt-day-card {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 4px;
  }

  .gantt-day-card-header {
    margin-bottom: 4px;
  }

  .gantt-task-bar {
    height: 22px;
    font-size: 9px;
    box-shadow: none;
    border: 1px solid rgba(0,0,0,0.1);
  }

  /* 月视图 */
  .month-day-card {
    break-inside: avoid;
  }

  @page {
    margin: 1cm;
    size: A4;
  }
}

/* === 响应式适配 === */

/* 移动端日历切换按钮（默认隐藏，手机端显示） */
.btn-calendar-toggle {
  display: none;
  width: 100%;
  padding: 10px 16px;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  background: white;
  color: var(--rainbow-1);
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 8px;
}

.btn-calendar-toggle:hover {
  background: #FFF0F5;
}

.btn-calendar-close {
  display: none;
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--rainbow-1);
  color: white;
  cursor: pointer;
  font-size: 16px;
  z-index: 1000;
}

/* === 平板 (769px - 1024px) === */
@media (max-width: 1024px) {
  .content-area {
    display: grid;
    grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
    align-items: start;
    padding: 16px;
  }

  .calendar-panel {
    width: 100%;
    max-width: none;
    margin: 0;
    position: sticky;
    top: 86px;
  }

  .stats-row {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }

  .stat-card {
    padding: 14px 10px;
  }

  .stat-card .stat-value {
    font-size: 22px;
  }

  .stat-card .stat-icon {
    font-size: 26px;
  }

  .navbar-quote {
    display: none;
  }

  .navbar {
    height: auto;
    min-height: 70px;
    padding-top: 10px;
    padding-bottom: 10px;
    align-items: center;
  }

  .navbar-right {
    justify-content: flex-end;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    overflow: visible;
  }

  .navbar-user-meta {
    margin-left: auto;
  }

  .navbar-user-dropdown {
    width: auto;
    max-width: min(320px, calc(100vw - 24px));
  }

  .user-badge-button {
    max-width: min(320px, calc(100vw - 24px));
  }

  .user-dropdown-menu {
    width: min(320px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    left: auto;
    right: 0;
  }

  .gantt-week-grid {
    min-width: 700px;
  }

  .month-day-card {
    min-height: 80px;
  }

  .plans-list-header {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .plans-actions {
    max-width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
  }

  .btn-action {
    padding: 10px 14px;
    font-size: 13px;
    width: 100%;
  }
}

/* === 手机 (≤768px) === */
@media (max-width: 768px) {
  body.navbar-menu-open {
    overflow: hidden;
  }

  /* 导航栏 */
  .navbar {
    padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 10px;
    height: auto;
    min-height: 56px;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
  }

  .navbar-left {
    gap: 8px;
    flex: 1;
    min-width: 0;
  }

  .navbar-logo {
    font-size: 22px;
  }

  .navbar-title {
    font-size: 18px;
  }

  .navbar-quote {
    display: none;
  }

  .navbar-right {
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 0;
    flex: 0 0 auto;
  }

  .navbar-user-meta {
    width: auto;
    justify-content: flex-end;
    margin-left: auto;
  }

  .user-badge {
    padding: 6px 10px;
    font-size: 12px;
    max-width: min(72vw, 240px);
  }

  .user-avatar {
    width: 26px;
    height: 26px;
    font-size: 13px;
  }

  .btn-logout,
  .btn-settings {
    width: 100%;
    padding: 10px 14px;
    font-size: 12px;
    white-space: nowrap;
    min-height: 42px;
    justify-content: center;
  }

  /* 内容区 */
  .content-area {
    display: flex;
    flex-direction: column;
    padding: 10px;
    gap: 12px;
  }

  /* 移动端日历切换按钮显示 */
  .btn-calendar-toggle {
    display: block;
  }

  /* 移动端默认隐藏日历面板 */
  .calendar-panel {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    border-radius: 0;
    max-width: 100%;
    margin: 0;
    padding: 60px 16px 16px;
    overflow-y: auto;
  }

  .calendar-panel.show {
    display: block;
    animation: fadeIn 0.3s ease;
  }

  .calendar-panel .btn-calendar-close {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .calendar-title {
    font-size: 16px;
  }

  .btn-calendar-nav {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .calendar-day {
    font-size: 12px;
  }

  .calendar-weekday {
    font-size: 10px;
    padding: 6px 0;
  }

  /* 视图切换 */
  .view-switcher {
    width: 100%;
    overflow-x: auto;
  }

  .view-tab {
    padding: 8px 14px;
    font-size: 12px;
    white-space: nowrap;
    flex: 1;
    justify-content: center;
  }

  /* 统计卡片 */
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .stat-card {
    padding: 12px 8px;
  }

  .stat-card .stat-icon {
    font-size: 22px;
  }

  .stat-card .stat-value {
    font-size: 20px;
  }

  .stat-card .stat-label {
    font-size: 10px;
  }

  /* 计划列表 */
  .plans-list-container {
    padding: 14px;
    border-radius: var(--radius-md);
  }

  .plans-list-title {
    font-size: 18px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .plans-list-title .date-badge {
    font-size: 11px;
    padding: 3px 8px;
    margin-left: 0;
  }

  .plans-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    justify-content: stretch;
  }

  .btn-action {
    width: 100%;
    padding: 12px 12px;
    font-size: 12px;
    min-height: 46px;
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(108, 92, 231, 0.18);
  }

  /* 计划卡片 */
  .plan-card {
    padding: 12px;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .plan-icon {
    width: 40px;
    height: 40px;
    font-size: 22px;
    margin-right: 10px;
  }

  .plan-info {
    flex: 1;
    min-width: 0;
  }

  .plan-title {
    font-size: 14px;
  }

  .plan-time {
    font-size: 11px;
    flex-wrap: wrap;
    gap: 4px;
  }

  .plan-type-tag {
    font-size: 10px;
    padding: 2px 6px;
  }

  .plan-actions {
    gap: 4px;
  }

  .btn-complete {
    width: 32px;
    height: 32px;
    font-size: 15px;
  }

  .btn-delete {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }

  .btn-edit {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }

  /* 交互区域 */
  .plan-interactions {
    width: 100%;
    margin-top: 8px;
  }

  .interaction-row {
    gap: 10px;
  }

  .star {
    font-size: 16px;
  }

  .btn-like,
  .btn-comment-toggle {
    padding: 5px 10px;
    font-size: 12px;
  }

  .comment-input {
    font-size: 12px;
    padding: 6px 10px;
  }

  /* 甘特图 */
  .gantt-container {
    padding: 14px;
    border-radius: var(--radius-md);
    overflow-x: auto;
  }

  .gantt-title {
    font-size: 18px;
  }

  .gantt-week-grid {
    min-width: 600px;
    gap: 6px;
  }

  .gantt-day-card {
    padding: 10px 6px;
  }

  .gantt-day-num {
    font-size: 18px;
  }

  .gantt-day-num.today-circle {
    width: 30px;
    height: 30px;
    font-size: 15px;
  }

  .gantt-task-bar {
    height: 24px;
    font-size: 9px;
    padding: 0 5px;
  }

  .gantt-bar-icon {
    font-size: 11px;
  }

  .gantt-bar-time {
    display: none;
  }

  .gantt-time-mark {
    font-size: 8px;
  }

  /* 月视图 */
  .month-container {
    padding: 14px;
    border-radius: var(--radius-md);
  }

  .month-title {
    font-size: 18px;
  }

  .month-grid {
    gap: 4px;
  }

  .month-day-card {
    min-height: 60px;
    padding: 4px;
  }

  .month-day-card .day-num {
    font-size: 13px;
  }

  .month-day-card .plan-icon-small {
    font-size: 12px;
  }

  .month-day-card .completion-rate {
    font-size: 9px;
  }

  /* 模态框 */
  .modal-card {
    width: 95vw;
    max-height: 85vh;
    padding: 24px 18px;
    border-radius: var(--radius-lg);
    margin: 10px;
  }

  .modal-title {
    font-size: 20px;
  }

  .modal-close {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 14px;
    padding: 10px 14px;
  }

  .form-group label {
    font-size: 12px;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .type-selector {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .type-option {
    padding: 10px 4px;
    font-size: 11px;
  }

  .type-option .type-icon {
    font-size: 20px;
  }

  .btn-submit {
    padding: 14px;
    font-size: 15px;
  }

  /* 设置页面 */
  .settings-tabs {
    gap: 2px;
  }

  .settings-tab {
    font-size: 11px;
    padding: 8px 4px;
  }

  /* 空状态 */
  .empty-state {
    padding: 40px 10px;
  }

  .empty-state .empty-icon {
    font-size: 48px;
  }

  .empty-state p {
    font-size: 14px;
  }

  /* Toast */
  .toast {
    right: 10px;
    left: 10px;
    top: 65px;
    font-size: 13px;
    padding: 12px 16px;
    text-align: center;
  }

  /* AI/拍照模态框 */
  .ai-type-selector {
    grid-template-columns: 1fr;
  }

  .daily-template-add,
  .daily-template-grid,
  .smart-daily-form-row {
    grid-template-columns: 1fr;
  }

  .smart-daily-toolbar {
    gap: 6px;
  }

  .smart-daily-result-header {
    flex-direction: column;
  }

  .smart-toolbar-btn {
    flex: 0 0 auto;
    justify-content: center;
  }

  .user-dropdown-menu {
    position: fixed;
    top: calc(68px + env(safe-area-inset-top, 0px));
    right: 12px;
    left: auto;
    width: min(320px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    min-width: 0;
    max-height: min(70vh, 520px);
    overflow-y: auto;
    padding: 10px;
    border-radius: 20px;
  }

  .smart-daily-field-span {
    grid-column: span 1;
  }

  .smart-daily-unified-head {
    flex-direction: column;
  }

  .smart-daily-card-actions {
    justify-content: flex-start;
  }

  .ai-type-option {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px;
  }

  .ai-type-icon {
    font-size: 24px;
    margin-bottom: 0;
  }

  /* 用户管理 */
  .user-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .user-row-actions {
    width: 100%;
    justify-content: flex-end;
  }

  /* 计划操作按钮区域移动端换行 */
  .plans-actions {
    flex-wrap: wrap;
  }

  .btn-action {
    font-size: 11px;
    padding: 8px 10px;
  }

  /* 设置tabs移动端滚动 */
  .settings-tabs {
    overflow-x: auto;
  }

  .settings-tab {
    font-size: 11px;
    padding: 8px 6px;
    white-space: nowrap;
  }

  /* 鼓励动画移动端 */
  .encouragement-card {
    width: 90vw;
    padding: 36px 24px;
  }

  .encouragement-emoji {
    font-size: 56px;
  }

  .encouragement-title {
    font-size: 26px;
  }

  .encouragement-plan {
    font-size: 15px;
  }

  .encouragement-text {
    font-size: 14px;
  }

  /* 报告移动端 */
  .report-detail-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .report-card-stats {
    flex-wrap: wrap;
    gap: 8px;
  }

  .report-trend {
    overflow-x: auto;
  }

  .trend-bar {
    min-width: 28px;
  }

  .report-plan-item {
    flex-wrap: wrap;
    gap: 4px;
  }

  /* 积分移动端 */
  .points-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gifts-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .leaderboard-row {
    padding: 10px 12px;
  }

  .lb-avatar {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .lb-points {
    font-size: 18px;
  }
}

/* === 小手机 (≤375px) === */
@media (max-width: 375px) {
  .navbar-title {
    font-size: 16px;
  }

  .user-badge-caret {
    display: none;
  }

  .user-badge {
    padding: 4px 8px;
    max-width: min(68vw, 180px);
  }

  #user-name {
    max-width: 96px;
  }

  .btn-logout,
  .btn-settings {
    padding: 5px 8px;
    font-size: 11px;
  }

  .view-tab {
    padding: 7px 8px;
    font-size: 11px;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .plan-card {
    padding: 10px;
  }

  .plan-icon {
    width: 36px;
    height: 36px;
    font-size: 20px;
    margin-right: 8px;
  }

  .type-selector {
    grid-template-columns: repeat(2, 1fr);
  }

  .interaction-row {
    gap: 8px;
  }
}
