* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 20px;
    padding-top: 120px; /* 为固定header留出更多空间 */
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 15px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    margin-bottom: 0;
    flex-wrap: wrap;
    gap: 10px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: nowrap;
}

.header > h1 {
    color: #2c3e50;
    font-size: 1.4rem;
    margin: 0;
}

/* 日期选择器样式 */
.date-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-picker-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.date-picker-group label {
    font-size: 0.7rem;
    color: #7f8c8d;
    font-weight: bold;
}

.date-input {
    padding: 6px 8px;
    border: 2px solid #bdc3c7;
    border-radius: 6px;
    font-size: 0.7rem;
    width: auto;
    min-width: auto;
}

/* 移除了套餐选择器和应用按钮的样式 */

/* 日期和星期几上下排列的样式 */
.date-weekday-row {
    display: block;
    margin-bottom: 5px;
}

.card-date {
    font-size: 0.75rem; /* 减小二号 */
    font-weight: bold;
    display: block;
    margin-bottom: 2px;
}

.card-weekday {
    font-size: 0.7rem; /* 减小二号 */
    opacity: 0.9;
    display: block;
}

.meal-tabs {
    display: flex;
    gap: 8px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    margin: 0;
}

.tab-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 18px;
    background-color: #ecf0f1;
    color: #7f8c8d;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab-btn:hover {
    background-color: #bdc3c7;
    color: white;
}

.tab-btn.active {
    background-color: #3498db;
    color: white;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    margin-bottom: 30px;
    width: 100%;
}

.calendar-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
}

.calendar-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-header {
    border: 2px solid #27ae60; /* 绿框线 */
    background: white;
    color: #2c3e50;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 15px;
    text-align: center;
}

.dish-list {
    list-style: none;
}

.dish-item {
    padding: 6px 10px;
    margin-bottom: 6px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #3498db;
    font-size: 0.85em;
}

.dish-category {
    font-weight: bold;
    color: #000000; /* 黑色 */
    margin-right: 5px;
    font-size: 0.85em;
}

.dish-name {
    color: #e74c3c; /* 红色 */
    font-size: 0.85em;
}

.no-dishes {
    color: #95a5a6;
    font-style: italic;
    padding: 10px;
    text-align: center;
}

.loading, .error {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 只保留桌面版样式，移除响应式设计 */

.error p {
    color: #e74c3c;
    font-size: 0.8rem;
}

/* 对话框样式 */
.dish-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.dialog-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 600px; /* 加宽窗体 */
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.dialog-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dialog-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s ease;
}

.close-btn:hover {
    transform: scale(1.2);
}

.dialog-body {
    padding: 30px;
    font-size: 0.8rem;
    line-height: 1.6;
    color: #333;
}

