@charset "UTF-8";

/* ============================================
   高端质感设计规范 (Modern Premium UI) - Ultra Wide
   ============================================ */

:root {
  /* 白天模式 */
  --bg-primary: #f5f5f7;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-input: #f2f2f7;
  --bg-hover: #e5e5ea;
  
  --text-primary: #1d1d1f;
  --text-secondary: #86868b;
  --text-muted: #a1a1a6;
  
  --border-color: rgba(0, 0, 0, 0.06);
  --border-focus: #0071e3;
  
  --accent-primary: #0071e3;
  --accent-secondary: rgba(0, 113, 227, 0.08);
  --accent-hover: #0077ed;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.12);
  
  --success-color: #34c759;
  --danger-color: #ff3b30;
  --warning-color: #ff9500;
  
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  /* 黑夜模式 */
  --bg-primary: #000000;
  --bg-secondary: #1c1c1e;
  --bg-card: #1c1c1e;
  --bg-input: #2c2c2e;
  --bg-hover: #3a3a3c;
  
  --text-primary: #f5f5f7;
  --text-secondary: #86868b;
  --text-muted: #636366;
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #2997ff;
  
  --accent-primary: #2997ff;
  --accent-secondary: rgba(41, 151, 255, 0.15);
  --accent-hover: #0a84ff;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg-primary);
  min-height: 100vh;
  color: var(--text-primary);
  transition: background 0.3s ease;
  line-height: 1.5;
}

/* 突破宽度限制，使用 96% 宽度配合 1800px 打造巨幕感 */
main {
  padding: 3rem 0;
  width: 96%;
  max-width: 1800px;
  margin: 0 auto;
}

/* 头部区域 */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
  padding: 0 0.5rem;
}

.header-title {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-logo {
  height: 45px;
  width: auto;
  object-fit: contain;
}

h1 {
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.8px;
  color: var(--text-primary);
}

/* 极简圆形切换按钮 */
.js-theme-icon, 
.js-theme-text {
  display: none !important;
}

.theme-toggle {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--text-muted);
}

/* 利用 CSS Mask 绘制精细的高级矢量图标 */
.theme-toggle::after {
  content: '';
  width: 20px;
  height: 20px;
  background-color: var(--text-primary);
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg>') no-repeat center / contain;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg>') no-repeat center / contain;
  transition: var(--transition-smooth);
}

/* 黑夜模式 */
[data-theme="dark"] .theme-toggle::after {
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line></svg>') no-repeat center / contain;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line></svg>') no-repeat center / contain;
}

/* 头部操作按钮 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.header-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
  white-space: nowrap;
}

.header-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-focus);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.header-btn svg {
  color: var(--text-muted);
}

.header-btn:hover svg {
  color: var(--text-primary);
}

/* 导出数据下拉菜单 */
.header-btn-dropdown {
  position: relative;
}

.export-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 1rem;
  min-width: 320px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition-smooth);
  z-index: 100;
}

.header-btn-dropdown:hover .export-dropdown,
.header-btn-dropdown.active .export-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.export-dropdown-header {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.export-year-select {
  width: 100%;
  padding: 0.5rem 2rem 0.5rem 0.8rem;
  margin-bottom: 0.8rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
}

.export-year-select:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.export-months {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
}

.export-months button {
  padding: 0.4rem 0.5rem;
  background: var(--bg-input);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition-smooth);
  white-space: nowrap;
  flex: 1;
}

.export-months button:hover {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
}

/* 分析模态框 */
.analysis-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
}

.analysis-modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.analysis-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.analysis-modal-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: none;
  letter-spacing: 0;
}

.analysis-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: var(--transition-smooth);
}

.analysis-modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.analysis-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
}

/* 任务分析样式 */
.analysis-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-item {
  background: var(--bg-input);
  padding: 1rem;
  border-radius: var(--radius-sm);
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
}

