/* ===== 日历页面 ===== */
.calendar-page { padding-top: 0; }

/* ===== 统计卡片行 ===== */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card-sm {
    background: #fff;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.stat-card-sm .stat-icon-sm {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.stat-card-sm:nth-child(1) .stat-icon-sm { background: #e0f7e0; color: #27ae60; }
.stat-card-sm:nth-child(2) .stat-icon-sm { background: #e0e0ff; color: #2980b9; }
.stat-card-sm:nth-child(3) .stat-icon-sm { background: #fff3e0; color: #e67e22; }
.stat-card-sm:nth-child(4) .stat-icon-sm { background: #ffe0e6; color: #e94560; }
.stat-card-sm .stat-info-sm .stat-num { font-size: 1.25rem; font-weight: 800; color: #1a1a2e; line-height: 1; }
.stat-card-sm .stat-info-sm .stat-lbl { font-size: 0.75rem; color: #999; margin-top: 0.15rem; }

/* ===== 日历整体布局 ===== */
.calendar-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}
.calendar-container { flex: 1; min-width: 0; }
.side-panel { width: 300px; flex-shrink: 0; }

/* ===== 日历卡片 ===== */
.calendar-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
}

/* ===== 日历头部（月份导航 + 视图切换） ===== */
.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}
.calendar-header .month-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.calendar-header .month-nav h2 {
    font-size: 1.25rem;
    color: #1a1a2e;
    min-width: 160px;
    text-align: center;
}
.calendar-header .month-nav button {
    width: 36px; height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    color: #666;
    transition: all 0.2s;
    font-size: 1rem;
}
.calendar-header .month-nav button:hover { background: #e0e0e0; color: #333; }
.calendar-header .header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.view-switch {
    display: flex;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
}
.view-switch button {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    color: #888;
    transition: all 0.2s;
}
.view-switch button.active { background: #e94560; color: #fff; }
.btn-today {
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    color: #666;
    background: #f5f5f5;
    transition: all 0.2s;
}
.btn-today:hover { background: #e0e0e0; }

/* ===== 日历主体（星期表头 + 日期网格） ===== */
.calendar-body { padding: 1rem 1.5rem 1.5rem; }
.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 4px;
}
.weekdays span {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: #999;
    padding: 0.5rem 0;
}
.days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.day-cell {
    min-height: 90px;
    border-radius: 8px;
    padding: 0.4rem;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}
.day-cell:hover { background: #f0f0f0; }
.day-cell.other-month { opacity: 0.4; }
.day-cell.today {
    background: rgba(233,69,96,0.05);
    border: 2px solid #e94560;
}
.day-cell .day-number {
    font-size: 0.8rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}
.day-cell.today .day-number { color: #e94560; }
.day-cell .day-events {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.day-event {
    font-size: 0.65rem;
    padding: 0.15rem 0.3rem;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
    font-weight: 600;
}
.day-event.rehearsal { background: #e94560; }
.day-event.reading { background: #3498db; }
.day-event.stage { background: #27ae60; }
.day-event.meeting { background: #f39c12; }
.day-event.more-events {
    background: none;
    color: #999;
    text-align: center;
    font-weight: 400;
}

/* ===== 列表视图 ===== */
.list-view {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem 0;
}
.list-view-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: #fafafa;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 4px solid #e94560;
}
.list-view-item:hover { background: #f0f0f0; transform: translateX(2px); }
.list-view-item.reading { border-left-color: #3498db; }
.list-view-item.stage { border-left-color: #27ae60; }
.list-view-item.meeting { border-left-color: #f39c12; }
.list-view-item .lv-date {
    width: 50px; height: 50px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #333;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}
.list-view-item .lv-date .lv-day { font-size: 1.25rem; font-weight: 800; line-height: 1; color: #e94560; }
.list-view-item .lv-date .lv-month { font-size: 0.65rem; color: #999; }
.list-view-item .lv-info { flex: 1; min-width: 0; }
.list-view-item .lv-title { font-size: 0.95rem; font-weight: 600; color: #333; margin-bottom: 0.2rem; }
.list-view-item .lv-meta { font-size: 0.8rem; color: #999; display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }

.view-switch button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== 侧边面板（今日排练 / 即将到来 / 图例） ===== */
.side-panel-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.side-panel-card h4 {
    font-size: 0.95rem;
    color: #1a1a2e;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.side-panel-card h4 i { color: #e94560; }
.today-rehearsals { display: flex; flex-direction: column; gap: 0.5rem; }
.today-rehearsal-item {
    padding: 0.6rem 0.75rem;
    background: #fafafa;
    border-radius: 8px;
    font-size: 0.8rem;
}
.today-rehearsal-item .tr-time { color: #e94560; font-weight: 700; }
.today-rehearsal-item .tr-title { color: #333; font-weight: 600; margin: 0.15rem 0; }
.today-rehearsal-item .tr-loc { color: #999; }
.no-events { color: #ccc; font-size: 0.85rem; text-align: center; padding: 1rem 0; }

.upcoming-list { display: flex; flex-direction: column; gap: 0.5rem; }
.upcoming-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: #fafafa;
    border-radius: 8px;
    font-size: 0.8rem;
}
.upcoming-item .up-date {
    width: 40px; height: 40px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #e94560;
    color: #fff;
    flex-shrink: 0;
}
.upcoming-item .up-date .up-day { font-size: 1rem; font-weight: 800; line-height: 1; }
.upcoming-item .up-date .up-month { font-size: 0.55rem; opacity: 0.9; }
.upcoming-item .up-info .up-title { color: #333; font-weight: 600; }
.upcoming-item .up-info .up-time { color: #999; }

.legend-list { display: flex; flex-direction: column; gap: 0.5rem; }
.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #666;
}
.legend-dot {
    width: 12px; height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}
.legend-dot.rehearsal { background: #e94560; }
.legend-dot.reading { background: #3498db; }
.legend-dot.stage { background: #27ae60; }
.legend-dot.meeting { background: #f39c12; }

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .calendar-layout { flex-direction: column; }
    .side-panel { width: 100%; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .stats-row { grid-template-columns: 1fr 1fr; }
    .day-cell { min-height: 60px; }
    .day-event { font-size: 0.55rem; }
    .calendar-header { flex-direction: column; gap: 0.75rem; }
}
