* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #f0f2f5;
  color: #333;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ===== 认证页 ===== */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}
.auth-card {
  background: #fff;
  border-radius: 16px;
  padding: 40px 30px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  text-align: center;
}
.auth-icon { font-size: 48px; margin-bottom: 12px; }
.auth-card h2 { font-size: 22px; margin-bottom: 8px; color: #1a1a2e; }
.auth-sub { color: #888; font-size: 14px; margin-bottom: 24px; }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form input {
  padding: 14px 16px;
  border: 2px solid #e8e8e8;
  border-radius: 10px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}
.auth-form input:focus { border-color: #4a6cf7; }
.auth-form button {
  padding: 14px;
  background: #4a6cf7;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.auth-form button:hover { background: #3b5de7; }
.auth-form button:active { transform: scale(0.98); }
.auth-error {
  color: #e74c3c;
  font-size: 13px;
  min-height: 20px;
}
.auth-switch { font-size: 13px; color: #888; margin-top: 4px; }
.auth-switch a { color: #4a6cf7; text-decoration: none; font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }
.auth-guest { margin-top: 16px; }
.auth-guest a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 11px 12px;
  background: #f0f5ff;
  color: #4a6cf7;
  border: 1px dashed #7da2f9;
  border-radius: 10px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  box-sizing: border-box;
  transition: background 0.2s, border-color 0.2s;
}
.auth-guest a:hover { background: #e3edff; border-style: solid; border-color: #4a6cf7; }

/* ===== 顶栏 ===== */
header {
  background: #1a1a2e;
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.header-left { display: flex; align-items: center; gap: 12px; }
.header-left h1 { font-size: 20px; font-weight: 700; }
.task-count { font-size: 13px; color: rgba(255,255,255,0.7); }
.header-right { display: flex; gap: 8px; align-items: center; }
.user-name { font-size: 13px; color: rgba(255,255,255,0.8); padding: 4px 10px; background: rgba(255,255,255,0.1); border-radius: 12px; }
.icon-btn {
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.icon-btn:hover { background: rgba(255,255,255,0.2); }
.icon-btn:active { transform: scale(0.92); }

/* ===== 筛选栏 ===== */
.filter-bar {
  background: #fff;
  padding: 12px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid #e8e8e8;
}
.filter-btn {
  padding: 8px 18px;
  border: 2px solid #e8e8e8;
  border-radius: 20px;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s;
  color: #666;
}
.filter-btn.active {
  background: #4a6cf7;
  color: #fff;
  border-color: #4a6cf7;
}
.filter-btn:not(.active):hover { border-color: #4a6cf7; color: #4a6cf7; }
.filter-hide.active { background: #27ae60 !important; color: #fff !important; border-color: #27ae60 !important; }

/* ===== 输入区 ===== */
.input-section {
  padding: 16px 20px;
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
}
.input-section textarea {
  width: 100%;
  padding: 14px;
  border: 2px solid #e8e8e8;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}
.input-section textarea:focus { border-color: #4a6cf7; }
.input-section button {
  margin-top: 12px;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #4a6cf7, #6c63ff);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.input-section button:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(74,108,247,0.3); }
.input-section button:active { transform: scale(0.98); }
.input-section button:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ===== 任务列表 ===== */
.task-list {
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  max-width: 800px;
  margin: 0 auto;
}
.task-card {
  background: #fff;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border-left: 5px solid #ddd;
  transition: all 0.2s;
  position: relative;
}
.task-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.task-card.completed {
  opacity: 0.6;
  border-left-color: #bbb !important;
}
.task-card.completed .task-title { text-decoration: line-through; color: #999; }

/* 紧迫性颜色 */
.task-card.urgency-overdue {
  border-left-color: #bbb;
  border-left-width: 6px;
  background: #f5f5f5;
  opacity: 0.75;
}
.task-card.urgency-overdue .task-title { color: #999; }
.task-card.urgency-overdue .task-meta .deadline { color: #999; text-decoration: line-through; }
.task-card.urgency-overdue .badge-overdue { background: #bbb; color: #fff; }

.task-card.urgency-today { border-left-color: #ff6b6b; background: #fff5f5; }
.task-card.urgency-soon { border-left-color: #ffa502; background: #fff8f0; }
.task-card.urgency-week { border-left-color: #ffd43b; background: #fffff0; }
.task-card.urgency-month { border-left-color: #74b9ff; background: #f0f8ff; }
.task-card.urgency-later { border-left-color: #dfe6e9; background: #fafafa; }

.task-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}
.task-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a2e;
  flex: 1;
  line-height: 1.4;
}
.task-badges {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.badge {
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.badge-overdue { background: #bbb; color: #fff; }
.badge-urgent { background: #ffe0e0; color: #e74c3c; }
.badge-involved { background: #e8f8e8; color: #27ae60; }
.badge-uninvolved { background: #f0f0f0; color: #999; }
.badge-unknown { background: #fff3cd; color: #e67e22; }
.badge-medium { background: #fff3cd; color: #e67e22; }
.badge-low { background: #e8f4fd; color: #3498db; }
.badge-category { background: #e8e8e8; color: #666; }

.task-meta {
  font-size: 13px;
  color: #888;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.task-meta .deadline { color: #555; font-weight: 500; }
.task-meta .deadline.overdue { color: #e74c3c; }
.task-meta .time-remaining { color: #888; font-size: 12px; }
.task-info {
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.task-info span { display: inline-flex; align-items: center; gap: 4px; }

/* 建议步骤 */
.task-steps, .task-raw {
  margin-top: 10px;
  padding: 12px 14px;
  background: #f8f9fa;
  border-radius: 10px;
  border-left: 3px solid #4a6cf7;
}
.task-steps-header, .task-raw-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}
.task-steps-header span, .task-raw-header span { font-size: 13px; font-weight: 600; color: #4a6cf7; }
.task-steps-header .arrow, .task-raw-header .arrow { transition: transform 0.2s; font-size: 12px; }
.task-steps-header .arrow.open, .task-raw-header .arrow.open { transform: rotate(180deg); }
.task-steps-list {
  margin-top: 8px;
  padding-left: 20px;
  list-style: decimal;
  font-size: 13px;
  color: #555;
  line-height: 1.8;
}
.task-steps-list.hidden { display: none; }
.task-raw-content {
  margin-top: 8px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  font-size: 13px;
  color: #666;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-all;
}
.task-raw-content.hidden { display: none; }

.task-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.task-actions button {
  padding: 6px 14px;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.task-actions button:active { transform: scale(0.95); }
.btn-complete {
  background: #27ae60;
  color: #fff;
}
.btn-complete:hover { background: #219a52; }
.btn-edit {
  background: #4a6cf7;
  color: #fff;
}
.btn-edit:hover { background: #3b5de7; }
.btn-delete {
  background: #fff;
  color: #e74c3c;
  border: 1px solid #e74c3c !important;
}
.btn-delete:hover { background: #fff5f5; }
.btn-note { background: #fff; color: #e67e22; border: 1px solid #e67e22 !important; }
.btn-note:hover { background: #fff8f0; }
.filter-batch.active { background: #e67e22 !important; color: #fff !important; border-color: #e67e22 !important; }
.filter-export { background: #27ae60 !important; color: #fff !important; border-color: #27ae60 !important; }
.filter-export:hover { opacity: 0.85; }

/* ===== 批量操作 ===== */
.btn-batch-select {
  padding: 6px 12px;
  border: 2px solid #4a6cf7;
  border-radius: 8px;
  background: #fff;
  color: #4a6cf7;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-batch-select:hover { background: #f0f2ff; }
.btn-batch-select.selected { background: #4a6cf7; color: #fff; }
.batch-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 2px solid #e67e22;
  padding: 10px 20px;
  z-index: 150;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.1);
  animation: slideUp 0.2s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.batch-bar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 800px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.batch-checkall { font-size: 14px; color: #333; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.batch-checkall input { width: 16px; height: 16px; cursor: pointer; }
.batch-count { font-size: 13px; color: #888; }
.btn-batch-delete { padding: 8px 16px; background: #e74c3c; color: #fff; border: none; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
.btn-batch-delete:hover { background: #c0392b; }
.btn-batch-cancel { padding: 8px 16px; background: #f0f0f0; color: #666; border: none; border-radius: 8px; font-size: 13px; cursor: pointer; margin-left: auto; }
.btn-batch-cancel:hover { background: #e0e0e0; }

/* ===== 导入 ===== */
.import-dropzone {
  border: 2px dashed #ccc;
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  color: #888;
  font-size: 14px;
  transition: all 0.2s;
  cursor: pointer;
}
.import-dropzone:hover { border-color: #4a6cf7; background: #f8f9ff; }
.import-dropzone.has-file { border-color: #27ae60; background: #f0fff4; }
.import-preview { margin-top: 10px; }
.import-error { color: #e74c3c; font-size: 13px; padding: 10px; text-align: center; }
.import-ok { color: #27ae60; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.import-list { display: flex; flex-wrap: wrap; gap: 6px; }
.import-list span {
  background: #e8f4fd; color: #4a6cf7;
  padding: 4px 10px; border-radius: 10px;
  font-size: 12px; font-weight: 500;
}
.btn-secondary { padding: 10px; background: #f0f0f0; color: #666; border: none; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
.btn-secondary:hover { background: #e0e0e0; }

/* ===== 用户中心 ===== */
.uc-info { display: flex; align-items: center; gap: 14px; padding: 8px 0 4px; }
.uc-avatar { font-size: 40px; }
.uc-username { font-size: 18px; font-weight: 700; color: #1a1a2e; }

/* ===== 管理后台 ===== */
.admin-user-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: #f8f9fa;
  border-radius: 10px;
  margin-bottom: 8px;
  gap: 10px;
}
.admin-user-info { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.admin-user-name { font-size: 14px; font-weight: 600; color: #1a1a2e; }
.admin-user-meta { font-size: 12px; color: #999; }
.admin-user-actions { display: flex; gap: 6px; flex-shrink: 0; align-items: center; }
.admin-user-actions .btn-small { padding: 6px 12px; font-size: 12px; white-space: nowrap; }
.admin-switch-label { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: #1a1a2e; cursor: pointer; padding: 8px 0; }
.admin-switch-label input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; }
.admin-form-group { margin-bottom: 14px; }
.admin-form-group label { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 600; color: #555; }
.admin-form-group input, .admin-form-group select { width: 100%; padding: 10px 12px; border: 2px solid #e8e8e8; border-radius: 8px; font-size: 13px; outline: none; box-sizing: border-box; }
.admin-form-group input:focus, .admin-form-group select:focus { border-color: #4a6cf7; }

.task-note {
  margin-top: 10px;
  padding: 12px 14px;
  background: #fffdf0;
  border-radius: 10px;
  border-left: 3px solid #e67e22;
}
.task-note-header span { font-size: 13px; font-weight: 600; color: #e67e22; }
.task-note-content {
  margin-top: 6px;
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
}
.note-input {
  width: 100%;
  padding: 12px;
  border: 2px solid #e8e8e8;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  font-family: inherit;
}
.note-input:focus { border-color: #4a6cf7; }

/* ===== 空状态 ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}
.empty-icon { font-size: 56px; margin-bottom: 12px; }
.empty-state p { font-size: 16px; }
.empty-sub { font-size: 13px; margin-top: 6px; color: #bbb; }

/* ===== 弹窗 ===== */
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.4); }
.modal-content {
  position: relative;
  background: #fff;
  border-radius: 16px;
  width: 90%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid #e8e8e8;
}
.modal-header h3 { font-size: 17px; }
.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.modal-body label { font-size: 13px; font-weight: 600; color: #555; }
.field-hint { font-size: 12px; color: #999; margin-top: -8px; }
.field-hint a { color: #4a6cf7; text-decoration: none; }
#customUrlGroup { display: none; }
.setting-status { font-size: 13px; color: #27ae60; min-height: 20px; }
.settings-section { margin-bottom: 4px; }
.settings-section-title { font-size: 14px; font-weight: 700; color: #1a1a2e; margin-bottom: 4px; }
.settings-divider { height: 1px; background: #e8e8e8; margin: 8px 0; }
.role-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; min-height: 32px; }
.role-empty { font-size: 12px; color: #bbb; line-height: 32px; }
.role-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; background: #e8f4fd; color: #4a6cf7;
  border-radius: 14px; font-size: 13px; font-weight: 500;
}
.role-remove {
  cursor: pointer; font-size: 12px; color: #999;
  margin-left: 2px; line-height: 1;
}
.role-remove:hover { color: #e74c3c; }
.role-input-row { display: flex; gap: 8px; }
.role-input-row input { flex: 1; padding: 8px 12px; border: 2px solid #e8e8e8; border-radius: 8px; font-size: 13px; outline: none; }
.role-input-row input:focus { border-color: #4a6cf7; }
.btn-small { padding: 8px 16px; background: #4a6cf7; color: #fff; border: none; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn-small:hover { background: #3b5de7; }
.modal-body input, .modal-body select {
  padding: 12px 14px;
  border: 2px solid #e8e8e8;
  border-radius: 10px;
  font-size: 14px;
  outline: none;
}
.modal-body input:focus, .modal-body select:focus { border-color: #4a6cf7; }
.modal-footer {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid #e8e8e8;
}
.modal-footer button {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.modal-footer button:first-child {
  background: #f0f0f0;
  color: #666;
}
.modal-footer button:last-child {
  background: #4a6cf7;
  color: #fff;
}

/* ===== 辅助类 ===== */
.hidden { display: none !important; }

/* ===== Toast 提示 ===== */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 999;
  animation: toastIn 0.3s ease;
  white-space: nowrap;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ===== 过度动画 ===== */
.task-card {
  animation: cardIn 0.3s ease;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== 日历视图 ===== */
.calendar-view {
  padding: 16px 20px;
  max-width: 1000px;
  margin: 0 auto;
}
.cal-flex {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.cal-left {
  flex: 0 0 auto;
  min-width: 350px;
}
.cal-right {
  flex: 1;
  min-width: 0;
}
.calendar-view .task-card { margin-bottom: 12px; }
.calendar-view .task-list { display: block; padding: 0; max-width: none; }

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 14px;
}
.cal-title {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a2e;
  min-width: 120px;
  text-align: center;
}
.cal-btn {
  padding: 6px 14px;
  border: 2px solid #e8e8e8;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  color: #555;
}
.cal-btn:hover { border-color: #4a6cf7; color: #4a6cf7; }
.cal-today-btn {
  margin-left: auto;
  background: #4a6cf7;
  color: #fff;
  border-color: #4a6cf7;
  font-size: 12px;
}
.cal-today-btn:hover { background: #3b5de7; }

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 12px;
  color: #888;
  font-weight: 600;
  margin-bottom: 6px;
}
.cal-weekdays span { padding: 4px 0; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.cal-cell {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  position: relative;
  transition: all 0.15s;
  background: #fff;
  border: 2px solid transparent;
}
.cal-cell:hover { background: #f0f2ff; border-color: #4a6cf7; }
.cal-cell.cal-empty { background: none; cursor: default; }
.cal-cell.cal-empty:hover { border-color: transparent; background: none; }
.cal-cell.cal-today { background: #e8f4fd; border-color: #74b9ff; font-weight: 700; }
.cal-cell.cal-selected { background: #4a6cf7; color: #fff; border-color: #3b5de7; }
.cal-cell.cal-selected .cal-star { color: #fff !important; }
.cal-day { line-height: 1; }
.cal-star {
  font-size: 10px;
  position: absolute;
  bottom: 4px;
  line-height: 1;
}

.cal-day-tasks {
  margin-top: 16px;
}
.cal-day-tasks-empty {
  text-align: center;
  padding: 30px 0;
  color: #999;
  font-size: 14px;
}
.cal-day-header {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a2e;
  padding: 10px 0 12px;
  border-bottom: 2px solid #e8e8e8;
  margin-bottom: 14px;
}
.cal-quick-add {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e8e8e8;
}
.cal-quick-add input[type="text"] {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid #e8e8e8;
  border-radius: 10px;
  font-size: 14px;
  outline: none;
}
.cal-quick-add input[type="text"]:focus { border-color: #4a6cf7; }
.cal-quick-add button {
  padding: 10px 16px;
  background: linear-gradient(135deg, #4a6cf7, #6c63ff);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.cal-quick-add button:hover { opacity: 0.9; }

/* ===== 响应式设计 ===== */
@media (max-width: 767px) {
  .cal-flex { flex-direction: column; }
  .cal-left { min-width: 100%; }
}

/* ===== 建议按钮 & 弹窗 ===== */
.suggest-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4a6cf7, #6c63ff);
  color: #fff;
  border: none;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(74,108,247,0.4);
  transition: all 0.2s;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
}
.suggest-btn:hover { transform: scale(1.1); box-shadow: 0 6px 24px rgba(74,108,247,0.5); }
.suggest-btn:active { transform: scale(0.95); }

.suggest-modal { max-width: 420px !important; }
.suggest-body { padding: 8px 20px 16px !important; }
.suggest-group { margin-bottom: 16px; }
.suggest-group-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.suggest-tip { font-size: 12px; color: #999; margin-bottom: 8px; }
.suggest-danger { color: #e74c3c; }
.suggest-today { color: #e67e22; }
.suggest-soon { color: #4a6cf7; }
.suggest-week { color: #2ecc71; }
.suggest-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 6px;
  font-size: 13px;
}
.suggest-item-overdue { background: #fff5f5; border-left: 3px solid #e74c3c; }
.suggest-item-time { color: #888; font-size: 12px; min-width: 48px; flex-shrink: 0; }
.suggest-item-title { flex: 1; color: #333; }
.suggest-item-meta { color: #999; font-size: 11px; }
.suggest-more { font-size: 12px; color: #999; text-align: center; padding: 4px; }
.suggest-summary {
  margin-top: 8px;
  padding: 12px 14px;
  background: #f0f8ff;
  border-radius: 10px;
  font-size: 13px;
  color: #4a6cf7;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .task-list { grid-template-columns: 1fr 1fr; padding: 20px 30px; }
  .input-section { padding: 20px 30px; max-width: 800px; margin: 0 auto; }
  .input-section textarea { max-width: 100%; }
  header { padding: 16px 30px; }
  .filter-bar { padding: 12px 30px; }
}

@media (min-width: 1024px) {
  .task-list { grid-template-columns: 1fr 1fr; max-width: 1000px; }
}

/* ===== V3 社交：布局 ===== */
.main-layout { display: flex; gap: 0; }
.main-content { flex: 1; min-width: 0; transition: margin-left 0.25s ease; }
.side-panel {
  position: fixed;
  left: 0;
  top: 68px;
  bottom: 0;
  width: 220px;
  background: #fff;
  border-right: 1px solid #eef0f4;
  overflow-y: auto;
  padding: 12px 10px;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  z-index: 80;
  box-shadow: 4px 0 20px rgba(0,0,0,0.06);
}
.side-panel.open { transform: translateX(0); }
@media (min-width: 768px) {
  .main-layout:has(.side-panel.open) .main-content { margin-left: 220px; }
}
.side-section { margin-bottom: 16px; }
.side-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #333;
  padding: 6px 4px;
  border-bottom: 1px solid #f0f2f5;
  margin-bottom: 6px;
}
.side-title-text {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  user-select: none;
  padding: 2px 4px;
  border-radius: 6px;
}
.side-title-text:hover { background: #f0f2ff; }
.side-title-text::before { content: '▾'; font-size: 10px; color: #aaa; }
.side-section.collapsed .side-title-text::before { content: '▸'; }
.side-section.collapsed .side-list { display: none; }
.side-add-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: #4a6cf7;
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.side-add-btn:hover { background: #3b5de7; }
.side-list { display: flex; flex-direction: column; gap: 4px; }
.side-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #444;
  transition: background 0.15s;
}
.side-item:hover { background: #f0f2ff; }
.side-item.active { background: #4a6cf7; color: #fff; }
.side-item-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.side-item-rel { font-size: 11px; color: #e67e22; background: #fff8f0; padding: 2px 6px; border-radius: 6px; }
.side-item.active .side-item-rel { background: rgba(255,255,255,0.25); color: #fff; }
.side-item-badge { font-size: 11px; color: #888; background: #f5f6fa; padding: 2px 6px; border-radius: 6px; }
.side-item.active .side-item-badge { background: rgba(255,255,255,0.25); color: #fff; }
.side-empty { font-size: 12px; color: #aaa; text-align: center; padding: 12px 4px; }
.side-toggle {
  position: fixed;
  left: 12px;
  bottom: 84px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: #4a6cf7;
  color: #fff;
  font-size: 20px;
  box-shadow: 0 4px 16px rgba(74,108,247,0.4);
  cursor: pointer;
  z-index: 90;
}
.side-toggle:hover { background: #3b5de7; }

.id-badge {
  display: inline-block;
  background: #f0f2ff;
  color: #4a6cf7;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 0.5px;
}
.id-badge:hover { background: #e0e5ff; }

/* ===== 弹窗 tab ===== */
.modal-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 16px 0;
  border-bottom: 1px solid #f0f2f5;
  flex-wrap: wrap;
}
.modal-tab {
  padding: 8px 14px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: #888;
  cursor: pointer;
  border-radius: 8px 8px 0 0;
  position: relative;
}
.modal-tab.active { color: #4a6cf7; background: #f0f2ff; }
.mini-badge {
  display: inline-block;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  background: #e74c3c;
  color: #fff;
  font-size: 10px;
  border-radius: 8px;
  padding: 0 4px;
  margin-left: 4px;
}

/* ===== 好友卡片 ===== */
.friend-card {
  padding: 12px;
  border: 1px solid #f0f2f5;
  border-radius: 12px;
  margin-bottom: 10px;
  background: #fff;
}
.friend-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.tag-chip {
  background: #f0f2ff;
  color: #4a6cf7;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
}
.friend-rel-empty { font-size: 12px; color: #aaa; }
.friend-relation-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-size: 13px;
  flex-wrap: wrap;
}
.friend-rel-label { color: #666; font-size: 12px; }
.rel-check { display: flex; align-items: center; gap: 3px; color: #555; cursor: pointer; }
.friend-tag-input-row { display: flex; gap: 6px; margin-top: 8px; align-items: center; flex-wrap: wrap; }
.friend-tag-input-row input {
  flex: 1;
  min-width: 120px;
  padding: 7px 10px;
  border: 1px solid #e0e4ea;
  border-radius: 8px;
  font-size: 13px;
}

/* ===== 成员选择 ===== */
.member-pick {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #444;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.member-pick:hover { background: #f5f6fa; }
.member-pick-grid { display: flex; flex-direction: column; gap: 2px; max-height: 220px; overflow-y: auto; }

/* ===== 群组视图 ===== */
.group-view { padding: 16px; }
.group-view-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 12px 16px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #f0f2f5;
}
.group-view-title { font-size: 16px; font-weight: 700; color: #333; flex: 1; }
.gt-pending { border-left: 4px solid #e67e22 !important; background: #fffbf5 !important; }

/* ===== 派发记录 ===== */
.assign-node { margin-bottom: 4px; }
.assign-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #f8f9fa;
  border-radius: 8px;
  margin: 4px 0;
  font-size: 13px;
  flex-wrap: wrap;
}
.assign-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
  flex-shrink: 0;
}
.assign-status.assign-pending_accept { background: #fff8e1; color: #e67e22; }
.assign-status.assign-accepted { background: #e8f5e9; color: #27ae60; }
.assign-status.assign-rejected { background: #ffebee; color: #e74c3c; }
.assign-title { flex: 1; color: #333; }
.assign-meta { color: #888; font-size: 12px; }

/* ===== AI 分派 ===== */
.assign-advice {
  padding: 12px 14px;
  background: #f0f8ff;
  border-radius: 10px;
  border-left: 4px solid #4a6cf7;
  margin-bottom: 10px;
}
.assign-advice-action { font-size: 14px; color: #333; }
.assign-advice-reason { font-size: 12px; color: #666; margin-top: 4px; }
.assign-sub-row {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.assign-sub-row input, .assign-sub-row select {
  padding: 7px 10px;
  border: 1px solid #e0e4ea;
  border-radius: 8px;
  font-size: 13px;
}
.assign-sub-title { flex: 2; min-width: 140px; }
.assign-sub-deadline { flex: 1; min-width: 140px; }
.assign-sub-people { flex: 1; min-width: 140px; }

/* ===== 任务消息 ===== */
.msg-item {
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8f9fa;
  margin-bottom: 8px;
  font-size: 13px;
}
.msg-item.msg-unread { background: #f0f2ff; border-left: 3px solid #4a6cf7; }
.msg-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.msg-from { font-weight: 700; color: #4a6cf7; font-size: 12px; }
.msg-time { color: #aaa; font-size: 11px; }
.msg-content { color: #444; line-height: 1.5; }

/* ===== 组织图谱 ===== */
.org-tree-list { list-style: none; padding-left: 20px; margin: 0; }
.org-tree-list .org-tree-list { border-left: 1px dashed #d0d5e0; }
.org-node {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  margin: 4px 0;
  background: #fff;
  border: 1px solid #e8ebf0;
  border-radius: 8px;
  font-size: 13px;
}
.org-node-name { font-weight: 600; color: #333; }
.org-node-actions { display: flex; gap: 4px; }
.org-parent-select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #e0e4ea;
  border-radius: 8px;
  font-size: 13px;
  margin-top: 4px;
}

/* ===== 任务新按钮 ===== */
.btn-share { background: #fff; color: #9b59b6; border: 1px solid #9b59b6 !important; }
.btn-share:hover { background: #f9f0ff; }
.btn-assign { background: #fff; color: #e67e22; border: 1px solid #e67e22 !important; }
.btn-assign:hover { background: #fff8f0; }
.btn-msg { background: #fff; color: #3498db; border: 1px solid #3498db !important; }
.btn-msg:hover { background: #f0f8ff; }

/* ===== 响应式 ===== */
@media (max-width: 767px) {
  .task-list { padding: 16px; }
}

/* ===== 组织关系视图 ===== */
.org-center-header { position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.org-center-header select {
  padding: 6px 10px;
  border: 1px solid #c8cfd8;
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
}

/* ===== 组织编辑器（参考项目布局） ===== */
.org-editor-layout { display: flex; gap: 16px; align-items: flex-start; }
.org-editor-panel {
  width: 320px;
  flex-shrink: 0;
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #f0f2f5;
}
.org-editor-panel h2 { font-size: 14px; color: #606266; margin: 14px 0 8px; }
.org-editor-panel h2:first-child { margin-top: 0; }
#orgEditorTree { max-height: 38vh; overflow-y: auto; }
.tree-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 6px;
  border-radius: 6px;
  cursor: pointer;
}
.tree-item:hover { background: #f5f7fa; }
.tree-item.selected { background: #ecf5ff; }
.tree-item .name { font-size: 13px; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #333; }
.tree-item .meta { font-size: 11px; color: #909399; }
.tree-item .ops { display: none; gap: 2px; }
.tree-item:hover .ops { display: flex; }
.tree-item .ops button {
  padding: 1px 6px;
  font-size: 12px;
  border-radius: 4px;
  border: 1px solid #d0d5e0;
  background: #fff;
  cursor: pointer;
  color: #444;
  line-height: 1.4;
}
.tree-item .ops button:hover { border-color: #4a6cf7; color: #4a6cf7; }
.tree-item .ops button.danger:hover { border-color: #e74c3c; color: #e74c3c; }
.form-grid { display: grid; grid-template-columns: 64px 1fr; gap: 8px 10px; align-items: center; }
.form-grid label { font-size: 13px; color: #606266; text-align: right; }
.form-grid input, .form-grid select { width: 100%; padding: 6px 8px; border: 1px solid #c8cfd8; border-radius: 6px; font-size: 13px; }
.form-grid input:focus, .form-grid select:focus { outline: none; border-color: #4a6cf7; }
.form-tip { margin-top: 8px; font-size: 12px; color: #c0c4cc; }
.org-editor-preview {
  flex: 1;
  min-width: 0;
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  border: 1px solid #f0f2f5;
}
.org-editor-preview .org-net-canvas { margin-top: 0; border: none; padding: 0; max-height: 70vh; }

.org-relation-form {
  margin-top: 10px;
  padding: 12px;
  background: #f8f9ff;
  border: 1px solid #e0e4ea;
  border-radius: 12px;
}
.org-relation-form .role-input-row { gap: 6px; flex-wrap: wrap; }
.org-relation-form input, .org-relation-form select {
  padding: 8px 10px;
  border: 1px solid #e0e4ea;
  border-radius: 8px;
  font-size: 13px;
}
.org-relation-form input { flex: 1; min-width: 120px; }
.org-relation-form select { min-width: 130px; }

/* ===== 组织网络树 ===== */
.org-net-tree { padding: 4px 0; }
.org-net-node { position: relative; }
.org-net-card {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 12px;
  margin: 4px 0;
  background: #f8f9fa;
  border: 1px solid #e8ebf0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
}
.org-net-card:hover { border-color: #4a6cf7; background: #f0f2ff; }
.org-net-card.mine { background: #eef3ff; border-color: #4a6cf7; box-shadow: 0 2px 8px rgba(74,108,247,0.15); }
.org-net-name { font-size: 14px; font-weight: 700; color: #333; }
.org-net-meta { font-size: 11px; color: #999; margin-left: auto; }
.org-net-card.mine .org-net-meta { color: #4a6cf7; }
.org-net-node { border-left: 1px dashed #d0d5e0; padding-left: 8px; }

/* ===== 组织网络图画布（Mermaid） ===== */
.org-net-canvas {
  margin-top: 10px;
  padding: 16px;
  background: #fff;
  border: 1px solid #f0f2f5;
  border-radius: 12px;
  overflow: auto;
  max-height: 65vh;
}
.org-net-canvas svg { display: block; margin: 0 auto; }
.org-net-canvas .nodeLabel { text-align: center; }

/* ===== 组织成员关系 ===== */
.org-relations-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.org-rel-chip {
  background: #f0f2ff;
  color: #4a6cf7;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.org-rel-del { cursor: pointer; color: #e74c3c; font-size: 10px; }
.org-rel-del:hover { color: #c0392b; }