.stat-value {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-value.success {
  color: var(--success-color);
}

/* 一行四卡片样式 */
.analysis-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--bg-input);
  padding: 1rem 0.5rem;
  border-radius: var(--radius-sm);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.stat-card-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.stat-card-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-card-value.success {
  color: var(--success-color);
}

.analysis-assignees h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.assignee-stat {
  margin-bottom: 1rem;
}

.assignee-name {
  font-weight: 500;
  color: var(--text-primary);
}

.assignee-progress {
  float: right;
  font-size: 13px;
  color: var(--text-secondary);
}

/* 积分银行样式 */
.points-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.points-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1rem;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
}

.points-rank {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 700;
  font-size: 14px;
  background: var(--border-color);
  color: var(--text-secondary);
}

.points-rank.rank-1 {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #fff;
}

.points-rank.rank-2 {
  background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
  color: #fff;
}

.points-rank.rank-3 {
  background: linear-gradient(135deg, #CD7F32, #B87333);
  color: #fff;
}

.points-name {
  flex: 1;
  font-weight: 500;
  color: var(--text-primary);
}

.points-value {
  font-weight: 700;
  color: var(--accent-primary);
}

/* 逾期任务样式 */
.overdue-content {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.no-overdue {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--success-color);
  font-size: 16px;
}

.overdue-item {
  background: var(--bg-input);
  padding: 1rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--danger-color);
}

.overdue-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.overdue-title {
  font-weight: 600;
  color: var(--text-primary);
}

.overdue-days {
  font-size: 12px;
  color: var(--danger-color);
  font-weight: 600;
}

.overdue-meta {
  display: flex;
  gap: 1rem;
  font-size: 12px;
  color: var(--text-secondary);
}

/* 提醒设置模态框 */
.reminder-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
}

.reminder-modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 480px;
  width: 100%;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.reminder-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.reminder-modal-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: none;
  letter-spacing: 0;
}

.reminder-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: var(--transition-smooth);
}

.reminder-modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.reminder-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
}

.reminder-time-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--border-color);
}

.reminder-time-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.8rem;
}

.reminder-time-input {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.reminder-minutes-input {
  width: 100px;
  padding: 0.6rem 0.8rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  text-align: center;
  transition: var(--transition-smooth);
}

.reminder-minutes-input:focus {
  outline: none;
  border-color: var(--border-focus);
}

.reminder-minutes-input::-webkit-inner-spin-button,
.reminder-minutes-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.reminder-time-unit {
  font-size: 14px;
  color: var(--text-secondary);
}

.reminder-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
}

/* 滑动开关样式 */
.reminder-switches {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.reminder-switch-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
}

.reminder-switch-item:last-child {
  border-bottom: none;
}

.reminder-switch-info {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.reminder-switch-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

.reminder-switch-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

/* 滑动开关 */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border-color);
  border-radius: 24px;
  transition: var(--transition-smooth);
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: var(--transition-smooth);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.switch input:checked + .slider {
  background-color: var(--accent-primary);
}

.switch input:checked + .slider:before {
  transform: translateX(20px);
}

.switch input:focus + .slider {
  box-shadow: 0 0 1px var(--accent-primary);
}

/* 旧样式兼容 */
.reminder-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
}

.reminder-option {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem;
  background: var(--bg-input);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.reminder-option:hover {
  background: var(--bg-hover);
  border-color: var(--border-focus);
}

.reminder-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--accent-primary);
}

.reminder-icon {
  font-size: 20px;
}

.reminder-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.reminder-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.8rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
}

