/* ============ 日程表 ============ */
.sc-card { margin-bottom: 16px; padding: 0; overflow: hidden; }
.sc-head { padding: 14px 16px 10px; border-bottom: 1px solid var(--border); }
.sc-head h3 { margin: 0 0 8px; font-size: 15px; color: var(--text); }
.sc-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sc-view-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.sc-view-btn { border: none; background: #fff; padding: 6px 14px; cursor: pointer; font-size: 13px; color: var(--text-sub); }
.sc-view-btn + .sc-view-btn { border-left: 1px solid var(--border); }
.sc-view-btn.active { background: var(--primary); color: #fff; }
.sc-nav { display: flex; align-items: center; gap: 6px; }
.sc-title { font-weight: 600; min-width: 120px; text-align: center; }
.sc-filter { display: flex; gap: 6px; flex: 1; min-width: 200px; }
.sc-filter input, .sc-filter select {
  border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: 13px;
}
.sc-filter input { flex: 1; }
.sc-reminder {
  margin: 10px 16px 0; padding: 10px 14px; border-radius: 8px;
  background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; font-size: 13px;
}
.sc-reminder ul { margin: 4px 0 0 18px; }
.sc-reminder .sc-rem-title { font-weight: 600; }
.sc-body { padding: 12px 16px 16px; }

/* 月视图网格 */
.sc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.sc-dow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; text-align: center; font-size: 12px; color: var(--text-sub); padding: 0; margin-bottom: 6px; font-weight: 600; }
.sc-dow > div { padding: 11px 0; border-radius: 8px; background: #f3f6fb; }
.sc-dow > div:nth-last-child(-n+2) { color: #7c8196; background: #f5f3fa; }
.sc-cell {
  min-height: 86px; border: 1px solid var(--border); border-radius: 8px;
  padding: 4px; cursor: pointer; background: #fff; position: relative; transition: background .12s;
  display: flex; flex-direction: column; overflow: hidden;
}
.sc-cell:hover { background: #f8faff; }
.sc-cell.other { background: #fafbfd; color: #c0c6cf; }
.sc-cell.today { border-color: var(--primary); }
.sc-cell.selected { background: #eef4ff; border-color: var(--primary); }
.sc-cell .sc-dnum { font-size: 12px; font-weight: 600; margin-bottom: 3px; }
.sc-cell.today .sc-dnum { color: var(--primary); }
.sc-cell.other .sc-dnum { color: #c0c6cf; }
.sc-evt {
  font-size: 11px; line-height: 1.35; padding: 1px 4px; border-radius: 4px; margin-bottom: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff;
}
.sc-evt.p-HIGH { background: var(--danger); }
.sc-evt.p-MEDIUM { background: #d97706; }
.sc-evt.p-LOW { background: #2563eb; }
.sc-evt.more { background: #e2e8f0; color: var(--text-sub); }

/* 周/日视图 */
.sc-week-grid { display: grid; grid-template-columns: 56px repeat(7, 1fr); gap: 4px; }
.sc-day-grid { display: grid; grid-template-columns: 56px 1fr; gap: 4px; }
.sc-hour-col { text-align: right; font-size: 11px; color: var(--text-sub); padding: 2px 6px 0 0; }
.sc-day-col { min-height: 480px; border: 1px solid var(--border); border-radius: 8px; padding: 6px; position: relative; }
.sc-day-col.today { border-color: var(--primary); }
.sc-day-head { text-align: center; font-size: 12px; font-weight: 600; padding-bottom: 4px; }
.sc-day-head.today { color: var(--primary); }
.sc-evt-block {
  font-size: 12px; border-radius: 6px; padding: 4px 6px; margin-bottom: 4px; cursor: pointer; color: #fff;
  word-break: break-word;
}
.sc-evt-block.p-HIGH { background: var(--danger); }
.sc-evt-block.p-MEDIUM { background: #d97706; }
.sc-evt-block.p-LOW { background: #2563eb; }

/* 详情弹窗 */
.sc-detail-body { padding: 16px 20px; }
.sc-detail-row { display: flex; padding: 6px 0; border-bottom: 1px solid #f0f2f6; font-size: 14px; }
.sc-detail-row:last-child { border-bottom: none; }
.sc-detail-row .sc-dk { width: 96px; color: var(--text-sub); flex-shrink: 0; }
.sc-detail-row .sc-dv { flex: 1; word-break: break-word; }
.sc-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; color: #fff; }
.sc-pill.p-HIGH { background: var(--danger); }
.sc-pill.p-MEDIUM { background: #d97706; }
.sc-pill.p-LOW { background: #2563eb; }
.sc-imp { display: inline-block; margin-left: 6px; font-size: 12px; color: var(--danger); }

/* 日期范围行 */
.sc-date-row { display: flex; align-items: center; gap: 8px; }
.sc-date-row input { flex: 1; }
.sc-important-label { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; color: var(--text-sub); }
.sc-important-label input { width: auto; }
.req { color: var(--danger); }

/* 日历卡片：所有样式限定在模块内，避免影响原有工作台。 */
#scheduleCard { border: 1px solid #dfe6f1; border-radius: 16px; box-shadow: 0 5px 22px rgba(35,65,110,.045); }
#scheduleCard .sc-head { padding: 20px 20px 16px; background: linear-gradient(120deg, #f6f9ff, #fff 70%); }
#scheduleCard .sc-head h3 { font-size: 18px; font-weight: 700; color: #20304b; margin-bottom: 16px; }
#scheduleCard .sc-tools { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 14px; }
#scheduleCard .sc-view-switch { width: max-content; background: #edf2fa; padding: 4px; border: 0; border-radius: 10px; }
#scheduleCard .sc-view-btn { min-width: 44px; min-height: 44px; border: 0; border-radius: 7px; background: transparent; font-weight: 600; }
#scheduleCard .sc-view-btn.active { background: #fff; color: var(--primary); box-shadow: 0 2px 6px #20304b15; }
#scheduleCard .sc-nav { justify-content: flex-end; min-width: 0; }
#scheduleCard .sc-nav .btn { min-width: 44px; min-height: 44px; padding: 6px 10px; background: #fff; border: 1px solid #e1e7f1; }
#scheduleCard .sc-title { min-width: 140px; font-size: 16px; color: #20304b; }
#scheduleCard .sc-filter { display: grid; grid-column: 1 / -1; grid-template-columns: minmax(180px, 2fr) minmax(140px, 1fr) minmax(140px, 1fr); min-width: 0; gap: 10px; }
#scheduleCard .sc-filter input, #scheduleCard .sc-filter select { width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; background: #fff; color: #36465e; }
#scheduleCard .sc-filter input:focus, #scheduleCard .sc-filter select:focus { outline: 2px solid #b8ceff; outline-offset: 1px; }
#scheduleCard .sc-body { padding: 16px 20px 20px; }
#scheduleCard .sc-grid { grid-template-columns: repeat(7,minmax(0,1fr)); gap: 6px; }
#scheduleCard .sc-cell { min-width: 0; min-height: 98px; padding: 8px; border-color: #e4e9f2; border-radius: 9px; }
#scheduleCard .sc-cell:hover { background: #f0f5ff; border-color: #c5d6fa; }
#scheduleCard .sc-cell.other { background: #f8fafd; }
#scheduleCard .sc-cell.today { background: #f2f6ff; border-color: #3d73f3; box-shadow: inset 0 0 0 1px #3d73f3; }
#scheduleCard .sc-cell .sc-dnum { display: flex; align-items: center; min-height: 24px; font-size: 13px; margin-bottom: 5px; }
#scheduleCard .sc-cell.today .sc-dnum::after { content: '今天'; margin-left: 6px; font-size: 10px; font-weight: 400; color: #3d73f3; }
#scheduleCard .sc-cell.selected, #scheduleCard .sc-day-col.selected { background: #e5eeff; border-color: #6994f8; }
#scheduleCard .sc-evt { padding: 3px 5px; border-radius: 5px; }
#scheduleCard .sc-week-grid { grid-template-columns: 0 repeat(7,minmax(0,1fr)); gap: 6px; }
#scheduleCard .sc-day-grid { grid-template-columns: 0 minmax(0,1fr); gap: 6px; }
#scheduleCard .sc-hour-col { padding: 0; }
#scheduleCard .sc-day-col { min-width: 0; background: #fbfcff; border-radius: 10px; }
#scheduleCard .sc-day-head { padding: 10px 2px 14px; color: #40516b; }
#scheduleCard .sc-caption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 14px; color: #7a879b; font-size: 12px; }
#scheduleCard .sc-legend { display: flex; gap: 14px; }
#scheduleCard .sc-legend span { display: inline-flex; align-items: center; gap: 5px; }
#scheduleCard .sc-legend i { width: 7px; height: 7px; border-radius: 50%; background: #2563eb; }
#scheduleCard .sc-legend .high { background: #dc2626; }
#scheduleCard .sc-legend .medium { background: #d97706; }
@media (max-width: 720px) {
  #scheduleCard .sc-head { padding: 14px 10px; }
  #scheduleCard .sc-tools { grid-template-columns: minmax(0,1fr); gap: 10px; }
  #scheduleCard .sc-nav { justify-content: space-between; gap: 4px; }
  #scheduleCard .sc-title { min-width: 0; font-size: 13px; flex: 1; }
  #scheduleCard .sc-filter { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
  #scheduleCard .sc-filter input { grid-column: 1 / -1; }
  #scheduleCard .sc-body { padding: 10px 6px 14px; }
  #scheduleCard .sc-grid, #scheduleCard .sc-dow { gap: 2px; }
  #scheduleCard .sc-dow > div { padding: 10px 0; font-size: 11px; }
  #scheduleCard .sc-cell { min-height: 76px; min-width: 44px; padding: 4px 2px; border-radius: 6px; }
  #scheduleCard .sc-cell.today .sc-dnum::after { display: none; }
  #scheduleCard .sc-cell .sc-dnum { font-size: 12px; padding-left: 2px; }
  #scheduleCard .sc-caption { padding: 0 4px; }
  #scheduleCard .sc-week-grid { min-width: 650px; }
  #scheduleCard .sc-body { overflow-x: auto; }
}

/* 移动端适配：触摸区域 ≥ 44px */
@media (max-width: 720px) {
  .sc-tools { flex-direction: column; align-items: stretch; }
  .sc-filter { flex-wrap: wrap; }
  .sc-cell { min-height: 60px; }
  .sc-cell .sc-evt { font-size: 10px; }
  .sc-view-btn { padding: 10px 16px; }
  .sc-nav .btn { min-height: 44px; }
  .sc-filter input, .sc-filter select { min-height: 44px; }
  .sc-day-col { min-height: 320px; }
}