.dialog-body p {
    margin: 0;
    white-space: pre-line;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 菜品项点击效果 */
.dish-item {
    padding: 6px 10px;
    margin-bottom: 6px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #3498db;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85em;
}

.dish-item:hover {
    background-color: #e3f2fd;
    border-left-color: #2196f3;
    transform: translateX(5px);
}

.dish-item:active {
    transform: scale(0.98);
}

/* 日期标签样式 */
.date-tag {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.7rem;
    min-width: 80px;
    text-align: center;
    cursor: default;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.date-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.tag-single {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.tag-multiple {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    position: relative;
}

.tag-date {
    font-weight: bold;
    font-size: 0.75rem;
}

.tag-weekday {
    font-size: 0.65rem;
    opacity: 0.9;
    margin-top: 2px;
}

.tag-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: bold;
}

/* 日历选择器样式 */
.date-range-picker {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.date-range-picker label {
    font-weight: bold;
    color: #2c3e50;
    margin-right: 5px;
}

.date-range-picker .date-input {
    padding: 8px 12px;
    border: 2px solid #bdc3c7;
    border-radius: 6px;
    font-size: 1rem;
    min-width: 140px; /* 加宽日期选择器 */
}

.refresh-btn {
    padding: 8px 16px;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.7rem;
    transition: background-color 0.3s ease;
    white-space: nowrap; /* 确保按钮文字不换行 */
}

.refresh-btn:hover {
    background-color: #229954;
}

/* 月日历样式 */
.month-calendar {
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.calendar-header {
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ecf0f1;
}

.calendar-header h5 {
    margin: 0;
    color: #2c3e50;
    font-size: 0.9rem;
}

.month-calendar .calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 0;
}

.calendar-weekday {
    text-align: center;
    font-weight: bold;
    color: #7f8c8d;
    padding: 8px 0;
    font-size: 0.7rem;
    border-bottom: 1px solid #ecf0f1;
}

.calendar-day {
    text-align: center;
    padding: 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    position: relative;
    cursor: default;
    transition: all 0.2s ease;
    min-height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-day:hover {
    background-color: #f8f9fa;
}

.calendar-day.empty {
    background-color: transparent;
    cursor: default;
}

.calendar-day.highlighted {
    background-color: #e3f2fd;
    color: #1976d2;
    font-weight: bold;
    border: 2px solid #2196f3;
}

.calendar-day.highlighted:hover {
    background-color: #bbdefb;
}

.highlight-dot {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background-color: #e74c3c;
    border-radius: 50%;
}

/* 移除对话框响应式设计，只保留桌面版样式 */

/* 月份导航按钮样式 */
.month-nav-btn {
    padding: 6px 12px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.7rem;
    transition: background-color 0.3s ease;
}

.month-nav-btn:hover {
    background-color: #2980b9;
}

.month-nav-btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

/* 日历标题样式 */
#calendarTitle {
    color: #2c3e50;
    font-weight: bold;
    text-align: center;
}

/* --------- 弹窗内右侧面板风格 --------- */
.dialog-calendar {
    background-color: #f8f9fa;
}

.dialog-calendar .date-range-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.dialog-calendar .range-separator {
    color: #7f8c8d;
    font-weight: bold;
}

.dialog-calendar .selected-dish-info {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
}

.dialog-calendar .selected-dish-info h3 {
    margin: 0 0 8px 0;
    color: #495057;
    font-size: 16px;
}

.dialog-calendar .selected-dish-info p {
    margin: 4px 0;
    color: #6c757d;
    font-size: 14px;
}

.dialog-calendar .dialog-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 10px;
}

.dialog-calendar .toolbar-note {
    color: #6c757d;
    font-size: 13px;
}

.calendar-status {
    font-size: 13px;
    margin-bottom: 10px;
    min-height: 18px;
    color: #6c757d;
}

.calendar-status.error {
    color: #e74c3c;
}

.calendar-status.info {
    color: #2c3e50;
}

.dialog-calendar-container {
    background-color: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.dialog-calendar .calendar-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dialog-calendar .calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.dialog-calendar .calendar-nav-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.dialog-calendar .calendar-nav-btn:hover {
    background-color: #45a049;
}

.dialog-calendar .month-year-display {
    font-size: 1rem;
    font-weight: bold;
    color: #333;
}

.dialog-calendar .month-tabs-block {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    padding: 8px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.dialog-calendar .month-tab {
    padding: 4px 6px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: #495057;
    transition: all 0.2s ease;
    text-align: center;
}

.dialog-calendar .month-tab:hover {
    background-color: #f0f0f0;
    border-color: #999;
}

.dialog-calendar .month-tab.active {
    background-color: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.dialog-calendar .month-tab.has-dish-month {
    position: relative;
    border: 2px solid #ff4444;
}

.dialog-calendar .month-tab.has-dish-month::after {
    content: '✓';
    position: absolute;
    right: 2px;
    top: -8px;
    color: #ff4444;
    font-size: 12px;
    font-weight: bold;
}

.dialog-calendar .calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: #ddd;
}

.dialog-calendar .calendar-weekday {
    background-color: #f5f5f5;
    padding: 6px;
    text-align: center;
    font-weight: bold;
    color: #666;
    font-size: 0.8rem;
}

.dialog-calendar .calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.dialog-calendar .calendar-day {
    background-color: white;
    padding: 0.4rem;
    min-height: 36px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.dialog-calendar .calendar-day:hover {
    background-color: #f0f0f0;
}

.dialog-calendar .calendar-day.empty {
    background-color: #f8f9fa;
    cursor: default;
}

.dialog-calendar .calendar-day.today {
    background-color: #e3f2fd;
    font-weight: bold;
    border: 2px solid #2196F3;
}

.dialog-calendar .calendar-day.has-dish {
    background-color: #007bff;
    color: white;
    font-weight: bold;
}

.dialog-calendar .calendar-day.today.has-dish {
    border: 2px solid #0056b3;
}