.reminder-btn {
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.reminder-btn.cancel {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.reminder-btn.cancel:hover {
  background: var(--bg-hover);
  border-color: var(--border-focus);
}

.reminder-btn.save {
  background: var(--accent-primary);
  border: 1px solid var(--accent-primary);
  color: #fff;
}

.reminder-btn.save:hover {
  background: var(--accent-secondary);
  border-color: var(--accent-secondary);
}

/* 主布局 */
.main-layout {
  display: flex;
  gap: 2rem;
  align-items: stretch;
}

.left-sidebar {
  width: 320px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.8rem;
  transition: var(--transition-smooth);
}

h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.completion-box {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  gap: 1rem;
  justify-content: center;
  min-height: 140px;
}

.completion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.completion-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.completion-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.completion-content {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.completion-box .large {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -2px;
  color: var(--accent-primary);
  line-height: 1;
}

.completion-progress {
  width: 100%;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-input);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 3px;
  transition: width 0.5s ease;
}

.form-group {
  margin-bottom: 0.8rem;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.task-input,
.task-textarea,
.task-select,
.task-date-input {
  width: 100%;
  padding: 0.9rem 1.2rem;
  background: var(--bg-input);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  transition: var(--transition-smooth);
}

.task-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.task-input:focus,
.task-textarea:focus,
.task-select:focus,
.task-date-input:focus {
  outline: none;
  background: var(--bg-card);
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px var(--accent-secondary);
}

.task-textarea {
  min-height: 100px;
  resize: vertical;
}

.task-submit-btn {
  width: 100%;
  padding: 1rem;
  background: var(--text-primary);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--bg-primary);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 1rem;
  transition: var(--transition-smooth);
}

.task-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: var(--text-secondary);
}

.task-create-module {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.task-create-module h3 {
  margin-bottom: 1.5rem;
  font-size: 16px;
}

.task-create-module .form-group:last-of-type {
  margin-bottom: 0;
}

.calendar-section {
  flex: 1;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  height: auto;
}

.date-selector-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.date-selector-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.year-select {
  padding: 0.6rem 2rem 0.6rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 40px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  min-width: 80px;
  height: 38px;
  box-sizing: border-box;
}

.year-select:hover {
  border-color: var(--border-focus);
}

.year-select:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.month-selector-horizontal {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
}

.month-selector-horizontal::-webkit-scrollbar {
  display: none; 
}

.month-btn {
  padding: 0.6rem 1.5rem;
  background: var(--bg-input);
  border: 1px solid transparent;
  border-radius: 40px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
}

.month-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.month-btn.active {
  background: var(--accent-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3);
}

.weekday-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 16px;
  margin-bottom: 1.5rem;
}

.weekday-header div {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.schedule-list {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 16px;
  flex: 1;
}

.schedule-list .js-day {
  position: relative;
  background: var(--bg-input);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 1rem;
height: 160px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}

.schedule-list .js-day:hover {
  background: var(--bg-card);
  border-color: var(--border-color);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px) scale(1.02);
  z-index: 2;
}

.schedule-list .js-day.empty {
  background: transparent;
  cursor: default;
}

.schedule-list .js-day.empty:hover {
  transform: none;
  box-shadow: none;
}

.js-day.today {
  background: var(--accent-secondary);
  
}

.day-number {
  font-size: 26px;
  font-weight: 300;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.js-day.today .day-number {
  font-weight: 600;
  color: var(--accent-primary);
}

.task-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0px;
  padding: 4px 10px;
  background: var(--bg-card);
  border-radius: 20px;
  display: inline-block;
  align-self: flex-start;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.avatar-list {
  display: flex;
  margin-top: 10px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--bg-input);
  margin-left: -10px;
  transition: var(--transition-smooth);
}

.schedule-list .js-day:hover .avatar {
  border-color: var(--bg-card);
}

.avatar:first-child {
  margin-left: 0;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.js-day[data-status=success]::after,
.js-day[data-status=failed]::after {
  position: absolute;
  right: 1.2rem;
  top: 1.2rem;
  font-size: 18px;
  font-weight: 700;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.js-day[data-status=success]::after {
  content: "✓";
  color: #fff;
  background: var(--success-color);
  box-shadow: 0 4px 12px rgba(52, 199, 89, 0.4);
}

.js-day[data-status=failed]::after {
  content: "✗";
  color: #fff;
  background: var(--danger-color);
  box-shadow: 0 4px 12px rgba(255, 59, 48, 0.4);
}

/* 模态弹窗遮罩层 */
.task-modal-overlay {
  position: fixed;       
  top: 0;
  left: 0;
  width: 100vw;          
  height: 100vh;         
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px); 
  -webkit-backdrop-filter: blur(12px);
  display: flex;         
  align-items: center;   
  justify-content: center; 
  z-index: 9999;         
  padding: 1rem;
}

.task-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 540px;
  overflow: hidden;
  transform: translateY(20px);
  opacity: 0;
  animation: modalPopIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalPopIn {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.task-modal-header {
  padding: 1.8rem 1.8rem 1rem;
  border-bottom: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.task-modal-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.task-modal-date {
  padding: 0 1.8rem 1rem;
  background: transparent;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  border-bottom: 1px solid var(--border-color);
}

.task-modal-body {
  padding: 1.8rem;
  background: var(--bg-primary);
  max-height: 60vh;
  overflow-y: auto;
}

.task-modal-body .form-group {
  margin-bottom: 1.2rem;
}

.task-modal-body .form-group:last-child {
  margin-bottom: 0;
}

.task-modal-body .form-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.task-modal-body .form-row:last-child {
  margin-bottom: 0;
}

.task-modal-body .form-group-half {
  flex: 1;
  margin-bottom: 0;
}

.task-modal-body .task-input,
.task-modal-body .task-textarea,
.task-modal-body .task-select,
.task-modal-body .task-date-input {
  width: 100%;
  padding: 0.9rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  transition: var(--transition-smooth);
  box-sizing: border-box;
}

.task-modal-body .task-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.task-modal-body .task-input:focus,
.task-modal-body .task-textarea:focus,
.task-modal-body .task-select:focus,
.task-modal-body .task-date-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px var(--accent-secondary);
}

.task-modal-body .task-textarea {
  min-height: 80px;
  resize: vertical;
}

.task-modal-body label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

/* 编辑表单样式 */
.task-edit-form {
  padding: 0.5rem 0;
}

/* -------------------------------------
   任务列表排版优化 (Task Item Refactor) 
   ------------------------------------- */
.task-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.task-item:hover {
  border-color: var(--border-focus);
}

.task-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.8rem;
}

.task-item-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  padding-right: 1rem;
  line-height: 1.4;
}

.task-item-badges {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.task-importance {
  display: flex;
  gap: 2px;
}

.task-weight {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-input);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.task-weight .value {
  color: var(--accent-primary);
}

.task-item-content {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  background: var(--bg-primary);
  padding: 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.2rem;
}

.task-item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px dashed var(--border-color);
  padding-top: 1rem;
  margin-top: 1rem;
  gap: 0.5rem;
}

.task-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 13px;
}

