:root {
    --primary-color: #0d6efd;
    --bg-color: #f4f6f8;
    --bottom-nav-height: 60px;
    --header-height: 50px;
}
body { background-color: var(--bg-color); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; padding-bottom: calc(var(--bottom-nav-height) + 20px); overscroll-behavior-y: none; }

/* 顶部导航栏 */
.top-navbar {
    height: var(--header-height);
    background: rgba(255,255,255,0.98);
    border-bottom: 1px solid #eee;
    position: sticky; top: 0; z-index: 1020;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 10px;
}
.date-navigator {
    flex: 1; display: flex; justify-content: center; align-items: center; gap: 15px;
    font-size: 1rem; color: #333; font-weight: 700;
}
.lunar-small { font-size: 0.75rem; color: #888; font-weight: normal; margin-left: 5px; }
.nav-arrow { font-size: 1.2rem; color: #aaa; padding: 5px 15px; cursor: pointer; }

/* 班组信息行 */
.shift-bar {
    background: white; margin: 10px 15px 0 15px; padding: 12px 15px;
    border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    display: flex; flex-direction: column; gap: 8px;
}
.shift-bar-top { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.dept-name { font-weight: 700; color: #2c3e50; font-size: 0.95rem; }
.shift-badge { padding: 4px 10px; border-radius: 6px; color: white; font-weight: 600; font-size: 0.85rem; letter-spacing: 0.5px; }

/* 标签容器 */
.shift-tags { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 4px; border-top: 1px dashed #f0f0f0; display: none; }
.info-tag { font-size: 0.75rem; padding: 2px 8px; border-radius: 4px; font-weight: 600; display: flex; align-items: center; gap: 3px; }

/* 标签颜色定义 */
.tag-red { background: #fff5f5; color: #e53e3e; border: 1px solid #fed7d7; }   /* 节日 */
.tag-blue { background: #ebf8ff; color: #3182ce; border: 1px solid #bee3f8; }  /* 工作/普通天气 */
.tag-green { background: #f0fff4; color: #38a169; border: 1px solid #c6f6d5; } /* 福利 */
.tag-orange { background: #fffaf0; color: #dd6b20; border: 1px solid #fbd38d; } /* 恶劣天气 */

/* 班次颜色 */
.bg-day { background: linear-gradient(135deg, #FF9966, #FF5E62); }
.bg-swing { background: linear-gradient(135deg, #56CCF2, #2F80ED); }
.bg-night { background: linear-gradient(135deg, #8E2DE2, #4A00E0); }
.bg-rest { background: #e0e0e0; color: #888; }

/* 菜单卡片 */
.menu-card {
    background: white; border-radius: 12px; margin: 10px 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03); overflow: hidden;
    min-height: 200px;
}
.meal-row { padding: 12px 15px; border-bottom: 1px dashed #f0f0f0; display: flex; align-items: flex-start; }
.meal-row:last-child { border-bottom: none; }
.meal-title { width: 45px; font-weight: bold; color: #95a5a6; font-size: 0.9rem; margin-top: 5px; }
.meal-content { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; }

.highlight-meal { background-color: #fffaf0; }
.highlight-meal .meal-title { color: #e67e22; }

.food-tag { font-size: 0.9rem; padding: 5px 10px; border-radius: 6px; color: white; }
.tag-meat { background-color: #ff6b6b; } 
.tag-carb { background-color: #fcc419; } 
.tag-soup { background-color: #20c997; }
.tag-veg  { background-color: #20c997; }

.collapse-btn { width: 100%; border: none; background: #fafafa; color: #999; font-size: 0.8rem; padding: 10px; border-top: 1px solid #eee; }

/* 视图容器 */
.view-section { display: none; min-height: 80vh; }
.view-section.active { display: block; animation: fadeIn 0.2s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* 排班日历 */
.calendar-wrapper { padding: 10px 15px; }
.calendar-container { overflow-x: auto; background: white; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); max-height: 75vh; }
table.schedule-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.schedule-table th, .schedule-table td { border: 1px solid #eee; padding: 4px; text-align: center; white-space: nowrap; font-size: 0.85rem; }
.schedule-table thead { position: sticky; top: 0; z-index: 20; }

.col-date { position: sticky; left: 0; z-index: 10; background: #f8f9fa; border-right: 2px solid #ddd; min-width: 70px; }
.date-cell-inner { display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.date-gregorian { font-weight: bold; font-size: 0.9rem; color: #333; }
.date-lunar { font-size: 0.7rem; color: #888; }
.special-badge { font-size: 0.65rem; background: #ff9f43; color: white; padding: 1px 3px; border-radius: 3px; margin-top: 2px; }
.weekday-text { font-size: 0.7rem; color: #aaa; margin-top: 2px; }
.special-row td { border-top: 2px solid #ff9f43; border-bottom: 2px solid #ff9f43; }
.today-row td { background-color: #fff3cd !important; border-top: 2px solid #ffc107; border-bottom: 2px solid #ffc107; }

/* 底部导航 */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; width: 100%; height: var(--bottom-nav-height);
    background: white; border-top: 1px solid #eee; display: flex; justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom); z-index: 1030;
}
.nav-item { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; color: #bbb; }
.nav-item.active { color: var(--primary-color); }
.nav-icon { font-size: 1.4rem; margin-bottom: -4px; }
.nav-text { font-size: 0.7rem; margin-top: 2px; }