/* 活动分析板块样式 - 标准 7 列表格月历视图 */
.activity-analysis-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px 24px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 顶部操作与预设栏 */
.activity-ctrl-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
}

.activity-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 260px;
  max-width: 460px;
}

.activity-input-label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}

.activity-text-input {
  flex: 1;
  height: 36px;
  padding: 4px 12px;
  font-size: 13px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #1e293b;
  background: #f8fafc;
  outline: none;
  transition: all 0.15s;
}

.activity-text-input:focus {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.activity-apply-btn {
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  background: #2563eb;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s;
}

.activity-apply-btn:hover {
  background: #1d4ed8;
}

.activity-quick-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.activity-preset-btn {
  height: 34px;
  padding: 0 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.activity-preset-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* 核心：标准 7 列表格月历视图 */
.activity-calendar-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.activity-calendar-header-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 13px;
  color: #475569;
}

.activity-calendar-header-meta .month-tag {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.activity-calendar-header-meta .selection-tip strong {
  color: #2563eb;
  font-size: 15px;
}

/* 7 列星期表头 */
.activity-calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 6px;
  text-align: center;
}

.activity-calendar-weekdays .cal-w-col {
  padding: 8px 0;
  font-size: 12.5px;
  font-weight: 700;
  color: #64748b;
  background: #f8fafc;
  border-radius: 6px;
}

.activity-calendar-weekdays .cal-w-col.is-weekend {
  color: #ea580c;
  background: #fff7ed;
}

/* 7 列日期网格 */
.activity-calendar-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

/* 空白占位单元格 */
.activity-cal-day-cell.is-empty {
  background: transparent;
  border: 1px dashed #f1f5f9;
  border-radius: 8px;
  min-height: 58px;
  pointer-events: none;
}

/* 真实日期单元格 */
.activity-cal-day-cell.is-day {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 58px;
  padding: 6px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.activity-cal-day-cell.is-day:hover {
  border-color: #93c5fd;
  background: #f0f7ff;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(37, 99, 235, 0.08);
}

.activity-cal-day-cell.is-day.is-weekend {
  background: #fffcf8;
  border-color: #fed7aa;
}

.activity-cal-day-cell.is-day.is-weekend .cal-day-num {
  color: #ea580c;
}

.activity-cal-day-cell .cal-day-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.activity-cal-day-cell .cal-day-num {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1;
}

.activity-cal-day-cell .cal-day-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 4px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #64748b;
  line-height: 1.2;
}

.activity-cal-day-cell .cal-day-sub {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 4px;
}

/* 选中高亮状态（活动日） */
.activity-cal-day-cell.is-day.is-active {
  background: #2563eb !important;
  border-color: #1d4ed8 !important;
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.28);
}

.activity-cal-day-cell.is-day.is-active .cal-day-num {
  color: #ffffff !important;
}

.activity-cal-day-cell.is-day.is-active .cal-day-tag {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.activity-cal-day-cell.is-day.is-active .cal-day-sub {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

/* 结果对比表格 */
.activity-result-wrap {
  margin-top: 4px;
}

.activity-table-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
}

.activity-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}

.activity-table th,
.activity-table td {
  padding: 12px 18px;
  border-bottom: 1px solid #f1f5f9;
}

.activity-table thead th {
  background: #f8fafc;
  font-weight: 700;
  color: #334155;
  font-size: 13px;
  border-bottom: 1px solid #e2e8f0;
}

.activity-table th.num,
.activity-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.activity-table tbody tr:hover {
  background: #f8fafc;
}

.activity-table tr.row-act {
  background: #eff6ff;
  font-weight: 600;
}

.activity-table tr.row-act td {
  color: #1e3a8a;
  border-bottom: 1px solid #dbeafe;
}

.activity-table tr.row-act td:first-child {
  color: #1d4ed8;
  font-weight: 700;
}

.activity-table tr.row-non-act td:first-child {
  color: #475569;
  font-weight: 600;
}

.activity-table tfoot tr {
  background: #fbfcfe;
  border-top: 2px solid #e2e8f0;
}

.activity-table tfoot td {
  padding: 11px 18px;
  font-size: 12.5px;
  color: #64748b;
}

.activity-table tfoot td.num {
  font-weight: 700;
}

.activity-table td .growth-tag {
  display: inline-block;
  font-weight: 700;
}

.activity-table td .growth-up {
  color: #dc2626;
}

.activity-table td .growth-down {
  color: #16a34a;
}

@media (max-width: 768px) {
  .activity-calendar-days-grid,
  .activity-calendar-weekdays {
    gap: 4px;
  }
  .activity-cal-day-cell.is-day {
    min-height: 48px;
    padding: 4px 4px;
  }
  .activity-cal-day-cell .cal-day-num {
    font-size: 13px;
  }
  .activity-cal-day-cell .cal-day-sub {
    font-size: 9.5px;
  }
}

@media (max-width: 640px) {
  .activity-ctrl-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .activity-input-group {
    max-width: 100%;
  }
  .activity-table th,
  .activity-table td {
    padding: 10px 10px;
    font-size: 12.5px;
  }
}