.task-item-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-weight: 500;
}

.task-item-meta svg {
  color: var(--text-muted);
}

.task-item-actions {
  display: flex;
  gap: 0.5rem;
}

.task-item-btn {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 4px;
}

.task-item-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-focus);
  color: var(--text-primary);
}

.task-item-btn.delete {
  color: var(--danger-color);
  border-color: rgba(255, 59, 48, 0.3);
}

.task-item-btn.delete:hover {
  background: rgba(255, 59, 48, 0.1);
  border-color: var(--danger-color);
}

.task-item-btn.js-complete-task {
  color: var(--success-color);
  border-color: rgba(52, 199, 89, 0.3);
}

.task-item-btn.js-complete-task:hover {
  background: rgba(52, 199, 89, 0.1);
  border-color: var(--success-color);
}

.task-item-btn.js-complete-task.completed {
  background: var(--success-color);
  color: white;
  border-color: var(--success-color);
}

.task-item.completed {
  opacity: 0.7;
}

.task-item.completed .task-item-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

.task-modal-footer {
  padding: 1.2rem 1.8rem;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
}

.task-modal-btn-pill {
  background: var(--text-primary);
  color: var(--bg-primary);
  border: none;
  border-radius: 50px;
  padding: 0.6rem 2rem;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  min-width: 120px;
}

