/* 内容区域 */
.content-area {
  flex: 1;
  padding: 24px 32px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* 欢迎页面 */
.welcome-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 20px;
}

.welcome-icon {
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, rgba(0, 180, 216, 0.15), rgba(0, 100, 150, 0.1));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border-color);
}

.welcome-icon svg {
  width: 100px;
  height: 100px;
  fill: var(--accent-cyan);
  opacity: 0.8;
}

.welcome-title {
  font-size: 44px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.welcome-subtitle {
  font-size: 22px;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.6;
}

.quick-stats {
  display: flex;
  gap: 64px;
  margin-top: 40px;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 60px;
  font-weight: 700;
  color: var(--accent-cyan);
  font-family: "Consolas", "Monaco", monospace;
}

.stat-label {
  font-size: 18px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 12px;
}

/* 日期选择页面 */
.date-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

.section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: '';
  width: 3px;
  height: 18px;
  background: var(--accent-cyan);
  border-radius: 2px;
}

.date-selector {
  display: flex;
  gap: 12px;
  align-items: center;
}

.date-input {
  background: rgba(0, 180, 216, 0.08);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 16px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

.date-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.15);
}

.date-input::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.6;
  cursor: pointer;
}

.btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  color: var(--bg-deep);
  box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-secondary {
  background: rgba(0, 180, 216, 0.1);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(0, 180, 216, 0.15);
  border-color: var(--accent-cyan);
}

.btn-small {
  padding: 6px 12px;
  font-size: 13px;
}

/* 日期卡片网格 */
.date-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.date-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.date-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.date-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.date-card:hover::before {
  opacity: 1;
}

.date-card.has-video::after {
  content: '';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--success);
}

.date-card.is-today {
  border-color: var(--accent-cyan);
  background: linear-gradient(135deg, rgba(0, 180, 216, 0.15), rgba(0, 120, 180, 0.1));
}

.date-card.is-today::before {
  content: '今日';
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 8px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  color: var(--bg-deep);
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  letter-spacing: 1px;
}

.date-card.is-today .date-value {
  margin-top: 20px;
}

.date-card.all-completed {
  border-color: var(--success);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05));
}

.date-card.all-completed::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--success), #34d399);
  opacity: 1;
}

.date-card.all-completed:hover {
  border-color: var(--success);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(16, 185, 129, 0.1));
}

.date-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: "Consolas", "Monaco", monospace;
  margin-bottom: 4px;
}

.date-weekday {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.date-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

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

.date-stat strong {
  color: var(--accent-cyan);
}

/* 告警数字：有告警时红色高亮，区别于普通记录数 */
.date-stat strong.alarm-num {
  color: var(--danger);
}

/* 汇总页面日期卡片样式 */
.date-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.today-tag {
  padding: 2px 6px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  color: var(--bg-deep);
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
}

.date-day {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: "Consolas", "Monaco", monospace;
}

.date-stats {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.stat-record, .stat-alert {
  display: flex;
  align-items: center;
  gap: 4px;
}

.date-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.date-card.is-past {
  opacity: 0.7;
}

.date-card.is-future {
  opacity: 0.5;
}

.existing-dates-section {
  margin-top: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
}

.existing-dates-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 20px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.existing-dates-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 400px;
  overflow-y: auto;
}

.existing-date-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: rgba(0, 180, 216, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  gap: 16px;
}

.existing-date-item:hover {
  background: rgba(0, 180, 216, 0.15);
  border-color: var(--accent-cyan);
  transform: translateX(4px);
}

.existing-date-item.is-today {
  background: linear-gradient(135deg, rgba(0, 180, 216, 0.2), rgba(0, 120, 180, 0.15));
  border-color: var(--accent-cyan);
}

.existing-date-item .date-index {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  color: var(--bg-deep);
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
}

.existing-date-item .date-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: "Consolas", "Monaco", monospace;
  min-width: 100px;
}

.existing-date-item .date-weekday-small {
  font-size: 13px;
  color: var(--text-muted);
  min-width: 60px;
}

.existing-date-item .record-count {
  font-size: 13px;
  color: var(--accent-cyan);
  margin-left: auto;
}