.task-modal-btn-pill:hover {
  background: var(--text-secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.no-tasks {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem;
  font-size: 14px;
}

/* 确认对话框样式 */
.confirm-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
}

.confirm-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 400px;
  overflow: hidden;
  animation: modalPopIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.confirm-dialog-header {
  padding: 1.5rem 1.5rem 0.5rem;
}

.confirm-dialog-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.confirm-dialog-body {
  padding: 0.5rem 1.5rem 1.5rem;
}

.confirm-dialog-message {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.confirm-dialog-footer {
  padding: 1rem 1.5rem;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.confirm-dialog-btn {
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
}

.confirm-dialog-btn.cancel {
  background: var(--bg-input);
  color: var(--text-secondary);
}

.confirm-dialog-btn.cancel:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.confirm-dialog-btn.confirm {
  background: var(--danger-color);
  color: white;
}

.confirm-dialog-btn.confirm:hover {
  background: #e0352b;
  transform: translateY(-1px);
}

/* Toast 提示样式 */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 16px 20px;
  min-width: 300px;
  max-width: 400px;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
  animation: toastSlideIn 0.3s ease;
  position: relative;
  overflow: hidden;
}

.toast.toast-success {
  border-left: 4px solid var(--success-color);
}

.toast.toast-error {
  border-left: 4px solid var(--danger-color);
}

.toast.toast-warning {
  border-left: 4px solid var(--warning-color);
}

.toast.toast-info {
  border-left: 4px solid var(--accent-primary);
}

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

.toast-success .toast-icon {
  color: var(--success-color);
}

.toast-error .toast-icon {
  color: var(--danger-color);
}

.toast-warning .toast-icon {
  color: var(--warning-color);
}

.toast-info .toast-icon {
  color: var(--accent-primary);
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.toast-message {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: var(--transition-smooth);
  flex-shrink: 0;
}

.toast-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--accent-primary);
  animation: toastProgress 3s linear forwards;
}

.toast-success .toast-progress {
  background: var(--success-color);
}

.toast-error .toast-progress {
  background: var(--danger-color);
}

.toast-warning .toast-progress {
  background: var(--warning-color);
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastSlideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

@keyframes toastProgress {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}

.toast.hiding {
  animation: toastSlideOut 0.3s ease forwards;
}

@media (max-width: 1200px) {
  .main-layout {
    flex-direction: column;
  }
  .left-sidebar {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .completion-box, .task-create-module {
    flex: 1;
    min-width: 300px;
  }
  .schedule-list {
    gap: 8px;
  }
  .toast-container {
    left: 16px;
    right: 16px;
    top: 16px;
  }
  .toast {
    min-width: auto;
    max-width: none;
    width: 100%;
  }
}

/* ============================================
   登录模态框样式
   ============================================ */

.login-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.login-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.login-modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 400px;
  padding: 32px;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-modal-overlay.active .login-modal {
  transform: scale(1) translateY(0);
}

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

.login-modal-header h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.login-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: var(--transition-smooth);
}

.login-modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.login-modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-form-group label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.login-input {
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 14px;
  transition: var(--transition-smooth);
  outline: none;
}

.login-input:focus {
  border-color: var(--border-focus);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px var(--accent-secondary);
}

.login-submit-btn {
  padding: 14px 24px;
  background: var(--accent-primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  margin-top: 8px;
}

.login-submit-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.login-links {
  text-align: center;
  margin-top: 8px;
}

.login-link {
  font-size: 13px;
  color: var(--accent-primary);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.login-link:hover {
  text-decoration: underline;
}